Repository navigation
feat: editable 3D scenes with XYZ gizmos and reference studio - #2
Merged
Merged
Conversation
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.
What changes
EditableFrames' previous manipulation adapter only offered screen-plane movement and uniform resize. This adds an opt-in Three.js scene editor with XYZ/plane movement, world/local rotation, positive uniform scale, camera/light controls and source-time keyframes. Selecting a character and dragging an arrow now previews transient values and publishes one reversible, revision-checked edit on release; Escape discards it.
The included standalone HTML studio demonstrates two authored scenes: two-person drama blocking and an original procedural robot-versus-giant-ape sequence. Director navigation is independent of the shot camera. Clean reference PNG capture freezes committed state and excludes helpers, director navigation and active drafts. Scene JSON retains reversible history, and cooperating browser tabs cannot overwrite newer saves. Persistence probes actual lock and storage access; denied local-file contexts remain editable in memory with JSON download/reopen, without unlocked shared-storage writes or replaying a possibly completed transaction.
Framework changes
See
examples/scene-editor/README.mdfor setup, ownership boundaries and controls. Runnpm run build:scenethennpm run dev:scene.Scope
This implements reusable contracts and a standalone consumer. Native Stitchable IPC/gesture transport, Library/KDV integration and automatic snapshot migration remain separate work. Existing generic editors retain their current manipulation path. Arbitrary skeletal posing, IK authoring, collision/contact solving, multi-object transforms and movie-export UI are not included. Actor offsets preserve authored action but do not re-solve contacts. The requirements document remains the broader host-integration contract and now marks the implemented slice explicitly.
Validation
npm run build;npm test: 102/102 passed.npm run test:scene: 18 browser checks passed, both with public procedural stand-ins and with locally supplied rigged GLBs. Covers surface placement on tables/floors in both scenes, toggle-off free placement, stationary-click no-ops, cancellation and undo/redo, plus real pointer transforms, Escape, single history transactions, keyframes, reload, lights, camera continuity after playback, stationary clicks, orbit, capture during a draft, scene switching, concurrent saves opening the standalone HTML from disk, Clay synchronization across inspector edits, undo/redo, reload and scene switching, and real edits/drags plus JSON export/import when the Locks API is explicitly denied.npm run test:browser,npm run test:beta, andnpm run test:rendererpassed at implementation commit5d63290, including MP4/ProRes/PNG/audio and legacy editing regression checks. The subsequent review fixes were verified with the full unit suite and both scene-browser builds.npm run check:publicandgit diff --checkpassed. Loopback-dependent suites ran with local network permission; export suites used the installed FFmpeg.No deployment, paid model generation, API keys or third-party binary redistribution.