Skip to content

Releases

StageFlow v1.3.0 — Ephemeral 3D `.glb` Skins, Live 2D Stage Minimap & Parallel CDP Recorder

Choose a tag to compare

@taruma taruma released this 23 Nov 00:05
755c833

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/.gltf 3D models (File ▾ → Load 3D Skins... or drag-and-drop onto the 3D Diorama, including recursive folder drops via webkitGetAsEntry) held strictly in browser memory (URL.createObjectURL with automatic revocation and useGLTF.clear cache cleanup), keeping YAML scores untouched.
  • Single & Multi-Skin Batch Assignment (AssignStageSkinModal.tsx, BatchSkinAssignmentList.tsx): Single skins use an explicit radio selector + Apply Skin confirmation; 2+ skins (or dropped folders) open a unified batch assignment view with filename auto-matching (suggestSkinTargetId), duplicate-target warnings, individual skip controls, and 1-click Apply N Skins.
  • 60fps YAML Transform & Multi-Canvas Parity: computeGlbEntityNormalization centers X/Z, pins Y = 0, and fits entity bounds inside DirectionalMannequin.tsx so live YAML rotation, facing, look_at, pitch/roll, width/height/depth, scale, footprints, trails, and labels continue driving custom .glb assets 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 hotkey M (open by default on wide viewports >= 768px, persisted under stageflow:ui:diorama-minimap) and also embedded as a full-fit Map tab (Brief | Stage Cam | Map) in VideoWorkspaceSubpanel.tsx with zero extra WebGL contexts.
  • Imperative 60fps SVG Updates (dioramaMinimapRenderer.ts): Mutates SVG attributes directly from frameRef and liveViewportPoseRef (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 in Stage Cam POV).

