reelme 0.2.2 → 0.4.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 +10 -3
- package/assets/audio/PROVENANCE.md +16 -0
- package/assets/audio/bright-sparks.mp3 +0 -0
- package/assets/audio/calm-keys.mp3 +0 -0
- package/assets/audio/circuit-pulse.mp3 +0 -0
- package/assets/audio/clean-horizon.mp3 +0 -0
- package/assets/audio/generate-tracks.mjs +218 -0
- package/assets/audio/manifest.json +83 -0
- package/assets/audio/midnight-protocol.mp3 +0 -0
- package/assets/audio/pixel-bounce.mp3 +0 -0
- package/assets/audio/steady-launch.mp3 +0 -0
- package/assets/audio/sunny-loop.mp3 +0 -0
- package/assets/audio/vector-grid.mp3 +0 -0
- package/package.json +9 -2
- package/src/cache.mjs +155 -14
- package/src/cli.mjs +20 -11
- package/src/render.mjs +172 -9
- package/template/package.json +6 -5
- package/template/pnpm-lock.yaml +186 -116
- package/template/pnpm-workspace.yaml +2 -0
- package/template/src/Root.tsx +73 -51
- package/template/src/audio.ts +24 -0
- package/template/src/benchmark.ts +18 -0
- package/template/src/brief.json +7 -6
- package/template/src/brief.ts +73 -5
- package/template/src/cinematic/Atmosphere.tsx +139 -0
- package/template/src/cinematic/Camera.tsx +54 -0
- package/template/src/cinematic/look.ts +106 -0
- package/template/src/cinematic/transitions.tsx +110 -0
- package/template/src/components/primitives/Bar.tsx +86 -0
- package/template/src/components/primitives/Caption.tsx +5 -4
- package/template/src/components/primitives/Icon.tsx +7 -0
- package/template/src/components/primitives/KeyPill.tsx +1 -1
- package/template/src/components/primitives/Kicker.tsx +46 -0
- package/template/src/components/primitives/Label.tsx +22 -25
- package/template/src/components/primitives/Loop.tsx +65 -0
- package/template/src/components/primitives/RevealText.tsx +123 -0
- package/template/src/components/primitives/Stage.tsx +62 -0
- package/template/src/components/primitives/Terminal.tsx +11 -0
- package/template/src/components/scenes/Benchmark.tsx +83 -0
- package/template/src/components/scenes/BrowserFrame.tsx +5 -4
- package/template/src/components/scenes/CTA.tsx +67 -58
- package/template/src/components/scenes/Clip.tsx +131 -0
- package/template/src/components/scenes/CodeReveal.tsx +10 -8
- package/template/src/components/scenes/DataFlow.tsx +5 -4
- package/template/src/components/scenes/FeatureList.tsx +80 -78
- package/template/src/components/scenes/FileTree.tsx +5 -4
- package/template/src/components/scenes/Hook.tsx +55 -0
- package/template/src/components/scenes/HotkeyScene.tsx +8 -6
- package/template/src/components/scenes/MobileScreen.tsx +308 -155
- package/template/src/components/scenes/OSWindowScene.tsx +8 -7
- package/template/src/components/scenes/Problem.tsx +29 -30
- package/template/src/components/scenes/SplitComparison.tsx +65 -92
- package/template/src/components/scenes/StatCallout.tsx +162 -18
- package/template/src/components/scenes/TerminalScene.tsx +16 -16
- package/template/src/duration.ts +23 -2
- package/template/src/index.ts +7 -5
- package/template/src/platforms.ts +4 -0
- package/template/src/timing.ts +49 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Shared reveal timing for the two content-length-driven scenes. The duration
|
|
2
|
+
// oracle (duration.ts) and the components used to each re-implement this math,
|
|
3
|
+
// so they drifted: a long terminal or code block overran its fixed scene length
|
|
4
|
+
// and its caption never rendered (F7). Both now import from here, so the scene
|
|
5
|
+
// is always long enough for its own content plus its caption.
|
|
6
|
+
|
|
7
|
+
import { CodeRevealScene, TerminalScene } from "./brief";
|
|
8
|
+
|
|
9
|
+
export const TERMINAL_START = 8;
|
|
10
|
+
export const TERMINAL_FRAMES_PER_LINE = 23;
|
|
11
|
+
export const TERMINAL_FRAMES_PER_CHAR = 2.0;
|
|
12
|
+
|
|
13
|
+
export const CODE_START = 14;
|
|
14
|
+
export const CODE_FRAMES_PER_LINE = 9;
|
|
15
|
+
|
|
16
|
+
// Frames after the caption's start for it to spring in and be read before the
|
|
17
|
+
// scene's tail fade begins.
|
|
18
|
+
export const CAPTION_HOLD = 40;
|
|
19
|
+
|
|
20
|
+
export function terminalLines(scene: TerminalScene): Array<{ text: string; isOutput: boolean }> {
|
|
21
|
+
return scene.commands.flatMap((cmd) => [
|
|
22
|
+
{ text: cmd.input, isOutput: false },
|
|
23
|
+
{ text: cmd.output, isOutput: true },
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Frames until the last character of the last command has typed out.
|
|
28
|
+
export function terminalContentFrames(scene: TerminalScene): number {
|
|
29
|
+
return terminalLines(scene).reduce(
|
|
30
|
+
(acc, line) =>
|
|
31
|
+
acc +
|
|
32
|
+
(line.isOutput
|
|
33
|
+
? TERMINAL_FRAMES_PER_LINE
|
|
34
|
+
: line.text.length * TERMINAL_FRAMES_PER_CHAR + TERMINAL_FRAMES_PER_LINE),
|
|
35
|
+
0
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function terminalCaptionStart(scene: TerminalScene): number {
|
|
40
|
+
return TERMINAL_START + terminalContentFrames(scene) + 20;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function codeLineCount(scene: CodeRevealScene): number {
|
|
44
|
+
return scene.code.split("\n").length;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function codeRevealCaptionStart(scene: CodeRevealScene): number {
|
|
48
|
+
return CODE_START + codeLineCount(scene) * CODE_FRAMES_PER_LINE + 20;
|
|
49
|
+
}
|