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,192 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "iso-diagram-sample-content",
|
|
7
|
+
advances: [2.5, 5.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"Content cards in Iso Diagram. A body paragraph with a key phrase underlined by a hand-drawn stroke, and a small isometric illustration to the side.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
font-family: var(--font-body);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
">
|
|
22
|
+
<div style="
|
|
23
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
24
|
+
background-image: radial-gradient(circle, rgba(42,38,32,0.10) 1px, transparent 1.6px);
|
|
25
|
+
background-size: 32px 32px;
|
|
26
|
+
"></div>
|
|
27
|
+
|
|
28
|
+
<div data-ref="heading" style="
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 140px;
|
|
31
|
+
top: 180px;
|
|
32
|
+
opacity: 0;
|
|
33
|
+
">
|
|
34
|
+
<div style="font-family: var(--font-display); font-size: 130px;">What we believe.</div>
|
|
35
|
+
<svg style="margin-top: 8px;" width="520" height="14">
|
|
36
|
+
<path data-ref="headingUnderline" d="M 0 6 q 86 -8 172 0 t 172 0 t 172 0" stroke="var(--color-accent)" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-dasharray="600" stroke-dashoffset="600" />
|
|
37
|
+
</svg>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div style="
|
|
41
|
+
position: absolute;
|
|
42
|
+
left: 140px;
|
|
43
|
+
right: 140px;
|
|
44
|
+
top: 440px;
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-template-columns: 1.4fr 1fr;
|
|
47
|
+
gap: 64px;
|
|
48
|
+
">
|
|
49
|
+
<div data-ref="body" style="opacity: 0;">
|
|
50
|
+
<div style="font-family: var(--font-body); font-size: 34px; line-height: 1.5;">
|
|
51
|
+
The next decade of AI is not about
|
|
52
|
+
<span style="position: relative; display: inline-block;">bigger models
|
|
53
|
+
<svg style="position: absolute; left: 0; right: 0; bottom: -10px; width: 100%;" height="14">
|
|
54
|
+
<path data-ref="phraseUnderline" d="M 4 8 q 60 -8 120 0 t 120 0" stroke="var(--color-accent)" stroke-width="2.8" fill="none" stroke-linecap="round" stroke-dasharray="300" stroke-dashoffset="300" />
|
|
55
|
+
</svg>
|
|
56
|
+
</span>.
|
|
57
|
+
</div>
|
|
58
|
+
<div style="font-family: var(--font-body); font-size: 30px; line-height: 1.5; margin-top: 32px; color: var(--color-muted);">
|
|
59
|
+
It's about agents that can <span style="color: var(--color-accent);">run long enough to matter</span> — and the unglamorous infrastructure that lets them.
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div data-ref="illustration" style="opacity: 0;">
|
|
64
|
+
<svg width="100%" height="380" style="overflow: visible;">
|
|
65
|
+
<g transform="translate(120,80)">
|
|
66
|
+
<polygon data-ref="isoTop0" points="0,40 80,0 160,40 80,80" fill="var(--fill-blue)" opacity="0" />
|
|
67
|
+
<polygon data-ref="isoLeft0" points="0,40 80,80 80,120 0,80" fill="var(--fill-blue)" opacity="0" />
|
|
68
|
+
<polygon data-ref="isoRight0" points="80,80 160,40 160,80 80,120" fill="var(--fill-blue)" opacity="0" />
|
|
69
|
+
<path data-ref="isoOutline0" d="M0,40 L80,0 L160,40 L80,80 Z M0,40 L80,80 L80,120 L0,80 Z M80,80 L160,40 L160,80 L80,120" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="700" stroke-dashoffset="700" />
|
|
70
|
+
</g>
|
|
71
|
+
<g transform="translate(200,120)">
|
|
72
|
+
<polygon data-ref="isoTop1" points="0,40 80,0 160,40 80,80" fill="var(--fill-yellow)" opacity="0" />
|
|
73
|
+
<polygon data-ref="isoLeft1" points="0,40 80,80 80,120 0,80" fill="var(--fill-yellow)" opacity="0" />
|
|
74
|
+
<polygon data-ref="isoRight1" points="80,80 160,40 160,80 80,120" fill="var(--fill-yellow)" opacity="0" />
|
|
75
|
+
<path data-ref="isoOutline1" d="M0,40 L80,0 L160,40 L80,80 Z M0,40 L80,80 L80,120 L0,80 Z M80,80 L160,40 L160,80 L80,120" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="700" stroke-dashoffset="700" />
|
|
76
|
+
</g>
|
|
77
|
+
<g transform="translate(40,120)">
|
|
78
|
+
<polygon data-ref="isoTop2" points="0,40 80,0 160,40 80,80" fill="var(--fill-pink)" opacity="0" />
|
|
79
|
+
<polygon data-ref="isoLeft2" points="0,40 80,80 80,120 0,80" fill="var(--fill-pink)" opacity="0" />
|
|
80
|
+
<polygon data-ref="isoRight2" points="80,80 160,40 160,80 80,120" fill="var(--fill-pink)" opacity="0" />
|
|
81
|
+
<path data-ref="isoOutline2" d="M0,40 L80,0 L160,40 L80,80 Z M0,40 L80,80 L80,120 L0,80 Z M80,80 L160,40 L160,80 L80,120" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="700" stroke-dashoffset="700" />
|
|
82
|
+
</g>
|
|
83
|
+
<path data-ref="leaderLine" d="M 280 260 Q 310 230 420 340" stroke="var(--color-accent)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-dasharray="250" stroke-dashoffset="250" />
|
|
84
|
+
<text data-ref="leaderText" x="430" y="345" font-family="var(--font-display)" font-size="40" fill="var(--color-accent)" transform="rotate(-3 430 345)" opacity="0">us, building.</text>
|
|
85
|
+
</svg>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div data-ref="counter" style="
|
|
90
|
+
position: absolute;
|
|
91
|
+
right: var(--safe-x);
|
|
92
|
+
top: 36px;
|
|
93
|
+
font-family: var(--font-display);
|
|
94
|
+
font-size: 28px;
|
|
95
|
+
color: var(--color-muted);
|
|
96
|
+
transform: rotate(-2deg);
|
|
97
|
+
opacity: 0;
|
|
98
|
+
">~ scene 9 of 10 ~</div>
|
|
99
|
+
</div>
|
|
100
|
+
`;
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
async play(ctx) {
|
|
104
|
+
const heading = host?.querySelector('[data-ref="heading"]') as HTMLElement;
|
|
105
|
+
const headingUnderline = host?.querySelector('[data-ref="headingUnderline"]') as SVGPathElement;
|
|
106
|
+
const body = host?.querySelector('[data-ref="body"]') as HTMLElement;
|
|
107
|
+
const phraseUnderline = host?.querySelector('[data-ref="phraseUnderline"]') as SVGPathElement;
|
|
108
|
+
const illustration = host?.querySelector('[data-ref="illustration"]') as HTMLElement;
|
|
109
|
+
const leaderLine = host?.querySelector('[data-ref="leaderLine"]') as SVGPathElement;
|
|
110
|
+
const leaderText = host?.querySelector('[data-ref="leaderText"]') as SVGTextElement;
|
|
111
|
+
const counter = host?.querySelector('[data-ref="counter"]') as HTMLElement;
|
|
112
|
+
|
|
113
|
+
const ease = "cubic-bezier(0.34, 1.2, 0.64, 1)";
|
|
114
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
115
|
+
|
|
116
|
+
counter.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 300 });
|
|
117
|
+
|
|
118
|
+
heading.animate(
|
|
119
|
+
[
|
|
120
|
+
{ opacity: 0, transform: "translateY(12px)" },
|
|
121
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
122
|
+
],
|
|
123
|
+
{ ...opts, duration: 350, delay: 300 },
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
headingUnderline.animate([{ strokeDashoffset: "600" }, { strokeDashoffset: "0" }], {
|
|
127
|
+
...opts,
|
|
128
|
+
duration: 500,
|
|
129
|
+
delay: 700,
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
body.animate(
|
|
133
|
+
[
|
|
134
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
135
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
136
|
+
],
|
|
137
|
+
{ ...opts, duration: 400, delay: 800 },
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
phraseUnderline.animate([{ strokeDashoffset: "300" }, { strokeDashoffset: "0" }], {
|
|
141
|
+
...opts,
|
|
142
|
+
duration: 500,
|
|
143
|
+
delay: 1300,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
illustration.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 300, delay: 1400 });
|
|
147
|
+
|
|
148
|
+
// Draw iso cube outlines and flood fills
|
|
149
|
+
for (let i = 0; i < 3; i++) {
|
|
150
|
+
const outline = host?.querySelector(`[data-ref="isoOutline${i}"]`) as SVGPathElement;
|
|
151
|
+
const top = host?.querySelector(`[data-ref="isoTop${i}"]`) as SVGPolygonElement;
|
|
152
|
+
const left = host?.querySelector(`[data-ref="isoLeft${i}"]`) as SVGPolygonElement;
|
|
153
|
+
const right = host?.querySelector(`[data-ref="isoRight${i}"]`) as SVGPolygonElement;
|
|
154
|
+
|
|
155
|
+
const base = 1400 + i * 200;
|
|
156
|
+
outline.animate([{ strokeDashoffset: "700" }, { strokeDashoffset: "0" }], {
|
|
157
|
+
...opts,
|
|
158
|
+
duration: 500,
|
|
159
|
+
delay: base,
|
|
160
|
+
});
|
|
161
|
+
top.animate([{ opacity: 0 }, { opacity: 0.9 }], {
|
|
162
|
+
...opts,
|
|
163
|
+
duration: 400,
|
|
164
|
+
delay: base + 400,
|
|
165
|
+
});
|
|
166
|
+
left.animate([{ opacity: 0 }, { opacity: 0.65 }], {
|
|
167
|
+
...opts,
|
|
168
|
+
duration: 400,
|
|
169
|
+
delay: base + 450,
|
|
170
|
+
});
|
|
171
|
+
right.animate([{ opacity: 0 }, { opacity: 0.5 }], {
|
|
172
|
+
...opts,
|
|
173
|
+
duration: 400,
|
|
174
|
+
delay: base + 450,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Leader line and label
|
|
179
|
+
leaderLine.animate([{ strokeDashoffset: "250" }, { strokeDashoffset: "0" }], {
|
|
180
|
+
...opts,
|
|
181
|
+
duration: 500,
|
|
182
|
+
delay: 2200,
|
|
183
|
+
});
|
|
184
|
+
leaderText.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 300, delay: 2600 });
|
|
185
|
+
|
|
186
|
+
await ctx.waitForNext();
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
unmount() {
|
|
190
|
+
host = null;
|
|
191
|
+
},
|
|
192
|
+
});
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "iso-diagram-sample-cta",
|
|
7
|
+
advances: [2.5, 5.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"CTA cards in Iso Diagram. A hand-drawn rectangle draws itself on screen, then the call-to-action text appears inside with a small isometric icon below.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
font-family: var(--font-body);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
">
|
|
22
|
+
<div style="
|
|
23
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
24
|
+
background-image: radial-gradient(circle, rgba(42,38,32,0.10) 1px, transparent 1.6px);
|
|
25
|
+
background-size: 32px 32px;
|
|
26
|
+
"></div>
|
|
27
|
+
|
|
28
|
+
<div data-ref="prompt" style="
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
top: 240px;
|
|
33
|
+
text-align: center;
|
|
34
|
+
font-family: var(--font-display);
|
|
35
|
+
font-size: 56px;
|
|
36
|
+
color: var(--color-muted);
|
|
37
|
+
opacity: 0;
|
|
38
|
+
transform: rotate(-1deg);
|
|
39
|
+
">Try it</div>
|
|
40
|
+
|
|
41
|
+
<div style="position: absolute; left: 50%; top: 380px; transform: translateX(-50%);">
|
|
42
|
+
<svg width="1100" height="280" style="overflow: visible;">
|
|
43
|
+
<path data-ref="ctaBox" d="M 20 40 L 1080 30 L 1060 240 L 30 230 Z" stroke="var(--color-accent)" stroke-width="3.5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="3000" stroke-dashoffset="3000" />
|
|
44
|
+
</svg>
|
|
45
|
+
<div data-ref="ctaText" style="
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset: 0;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
font-family: var(--font-display);
|
|
52
|
+
font-size: 160px;
|
|
53
|
+
color: var(--color-accent);
|
|
54
|
+
opacity: 0;
|
|
55
|
+
">beacon.run</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<svg data-ref="iconSvg" style="position: absolute; left: 50%; top: 720px; transform: translateX(-50%); overflow: visible; opacity: 0;" width="240" height="240">
|
|
59
|
+
<g transform="translate(40,40)">
|
|
60
|
+
<polygon data-ref="iconTop" points="0,35 70,0 140,35 70,70" fill="var(--fill-yellow)" opacity="0" />
|
|
61
|
+
<polygon data-ref="iconLeft" points="0,35 70,70 70,105 0,70" fill="var(--fill-yellow)" opacity="0" />
|
|
62
|
+
<polygon data-ref="iconRight" points="70,70 140,35 140,70 70,105" fill="var(--fill-yellow)" opacity="0" />
|
|
63
|
+
<path data-ref="iconOutline" d="M0,35 L70,0 L140,35 L70,70 Z M0,35 L70,70 L70,105 L0,70 Z M70,70 L140,35 L140,70 L70,105" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="600" stroke-dashoffset="600" />
|
|
64
|
+
</g>
|
|
65
|
+
</svg>
|
|
66
|
+
|
|
67
|
+
<div data-ref="tagline" style="
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
bottom: 100px;
|
|
72
|
+
text-align: center;
|
|
73
|
+
font-family: var(--font-display);
|
|
74
|
+
font-size: 40px;
|
|
75
|
+
color: var(--color-muted);
|
|
76
|
+
transform: rotate(-2deg);
|
|
77
|
+
opacity: 0;
|
|
78
|
+
">~ beacon · may 2026 ~</div>
|
|
79
|
+
|
|
80
|
+
<div data-ref="counter" style="
|
|
81
|
+
position: absolute;
|
|
82
|
+
right: var(--safe-x);
|
|
83
|
+
top: 36px;
|
|
84
|
+
font-family: var(--font-display);
|
|
85
|
+
font-size: 28px;
|
|
86
|
+
color: var(--color-muted);
|
|
87
|
+
transform: rotate(-2deg);
|
|
88
|
+
opacity: 0;
|
|
89
|
+
">~ scene 10 of 10 ~</div>
|
|
90
|
+
</div>
|
|
91
|
+
`;
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
async play(ctx) {
|
|
95
|
+
const prompt = host?.querySelector('[data-ref="prompt"]') as HTMLElement;
|
|
96
|
+
const ctaBox = host?.querySelector('[data-ref="ctaBox"]') as SVGPathElement;
|
|
97
|
+
const ctaText = host?.querySelector('[data-ref="ctaText"]') as HTMLElement;
|
|
98
|
+
const iconSvg = host?.querySelector('[data-ref="iconSvg"]') as SVGElement;
|
|
99
|
+
const iconOutline = host?.querySelector('[data-ref="iconOutline"]') as SVGPathElement;
|
|
100
|
+
const iconTop = host?.querySelector('[data-ref="iconTop"]') as SVGPolygonElement;
|
|
101
|
+
const iconLeft = host?.querySelector('[data-ref="iconLeft"]') as SVGPolygonElement;
|
|
102
|
+
const iconRight = host?.querySelector('[data-ref="iconRight"]') as SVGPolygonElement;
|
|
103
|
+
const tagline = host?.querySelector('[data-ref="tagline"]') as HTMLElement;
|
|
104
|
+
const counter = host?.querySelector('[data-ref="counter"]') as HTMLElement;
|
|
105
|
+
|
|
106
|
+
const ease = "cubic-bezier(0.34, 1.2, 0.64, 1)";
|
|
107
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
108
|
+
|
|
109
|
+
counter.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 300 });
|
|
110
|
+
|
|
111
|
+
// Prompt swings in
|
|
112
|
+
prompt.animate(
|
|
113
|
+
[
|
|
114
|
+
{ opacity: 0, transform: "rotate(-3deg) translateY(12px)" },
|
|
115
|
+
{ opacity: 1, transform: "rotate(-1deg) translateY(0)" },
|
|
116
|
+
],
|
|
117
|
+
{ ...opts, duration: 300, delay: 200 },
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
// CTA box draws on
|
|
121
|
+
ctaBox.animate([{ strokeDashoffset: "3000" }, { strokeDashoffset: "0" }], {
|
|
122
|
+
...opts,
|
|
123
|
+
duration: 900,
|
|
124
|
+
delay: 500,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// CTA text appears inside
|
|
128
|
+
ctaText.animate(
|
|
129
|
+
[
|
|
130
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
131
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
132
|
+
],
|
|
133
|
+
{ ...opts, duration: 400, delay: 1200 },
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
// Small iso icon: outline draws then fills flood
|
|
137
|
+
iconSvg.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 200, delay: 1600 });
|
|
138
|
+
iconOutline.animate([{ strokeDashoffset: "600" }, { strokeDashoffset: "0" }], {
|
|
139
|
+
...opts,
|
|
140
|
+
duration: 500,
|
|
141
|
+
delay: 1600,
|
|
142
|
+
});
|
|
143
|
+
iconTop.animate([{ opacity: 0 }, { opacity: 0.95 }], { ...opts, duration: 400, delay: 2000 });
|
|
144
|
+
iconLeft.animate([{ opacity: 0 }, { opacity: 0.7 }], { ...opts, duration: 400, delay: 2050 });
|
|
145
|
+
iconRight.animate([{ opacity: 0 }, { opacity: 0.55 }], { ...opts, duration: 400, delay: 2050 });
|
|
146
|
+
|
|
147
|
+
// Tagline
|
|
148
|
+
tagline.animate(
|
|
149
|
+
[
|
|
150
|
+
{ opacity: 0, transform: "rotate(-4deg) translateY(8px)" },
|
|
151
|
+
{ opacity: 1, transform: "rotate(-2deg) translateY(0)" },
|
|
152
|
+
],
|
|
153
|
+
{ ...opts, duration: 350, delay: 2200 },
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
await ctx.waitForNext();
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
unmount() {
|
|
160
|
+
host = null;
|
|
161
|
+
},
|
|
162
|
+
});
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { defineSegment } from "videowright";
|
|
2
|
+
|
|
3
|
+
let host: HTMLElement | null = null;
|
|
4
|
+
|
|
5
|
+
export default defineSegment({
|
|
6
|
+
id: "iso-diagram-sample-feature",
|
|
7
|
+
advances: [2.5, 5.0],
|
|
8
|
+
voiceover:
|
|
9
|
+
"Feature cards in Iso Diagram. An isometric stack of memory blocks on the left with outlines drawing on and pastel fills flooding in, feature details on the right.",
|
|
10
|
+
|
|
11
|
+
mount(el) {
|
|
12
|
+
host = el;
|
|
13
|
+
el.innerHTML = `
|
|
14
|
+
<div style="
|
|
15
|
+
position: relative;
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: var(--color-bg);
|
|
18
|
+
color: var(--color-fg);
|
|
19
|
+
font-family: var(--font-body);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
">
|
|
22
|
+
<div style="
|
|
23
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
24
|
+
background-image: radial-gradient(circle, rgba(42,38,32,0.10) 1px, transparent 1.6px);
|
|
25
|
+
background-size: 32px 32px;
|
|
26
|
+
"></div>
|
|
27
|
+
|
|
28
|
+
<svg style="position: absolute; left: 140px; top: 200px; overflow: visible;" width="800" height="700">
|
|
29
|
+
${[0, 1, 2, 3]
|
|
30
|
+
.map(
|
|
31
|
+
(i) => `
|
|
32
|
+
<g data-ref="block${i}" transform="translate(200,${500 - i * 90})">
|
|
33
|
+
<polygon data-ref="blockTop${i}" points="0,40 160,-40 320,40 160,120" fill="${i === 3 ? "var(--fill-pink)" : "var(--fill-blue)"}" opacity="0" />
|
|
34
|
+
<polygon data-ref="blockLeft${i}" points="0,40 160,120 160,180 0,100" fill="${i === 3 ? "var(--fill-pink)" : "var(--fill-blue)"}" opacity="0" />
|
|
35
|
+
<polygon data-ref="blockRight${i}" points="160,120 320,40 320,100 160,180" fill="${i === 3 ? "var(--fill-pink)" : "var(--fill-blue)"}" opacity="0" />
|
|
36
|
+
<path data-ref="blockOutlineA${i}" d="M0,40 L160,-40 L320,40 L160,120 Z" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="750" stroke-dashoffset="750" />
|
|
37
|
+
<path data-ref="blockOutlineB${i}" d="M0,40 L160,120 L160,180 L0,100 Z" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="750" stroke-dashoffset="750" />
|
|
38
|
+
<path data-ref="blockOutlineC${i}" d="M160,120 L320,40 L320,100 L160,180 Z" stroke="var(--color-fg)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="750" stroke-dashoffset="750" />
|
|
39
|
+
</g>`,
|
|
40
|
+
)
|
|
41
|
+
.join("")}
|
|
42
|
+
|
|
43
|
+
<path data-ref="leader" d="M 600 180 Q 630 150 540 140" stroke="var(--color-accent)" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-dasharray="200" stroke-dashoffset="200" />
|
|
44
|
+
<polygon data-ref="arrow" points="540,140 555,130 555,150" fill="var(--color-accent)" opacity="0" />
|
|
45
|
+
<text data-ref="leaderLabel" x="470" y="115" font-family="var(--font-display)" font-size="40" fill="var(--color-accent)" transform="rotate(-6 470 115)" opacity="0">rewind</text>
|
|
46
|
+
</svg>
|
|
47
|
+
|
|
48
|
+
<div data-ref="featureTag" style="
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: var(--safe-x);
|
|
51
|
+
top: 180px;
|
|
52
|
+
width: 720px;
|
|
53
|
+
font-family: var(--font-mono);
|
|
54
|
+
font-size: 18px;
|
|
55
|
+
letter-spacing: 0.1em;
|
|
56
|
+
color: var(--color-muted);
|
|
57
|
+
opacity: 0;
|
|
58
|
+
">FEATURE 01 / 03</div>
|
|
59
|
+
|
|
60
|
+
<div data-ref="featureName" style="
|
|
61
|
+
position: absolute;
|
|
62
|
+
right: var(--safe-x);
|
|
63
|
+
top: 240px;
|
|
64
|
+
width: 720px;
|
|
65
|
+
font-family: var(--font-display);
|
|
66
|
+
font-size: 120px;
|
|
67
|
+
color: var(--color-accent);
|
|
68
|
+
opacity: 0;
|
|
69
|
+
">Checkpoint memory.</div>
|
|
70
|
+
|
|
71
|
+
<svg data-ref="nameUnderline" style="position: absolute; right: var(--safe-x); top: 400px;" width="520" height="14">
|
|
72
|
+
<path data-ref="nameUnderlinePath" d="M 0 6 q 86 -8 172 0 t 172 0 t 172 0" stroke="var(--color-accent)" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-dasharray="600" stroke-dashoffset="600" />
|
|
73
|
+
</svg>
|
|
74
|
+
|
|
75
|
+
<div data-ref="featureDesc" style="
|
|
76
|
+
position: absolute;
|
|
77
|
+
right: var(--safe-x);
|
|
78
|
+
top: 440px;
|
|
79
|
+
width: 720px;
|
|
80
|
+
font-family: var(--font-body);
|
|
81
|
+
font-size: 28px;
|
|
82
|
+
line-height: 1.5;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
">Snapshots the agent's reasoning at each tool boundary. When a plan goes stale, the agent rewinds to the last correct checkpoint.</div>
|
|
85
|
+
|
|
86
|
+
<div data-ref="counter" style="
|
|
87
|
+
position: absolute;
|
|
88
|
+
right: var(--safe-x);
|
|
89
|
+
top: 36px;
|
|
90
|
+
font-family: var(--font-display);
|
|
91
|
+
font-size: 28px;
|
|
92
|
+
color: var(--color-muted);
|
|
93
|
+
transform: rotate(-2deg);
|
|
94
|
+
opacity: 0;
|
|
95
|
+
">~ scene 6 of 10 ~</div>
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
async play(ctx) {
|
|
101
|
+
const counter = host?.querySelector('[data-ref="counter"]') as HTMLElement;
|
|
102
|
+
const featureTag = host?.querySelector('[data-ref="featureTag"]') as HTMLElement;
|
|
103
|
+
const featureName = host?.querySelector('[data-ref="featureName"]') as HTMLElement;
|
|
104
|
+
const nameUnderlinePath = host?.querySelector(
|
|
105
|
+
'[data-ref="nameUnderlinePath"]',
|
|
106
|
+
) as SVGPathElement;
|
|
107
|
+
const featureDesc = host?.querySelector('[data-ref="featureDesc"]') as HTMLElement;
|
|
108
|
+
const leader = host?.querySelector('[data-ref="leader"]') as SVGPathElement;
|
|
109
|
+
const arrow = host?.querySelector('[data-ref="arrow"]') as SVGPolygonElement;
|
|
110
|
+
const leaderLabel = host?.querySelector('[data-ref="leaderLabel"]') as SVGTextElement;
|
|
111
|
+
|
|
112
|
+
const ease = "cubic-bezier(0.34, 1.2, 0.64, 1)";
|
|
113
|
+
const opts = { fill: "forwards" as const, easing: ease };
|
|
114
|
+
|
|
115
|
+
counter.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 300 });
|
|
116
|
+
|
|
117
|
+
// Feature tag and name
|
|
118
|
+
featureTag.animate(
|
|
119
|
+
[
|
|
120
|
+
{ opacity: 0, transform: "rotate(-1deg) translateY(8px)" },
|
|
121
|
+
{ opacity: 1, transform: "rotate(0deg) translateY(0)" },
|
|
122
|
+
],
|
|
123
|
+
{ ...opts, duration: 300, delay: 400 },
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
featureName.animate(
|
|
127
|
+
[
|
|
128
|
+
{ opacity: 0, transform: "translateY(12px)" },
|
|
129
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
130
|
+
],
|
|
131
|
+
{ ...opts, duration: 400, delay: 700 },
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
nameUnderlinePath.animate([{ strokeDashoffset: "600" }, { strokeDashoffset: "0" }], {
|
|
135
|
+
...opts,
|
|
136
|
+
duration: 500,
|
|
137
|
+
delay: 1300,
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// Iso blocks: outlines draw on then fills flood
|
|
141
|
+
for (let i = 0; i < 4; i++) {
|
|
142
|
+
const outA = host?.querySelector(`[data-ref="blockOutlineA${i}"]`) as SVGPathElement;
|
|
143
|
+
const outB = host?.querySelector(`[data-ref="blockOutlineB${i}"]`) as SVGPathElement;
|
|
144
|
+
const outC = host?.querySelector(`[data-ref="blockOutlineC${i}"]`) as SVGPathElement;
|
|
145
|
+
const top = host?.querySelector(`[data-ref="blockTop${i}"]`) as SVGPolygonElement;
|
|
146
|
+
const left = host?.querySelector(`[data-ref="blockLeft${i}"]`) as SVGPolygonElement;
|
|
147
|
+
const right = host?.querySelector(`[data-ref="blockRight${i}"]`) as SVGPolygonElement;
|
|
148
|
+
|
|
149
|
+
const base = 500 + i * 200;
|
|
150
|
+
outA.animate([{ strokeDashoffset: "750" }, { strokeDashoffset: "0" }], {
|
|
151
|
+
...opts,
|
|
152
|
+
duration: 500,
|
|
153
|
+
delay: base,
|
|
154
|
+
});
|
|
155
|
+
outB.animate([{ strokeDashoffset: "750" }, { strokeDashoffset: "0" }], {
|
|
156
|
+
...opts,
|
|
157
|
+
duration: 500,
|
|
158
|
+
delay: base + 150,
|
|
159
|
+
});
|
|
160
|
+
outC.animate([{ strokeDashoffset: "750" }, { strokeDashoffset: "0" }], {
|
|
161
|
+
...opts,
|
|
162
|
+
duration: 500,
|
|
163
|
+
delay: base + 150,
|
|
164
|
+
});
|
|
165
|
+
top.animate([{ opacity: 0 }, { opacity: 0.9 }], {
|
|
166
|
+
...opts,
|
|
167
|
+
duration: 400,
|
|
168
|
+
delay: base + 400,
|
|
169
|
+
});
|
|
170
|
+
left.animate([{ opacity: 0 }, { opacity: 0.65 }], {
|
|
171
|
+
...opts,
|
|
172
|
+
duration: 400,
|
|
173
|
+
delay: base + 450,
|
|
174
|
+
});
|
|
175
|
+
right.animate([{ opacity: 0 }, { opacity: 0.5 }], {
|
|
176
|
+
...opts,
|
|
177
|
+
duration: 400,
|
|
178
|
+
delay: base + 450,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
featureDesc.animate(
|
|
183
|
+
[
|
|
184
|
+
{ opacity: 0, transform: "translateY(8px)" },
|
|
185
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
186
|
+
],
|
|
187
|
+
{ ...opts, duration: 350, delay: 1400 },
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// Leader line and label
|
|
191
|
+
leader.animate([{ strokeDashoffset: "200" }, { strokeDashoffset: "0" }], {
|
|
192
|
+
...opts,
|
|
193
|
+
duration: 500,
|
|
194
|
+
delay: 2000,
|
|
195
|
+
});
|
|
196
|
+
arrow.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 200, delay: 2400 });
|
|
197
|
+
leaderLabel.animate([{ opacity: 0 }, { opacity: 1 }], { ...opts, duration: 200, delay: 2400 });
|
|
198
|
+
|
|
199
|
+
await ctx.waitForNext();
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
unmount() {
|
|
203
|
+
host = null;
|
|
204
|
+
},
|
|
205
|
+
});
|