teaser v5: 42 s 16:9 cut, same story and captions as v4
Nine scenes of 4-5 s (4.5 / 4.5 / 5 / 5 / 4.5 / 5 / 5 / 4.5 / 4), one camera move per scene with a quick quartic ease-out that settles at 80% of the scene, 0.4 s dissolves on the cuts. Captions fade in and out faster and stay fully on screen 3.25-4.25 s. Long terminal output streams faster instead of being cut: init types at 22 cps with 0.12 s lines, the prompt at 40 cps, the plan at 0.13 s per line, products, declarations, form rows and findings closer together. tests/teaser.test.ts: scenes 4-5 s, 38-46 s in total, captions at least 3 s.
This commit is contained in:
parent
761cb11d76
commit
1d4dc8573d
4 changed files with 82 additions and 88 deletions
|
|
@ -1,31 +1,32 @@
|
|||
# storebound teaser (60 s, 16:9)
|
||||
# storebound teaser (42 s, 16:9)
|
||||
|
||||
A calm, scripted motion piece: from an empty folder to everything ready on both stores. Every frame is a pure function
|
||||
of time, rendered from an HTML/CSS/JS timeline in headless Chrome and encoded with ffmpeg. The music and the sound
|
||||
design are original and synthesized from scratch in the same browser (Web Audio `OfflineAudioContext`): no samples,
|
||||
no downloaded audio, nothing to license.
|
||||
|
||||
One idea per scene, 6-7 s each, one slow camera move per scene, soft dissolves between scenes. Each scene has one
|
||||
plain-English caption at the top, fully on screen for at least 4 s; below it, the real product.
|
||||
One idea per scene, 4-5 s each, one camera move per scene (a quick ease-out that settles before the cut), short
|
||||
dissolves on the cuts, no whips or rapid montages. Long terminal output streams faster rather than being cut. Each scene
|
||||
has one plain-English caption at the top, fully on screen for at least 3 s; below it, the real product.
|
||||
|
||||
| s | shows | caption |
|
||||
|---|---|---|
|
||||
| 0-6 | the demo game's icon, "Done"; the stores' to-do list line by line; one rejection mail (Guideline 2.1) | Your app is done. The stores are not. |
|
||||
| 6-12 | an empty folder; `bunx storebound init` is typed; the files it creates list in | storebound takes it from an empty folder. |
|
||||
| 12-19 | the prompt "Get my app ready for both stores."; `storebound release plan 1.0.0`: 25 steps in fix order | You ask once. It plans every step. |
|
||||
| 19-26 | the demo game's store text in 4 languages; its renders in 7 store sizes x 4 languages | Store text and screenshots. Every language, every size. |
|
||||
| 26-33 | `play products --dry` (174 regions), then `catalog diff` (175 / 174 region prices, 0 mismatches) | In-app products on both stores, priced in 175 countries. |
|
||||
| 33-40 | the scan's declarations proposal: detected answers with file:line, one "ask owner" line highlighted; 764 Data safety answers | The forms, answered from your code. It asks what it can't know. |
|
||||
| 40-47 | `storebound scan`: three findings, each with a plain reason; fixed, the re-scan is clean | It catches rejections before Apple does. |
|
||||
| 47-54 | the desktop app: the release timeline with both stores on one track, then Store readiness: "No blockers" | Both stores, one view. Ready for review. |
|
||||
| 54-60 | "Submit for Review" with the cursor resting on it (it never clicks), then the end card: storebound.dev, Open source · CLI · Desktop app | You press Submit. That's it. |
|
||||
| 0-4.5 | the demo game's icon, "Done"; the stores' to-do list line by line; one rejection mail (Guideline 2.1) | Your app is done. The stores are not. |
|
||||
| 4.5-9 | an empty folder; `bunx storebound init` is typed; the files it creates list in | storebound takes it from an empty folder. |
|
||||
| 9-14 | the prompt "Get my app ready for both stores."; `storebound release plan 1.0.0`: 25 steps in fix order | You ask once. It plans every step. |
|
||||
| 14-19 | the demo game's store text in 4 languages; its renders in 7 store sizes x 4 languages | Store text and screenshots. Every language, every size. |
|
||||
| 19-23.5 | `play products --dry` (174 regions), then `catalog diff` (175 / 174 region prices, 0 mismatches) | In-app products on both stores, priced in 175 countries. |
|
||||
| 23.5-28.5 | the scan's declarations proposal: detected answers with file:line, one "ask owner" line highlighted; 764 Data safety answers | The forms, answered from your code. It asks what it can't know. |
|
||||
| 28.5-33.5 | `storebound scan`: three findings, each with a plain reason; fixed, the re-scan is clean | It catches rejections before Apple does. |
|
||||
| 33.5-38 | the desktop app: the release timeline with both stores on one track, then Store readiness: "No blockers" | Both stores, one view. Ready for review. |
|
||||
| 38-42 | "Submit for Review" with the cursor resting on it (it never clicks), then the end card: storebound.dev, Open source · CLI · Desktop app | You press Submit. That's it. |
|
||||
|
||||
| file | what |
|
||||
|---|---|
|
||||
| `script.js` | the timeline: scenes in seconds, camera moves, captions, every line shown, the sound cues |
|
||||
| `desktop.ts` | the desktop frames: apps/desktop's Vite dev server in fixture mode (`VITE_FIXTURES=1`, example.com-style data), captured headlessly in dark at 1280x800 @2x with the dev markers hidden, plus `boxes.json` (callout targets) -> `out/desktop/` |
|
||||
| `index.html` + `teaser.js` | the picture; `window.teaser.seek(t)` sets every element for time `t` |
|
||||
| `music.js` | calm music (D major, one chord per scene: pads, a slow soft pluck, a quiet sub) and soft sound design: a bell and an airy swell on each scene change, key clicks, quiet ticks, chimes for the fixes |
|
||||
| `music.js` | music (D major, one chord per scene: pads, a slow soft pluck, a quiet sub) and soft sound design: a bell and an airy swell on each scene change, key clicks, quiet ticks, chimes for the fixes |
|
||||
| `render.ts` | frames at 60 fps blended to 30 fps -> ffmpeg (H.264 high, yuv420p), sound -> loudnorm (-16 LUFS, -1.5 dBTP), mux, poster, the 1280x720 web version |
|
||||
| `icons/` | the mouse cursor and the UI icons: Phosphor files copied unchanged by `bun tools/site-icons.ts` (no hand-written SVG; CI checks it) |
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ clock prefix and the "(0s)" timer left out):
|
|||
The plain reasons under the findings and the callouts on the desktop frames are annotations, set apart from the CLI
|
||||
text. The store text is `examples/demo-game/store/shots/copy.json`, the screenshots its real renders, the app icon its
|
||||
`store/icon/icon.png`. The mail row is fictional: no real names or addresses, no mail-app branding. The test also checks
|
||||
the timing: scenes 6-7 s, captions on screen at least 4 s, 55-65 s in total, 16:9 only.
|
||||
the timing: scenes 4-5 s, captions on screen at least 3 s, 38-46 s in total, 16:9 only.
|
||||
|
||||
## Render
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ game's store renders:
|
|||
```sh
|
||||
cd examples/demo-game && bun serve.ts & bun ../../cli/index.ts shots capture && bun ../../cli/index.ts shots fonts && bun ../../cli/index.ts shots render
|
||||
# from the repo root
|
||||
bun media/teaser/render.ts > media/teaser/out/render.log 2>&1 & # master, sound, poster, web version: about 15 min
|
||||
bun media/teaser/render.ts > media/teaser/out/render.log 2>&1 & # master, sound, poster, web version: about 10 min
|
||||
bun media/teaser/render.ts --desktop # capture the desktop app frames again (after a UI change)
|
||||
bun media/teaser/render.ts --stills 2,12.5,30 # PNG stills in out/stills for a quick layout check
|
||||
bun media/teaser/render.ts --serve --port 8750 # live preview: /index.html?play=1 (or ?t=12.5)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// Teaser timeline (v4): the single source of truth for the picture (teaser.js) and the sound (music.js).
|
||||
// One idea per scene, 6-7 s each, one slow camera move per scene, soft dissolves between scenes (no whips, no rapid
|
||||
// cuts). Every scene has one plain-English caption at the top that is fully on screen for at least 4 s; the lower part
|
||||
// shows the real product: CLI output and desktop-app frames.
|
||||
// Teaser timeline (v5): the single source of truth for the picture (teaser.js) and the sound (music.js).
|
||||
// One idea per scene, 4-5 s each (about 42 s in all), one camera move per scene with a quick ease-out, short dissolves
|
||||
// on the cuts (no whips, no rapid montages). Long terminal output streams faster instead of being cut. Every scene has
|
||||
// one plain-English caption at the top that is fully on screen for at least 3 s; the lower part shows the real
|
||||
// product: CLI output and desktop-app frames.
|
||||
//
|
||||
// Every CLI line shown here is real output; tests/teaser.test.ts runs each command and checks every line:
|
||||
// init `storebound init` in an empty folder (the clock prefix left out)
|
||||
|
|
@ -20,24 +21,15 @@ export const FPS = 30;
|
|||
/** 16:9 only: the master; render.ts also makes the 1280x720 web version from it. */
|
||||
export const FORMAT = { w: 1920, h: 1080 };
|
||||
|
||||
/** Scenes in seconds. Each holds 6-7 s; the next one dissolves in over DISSOLVE s centred on the cut. */
|
||||
export const SCENES = [
|
||||
{ id: 'hook', start: 0, end: 6 },
|
||||
{ id: 'init', start: 6, end: 12 },
|
||||
{ id: 'plan', start: 12, end: 19 },
|
||||
{ id: 'store', start: 19, end: 26 },
|
||||
{ id: 'products', start: 26, end: 33 },
|
||||
{ id: 'forms', start: 33, end: 40 },
|
||||
{ id: 'rejections', start: 40, end: 47 },
|
||||
{ id: 'desktop', start: 47, end: 54 },
|
||||
{ id: 'submit', start: 54, end: 60 },
|
||||
];
|
||||
/** Scene lengths in seconds (4-5 s each). The next scene dissolves in over DISSOLVE s centred on the cut. */
|
||||
const LENGTHS = [['hook', 4.5], ['init', 4.5], ['plan', 5], ['store', 5], ['products', 4.5], ['forms', 5], ['rejections', 5], ['desktop', 4.5], ['submit', 4]];
|
||||
export const SCENES = LENGTHS.reduce((a, [id, len]) => { const start = a.at(-1)?.end ?? 0; return [...a, { id, start, end: start + len }]; }, []);
|
||||
export const DURATION = SCENES.at(-1).end;
|
||||
export const DISSOLVE = 0.6;
|
||||
export const DISSOLVE = 0.4;
|
||||
export const scene = id => SCENES.find(s => s.id === id);
|
||||
|
||||
/**
|
||||
* One slow camera move per scene, over the whole scene: from -> to, eased in and out.
|
||||
* One camera move per scene, over the whole scene: from -> to, a quick ease-out that settles before the cut.
|
||||
* z = zoom, x / y = pan in px (applied to the scene's content, never to the caption).
|
||||
*/
|
||||
export const CAMERA = {
|
||||
|
|
@ -65,8 +57,8 @@ export const CAPTIONS = [
|
|||
{ id: 'submit', lines: ['You press *Submit.* That\'s it.'] },
|
||||
];
|
||||
/** Caption fade: in over CAP_IN from CAP_DELAY after the scene starts; out over CAP_OUT, ending CAP_END before it ends. */
|
||||
export const CAP_DELAY = 0.15, CAP_IN = 0.4, CAP_OUT = 0.4, CAP_END = 0.1;
|
||||
/** When each caption is fully on screen (tests: at least 4 s). */
|
||||
export const CAP_DELAY = 0.1, CAP_IN = 0.3, CAP_OUT = 0.3, CAP_END = 0.05;
|
||||
/** When each caption is fully on screen (tests: at least 3 s). */
|
||||
export function captionTimes() {
|
||||
return CAPTIONS.map(c => {
|
||||
const s = scene(c.id);
|
||||
|
|
@ -79,20 +71,20 @@ export function captionTimes() {
|
|||
export const APP_NAME = 'Prism Puddle';
|
||||
/** The stores' to-do list (line by line at reading speed). at = seconds into the scene. */
|
||||
export const TODO = [
|
||||
{ at: 0.6, text: '2 store consoles' },
|
||||
{ at: 1.25, text: 'dozens of forms' },
|
||||
{ at: 1.9, text: '7 screenshot sizes × 14 languages' },
|
||||
{ at: 2.6, text: 'prices in 175 countries' },
|
||||
{ at: 0.35, text: '2 store consoles' },
|
||||
{ at: 0.7, text: 'dozens of forms' },
|
||||
{ at: 1.05, text: '7 screenshot sizes × 14 languages' },
|
||||
{ at: 1.4, text: 'prices in 175 countries' },
|
||||
];
|
||||
/** A generic, made-up inbox row (no mail-app branding, no real names or addresses): fades in over MAIL_IN from `at`,
|
||||
* then holds to the cut. */
|
||||
export const MAIL_IN = 0.5;
|
||||
export const MAIL = { at: 3.3, from: 'App Store Connect', date: '9:41 AM', subject: "There's an issue with your Prism Puddle submission", guideline: 'Guideline 2.1 · Information Needed' };
|
||||
export const MAIL_IN = 0.4;
|
||||
export const MAIL = { at: 1.7, from: 'App Store Connect', date: '9:41 AM', subject: "There's an issue with your Prism Puddle submission", guideline: 'Guideline 2.1 · Information Needed' };
|
||||
|
||||
// ---------- 2 init: an empty folder, `storebound init` ----------
|
||||
export const FOLDER = 'my-app';
|
||||
export const INIT_CMD = 'bunx storebound init';
|
||||
export const INIT_TYPE_AT = 0.5, INIT_CPS = 13, INIT_OUT_AT = 2.5, INIT_STEP = 0.22;
|
||||
export const INIT_TYPE_AT = 0.35, INIT_CPS = 22, INIT_OUT_AT = 1.45, INIT_STEP = 0.12;
|
||||
/** Real output of `storebound init` (clock prefix left out). file = the file the line creates (the folder list). */
|
||||
export const INIT_LINES = [
|
||||
'[init] create storebound.config.ts',
|
||||
|
|
@ -109,9 +101,9 @@ export const INIT_LINES = [
|
|||
|
||||
// ---------- 3 plan: the agent prompt, `storebound release plan` ----------
|
||||
export const PROMPT = 'Get my app ready for both stores.';
|
||||
export const PROMPT_AT = 0.3, PROMPT_CPS = 26;
|
||||
export const PROMPT_AT = 0.2, PROMPT_CPS = 40;
|
||||
export const PLAN_CMD = 'storebound release plan 1.0.0';
|
||||
export const PLAN_CMD_AT = 1.9, PLAN_AT = 2.3, PLAN_STEP = 0.2;
|
||||
export const PLAN_CMD_AT = 1.25, PLAN_AT = 1.55, PLAN_STEP = 0.13;
|
||||
/** Real lines of the plan (a brand-new app record on both stores); the "-> fix" lines and some steps left out. */
|
||||
export const PLAN_LINES = [
|
||||
'Example App 1.0.0',
|
||||
|
|
@ -139,7 +131,7 @@ export const COPY = [
|
|||
{ lang: 'ja', title: ['カラフルなしずくを', 'キャッチ!'] },
|
||||
{ lang: 'ar', title: ['التقط كل', 'قطرة ملوّنة!'], rtl: true },
|
||||
];
|
||||
export const COPY_AT = 0.5, COPY_STEP = 0.5;
|
||||
export const COPY_AT = 0.3, COPY_STEP = 0.3;
|
||||
/** The demo game's renders, one column per store size (cli/shots/lib.ts SIZES), one row per language. */
|
||||
export const SHOT_SIZES = [
|
||||
{ id: 'ios69', label: 'iPhone\n6.9″' },
|
||||
|
|
@ -151,25 +143,25 @@ export const SHOT_SIZES = [
|
|||
{ id: 'feature', label: 'Play\nfeature graphic' },
|
||||
];
|
||||
export const SHOT_LANGS = COPY.map(c => c.lang);
|
||||
export const SHOTS_AT = 0.9, SHOTS_STEP = 0.38;
|
||||
export const SHOTS_AT = 0.6, SHOTS_STEP = 0.25;
|
||||
export const SHOTS_CMD = 'storebound shots render';
|
||||
export const SHOTS_PILL = `*${SHOT_SIZES.length}* sizes × *${COPY.length}* languages`;
|
||||
|
||||
// ---------- 5 products: `play products --dry`, then `catalog diff` ----------
|
||||
/** Real output (clock prefix and the "(0s)" timer left out). at = seconds into the scene. */
|
||||
export const PRODUCT_LINES = [
|
||||
{ at: 0.4, text: '$ storebound play products --dry', cmd: true },
|
||||
{ at: 0.9, text: '[play] 1/2 com.example.app.no_ads: would create · 174 regions · 2 listings (dry)' },
|
||||
{ at: 1.2, text: '[play] 2/2 com.example.app.gems_100: would create · 174 regions · 2 listings (dry)' },
|
||||
{ at: 1.5, text: '[play] products checked (dry run, nothing written)' },
|
||||
{ at: 2.2, text: '$ storebound catalog diff', cmd: true },
|
||||
{ at: 2.7, text: 'ok [apple] com.example.app.gems_100: consumable, 175 region prices, READY_TO_SUBMIT' },
|
||||
{ at: 3.0, text: 'ok [play] com.example.app.gems_100: consumable, 174 region prices, ACTIVE' },
|
||||
{ at: 3.3, text: 'ok [apple] com.example.app.no_ads: non_consumable, 175 region prices, READY_TO_SUBMIT' },
|
||||
{ at: 3.6, text: 'ok [play] com.example.app.no_ads: non_consumable, 174 region prices, ACTIVE' },
|
||||
{ at: 4.0, text: '[catalog] 2 catalog items: 0 mismatch(es), 0 warning(s), 0 price difference(s) between the stores' },
|
||||
{ at: 0.3, text: '$ storebound play products --dry', cmd: true },
|
||||
{ at: 0.6, text: '[play] 1/2 com.example.app.no_ads: would create · 174 regions · 2 listings (dry)' },
|
||||
{ at: 0.8, text: '[play] 2/2 com.example.app.gems_100: would create · 174 regions · 2 listings (dry)' },
|
||||
{ at: 1.0, text: '[play] products checked (dry run, nothing written)' },
|
||||
{ at: 1.35, text: '$ storebound catalog diff', cmd: true },
|
||||
{ at: 1.65, text: 'ok [apple] com.example.app.gems_100: consumable, 175 region prices, READY_TO_SUBMIT' },
|
||||
{ at: 1.85, text: 'ok [play] com.example.app.gems_100: consumable, 174 region prices, ACTIVE' },
|
||||
{ at: 2.05, text: 'ok [apple] com.example.app.no_ads: non_consumable, 175 region prices, READY_TO_SUBMIT' },
|
||||
{ at: 2.25, text: 'ok [play] com.example.app.no_ads: non_consumable, 174 region prices, ACTIVE' },
|
||||
{ at: 2.5, text: '[catalog] 2 catalog items: 0 mismatch(es), 0 warning(s), 0 price difference(s) between the stores' },
|
||||
];
|
||||
export const PRODUCTS_PILL = { at: 4.5, text: '*175* App Store regions · *174* Google Play regions · parity *✓*' };
|
||||
export const PRODUCTS_PILL = { at: 2.9, text: '*175* App Store regions · *174* Google Play regions · parity *✓*' };
|
||||
|
||||
// ---------- 6 forms: the declarations proposal from the scan, then the Data safety answers ----------
|
||||
/** Real lines of the proposal (scan of the teaser fixture). */
|
||||
|
|
@ -180,45 +172,45 @@ export const DECL_LINES = [
|
|||
{ what: 'PSL_USER_ACCOUNT', value: 'collect: account, functionality', where: 'Podfile.lock:3' },
|
||||
];
|
||||
export const DECL_ASK = 'ask owner encryptedInTransit: ? · all traffic over HTTPS / TLS?';
|
||||
export const DECL_AT = 0.5, DECL_STEP = 0.4, ASK_AT = 2.3;
|
||||
export const DECL_AT = 0.4, DECL_STEP = 0.25, ASK_AT = 1.5;
|
||||
/** Play Data safety form rows the detected answers fill (Play's own labels for the PSL_* types above and the rest). */
|
||||
export const DATA_SAFETY_ROWS = ['Device or other IDs', 'Approximate location', 'App interactions', 'Diagnostics', 'Name', 'Email address', 'User IDs'];
|
||||
export const FORM_AT = 2.9, FORM_STEP = 0.2;
|
||||
export const FORM_AT = 1.9, FORM_STEP = 0.14;
|
||||
/** Data safety CSV rows `storebound check` builds from the config. */
|
||||
export const DECL_TOTAL = 764;
|
||||
export const FORMS_PILL = { at: 4.5, text: 'Data safety answers' };
|
||||
export const FORMS_PILL = { at: 3.0, text: 'Data safety answers' };
|
||||
|
||||
// ---------- 7 rejections: three findings with a plain reason each, then fixed ----------
|
||||
export const SCAN_CMD = 'storebound scan';
|
||||
export const RISKS_LINE = 'Rejection risks: 2 blocker, 3 high, 0 medium, 0 low';
|
||||
/** Three of the five findings (real text); why = a plain-English annotation, not CLI output. */
|
||||
export const FINDINGS = [
|
||||
{ at: 1.1, sev: 'BLOCKER', guideline: '2.1(a)', title: 'Sign-in is required but there is no demo account for App Review', where: 'storebound.config.ts:12',
|
||||
{ at: 0.8, sev: 'BLOCKER', guideline: '2.1(a)', title: 'Sign-in is required but there is no demo account for App Review', where: 'storebound.config.ts:12',
|
||||
why: 'Apple rejects sign-in apps without a demo account.' },
|
||||
{ at: 1.9, sev: 'BLOCKER', guideline: '5.1.1(v)', title: 'Accounts can be created but no in-app account deletion was found', where: 'Planner/LoginView.swift:11',
|
||||
{ at: 1.3, sev: 'BLOCKER', guideline: '5.1.1(v)', title: 'Accounts can be created but no in-app account deletion was found', where: 'Planner/LoginView.swift:11',
|
||||
why: 'Apps that create accounts must let people delete them.' },
|
||||
{ at: 2.7, sev: 'HIGH', guideline: '5.1.2(i)', title: 'Tracking-capable code without App Tracking Transparency (Google AdMob, IDFA)', where: 'Planner/Ads.swift:7',
|
||||
{ at: 1.8, sev: 'HIGH', guideline: '5.1.2(i)', title: 'Tracking-capable code without App Tracking Transparency (Google AdMob, IDFA)', where: 'Planner/Ads.swift:7',
|
||||
why: 'Ads that track people must ask permission first.' },
|
||||
];
|
||||
/** Each finding turns green (fixed), then the re-scan of the fixed copy (tests/fixtures/scan/teaser-fixed). */
|
||||
export const FIX_AT = [4.0, 4.35, 4.7];
|
||||
export const RESCAN_AT = 5.2;
|
||||
export const FIX_AT = [2.7, 2.95, 3.2];
|
||||
export const RESCAN_AT = 3.6;
|
||||
export const RESCAN_LINE = 'Rejection risks: 0 blocker, 0 high, 0 medium, 0 low';
|
||||
|
||||
// ---------- 8 desktop: the release timeline (both stores), then Store readiness: no blockers ----------
|
||||
/** Real frames (desktop.ts). The camera pushes from the timeline to the readiness card; the frames dissolve between. */
|
||||
export const DESKTOP = {
|
||||
frames: ['releases', 'ready'],
|
||||
swap: [3.1, 3.8],
|
||||
swap: [2.1, 2.6],
|
||||
cam: { from: { f: [0.56, 0.42], z: 1.0 }, to: { f: [0.8, 0.4], z: 1.22 } },
|
||||
callouts: [
|
||||
{ at: 1.1, until: 3.0, target: 'timeline', text: 'App Store + Google Play, one track' },
|
||||
{ at: 4.3, until: 7, target: 'readyEmpty', text: 'Validate: 0 blockers on both', green: true },
|
||||
{ at: 0.7, until: 2.0, target: 'timeline', text: 'App Store + Google Play, one track' },
|
||||
{ at: 2.9, until: 5, target: 'readyEmpty', text: 'Validate: 0 blockers on both', green: true },
|
||||
],
|
||||
};
|
||||
|
||||
// ---------- 9 submit + end card ----------
|
||||
export const SUBMIT = { hover: 1.5, logoAt: 3.0, logoIn: 0.8 };
|
||||
export const SUBMIT = { hover: 1.0, logoAt: 2.0, logoIn: 0.6 };
|
||||
export const URL = 'storebound.dev';
|
||||
export const TAGLINE = 'Open source · CLI · Desktop app';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Teaser picture (v4): every element is set from the time t alone (window.teaser.seek(t)), so frames render
|
||||
// Teaser picture (v5): every element is set from the time t alone (window.teaser.seek(t)), so frames render
|
||||
// deterministically, in any order. 16:9 only (1920x1080). URL: &t=12.5 holds a frame, &play=1 previews in real time.
|
||||
import { APP_NAME, ASK_AT, CAMERA, CAP_DELAY, CAP_END, CAP_IN, CAP_OUT, CAPTIONS, captionTimes, COPY, COPY_AT, COPY_FILE, COPY_STEP,
|
||||
DATA_SAFETY_ROWS, DECL_ASK, DECL_AT, DECL_LINES, DECL_STEP, DECL_TOTAL, DESKTOP, DISSOLVE, DURATION, FINDINGS, FIX_AT, FOLDER,
|
||||
|
|
@ -18,7 +18,8 @@ const clamp = (x, a = 0, b = 1) => Math.min(b, Math.max(a, x));
|
|||
const prog = (t, a, d) => (d <= 0 ? (t >= a ? 1 : 0) : clamp((t - a) / d));
|
||||
const eoc = p => 1 - Math.pow(1 - p, 3);
|
||||
const eio = p => (p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2);
|
||||
const ess = p => p * p * (3 - 2 * p); // smoothstep: the slow camera moves
|
||||
/** The camera: a quick ease-out (quartic) that settles at 80% of the scene, so each move reads snappy, then rests. */
|
||||
const ecam = p => 1 - Math.pow(1 - clamp(p / 0.8), 4);
|
||||
const lerp = (a, b, p) => a + (b - a) * p;
|
||||
const esc = s => String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
const set = (el, k, v) => { if (el.__s?.[k] !== v) { (el.__s ??= {})[k] = v; el.style[k] = v; } };
|
||||
|
|
@ -38,7 +39,7 @@ function pillAt(el, t, at, base = 'translate(-50%, 0)') {
|
|||
set(el, 'transform', `${base} translateY(${((1 - eoc(p)) * 16).toFixed(1)}px)`);
|
||||
}
|
||||
|
||||
// ---------- scenes: dissolves and one slow camera move each ----------
|
||||
// ---------- scenes: dissolves and one camera move each ----------
|
||||
const sceneEls = Object.fromEntries(SCENES.map(s => [s.id, { el: $(`#s-${s.id}`), cam: $(`#s-${s.id} > .cam`) }]));
|
||||
function scenes(t) {
|
||||
SCENES.forEach((s, i) => {
|
||||
|
|
@ -48,7 +49,7 @@ function scenes(t) {
|
|||
set(el, 'visibility', 'visible');
|
||||
set(el, 'opacity', String(i === 0 ? 1 : eio(prog(t, from, DISSOLVE))));
|
||||
const c = CAMERA[s.id];
|
||||
const p = ess(clamp((t - (s.start - DISSOLVE / 2)) / (s.end - s.start + DISSOLVE)));
|
||||
const p = ecam(clamp((t - (s.start - DISSOLVE / 2)) / (s.end - s.start + DISSOLVE)));
|
||||
const z = lerp(c.from.z, c.to.z, p), x = lerp(c.from.x, c.to.x, p), y = lerp(c.from.y, c.to.y, p);
|
||||
set(cam, 'transform', `translate(${x.toFixed(2)}px, ${y.toFixed(2)}px) scale(${z.toFixed(5)})`);
|
||||
});
|
||||
|
|
@ -99,8 +100,8 @@ mailEl.querySelector('.prev').innerHTML = `Hello, Thank you for submitting your
|
|||
function hook(t) {
|
||||
const s = scene('hook'); if (t > s.end + 1) return;
|
||||
const r = t - s.start;
|
||||
appear(appcard, r, 0.1, 0.5, 20);
|
||||
appear($('#todo'), r, 0.35, 0.45, 20);
|
||||
appear(appcard, r, 0.05, 0.4, 20);
|
||||
appear($('#todo'), r, 0.2, 0.4, 20);
|
||||
todoEls.forEach((el, i) => appear(el, r, TODO[i].at, 0.4, 10));
|
||||
const p = prog(r, MAIL.at, MAIL_IN);
|
||||
set(mailEl, 'opacity', String(eoc(p)));
|
||||
|
|
@ -258,7 +259,7 @@ function forms(t) {
|
|||
set(el.querySelector('.tg'), 'opacity', String(p));
|
||||
set(el, 'color', p > 0.5 ? '#fff' : 'var(--ink-2)');
|
||||
});
|
||||
const np = prog(r, FORMS_PILL.at, 1.0);
|
||||
const np = prog(r, FORMS_PILL.at, 0.8);
|
||||
html(formsPill, `<b>${Math.round(DECL_TOTAL * eoc(np))}</b> ${esc(FORMS_PILL.text)}`);
|
||||
pillAt(formsPill, r, FORMS_PILL.at);
|
||||
}
|
||||
|
|
@ -277,8 +278,8 @@ function rejections(t) {
|
|||
const s = scene('rejections'); if (t < s.start - 1 || t > s.end + 1) return;
|
||||
const r = t - s.start;
|
||||
appear($('#scanterm'), r, 0.0, 0.4, 14);
|
||||
appear(scanLns[0], r, 0.25, 0.25, 4);
|
||||
appear(scanLns[1], r, 0.6, 0.3, 6);
|
||||
appear(scanLns[0], r, 0.2, 0.25, 4);
|
||||
appear(scanLns[1], r, 0.45, 0.3, 6);
|
||||
fdEls.forEach((el, i) => {
|
||||
appear(el, r, FINDINGS[i].at, 0.4, 10);
|
||||
const f = prog(r, FIX_AT[i], 0.45);
|
||||
|
|
@ -306,7 +307,7 @@ const cam2 = $('#s-desktop .cam2'), frameEls = [...cam2.querySelectorAll('img')]
|
|||
const rings = [...deskCam.querySelectorAll('.ring')], callouts = [...deskCam.querySelectorAll('.callout')];
|
||||
function deskView(r) {
|
||||
const s = scene('desktop'), len = s.end - s.start;
|
||||
const p = ess(clamp((r + DISSOLVE / 2) / (len + DISSOLVE)));
|
||||
const p = ecam(clamp((r + DISSOLVE / 2) / (len + DISSOLVE)));
|
||||
const { from, to } = DESKTOP.cam;
|
||||
const S = S0 * lerp(from.z, to.z, p), fx = lerp(from.f[0], to.f[0], p), fy = lerp(from.f[1], to.f[1], p);
|
||||
const ox = clamp(VIEW.w / 2 - fx * 1280 * S, VIEW.w - 1280 * S, 0), oy = clamp(VIEW.h / 2 - fy * 800 * S, VIEW.h - 800 * S, 0);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// The teaser video (media/teaser, v4): every CLI line it shows is real output of the command it names, each scene holds
|
||||
// 6-7 s, each caption is fully on screen for at least 4 s, the whole cut is 55-65 s, and it is 16:9 only.
|
||||
// The teaser video (media/teaser, v5): every CLI line it shows is real output of the command it names, each scene holds
|
||||
// 4-5 s, each caption is fully on screen for at least 3 s, the whole cut is 38-46 s, and it is 16:9 only.
|
||||
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
|
||||
import { generateKeyPairSync } from 'node:crypto';
|
||||
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
||||
|
|
@ -156,23 +156,23 @@ describe('teaser: timing and format', () => {
|
|||
expect(render).not.toMatch(/1080\s*x\s*1920|w: 1080, h: 1920|vertical/i);
|
||||
expect(render).toContain('scale=1280:720');
|
||||
});
|
||||
test('scenes are contiguous, 6-7 s each, 55-65 s in total', () => {
|
||||
test('scenes are contiguous, 4-5 s each, 38-46 s in total', () => {
|
||||
expect(T.SCENES[0]!.start).toBe(0);
|
||||
for (let i = 1; i < T.SCENES.length; i++) expect(T.SCENES[i]!.start).toBe(T.SCENES[i - 1]!.end);
|
||||
for (const s of T.SCENES) {
|
||||
expect(s.end - s.start, s.id).toBeGreaterThanOrEqual(6);
|
||||
expect(s.end - s.start, s.id).toBeLessThanOrEqual(7);
|
||||
expect(s.end - s.start, s.id).toBeGreaterThanOrEqual(4);
|
||||
expect(s.end - s.start, s.id).toBeLessThanOrEqual(5);
|
||||
}
|
||||
expect(T.DURATION).toBe(T.SCENES.at(-1)!.end);
|
||||
expect(T.DURATION).toBeGreaterThanOrEqual(55);
|
||||
expect(T.DURATION).toBeLessThanOrEqual(65);
|
||||
expect(T.DURATION).toBeGreaterThanOrEqual(38);
|
||||
expect(T.DURATION).toBeLessThanOrEqual(46);
|
||||
});
|
||||
test('one caption per scene, fully on screen for at least 4 s, inside its scene', () => {
|
||||
test('one caption per scene, fully on screen for at least 3 s, inside its scene', () => {
|
||||
const c = T.captionTimes();
|
||||
expect(c.map(x => x.id)).toEqual(T.SCENES.map(s => s.id));
|
||||
for (const x of c) {
|
||||
const s = T.SCENES.find(y => y.id === x.id)!;
|
||||
expect(x.hold, x.text).toBeGreaterThanOrEqual(4);
|
||||
expect(x.hold, x.text).toBeGreaterThanOrEqual(3);
|
||||
expect(x.at).toBeGreaterThanOrEqual(s.start);
|
||||
expect(x.to).toBeLessThanOrEqual(s.end);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue