Repository navigation
StageFlow v1.1.1 — Diorama Performance, Camera Snap, Render Sync & Custom Export Range
StageFlow v1.1.1 is a focused reliability, performance, and exporter usability patch on top of v1.1.0. It eliminates idle WebGL/CPU churn when paused, resolves 60fps/10Hz shot-boundary desync glitched frames, fixes Observer Camera snap resets across score transitions and hydration, and adds a Custom (s) dual-handle timeline scrubber to the in-browser WebCodecs MP4 exporter.
What's New & Fixed in v1.1.1
⚡ Idle WebGL/CPU Loop Elimination, Memoized Rigs & 60fps Shot-Cut Sync Gate (#9 / PR #11)
- On-Demand Canvas Rendering: Both
DioramaCanvasandStageCamMonitorCanvasnow runframeloop="demand"while paused, waking immediately on orbits, resize transitions, preset snaps, async<Text>font loads, and manual seeks (onSeekSettled/onTimeJump), while short-circuiting redundant idlecomputeStageFrame()calls. - Rig & Mannequin Memoization: Memoized
DirectionalMannequin,BlueprintFloorGrid, andStageCameraRigMount, hoisted static arrays and unconditional hooks, delta-guarded DOM/GPU tether buffer updates (StageBillboardLabel,StageCameraFocusRig,StageCameraOffsetTether), added Three.js.dispose()resource cleanups, moved frame-invariant thin-lens DoF denominator math to CPU (uOpticalScale), and throttled MP4 export progress flushes (~100ms). - Shot & Cue Boundary Sync Gate (
stageSyncGate.ts): AddedresolveGatedState()withuseLayoutEffectsynchronization across gated rigs, mannequins, focus/offset tethers, mounts, and the WebGL2 DoF pass to hold the last rendered 60fps state across async boundary commits instead of snapping back to stale 10HzuiFramesnapshots.
✂️ Custom Time Range (Custom (s)) & Dual-Handle Scrubber for MP4 Export (#13 / PR #14)
- Shot-Aware Dual-Handle Scrubber: Extended
Time RangeinFile ▾ → Export Video (.mp4)...withCustom (s), featuring a drag-only dual-handle timeline scrubber (ExportRangeScrubber/ExportRangeScrubberTrack) with shot cut dividers, hover timecode readout, and inline decimalStart (s)/End (s)inputs (0.1sstep, preserving 3-decimal scene durations such as45.375sand61.625s). - Validation & Range-Tagged Output Filenames: Pure Layer 1 validation (
validateCustomExportRangeinsrc/core/exportMath.ts+src/core/exportScrubberMath.ts) guards against negative, inverted, out-of-bounds, or sub-frame (< 1 / fps) selections, whileformatExportMp4Filename()emits_<start>s-<end>s_tags (e.g.,vector_field_2_5s-6s_stage_cam_1080p_60fps.mp4).
🎯 Observer Camera Snap & Clock Reset on Score Transitions (#8 / PR #15)
- Deterministic
sceneResetSeqTransition Signal: Opening, creating, forking/duplicating, deleting (fallback), resetting, importing, or asynchronously hydrating a score (IndexedDB,?score=,?remoteUrl=) atomically resetscameraModeto'scripted', pauses and seeks the clock tot = 0, clears staleshotIdgate refs, flushes residualOrbitControlsdamping deltas, and snaps the Observer Camera cleanly toframe.observerCamera.transform. - Non-Disruptive Live YAML Editing: Added
MediaClockDriver.setDuration()in-place updates (Html5MediaDriver,YouTubeMediaDriver,ProceduralMediaDriver) so live YAML edits and in-place renames preserve playheadt, playback state, and paused free-orbit camera angles.
Quality & Verification
- Unit Test Suite:
258deterministic tests passing across22Vitest suites (tests/unit/stagePerfHelpers.test.ts,tests/unit/exportScrubberMath.test.ts, expandedexportMath.test.ts, andmediaDrivers.test.ts). - Static Checks:
oxlint(0warnings /0errors), strict TypeScripttsc -b, and Vite production build clean.
Upgrade & Usage Notes
- Backward Compatibility: All
v1.1.0andv1.0.0YAML choreography scores remain 100% compatible without changes. - Note on Issue #10: The proposed half-resolution DoF shader refactor (
#10) was evaluated and closed as not planned after#9resolved interactive stutter and idle GPU churn without introducing multi-pass FBO edge cases.
Full Changelog & Documentation
- 📜 CHANGELOG.md (
[1.1.1]) — Granular file-by-file technical breakdown. - 📖 YAML Authoring Guide — Complete DSL syntax and production recipes.
- 📐 StageFlow Script Specification — Optical math, kinematics, and normalized AST contracts.
What's Changed
- perf(stage,media,hooks): eliminate idle diorama churn, memoize rigs, and fix shot-cut desync (#9) by @taruma in #11
- feat(export): add custom time range in seconds to in-browser MP4 export (#13) by @taruma in #14
- fix(camera): snap observer camera to initial pose on score load, create, fork, and hydration (#8) by @taruma in #15
- StageFlow v1.1.1 — Diorama Performance, Camera Snap, Render Sync & Export Custom Range by @taruma in #12
Full Changelog: v1.1.0...v1.1.1