Skip to content

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

Latest

Choose a tag to compare

@taruma taruma released this 23 Nov 00:05
· 9 commits to main since this release
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