mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-17 15:24:19 +00:00
Keep pnpm for publish workflow only (publishConfig overrides + provenance). Bun handles install, run, and exec for all other workflows. - Add workspaces field to root package.json for bun workspace support - Replace pnpm setup with oven-sh/setup-bun in CI and release workflows - Update all scripts to use bun run / bun run --filter / bunx - Replace npx with bunx in lefthook hooks - Update CONTRIBUTING.md with bun commands - Delete pnpm-lock.yaml, add bun.lock - Keep pnpm-workspace.yaml for publish workflow compatibility Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HyperFrames Core
Create videos by writing HTML. The HTML is the source of truth - timing, layout, content. Scripts define how clips animate.
HyperFrames Core is the foundational library for video composition. It defines the data attributes and HTML structure that represent video timelines, with GSAP animations to bring clips to life.
Frame adapter direction:
../FRAME.md- repository-level frame model and deterministic renderer directionadapters/README.md- adapter contract and contribution guide
Philosophy
HTML = Scene description (content, timing, layout)
CSS = Styling
JS = GSAP animations (motion)
Every element in the video timeline is represented as an HTML element with data attributes that define its position in time.
Documentation
Schema
The specification for valid HyperFrames HTML:
- schema.md - Element types, data attributes, HTML patterns
Guides
For AI agents and developers working with HyperFrames:
| Document | Description |
|---|---|
| Cheat Sheet | Quick reference for common actions |
| Position Guide | Natural language → position mappings |
| Text Style Guide | Natural language → text style mappings |
| Motion Design Guide | Creating and editing motion designs |
| Caption Guide | Adding captions to videos |
Quick Start
Using the Editor (Recommended)
pnpm install
pnpm dev
This starts the studio dev server.
Writing Compositions Manually
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/gsap.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
background: #000;
}
#stage {
position: relative;
width: 1920px;
height: 1080px;
overflow: hidden;
}
</style>
</head>
<body>
<div id="stage">
<video id="el-1" data-start="0" data-end="10" src="video.mp4" muted playsinline></video>
<div id="el-2" data-start="2" data-end="6" data-type="text">
<div>Hello World</div>
</div>
</div>
<script>
const tl = gsap.timeline({ paused: true });
// Add animations...
</script>
</body>
</html>
Element Types
| Type | HTML Tag | Purpose |
|---|---|---|
| video | <video> |
Video clips |
| image | <img> |
Static images |
| text | <div data-type="text"> |
Text overlays |
| audio | <audio> |
Music, sound effects |
| composition | <div data-type="composition"> |
Motion designs |
Data Attributes
| Attribute | Purpose | Required |
|---|---|---|
data-start |
When element appears (seconds) | Yes |
data-end |
When element disappears (seconds) | No |
data-name |
Display name in UI | No |
data-layer |
Z-index for stacking | No |
See schema.md for the complete reference.
Remember: HTML is the storyboard. CSS is the art direction. JS is just for motion.