⚡ High-Speed Stateless CLI Recorder Pipeline (scripts/record/) (#32, #33)

  • Stateless Frame Stepping & CDP JPEG Capture: Added frameloopMode="never" + HeadlessAdvanceBridge (advance()) and shared hasStageFrameBoundaryChanged diffing to eliminate background renders and mid-shot React commits, paired with direct CDP Page.captureScreenshot defaulting to jpeg (q=96, overridable via --capture jpeg|png).
  • Hardware ANGLE GPU & Multi-Worker Sharding: Enabled ANGLE GPU acceleration (--use-angle=d3d11 on Windows, opt-out via --software-gl) and stateless parallel worker sharding (--workers, auto-selected 1–4 by frame count and CPU cores, stitched via FFmpeg -c:v copy).
  • Clean External YAML Output Defaults (cliArgs.ts): Omitting -o / --output for external or nested YAML paths now resolves cleanly to recordings/<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/.json scores, .glb/.gltf skins, and folders) and Left Video pane (.mp4/.webm/.mov videos, including pointer-events-none passthrough 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 persistent Clear All 3D Skins status.
  • Touchscreen Split Dividers (ResizableSplitWorkspace.tsx): Added touch-none, setPointerCapture, ~24px coarse-pointer hit targets, role="separator" semantics, and minimum 22% Center Diorama width clamping.
  • Downloadable .md Manuals (ScoreAuthoringGuideView.tsx, guideUtils.ts): Added Download .md buttons to ?mode=guide (YAML_AUTHORING_GUIDE.md) and ?mode=spec (STAGEFLOW_SCRIPT_SPECIFICATION.md).

Bug Fixes & Test Suite Architecture

  • R3F useFrame Priority Ordering & <Html> 1-Frame Lag Fix (stageSyncGate.ts) (#34): Ordered R3F execution strictly (EVALUATE_FRAME = -2 $\to$ OrbitControls -1 $\to$ RIG_TRANSFORMS = -0.5 with updateMatrixWorld() $\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.tsx now awaits 4 initial R3F render ticks + 2 requestAnimationFrames (with preserveDrawingBuffer: 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 mirror src/core/ submodules, introduced tests/helpers/scoreFixtures.ts, and moved catalog/blueprint regressions to tests/integration/.

Quality & Verification

  • Unit & Integration Test Suite: 354 deterministic tests passing across 41 Vitest suites (tests/unit/ + tests/integration/).
  • Static Checks: oxlint (0 warnings / 0 errors across 198 files), strict TypeScript tsc -b, and Vite production build (3143 modules) clean.

Full Changelog & Documentation

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

Choose a tag to compare

@taruma taruma released this 16 Nov 12:55
34db1ed

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 across entities[], blocking: (Formats A & B), and shots[].entities in intrinsic YXZ order (yaw → pitch → roll), with shortest-arc easing, cut: true instant snapping, and independence from yaw-only look_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 clamped 0..1 ratio, with $C^0$ forward chaining across tilted cues (1 - cos(startPitchRad) * cos(startRollRad) < 1e-8 upright 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) across target, from, focus, focus_start/focus_end, multi-entity centroid arrays, waypoints, baseline stage cameras, and order-independent Jacobi-relaxed look_at (with exact-first disambiguation protecting dotted IDs).

🗂️ Storyboard Contact Sheet Generator, Viewer & Exports (#28 / PR #29)

  • Studio Storyboard Modal (File ▾ → Storyboard...): Generates progressive 540p WebP shot boards across Stage Cam and Observer views with Mid, Start, End, Start & End, and Start·Mid·End sampling modes, DP/AC technical metadata cards, framing guides (Off / Thirds / Safe / All), and a ? Spec Guide popover.
  • Single-Frame & Multi-Page Exports: Export individual frames (720p/1080p, PNG/WebP/JPG, Clean Frame vs Burn-in), paginated white-paper Contact Sheet (2400px multi-page .zip or 1-Page PNG override), or All 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 DirectorialTransportBar mounts CleanStageCamExportCanvas offscreen for a single-frame 1080p PNG 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 History at the bottom of docs/YAML_AUTHORING_GUIDE.md (with a Releases shortcut pill in ?mode=guide) tracing YAML authoring additions chronologically from v0.1.0 through v1.2.0.

Bug Fixes & Parser Parity

  • Continuous Camera Rig E_prev Eye Inheritance: Continuous track, 1-point spline_track, and tripod camera rigs omitting rig.from/rig.position now inherit the previous shot's terminal eye position $\vec{E}_{\text{prev}}$ seamlessly even across changing target: anchors.
  • Parser Alias Parity: Added stage.gridStep camelCase alias, flat root optics aliases (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 deep Color Consistency: Routed dof: 'deep' through the FBO 1-tap passthrough in StageCamDofEffect.tsx when [Blur] is ON, eliminating color-management shifts when racking or switching between shallow and deep.

Quality & Verification

  • Unit Test Suite: 323 deterministic tests passing across 26 Vitest suites (tests/unit/).
  • Static Checks: oxlint (0 warnings / 0 errors across 168 files), strict TypeScript tsc -b, and Vite production build (3132 modules) clean.

Full Changelog & Documentation


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

Choose a tag to compare

@taruma taruma released this 15 Nov 02:46
0cf2fe6

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): Tightened MAX_PERSPECTIVE_SCALE from 1.55 to 1.08 and raised MIN_PERSPECTIVE_SCALE from 0.72 to 0.75 to 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's 35mm full-frame baseline (REF_HALF_HORIZ_TAN), keeping telephoto (85mm) pills readable beyond 28m, 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): Aligned getBillboardSizeTier() (COMPACT_CANVAS_WIDTH_PX = 768) with isNarrowDiorama (CompactDioramaHeader) so React re-renders only when crossing 768px, switching cleanly between standard (px-3 py-1, 13px/11px) and compact (px-2 py-0.5, 11px/10px) pill typography while passing live PerspectiveCamera.fov and canvas aspect ratio inside useLayoutEffect and useFrame.

Quality & Verification

  • Unit Test Suite: 265 deterministic tests passing across 22 Vitest suites (including 19 tests in tests/unit/billboardLabelLod.test.ts covering [0.75, 1.08] bounds, < 768px tier switching, 85mm/24mm FOV normalization, adaptive narrow-pane invariance, and physical proximity culling).
  • Static Checks: oxlint (0 warnings / 0 errors), strict TypeScript tsc -b, and Vite production build clean.

Upgrade & Usage Notes

  • Backward Compatibility: All v1.1.1, v1.1.0, and v1.0.0 YAML choreography scores remain 100% compatible without changes.

Full Changelog & Documentation

What's Changed

  • fix(stage): normalize 3D billboard label sizing & prepare v1.1.2 (#16) by @taruma in #17

Full Changelog: v1.1.1...v1.1.2

StageFlow v1.1.1 — Diorama Performance, Camera Snap, Render Sync & Custom Export Range

Choose a tag to compare

@taruma taruma released this 14 Nov 09:18
7589e7e

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 DioramaCanvas and StageCamMonitorCanvas now run frameloop="demand" while paused, waking immediately on orbits, resize transitions, preset snaps, async <Text> font loads, and manual seeks (onSeekSettled / onTimeJump), while short-circuiting redundant idle computeStageFrame() calls.
  • Rig & Mannequin Memoization: Memoized DirectionalMannequin, BlueprintFloorGrid, and StageCameraRigMount, 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): Added resolveGatedState() with useLayoutEffect synchronization 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 10Hz uiFrame snapshots.

✂️ Custom Time Range (Custom (s)) & Dual-Handle Scrubber for MP4 Export (#13 / PR #14)

  • Shot-Aware Dual-Handle Scrubber: Extended Time Range in File ▾ → Export Video (.mp4)... with Custom (s), featuring a drag-only dual-handle timeline scrubber (ExportRangeScrubber / ExportRangeScrubberTrack) with shot cut dividers, hover timecode readout, and inline decimal Start (s) / End (s) inputs (0.1s step, preserving 3-decimal scene durations such as 45.375s and 61.625s).
  • Validation & Range-Tagged Output Filenames: Pure Layer 1 validation (validateCustomExportRange in src/core/exportMath.ts + src/core/exportScrubberMath.ts) guards against negative, inverted, out-of-bounds, or sub-frame (< 1 / fps) selections, while formatExportMp4Filename() 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 sceneResetSeq Transition Signal: Opening, creating, forking/duplicating, deleting (fallback), resetting, importing, or asynchronously hydrating a score (IndexedDB, ?score=, ?remoteUrl=) atomically resets cameraMode to 'scripted', pauses and seeks the clock to t = 0, clears stale shotId gate refs, flushes residual OrbitControls damping deltas, and snaps the Observer Camera cleanly to frame.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 playhead t, playback state, and paused free-orbit camera angles.

Quality & Verification

  • Unit Test Suite: 258 deterministic tests passing across 22 Vitest suites (tests/unit/stagePerfHelpers.test.ts, tests/unit/exportScrubberMath.test.ts, expanded exportMath.test.ts, and mediaDrivers.test.ts).
  • Static Checks: oxlint (0 warnings / 0 errors), strict TypeScript tsc -b, and Vite production build clean.

Upgrade & Usage Notes

  • Backward Compatibility: All v1.1.0 and v1.0.0 YAML 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 #9 resolved interactive stutter and idle GPU churn without introducing multi-pass FBO edge cases.

Full Changelog & Documentation


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

Choose a tag to compare

@taruma taruma released this 14 Nov 03:34
f2d99e8

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.0 matching your score's aspect_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 to 16: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.
  • WebCodecs + mp4-muxer Client-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), encodeQueueSize backpressure control, immediate VideoFrame.close() memory cleanup, live progress telemetry, thumbnail preview, and clean cancellation.
    • Configurable 1080p / 720p resolution, 60 fps / 24 fps cadence, Entire Scene / Current Shot range, and Light / Warm / Dark stage palettes.
    • Pure Layer 1 export resolution, timing, aspect-ratio, and filename utilities covered by unit tests in tests/unit/exportMath.test.ts.

🧭 Workspace Authoring Tooling (stageflow-score-creator Skill)

  • Added .agents/skills/stageflow-score-creator/SKILL.md for 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–21mm instead of 35mm) into the [OBS] Telemetry Capsule and copied YAML snippets during free orbit or preset snaps.
    • ObserverCameraRig now preserves the exact un-adapted optical focal length (lastAppliedFocalLengthMmRef) rather than reverse-converting the canvas-adapted camera FOV.

Quality & Verification

  • Unit Test Suite: 236 deterministic tests passing across 20 Vitest suites.
  • Static Checks: oxlint (0 warnings / 0 errors) and strict TypeScript tsc -b build clean.

Upgrade & Usage Notes

  • Browser Requirements for In-Browser MP4 Export: WebCodecs (VideoEncoder) is supported in modern Chromium-based browsers (Chrome, Edge) over HTTPS or localhost. For headless CLI batch rendering (libx264, VP9, ProRes .mov, GIF, or PNG sequences), npm run record and npm run record:batch remain available — see Viewport Recorder Guide.
  • Backward Compatibility: All v1.0.0 YAML choreography scores remain 100% compatible without changes.

Full Changelog & Documentation

StageFlow v1.0.0 — Initial Release: 3D Camera-Blocking & Scene Choreography Diorama

Choose a tag to compare

@taruma taruma released this 10 Nov 04:14

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:1 anamorphic, 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 ] / hotkey B).
  • 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 OrbitControls the 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.

📐 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: true chaining 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 .mp4 and .webm files 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.
  • 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 ($1/30\text{s}$).
← / → Scrub Timeline Scrub backward / forward by $1\text{s}$ (Hold Shift for $5\text{s}$).
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 $\to$ key $\to$ 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 dev

3. Record a 60fps Choreography Video

# Record bundled Blueprint 06 in 1080p 60fps
npm run record -- --score blueprint-06-optics-dof --camera observer --preset cinematic

Documentation & Learning Resources

Detailed technical specifications and authoring guides are available in the repository:


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.