Skip to content

feat: editable 3D scenes with XYZ gizmos and reference studio - #2

Merged
lxf82dev merged 6 commits into
mainfrom
docs/3d-scene-adjustment-requirements
Oct 26, 2026
Merged

lxf82dev merged 6 commits into
mainfrom
docs/3d-scene-adjustment-requirements

Conversation

@lxf82dev

@lxf82dev lxf82dev commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Controls v2 adds quaternion rotation and explicit spatial semantics while preserving controls-v1 identity. Shared sampling handles sign-equivalent quaternions and deterministic 180-degree ties.
  • New renderer-independent spatial sessions negotiate gesture v2 separately, constrain operation keys, validate presentation identity, distinguish cancellation from publication and support uncertain-outcome reconciliation.
  • Stale release validation clears the draft before another gesture starts. Screen-plane constraints use the camera’s world orientation, and scale saturation respects declared positive bounds below the default floor.
  • A pinned Three r180 facade uses renderer-local proxies and a separate helper scene. Explicit pivot/parent math preserves selected axes/planes through constraints and grid snapping; opt-in surface placement adds a final world-Y correction; unsupported ancestry is refused. Picking refreshes deformed skinned-mesh bounds.
  • Optional surface snap settles actors onto explicitly admitted floor/table/prop surfaces on release, combining movement and grounding into one undo step. Hosts opt bindings in and retain exact numeric entry. Frozen posed bounds, upward support probes, parent conversion and stored bounds define this approximate placement; it does not solve foot IK or physics. Escape cancels an active drag even while a toolbar checkbox retains focus.
  • Camera edits initialize from the evaluated shot, preserving its target and lens. Pausing refreshes inspector values; stationary camera clicks do not activate an override.
  • Local models are optional, embedded and hashed, with external GLB dependencies rejected. Public source contains original procedural stand-ins and no third-party character binaries or generated HTML.

See examples/scene-editor/README.md for setup, ownership boundaries and controls. Run npm run build:scene then npm 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.
  • Existing npm run test:browser, npm run test:beta, and npm run test:renderer passed at implementation commit 5d63290, 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:public and git diff --check passed. Loopback-dependent suites ran with local network permission; export suites used the installed FFmpeg.
  • Review fixes are covered by targeted regressions, including stale-release cleanup without cancelling duplicate releases, world-space camera constraints, small authored scale intervals and Clay toolbar synchronization. Tests establish behavior on the tested browser/GPU, not cross-GPU pixel identity.

No deployment, paid model generation, API keys or third-party binary redistribution.

@lxf82dev lxf82dev changed the title docs: requirements for 3D scene adjustment and XYZ gizmos feat: editable 3D scenes with XYZ gizmos and reference studio Oct 25, 2026
@lxf82dev
lxf82dev merged commit 6a5a531 into main Oct 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant