videowright 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -0
- package/dist/cli/argv.d.ts +28 -0
- package/dist/cli/argv.d.ts.map +1 -0
- package/dist/cli/argv.js +115 -0
- package/dist/cli/argv.js.map +1 -0
- package/dist/cli/bin.d.ts +7 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +10 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/dev.d.ts +19 -0
- package/dist/cli/dev.d.ts.map +1 -0
- package/dist/cli/dev.js +104 -0
- package/dist/cli/dev.js.map +1 -0
- package/dist/cli/discover.d.ts +29 -0
- package/dist/cli/discover.d.ts.map +1 -0
- package/dist/cli/discover.js +104 -0
- package/dist/cli/discover.js.map +1 -0
- package/dist/cli/discover_project.d.ts +29 -0
- package/dist/cli/discover_project.d.ts.map +1 -0
- package/dist/cli/discover_project.js +108 -0
- package/dist/cli/discover_project.js.map +1 -0
- package/dist/cli/errors.d.ts +10 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +13 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/ffmpeg.d.ts +57 -0
- package/dist/cli/ffmpeg.d.ts.map +1 -0
- package/dist/cli/ffmpeg.js +122 -0
- package/dist/cli/ffmpeg.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +152 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/playwright_check.d.ts +44 -0
- package/dist/cli/playwright_check.d.ts.map +1 -0
- package/dist/cli/playwright_check.js +20 -0
- package/dist/cli/playwright_check.js.map +1 -0
- package/dist/cli/prompt.d.ts +13 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +47 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/render.d.ts +60 -0
- package/dist/cli/render.d.ts.map +1 -0
- package/dist/cli/render.js +471 -0
- package/dist/cli/render.js.map +1 -0
- package/dist/cli/script_cmd.d.ts +26 -0
- package/dist/cli/script_cmd.d.ts.map +1 -0
- package/dist/cli/script_cmd.js +88 -0
- package/dist/cli/script_cmd.js.map +1 -0
- package/dist/cli/time_shim.d.ts +44 -0
- package/dist/cli/time_shim.d.ts.map +1 -0
- package/dist/cli/time_shim.js +390 -0
- package/dist/cli/time_shim.js.map +1 -0
- package/dist/cli/ts_loader.d.ts +28 -0
- package/dist/cli/ts_loader.d.ts.map +1 -0
- package/dist/cli/ts_loader.js +95 -0
- package/dist/cli/ts_loader.js.map +1 -0
- package/dist/cli/vite_helpers.d.ts +62 -0
- package/dist/cli/vite_helpers.d.ts.map +1 -0
- package/dist/cli/vite_helpers.js +273 -0
- package/dist/cli/vite_helpers.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/player/hash_router.d.ts +23 -0
- package/dist/player/hash_router.d.ts.map +1 -0
- package/dist/player/hash_router.js +49 -0
- package/dist/player/hash_router.js.map +1 -0
- package/dist/player/hud.d.ts +33 -0
- package/dist/player/hud.d.ts.map +1 -0
- package/dist/player/hud.js +357 -0
- package/dist/player/hud.js.map +1 -0
- package/dist/player/index.d.ts +123 -0
- package/dist/player/index.d.ts.map +1 -0
- package/dist/player/index.js +848 -0
- package/dist/player/index.js.map +1 -0
- package/dist/player/input.d.ts +14 -0
- package/dist/player/input.d.ts.map +1 -0
- package/dist/player/input.js +90 -0
- package/dist/player/input.js.map +1 -0
- package/dist/player/slot.d.ts +22 -0
- package/dist/player/slot.d.ts.map +1 -0
- package/dist/player/slot.js +43 -0
- package/dist/player/slot.js.map +1 -0
- package/dist/player/transitions/cut.d.ts +7 -0
- package/dist/player/transitions/cut.d.ts.map +1 -0
- package/dist/player/transitions/cut.js +9 -0
- package/dist/player/transitions/cut.js.map +1 -0
- package/dist/player/transitions/fade.d.ts +7 -0
- package/dist/player/transitions/fade.d.ts.map +1 -0
- package/dist/player/transitions/fade.js +18 -0
- package/dist/player/transitions/fade.js.map +1 -0
- package/dist/player/transitions/index.d.ts +4 -0
- package/dist/player/transitions/index.d.ts.map +1 -0
- package/dist/player/transitions/index.js +4 -0
- package/dist/player/transitions/index.js.map +1 -0
- package/dist/player/transitions/slide.d.ts +6 -0
- package/dist/player/transitions/slide.d.ts.map +1 -0
- package/dist/player/transitions/slide.js +35 -0
- package/dist/player/transitions/slide.js.map +1 -0
- package/dist/script/index.d.ts +2 -0
- package/dist/script/index.d.ts.map +1 -0
- package/dist/script/index.js +2 -0
- package/dist/script/index.js.map +1 -0
- package/dist/script/script.d.ts +10 -0
- package/dist/script/script.d.ts.map +1 -0
- package/dist/script/script.js +41 -0
- package/dist/script/script.js.map +1 -0
- package/dist/segment/SegmentRunner.d.ts +52 -0
- package/dist/segment/SegmentRunner.d.ts.map +1 -0
- package/dist/segment/SegmentRunner.js +187 -0
- package/dist/segment/SegmentRunner.js.map +1 -0
- package/dist/segment/defineConfig.d.ts +6 -0
- package/dist/segment/defineConfig.d.ts.map +1 -0
- package/dist/segment/defineConfig.js +7 -0
- package/dist/segment/defineConfig.js.map +1 -0
- package/dist/segment/defineSegment.d.ts +7 -0
- package/dist/segment/defineSegment.d.ts.map +1 -0
- package/dist/segment/defineSegment.js +25 -0
- package/dist/segment/defineSegment.js.map +1 -0
- package/dist/segment/index.d.ts +5 -0
- package/dist/segment/index.d.ts.map +1 -0
- package/dist/segment/index.js +4 -0
- package/dist/segment/index.js.map +1 -0
- package/dist/timeline/index.d.ts +73 -0
- package/dist/timeline/index.d.ts.map +1 -0
- package/dist/timeline/index.js +142 -0
- package/dist/timeline/index.js.map +1 -0
- package/dist/timeline/loadAudioTrack.d.ts +18 -0
- package/dist/timeline/loadAudioTrack.d.ts.map +1 -0
- package/dist/timeline/loadAudioTrack.js +44 -0
- package/dist/timeline/loadAudioTrack.js.map +1 -0
- package/dist/timeline/loadVoiceover.d.ts +18 -0
- package/dist/timeline/loadVoiceover.d.ts.map +1 -0
- package/dist/timeline/loadVoiceover.js +38 -0
- package/dist/timeline/loadVoiceover.js.map +1 -0
- package/dist/timeline/resolveTiming.d.ts +28 -0
- package/dist/timeline/resolveTiming.d.ts.map +1 -0
- package/dist/timeline/resolveTiming.js +63 -0
- package/dist/timeline/resolveTiming.js.map +1 -0
- package/dist/timeline/validateTiming.d.ts +29 -0
- package/dist/timeline/validateTiming.d.ts.map +1 -0
- package/dist/timeline/validateTiming.js +62 -0
- package/dist/timeline/validateTiming.js.map +1 -0
- package/dist/types.d.ts +216 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +47 -0
- package/skill/SKILL.md +64 -0
- package/skill/assets/hello_world/PLAN.md +31 -0
- package/skill/assets/hello_world/README.md +27 -0
- package/skill/assets/hello_world/audio/audio_plan.md +14 -0
- package/skill/assets/hello_world/segments/hello_intro.ts +69 -0
- package/skill/assets/hello_world/segments/hello_outro.ts +71 -0
- package/skill/assets/hello_world/timeline.ts +15 -0
- package/skill/assets/hello_world/voiceover_script/script.md +10 -0
- package/skill/assets/install/package.json +10 -0
- package/skill/assets/install/tsconfig.json +23 -0
- package/skill/assets/styles/editorial-mono/STYLE.md +124 -0
- package/skill/assets/styles/editorial-mono/brand.md +85 -0
- package/skill/assets/styles/editorial-mono/reference/animations.jsx +752 -0
- package/skill/assets/styles/editorial-mono/reference/scenes.html +563 -0
- package/skill/assets/styles/editorial-mono/sample/bullet.ts +101 -0
- package/skill/assets/styles/editorial-mono/sample/content.ts +104 -0
- package/skill/assets/styles/editorial-mono/sample/cta.ts +113 -0
- package/skill/assets/styles/editorial-mono/sample/feature.ts +111 -0
- package/skill/assets/styles/editorial-mono/sample/grid.ts +97 -0
- package/skill/assets/styles/editorial-mono/sample/kinetic.ts +96 -0
- package/skill/assets/styles/editorial-mono/sample/section.ts +101 -0
- package/skill/assets/styles/editorial-mono/sample/stat.ts +128 -0
- package/skill/assets/styles/editorial-mono/sample/title.ts +97 -0
- package/skill/assets/styles/editorial-mono/sample/ui-showcase.ts +159 -0
- package/skill/assets/styles/editorial-mono/tokens.css +44 -0
- package/skill/assets/styles/iso-diagram/STYLE.md +109 -0
- package/skill/assets/styles/iso-diagram/brand.md +32 -0
- package/skill/assets/styles/iso-diagram/reference/animations.jsx +673 -0
- package/skill/assets/styles/iso-diagram/reference/scenes.html +427 -0
- package/skill/assets/styles/iso-diagram/sample/bullet.ts +144 -0
- package/skill/assets/styles/iso-diagram/sample/content.ts +192 -0
- package/skill/assets/styles/iso-diagram/sample/cta.ts +162 -0
- package/skill/assets/styles/iso-diagram/sample/feature.ts +205 -0
- package/skill/assets/styles/iso-diagram/sample/grid.ts +181 -0
- package/skill/assets/styles/iso-diagram/sample/kinetic.ts +102 -0
- package/skill/assets/styles/iso-diagram/sample/section.ts +149 -0
- package/skill/assets/styles/iso-diagram/sample/stat.ts +164 -0
- package/skill/assets/styles/iso-diagram/sample/title.ts +173 -0
- package/skill/assets/styles/iso-diagram/sample/ui-showcase.ts +162 -0
- package/skill/assets/styles/iso-diagram/tokens.css +40 -0
- package/skill/assets/styles/motion-engineering/STYLE.md +106 -0
- package/skill/assets/styles/motion-engineering/brand.md +29 -0
- package/skill/assets/styles/motion-engineering/reference/animations.jsx +673 -0
- package/skill/assets/styles/motion-engineering/reference/scenes.html +513 -0
- package/skill/assets/styles/motion-engineering/sample/bullet.ts +176 -0
- package/skill/assets/styles/motion-engineering/sample/content.ts +228 -0
- package/skill/assets/styles/motion-engineering/sample/cta.ts +209 -0
- package/skill/assets/styles/motion-engineering/sample/feature.ts +299 -0
- package/skill/assets/styles/motion-engineering/sample/grid.ts +190 -0
- package/skill/assets/styles/motion-engineering/sample/kinetic.ts +159 -0
- package/skill/assets/styles/motion-engineering/sample/section.ts +196 -0
- package/skill/assets/styles/motion-engineering/sample/stat.ts +230 -0
- package/skill/assets/styles/motion-engineering/sample/title.ts +219 -0
- package/skill/assets/styles/motion-engineering/sample/ui-showcase.ts +267 -0
- package/skill/assets/styles/motion-engineering/tokens.css +40 -0
- package/skill/assets/styles/neon-terminal/STYLE.md +105 -0
- package/skill/assets/styles/neon-terminal/brand.md +27 -0
- package/skill/assets/styles/neon-terminal/reference/animations.jsx +673 -0
- package/skill/assets/styles/neon-terminal/reference/scenes.html +387 -0
- package/skill/assets/styles/neon-terminal/sample/bullet.ts +113 -0
- package/skill/assets/styles/neon-terminal/sample/content.ts +117 -0
- package/skill/assets/styles/neon-terminal/sample/cta.ts +131 -0
- package/skill/assets/styles/neon-terminal/sample/feature.ts +112 -0
- package/skill/assets/styles/neon-terminal/sample/grid.ts +128 -0
- package/skill/assets/styles/neon-terminal/sample/kinetic.ts +105 -0
- package/skill/assets/styles/neon-terminal/sample/section.ts +96 -0
- package/skill/assets/styles/neon-terminal/sample/stat.ts +123 -0
- package/skill/assets/styles/neon-terminal/sample/title.ts +122 -0
- package/skill/assets/styles/neon-terminal/sample/ui-showcase.ts +127 -0
- package/skill/assets/styles/neon-terminal/tokens.css +39 -0
- package/skill/assets/styles/risograph/STYLE.md +110 -0
- package/skill/assets/styles/risograph/brand.md +26 -0
- package/skill/assets/styles/risograph/reference/animations.jsx +673 -0
- package/skill/assets/styles/risograph/reference/scenes.html +403 -0
- package/skill/assets/styles/risograph/sample/bullet.ts +124 -0
- package/skill/assets/styles/risograph/sample/content.ts +135 -0
- package/skill/assets/styles/risograph/sample/cta.ts +149 -0
- package/skill/assets/styles/risograph/sample/feature.ts +152 -0
- package/skill/assets/styles/risograph/sample/grid.ts +123 -0
- package/skill/assets/styles/risograph/sample/kinetic.ts +125 -0
- package/skill/assets/styles/risograph/sample/section.ts +130 -0
- package/skill/assets/styles/risograph/sample/stat.ts +145 -0
- package/skill/assets/styles/risograph/sample/title.ts +132 -0
- package/skill/assets/styles/risograph/sample/ui-showcase.ts +147 -0
- package/skill/assets/styles/risograph/tokens.css +39 -0
- package/skill/assets/styles/swiss-console/STYLE.md +107 -0
- package/skill/assets/styles/swiss-console/brand.md +37 -0
- package/skill/assets/styles/swiss-console/reference/animations.jsx +673 -0
- package/skill/assets/styles/swiss-console/reference/scenes.html +420 -0
- package/skill/assets/styles/swiss-console/sample/bullet.ts +122 -0
- package/skill/assets/styles/swiss-console/sample/content.ts +137 -0
- package/skill/assets/styles/swiss-console/sample/cta.ts +109 -0
- package/skill/assets/styles/swiss-console/sample/feature.ts +163 -0
- package/skill/assets/styles/swiss-console/sample/grid.ts +145 -0
- package/skill/assets/styles/swiss-console/sample/kinetic.ts +117 -0
- package/skill/assets/styles/swiss-console/sample/section.ts +127 -0
- package/skill/assets/styles/swiss-console/sample/stat.ts +148 -0
- package/skill/assets/styles/swiss-console/sample/title.ts +148 -0
- package/skill/assets/styles/swiss-console/sample/ui-showcase.ts +198 -0
- package/skill/assets/styles/swiss-console/tokens.css +39 -0
- package/skill/install/INSTALL.md +400 -0
- package/skill/references/audio/audio_plan.md +199 -0
- package/skill/references/audio/build.md +208 -0
- package/skill/references/audio/cue_template.md +219 -0
- package/skill/references/audio/ffmpeg_cookbook.md +267 -0
- package/skill/references/audio/music/music.md +171 -0
- package/skill/references/audio/music/providers/elevenlabs.md +170 -0
- package/skill/references/audio/music/providers/manual.md +140 -0
- package/skill/references/audio/music/providers/openverse.md +265 -0
- package/skill/references/audio/sfx/providers/elevenlabs.md +152 -0
- package/skill/references/audio/sfx/providers/manual.md +117 -0
- package/skill/references/audio/sfx/providers/openverse.md +243 -0
- package/skill/references/audio/sfx/sfx.md +149 -0
- package/skill/references/audio/styles.md +102 -0
- package/skill/references/audio/sync.md +237 -0
- package/skill/references/audio/voiceover/animation_sync.md +142 -0
- package/skill/references/audio/voiceover/provider_script.md +153 -0
- package/skill/references/audio/voiceover/providers/elevenlabs.md +288 -0
- package/skill/references/audio/voiceover/providers/manual.md +100 -0
- package/skill/references/audio/voiceover/script_writing.md +100 -0
- package/skill/references/audio/voiceover/style_intake.md +56 -0
- package/skill/references/audio/voiceover/sync_algorithm.md +167 -0
- package/skill/references/audio/voiceover.md +296 -0
- package/skill/references/audio.md +135 -0
- package/skill/references/authoring_segment.md +446 -0
- package/skill/references/create_or_edit_video.md +232 -0
- package/skill/references/dev_server.md +157 -0
- package/skill/references/export.md +145 -0
- package/skill/references/new_video.md +117 -0
- package/skill/references/project_structure.md +144 -0
- package/skill/references/setup.md +109 -0
- package/skill/references/setup_new_style.md +158 -0
- package/skill/references/styles.md +154 -0
- package/skill/references/testing.md +115 -0
- package/skill/references/types.md +240 -0
- package/src/cli/entry/components/copy_button.ts +42 -0
- package/src/cli/entry/components/download_modal.ts +204 -0
- package/src/cli/entry/components/empty_state.ts +55 -0
- package/src/cli/entry/components/hide_hud_tab.ts +37 -0
- package/src/cli/entry/components/icons.ts +31 -0
- package/src/cli/entry/components/top_bar.ts +69 -0
- package/src/cli/entry/components/video_card.ts +57 -0
- package/src/cli/entry/dev_frame.ts +189 -0
- package/src/cli/entry/entry_index.ts +16 -0
- package/src/cli/entry/entry_video.ts +24 -0
- package/src/cli/entry/index.html +12 -0
- package/src/cli/entry/parse_slug.ts +14 -0
- package/src/cli/entry/render.html +17 -0
- package/src/cli/entry/render_entry.ts +121 -0
- package/src/cli/entry/styles/base.css +45 -0
- package/src/cli/entry/styles/components.css +605 -0
- package/src/cli/entry/styles/tokens.css +44 -0
- package/src/cli/entry/video.html +22 -0
- package/src/cli/entry/views/homepage.ts +66 -0
- package/src/cli/entry/views/video_view.ts +286 -0
- package/src/cli/entry/virtual.d.ts +8 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
function cornerTicks() {
|
|
6
|
+
return `
|
|
7
|
+
<div style="position: absolute; left: -1px; top: -1px; width: 24px; height: 24px;">
|
|
8
|
+
<div style="position: absolute; left: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
9
|
+
<div style="position: absolute; left: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<div style="position: absolute; right: -1px; top: -1px; width: 24px; height: 24px;">
|
|
12
|
+
<div style="position: absolute; right: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
13
|
+
<div style="position: absolute; right: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
14
|
+
</div>
|
|
15
|
+
<div style="position: absolute; left: -1px; bottom: -1px; width: 24px; height: 24px;">
|
|
16
|
+
<div style="position: absolute; left: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
17
|
+
<div style="position: absolute; left: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
18
|
+
</div>
|
|
19
|
+
<div style="position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px;">
|
|
20
|
+
<div style="position: absolute; right: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
21
|
+
<div style="position: absolute; right: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
22
|
+
</div>`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default defineSegment({
|
|
26
|
+
id: "motion-engineering-sample-section",
|
|
27
|
+
advances: [2.0, 4.5],
|
|
28
|
+
voiceover:
|
|
29
|
+
"Section headers in Motion Engineering. A chapter label and title appear, then an amber line sweeps underneath.",
|
|
30
|
+
|
|
31
|
+
mount(el) {
|
|
32
|
+
host = el;
|
|
33
|
+
el.innerHTML = `
|
|
34
|
+
<div style="
|
|
35
|
+
position: relative;
|
|
36
|
+
height: 100%;
|
|
37
|
+
background: var(--color-bg);
|
|
38
|
+
color: var(--color-fg);
|
|
39
|
+
font-family: var(--font-body);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
">
|
|
42
|
+
<div data-ref="grid" style="
|
|
43
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
44
|
+
background:
|
|
45
|
+
linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
|
|
46
|
+
linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
|
|
47
|
+
"></div>
|
|
48
|
+
<div data-ref="gridPulse" style="
|
|
49
|
+
position: absolute; inset: 0; pointer-events: none; opacity: 0;
|
|
50
|
+
background:
|
|
51
|
+
linear-gradient(rgba(232,238,245,0.15) 1px, transparent 1px) 0 0 / 64px 64px,
|
|
52
|
+
linear-gradient(90deg, rgba(232,238,245,0.15) 1px, transparent 1px) 0 0 / 64px 64px;
|
|
53
|
+
"></div>
|
|
54
|
+
|
|
55
|
+
<div data-ref="frame" style="
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: var(--safe-y) var(--safe-x);
|
|
58
|
+
border: 1px solid var(--color-border);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
">
|
|
61
|
+
${cornerTicks()}
|
|
62
|
+
|
|
63
|
+
<div data-ref="chapter" style="
|
|
64
|
+
position: absolute; left: 80px; top: 180px;
|
|
65
|
+
font-family: var(--font-mono);
|
|
66
|
+
font-size: 16px;
|
|
67
|
+
letter-spacing: 0.3em;
|
|
68
|
+
color: var(--color-accent);
|
|
69
|
+
opacity: 0;
|
|
70
|
+
">—— CHAPTER 02 ———————————————————————————————</div>
|
|
71
|
+
|
|
72
|
+
<div data-ref="heading" style="
|
|
73
|
+
position: absolute; left: 80px; top: 260px;
|
|
74
|
+
font-family: var(--font-display);
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
font-size: 180px;
|
|
77
|
+
line-height: 0.98;
|
|
78
|
+
letter-spacing: -0.02em;
|
|
79
|
+
opacity: 0;
|
|
80
|
+
">The architecture.</div>
|
|
81
|
+
|
|
82
|
+
<div data-ref="sub" style="
|
|
83
|
+
position: absolute; left: 80px; top: 560px;
|
|
84
|
+
font-family: var(--font-mono);
|
|
85
|
+
font-size: 18px;
|
|
86
|
+
letter-spacing: 0.2em;
|
|
87
|
+
color: var(--color-muted);
|
|
88
|
+
opacity: 0;
|
|
89
|
+
">3 PRIMITIVES · MEMORY · REASONING · RECOVERY</div>
|
|
90
|
+
|
|
91
|
+
<svg data-ref="line" style="position: absolute; left: 80px; top: 660px; overflow: visible;" width="1500" height="12">
|
|
92
|
+
<line x1="0" y1="6" x2="1500" y2="6" stroke="var(--color-accent)" stroke-width="2" style="transform-origin: 0 6px; transform: scaleX(0);" />
|
|
93
|
+
</svg>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div data-ref="counter" style="
|
|
97
|
+
position: absolute; right: var(--safe-x); top: 28px;
|
|
98
|
+
font-family: var(--font-mono);
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
color: var(--color-muted);
|
|
101
|
+
letter-spacing: 0.1em;
|
|
102
|
+
opacity: 0;
|
|
103
|
+
">SCENE 02/10</div>
|
|
104
|
+
|
|
105
|
+
<div data-ref="coord" style="
|
|
106
|
+
position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 28px;
|
|
107
|
+
display: flex; gap: 32px;
|
|
108
|
+
font-family: var(--font-mono);
|
|
109
|
+
font-size: 12px;
|
|
110
|
+
color: var(--color-muted);
|
|
111
|
+
letter-spacing: 0.1em;
|
|
112
|
+
opacity: 0;
|
|
113
|
+
">
|
|
114
|
+
<span>X 1240.00</span><span>Y 360.00</span><span>T 0.00s</span>
|
|
115
|
+
<span style="margin-left: auto;">UNIT: PX · SCALE 1:1</span>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
`;
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
async play(ctx) {
|
|
122
|
+
const frame = host?.querySelector('[data-ref="frame"]') as HTMLElement;
|
|
123
|
+
const gridPulse = host?.querySelector('[data-ref="gridPulse"]') as HTMLElement;
|
|
124
|
+
const chapter = host?.querySelector('[data-ref="chapter"]') as HTMLElement;
|
|
125
|
+
const heading = host?.querySelector('[data-ref="heading"]') as HTMLElement;
|
|
126
|
+
const sub = host?.querySelector('[data-ref="sub"]') as HTMLElement;
|
|
127
|
+
const counter = host?.querySelector('[data-ref="counter"]') as HTMLElement;
|
|
128
|
+
const coord = host?.querySelector('[data-ref="coord"]') as HTMLElement;
|
|
129
|
+
const lineEl = host
|
|
130
|
+
?.querySelector('[data-ref="line"]')
|
|
131
|
+
?.querySelector("line") as SVGLineElement;
|
|
132
|
+
|
|
133
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
134
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
135
|
+
|
|
136
|
+
frame.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
137
|
+
...opts,
|
|
138
|
+
duration: 360,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
counter.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
142
|
+
...opts,
|
|
143
|
+
duration: 300,
|
|
144
|
+
delay: 100,
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
coord.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
148
|
+
...opts,
|
|
149
|
+
duration: 300,
|
|
150
|
+
delay: 100,
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
chapter.animate(
|
|
154
|
+
[
|
|
155
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
156
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
157
|
+
],
|
|
158
|
+
{ ...opts, duration: 360, delay: 300 },
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
heading.animate(
|
|
162
|
+
[
|
|
163
|
+
{ opacity: 0, transform: "translateY(12px)" },
|
|
164
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
165
|
+
],
|
|
166
|
+
{ ...opts, duration: 400, delay: 600 },
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
sub.animate(
|
|
170
|
+
[
|
|
171
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
172
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
173
|
+
],
|
|
174
|
+
{ ...opts, duration: 360, delay: 1000 },
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
lineEl.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
|
178
|
+
...opts,
|
|
179
|
+
duration: 600,
|
|
180
|
+
delay: 1200,
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// Grid intensifies briefly as the amber line sweeps
|
|
184
|
+
gridPulse.animate([{ opacity: 0 }, { opacity: 1 }, { opacity: 0 }], {
|
|
185
|
+
duration: 800,
|
|
186
|
+
delay: 1200,
|
|
187
|
+
easing: ease,
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
await ctx.waitForNext();
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
unmount() {
|
|
194
|
+
host = null;
|
|
195
|
+
},
|
|
196
|
+
});
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
function cornerTicks() {
|
|
6
|
+
return `
|
|
7
|
+
<div style="position: absolute; left: -1px; top: -1px; width: 24px; height: 24px;">
|
|
8
|
+
<div style="position: absolute; left: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
9
|
+
<div style="position: absolute; left: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<div style="position: absolute; right: -1px; top: -1px; width: 24px; height: 24px;">
|
|
12
|
+
<div style="position: absolute; right: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
13
|
+
<div style="position: absolute; right: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
14
|
+
</div>
|
|
15
|
+
<div style="position: absolute; left: -1px; bottom: -1px; width: 24px; height: 24px;">
|
|
16
|
+
<div style="position: absolute; left: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
17
|
+
<div style="position: absolute; left: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
18
|
+
</div>
|
|
19
|
+
<div style="position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px;">
|
|
20
|
+
<div style="position: absolute; right: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
21
|
+
<div style="position: absolute; right: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
22
|
+
</div>`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default defineSegment({
|
|
26
|
+
id: "motion-engineering-sample-stat",
|
|
27
|
+
advances: [2.5, 5.0],
|
|
28
|
+
voiceover:
|
|
29
|
+
"Stat cards in Motion Engineering. A big number ticks up while cyan dimension lines draw above and below, bracketing its size.",
|
|
30
|
+
|
|
31
|
+
mount(el) {
|
|
32
|
+
host = el;
|
|
33
|
+
el.innerHTML = `
|
|
34
|
+
<div style="
|
|
35
|
+
position: relative;
|
|
36
|
+
height: 100%;
|
|
37
|
+
background: var(--color-bg);
|
|
38
|
+
color: var(--color-fg);
|
|
39
|
+
font-family: var(--font-body);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
">
|
|
42
|
+
<div style="
|
|
43
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
44
|
+
background:
|
|
45
|
+
linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
|
|
46
|
+
linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
|
|
47
|
+
"></div>
|
|
48
|
+
|
|
49
|
+
<div data-ref="frame" style="
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: var(--safe-y) var(--safe-x);
|
|
52
|
+
border: 1px solid var(--color-border);
|
|
53
|
+
opacity: 0;
|
|
54
|
+
">
|
|
55
|
+
${cornerTicks()}
|
|
56
|
+
|
|
57
|
+
<div data-ref="label" style="
|
|
58
|
+
position: absolute; left: 80px; top: 100px;
|
|
59
|
+
font-family: var(--font-mono);
|
|
60
|
+
font-size: 13px;
|
|
61
|
+
letter-spacing: 0.25em;
|
|
62
|
+
color: var(--color-accent);
|
|
63
|
+
opacity: 0;
|
|
64
|
+
">◢ FIG. 05.1 · FAILURE_RATE(step > 4)</div>
|
|
65
|
+
|
|
66
|
+
<div style="position: absolute; left: 80px; top: 200px; width: 1100px;">
|
|
67
|
+
<svg data-ref="dimtop" style="width: 100%; height: 36px; overflow: visible; display: block;">
|
|
68
|
+
<line x1="0" y1="18" x2="1100" y2="18" stroke="var(--cyan)" stroke-width="1.5" style="transform-origin: 0 18px; transform: scaleX(0);" />
|
|
69
|
+
<line x1="0" y1="6" x2="0" y2="30" stroke="var(--cyan)" stroke-width="1.5" style="opacity: 0;" />
|
|
70
|
+
<line x1="1100" y1="6" x2="1100" y2="30" stroke="var(--cyan)" stroke-width="1.5" style="opacity: 0;" />
|
|
71
|
+
</svg>
|
|
72
|
+
|
|
73
|
+
<div data-ref="number" style="
|
|
74
|
+
font-family: var(--font-display);
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
font-size: 360px;
|
|
77
|
+
line-height: 1.0;
|
|
78
|
+
margin: 20px 0;
|
|
79
|
+
color: var(--color-accent);
|
|
80
|
+
font-variant-numeric: tabular-nums;
|
|
81
|
+
"><span data-ref="digits">0</span><span style="font-size: 180px;">%</span></div>
|
|
82
|
+
|
|
83
|
+
<svg data-ref="dimbot" style="width: 100%; height: 36px; overflow: visible; display: block;">
|
|
84
|
+
<line x1="0" y1="18" x2="1100" y2="18" stroke="var(--cyan)" stroke-width="1.5" style="transform-origin: 0 18px; transform: scaleX(0);" />
|
|
85
|
+
<line x1="0" y1="6" x2="0" y2="30" stroke="var(--cyan)" stroke-width="1.5" style="opacity: 0;" />
|
|
86
|
+
<line x1="1100" y1="6" x2="1100" y2="30" stroke="var(--cyan)" stroke-width="1.5" style="opacity: 0;" />
|
|
87
|
+
</svg>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div data-ref="caption" style="
|
|
91
|
+
position: absolute; right: 80px; top: 320px; width: 600px;
|
|
92
|
+
opacity: 0;
|
|
93
|
+
">
|
|
94
|
+
<div style="
|
|
95
|
+
font-family: var(--font-mono);
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
letter-spacing: 0.25em;
|
|
98
|
+
color: var(--color-muted);
|
|
99
|
+
margin-bottom: 18px;
|
|
100
|
+
">—— CAPTION ——</div>
|
|
101
|
+
<div style="font-size: 28px; line-height: 1.35;">of agent failures occur after the 4th tool call.</div>
|
|
102
|
+
<div style="
|
|
103
|
+
font-family: var(--font-mono);
|
|
104
|
+
font-size: 13px;
|
|
105
|
+
margin-top: 24px;
|
|
106
|
+
letter-spacing: 0.15em;
|
|
107
|
+
color: var(--color-muted);
|
|
108
|
+
">SOURCE: BEACON.LOGS · N=12,840 · Q1·2026</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div data-ref="coord" style="
|
|
113
|
+
position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 28px;
|
|
114
|
+
display: flex; gap: 32px;
|
|
115
|
+
font-family: var(--font-mono);
|
|
116
|
+
font-size: 12px;
|
|
117
|
+
color: var(--color-muted);
|
|
118
|
+
letter-spacing: 0.1em;
|
|
119
|
+
opacity: 0;
|
|
120
|
+
">
|
|
121
|
+
<span>X 1240.00</span><span>Y 360.00</span><span>T 0.00s</span>
|
|
122
|
+
<span style="margin-left: auto;">UNIT: PX · SCALE 1:1</span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
`;
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
async play(ctx) {
|
|
129
|
+
const frame = host?.querySelector('[data-ref="frame"]') as HTMLElement;
|
|
130
|
+
const label = host?.querySelector('[data-ref="label"]') as HTMLElement;
|
|
131
|
+
const digits = host?.querySelector('[data-ref="digits"]') as HTMLElement;
|
|
132
|
+
const caption = host?.querySelector('[data-ref="caption"]') as HTMLElement;
|
|
133
|
+
const coord = host?.querySelector('[data-ref="coord"]') as HTMLElement;
|
|
134
|
+
|
|
135
|
+
const dimTopSvg = host?.querySelector('[data-ref="dimtop"]') as SVGElement;
|
|
136
|
+
const dimTopLine = dimTopSvg?.querySelector("line:nth-child(1)") as SVGLineElement;
|
|
137
|
+
const dimTopTickL = dimTopSvg?.querySelector("line:nth-child(2)") as SVGLineElement;
|
|
138
|
+
const dimTopTickR = dimTopSvg?.querySelector("line:nth-child(3)") as SVGLineElement;
|
|
139
|
+
|
|
140
|
+
const dimBotSvg = host?.querySelector('[data-ref="dimbot"]') as SVGElement;
|
|
141
|
+
const dimBotLine = dimBotSvg?.querySelector("line:nth-child(1)") as SVGLineElement;
|
|
142
|
+
const dimBotTickL = dimBotSvg?.querySelector("line:nth-child(2)") as SVGLineElement;
|
|
143
|
+
const dimBotTickR = dimBotSvg?.querySelector("line:nth-child(3)") as SVGLineElement;
|
|
144
|
+
|
|
145
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
146
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
147
|
+
|
|
148
|
+
frame.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
149
|
+
...opts,
|
|
150
|
+
duration: 360,
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
coord.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
154
|
+
...opts,
|
|
155
|
+
duration: 300,
|
|
156
|
+
delay: 100,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
label.animate(
|
|
160
|
+
[
|
|
161
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
162
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
163
|
+
],
|
|
164
|
+
{ ...opts, duration: 300, delay: 200 },
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
dimTopLine.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
|
168
|
+
...opts,
|
|
169
|
+
duration: 600,
|
|
170
|
+
delay: 400,
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
dimTopTickL.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
174
|
+
...opts,
|
|
175
|
+
duration: 200,
|
|
176
|
+
delay: 400,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
dimTopTickR.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
180
|
+
...opts,
|
|
181
|
+
duration: 200,
|
|
182
|
+
delay: 800,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// Count up from 0 to 84 over 720ms using stepped holds.
|
|
186
|
+
// Counter/ticker animations are discrete text changes that cannot use WAAPI,
|
|
187
|
+
// so a ctx.hold loop with DOM text updates is the correct pattern.
|
|
188
|
+
const target = 84;
|
|
189
|
+
const steps = 24;
|
|
190
|
+
const stepDuration = 720 / steps;
|
|
191
|
+
await ctx.hold(500);
|
|
192
|
+
for (let i = 1; i <= steps; i++) {
|
|
193
|
+
const progress = i / steps;
|
|
194
|
+
const eased = 1 - (1 - progress) ** 3;
|
|
195
|
+
digits.textContent = String(Math.round(eased * target));
|
|
196
|
+
await ctx.hold(stepDuration);
|
|
197
|
+
}
|
|
198
|
+
digits.textContent = String(target);
|
|
199
|
+
|
|
200
|
+
dimBotLine.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
|
201
|
+
...opts,
|
|
202
|
+
duration: 600,
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
dimBotTickL.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
206
|
+
...opts,
|
|
207
|
+
duration: 200,
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
dimBotTickR.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
211
|
+
...opts,
|
|
212
|
+
duration: 200,
|
|
213
|
+
delay: 400,
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
caption.animate(
|
|
217
|
+
[
|
|
218
|
+
{ opacity: 0, transform: "translateX(32px)" },
|
|
219
|
+
{ opacity: 1, transform: "translateX(0)" },
|
|
220
|
+
],
|
|
221
|
+
{ ...opts, duration: 360, delay: 200 },
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
await ctx.waitForNext();
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
unmount() {
|
|
228
|
+
host = null;
|
|
229
|
+
},
|
|
230
|
+
});
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
function cornerTicks() {
|
|
6
|
+
return `
|
|
7
|
+
<div style="position: absolute; left: -1px; top: -1px; width: 24px; height: 24px;">
|
|
8
|
+
<div style="position: absolute; left: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
9
|
+
<div style="position: absolute; left: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<div style="position: absolute; right: -1px; top: -1px; width: 24px; height: 24px;">
|
|
12
|
+
<div style="position: absolute; right: 0; top: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
13
|
+
<div style="position: absolute; right: 0; top: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
14
|
+
</div>
|
|
15
|
+
<div style="position: absolute; left: -1px; bottom: -1px; width: 24px; height: 24px;">
|
|
16
|
+
<div style="position: absolute; left: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
17
|
+
<div style="position: absolute; left: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
18
|
+
</div>
|
|
19
|
+
<div style="position: absolute; right: -1px; bottom: -1px; width: 24px; height: 24px;">
|
|
20
|
+
<div style="position: absolute; right: 0; bottom: 0; width: 24px; height: 1.5px; background: var(--color-accent);"></div>
|
|
21
|
+
<div style="position: absolute; right: 0; bottom: 0; width: 1.5px; height: 24px; background: var(--color-accent);"></div>
|
|
22
|
+
</div>`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default defineSegment({
|
|
26
|
+
id: "motion-engineering-sample-title",
|
|
27
|
+
advances: [2.5, 5.0],
|
|
28
|
+
voiceover:
|
|
29
|
+
"Title cards in Motion Engineering. A crosshair tracks to center, dimension lines bracket the title, and a coordinate label appears below.",
|
|
30
|
+
|
|
31
|
+
mount(el) {
|
|
32
|
+
host = el;
|
|
33
|
+
el.innerHTML = `
|
|
34
|
+
<div style="
|
|
35
|
+
position: relative;
|
|
36
|
+
height: 100%;
|
|
37
|
+
background: var(--color-bg);
|
|
38
|
+
color: var(--color-fg);
|
|
39
|
+
font-family: var(--font-body);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
">
|
|
42
|
+
<div style="
|
|
43
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
44
|
+
background:
|
|
45
|
+
linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
|
|
46
|
+
linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
|
|
47
|
+
"></div>
|
|
48
|
+
|
|
49
|
+
<div data-ref="frame" style="
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: var(--safe-y) var(--safe-x);
|
|
52
|
+
border: 1px solid var(--color-border);
|
|
53
|
+
opacity: 0;
|
|
54
|
+
">
|
|
55
|
+
${cornerTicks()}
|
|
56
|
+
|
|
57
|
+
<div data-ref="tag" style="
|
|
58
|
+
position: absolute; left: 80px; top: 100px;
|
|
59
|
+
font-family: var(--font-mono);
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
letter-spacing: 0.25em;
|
|
62
|
+
color: var(--color-accent);
|
|
63
|
+
opacity: 0;
|
|
64
|
+
">◢ DOCUMENT 01 · TITLE</div>
|
|
65
|
+
|
|
66
|
+
<div data-ref="headline" style="
|
|
67
|
+
position: absolute; left: 80px; top: 220px;
|
|
68
|
+
font-family: var(--font-display);
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
font-size: 200px;
|
|
71
|
+
line-height: 0.98;
|
|
72
|
+
letter-spacing: -0.02em;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
">Beacon</div>
|
|
75
|
+
|
|
76
|
+
<div data-ref="subtitle" style="
|
|
77
|
+
position: absolute; left: 80px; top: 480px;
|
|
78
|
+
font-family: var(--font-display);
|
|
79
|
+
font-size: 56px;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
color: var(--color-muted);
|
|
82
|
+
opacity: 0;
|
|
83
|
+
">Memory · Reasoning · Recovery</div>
|
|
84
|
+
|
|
85
|
+
<svg data-ref="dimline" style="position: absolute; left: 80px; top: 580px; overflow: visible;" width="1500" height="60">
|
|
86
|
+
<line x1="0" y1="20" x2="1500" y2="20" stroke="var(--cyan)" stroke-width="1.5" style="transform-origin: 0 20px; transform: scaleX(0);" />
|
|
87
|
+
<line x1="0" y1="10" x2="0" y2="30" stroke="var(--cyan)" stroke-width="1.5" style="opacity: 0;" />
|
|
88
|
+
<line x1="1500" y1="10" x2="1500" y2="30" stroke="var(--cyan)" stroke-width="1.5" style="opacity: 0;" />
|
|
89
|
+
<text x="750" y="48" fill="var(--cyan)" font-family="var(--font-mono)" font-size="14" text-anchor="middle" style="opacity: 0;">1500.00 PX</text>
|
|
90
|
+
</svg>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<svg data-ref="crosshair" style="position: absolute; left: 50%; top: 38%; width: 60px; height: 60px; transform: translate(-50%, -50%); overflow: visible;">
|
|
94
|
+
<line x1="0" y1="30" x2="60" y2="30" stroke="var(--color-accent)" stroke-width="1.5" style="transform-origin: 30px 30px; transform: scaleX(0);" />
|
|
95
|
+
<line x1="30" y1="0" x2="30" y2="60" stroke="var(--color-accent)" stroke-width="1.5" style="transform-origin: 30px 30px; transform: scaleY(0);" />
|
|
96
|
+
<circle cx="30" cy="30" r="6" fill="none" stroke="var(--color-accent)" stroke-width="1.5" style="transform-origin: 30px 30px; transform: scale(0);" />
|
|
97
|
+
</svg>
|
|
98
|
+
|
|
99
|
+
<div data-ref="coord" style="
|
|
100
|
+
position: absolute; left: var(--safe-x); right: var(--safe-x); bottom: 28px;
|
|
101
|
+
display: flex; gap: 32px;
|
|
102
|
+
font-family: var(--font-mono);
|
|
103
|
+
font-size: 12px;
|
|
104
|
+
color: var(--color-muted);
|
|
105
|
+
letter-spacing: 0.1em;
|
|
106
|
+
opacity: 0;
|
|
107
|
+
">
|
|
108
|
+
<span>X 1240.00</span><span>Y 360.00</span><span>T 0.00s</span>
|
|
109
|
+
<span style="margin-left: auto;">UNIT: PX · SCALE 1:1</span>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
`;
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
async play(ctx) {
|
|
116
|
+
const frame = host?.querySelector('[data-ref="frame"]') as HTMLElement;
|
|
117
|
+
const tag = host?.querySelector('[data-ref="tag"]') as HTMLElement;
|
|
118
|
+
const headline = host?.querySelector('[data-ref="headline"]') as HTMLElement;
|
|
119
|
+
const subtitle = host?.querySelector('[data-ref="subtitle"]') as HTMLElement;
|
|
120
|
+
const coord = host?.querySelector('[data-ref="coord"]') as HTMLElement;
|
|
121
|
+
|
|
122
|
+
const crosshairSvg = host?.querySelector('[data-ref="crosshair"]') as SVGElement;
|
|
123
|
+
const chLineH = crosshairSvg?.querySelector("line:nth-child(1)") as SVGLineElement;
|
|
124
|
+
const chLineV = crosshairSvg?.querySelector("line:nth-child(2)") as SVGLineElement;
|
|
125
|
+
const chCircle = crosshairSvg?.querySelector("circle") as SVGCircleElement;
|
|
126
|
+
|
|
127
|
+
const dimSvg = host?.querySelector('[data-ref="dimline"]') as SVGElement;
|
|
128
|
+
const dimMain = dimSvg?.querySelector("line:nth-child(1)") as SVGLineElement;
|
|
129
|
+
const dimTickL = dimSvg?.querySelector("line:nth-child(2)") as SVGLineElement;
|
|
130
|
+
const dimTickR = dimSvg?.querySelector("line:nth-child(3)") as SVGLineElement;
|
|
131
|
+
const dimLabel = dimSvg?.querySelector("text") as SVGTextElement;
|
|
132
|
+
|
|
133
|
+
const ease = "cubic-bezier(0.2, 0.8, 0.2, 1)";
|
|
134
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
135
|
+
|
|
136
|
+
frame.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
137
|
+
...opts,
|
|
138
|
+
duration: 360,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
coord.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
142
|
+
...opts,
|
|
143
|
+
duration: 360,
|
|
144
|
+
delay: 100,
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
chLineH.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
|
148
|
+
...opts,
|
|
149
|
+
duration: 400,
|
|
150
|
+
delay: 300,
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
chLineV.animate([{ transform: "scaleY(0)" }, { transform: "scaleY(1)" }], {
|
|
154
|
+
...opts,
|
|
155
|
+
duration: 400,
|
|
156
|
+
delay: 350,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
chCircle.animate([{ transform: "scale(0)" }, { transform: "scale(1)" }], {
|
|
160
|
+
...opts,
|
|
161
|
+
duration: 300,
|
|
162
|
+
delay: 500,
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
tag.animate(
|
|
166
|
+
[
|
|
167
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
168
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
169
|
+
],
|
|
170
|
+
{ ...opts, duration: 360, delay: 500 },
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
headline.animate(
|
|
174
|
+
[
|
|
175
|
+
{ opacity: 0, transform: "translateY(12px)" },
|
|
176
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
177
|
+
],
|
|
178
|
+
{ ...opts, duration: 400, delay: 700 },
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
subtitle.animate(
|
|
182
|
+
[
|
|
183
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
184
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
185
|
+
],
|
|
186
|
+
{ ...opts, duration: 360, delay: 1000 },
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
dimMain.animate([{ transform: "scaleX(0)" }, { transform: "scaleX(1)" }], {
|
|
190
|
+
...opts,
|
|
191
|
+
duration: 600,
|
|
192
|
+
delay: 1300,
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
dimTickL.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
196
|
+
...opts,
|
|
197
|
+
duration: 200,
|
|
198
|
+
delay: 1300,
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
dimTickR.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
202
|
+
...opts,
|
|
203
|
+
duration: 200,
|
|
204
|
+
delay: 1700,
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
dimLabel.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
208
|
+
...opts,
|
|
209
|
+
duration: 300,
|
|
210
|
+
delay: 1900,
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
await ctx.waitForNext();
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
unmount() {
|
|
217
|
+
host = null;
|
|
218
|
+
},
|
|
219
|
+
});
|