mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-23 11:29:54 +00:00
* perf(studio): playback no longer relayouts the timecode and playhead every frame The timecode shows MM:SS but was rewritten on every playback frame, and the timeline playhead moved by style.left. Both forced a layout and a repaint per frame. The timecode is now written only when its text changes, and the playhead moves by a composited transform. * fix(studio): the moving playhead stays on whole device pixels As a composited translate the 1px playhead line is anti-aliased, so at a half-pixel offset it drew as two half-bright columns, where the old left position snapped it to one. The transform now rounds to device pixels. The helper moves to its own module as a named function with full parameter names, which also keeps timelineLayout under the file-size limit. * refactor(studio): drop the timecode write comment The comment ratchet does not let a file's comment share rise; the reason lives in the PR body. * fix(studio): the playhead moves smoothly while playing and rests on its tick Rounding the playhead to device pixels on every update made slow playback stair-step: at fit zoom on a two-minute film, 120 frames of playback gave 22 distinct positions where main gives 120. While playing the transform now keeps fractional pixels (120 of 120). At rest (paused, or a seek while paused) it rounds to device pixels the same way layout rounds the ruler ticks, so the resting line is one full column on its tick at 1x and 2x. Pausing snaps the line even when the paused time equals the store's.
@hyperframes/studio
Browser-based composition editor UI for Hyperframes. Provides a visual timeline, code editor, and live preview for building video compositions.
Install
npm install @hyperframes/studio
What it does
The studio is a React application with:
- Visual timeline — drag, resize, and arrange elements on tracks
- Code editor — edit HTML and GSAP scripts with CodeMirror (syntax highlighting, autocomplete)
- Live preview — see changes in real time as you edit
- Composition inspector — view and modify element properties
Development
The studio is embedded in the hyperframes preview command. To develop the studio UI itself:
cd packages/studio
bun run dev # Start Vite dev server
bun run build # Build for production
bun run typecheck # Type-check
Tech stack
- React 19, Zustand 4/5 (state management; development uses Zustand 5)
- CodeMirror 6 (editor)
- Tailwind CSS (styling)
- Vite (bundler)
- Phosphor Icons
Documentation
Full documentation: hyperframes.heygen.com/packages/studio
Related packages
@hyperframes/core— types and parsers used by the editorhyperframes— CLI that serves the studio viahyperframes preview