Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
<!doctype html>
<html lang="en" data-composition-id="device-frame-stage-demo" data-composition-duration="5">
<!--
Device Frame Stage - Demo. Mounts the primitive via a clip with
data-composition-src instead of inlining its markup, proving the
sub-composition mount contract (template + #root + host-driven sizing;
see skills/hyperframes/references/format.md).
The mount clip is deliberately sized to a 960x540 slot inside this
1920x1080 stage (not full-bleed): the primitive must size the device off
that HOST box, not off an assumed 1920x1080 stage, or it renders 2x too
large and bleeds past the slot's border.
Non-default variables (tablet / island / silver) exercise all three
variables away from the primitive's defaults (phone / none / graphite);
see device-frame-stage.html for the full header (concept, envelope, sync
points, sound cues).
-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Device Frame Stage - Demo</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
<style>
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
width: 1920px;
height: 1080px;
overflow: hidden;
}
#root {
/* 17-token dark theme contract, matching the other test-scene hosts. */
--bg: #06080b;
--fg: #f4f6f8;
--muted: #8b95a4;
--surface: #12161d;
--border: rgba(244, 246, 248, 0.16);
--brand: #ff7a33;
--accent: #22d3ee;
--font-display:
-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
--font-body:
-apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--radius: 16px;
--space-1: 8px;
--space-2: 16px;
--space-3: 32px;
position: relative;
width: 1920px;
height: 1080px;
overflow: hidden;
background: var(--bg);
color: var(--fg);
font-family: var(--font-body);
}
.demo-backdrop {
position: absolute;
inset: 0;
background: radial-gradient(120% 120% at 50% 18%, #222b40 0%, #05070d 65%);
}
/* The mount slot: 960x540, centered. Border makes any overflow past
this box immediately visible in a snapshot. */
.demo-slot {
position: absolute;
left: 480px;
top: 270px;
width: 960px;
height: 540px;
border: 1px dashed var(--border);
border-radius: var(--radius);
overflow: hidden;
}
</style>
</head>
<body>
<div
id="root"
data-composition-id="device-frame-stage-demo"
data-start="0"
data-width="1920"
data-height="1080"
data-duration="5"
>
<div class="demo-backdrop"></div>
<div
id="device-frame-stage-mount"
class="clip demo-slot"
data-composition-id="device-frame-stage"
data-composition-src="./device-frame-stage.html"
data-variable-values='{"device":"tablet","cutout":"island","body":"silver"}'
data-start="0"
data-duration="5"
data-track-index="0"
data-width="960"
data-height="540"
></div>
</div>
<script>
window.__timelines = window.__timelines || {};
const tl = gsap.timeline({ paused: true });
window.__timelines["device-frame-stage-demo"] = tl;
</script>
</body>
</html>