diff --git a/.gitattributes b/.gitattributes index 4c9ff87e51..0587d58e35 100644 --- a/.gitattributes +++ b/.gitattributes @@ -47,3 +47,9 @@ registry/**/*.html linguist-vendored .claude/skills/**/*.mp3 filter=lfs diff=lfs merge=lfs -text .agents/skills/**/*.mp4 filter=lfs diff=lfs merge=lfs -text .agents/skills/**/*.mp3 filter=lfs diff=lfs merge=lfs -text + +# The documentation Reference Project ships real voice, music, and source +# media. Keep its binary assets out of the Git object store while preserving a +# complete, cloneable example. +examples/docs-reference-project/**/*.wav filter=lfs diff=lfs merge=lfs -text +examples/docs-reference-project/**/*.mp3 filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index 52719ff212..6a7791318b 100644 --- a/.gitignore +++ b/.gitignore @@ -97,6 +97,11 @@ examples/* !examples/k8s-jobs/** !examples/gcp-cloud-run !examples/gcp-cloud-run/** +!examples/docs-reference-project +!examples/docs-reference-project/** +examples/docs-reference-project/capture/ +examples/docs-reference-project/live/ +examples/docs-reference-project/snapshots/ # …but never the local smoke run's build/render artifacts. examples/gcp-cloud-run/scripts/gcp-smoke-artifacts/ packages/studio/data/ diff --git a/README.md b/README.md index 2a34005a40..c24dc2b917 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Install the HyperFrames skills, then describe the video you want: npx skills add heygen-com/hyperframes --full-depth ``` -> The picker opens with nothing pre-selected — the **Core Skills** group is all you need: the `/hyperframes` router installs each creation workflow on demand. Agents and non-interactive runs should use `npx hyperframes skills update` instead — it installs exactly the core set, whereas a non-interactive `skills add` without `--skill` installs all 19. +> The picker opens with nothing pre-selected — the **Core Skills** group is all you need: the `/hyperframes` router installs each creation workflow on demand. Agents and non-interactive runs should use `npx hyperframes skills update` instead — it installs exactly the core set, whereas a non-interactive `skills add` without `--skill` installs the full set. > > `--full-depth` does a full clone of the repo's current `main`. Without it, `skills add` fetches the skills.sh registry blob, which lags `main` by hours — you'd get an older copy of a skill. (`hyperframes skills update` already installs full-depth.) @@ -53,9 +53,9 @@ The skills teach agents the HyperFrames production loop: plan the video, write v ## Skills -HyperFrames ships 19 skills agents load on demand. Read `/hyperframes` first — it's the router and capability map; it picks a workflow for any "make me a…" request — video, deck, or composition port — and points to the domain skills below. +HyperFrames ships skills that agents load on demand. Read `/hyperframes` first — it's the router and capability map; it picks a workflow for any "make me a…" request — video, deck, or composition port — and points to the domain skills below. -Default to the **core set** — the router installs each creation workflow on demand. `npx hyperframes skills update` installs exactly that from anywhere; the interactive picker (`npx skills add heygen-com/hyperframes --full-depth`) lists it as the "Core Skills" group, nothing pre-selected. The picker is interactive-only — a non-interactive or agent run without `--skill` installs all 19. Use `npx skills add heygen-com/hyperframes --all --full-depth` to install all 19 deliberately (skips the picker), or `npx skills add heygen-com/hyperframes --skill --full-depth` for just one (bare name, no leading `/`). Keep `--full-depth` — it installs the current `main`; without it `skills add` fetches the skills.sh blob, which lags by hours. +Default to the **core set** — the router installs each creation workflow on demand. `npx hyperframes skills update` installs exactly that from anywhere; the interactive picker (`npx skills add heygen-com/hyperframes --full-depth`) lists it as the "Core Skills" group, nothing pre-selected. The picker is interactive-only — a non-interactive or agent run without `--skill` installs the full set. Use `npx skills add heygen-com/hyperframes --all --full-depth` to install everything deliberately (skips the picker), or `npx skills add heygen-com/hyperframes --skill --full-depth` for just one (bare name, no leading `/`). Keep `--full-depth` — it installs the current `main`; without it `skills add` fetches the skills.sh blob, which lags by hours. Installs stay lean after that: `npx hyperframes init` keeps the **core set** fresh (the router, the `hyperframes-*` domain skills, and `media-use` — plus whatever is already installed; `/figma` stays on demand) and never expands a partial install; the creation workflows install **on demand** — the router runs `npx hyperframes skills update ` before entering one. Nothing re-pulls the full set behind your back. diff --git a/docs/catalog/index.mdx b/docs/catalog/index.mdx new file mode 100644 index 0000000000..7d42c52931 --- /dev/null +++ b/docs/catalog/index.mdx @@ -0,0 +1,62 @@ +--- +title: "Catalog" +description: "Browse reusable HyperFrames scenes, transitions, captions, overlays, effects, and components." +--- + +The Catalog is a library of visuals you can add to a project instead of building each one from scratch. + +Use a **block** when you want a larger scene or self-contained visual. Use a **component** when you want a smaller effect or behavior inside an existing scene. + +## Start with the job + + + + Show code being typed, changed, highlighted, scrolled, or transformed. + + + Keep speech readable or emphasize selected words without designing a caption system from zero. + + + Move between scenes with a quiet cut treatment or a more expressive transition. + + + Show posts, follow prompts, notifications, names, roles, and platform-inspired cards. + + + Explain a number, comparison, trend, location, or geographic movement. + + + Start from a larger scene that already combines design, media, and animation. + + + +## Use an item in a real project + +1. Open an item and watch the motion preview. +2. Check that its communication job matches the scene. +3. Copy the plain-language request from the item page into your agent chat. +4. Replace the example content with real project content. +5. Match the project's type, color, spacing, and motion language. +6. Review the item inside the complete video, not only in isolation. + +The terminal command and source details remain available on each item page for people who need them. + +## Before you keep it + + + A Catalog item is a starting point, not a finished design decision. Keep it only when it makes the scene clearer or faster to understand. Remove decorative motion that competes with the story. + + +Check: + +- Can the viewer understand why the visual is present? +- Is the real content readable at the final size? +- Does its timing fit the scenes around it? +- Does it feel like part of this project rather than a pasted demo? +- Is a quieter alternative more effective? + +## Related topics + +- [Add Catalog items in Studio](/studio/assets-and-blocks) +- [Build richer compositions](/go-further) +- [Contribute a Catalog item](/contributing/catalog) diff --git a/docs/concepts/index.mdx b/docs/concepts/index.mdx new file mode 100644 index 0000000000..ad6650a3f4 --- /dev/null +++ b/docs/concepts/index.mdx @@ -0,0 +1,163 @@ +--- +title: "How a HyperFrames project works" +sidebarTitle: "Project model" +description: "Understand the editable files, compositions, timing, and tools behind a HyperFrames video." +--- + +A HyperFrames project is a folder your agent can create and you can keep +editing. Its HTML is the video: it describes the scenes, timing, motion, media, +and reusable parts that HyperFrames plays or renders. + +## The source is the project + +The agent, Studio, CLI, SDK, and Player do not create separate versions of the +video. They work with the same project files. + +| What you want to change | Best place to start | +| ---------------------------------------------------- | ------------------- | +| Story, structure, or several scenes | Ask the agent | +| Text, layout, timing, or animation you can see | Studio | +| Preview, checks, snapshots, rendering, or automation | CLI | +| A composition inside your own product | SDK or Player | + +
+ + A HyperFrames project open in Studio with the source tree, canvas, controls, and timeline + +
+ +Studio writes supported edits back into the source. An agent can continue from +those files, Git can track them, and the renderer sees the same result. + +## What the agent creates + +A larger project often looks like this: + +```text +project/ +├── BRIEF.md what the video must communicate +├── STORYBOARD.md the planned sequence and review state +├── SCRIPT.md locked narration, when the video has it +├── frame.md visual direction, when the project needs one +├── index.html the main composition +├── hyperframes.json project settings +├── compositions/ scenes and reusable visual parts +├── assets/ images, video, audio, and fonts +└── renders/ finished files +``` + +Only the project source is essential. Planning files exist to preserve decisions +across reviews and agent sessions. A simple title card may need only +`index.html` and an asset; a narrated launch film benefits from a brief, +storyboard, script, and separate scenes. + +## Compositions hold the video together + +A **composition** is a finite, seekable piece of the project. The main +composition is the complete sequence. Other compositions can be scenes, +captions, title systems, or visuals reused more than once. + +```text +Main video +├── Opening +├── Product demo +├── Customer proof +└── Closing +``` + +Each part is still HTML. A larger project stays manageable because a scene can +be built and checked on its own, then placed on the main timeline. + +```html +
+``` + +Edit the nested composition when the scene itself should change everywhere it +is used. Edit its placement in the main composition when only this appearance +should start earlier, run longer, or move to another layer. + +## Time is part of the source + +Timed elements carry their start, duration, and track in HTML: + +```html + +``` + +This image starts at two seconds, remains for three seconds, and appears on +track one. Animation timelines are paused and seekable, so Studio, the Player, +and the renderer can request an exact moment without playing from the +beginning. + +## Variables keep approved parts changeable + +A variable exposes something that is meant to change—such as a title, logo, +color, price, or customer name—without rebuilding the layout. One composition +can produce several approved versions while preserving its design and motion. + +Use a variable when the structure should stay fixed. Use a normal edit when the +structure itself needs to change. + +## How a project moves forward + +There is no required seven-step ceremony. The project records only the +decisions its size and review process need. + +| Decision | Where it usually lives | +| ------------------------------ | ----------------------------------------------------------- | +| What the video is for | Your request and, for a fuller project, `BRIEF.md` | +| What happens and in what order | `STORYBOARD.md` and optional `SCRIPT.md` | +| How it looks | `frame.md`, project assets, and the compositions themselves | +| The editable result | `index.html`, `compositions/`, and `assets/` | +| The approved delivery | checks plus the file in `renders/` | + +Review the message and sequence before polishing individual frames. Once the +project looks right, run the checks, render it, and watch the exported file. + +## Why rendering can repeat the same moment + +HyperFrames seeks the composition to an exact time, captures the frame, and +advances. Media and audio follow the same timeline. + +For the same source, media, and settings, an exact timestamp should resolve to +the same project state. Compositions therefore avoid the current clock, +unseeded randomness, and render-time network requests. + +## Go deeper when you need it + + + + Expose approved content without opening the layout. + + + Review, check, render, watch, and deliver the same project. + + + Use nested compositions and exact source attributes. + + + Look up the complete technical composition contract. + + + +## Related topics + +- [Take more control of an existing project](/go-further) +- [Look up the complete HTML schema](/reference/html-schema) +- [Choose a developer integration surface](/developers/overview) diff --git a/docs/custom.css b/docs/custom.css index b4cb460fa4..e7f20d6c5c 100644 --- a/docs/custom.css +++ b/docs/custom.css @@ -1,36 +1,38 @@ /* HyperFrames Design System — Mintlify Theme Overrides */ -@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap'); - -/* ── TT Norms Pro (matches hyperframes.heygen.com) ── */ +@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"); @font-face { - font-family: 'TT Norms Pro'; - src: url('https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_Normal.woff2') format('woff2'); + font-family: "TT Norms Pro"; + src: url("https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_Normal.woff2") + format("woff2"); font-weight: 400; font-style: normal; font-display: swap; } @font-face { - font-family: 'TT Norms Pro'; - src: url('https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_Medium.woff2') format('woff2'); + font-family: "TT Norms Pro"; + src: url("https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_Medium.woff2") + format("woff2"); font-weight: 500; font-style: normal; font-display: swap; } @font-face { - font-family: 'TT Norms Pro'; - src: url('https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_DemiBold.woff2') format('woff2'); + font-family: "TT Norms Pro"; + src: url("https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_DemiBold.woff2") + format("woff2"); font-weight: 600; font-style: normal; font-display: swap; } @font-face { - font-family: 'TT Norms Pro'; - src: url('https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_Bold.woff2') format('woff2'); + font-family: "TT Norms Pro"; + src: url("https://www-static-assets.heygen.com/fonts/tt-norms/TT_Norms_Pro_Bold.woff2") + format("woff2"); font-weight: 700; font-style: normal; font-display: swap; @@ -57,6 +59,14 @@ --hf-text-tertiary: #999999; --hf-heading: #0a0a0a; --hf-code-bg: #ffffff; + --hf-ui-border: #eeeeee; + --hf-sidebar-rail: #eeeeee; + --hf-sidebar-text: #707070; + --hf-floating-input-shadow: 0 8px 28px rgba(10, 10, 10, 0.08), 0 1px 4px rgba(10, 10, 10, 0.08); + --mintlify-slot-header-height: 3rem; + --hf-brand: #16785b; + --hf-brand-soft: rgba(22, 120, 91, 0.1); + --hf-video-accent: #3ce6ac; --hf-accent-green: #1a7a0a; --hf-accent-green-light: rgba(26, 122, 10, 0.07); @@ -85,6 +95,12 @@ --hf-text-tertiary: #666666; --hf-heading: #f5f5f5; --hf-code-bg: #141414; + --hf-ui-border: #2a2a2a; + --hf-sidebar-rail: #2a2a2a; + --hf-sidebar-text: #a0a0a0; + --hf-floating-input-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.4); + --hf-brand: #3ce6ac; + --hf-brand-soft: rgba(60, 230, 172, 0.12); --hf-accent-green: #22c55e; --hf-accent-green-light: rgba(34, 197, 94, 0.1); @@ -102,14 +118,32 @@ /* ── Typography ── */ body { - font-family: 'TT Norms Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; + font-family: + "TT Norms Pro", + "Inter", + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + sans-serif; } -h1, h2, h3, h4, h5, h6 { - font-family: 'TT Norms Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: + "TT Norms Pro", + "Inter", + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + sans-serif; } -h1, h2 { +h1, +h2 { letter-spacing: -0.02em; } @@ -117,19 +151,76 @@ h3 { letter-spacing: -0.01em; } -/* Code font — IBM Plex Mono (loaded via Google Fonts above) */ -code, pre, pre code, kbd, -[class*="code"], -[class*="Code"] { - font-family: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace; +/* ── Workflow routing ── */ +.hf-workflow-routes { + margin: 1.5rem 0; + border-top: 1px solid var(--hf-border-color); } -/* ── Code blocks ── */ +.hf-workflow-route { + display: grid; + grid-template-columns: 11rem minmax(0, 1fr); + gap: 1rem; + align-items: center; + padding: 1rem 0; + border-bottom: 1px solid var(--hf-border-color); + color: inherit; + text-decoration: none; +} -pre { - background: var(--hf-code-bg) !important; - border: 1px solid var(--hf-border-color) !important; - border-radius: 8px !important; +.hf-workflow-route:hover .hf-workflow-route-title { + color: var(--hf-accent-green); +} + +.hf-workflow-route video { + display: block; + width: 100%; + aspect-ratio: 16 / 9; + margin: 0; + border-radius: 0.5rem; + background: #000; + object-fit: cover; + pointer-events: none; +} + +.hf-workflow-route-title { + display: block; + color: var(--hf-heading); + font-weight: 650; + line-height: 1.35; + transition: color 120ms ease; +} + +.hf-workflow-route-copy { + display: block; + margin-top: 0.3rem; + color: var(--hf-text-secondary); + font-size: 0.9rem; + line-height: 1.5; +} + +@media (max-width: 639px) { + .hf-workflow-route { + grid-template-columns: 7rem minmax(0, 1fr); + gap: 0.8rem; + } +} + +/* Code font — IBM Plex Mono (loaded via Google Fonts above). + * + * Deliberately scoped to real code elements. The previous rule also matched + * [class*="code"] / [class*="Code"], which caught any element whose class + * merely contained that substring — including every Accordion, whose wrapper + * carries the Tailwind utility `dark:bg-codeblock`. That set the whole + * accordion (and, by inheritance, its title and prose) in monospace, so plain + * sentences rendered like terminal output. Syntax tokens inside `pre` inherit + * from `pre`, so they do not need a selector of their own. */ +code, +pre, +pre code, +kbd, +samp { + font-family: "IBM Plex Mono", "SF Mono", "Fira Code", monospace; } /* ── Selection ── */ @@ -140,12 +231,245 @@ pre { /* ── Links ── */ -a:not([class]) { - color: var(--hf-accent-blue); +#content-area :where(p, li, td, blockquote) a:not([class]) { + border-bottom: 1px solid color-mix(in srgb, var(--hf-brand) 72%, transparent); + color: inherit; + text-decoration: none; } -a:not([class]):hover { - opacity: 0.85; +#content-area :where(p, li, td, blockquote) a:not([class]):hover { + border-bottom-color: var(--hf-brand); + color: var(--hf-brand); +} + +/* ── Documentation navigation ── */ + +/* + * Keep Aspen's full-width header, but place its desktop controls on one row: + * logo → section tabs → search → actions. Mobile keeps Mintlify's layout. + */ +@media (min-width: 1024px) { + #navbar { + height: 3rem; + } + + #navbar > div:has(.nav-tabs) { + display: grid; + grid-template-columns: max-content max-content minmax(10.25rem, 1fr) max-content; + column-gap: 1rem; + align-items: center; + height: 3rem; + } + + #navbar > div:has(.nav-tabs) > .relative, + #navbar > div:has(.nav-tabs) > .relative > div:first-child, + #navbar > div:has(.nav-tabs) > .relative > div:first-child > div:first-child { + display: contents; + } + + #navbar > div:has(.nav-tabs) > .relative > div:first-child > div:first-child > div:first-child { + grid-column: 1; + grid-row: 1; + } + + #navbar div:has(> .nav-tabs) { + grid-column: 2; + grid-row: 1; + height: 3rem; + padding: 0; + } + + #navbar .nav-tabs { + align-items: center; + gap: 0.25rem; + height: 3rem; + } + + /* Use the same quiet pill treatment as Mintlify's own documentation. */ + #navbar .nav-tabs-item { + height: 2.25rem !important; + padding: 0 0.8rem; + border-radius: 999px; + color: var(--hf-text); + transition: + background-color 140ms ease, + color 140ms ease; + } + + #navbar .nav-tabs-item:hover { + background: color-mix(in srgb, var(--hf-heading) 6%, transparent); + color: var(--hf-heading); + } + + #navbar .nav-tabs-item.text-primary { + background: color-mix(in srgb, var(--hf-heading) 9%, transparent); + color: var(--hf-heading) !important; + } + + #navbar .nav-tabs-item > .absolute.bottom-0 { + display: none; + } + + #navbar div:has(> #search-bar-entry) { + grid-column: 3; + grid-row: 1; + min-width: 0; + } + + #navbar .topbar-right-container { + grid-column: 4; + grid-row: 1; + } + + #sidebar-content { + top: 3rem !important; + height: calc(100vh - 3rem) !important; + } + + /* Keep the repository compact, but retain its useful live star count. */ + #navbar a[title="heygen-com/hyperframes"] { + width: 7.5rem; + min-width: 7.5rem; + height: 2.25rem; + padding: 0 0.75rem; + justify-content: center; + } + + #navbar a[title="heygen-com/hyperframes"] > span.truncate { + display: none; + } + + #navbar a[title="heygen-com/hyperframes"] > span:not(.truncate) { + display: flex !important; + color: var(--hf-heading); + font-variant-numeric: tabular-nums; + } + + /* + * Mintlify removes the live count for roughly one animation frame during + * client-side navigation. Keep a truthful placeholder in its place so the + * control does not collapse while the live count reloads. + */ + #navbar a[title="heygen-com/hyperframes"]:not(:has(> span:not(.truncate)))::after { + color: var(--hf-heading); + content: "★"; + font-variant-numeric: tabular-nums; + } +} + +/* The native gutter was almost 15px wide. Keep the rail quiet and compact. */ +#navigation-items { + scrollbar-color: color-mix(in srgb, var(--hf-text) 30%, transparent) transparent; + scrollbar-gutter: auto !important; + scrollbar-width: thin; +} + +#navigation-items::-webkit-scrollbar { + width: 5px; +} + +#navigation-items::-webkit-scrollbar-track { + background: transparent; +} + +#navigation-items::-webkit-scrollbar-thumb { + border-radius: 999px; + background: color-mix(in srgb, var(--hf-text) 30%, transparent); +} + +#navigation-items::-webkit-scrollbar-thumb:hover { + background: color-mix(in srgb, var(--hf-text) 46%, transparent); +} + +/* Preserve a useful search field on smaller desktop widths. */ +@media (min-width: 1024px) and (max-width: 1199px) { + #navbar #assistant-entry { + display: none; + } +} + +/* Use main's quieter structural border color across Aspen surfaces. */ +#body-content [class*="border-gray-200"], +#body-content [class*="border-gray-100"] { + border-color: var(--hf-ui-border) !important; +} + +/* Keep the floating agent input noticeable against the page background. */ +#body-content .chat-assistant-floating-input > div > div { + border-color: var(--hf-border-color-light) !important; + background-color: var(--hf-background-light) !important; + box-shadow: var(--hf-floating-input-shadow); +} + +/* + * Match the navigation rhythm and active-page rail used on the main docs. + * Each link owns one rail segment, so the current page can highlight only + * its segment. These rules are visual only; groups remain non-collapsible. + */ +#navigation-items .sidebar-group-header { + color: var(--hf-text); + font-size: 0.875rem; + font-weight: 500; + line-height: 1.25rem; +} + +#navigation-items .sidebar-group { + padding-left: 0; +} + +#navigation-items .sidebar-group::before { + content: none; +} + +#navigation-items .sidebar-group > li { + margin-bottom: 0; +} + +#navigation-items .sidebar-group > li + li { + margin-top: 0 !important; +} + +#navigation-items .sidebar-group > li > a { + width: calc(100% - 1rem); + margin-left: 1rem; + padding: 0.375rem 0.75rem 0.375rem 1rem; + border-left: 1px solid var(--hf-sidebar-rail); + border-radius: 0; + background: transparent !important; + color: var(--hf-sidebar-text); +} + +#navigation-items .sidebar-group > li > a:hover { + background: transparent !important; + color: var(--hf-heading); +} + +#navigation-items .sidebar-group > li[data-active="true"] > a, +#navigation-items .sidebar-group > li[data-active-nav-item="true"] > a, +#navigation-items .sidebar-group > li > a[aria-current="page"] { + border-left-color: currentColor; + color: var(--hf-heading); +} + +/* Aspen inserts horizontal separators; main uses the same space without a rule. */ +#navigation-items div:has(> .sidebar-group) + div { + height: 2rem; + padding: 0; +} + +#navigation-items div:has(> .sidebar-group) + div > * { + display: none; +} + +/* + * Aspen assumes a 96px header and fades scrolled navigation before it reaches + * that boundary. Our header is 48px; align the sticky sidebar to it and let + * links clip exactly at the header instead of disappearing early. + */ +#navigation-items, +#navigation-items [data-id] { + -webkit-mask-image: none !important; + mask-image: none !important; } /* Catalog texture examples */ @@ -181,7 +505,7 @@ a:not([class]):hover { .hf-texture-preview-word { color: #fff; - font-family: Impact, 'Arial Black', sans-serif; + font-family: Impact, "Arial Black", sans-serif; font-size: 42px; line-height: 0.9; letter-spacing: 0; @@ -203,9 +527,7 @@ a:not([class]):hover { border-radius: 8px; padding: 22px; margin: 20px 0 24px; - background: - linear-gradient(90deg, rgba(255, 255, 255, 0.54) 1px, transparent 1px), - #f1f1f1; + background: linear-gradient(90deg, rgba(255, 255, 255, 0.54) 1px, transparent 1px), #f1f1f1; background-size: 44px 100%; } @@ -244,7 +566,7 @@ a:not([class]):hover { .hf-texture-animate-word { color: #181818; - font-family: Impact, 'Arial Black', sans-serif; + font-family: Impact, "Arial Black", sans-serif; font-size: 92px; line-height: 0.9; letter-spacing: 0; @@ -280,6 +602,11 @@ a:not([class]):hover { margin: 20px 0 40px; } +.hf-texture-example-groups > div, +.hf-texture-example-card { + min-width: 0; +} + .hf-texture-example-title { margin: 0 0 10px; font-size: 14px; @@ -337,7 +664,7 @@ a:not([class]):hover { .hf-texture-example-word { color: #181818; - font-family: Impact, 'Arial Black', sans-serif; + font-family: Impact, "Arial Black", sans-serif; font-size: 54px; line-height: 0.9; letter-spacing: 0; @@ -376,6 +703,659 @@ a:not([class]):hover { overflow-wrap: anywhere; } +/* Portrait proof clips should read as examples inside the page, not become the + * page. Landscape films keep the full content width; only explicitly marked + * portrait media gets this compact, centered treatment. */ +.hf-portrait-video { + display: block; + width: auto; + max-width: min(100%, 18rem); + max-height: min(32rem, 68vh); + margin: 0.75rem auto 0; + border-radius: 0.5rem; + background: #111; +} + +/* Full narrated films use a quiet custom control layer over the native video + * engine. Preview loops remain plain muted videos. */ +.hf-docs-video-block { + width: 100%; +} + +.hf-docs-video-block[data-portrait="true"] { + width: min(100%, 18rem); + margin: 0.75rem auto 0; +} + +.hf-docs-video-block[data-portrait="true"] .hf-docs-video { + aspect-ratio: 9 / 16; + max-height: min(32rem, 68vh); +} + +/* + * Mintlify loads custom React snippets after the page shell. Reserve the + * film's real shape so the unloaded component never flashes as a thin Frame + * rail, then let the hydrated player and chapter guide size themselves. + */ +.hf-docs-video-frame { + width: 100%; + aspect-ratio: 16 / 9; + overflow: hidden; + border-radius: 0.75rem; + background: #070707; +} + +.hf-docs-video-frame:has(.hf-docs-video-block) { + aspect-ratio: auto; + overflow: visible; + border-radius: 0; + background: transparent; +} + +.hf-docs-video { + position: relative; + aspect-ratio: 16 / 9; + overflow: hidden; + border-radius: 0.75rem; + background: #070707; + color: #fff; + isolation: isolate; + outline: none; +} + +.hf-agent-action { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1.25rem; + margin: 2rem 0 1.5rem; + padding: 1rem 1.05rem; + border: 1px solid rgba(128, 128, 128, 0.26); + border-radius: 0.7rem; + background: rgba(128, 128, 128, 0.05); +} + +.hf-agent-action > div { + display: grid; + gap: 0.16rem; +} + +.hf-agent-action strong { + font-size: 0.86rem; + font-weight: 650; +} + +.hf-agent-action span { + opacity: 0.64; + font-size: 0.76rem; +} + +.hf-agent-action button { + flex: 0 0 auto; + padding: 0.52rem 0.78rem; + border: 1px solid rgba(128, 128, 128, 0.38); + border-radius: 0.48rem; + background: transparent; + color: inherit; + font: inherit; + font-size: 0.76rem; + font-weight: 620; + cursor: pointer; +} + +.hf-agent-action button:hover, +.hf-agent-action button:focus-visible { + border-color: var(--hf-brand); + background: var(--hf-brand-soft); +} + +.hf-live-reference-start { + display: flex; + width: 100%; + align-items: center; + gap: 0.8rem; + margin: 1rem 0 2rem; + padding: 1rem; + border: 1px solid rgba(128, 128, 128, 0.28); + border-radius: 0.75rem; + background: rgba(128, 128, 128, 0.05); + color: inherit; + font: inherit; + text-align: left; + cursor: pointer; +} + +.hf-live-reference-start > span:first-child { + display: grid; + width: 2.4rem; + height: 2.4rem; + flex: 0 0 auto; + place-items: center; + border-radius: 50%; + background: var(--hf-brand); + color: #071008; + font-size: 0.78rem; +} + +.hf-live-reference-start > span:last-child { + display: grid; + gap: 0.14rem; +} + +.hf-live-reference-start strong { + font-size: 0.86rem; +} + +.hf-live-reference-start small { + opacity: 0.65; + font-size: 0.75rem; +} + +.hf-live-reference-start:hover, +.hf-live-reference-start:focus-visible { + border-color: var(--hf-brand); + background: var(--hf-brand-soft); +} + +.hf-live-reference { + margin: 1rem 0 2rem; + overflow: hidden; + border: 1px solid rgba(128, 128, 128, 0.28); + border-radius: 0.75rem; +} + +.hf-live-reference-stage { + position: relative; + display: grid; + min-height: 18rem; + place-items: center; + aspect-ratio: 16 / 9; + background: #080808; +} + +.hf-live-reference-preview { + position: absolute; + inset: 0; + display: grid; + width: 100%; + height: 100%; + padding: 0; + overflow: hidden; + place-items: center; + border: 0; + background-color: #e9e9e7; + background-position: center; + background-size: cover; + cursor: pointer; + z-index: 4; +} + +.hf-live-reference-preview span { + position: relative; + display: grid; + width: 3.5rem; + height: 3.5rem; + place-items: center; + border: 1px solid rgba(255, 255, 255, 0.68); + border-radius: 999px; + background: rgba(10, 10, 10, 0.84); + color: #fff; + font-size: 1rem; + line-height: 1; + box-shadow: 0 0.75rem 2rem rgba(10, 10, 10, 0.2); + transform: translateZ(0); +} + +.hf-live-reference-preview:hover span, +.hf-live-reference-preview:focus-visible span { + transform: scale(1.05); +} + +.hf-live-reference-player-host, +.hf-live-reference-player-host > * { + display: block; + width: 100%; + aspect-ratio: 16 / 9; +} + +.hf-live-reference-loading { + color: rgba(255, 255, 255, 0.7); + font-size: 0.78rem; +} + +.hf-live-reference-controls { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto auto; + gap: 0.65rem; + align-items: end; + padding: 0.85rem; + background: rgba(128, 128, 128, 0.055); +} + +.hf-live-reference-controls label, +.hf-live-reference-controls fieldset { + display: grid; + min-width: 0; + gap: 0.3rem; + margin: 0; + padding: 0; + border: 0; +} + +.hf-live-reference-controls label > span, +.hf-live-reference-controls legend { + padding: 0; + opacity: 0.62; + font-size: 0.68rem; + font-weight: 600; +} + +.hf-live-reference-controls input { + width: 100%; + min-width: 0; + height: 2.15rem; + padding: 0 0.58rem; + border: 1px solid rgba(128, 128, 128, 0.3); + border-radius: 0.42rem; + background: rgba(128, 128, 128, 0.06); + color: inherit; + font: inherit; + font-size: 0.72rem; +} + +.hf-live-reference-controls fieldset > div { + display: flex; + height: 2.15rem; + align-items: center; + gap: 0.28rem; +} + +.hf-live-reference-controls fieldset button { + width: 1.35rem; + height: 1.35rem; + padding: 0; + border: 2px solid transparent; + border-radius: 50%; + background: var(--hf-live-accent); + box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.34); + cursor: pointer; +} + +.hf-live-reference-controls fieldset button[aria-pressed="true"] { + border-color: currentColor; + box-shadow: 0 0 0 2px rgba(107, 168, 100, 0.4); +} + +.hf-live-reference-reset { + height: 2.15rem; + padding: 0 0.65rem; + border: 1px solid rgba(128, 128, 128, 0.3); + border-radius: 0.42rem; + background: transparent; + color: inherit; + font: inherit; + font-size: 0.7rem; + cursor: pointer; +} + +@media (max-width: 720px) { + .hf-live-reference-controls { + grid-template-columns: 1fr 1fr; + } + + .hf-live-reference-controls label:nth-child(2) { + grid-column: 1 / -1; + grid-row: 2; + } +} + +@media (max-width: 520px) { + .hf-agent-action { + align-items: stretch; + flex-direction: column; + } + + .hf-agent-action button { + width: 100%; + } + + .hf-live-reference-stage { + min-height: 0; + } + + .hf-live-reference-controls { + grid-template-columns: 1fr; + } + + .hf-live-reference-controls label:nth-child(2) { + grid-column: auto; + grid-row: auto; + } +} + +.hf-docs-video:focus-visible { + box-shadow: 0 0 0 3px color-mix(in srgb, var(--hf-video-accent) 78%, transparent); +} + +.hf-docs-video video { + display: block; + width: 100%; + height: 100%; + margin: 0 !important; + background: #070707; + object-fit: contain; + cursor: pointer; +} + +.hf-docs-video-hero-play { + position: absolute; + top: 50%; + left: 50%; + display: flex; + align-items: center; + justify-content: center; + width: 3.35rem; + height: 3.35rem; + padding: 0; + border: 1px solid rgba(255, 255, 255, 0.18); + border-radius: 50%; + background: rgba(8, 8, 8, 0.56); + color: #fff; + font: inherit; + cursor: pointer; + transform: translate(-50%, -50%); + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); + z-index: 3; +} + +.hf-docs-video-hero-play:hover { + border-color: var(--hf-video-accent); + background: rgba(8, 8, 8, 0.78); +} + +.hf-docs-video-hero-play:focus-visible, +.hf-docs-video-control:focus-visible, +.hf-docs-video-rate:focus-visible, +.hf-docs-video-progress:focus-visible { + outline: 2px solid var(--hf-video-accent); + outline-offset: 2px; +} + +.hf-docs-video-hero-icon { + display: grid; + width: 2rem; + height: 2rem; + flex: 0 0 auto; + place-items: center; + border-radius: 0; + background: transparent; + color: #fff; +} + +.hf-docs-video-hero-icon svg { + width: 1.25rem; + height: 1.25rem; + margin-left: 0.1rem; + fill: currentColor; +} + +.hf-docs-video-controls { + position: absolute; + right: 0; + bottom: 0; + left: 0; + display: grid; + gap: 0.45rem; + padding: 3.75rem 1rem 0.78rem; + background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.84)); + opacity: 1; + transform: translateY(0); + visibility: visible; + transition: + opacity 160ms ease, + transform 160ms ease, + visibility 0s linear; + z-index: 2; +} + +.hf-docs-video-controls[data-visible="false"] { + pointer-events: none; + opacity: 0; + transform: translateY(0.4rem); + visibility: hidden; + transition: + opacity 160ms ease, + transform 160ms ease, + visibility 0s linear 160ms; +} + +.hf-docs-video-progress { + width: 100%; + height: 1rem; + margin: 0; + border: 0; + background: transparent; + cursor: pointer; + appearance: none; + -webkit-appearance: none; +} + +.hf-docs-video-scrub-preview { + position: absolute; + bottom: 4.1rem; + left: clamp(4.75rem, var(--hf-video-preview-x), calc(100% - 4.75rem)); + width: 9rem; + aspect-ratio: 16 / 9; + overflow: hidden; + border: 1px solid rgba(255, 255, 255, 0.28); + border-radius: 0.55rem; + background: #080808; + box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42); + pointer-events: none; + opacity: 1; + transform: translate(-50%, 0) scale(1); + transition: + opacity 120ms ease, + transform 120ms ease; + z-index: 4; +} + +.hf-docs-video-scrub-preview[data-visible="false"] { + visibility: hidden; + opacity: 0; + transform: translate(-50%, 0.3rem) scale(0.98); +} + +.hf-docs-video-scrub-preview video { + width: 100%; + height: 100%; + object-fit: cover; +} + +.hf-docs-video-scrub-preview span { + position: absolute; + right: 0.3rem; + bottom: 0.3rem; + padding: 0.14rem 0.32rem; + border-radius: 0.3rem; + background: rgba(0, 0, 0, 0.78); + color: #fff; + font-variant-numeric: tabular-nums; + font-size: 0.65rem; + line-height: 1.15; +} + +.hf-docs-video-progress::-webkit-slider-runnable-track { + height: 0.22rem; + border-radius: 999px; + background: linear-gradient( + to right, + var(--hf-video-accent) 0, + var(--hf-video-accent) var(--hf-video-progress), + rgba(255, 255, 255, 0.34) var(--hf-video-progress), + rgba(255, 255, 255, 0.34) 100% + ); +} + +.hf-docs-video-progress::-moz-range-track { + height: 0.22rem; + border-radius: 999px; + background: rgba(255, 255, 255, 0.34); +} + +.hf-docs-video-progress::-moz-range-progress { + height: 0.22rem; + border-radius: 999px; + background: var(--hf-video-accent); +} + +.hf-docs-video-progress::-webkit-slider-thumb { + width: 0.85rem; + height: 0.85rem; + margin-top: -0.315rem; + border: 2px solid #121212; + border-radius: 50%; + background: var(--hf-video-accent); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); + appearance: none; + -webkit-appearance: none; +} + +.hf-docs-video-progress::-moz-range-thumb { + width: 0.85rem; + height: 0.85rem; + border: 2px solid #121212; + border-radius: 50%; + background: var(--hf-video-accent); +} + +.hf-docs-video-control-row { + display: flex; + align-items: center; + gap: 0.3rem; + min-width: 0; +} + +.hf-docs-video-control, +.hf-docs-video-rate { + display: grid; + height: 2rem; + min-width: 2rem; + padding: 0; + place-items: center; + border: 0; + border-radius: 0.45rem; + background: transparent; + color: rgba(255, 255, 255, 0.92); + font: inherit; + cursor: pointer; +} + +.hf-docs-video-control:hover, +.hf-docs-video-rate:hover { + background: rgba(255, 255, 255, 0.13); + color: #fff; +} + +.hf-docs-video-control svg { + width: 1.2rem; + height: 1.2rem; + fill: currentColor; +} + +.hf-docs-video-rate { + min-width: 2.75rem; + padding: 0 0.45rem; + font-size: 0.75rem; + font-weight: 650; +} + +.hf-docs-video-time { + margin-left: 0.2rem; + color: rgba(255, 255, 255, 0.82); + font-variant-numeric: tabular-nums; + font-size: 0.74rem; + line-height: 1; + white-space: nowrap; +} + +.hf-docs-video-time span { + color: rgba(255, 255, 255, 0.46); +} + +.hf-docs-video-spacer { + flex: 1 1 auto; +} + +.hf-docs-video-spinner { + position: absolute; + top: 50%; + left: 50%; + width: 2rem; + height: 2rem; + margin: -1rem 0 0 -1rem; + border: 2px solid rgba(255, 255, 255, 0.28); + border-top-color: var(--hf-video-accent); + border-radius: 50%; + animation: hf-docs-video-spin 700ms linear infinite; + z-index: 3; +} + +@keyframes hf-docs-video-spin { + to { + transform: rotate(360deg); + } +} + +@media (max-width: 520px) { + .hf-docs-video-hero-play { + width: 3rem; + height: 3rem; + } + + .hf-docs-video-hero-icon { + width: 2rem; + height: 2rem; + } + + .hf-docs-video-controls { + gap: 0.25rem; + padding: 2.75rem 0.6rem 0.42rem; + } + + .hf-docs-video-scrub-preview { + bottom: 3.65rem; + left: clamp(3.75rem, var(--hf-video-preview-x), calc(100% - 3.75rem)); + width: 7rem; + } + + .hf-docs-video-time { + margin-left: 0; + font-size: 0.67rem; + } + + .hf-docs-video-rate { + min-width: 2.45rem; + padding: 0 0.25rem; + } +} + +@media (prefers-reduced-motion: reduce) { + .hf-docs-video-controls { + transition: none; + } + + .hf-docs-video-spinner { + animation: none; + } + + .hf-docs-video-scrub-preview { + transition: none; + } +} + @media (max-width: 860px) { .hf-texture-preview-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); @@ -410,3 +1390,10 @@ a:not([class]):hover { animation: none; } } + +/* Hide the section/group label ("Start here", etc.) that the theme renders + * above every page title. It repeats the sidebar grouping and adds noise on + * every page; each page leads with its own H1 instead. */ +.eyebrow { + display: none; +} diff --git a/docs/deploy/overview.mdx b/docs/deploy/overview.mdx new file mode 100644 index 0000000000..55e6aa0959 --- /dev/null +++ b/docs/deploy/overview.mdx @@ -0,0 +1,99 @@ +--- +title: "Choose a rendering path" +sidebarTitle: "Rendering overview" +description: "Choose the smallest HyperFrames rendering surface for local work, an application backend, managed cloud, or infrastructure you operate." +--- + +Every rendering path starts with the same HyperFrames project. The difference is +who operates Chrome and FFmpeg, how the request is submitted, and how much of the +pipeline your application needs to control. + +| Need | Start with | You operate | +| --- | --- | --- | +| Render while creating or in CI | **CLI** | The machine running the command | +| Render from a Node application | **Producer** | The Node service and its runtime | +| Control exact frame capture | **Engine** | Capture, encoding, and orchestration | +| Submit a render without managing infrastructure | **HyperFrames Cloud** | Nothing beyond the request and result | +| Run distributed renders in your AWS account | **AWS Lambda** | The deployed AWS stack | +| Run distributed renders in your Google Cloud account | **Cloud Run** | The deployed GCP resources | +| Deploy a preview and render API from a template | **Hosted templates** | The selected hosting account | + +## Local or CI: use the CLI + +The CLI owns the complete normal pipeline: project loading, checks, browser +capture, audio mixing, and encoding. + +```bash +npx hyperframes check +npx hyperframes render --output video.mp4 +``` + +Start here unless an application—not a person or CI job—must initiate the +render. See [Rendering](/guides/rendering) for the normal workflow and the +[complete CLI reference](/packages/cli) for automation flags. + +## A Node application: use Producer + +`@hyperframes/producer` is the complete programmable render pipeline. It is the +right layer for a backend that needs to provide project input, receive progress, +cancel work, or control encoding without spawning the CLI. + +```ts +import { createRenderJob, executeRenderJob } from "@hyperframes/producer"; + +const job = createRenderJob({ fps: 30, quality: "standard" }); +await executeRenderJob(job, "./project", "./video.mp4"); +``` + +Use [Producer](/packages/producer) for its current configuration and exported +API. Use Engine only when Producer performs work your application must replace. + +## Exact frame capture: use Engine + +`@hyperframes/engine` opens a seekable composition and captures exact frames. +It does not replace the complete Producer pipeline. + +Use it when building specialized capture, inspection, or rendering +infrastructure. For an ordinary encoded video, stay with CLI or Producer. See +[Engine](/packages/engine). + +## No infrastructure: use HyperFrames Cloud + +Managed cloud rendering accepts a project, runs the render, and returns the +finished file without requiring local Chrome or FFmpeg. + +```bash +npx hyperframes cloud render ./project --output video.mp4 +``` + +Authentication, variables, webhooks, and job management are covered in +[Cloud rendering](/deploy/cloud). + +## Infrastructure you control + +Use [AWS Lambda](/deploy/aws-lambda) or [Google Cloud Run](/deploy/gcp-cloud-run) +when renders must run inside your own cloud account. Both paths distribute work +across workers and store intermediate and final media in the corresponding +cloud storage. + +Use the [hosted templates](/guides/deploy) when the desired result is a small +preview application plus a render API on Vercel, Cloudflare, or Modal—not a +general distributed-rendering platform. + +## The decision + +Choose the highest-level surface that completes the job: + +```text +CLI → Producer → Engine +``` + +Moving right gives an application more control and more pipeline responsibility. +Managed Cloud, AWS Lambda, Cloud Run, and hosted templates decide where that +pipeline runs. + +## Related topics + +- [Render with the CLI](/guides/rendering) +- [Render with HyperFrames Cloud](/deploy/cloud) +- [Use Producer from a Node application](/packages/producer) diff --git a/docs/developers/cli.mdx b/docs/developers/cli.mdx new file mode 100644 index 0000000000..9c9a4957a9 --- /dev/null +++ b/docs/developers/cli.mdx @@ -0,0 +1,62 @@ +--- +title: "CLI guide" +description: "Find the HyperFrames command for creating, checking, rendering, publishing, and automating projects." +--- + +Use this page to choose a command. The [CLI reference](/packages/cli) contains +detailed flags, examples, and environment settings. The installed version +remains authoritative: run `npx hyperframes --help`. + +## Everyday project loop + +| Task | Command | +| --- | --- | +| Create a project | `npx hyperframes init my-video` | +| Open Studio | `npx hyperframes preview` | +| Check HTML structure | `npx hyperframes lint` | +| Run browser, layout, motion, and contrast checks | `npx hyperframes check` | +| Capture review frames | `npx hyperframes snapshot --at 0,2,5` | +| Render a video | `npx hyperframes render --output output.mp4` | +| Publish a browser link | `npx hyperframes publish` | +| Diagnose the machine | `npx hyperframes doctor` | + +## Work with media + +| Task | Command | +| --- | --- | +| Inspect project metadata | `npx hyperframes info` | +| Transcribe speech | `npx hyperframes transcribe ` | +| Generate narration | `npx hyperframes tts + + +``` + +Use its JavaScript API to play, pause, seek, change playback rate, and listen for timeline events. It does not edit or render the composition. + +See the [Player reference](/packages/player). + +## Rendering: choose the layer you need + +- **CLI** — complete local and automated rendering. +- **Producer** — the Node rendering pipeline: capture, encode, and audio mix. +- **Engine** — lower-level seekable page capture and exact-frame control. +- **Managed cloud** — hosted rendering without operating Chrome or FFmpeg. +- **AWS Lambda or Google Cloud Run** — infrastructure you deploy and control. + +Most applications should begin with the CLI or Producer. Reach for Engine only when building a specialized capture or rendering system. + +Use [rendering infrastructure](/deploy/overview) to compare hosted, local, and self-managed paths. + +## The complete mental model + +```text +composition → inspect or edit → play or render +``` + +Every surface works on the same source. Choose the smallest layer that produces the result your application needs, then move lower only when the higher-level layer removes control you genuinely require. + +## Related topics + +- [Run complete projects from the CLI](/developers/cli) +- [Edit composition HTML with the SDK](/sdk/quickstart) +- [Embed a composition with the Player](/packages/player) diff --git a/docs/docs.json b/docs/docs.json index ce178e1346..a12a6849ea 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1,11 +1,11 @@ { "$schema": "https://mintlify.com/docs.json", "name": "HyperFrames", - "theme": "maple", + "theme": "aspen", "colors": { - "primary": "#0a0a0a", - "light": "#f6f5f1", - "dark": "#0a0a0a" + "primary": "#16785B", + "light": "#3CE6AC", + "dark": "#16785B" }, "background": { "color": { @@ -20,11 +20,12 @@ } }, "appearance": { - "default": "light" + "default": "system" }, "logo": { "light": "/logo/light.svg", - "dark": "/logo/dark.svg" + "dark": "/logo/dark.svg", + "href": "https://hyperframes.heygen.com/introduction" }, "favicon": "/favicon.svg", "contextual": { @@ -47,28 +48,37 @@ "navigation": { "tabs": [ { - "tab": "Documentation", + "tab": "Guides", + "icon": "book-open", "groups": [ { - "group": "Getting Started", + "group": "Start here", "pages": [ "introduction", - "changelog", - "weekly-updates", "quickstart", - "showcase", - "examples", - "launch-videos" + "go-further", + "developers/index" ] }, { - "group": "Concepts", + "group": "Explore", "pages": [ - "concepts/compositions", - "concepts/data-attributes", - "concepts/variables", - "concepts/frame-adapters", - "concepts/determinism" + "examples", + "product-updates" + ] + }, + { + "group": "30 Days of HyperFrames", + "pages": [ + "thirty-days" + ] + }, + { + "group": "Choose where to create", + "pages": [ + "guides/choose-creation-path", + "guides/mcp", + "guides/design-tools" ] }, { @@ -150,53 +160,97 @@ ] }, { - "group": "Guides", + "group": "Workflows", "pages": [ - "guides/pipeline", - "guides/skills", - "guides/authentication", - "guides/video-components", - "guides/color-grading", - "guides/media-effects", - "guides/media-overlays", - "guides/html-in-canvas", - "guides/website-to-video", - "guides/figma", - "guides/antigravity", - "guides/copilot-cli", - "guides/claude-design", - "guides/open-design", - "guides/hyperframes-vs-remotion", - "guides/gsap-animation", - "guides/keyframes", - "guides/rendering", - "guides/remove-background", - "guides/hdr", - "guides/4k-rendering", - "guides/performance", - "guides/timeline-editing", - "guides/video-editor-cheatsheet", - "guides/common-mistakes", - "guides/troubleshooting", - "guides/feedback" + "workflows", + "guides/product-launch-video", + "guides/faceless-explainer", + "guides/pr-to-video", + "guides/captions-and-recuts", + "guides/motion-graphics", + "guides/music-to-video", + "guides/slideshow", + "guides/general-video", + "guides/export-and-share" ] }, { - "group": "Deploy", + "group": "Build the project", "pages": [ - "deploy/cloud", - "guides/deploy", - "deploy/aws-lambda", - "deploy/gcp-cloud-run", - "deploy/templates-on-lambda", - "deploy/migrating-to-hyperframes-lambda" + "concepts/index", + "guides/media", + "guides/video-components", + "guides/avatar-presenter", + "guides/voice-and-audio", + "guides/remove-background", + "guides/color-grading", + "guides/media-effects" + ] + }, + { + "group": "Help", + "pages": [ + "help", + "guides/troubleshooting", + "guides/feedback" + ] + } + ] + }, + { + "tab": "Studio", + "icon": "palette", + "groups": [ + { + "group": "Start in Studio", + "pages": [ + "studio/index", + "studio/storyboard" + ] + }, + { + "group": "Edit", + "pages": [ + "studio/canvas", + "studio/timeline", + "studio/animation", + "studio/captions" + ] + }, + { + "group": "Build and reuse", + "pages": [ + "studio/assets-and-blocks", + "studio/variables", + "studio/slideshows" + ] + }, + { + "group": "Finish and recover", + "pages": [ + "studio/export", + "studio/troubleshooting" + ] + }, + { + "group": "Reference", + "pages": [ + "studio/source", + "studio/shortcuts" ] } ] }, { "tab": "Catalog", + "icon": "grid-2", "groups": [ + { + "group": "Overview", + "pages": [ + "catalog/index" + ] + }, { "group": "Code Animations", "pages": [ @@ -233,7 +287,7 @@ ] }, { - "group": "HTML-in-Canvas", + "group": "Interface & VFX", "pages": [ "catalog/blocks/ios26-liquid-glass", "catalog/blocks/liquid-glass-context-menu", @@ -283,7 +337,7 @@ ] }, { - "group": "Shader Transitions", + "group": "Transitions", "pages": [ "catalog/blocks/chromatic-radial-split", "catalog/blocks/cinematic-zoom", @@ -298,12 +352,7 @@ "catalog/blocks/sdf-iris", "catalog/blocks/swirl-vortex", "catalog/blocks/thermal-distortion", - "catalog/blocks/whip-pan" - ] - }, - { - "group": "CSS Transitions", - "pages": [ + "catalog/blocks/whip-pan", "catalog/blocks/beat-freeze-cut", "catalog/blocks/hw-scribble-transition", "catalog/blocks/mk-clone-wall-transition", @@ -324,11 +373,8 @@ ] }, { - "group": "Showcases", + "group": "Code Themes", "pages": [ - "catalog/blocks/app-showcase", - "catalog/blocks/apple-money-count", - "catalog/blocks/blue-sweater-intro-video", "catalog/blocks/code-snippet-apple-terminal-basic", "catalog/blocks/code-snippet-apple-terminal-clear-dark", "catalog/blocks/code-snippet-apple-terminal-clear-light", @@ -352,7 +398,15 @@ "catalog/blocks/code-snippet-monokai", "catalog/blocks/code-snippet-solarized-light", "catalog/blocks/code-snippet-visual-studio-dark", - "catalog/blocks/code-snippet-visual-studio-light", + "catalog/blocks/code-snippet-visual-studio-light" + ] + }, + { + "group": "Complete Scenes", + "pages": [ + "catalog/blocks/app-showcase", + "catalog/blocks/apple-money-count", + "catalog/blocks/blue-sweater-intro-video", "catalog/blocks/north-korea-locked-down", "catalog/blocks/nyc-paris-flight", "catalog/blocks/ui-3d-reveal", @@ -360,10 +414,16 @@ ] }, { - "group": "Data", + "group": "Data & Diagrams", "pages": [ "catalog/blocks/data-chart", + "catalog/blocks/flowchart", + "catalog/blocks/flowchart-vertical", + "catalog/blocks/hw-pipeline", + "catalog/blocks/hw-text-cloud", "catalog/blocks/mk-line-graph", + "catalog/blocks/mk-progress-stat", + "catalog/blocks/mk-specs-list", "catalog/blocks/spain-map", "catalog/blocks/us-map", "catalog/blocks/us-map-bubble", @@ -373,7 +433,7 @@ ] }, { - "group": "Effects", + "group": "Effects & Annotations", "pages": [ "catalog/components/caption-blend-difference", "catalog/components/grain-overlay", @@ -399,21 +459,15 @@ ] }, { - "group": "Blocks", + "group": "Titles & Layouts", "pages": [ "catalog/blocks/camcorder-hud", - "catalog/blocks/flowchart", - "catalog/blocks/flowchart-vertical", "catalog/blocks/hw-frame", "catalog/blocks/hw-path-text", - "catalog/blocks/hw-pipeline", - "catalog/blocks/hw-text-cloud", "catalog/blocks/hw-title", "catalog/blocks/logo-outro", "catalog/blocks/mk-background", "catalog/blocks/mk-placeholder-grid", - "catalog/blocks/mk-progress-stat", - "catalog/blocks/mk-specs-list", "catalog/blocks/yt-lcd-background", "catalog/blocks/yt-logo-intro", "catalog/blocks/yt-prism-title", @@ -423,41 +477,27 @@ ] }, { - "tab": "Packages", + "tab": "Developers", + "icon": "code", "groups": [ { - "group": "Packages", + "group": "Start here", "pages": [ - "packages/core", - "packages/parsers", - "packages/lint", - "packages/studio-server", - "packages/sdk", - "packages/engine", - "packages/player", - "packages/producer", - "packages/shader-transitions", - "packages/aws-lambda", - "packages/gcp-cloud-run", - "packages/studio", - "packages/cli" - ] - } - ] - }, - { - "tab": "SDK", - "groups": [ - { - "group": "Overview", - "pages": [ - "sdk/overview", - "sdk/quickstart" + "developers/overview" ] }, { - "group": "Guides", + "group": "Command line", "pages": [ + "developers/cli", + "packages/cli", + "packages/lint" + ] + }, + { + "group": "SDK guides", + "pages": [ + "sdk/quickstart", "sdk/guides/querying-and-editing", "sdk/guides/timing-and-animation", "sdk/guides/undo-redo-and-patches", @@ -468,7 +508,7 @@ ] }, { - "group": "Reference", + "group": "SDK reference", "pages": [ "sdk/reference/open-composition", "sdk/reference/composition", @@ -477,32 +517,85 @@ "sdk/reference/adapters", "sdk/reference/utilities" ] - } - ] - }, - { - "tab": "Reference", - "groups": [ + }, { - "group": "Reference", + "group": "Composition, design & animation", "pages": [ - "reference/html-schema" + "concepts/compositions", + "concepts/variables", + "concepts/data-attributes", + "guides/gsap-animation", + "concepts/frame-adapters", + "concepts/determinism", + "guides/html-in-canvas", + "guides/hyperframes-vs-remotion", + "guides/figma" ] }, { - "group": "Contributing", + "group": "Composition reference", + "pages": [ + "reference/html-schema", + "reference/color-grading" + ] + }, + { + "group": "Rendering paths", + "pages": [ + "guides/rendering", + "deploy/overview", + "deploy/cloud", + "guides/deploy" + ] + }, + { + "group": "Cloud infrastructure", + "pages": [ + "deploy/aws-lambda", + "deploy/gcp-cloud-run", + "deploy/templates-on-lambda", + "deploy/migrating-to-hyperframes-lambda", + "packages/aws-lambda", + "packages/gcp-cloud-run" + ] + }, + { + "group": "Advanced rendering", + "pages": [ + "guides/4k-rendering", + "guides/hdr", + "guides/performance" + ] + }, + { + "group": "Packages", + "pages": [ + "packages/core", + "packages/parsers", + "packages/studio-server", + "packages/sdk", + "packages/engine", + "packages/player", + "packages/producer", + "packages/shader-transitions", + "packages/studio" + ] + }, + { + "group": "Agent setup", + "pages": [ + "guides/authentication", + "guides/skills" + ] + }, + { + "group": "Contributing & community", "pages": [ "contributing", "contributing/catalog", "contributing/release-channels", "contributing/changelog-process", "contributing/testing-local-changes", - "contributing/studio-manual-dom-editing" - ] - }, - { - "group": "Community", - "pages": [ "community/adopters" ] } @@ -512,14 +605,206 @@ }, "footer": { "socials": { - "github": "https://github.com/heygen-com/hyperframes" + "github": "https://github.com/heygen-com/hyperframes", + "x": "https://x.com/HeyGen", + "instagram": "https://www.instagram.com/heygen_official/" + }, + "links": [ + { + "header": "Explore", + "items": [ + { + "label": "Introduction", + "href": "/introduction" + }, + { + "label": "Make your first video", + "href": "/quickstart" + }, + { + "label": "Examples", + "href": "/examples" + } + ] + }, + { + "header": "Build", + "items": [ + { + "label": "Studio", + "href": "/studio" + }, + { + "label": "Catalog", + "href": "/catalog" + }, + { + "label": "Developers", + "href": "/developers/overview" + } + ] + }, + { + "header": "Resources", + "items": [ + { + "label": "Product updates", + "href": "/product-updates" + }, + { + "label": "Playground", + "href": "https://www.hyperframes.dev/" + }, + { + "label": "GitHub", + "href": "https://github.com/heygen-com/hyperframes" + } + ] + } + ] + }, + "navbar": { + "links": [ + { + "type": "github", + "href": "https://github.com/heygen-com/hyperframes" + } + ], + "primary": { + "type": "button", + "label": "Playground", + "href": "https://www.hyperframes.dev/" } }, "redirects": [ + { + "source": "/guides", + "destination": "/introduction" + }, + { + "source": "/showcase", + "destination": "/examples" + }, + { + "source": "/launch-videos", + "destination": "/examples" + }, + { + "source": "/guides/claude-design", + "destination": "/guides/design-tools" + }, + { + "source": "/guides/open-design", + "destination": "/guides/design-tools" + }, + { + "source": "/guides/common-mistakes", + "destination": "/guides/troubleshooting" + }, + { + "source": "/guides/create-with-agent", + "destination": "/workflows" + }, + { + "source": "/guides/choose-your-path", + "destination": "/workflows" + }, + { + "source": "/guides/help", + "destination": "/help" + }, + { + "source": "/guides/project-tour", + "destination": "/concepts" + }, + { + "source": "/guides/media-overlays", + "destination": "/catalog" + }, + { + "source": "/guides/common-questions", + "destination": "/help" + }, + { + "source": "/contributing/studio-manual-dom-editing", + "destination": "/studio/canvas" + }, + { + "source": "/guides/video-editor-cheatsheet", + "destination": "/studio/shortcuts" + }, + { + "source": "/guides/timeline-editing", + "destination": "/studio/timeline" + }, + { + "source": "/guides/website-to-video", + "destination": "/guides/product-launch-video" + }, { "source": "/guides/prompting", "destination": "/prompting/overview", "permanent": true + }, + { + "source": "/guides/pipeline", + "destination": "/concepts", + "permanent": true + }, + { + "source": "/guides/quality-checklist", + "destination": "/guides/export-and-share", + "permanent": true + }, + { + "source": "/guides/publish-and-share", + "destination": "/guides/export-and-share", + "permanent": true + }, + { + "source": "/guides/antigravity", + "destination": "/guides/skills", + "permanent": true + }, + { + "source": "/guides/copilot-cli", + "destination": "/guides/skills", + "permanent": true + }, + { + "source": "/studio/tour", + "destination": "/studio", + "permanent": true + }, + { + "source": "/studio/layers", + "destination": "/studio/canvas", + "permanent": true + }, + { + "source": "/studio/design", + "destination": "/studio/canvas", + "permanent": true + }, + { + "source": "/guides/keyframes", + "destination": "/studio/animation", + "permanent": true + }, + { + "source": "/studio/lint-and-agent", + "destination": "/studio/source", + "permanent": true + }, + { + "source": "/guides/transcribe-and-caption", + "destination": "/guides/voice-and-audio", + "permanent": true + }, + { + "source": "/sdk/overview", + "destination": "/sdk/quickstart", + "permanent": true } ] } diff --git a/docs/examples.mdx b/docs/examples.mdx index a980c933d6..846262755b 100644 --- a/docs/examples.mdx +++ b/docs/examples.mdx @@ -1,274 +1,128 @@ --- -title: Examples -description: "Built-in examples for common video patterns. Hover to preview animations." +title: "Examples" +description: "Watch finished HyperFrames videos, inspect real production projects, or start from a working template." --- -Hyperframes includes starter examples to help you scaffold compositions quickly. Each example gives you a working project with the correct [composition structure](/concepts/compositions), [data attributes](/concepts/data-attributes), and a [GSAP timeline](/guides/gsap-animation) already wired up. +import { DocsVideo } from "/snippets/docs-video.jsx"; - - Looking for finished videos and production projects? Start with the [Showcase](/showcase). - +## Finished films -```bash Terminal +Each preview links to the complete source project. + + + +## One project, open end to end + +This is the same small project used in the Quickstart. Its request, brief, +source, revision notes, checks, and final render are all public. + +```text +Using /hyperframes, make a 10-second product intro for https://example.com. +``` + + + +
+ +
+ +The result is not a sealed demo. Open any stage above and use the same shape for +your own project: request → brief → source → revision → render. + +## Start from a template + +Create a project with a working example: + +```bash npx hyperframes init my-video --example ``` -## Landscape Templates - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -## Portrait Templates - -
-
-
-
+| Example | Good starting point for | +| --------------- | -------------------------------------------- | +| `warm-grain` | Branding, lifestyle, and editorial work | +| `play-mode` | Energetic social videos and product launches | +| `swiss-grid` | Technical, structured, and corporate stories | +| `kinetic-type` | Type-led promos, intros, and title cards | +| `decision-tree` | Explainable diagrams and tutorials | +| `product-promo` | Multi-scene product showcases | +| `nyt-graph` | Editorial charts and data stories | +| `vignelli` | Bold portrait announcements | +| `blank` | Agent-generated or fully custom work | - Looking for a minimal starting point? Use **blank** — it gives you an empty composition with just the scaffolding, no visual design. - - ```bash Terminal - npx hyperframes init my-video --example blank - ``` + Choose a template for its structure and tone, then replace the sample content. If none fits, start + with `blank` and let the agent build from the brief. -## Choosing an Example +## Related topics -| Example | Style | Format | Best for | -|----------|-------|--------|----------| -| `warm-grain` | Organic, textured | Landscape | Lifestyle, branding, editorial | -| `play-mode` | Energetic, elastic | Landscape | Social media, product launches | -| `swiss-grid` | Clean, structured | Landscape | Corporate, data, technical | -| `kinetic-type` | Dramatic type | Landscape | Promos, intros, title cards | -| `decision-tree` | Diagrammatic | Landscape | Explainers, tutorials | -| `product-promo` | Multi-scene | Landscape | Product showcases, demos | -| `nyt-graph` | Editorial data | Landscape | Data stories, reports | -| `vignelli` | Bold, typographic | Portrait | Headlines, announcements | -| `blank` | Minimal scaffolding | — | Full control, agent-generated | - -## Example Details - - - - ### warm-grain - - Cream-toned aesthetic with grain texture overlay. - - **What it produces:** A composition with warm color grading, textured grain, and smooth transitions. Includes an intro sub-composition and captions support. - - ``` - my-video/ - ├── meta.json - ├── index.html - ├── compositions/ - │ ├── intro.html - │ ├── graphics.html - │ └── captions.html - └── assets/ - ``` - - - ### play-mode - - Playful elastic animations with bold, energetic motion. - - ``` - my-video/ - ├── meta.json - ├── index.html - ├── compositions/ - │ ├── intro.html - │ ├── stats.html - │ └── captions.html - └── assets/ - ``` - - - ### swiss-grid - - Structured grid layout inspired by Swiss/International Typographic Style. - - ``` - my-video/ - ├── meta.json - ├── index.html - ├── compositions/ - │ ├── intro.html - │ ├── graphics.html - │ └── captions.html - └── assets/ - ``` - - - ### vignelli - - Bold typography with red accents (1080×1920 portrait). - - ``` - my-video/ - ├── meta.json - ├── index.html - ├── compositions/ - │ ├── overlays.html - │ └── captions.html - └── assets/ - ``` - - - ### kinetic-type - - Bold kinetic typography promo with dramatic text animations. - - ``` - my-video/ - ├── meta.json - ├── index.html - └── compositions/ - └── main-graphics.html - ``` - - - ### decision-tree - - Animated flowchart with branching paths and progressive reveal. - - ``` - my-video/ - ├── meta.json - ├── index.html - └── compositions/ - └── decision_tree.html - ``` - - - ### product-promo - - Multi-scene product showcase with SVG assets. - - ``` - my-video/ - ├── meta.json - ├── index.html - ├── compositions/ - │ ├── scene1-logo-intro.html - │ ├── scene2-4-canvas.html - │ └── scene5-logo-outro.html - └── assets/ - ├── figma-cursors.svg - ├── figma-logo-pieces.svg - └── figma-logo-pills.svg - ``` - - - ### nyt-graph - - Animated data chart in print editorial style. - - ``` - my-video/ - ├── meta.json - ├── index.html - └── compositions/ - └── nyt-chart.html - ``` - - - ### blank - - Empty composition with just the scaffolding. - - ``` - my-video/ - ├── meta.json - ├── index.html - └── compositions/ - └── captions.html - ``` - - - -## Passing a Source Video - -```bash Terminal -npx hyperframes init my-video --example warm-grain --video ./my-clip.mp4 -``` - -The CLI will probe the video for duration, resolution, and codec. If the video uses an incompatible codec, it will be automatically transcoded to H.264 MP4 if FFmpeg is available. - -## Custom Examples - -Any directory with an `index.html` can serve as an example. Your custom example needs: - -1. An `index.html` with a [`data-composition-id`](/concepts/data-attributes#composition-attributes) root element -2. A [GSAP timeline](/guides/gsap-animation) registered in `window.__timelines` -3. Any assets in the same directory or a subdirectory - -```html index.html -
- - - - - -
-``` - -After creating a custom example, validate it with the [linter](/packages/cli#lint): - -```bash Terminal -npx hyperframes lint -``` - -## Next Steps - - - - Create, preview, and render your first video - - - Real production projects from HeyGen's launches — open-source for you to read and remix. - - - Add animations to your example - - - Understand the composition data model - - +- [Make your first video](/quickstart) +- [Choose a creation workflow](/workflows) +- [Take more control of an existing project](/go-further) diff --git a/docs/go-further.mdx b/docs/go-further.mdx new file mode 100644 index 0000000000..e74504bed5 --- /dev/null +++ b/docs/go-further.mdx @@ -0,0 +1,40 @@ +--- +title: "Go further with HyperFrames" +sidebarTitle: "Go further" +description: "Take more control of an existing project through your agent, Studio, richer composition tools, and a reliable finish." +--- + +import { AdvancedPathGrid } from "/snippets/advanced-path-grid.jsx"; +import { DocsVideo } from "/snippets/docs-video.jsx"; + +
+ +
+ +The project does not change format as you gain control. Your agent, Studio, the +SDK, the Player, and the renderer all work from the same HTML project. + +The [Reference Project](https://github.com/heygen-com/hyperframes/tree/main/examples/docs-reference-project) +continues the first-video example. Its first version is a real page capture on a +10-second timeline. The revised version keeps that source and adds editable +variables, narration, fixed captions, music, and sound. + +## Choose by the size of the change + +Use the agent for changes to the story or several scenes. Use Studio for the +specific visual or timing detail you can point at. + + + +For reusable content and nested structure, continue with [Variables](/concepts/variables) and +[Compositions](/concepts/compositions). + +## Related topics + +- [Edit the project visually in Studio](/studio) +- [Understand how a HyperFrames project works](/concepts) +- [Build on HyperFrames as a developer](/developers) diff --git a/docs/guides/4k-rendering.mdx b/docs/guides/4k-rendering.mdx index c5b08b9e26..9a0597d1c5 100644 --- a/docs/guides/4k-rendering.mdx +++ b/docs/guides/4k-rendering.mdx @@ -1,167 +1,70 @@ --- -title: 4K Rendering -description: "Render any composition to 4K (3840×2160) without rewriting it — the CLI supersamples a 1080p composition via Chrome's device scale factor." +title: Render in 4K +description: Author at 4K or supersample an existing composition at render time. --- -Hyperframes renders to 4K (3840×2160) two ways. Both produce a true 4K MP4; pick the one that matches your project. +## Render an existing project in 4K - - - Scaffold the project at 4K so the composition is laid out at 4K natively. Best when you want crisp 4K-native typography and assets. - ```bash - npx hyperframes init my-video --resolution 4k - ``` - - - Keep your existing 1080p composition. Pass `--resolution 4k` at render time and Chrome renders at 2× DPR so the screenshot lands at 4K. - ```bash - npx hyperframes render --resolution 4k --output 4k.mp4 - ``` - - - -## Quickstart - - - - ```bash Terminal - npx hyperframes render --resolution 4k --output my-video-4k.mp4 - ``` - - The composition's `data-width` / `data-height` are unchanged. Chrome's `deviceScaleFactor` is set to `2`, so the captured screenshot for each frame is 3840×2160. ffmpeg auto-detects the dimensions from the screenshot stream and encodes at 4K. - - - ```bash Terminal - npx hyperframes init my-video --resolution 4k - ``` - - Every scaffolded HTML file is patched in place: `data-width="3840"`, `data-height="2160"`, `data-resolution="landscape-4k"`, `#stage` CSS dimensions, and the `` tag. - - - ```bash Terminal - ffprobe -v error -select_streams v:0 -show_entries stream=width,height my-video-4k.mp4 - ``` - - Expected: - ``` - width=3840 - height=2160 - ``` - - - -## Resolution presets - -`--resolution` accepts these values on both `init` and `render`: - -| Preset | Dimensions | Aliases | -|--------|-----------|---------| -| `landscape` | 1920×1080 | `1080p`, `hd` | -| `portrait` | 1080×1920 | `1080p-portrait` | -| `square` | 1080×1080 | `1080p-square`, `square-1080p` | -| `landscape-4k` | 3840×2160 | `4k`, `uhd` | -| `portrait-4k` | 2160×3840 | `4k-portrait` | -| `square-4k` | 2160×2160 | `4k-square` | - -Examples: - -```bash Terminal -npx hyperframes render --resolution 4k # landscape 4K -npx hyperframes render --resolution portrait-4k # vertical 4K (TikTok / Reels at max quality) -npx hyperframes render --resolution 1080p # explicit 1080p (no-op on 1080p compositions) +```bash +npx hyperframes render --resolution 4k --output final-4k.mp4 ``` -## How `--resolution` works (supersampling) +HyperFrames keeps the composition's layout unchanged and captures it at a higher device-pixel ratio. A 1920×1080 composition becomes a 3840×2160 file. -The composition stays at its authored dimensions. Hyperframes computes a `deviceScaleFactor` from the ratio of output to composition dimensions and passes it to Chrome: +Use the matching preset for portrait or square work: -| Composition | `--resolution` | `deviceScaleFactor` | Output | -|-------------|---------------|--------------------|--------| -| 1920×1080 | `4k` | 2 | 3840×2160 | -| 1080×1920 | `portrait-4k` | 2 | 2160×3840 | -| 3840×2160 | `4k` | 1 (no-op) | 3840×2160 | +| Preset | Output | +| --- | --- | +| `4k` or `landscape-4k` | 3840×2160 | +| `portrait-4k` | 2160×3840 | +| `square-4k` | 2160×2160 | -Chrome then renders the page at the higher DPR — effectively rendering each CSS pixel as 2×2 device pixels — so the captured screenshot is at the requested resolution. +## Author a project at 4K - - This approach is intentionally simple — no composition edits, no second authoring pass. The tradeoff: 4K renders take roughly 4× as long per frame because there are 4× the pixels to capture and encode. - +If the project should use a 4K canvas from the start: -## What scales, what doesn't +```bash +npx hyperframes init my-video --resolution 4k +``` -Supersampling re-renders the page at higher DPR. That genuinely helps anything the browser rasterizes from a vector or high-resolution source, and does nothing for content already locked to a fixed pixel grid. Knowing which is which sets correct expectations before a 4K render: +Choose this when canvas or WebGL code, fixed-resolution media, or layout decisions need to know the final pixel dimensions while you author. -| Asset type | Behavior at `--resolution 4k` | -|------------|------------------------------| -| Text (HTML, SVG ``, web fonts) | ✅ **Re-rasterized at 4K.** Glyphs are vector and the browser shapes/rasterizes them at the new DPR. Crisp at any scale. | -| SVG / vector graphics | ✅ **Re-rasterized at 4K.** Same story as text — paths are vector. | -| CSS shapes, gradients, borders, shadows | ✅ **Re-rasterized at 4K.** Browser-generated raster. | -| Images with intrinsic dimensions ≥ 4K | ✅ **Full benefit.** A 3840×2160 source serves all the detail. | -| Images smaller than 4K (e.g. a 1920×1080 PNG) | ⚠️ **No new detail.** Browser upscales the source bitmap; output is no sharper than rendering at 1080p and upscaling externally — but no worse either. | -| `