Repository navigation
Releases
StageFlow v1.3.0 — Ephemeral 3D `.glb` Skins, Live 2D Stage Minimap & Parallel CDP Recorder
StageFlow v1.3.0 introduces ephemeral .glb / .gltf 3D Stage & Entity Skins across both the live Studio and headless CLI Recorder, adds a 60fps 2D SVG top-down Stage Minimap ([ Map ] / M and Scene Desk Map tab), scopes drag-and-drop cleanly to target panes with folder drop support, and upgrades the Playwright + FFmpeg CLI recorder with hardware ANGLE acceleration, CDP JPEG capture, and stateless parallel worker sharding—while maintaining 100% backward compatibility across existing v1.0.0–v1.2.0 YAML choreography scores.
What's New in v1.3.0
🧊 Ephemeral .glb / .gltf 3D Stage & Entity Skins (StageEnvironmentSkin.tsx, skinMath.ts) (#31)
- Zero-Persistence Session Skins: Drop or pick
.glb/.gltf3D models (File ▾ → Load 3D Skins...or drag-and-drop onto the 3D Diorama, including recursive folder drops viawebkitGetAsEntry) held strictly in browser memory (URL.createObjectURLwith automatic revocation anduseGLTF.clearcache cleanup), keeping YAML scores untouched. - Single & Multi-Skin Batch Assignment (
AssignStageSkinModal.tsx,BatchSkinAssignmentList.tsx): Single skins use an explicit radio selector +Apply Skinconfirmation; 2+ skins (or dropped folders) open a unified batch assignment view with filename auto-matching (suggestSkinTargetId), duplicate-target warnings, individual skip controls, and 1-clickApply N Skins. - 60fps YAML Transform & Multi-Canvas Parity:
computeGlbEntityNormalizationcentersX/Z, pinsY = 0, and fits entity bounds insideDirectionalMannequin.tsxso live YAMLrotation,facing,look_at,pitch/roll,width/height/depth,scale, footprints, trails, and labels continue driving custom.glbassets seamlessly across the Diorama, Stage Cam Monitor, 1080p PNG Snapshot, MP4 Export, and Storyboard Contact Sheet. - Headless CLI Recorder Skin Flags: Added
--stage-skin <path>, repeatable--entity-skin <id>=<path>, and--skins-dir <dir>via virtual/__stageflow_skin__/*Playwright route interception.
🗺️ Live 60fps 2D SVG Top-Down Stage Minimap (DioramaMinimap.tsx, minimapMath.ts)
- Diorama Top-Right HUD & Scene Desk Tab: Toggleable via
[ Map ]or hotkeyM(open by default on wide viewports>= 768px, persisted understageflow:ui:diorama-minimap) and also embedded as a full-fitMaptab (Brief | Stage Cam | Map) inVideoWorkspaceSubpanel.tsxwith zero extra WebGL contexts. - Imperative 60fps SVG Updates (
dioramaMinimapRenderer.ts): Mutates SVG attributes directly fromframeRefandliveViewportPoseRef(zero React re-renders), displaying live entities with facing vectors, the Stage Camera horizontal FOV cone + sightline + emerald focus plane bar, and the sky-blue Observer marker (clamped cleanly to the radar perimeter when zoomed out, hidden inStage Cam POV).
⚡ High-Speed Stateless CLI Recorder Pipeline (scripts/record/) (#32, #33)
- Stateless Frame Stepping & CDP JPEG Capture: Added
frameloopMode="never"+HeadlessAdvanceBridge(advance()) and sharedhasStageFrameBoundaryChangeddiffing to eliminate background renders and mid-shot React commits, paired with direct CDPPage.captureScreenshotdefaulting tojpeg(q=96, overridable via--capture jpeg|png). - Hardware ANGLE GPU & Multi-Worker Sharding: Enabled ANGLE GPU acceleration (
--use-angle=d3d11on Windows, opt-out via--software-gl) and stateless parallel worker sharding (--workers, auto-selected1–4by frame count and CPU cores, stitched via FFmpeg-c:v copy). - Clean External YAML Output Defaults (
cliArgs.ts): Omitting-o/--outputfor external or nested YAML paths now resolves cleanly torecordings/<basename>_<camera>.<ext>.
🎯 Workspace Ergonomics, Drop Zones & Guide Downloads
- Pane-Aware Drag-and-Drop (
fileDropClassifier.ts): Scoped drops cleanly between the 3D Diorama pane (.yaml/.yml/.jsonscores,.glb/.gltfskins, and folders) and Left Video pane (.mp4/.webm/.movvideos, includingpointer-events-nonepassthrough over active YouTube<iframe>s). - Workflow-Grouped
File ▾Menu (FileMenuDropdown.tsx): Reorganized into 4 clean sections (Score & Project,3D Skins,Export & Storyboard,Documentation) with single-line format tags and persistentClear All 3D Skinsstatus. - Touchscreen Split Dividers (
ResizableSplitWorkspace.tsx): Addedtouch-none,setPointerCapture,~24pxcoarse-pointer hit targets,role="separator"semantics, and minimum22%Center Diorama width clamping. - Downloadable
.mdManuals (ScoreAuthoringGuideView.tsx,guideUtils.ts): AddedDownload .mdbuttons to?mode=guide(YAML_AUTHORING_GUIDE.md) and?mode=spec(STAGEFLOW_SCRIPT_SPECIFICATION.md).
Bug Fixes & Test Suite Architecture
-
R3F
useFramePriority Ordering &<Html>1-Frame Lag Fix (stageSyncGate.ts) (#34): Ordered R3F execution strictly (EVALUATE_FRAME = -2$\to$ OrbitControls -1$\to$ RIG_TRANSFORMS = -0.5withupdateMatrixWorld()$\to$ DOM_OVERLAYS = 0$\to$ POST_EFFECT = 1), eliminating 1-frame<Html>label jumps during live playback and at parallel recorder worker boundaries. -
Headless Recorder Frame 0 Readiness:
HeadlessRecorderView.tsxnow awaits 4 initial R3F render ticks + 2requestAnimationFrames (withpreserveDrawingBuffer: true) before capturing Frame 0. -
Modular Test Suite Refactor (#30 / #35): Split monolithic unit tests (
frameEngine.test.ts,scoreParser.test.ts,entityEngine.test.ts,storyboardMath.test.ts) to mirrorsrc/core/submodules, introducedtests/helpers/scoreFixtures.ts, and moved catalog/blueprint regressions totests/integration/.
Quality & Verification
- Unit & Integration Test Suite:
354deterministic tests passing across41Vitest suites (tests/unit/+tests/integration/). - Static Checks:
oxlint(0warnings /0errors across198files), strict TypeScripttsc -b, and Vite production build (3143modules) clean.
Full Changelog & Documentation
- 📜 CHANGELOG.md (
[1.3.0]) — Granular file-by-file technical breakdown. - 📖 YAML Authoring Guide — Complete DSL syntax, §8 Release History, and production recipes.
- 📐 StageFlow Script Specification — Optical math, kinematics, and normalized AST contracts.
- 📹 Viewport Recorder Guide — 60fps Playwright + FFmpeg CLI, parallel workers, and
.glbskin flags.
What's Changed
- StageFlow v1.3.0 — Ephemeral .glb/.gltf Skins, Live 2D Stage Minimap, Parallel CLI Recorder & Modular Test Suites by @taruma in #38
Full Changelog: v1.2.0...v1.3.0
StageFlow v1.2.0 — 3D Entity Orientation, Sub-Anchors, Rotation Pivot, Storyboard & 1080p Snapshot
StageFlow v1.2.0 expands 3D entity choreography, directorial look-at targeting, continuous camera rig continuity, and production export workflows—while maintaining 100% backward compatibility across existing v1.0.0 and v1.1.x YAML choreography scores.
What's New in v1.2.0
🧭 3D Entity Orientation (pitch & roll) & Vertical Rotation Pivot (pivot) (#18, #20)
-
Per-Entity
pitch&roll: Author X-axis pitch and Z-axis bank acrossentities[],blocking:(Formats A & B), andshots[].entitiesin intrinsicYXZorder (yaw → pitch → roll), with shortest-arc easing,cut: trueinstant snapping, and independence from yaw-onlylook_at. -
Configurable Vertical Pivot (
pivot/pivot_ratio/pivotRatio): Tilt around"base"(0.0, floor-pinned leans/prone),"center"(0.5, mid-air flips/banking),"top"(1.0), or any clamped0..1ratio, with$C^0$ forward chaining across tilted cues (1 - cos(startPitchRad) * cos(startRollRad) < 1e-8upright lock) and shear-free 60fps 3D transforms with flat footprints and kind-aware rotated label badges.
🎯 Dot-Notation Entity Target Sub-Anchors (<entityKey>.<part>) (#19)
- Target specific body regions (
.head/.eyes/.eye,.shoulder/.chest,.shoulder_l+0.40w,.shoulder_r-0.40w,.waist/.center,.feet/.base,.top) acrosstarget,from,focus,focus_start/focus_end, multi-entity centroid arrays,waypoints, baselinestagecameras, and order-independent Jacobi-relaxedlook_at(with exact-first disambiguation protecting dotted IDs).
🗂️ Storyboard Contact Sheet Generator, Viewer & Exports (#28 / PR #29)
- Studio Storyboard Modal (
File ▾ → Storyboard...): Generates progressive540pWebP shot boards acrossStage CamandObserverviews withMid,Start,End,Start & End, andStart·Mid·Endsampling modes, DP/AC technical metadata cards, framing guides (Off/Thirds/Safe/All), and a? Spec Guidepopover. - Single-Frame & Multi-Page Exports: Export individual frames (
720p/1080p,PNG/WebP/JPG,Clean FramevsBurn-in), paginated white-paperContact Sheet(2400pxmulti-page.zipor1-Page PNGoverride), orAll Frames (.zip)via a zero-dependency STORE ZIP builder (zipBuilder.ts).
📸 1-Click 1080p Clean Stage Cam PNG Snapshot
- Desktop bottom-left Camera button in
DirectorialTransportBarmountsCleanStageCamExportCanvasoffscreen for a single-frame1080pPNG capture inheriting active Diorama Theme and[Blur]DoF state (<slug>[_<shot-id>]_<scene-sec>s_snap_<YYYYMMDD_HHmmss_SSS>_1080p.png).
📖 Chronological YAML DSL Release History
- Added
§8. YAML DSL Release Historyat the bottom ofdocs/YAML_AUTHORING_GUIDE.md(with aReleasesshortcut pill in?mode=guide) tracing YAML authoring additions chronologically fromv0.1.0throughv1.2.0.
Bug Fixes & Parser Parity
-
Continuous Camera Rig
E_prevEye Inheritance: Continuoustrack, 1-pointspline_track, andtripodcamera rigs omittingrig.from/rig.positionnow inherit the previous shot's terminal eye position$\vec{E}_{\text{prev}}$ seamlessly even across changingtarget:anchors. -
Parser Alias Parity: Added
stage.gridStepcamelCase alias, flat rootopticsaliases (blur,depth_of_field/depthOfField,f_stop/fStop), and flat shot-root optical overrides (f_stop_start,dof_start,f_stop_end,dof_end). -
Stage Cam DoF
deepColor Consistency: Routeddof: 'deep'through the FBO 1-tap passthrough inStageCamDofEffect.tsxwhen[Blur]is ON, eliminating color-management shifts when racking or switching betweenshallowanddeep.
Quality & Verification
- Unit Test Suite:
323deterministic tests passing across26Vitest suites (tests/unit/). - Static Checks:
oxlint(0warnings /0errors across168files), strict TypeScripttsc -b, and Vite production build (3132modules) clean.
Full Changelog & Documentation
- 📜 CHANGELOG.md (
[1.2.0]) — Granular file-by-file technical breakdown. - 📖 YAML Authoring Guide — Complete DSL syntax, §8 Release History, and production recipes.
- 📐 StageFlow Script Specification — Optical math, kinematics, and normalized AST contracts.
What's Changed
- feat(core,stage): support entity pitch and roll rotations (#18) by @taruma in #21
- feat(core,ui): support dot-notation entity target sub-anchors (#19) by @taruma in #23
- feat(core,stage): add optional entity rotation pivot (base vs center) (#20) by @taruma in #27
- feat(ui): add Storyboard Contact Sheet viewer, single-frame & multi-page exports (#28) by @taruma in #29
- StageFlow v1.2.0 — 3D Orientation, Sub-Anchors, Rotation Pivot, 1080p Snapshot & Storyboard by @taruma in #22
Full Changelog: v1.1.2...v1.2.0
StageFlow v1.1.2 — Responsive & FOV-Normalized 3D Billboard Labels
StageFlow v1.1.2 is a focused visual ergonomics and optical LOD patch on top of v1.1.1. It resolves inconsistent 3D billboard badge sizing across desktop camera distances and prevents badges from appearing oversized on mobile and narrow split-pane viewports, while keeping all label and sublabel text intact.
What's Fixed in v1.1.2
🏷️ Responsive & FOV-Normalized 3D Billboard Label Sizing (#16)
- Tighter Perspective Scale Bounds (
src/stage/labelLodMath.ts): TightenedMAX_PERSPECTIVE_SCALEfrom1.55to1.08and raisedMIN_PERSPECTIVE_SCALEfrom0.72to0.75to eliminate close-range badge bloat on desktop and mobile while retaining subtle depth cueing. - Horizontal-FOV Distance Normalization (
computeEffectiveLodDistanceM): Normalized LOD scaling and pill-to-dot collapse distances against horizontal angular coverage (aspectRatio * tan(fovY / 2)) anchored to StageFlow's35mmfull-frame baseline (REF_HALF_HORIZ_TAN), keeping telephoto (85mm) pills readable beyond28m, collapsing wide-angle (24mm) clutter earlier, and keeping adaptive narrow-pane FOV widening (computeAdaptiveDioramaFovDeg) LOD-invariant—while preserving physical proximity culling (< 1.2m) on raw Euclidean distance. - Unified-Breakpoint CSS Sizing & Zero-Churn 60fps Sync (
src/stage/StageBillboardLabel.tsx): AlignedgetBillboardSizeTier()(COMPACT_CANVAS_WIDTH_PX = 768) withisNarrowDiorama(CompactDioramaHeader) so React re-renders only when crossing768px, switching cleanly betweenstandard(px-3 py-1,13px/11px) andcompact(px-2 py-0.5,11px/10px) pill typography while passing livePerspectiveCamera.fovand canvas aspect ratio insideuseLayoutEffectanduseFrame.
Quality & Verification
- Unit Test Suite:
265deterministic tests passing across22Vitest suites (including19tests intests/unit/billboardLabelLod.test.tscovering[0.75, 1.08]bounds,< 768pxtier switching,85mm/24mmFOV normalization, adaptive narrow-pane invariance, and physical proximity culling). - Static Checks:
oxlint(0warnings /0errors), strict TypeScripttsc -b, and Vite production build clean.
Upgrade & Usage Notes
- Backward Compatibility: All
v1.1.1,v1.1.0, andv1.0.0YAML choreography scores remain 100% compatible without changes.
Full Changelog & Documentation
- 📜 CHANGELOG.md (
[1.1.2]) — 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
Full Changelog: v1.1.1...v1.1.2
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
StageFlow v1.1.0 — In-Browser WebCodecs MP4 Export & Studio Polish
StageFlow v1.1.0 brings zero-install, deterministic in-browser MP4 video export powered by WebCodecs and mp4-muxer — allowing directors, educators, and choreographers to render clean Stage Cam POV film gates and 16:9 Observer Diorama schematics directly from the web studio without needing Node.js, Playwright, or FFmpeg.
This release also introduces the stageflow-score-creator workspace skill for guided YAML authoring and resolves a subtle split-pane telemetry bug affecting Observer Camera focal length readouts.
What's New in v1.1.0
🎬 In-Browser Deterministic MP4 Export (File ▾ → Export Video (.mp4)...)
- Two Selectable Export Cameras:
- Stage Cam POV: Clean film gate render at
gateScale = 1.0matching your score'saspect_ratio(16:9,1.85:1,2.39:1,4:3,9:16) with zero viewfinder borders and inherited thin-lens WebGL2 DoF bokeh blur (On/Off). - Observer Diorama (
16:9): Macroscopic blueprint view locking output to16:9(1920×1080/1280×720) with visible Stage Camera chassis, tripod/dolly tracks, rectangular gate frustums, focus plane frames, DoF brackets, and 3D trajectory curves. Supports both Scripted Observer and Current Viewport Angle.
- Stage Cam POV: Clean film gate render at
- WebCodecs +
mp4-muxerClient-Side Pipeline:- Dedicated offscreen WebGL
<Canvas frameloop="never" dpr={1}>mounted strictly while an export is actively encoding. - Progressive H.264 profile negotiation (
avc1.640028→avc1.640033→avc1.4d002a→avc1.42001f),encodeQueueSizebackpressure control, immediateVideoFrame.close()memory cleanup, live progress telemetry, thumbnail preview, and clean cancellation. - Configurable
1080p/720presolution,60 fps/24 fpscadence,Entire Scene/Current Shotrange, andLight/Warm/Darkstage palettes. - Pure Layer 1 export resolution, timing, aspect-ratio, and filename utilities covered by unit tests in
tests/unit/exportMath.test.ts.
- Dedicated offscreen WebGL
🧭 Workspace Authoring Tooling (stageflow-score-creator Skill)
- Added
.agents/skills/stageflow-score-creator/SKILL.mdfor AI-assisted YAML score authoring and pedagogical choreography explanation. - Enforces strict documentation-only grounding (
YAML_AUTHORING_GUIDE.md,STAGEFLOW_SCRIPT_SPECIFICATION.md,SCORE_CATALOG.md) and clean in-chat YAML output without repository pollution.
Bug Fixes
- Preserved Un-Adapted Observer Focal Length in Split-Pane Layouts (
ObserverCameraRig.tsx):- Fixed a bug where narrow split-workspace layouts (where adaptive diorama FOV widens vertical FOV to preserve horizontal stage framing) leaked distorted equivalent focal lengths (e.g.,
17mm–21mminstead of35mm) into the[OBS]Telemetry Capsule and copied YAML snippets during free orbit or preset snaps. ObserverCameraRignow preserves the exact un-adapted optical focal length (lastAppliedFocalLengthMmRef) rather than reverse-converting the canvas-adapted camera FOV.
- Fixed a bug where narrow split-workspace layouts (where adaptive diorama FOV widens vertical FOV to preserve horizontal stage framing) leaked distorted equivalent focal lengths (e.g.,
Quality & Verification
- Unit Test Suite:
236deterministic tests passing across20Vitest suites. - Static Checks:
oxlint(0warnings /0errors) and strict TypeScripttsc -bbuild clean.
Upgrade & Usage Notes
- Browser Requirements for In-Browser MP4 Export: WebCodecs (
VideoEncoder) is supported in modern Chromium-based browsers (Chrome, Edge) over HTTPS orlocalhost. For headless CLI batch rendering (libx264,VP9, ProRes.mov, GIF, or PNG sequences),npm run recordandnpm run record:batchremain available — see Viewport Recorder Guide. - Backward Compatibility: All
v1.0.0YAML choreography scores remain 100% compatible without changes.
Full Changelog & Documentation
- 📜 CHANGELOG.md (
[1.1.0]) — 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.
StageFlow v1.0.0 — Initial Release: 3D Camera-Blocking & Scene Choreography Diorama
Welcome to StageFlow
StageFlow is an open-source, web-based 3D camera-blocking and scene choreography diorama. It synchronizes a universal video player (local video files, YouTube URLs, or a 60fps procedural simulator) with an interactive Three.js blueprint stage, allowing you to study, dissect, and visualize the spatial staging and camera maneuvers of film scenes at every millisecond.
StageFlow was born out of genuine curiosity about visual storytelling: What does it actually mean to block a scene? How do camera moves, focal lengths, and performer staging interact to create meaning? Rather than acting as a heavyweight production animatics tool, StageFlow is designed as an analytical sketchbook—stripping away visual clutter down to pure architectural geometry, sightlines, focal planes, and trajectories.
What's New in v1.0.0
🎥 Dual-Camera Spatial Architecture
-
Stage Camera (Director's Viewfinder):
- Projects a true-to-aspect rectangular pyramidal frustum matching your reference film gate (
16:9,2.39:1anamorphic, etc.). - Features a sliding Focus Plane Frame, near/far Depth-of-Field limit brackets, and an emerald world-space tether for off-axis subject tracking.
- Includes an opt-in, single-pass WebGL2 24-tap Vogel disk bokeh blur viewfinder shader (
[ Blur ]/ hotkeyB).
- Projects a true-to-aspect rectangular pyramidal frustum matching your reference film gate (
-
Observer Camera (Macroscopic Viewport):
- Plays scripted choreography trajectories smoothly in
'scripted'mode. - Features an intuitive pause-to-free-orbit handover: the camera locks to the authored path during playback, and unlocks
OrbitControlsthe instant playback is paused so you can freely orbit, pan, and inspect the frozen staging from any angle. - Instantaneous POV cuts (
$0\text{ms}$ ) between'scripted','free', and'stage-pov'modes.
- Plays scripted choreography trajectories smoothly in
📐 Choreography as Code (Declarative YAML Schema)
- Authored entirely in human-readable, version-controlled YAML scripts (
*.yaml). - Stateless Functional Timeline (
Frame_t = f(t)): Every millisecond of camera movement and actor blocking is purely deterministic. Scrubbing forward or backward yields bit-for-bit identical 3D states with zero cumulative drift. - 11 Expressive Camera Maneuvers: Static holds, push-in/pull-out dollies, tracking trucks, pedestals, pans, tilts, Dutch rolls, orbital sweeps, Catmull-Rom spline curves, swoops, and compound paths.
- Contiguous Single-Take Takes ("Oners"): Opt-in
continuous: truechaining automatically links camera coordinates and actor positions across shot boundaries without teleports or snaps. - Two-Shot Centroid Framing: Support for multi-subject targets (
target: ["detective", "witness"]), dynamically resolving the 3D world-space midpoint and tracking walking actors at 60fps.
⏱️ Precision Universal Media Clock
- Universal synchronization parity across:
- Local Media: Drag-and-drop
.mp4and.webmfiles directly into the browser (processed 100% locally in-memory). - YouTube Streams: Frame-accurate sync via a custom 60fps
performance.now()drift extrapolation engine. - Blueprint Simulator: Standalone 60fps virtual clock for studying scores without external video files.
- Local Media: Drag-and-drop
- Remote score loading via query parameters (
?score=<catalog-id>or?url=<raw-yaml-url>) with address bar hygiene.
🔍 Cinematic Optics & Thin-Lens Depth of Field
- Full-frame optical math (
$36 \times 24\text{mm}$ sensor geometry) mapping real focal lengths (24mm,35mm,50mm,85mm) to vertical FOV. - Thin-lens Gaussian Depth of Field with aperture presets (
shallow: f/2.8,medium: f/5.6,deep: f/∞) and custom numeric$f$ -stops. - Cinematic rack focus pulls (
focus_start$\to$ focus_end) and subject follow-focus.
🛞 Physical Camera Mounts & Dolly Tracks
- Stationary Tripods: Blueprint 3-legged stands with splayed legs, floor pucks, and vertical telescoping center columns.
-
Dolly Rails & Carts: Physical dual-rail floor tracks (
$0.42\text{m}$ standard gauge) with orthogonal cross-ties and a 4-wheeled dolly cart. - Catmull-Rom Spline Rails: Curved camera tracks with smooth multi-waypoint guidance.
🧍 Directional Mannequins & 3D Spatial Dimensions
- Characters, set props, and spike marks with configurable 3D dimensions (
$w, h, d$ ). - Floor-pinned scaling (
$Y = 0$ ) ensuring actors never sink into or float above the stage floor. - Anatomically preserved head spheres and shoulder bars with telescoping torso columns for crouching and sitting postures.
- Shape-matched ground footprints (oriented rectangular bounding boxes for props, elliptical footprints for characters).
📋 Directorial Studio Shell & Scene Desk
- Executive Scene Production Brief: High-density overview showing scene premise notes (Markdown-enabled), 4-stat production metrics, lens package chips, and active maneuver tags.
- Categorized Call Sheet & Roster: Live inventory of characters, set props, and spike marks with dimension badges.
- Dual-Camera Telemetry Capsule: Bottom-right HUD with integrated
[ OBS | CAM ]switcher and 1-click YAML snippet copying. - 4 Curated Visual Themes: Dark Obsidian (default), Pure Black, Light Stone, and Warm Paper.
- Accessible Info Modal: Press
?anywhere to bring up shortcuts, creative intent notes, and documentation links.
🎬 Deterministic 60fps Headless Viewport Recorder CLI
- Built-in Node.js CLI (
npm run record) powered by Playwright and FFmpeg. - Exports pixel-perfect, 60fps MP4 or Apple ProRes (
.mov) viewport choreography videos. - Three recording viewpoints: Scripted Observer View, Stage Camera POV (Viewfinder), or Picture-in-Picture (Diorama + Viewfinder).
- Optional reference audio track syncing.
📚 Bundled Studies & Educational Blueprints
- Scene Studies (Authored by Taruma Sakti):
- Vector Field (Sci-Fi Scene Study, 28.0s)
- The Expansion (Dramatic Ensemble Study, 32.0s)
- Factory Blueprints (BP 01–07):
- BP 01: Character Blocking & Trajectories
- BP 02: Camera Maneuver Showcase
- BP 03: Continuous Single-Take Oner
- BP 04: Dutch Angle & Camera Roll Banking
- BP 05: Two Rooms: Architectural Threshold Crossing
- BP 06: Optics, Rack Focus & Depth of Field Masterclass
- BP 07: Physical Camera Rigs & Dolly Tracks
Studio Keyboard Shortcuts
| Shortcut | Action | Description |
|---|---|---|
Space |
Play / Pause | Toggle playback. Pausing unlocks free 3D orbit controls. |
[ / ]
|
Step Frame | Step backward / forward by 1 video frame ( |
← / →
|
Scrub Timeline | Scrub backward / forward by Shift for |
B |
DoF Bokeh Blur | Toggle single-pass WebGL2 Stage Cam viewfinder depth-of-field blur. |
G |
Framing Guides | Toggle rule-of-thirds and safe-action composition overlays. |
L |
3D Label Mode | Cycle mannequin label display mode (all key off). |
? |
About & Shortcuts | Open the About StageFlow dialog and documentation links. |
Getting Started
1. Launch the Web Studio
Try the studio directly in any modern WebGL2-compatible browser (Chrome, Edge, Firefox, Safari):
👉 https://stageflow.taruma.my.id
2. Run Locally
# Clone the repository
git clone https://github.com/taruma/stageflow.git
cd stageflow
# Install dependencies
npm install
# Start local development server
npm run dev3. Record a 60fps Choreography Video
# Record bundled Blueprint 06 in 1080p 60fps
npm run record -- --score blueprint-06-optics-dof --camera observer --preset cinematicDocumentation & Learning Resources
Detailed technical specifications and authoring guides are available in the repository:
- 📖 YAML Authoring Guide — Comprehensive guide to writing choreography scores with copy-pasteable recipes.
- 📐 StageFlow Script Specification — Mathematical foundations, kinematics, and normalized AST contract tables.
- 🗂️ Choreography Score Catalog — Index of all bundled scene studies and factory blueprints.
- 🎥 Viewport Recorder CLI Guide — Playwright + FFmpeg 60fps video capture workflow.
- 🗺️ Architecture File Map — 5-layer decoupled repository structure and module catalog.
Project Attribution & Sister Applications
StageFlow is created by Taruma Sakti (@taruma).
If you find StageFlow helpful for studying cinema, teaching camera blocking, or planning scenes, a shout-out or link back is always appreciated:
StageFlow — 3D Camera-Blocking & Scene Choreography Diorama
Created by Taruma Sakti (https://github.com/taruma/stageflow)
Also check out sister project SceneFlow, a standalone studio synchronizing screenplays side-by-side with reference video.
AI Collaboration Note
StageFlow was developed by Taruma Sakti in pair programming with AI agents inside Google Antigravity using Gemini 3.8 Flash and Gemini 4 Argon. It is an exploratory "vibe-coded" project built for creative analysis and learning.
Full Changelog
For the complete technical diff and architectural evolution, see CHANGELOG.md.