macOS display backend + parented-text / spritesheet / hierarchical-visibility engine fixes#7
Open
a-korath wants to merge 5 commits into
Open
macOS display backend + parented-text / spritesheet / hierarchical-visibility engine fixes#7a-korath wants to merge 5 commits into
a-korath wants to merge 5 commits into
Conversation
Wire a macOS display backend into the existing DisplayPlatform seam and make the crate build on macOS. - Gate the Wayland dependency stack + `wayland` module + WaylandPlatform branch of `detect_platform` to `#[cfg(target_os = "linux")]`; keep raw-window-handle shared. This removes the libwayland link that blocked macOS builds. - Flatten src/platform/macos/mod.rs (drop the double-nested inner module) and add MacOSPlatform: DisplayPlatform, returned by detect_platform on macOS. Rendering is stubbed (spawn_wallpaper bails with a clear message) pending the winit/wgpu-surface render loop. - Pin macOS deps to winit's objc2 line (winit 0.30, objc2 0.5, objc2-app-kit 0.2) so MacOSPlatform shares winit's NSWindow types. - Document shaderc-on-macOS (brew + gitignored .cargo/config.toml SHADERC_LIB_DIR) in README; gitignore .cargo/ and CLAUDE.md. - Add DECISIONS.md, INTERVIEW.md, PROGRESS.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…old render_TRS into render Desktop backend now behaves as a wallpaper: - pin_to_desktop sinks the winit window to kCGDesktopWindowLevel with CanJoinAllSpaces | Stationary + ignoresMouseEvents; app-lifecycle wiring runs the loop on the main thread (run_wallpaper_on_main). - find_steam_library_roots also scans ~/Library/Application Support/Steam (existence-filtered, inert on Linux) so the egui browser lists Workshop items on macOS. Engine: - Fold the iterated render_TRS.rs back into src/engine/render.rs and drop the #[path] override; delete the old shadowed render.rs. Rename only. - Ripple/water band-aid: WP_ENGINE_ADDITIVE_BRIGHTNESS (default 0.55) scales additive image layers down so the LonelyCat water layer doesn't blow out white. Real fix (backdrop capture coupled with a replace composite) is documented in PROGRESS.md / DECISIONS.md for the engine track. Docs: PROGRESS/DECISIONS/README/CLAUDE updated for the above and the known window-focus gap (NSApp .accessory still pending). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fix code-wolf-byte#1 (LonelyCat clock vanishing on minute change): apply_parent_transforms now pushes TextDynamic::raw_origin through the parent world transform and scales by the parent scale, so the minute-rollover re-rasterize computes the rect in world space instead of the un-parented local origin. Fix code-wolf-byte#3 (LonelyCat AM/PM doubled): expose thisLayer.getTextureAnimation() .setFrame(n) in the boa script engine (+ eval_frame to capture the side effect); LoadedImage now carries the .tex TEXS frames (sprite_frames) when the model->material chain declares the SPRITESHEET combo, and select_spritesheet_frame swaps in the single cell the object's frame script selects. Frame is picked once at load from the wall clock (ponytail ceiling noted). SAO hair (attachment) remains a documented gap: real cause is unimplemented puppet bone `attachment`, not cropoffset (ruled out). See PROGRESS.md. Also: macOS spawn_wallpaper launches a child `set-file` process so the egui GUI's "Apply Wallpaper" works (two winit loops can't share the main thread). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dir) These are local working notes for the macOS-compat effort, not something to carry in the wp-engine repo or upstream in a PR. Relocated one level up to WP-Engine/ alongside CLAUDE.md; README.md remains the tracked source of truth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…econcile Brings in ~12 upstream commits (audio reactivity, GPU particle rendering, static 3D mesh loading, particle remapvalue + puppet animation-layer blending, scripted transforms/text fidelity, and the "drop dead render stack" removal of frame_context/render_graph/engine/engine_object/effect_diagnostics/shader/ wgpu_scene) on top of the macOS backend + engine fixes. Conflict resolution (render.rs, gpu_renderer.rs) — both intents preserved: - kept hierarchical visibility (Scene::visibility_mask) AND upstream's light + 3D-mesh layer branches; folded upstream's per-object visible_script() rule into visibility_mask so script-driven-visibility layers survive load. - kept Fix code-wolf-byte#1 (parented text: leave the authored-size quad's rect untouched on content change) over upstream's raw_origin rect-recompute — self-consistent with the merged TextDynamic (no raw_origin field). Verified: LonelyCat clock renders in place. - kept Fix code-wolf-byte#3 (SPRITESHEET frame select) AND upstream's puppet animationlayers. Verified: AM lit / PM dimmed at 11:00 (not doubled). - kept text aspect-fit AND upstream's baked-bg no-retint; took upstream's mesh material/color helpers and transform-scripts block wholesale. Removed 5 test files orphaned by upstream's stack removal (they import the deleted modules and are already red on origin/main): frame_context, render_graph, wgpu_scene, shader, workshop. Follow-up: re-add a workshop-scan smoke test against the new render stack. cargo build + cargo test (158 lib + camera/effect/properties + doctests) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a macOS display backend (counterpart of the Wayland one) plus three engine fixes found while testing scenes on macOS. Rebuilt on top of current
main(merged in the audio/particle/3D-mesh/drop-dead-render-stack work first), builds clean, tests green.macOS backend (
src/platform/macos/mod.rs, +321)DisplayPlatform: a scene renders into a borderless winit window on a wgpu Metal surface (GpuSceneInstance::render_to_view, no readback), pinned to the desktop layer viapin_to_desktop(kCGDesktopWindowLevel,CanJoinAllSpaces | Stationary,ignoresMouseEvents).spawn_wallpaperlaunches a childwp-engine set-file <dir>process;run_wallpaper_on_maindrives the loop.detect_platform()selects the backend at runtime.Cargo.toml; wgpumetalfeature enabled. The egui browser lists Workshop items on macOS and "Apply Wallpaper" works..accessory/click-through, clean SIGINT exit, multi-monitor, Static/Video routing, GUI child-process Drop-stop.Engine fixes (platform-independent)
Scene::visibility_mask()culls a layer when it or any ancestor is hidden (fixes overlapping multi-language clock/date groups). Folded inmain's per-objectvisible_script()rule so script-driven-visibility layers survive load. Unit-tested.SPRITESHEETframe selection + thethisLayer.getTextureAnimation().setFrame(n)script API — a 2-frame AM/PM atlas now shows only the current period lit instead of both cells ("doubled").Note on tests
Removes
tests/{frame_context,render_graph,wgpu_scene,shader,workshop}.rs— they import modules deleted bymain's "drop dead render stack" and no longer compile onmain. Follow-up worth doing: a workshop-scan smoke test against the new render stack.🤖 Generated with Claude Code