Teaser remake: inbox hook, real scan and re-scan, screenshot wall, Data safety, three desktop scenes, Submit card
New cut on the approved storyboard (33.75 s, every cut on the 128 BPM beat): rejection mails in a generic inbox, storebound scan typed on black with its real output (tests/fixtures/scan/teaser), the re-scan of the fixed copy (new fixture teaser-fixed) flipping five reds to green, 200 store screenshots, 764 Data safety answers, the desktop app's Portfolio, release timeline (rollout to 20%) and Checks tab, then the Submit card and the logo. 60 fps capture blended to 30 fps for motion blur, whip / mask / zoom transitions, sound design on every cut, a 1280x720 web version. tests/teaser.test.ts checks the scan text, beat grid, caption length and holds.
|
|
@ -1,40 +1,55 @@
|
||||||
# storebound teaser (about 50 s social video)
|
# storebound teaser (about 34 s social video)
|
||||||
|
|
||||||
A scripted terminal animation, not a screen recording. Every frame is a pure function of time, rendered from an
|
A scripted motion piece, not a screen recording. Every frame is a pure function of time, rendered from an
|
||||||
HTML/CSS/JS timeline in headless Chrome and encoded with ffmpeg. The music is original and synthesized from scratch in
|
HTML/CSS/JS timeline in headless Chrome and encoded with ffmpeg. The music and the sound design are original and
|
||||||
the same browser (Web Audio `OfflineAudioContext`): no samples, no downloaded audio, nothing to license.
|
synthesized from scratch in the same browser (Web Audio `OfflineAudioContext`): no samples, no downloaded audio,
|
||||||
|
nothing to license.
|
||||||
|
|
||||||
|
| s | scene |
|
||||||
|
|---|---|
|
||||||
|
| 0.00-3.28 | hook: a generic, made-up inbox; three rejection mails stack up, then "Rejected. Again." |
|
||||||
|
| 3.28-11.25 | hard cut to black: `storebound scan` is typed; the real output: SDKs with file:line, five findings with guideline and fix, the camera on each |
|
||||||
|
| 11.25-14.06 | the re-scan after the fixes: the five reds flip green, 0 blockers |
|
||||||
|
| 14.06-16.88 | the store screenshot wall (the demo game's real renders), 200 store screenshots |
|
||||||
|
| 16.88-19.69 | the declarations proposal from the scan, Data safety answers ticking, 764 answers |
|
||||||
|
| 19.69-28.13 | the desktop app (real frames, fixture data): Portfolio across studios · release timeline, rollout filling to 20% · Checks, rejection risks turning green |
|
||||||
|
| 28.13-30.94 | "It never presses Submit. You do." over a Submit button |
|
||||||
|
| 30.94-33.75 | logo, storebound.dev, Open source · macOS · Windows · Linux |
|
||||||
|
|
||||||
| file | what |
|
| file | what |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `script.js` | the timeline: tempo (128 BPM, 26 bars = 48.75 s), scenes, terminal lines, prices, languages, blockers, the desktop steps |
|
| `script.js` | the timeline: 128 BPM, scenes in beats (every cut on the beat), captions, the inbox, the scan lines, the desktop camera, the sound cues |
|
||||||
| `desktop.ts` | the desktop scene's frames: apps/desktop's Vite dev server in fixture mode (`VITE_FIXTURES=1`, example.com-style data), captured headlessly in dark at 1280x800 @2x, plus `boxes.json` (cursor targets) -> `out/desktop/` |
|
| `desktop.ts` | the desktop scenes' 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` (cursor and callout targets) -> `out/desktop/` |
|
||||||
| `index.html` + `teaser.js` | the picture; `window.teaser.seek(t)` sets every element for time `t` |
|
| `index.html` + `teaser.js` | the picture; `window.teaser.seek(t)` sets every element for time `t` |
|
||||||
| `music.js` | the music: arp, kick, hats, clap, offbeat bass, pad, impacts on the cuts, key clicks, riser |
|
| `music.js` | music (F minor: tense intro, silence for the typed command, the groove from Enter, a calm bar under Submit, the logo hit) and sound design: mail blips, key clicks, a whoosh into every whip / mask / zoom, a hit on every cut, ticks on findings, rising chimes on fixes |
|
||||||
| `render.ts` | frames -> ffmpeg (H.264 high, yuv420p, 30 fps), music -> loudnorm (-14 LUFS, -1.5 dBTP), mux, posters |
|
| `render.ts` | frames at 60 fps blended to 30 fps (motion blur) -> ffmpeg (H.264 high, yuv420p), sound -> loudnorm (-14 LUFS, -1.5 dBTP), mux, posters, the 1280x720 web version |
|
||||||
| `icons/` | the mouse cursor and the blocker-list icons: Phosphor files copied unchanged by `bun tools/site-icons.ts` (no hand-written SVG; CI checks it) |
|
| `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) |
|
||||||
| `poster.jpg` | end card still (1920x1080, small) |
|
| `poster.jpg` | end card still (1920x1080, small) |
|
||||||
|
|
||||||
The terminal text is modelled on real storebound output for the demo game (`examples/demo-game`, placeholder ids,
|
The scan text is the real `storebound scan` output of `tests/fixtures/scan/teaser` (five classic App Review
|
||||||
dry runs); the price table values are illustrative. The store art is the demo game's real renders. The desktop scene
|
rejections) and, after the fixes, of `tests/fixtures/scan/teaser-fixed`; `tests/teaser.test.ts` runs both scans and
|
||||||
shows real frames of the desktop app on its fixture data in a CSS window; only the confirm dialog is drawn (in the app it
|
checks every line the video shows, the beat grid, the caption lengths (at most 7 words) and holds (at least 1.2 s), and
|
||||||
is a native OS dialog), with the app's own wording and the dry run of the diff in the frame behind it.
|
that every scene holds at least 2.5 s. Each fix line shows a verbatim piece of the real fix. The mail list is fictional:
|
||||||
|
no real names or addresses, no mail-app branding. The desktop scenes are real frames of the app on its fixture data;
|
||||||
|
the "after" Checks frame is the same tab with the fixture's scan answering no findings.
|
||||||
|
|
||||||
## Render
|
## Render
|
||||||
|
|
||||||
Needs Bun, ffmpeg and Playwright (repo devDependency; Playwright's Chromium or an installed Google Chrome).
|
Needs Bun, ffmpeg and Playwright (repo devDependency; Playwright's Chromium or an installed Google Chrome).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# optional, for sharp store art: the demo renders (otherwise crops of docs/img/showcase.jpg are used)
|
# optional, for the real screenshot wall: the demo renders (otherwise crops of docs/img/showcase.jpg are used)
|
||||||
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
|
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
|
# from the repo root
|
||||||
bun media/teaser/render.ts # both formats + music, about 12 min (captures out/desktop/ first when missing)
|
bun media/teaser/render.ts # both formats, sound, posters, web version: about 15 min
|
||||||
bun media/teaser/render.ts --desktop # capture the desktop app frames again (after a UI change)
|
bun media/teaser/render.ts --desktop # capture the desktop app frames again (after a UI change)
|
||||||
bun media/teaser/render.ts --only v # vertical only (h = horizontal)
|
bun media/teaser/render.ts --only v # vertical only (h = horizontal; the web version is made from h)
|
||||||
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 --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?w=1080&h=1920&play=1 (or &t=12.5)
|
bun media/teaser/render.ts --serve --port 8750 # live preview: /index.html?w=1080&h=1920&play=1 (or &t=12.5)
|
||||||
```
|
```
|
||||||
|
|
||||||
Outputs (gitignored) in `media/teaser/out/`: `teaser-1080x1920.mp4` (X / TikTok / Reels), `teaser-1920x1080.mp4`
|
Outputs (gitignored) in `media/teaser/out/`: `teaser-1080x1920.mp4` (X / TikTok / Reels), `teaser-1920x1080.mp4`
|
||||||
(X / YouTube), `-silent` variants, `poster-*.jpg`, `music.wav`.
|
(X / YouTube), `teaser-web.mp4` (1280x720, about 3.5 MB, for the site) with `poster-web.jpg`, `-silent` variants,
|
||||||
|
`poster-*.jpg`, `music.wav`.
|
||||||
|
|
||||||
Vertical layout keeps captions and key text inside the central 80% and leaves the bottom ~22% free for app overlays.
|
The vertical layout keeps captions inside the centre 80% and the bottom ~22% free of key text for app overlays.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
// Real desktop-app frames for the teaser's desktop scene: the Vite dev server of apps/desktop in fixture mode
|
// Real desktop-app frames for the teaser's three desktop scenes: the Vite dev server of apps/desktop in fixture mode
|
||||||
// (VITE_FIXTURES=1: example.com-style fixture data, no Tauri, no store accounts), captured headlessly, dark theme.
|
// (VITE_FIXTURES=1: example.com-style fixture data, no Tauri, no store accounts), captured headlessly, dark theme,
|
||||||
// Writes media/teaser/out/desktop/*.jpg plus boxes.json (where the cursor goes, as fractions of the frame).
|
// with the two dev-build markers hidden (they are not in a release build).
|
||||||
|
// Writes media/teaser/out/desktop/*.jpg plus boxes.json (cursor and callout targets, as fractions of the frame).
|
||||||
|
// portfolio.jpg Portfolio: every app of every studio, grouped by studio
|
||||||
|
// releases.jpg Prism Puddle's release timeline, both stores rolling out at 20%
|
||||||
|
// releases-empty.jpg the same frame with the rollout bars' fill and "20%" hidden (the video fills the bar)
|
||||||
|
// checks.jpg the Checks tab: the "Rejection risks" card with its findings
|
||||||
|
// checks-clean.jpg the same tab after the fixes: the fixture's scan answer with no findings (the app's own
|
||||||
|
// "No rejection risks found" state; the fixture module is served with an empty findings list)
|
||||||
// render.ts runs it when out/desktop/ is missing; run it by hand after a UI change: bun media/teaser/desktop.ts
|
// render.ts runs it when out/desktop/ is missing; run it by hand after a UI change: bun media/teaser/desktop.ts
|
||||||
import { mkdirSync, writeFileSync } from 'node:fs';
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
|
@ -29,65 +36,80 @@ export async function captureDesktop(): Promise<void> {
|
||||||
await Bun.sleep(250);
|
await Bun.sleep(250);
|
||||||
}
|
}
|
||||||
const browser = await launch(ROOT, { headless: true });
|
const browser = await launch(ROOT, { headless: true });
|
||||||
const ctx = await browser.newContext({ viewport: VIEW, deviceScaleFactor: 2, colorScheme: 'dark', reducedMotion: 'reduce' });
|
|
||||||
const page = await ctx.newPage();
|
|
||||||
const errors: string[] = [];
|
|
||||||
page.on('pageerror', (e: unknown) => errors.push(String(e)));
|
|
||||||
const boxes: Record<string, Box> = {};
|
const boxes: Record<string, Box> = {};
|
||||||
const box = async (name: string, loc: any): Promise<void> => {
|
const errors: string[] = [];
|
||||||
|
|
||||||
|
const session = async (clean: boolean) => {
|
||||||
|
const ctx = await browser.newContext({ viewport: VIEW, deviceScaleFactor: 2, colorScheme: 'dark', reducedMotion: 'reduce' });
|
||||||
|
if (clean) {
|
||||||
|
// after the fixes: the fixture's scan of Prism Puddle answers with no findings (the UI is unchanged)
|
||||||
|
await ctx.route(/\/src\/dev\/fixtures\.ts/, async (route: any) => {
|
||||||
|
const res = await route.fetch();
|
||||||
|
const src = await res.text();
|
||||||
|
const body = src.replace(/findings:\s*SCAN_PRISM,\s*counts:\s*scanCounts\(SCAN_PRISM\)/, 'findings: [], counts: scanCounts([])');
|
||||||
|
if (body === src) errors.push('fixtures.ts: the Prism Puddle scan entry moved (desktop.ts clean capture)');
|
||||||
|
await route.fulfill({ response: res, body });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const page = await ctx.newPage();
|
||||||
|
page.on('pageerror', (e: unknown) => errors.push(String(e)));
|
||||||
|
return { ctx, page };
|
||||||
|
};
|
||||||
|
const open = async (page: any, start: string): Promise<void> => {
|
||||||
|
await page.goto(`${base}/?start=${encodeURIComponent(start)}&theme=dark&lang=en`);
|
||||||
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.addStyleTag({ content: '.brand small, .dev-pill { display: none !important; }' });
|
||||||
|
await page.waitForTimeout(1200);
|
||||||
|
};
|
||||||
|
const box = async (page: any, name: string, loc: any): Promise<void> => {
|
||||||
const b = await loc.first().boundingBox();
|
const b = await loc.first().boundingBox();
|
||||||
if (!b) throw new Error(`no box for ${name}`);
|
if (!b) throw new Error(`no box for ${name}`);
|
||||||
boxes[name] = { x: b.x / VIEW.width, y: b.y / VIEW.height, w: b.width / VIEW.width, h: b.height / VIEW.height };
|
boxes[name] = { x: b.x / VIEW.width, y: b.y / VIEW.height, w: b.width / VIEW.width, h: b.height / VIEW.height };
|
||||||
};
|
};
|
||||||
const open = async (start: string): Promise<void> => {
|
const shot = async (page: any, name: string): Promise<void> => {
|
||||||
await page.goto(`${base}/?start=${encodeURIComponent(start)}&theme=dark&lang=en`);
|
|
||||||
await page.waitForLoadState('networkidle');
|
|
||||||
// the two dev-build markers ("DEV" by the name, the "DEV FIXTURES" pill) are not in a release build
|
|
||||||
await page.addStyleTag({ content: '.brand small, .dev-pill { display: none !important; }' });
|
|
||||||
await page.waitForTimeout(900);
|
|
||||||
};
|
|
||||||
const shot = async (name: string): Promise<void> => {
|
|
||||||
await page.mouse.move(VIEW.width - 2, VIEW.height - 2);
|
await page.mouse.move(VIEW.width - 2, VIEW.height - 2);
|
||||||
await page.waitForTimeout(150);
|
await page.waitForTimeout(200);
|
||||||
await page.screenshot({ path: join(OUT, `${name}.jpg`), type: 'jpeg', quality: 92 });
|
await page.screenshot({ path: join(OUT, `${name}.jpg`), type: 'jpeg', quality: 93 });
|
||||||
};
|
};
|
||||||
|
|
||||||
await open('portfolio');
|
const a = await session(false);
|
||||||
await shot('portfolio');
|
await open(a.page, 'portfolio');
|
||||||
|
await box(a.page, 'studios', a.page.locator('.fchips'));
|
||||||
|
await box(a.page, 'table', a.page.locator('table').first());
|
||||||
|
await shot(a.page, 'portfolio');
|
||||||
|
|
||||||
await open('app:releases');
|
await open(a.page, 'app:releases');
|
||||||
await box('console', page.getByRole('button', { name: /App Store Connect/ }));
|
// the release timeline (both stores, rollout bars) at the top of the frame
|
||||||
await shot('releases');
|
await a.page.locator('.tl-lane').first().evaluate((el: HTMLElement) => {
|
||||||
|
|
||||||
await open('app:growth');
|
|
||||||
const chart = page.locator('#tabpanel .lchart-plot').first();
|
|
||||||
await box('chart', chart);
|
|
||||||
await shot('growth');
|
|
||||||
const c = boxes.chart!;
|
|
||||||
const hx = (c.x + c.w * 0.68) * VIEW.width, hy = (c.y + c.h * 0.5) * VIEW.height;
|
|
||||||
await page.mouse.move(hx, hy, { steps: 4 });
|
|
||||||
await page.waitForTimeout(400);
|
|
||||||
boxes.hover = { x: hx / VIEW.width, y: hy / VIEW.height, w: 0, h: 0 };
|
|
||||||
await page.screenshot({ path: join(OUT, 'growth-hover.jpg'), type: 'jpeg', quality: 92 });
|
|
||||||
|
|
||||||
await open('palette');
|
|
||||||
await shot('palette');
|
|
||||||
|
|
||||||
await open('app:prices');
|
|
||||||
await page.getByRole('button', { name: /Compare store\/prices.csv/ }).click();
|
|
||||||
await page.waitForTimeout(5200); // the "compared" result toast closes by itself after 4.5 s
|
|
||||||
await page.getByText(/against the stores/).first().evaluate((el: HTMLElement) => {
|
|
||||||
el.scrollIntoView({ block: 'start' });
|
el.scrollIntoView({ block: 'start' });
|
||||||
document.getElementById('content')?.scrollBy({ top: -24 });
|
document.getElementById('content')?.scrollBy({ top: -150 });
|
||||||
});
|
});
|
||||||
await page.waitForTimeout(300);
|
await a.page.waitForTimeout(300);
|
||||||
await box('apply', page.getByRole('button', { name: /^Apply \d+ changes/ }));
|
await box(a.page, 'roll', a.page.locator('.tl-roll').first());
|
||||||
await shot('prices-diff');
|
await box(a.page, 'roll2', a.page.locator('.tl-roll').nth(1));
|
||||||
|
await box(a.page, 'timeline', a.page.locator('.tl-lane').first());
|
||||||
|
await shot(a.page, 'releases');
|
||||||
|
await a.page.addStyleTag({ content: '.tl-roll .rbar rect:not(.track) { display: none !important; } .tl-roll .pct { visibility: hidden !important; }' });
|
||||||
|
await a.page.waitForTimeout(150);
|
||||||
|
await shot(a.page, 'releases-empty');
|
||||||
|
|
||||||
|
await open(a.page, 'app:checks');
|
||||||
|
await box(a.page, 'scan', a.page.locator('.card').first());
|
||||||
|
await box(a.page, 'finding', a.page.locator('.card').first().locator('.li').first());
|
||||||
|
await box(a.page, 'scanAgain', a.page.locator('.card').first().locator('.btn').first());
|
||||||
|
await shot(a.page, 'checks');
|
||||||
|
await a.ctx.close();
|
||||||
|
|
||||||
|
const b = await session(true);
|
||||||
|
await open(b.page, 'app:checks');
|
||||||
|
await box(b.page, 'scanClean', b.page.locator('.card').first());
|
||||||
|
await shot(b.page, 'checks-clean');
|
||||||
|
await b.ctx.close();
|
||||||
|
|
||||||
writeFileSync(join(OUT, 'boxes.json'), `${JSON.stringify(boxes, null, 1)}\n`);
|
writeFileSync(join(OUT, 'boxes.json'), `${JSON.stringify(boxes, null, 1)}\n`);
|
||||||
await browser.close();
|
await browser.close();
|
||||||
if (errors.length) throw new Error(`page errors:\n ${[...new Set(errors)].join('\n ')}`);
|
if (errors.length) throw new Error(`page errors:\n ${[...new Set(errors)].join('\n ')}`);
|
||||||
log(`6 frames + boxes.json -> ${OUT}`);
|
log(`5 frames + boxes.json -> ${OUT}`);
|
||||||
} finally {
|
} finally {
|
||||||
vite.kill();
|
vite.kill();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 235 B |
1
media/teaser/icons/check-circle-fill.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 268 B |
1
media/teaser/icons/magnifying-glass-bold.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 228 B |
1
media/teaser/icons/paper-plane-tilt-fill.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 380 B |
1
media/teaser/icons/pencil-simple-bold.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 339 B |
1
media/teaser/icons/terminal-window-bold.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M72.5,150.63,100.79,128,72.5,105.37a12,12,0,1,1,15-18.74l40,32a12,12,0,0,1,0,18.74l-40,32a12,12,0,0,1-15-18.74ZM144,172h32a12,12,0,0,0,0-24H144a12,12,0,0,0,0,24ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 374 B |
1
media/teaser/icons/tray-bold.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 405 B |
|
|
@ -1 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M234.38,210a123.36,123.36,0,0,0-60.78-53.23,76,76,0,1,0-91.2,0A123.36,123.36,0,0,0,21.62,210a12,12,0,1,0,20.77,12c18.12-31.32,50.12-50,85.61-50s67.49,18.69,85.61,50a12,12,0,0,0,20.77-12ZM76,96a52,52,0,1,1,52,52A52.06,52.06,0,0,1,76,96Z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 335 B |
1
media/teaser/icons/warning-octagon-fill.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M227.31,80.23,175.77,28.69A16.13,16.13,0,0,0,164.45,24H91.55a16.13,16.13,0,0,0-11.32,4.69L28.69,80.23A16.13,16.13,0,0,0,24,91.55v72.9a16.13,16.13,0,0,0,4.69,11.32l51.54,51.54A16.13,16.13,0,0,0,91.55,232h72.9a16.13,16.13,0,0,0,11.32-4.69l51.54-51.54A16.13,16.13,0,0,0,232,164.45V91.55A16.13,16.13,0,0,0,227.31,80.23ZM120,80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 501 B |
1
media/teaser/icons/x-circle-fill.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 341 B |
|
|
@ -6,268 +6,268 @@
|
||||||
<title>storebound teaser</title>
|
<title>storebound teaser</title>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg: #0b1120; --bg-2: #0f172a; --surface: #131c2f; --line: #1e293b; --line-2: #334155;
|
--bg: #070b16; --bg-2: #0d1426; --surface: #111a2e; --surface-2: #17223a; --line: #1f2a40; --line-2: #33415a;
|
||||||
--ink: #f1f5f9; --ink-2: #cbd5e1; --muted: #94a3b8; --dim: #64748b;
|
--ink: #f4f6fb; --ink-2: #cdd5e3; --muted: #93a0b8; --dim: #64718a;
|
||||||
--accent: #818cf8; --accent-2: #4f46e5; --accent-soft: #1e1b4b;
|
--accent: #8b93ff; --accent-2: #5b5cf0; --accent-ink: #c7caff;
|
||||||
--api-bg: #14532d; --api-ink: #86efac;
|
--red: #ff5a5f; --red-2: #e5484d; --red-bg: rgba(229,72,77,.16); --orange: #ff9f43;
|
||||||
--local-bg: #0c4a6e; --local-ink: #7dd3fc;
|
--green: #3ddc84; --green-2: #22c55e; --green-bg: rgba(34,197,94,.16);
|
||||||
--ui-bg: #451a03; --ui-ink: #fcd34d;
|
--cyan: #67d4ff; --yellow: #ffd166;
|
||||||
--you-bg: #500724; --you-ink: #f9a8d4;
|
/* one display font for every caption and title; the terminal and code use the system mono */
|
||||||
--red: #f87171; --red-bg: #450a0a; --green: #4ade80;
|
--display: "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||||
--sans: "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
--text: "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||||
--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
|
--mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||||
}
|
}
|
||||||
* { box-sizing: border-box; }
|
* { box-sizing: border-box; }
|
||||||
html, body { margin: 0; padding: 0; background: var(--bg); overflow: hidden; }
|
html, body { margin: 0; padding: 0; background: #000; overflow: hidden; }
|
||||||
#stage { position: relative; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--sans);
|
#stage { position: relative; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--text);
|
||||||
-webkit-font-smoothing: antialiased; }
|
-webkit-font-smoothing: antialiased; }
|
||||||
#stage > * { position: absolute; }
|
#stage > * { position: absolute; }
|
||||||
|
.scene { inset: 0; opacity: 0; will-change: transform, clip-path, filter; overflow: hidden; }
|
||||||
|
.abs { position: absolute; }
|
||||||
|
|
||||||
/* background */
|
/* icons: Phosphor files in icons/ (tools/site-icons.ts), shown as masks in the element's colour */
|
||||||
#bg { inset: 0; }
|
.pi { display: inline-block; width: 1em; height: 1em; background: currentColor; vertical-align: -0.14em;
|
||||||
#bg .grid { position: absolute; inset: -80px; opacity: .55;
|
-webkit-mask: var(--pi) center / contain no-repeat; mask: var(--pi) center / contain no-repeat; }
|
||||||
background-image: linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px);
|
.i-tray { --pi: url(icons/tray-bold.svg); } .i-search { --pi: url(icons/magnifying-glass-bold.svg); }
|
||||||
background-size: 64px 64px; }
|
.i-compose { --pi: url(icons/pencil-simple-bold.svg); } .i-x { --pi: url(icons/x-circle-fill.svg); }
|
||||||
#bg .glow { position: absolute; border-radius: 50%; filter: blur(40px); }
|
.i-ok { --pi: url(icons/check-circle-fill.svg); } .i-check { --pi: url(icons/check-bold.svg); }
|
||||||
#bg .g1 { width: 900px; height: 900px; background: radial-gradient(circle, rgba(79,70,229,.55), rgba(79,70,229,0) 65%); }
|
.i-stop { --pi: url(icons/warning-octagon-fill.svg); } .i-send { --pi: url(icons/paper-plane-tilt-fill.svg); }
|
||||||
#bg .g2 { width: 760px; height: 760px; background: radial-gradient(circle, rgba(129,140,248,.30), rgba(129,140,248,0) 65%); }
|
.i-term { --pi: url(icons/terminal-window-bold.svg); } .i-cursor { --pi: url(icons/navigation-arrow-fill.svg); }
|
||||||
#bg .g3 { width: 640px; height: 640px; background: radial-gradient(circle, rgba(236,72,153,.18), rgba(236,72,153,0) 65%); }
|
|
||||||
#bg .vig { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(11,17,32,0) 45%, rgba(3,6,14,.85) 100%); }
|
|
||||||
#flash { inset: 0; background: #c7d2fe; opacity: 0; pointer-events: none; z-index: 50; mix-blend-mode: screen; }
|
|
||||||
|
|
||||||
/* captions */
|
/* ---------- background (every scene after the hook) ---------- */
|
||||||
#caption { z-index: 30; font-weight: 900; letter-spacing: -0.025em; line-height: 1.0; }
|
#bg { inset: 0; opacity: 0; }
|
||||||
#caption .line { display: block; white-space: nowrap; }
|
#bg .glow { position: absolute; border-radius: 50%; }
|
||||||
#caption .w { display: inline-block; margin-right: .22em; will-change: transform; }
|
#bg .g1 { width: 1100px; height: 1100px; background: radial-gradient(circle, rgba(91,92,240,.42), rgba(91,92,240,0) 62%); }
|
||||||
#caption .w:last-child { margin-right: 0; }
|
#bg .g2 { width: 900px; height: 900px; background: radial-gradient(circle, rgba(103,212,255,.16), rgba(103,212,255,0) 62%); }
|
||||||
#caption .hl { color: var(--accent); }
|
#bg .g3 { width: 800px; height: 800px; background: radial-gradient(circle, rgba(255,90,95,.0), rgba(255,90,95,0) 62%); }
|
||||||
#caption .hl.g { color: var(--green); }
|
#bg .grid { position: absolute; inset: -96px; opacity: .5;
|
||||||
#caption .sub { display: block; font-family: var(--mono); font-weight: 600; letter-spacing: 0; color: var(--muted); margin-top: 22px; }
|
background-image: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px);
|
||||||
#caption .big { font-variant-numeric: tabular-nums; }
|
background-size: 96px 96px; }
|
||||||
|
#vig { inset: 0; pointer-events: none; z-index: 40; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%); }
|
||||||
|
#flash { inset: 0; z-index: 60; background: #fff; opacity: 0; mix-blend-mode: soft-light; }
|
||||||
|
#black { inset: 0; z-index: 59; background: #000; opacity: 0; }
|
||||||
|
|
||||||
/* terminal */
|
/* ---------- captions: one display font, kinetic words ---------- */
|
||||||
#term { z-index: 10; border-radius: 26px; background: rgba(6,10,20,.92); border: 2px solid var(--line-2);
|
#cap { z-index: 50; left: 10%; width: 80%; text-align: center; font-family: var(--display); font-weight: 850;
|
||||||
box-shadow: 0 40px 120px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(129,140,248,.10), 0 0 80px -20px rgba(79,70,229,.45);
|
letter-spacing: -0.035em; line-height: 1.02; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.55); }
|
||||||
overflow: hidden; transform-origin: 50% 50%; }
|
#cap .line { display: block; white-space: nowrap; }
|
||||||
#term .bar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 2px solid var(--line);
|
#cap .w { display: inline-block; will-change: transform, opacity, filter; }
|
||||||
background: rgba(19,28,47,.9); }
|
#cap .hl { color: var(--accent); } #cap.red .hl { color: var(--red); } #cap.green .hl { color: var(--green); }
|
||||||
#term .dot { width: 16px; height: 16px; border-radius: 50%; background: #334155; }
|
body.v #cap { top: 230px; font-size: 104px; }
|
||||||
#term .dot:nth-child(1) { background: #f87171; } #term .dot:nth-child(2) { background: #fbbf24; } #term .dot:nth-child(3) { background: #4ade80; }
|
body.h #cap { top: 64px; font-size: 92px; }
|
||||||
#term .agent { margin-left: 14px; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border-radius: 999px;
|
#cap.big { top: 50% !important; font-size: 210px !important; line-height: .95; text-shadow: 0 20px 80px rgba(0,0,0,.6); }
|
||||||
background: var(--accent-soft); color: #c7d2fe; font: 700 22px/1 var(--sans); letter-spacing: .01em; }
|
body.h #cap.big { font-size: 190px !important; }
|
||||||
#term .agent i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
|
|
||||||
#term .title { margin-left: auto; color: var(--dim); font: 600 20px/1 var(--mono); }
|
|
||||||
#term .body { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; padding: 22px 30px; font: 500 25px/1.5 var(--mono);
|
|
||||||
color: var(--ink-2); }
|
|
||||||
#term .pin { color: #e0e7ff; font-weight: 700; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 2px dashed var(--line); white-space: pre-wrap; }
|
|
||||||
#term .pin .gt { color: var(--accent); }
|
|
||||||
#term .lines { white-space: pre-wrap; word-break: break-word; overflow: hidden; }
|
|
||||||
#term .l { min-height: 1.5em; }
|
|
||||||
#term .cmd { color: #f8fafc; font-weight: 700; }
|
|
||||||
#term .cmd .ps { color: var(--green); }
|
|
||||||
#term .note { color: #a5b4fc; }
|
|
||||||
#term .tag { color: var(--accent); }
|
|
||||||
#term .t-play { color: #86efac; } #term .t-apple { color: #7dd3fc; } #term .t-shots { color: #fcd34d; } #term .t-check, #term .t-init, #term .t-validate { color: #c4b5fd; }
|
|
||||||
#term .dim { color: var(--dim); }
|
|
||||||
#term .bad { color: #fecaca; background: rgba(248,113,113,.18); border-radius: 6px; padding: 0 6px; font-weight: 700; }
|
|
||||||
#term .okk { color: #052e16; background: var(--green); border-radius: 6px; padding: 0 6px; font-weight: 700; }
|
|
||||||
#term .fixed { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(74,222,128,.7); text-decoration-thickness: 2px; }
|
|
||||||
#term .win { color: var(--green); font-weight: 800; }
|
|
||||||
#term .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -0.18em; background: var(--accent); margin-left: 2px; }
|
|
||||||
|
|
||||||
/* panels */
|
/* ---------- hook: a generic inbox (made up; no product branding) ---------- */
|
||||||
.panel { z-index: 20; border-radius: 26px; background: linear-gradient(180deg, rgba(30,41,59,.97), rgba(19,28,47,.97));
|
#s-hook { background: #f3f4f7; color: #16181d; }
|
||||||
border: 2px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0,0,0,.85), 0 0 0 1px rgba(129,140,248,.18); padding: 26px 30px; opacity: 0; }
|
#s-hook .cam { position: absolute; inset: 0; transform-origin: 50% 30%; }
|
||||||
.panel h4 { margin: 0 0 4px; font: 800 30px/1.2 var(--sans); color: var(--ink); display: flex; align-items: center; gap: 14px; }
|
#inbox { position: absolute; background: #fff; overflow: hidden; }
|
||||||
.panel .ph { margin: 0 0 18px; font: 500 20px/1.3 var(--sans); color: var(--muted); }
|
body.v #inbox { inset: 0; }
|
||||||
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 14px; border-radius: 999px; font: 800 18px/1 var(--sans); letter-spacing: .06em; }
|
body.h #inbox { left: 380px; right: 0; top: 0; bottom: 0; border-left: 1px solid #e3e5ea; }
|
||||||
.p-api { background: var(--api-bg); color: var(--api-ink); } .p-ui { background: var(--ui-bg); color: var(--ui-ink); }
|
#side { position: absolute; left: 0; top: 0; bottom: 0; width: 380px; background: #eceef2; padding: 64px 28px; display: none; }
|
||||||
.p-local { background: var(--local-bg); color: var(--local-ink); } .p-you { background: var(--you-bg); color: var(--you-ink); }
|
body.h #side { display: block; }
|
||||||
|
#side .f { font: 600 28px/1 var(--text); color: #3b4150; padding: 18px 20px; border-radius: 12px; display: flex; align-items: center; gap: 16px; }
|
||||||
|
#side .f.on { background: #dfe3ec; color: #111; }
|
||||||
|
#side .f .n { margin-left: auto; font-size: 24px; color: #2563eb; font-weight: 700; }
|
||||||
|
#inbox .top { display: flex; align-items: center; gap: 22px; padding: 0 56px; border-bottom: 1px solid #e6e8ee; }
|
||||||
|
body.v #inbox .top { height: 300px; padding-top: 110px; }
|
||||||
|
body.h #inbox .top { height: 150px; }
|
||||||
|
#inbox .top h1 { margin: 0; font: 800 76px/1 var(--display); letter-spacing: -0.03em; display: flex; align-items: center; gap: 20px; }
|
||||||
|
body.h #inbox .top h1 { font-size: 60px; }
|
||||||
|
#inbox .top .cnt { font: 700 30px/1 var(--text); color: #fff; background: #2563eb; border-radius: 99px; padding: 8px 16px; }
|
||||||
|
#inbox .top .tools { margin-left: auto; display: flex; gap: 30px; font-size: 44px; color: #5b6272; }
|
||||||
|
#inbox .list { position: absolute; left: 0; right: 0; }
|
||||||
|
body.v #inbox .list { top: 300px; } body.h #inbox .list { top: 150px; }
|
||||||
|
.mrow { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 52px 1fr auto; column-gap: 8px;
|
||||||
|
padding: 28px 56px 28px 30px; border-bottom: 1px solid #eceef2; background: #fff; }
|
||||||
|
body.v .mrow { height: 236px; } body.h .mrow { height: 168px; padding-top: 22px; }
|
||||||
|
.mrow .dot { width: 20px; height: 20px; border-radius: 50%; background: #2563eb; margin: 14px 0 0 14px; }
|
||||||
|
.mrow .from { font: 800 36px/1.15 var(--text); color: #101216; }
|
||||||
|
.mrow .date { font: 500 28px/1.3 var(--text); color: #6b7280; text-align: right; }
|
||||||
|
.mrow .subj { grid-column: 2 / 4; font: 700 33px/1.3 var(--text); color: #1d5fe0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||||
|
.mrow .prev { grid-column: 2 / 4; font: 400 29px/1.35 var(--text); color: #5d6575; overflow: hidden;
|
||||||
|
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
||||||
|
body.h .mrow .prev { -webkit-line-clamp: 1; }
|
||||||
|
.mrow .prev b { color: #111827; font-weight: 700; }
|
||||||
|
.mrow.old .dot { background: transparent; } .mrow.old .from { font-weight: 600; } .mrow.old .subj { color: #2a2f3a; font-weight: 500; }
|
||||||
|
.mrow .hi { position: absolute; inset: 0; background: #dbe8ff; opacity: 0; pointer-events: none; }
|
||||||
|
.mrow > *:not(.hi) { position: relative; }
|
||||||
|
#s-hook .dim { position: absolute; inset: 0; background: #05070d; opacity: 0; }
|
||||||
|
|
||||||
#prices table { width: 100%; border-collapse: collapse; font: 600 25px/1 var(--mono); font-variant-numeric: tabular-nums; }
|
/* ---------- terminal (scan) ---------- */
|
||||||
#prices th { text-align: left; font: 700 17px/1 var(--sans); color: var(--dim); letter-spacing: .08em; text-transform: uppercase; padding: 0 0 12px; }
|
#s-scan { background: #04060c; }
|
||||||
#prices th:nth-child(n+3), #prices td:nth-child(n+3) { text-align: right; }
|
#s-scan .cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
|
||||||
#prices td { padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
|
#s-fixed .cam { position: absolute; inset: 0; }
|
||||||
#prices tr.hot td { color: #fff; }
|
#rescan { position: absolute; }
|
||||||
#prices tr.hot td:first-child { color: var(--accent); }
|
/* the caption band stays clean: earlier terminal lines fade out under it */
|
||||||
#prices .ov { margin-left: 8px; font: 800 13px/1 var(--sans); padding: 3px 7px; border-radius: 6px; background: var(--accent-soft); color: #c7d2fe; vertical-align: 3px; }
|
#s-scan .scrim { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(#04060c 0%, #04060c 70%, rgba(4,6,12,0) 100%); }
|
||||||
#prices .sum { margin-top: 14px; font: 600 20px/1.2 var(--sans); color: var(--muted); }
|
body.v #s-scan .scrim { height: 560px; } body.h #s-scan .scrim { height: 290px; }
|
||||||
|
.term { font-family: var(--mono); color: var(--ink-2); white-space: pre-wrap; }
|
||||||
|
body.v .term { font-size: 31px; line-height: 1.38; width: 840px; }
|
||||||
|
body.h .term { font-size: 30px; line-height: 1.38; width: 1560px; }
|
||||||
|
.term .ln { display: block; opacity: 0; }
|
||||||
|
.term .ps { color: var(--green); font-weight: 700; } .term .cmd { color: #fff; font-weight: 700; }
|
||||||
|
.term .caret { display: inline-block; width: .6em; height: 1.1em; background: #e5e7eb; vertical-align: -0.2em; margin-left: 2px; }
|
||||||
|
.term .head { color: #fff; font-weight: 700; } .term .dimt { color: var(--dim); }
|
||||||
|
.term .sec { color: var(--accent-ink); font-weight: 800; letter-spacing: .02em; }
|
||||||
|
.term .sdk b { color: #fff; } .term .loc { color: var(--cyan); } .term .risk { color: #fff; font-weight: 800; }
|
||||||
|
.term .risk .r { color: var(--red); }
|
||||||
|
.term .fd { display: block; position: relative; opacity: 0; padding: 14px 0 16px 0; margin: 6px 0; }
|
||||||
|
.term .fd .glow { position: absolute; left: -24px; right: -24px; top: 0; bottom: 0; border-radius: 16px; background: var(--red-bg);
|
||||||
|
border: 2px solid rgba(255,90,95,.45); opacity: 0; }
|
||||||
|
.term .fd > span:not(.glow) { position: relative; display: block; }
|
||||||
|
.term .sev { display: inline-block; font-weight: 800; color: #fff; background: var(--red-2); border-radius: 8px; padding: 0 12px; margin-right: 12px; }
|
||||||
|
.term .sev.high { background: #c2410c; }
|
||||||
|
.term .gl { color: #fff; font-weight: 800; }
|
||||||
|
.term .ttl { color: #ffd0d1; font-weight: 600; }
|
||||||
|
.term .fx { color: var(--green); } .term .fx i { font-style: normal; color: var(--dim); }
|
||||||
|
.term .sk { color: var(--accent-ink); }
|
||||||
|
|
||||||
#langs .chips { display: flex; flex-wrap: wrap; gap: 12px; }
|
/* ---------- fixed ---------- */
|
||||||
#langs .chip { font: 700 25px/1 var(--mono); padding: 12px 16px; border-radius: 14px; background: rgba(15,23,42,.9); color: #475569; border: 2px solid var(--line); }
|
#s-fixed { background: transparent; }
|
||||||
#langs .chip.on { background: var(--accent-soft); color: #e0e7ff; border-color: var(--accent); }
|
.frow { position: absolute; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 26px;
|
||||||
#langs .count { margin-left: auto; font: 900 40px/1 var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
|
border-radius: 22px; padding: 0 28px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; }
|
||||||
|
.frow .tint { position: absolute; inset: 0; } .frow > *:not(.tint) { position: relative; }
|
||||||
|
.frow .ic { position: relative; width: 56px; height: 56px; font-size: 56px; }
|
||||||
|
.frow .ic .pi { position: absolute; left: 0; top: 0; }
|
||||||
|
.frow .ic .bad { color: var(--red); } .frow .ic .good { color: var(--green); }
|
||||||
|
.frow .t1 { font: 800 36px/1.1 var(--display); color: #fff; letter-spacing: -0.01em; }
|
||||||
|
.frow .t2 { font: 600 24px/1.2 var(--mono); color: var(--muted); margin-top: 6px; }
|
||||||
|
.frow .chip { position: relative; font: 800 24px/1 var(--mono); padding: 10px 16px; border-radius: 10px; min-width: 150px; text-align: center; }
|
||||||
|
.frow .chip span { display: block; } .frow .chip .c2 { position: absolute; inset: 0; padding: 10px 16px; border-radius: 10px; }
|
||||||
|
.frow .chip .c1 { color: #fff; } .frow .chip .c2 { color: #052e16; background: var(--green); }
|
||||||
|
#counter { text-align: center; font-family: var(--display); }
|
||||||
|
#counter .n { font-weight: 900; letter-spacing: -0.05em; line-height: .9; }
|
||||||
|
#counter .lab { font-weight: 800; color: var(--ink-2); letter-spacing: -0.01em; }
|
||||||
|
#rescan { font-family: var(--mono); color: var(--ink-2); }
|
||||||
|
#rescan .ln { display: block; opacity: 0; }
|
||||||
|
|
||||||
#quest .row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); opacity: 0; }
|
/* ---------- shots ---------- */
|
||||||
#quest .row:first-of-type { border-top: 0; }
|
#wall { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }
|
||||||
#quest .ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; }
|
#wall .tile { position: absolute; border-radius: 14px; background-size: cover; background-position: center;
|
||||||
#quest .ico .pi { width: 26px; height: 26px; }
|
box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); opacity: 0; }
|
||||||
#quest .nm { font: 700 26px/1.15 var(--sans); color: var(--ink); }
|
#s-shots .scrim, #s-decl .scrim { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(#070b16 0%, rgba(7,11,22,.92) 55%, rgba(7,11,22,0) 100%); }
|
||||||
#quest .ds { font: 500 18px/1.2 var(--sans); color: var(--muted); margin-top: 3px; }
|
body.v #s-shots .scrim { height: 640px; } body.h #s-shots .scrim { height: 380px; }
|
||||||
#quest .pill { margin-left: auto; flex: none; }
|
.pill { display: inline-flex; align-items: center; gap: 14px; border-radius: 99px; background: rgba(13,20,38,.92);
|
||||||
|
border: 2px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
|
||||||
|
#shotcount { font-family: var(--display); font-weight: 900; color: #fff; padding: 18px 40px 18px 30px; letter-spacing: -0.02em; }
|
||||||
|
#shotcount .num { color: var(--accent); min-width: 2.3em; text-align: right; font-variant-numeric: tabular-nums; }
|
||||||
|
#shotcmd { font: 700 30px/1 var(--mono); color: #fff; padding: 18px 30px; }
|
||||||
|
#shotcmd .ps { color: var(--green); }
|
||||||
|
|
||||||
/* store art */
|
/* ---------- declarations ---------- */
|
||||||
#shots { inset: 0; z-index: 15; pointer-events: none; }
|
.card { position: absolute; background: var(--surface); border: 2px solid var(--line); border-radius: 26px; overflow: hidden;
|
||||||
#shots .card { position: absolute; left: 0; top: 0; border-radius: 26px; overflow: hidden; opacity: 0;
|
box-shadow: 0 30px 80px rgba(0,0,0,.5); }
|
||||||
box-shadow: 0 40px 90px -20px rgba(0,0,0,.9), 0 0 0 2px rgba(255,255,255,.12); background: #1e1b4b; }
|
.card .ch { display: flex; align-items: center; gap: 16px; padding: 22px 30px; border-bottom: 2px solid var(--line);
|
||||||
#shots .card img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
font: 800 30px/1 var(--display); color: #fff; }
|
||||||
#shots .lang { position: absolute; z-index: 3; font: 800 30px/1 var(--mono); padding: 12px 20px; border-radius: 999px; background: var(--accent); color: #0b1120; opacity: 0; transform: translateX(-50%); }
|
.card .ch .sub { margin-left: auto; font: 600 24px/1 var(--mono); color: var(--muted); }
|
||||||
#sizes { z-index: 25; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
|
#prop .ln { display: block; font: 600 25px/1.45 var(--mono); padding: 6px 30px; opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||||
#sizes .sz { font: 700 22px/1 var(--sans); padding: 10px 16px; border-radius: 999px; background: rgba(15,23,42,.92); border: 2px solid var(--line-2); color: #64748b; opacity: 0; }
|
#prop .ln .k { color: var(--green); font-weight: 800; } #prop .ln .w { color: #fff; font-weight: 800; } #prop .ln .loc { color: var(--cyan); }
|
||||||
#sizes .sz.on { color: #0b1120; background: #fcd34d; border-color: #fcd34d; }
|
#prop .ln.ask .k { color: var(--yellow); }
|
||||||
|
#form .row { display: flex; align-items: center; gap: 20px; padding: 0 30px; border-bottom: 1px solid var(--line); font: 700 30px/1 var(--text); color: var(--ink-2); }
|
||||||
|
#form .box { width: 40px; height: 40px; border-radius: 10px; border: 3px solid var(--line-2); position: relative; flex: none; }
|
||||||
|
#form .box .pi { position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; color: #04150b; }
|
||||||
|
#form .box .fill { position: absolute; inset: -3px; border-radius: 10px; background: var(--green); opacity: 0; }
|
||||||
|
#form .row .tag { margin-left: auto; font: 700 22px/1 var(--mono); color: var(--green); opacity: 0; }
|
||||||
|
#declcount { font-family: var(--display); font-weight: 900; color: #fff; padding: 18px 40px 18px 30px; }
|
||||||
|
#declcount .num { color: var(--green); font-variant-numeric: tabular-nums; }
|
||||||
|
|
||||||
/* desktop app: real frames (out/desktop, desktop.ts) in a CSS window; the dialog stands in for the native one */
|
/* ---------- desktop window ---------- */
|
||||||
#desk { inset: 0; z-index: 12; opacity: 0; pointer-events: none; }
|
.win { position: absolute; border-radius: 22px; overflow: hidden; background: #0b0f19; border: 1.5px solid rgba(255,255,255,.12);
|
||||||
#desk .win { position: absolute; border-radius: 14px; overflow: hidden; background: #0b0f19;
|
box-shadow: 0 50px 120px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.6); }
|
||||||
box-shadow: 0 50px 120px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.14), 0 0 90px -20px rgba(79,70,229,.5); transform-origin: 50% 60%; }
|
.win .bar { position: absolute; left: 0; right: 0; top: 0; height: 44px; background: #161b27; border-bottom: 1px solid #222a3a;
|
||||||
#desk .tb { height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 16px; background: linear-gradient(#262a35, #1d212b);
|
display: flex; align-items: center; gap: 10px; padding: 0 18px; z-index: 2; }
|
||||||
border-bottom: 1px solid rgba(0,0,0,.6); position: relative; }
|
.win .bar i { width: 14px; height: 14px; border-radius: 50%; background: #3a4255; display: block; }
|
||||||
#desk .tl { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
|
.win .bar .tt { position: absolute; left: 0; right: 0; text-align: center; font: 600 18px/1 var(--text); color: #8a93a6; }
|
||||||
#desk .tl.r { background: #ff5f57; } #desk .tl.y { background: #febc2e; } #desk .tl.g { background: #28c840; }
|
.win .view { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; overflow: hidden; }
|
||||||
#desk .ttl { position: absolute; left: 0; right: 0; text-align: center; font: 600 15px/40px var(--sans); color: #aab2c3; pointer-events: none; }
|
.win .view img { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: block; width: 1280px; height: 800px; }
|
||||||
#desk .view { position: relative; overflow: hidden; }
|
.win .view .clip { position: absolute; inset: 0; }
|
||||||
#desk .cam { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; }
|
.win .scanline { position: absolute; left: 0; height: 6px; background: linear-gradient(90deg, rgba(61,220,132,0), var(--green), rgba(61,220,132,0));
|
||||||
#desk .cam img { position: absolute; inset: 0; width: 1280px; height: 800px; opacity: 0; }
|
box-shadow: 0 0 30px 8px rgba(61,220,132,.45); opacity: 0; }
|
||||||
#desk .shade { position: absolute; inset: 0; background: rgba(0,0,0,.42); opacity: 0; }
|
.callout { position: absolute; z-index: 5; font: 800 34px/1 var(--display); color: #fff; background: var(--accent-2);
|
||||||
#desk .dlg { position: absolute; left: 50%; top: 50%; width: 560px; padding: 26px 26px 20px; border-radius: 16px; opacity: 0;
|
padding: 18px 28px; border-radius: 18px; white-space: nowrap; box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 3px rgba(255,255,255,.12);
|
||||||
background: rgba(44,46,54,.97); box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.16); color: #e8eaf0; text-align: center; }
|
transform-origin: 50% 100%; opacity: 0; }
|
||||||
#desk .dlg .ic { width: 64px; height: 64px; display: block; margin: 0 auto 12px; }
|
.callout.green { background: #15803d; }
|
||||||
#desk .dlg b { display: block; font: 700 21px/1.25 var(--sans); }
|
.ring { position: absolute; z-index: 4; border: 4px solid var(--accent); border-radius: 14px; opacity: 0;
|
||||||
#desk .dlg p { margin: 10px 0 0; font: 500 15px/1.4 var(--sans); color: #c9ccd6; }
|
box-shadow: 0 0 0 6px rgba(139,147,255,.25), 0 0 40px rgba(139,147,255,.5); }
|
||||||
#desk .dlg pre { margin: 12px 0 0; padding: 10px 12px; text-align: left; font: 500 13.5px/1.5 var(--mono); color: #b6bccb; background: rgba(0,0,0,.28);
|
.ring.green { border-color: var(--green); box-shadow: 0 0 0 6px rgba(61,220,132,.25), 0 0 40px rgba(61,220,132,.5); }
|
||||||
border-radius: 8px; white-space: pre; overflow: hidden; }
|
|
||||||
#desk .dlg .btns { display: flex; gap: 10px; margin-top: 18px; }
|
|
||||||
#desk .dlg .btns span { flex: 1; padding: 9px 0; border-radius: 8px; font: 600 15px/1 var(--sans); background: rgba(255,255,255,.12); }
|
|
||||||
#desk .dlg .btns .ok { background: #0a84ff; color: #fff; }
|
|
||||||
#desk .step { position: absolute; font: 700 30px/1.2 var(--sans); color: var(--ink-2); opacity: 0; white-space: nowrap; }
|
|
||||||
#desk .step i { font-style: normal; color: var(--accent); margin-right: 14px; font-family: var(--mono); }
|
|
||||||
#desk .link { position: absolute; display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 999px; opacity: 0;
|
|
||||||
font: 800 30px/1 var(--sans); color: #fff; background: linear-gradient(180deg, #6366f1, #4338ca);
|
|
||||||
box-shadow: 0 20px 60px -10px rgba(79,70,229,.9), 0 0 0 3px rgba(165,180,252,.35); white-space: nowrap; transform-origin: 100% 0; }
|
|
||||||
#desk .link .pill { font-size: 20px; }
|
|
||||||
|
|
||||||
/* end cards */
|
/* ---------- cursor (Phosphor navigation-arrow, fill) ---------- */
|
||||||
#submit, #brand { inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; }
|
#cursor { z-index: 55; width: 64px; height: 64px; left: 0; top: 0; opacity: 0;
|
||||||
#submit .kick { font: 700 40px/1.2 var(--sans); color: var(--muted); }
|
filter: drop-shadow(0 0 1.5px #000) drop-shadow(0 0 1.5px #000) drop-shadow(0 8px 12px rgba(0,0,0,.55)); }
|
||||||
#submit .btn { position: relative; margin: 46px 0 40px; padding: 40px 74px; border-radius: 999px; font: 800 70px/1 var(--sans); letter-spacing: -0.01em;
|
#cursor .pi { position: absolute; inset: 0; width: 100%; height: 100%; color: #fff; }
|
||||||
color: #fff; background: linear-gradient(180deg, #6366f1, #4338ca); box-shadow: 0 30px 90px -20px rgba(79,70,229,.9), inset 0 2px 0 rgba(255,255,255,.25), 0 0 0 3px rgba(165,180,252,.35); }
|
#click { z-index: 54; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 4px solid #fff; opacity: 0; left: 0; top: 0; }
|
||||||
#submit .ring { position: absolute; inset: -16px; border-radius: 999px; border: 4px solid rgba(165,180,252,.6); opacity: 0; }
|
|
||||||
#submit .yours { font: 900 120px/1 var(--sans); letter-spacing: -0.03em; color: var(--you-ink); }
|
|
||||||
#submit .yours .pill { font-size: 30px; padding: 10px 20px; vertical-align: 26px; margin-left: 10px; }
|
|
||||||
/* icons: Phosphor files in icons/ (tools/site-icons.ts), shown as masks in the element's background colour */
|
|
||||||
.pi { display: block; -webkit-mask: var(--pi) center / contain no-repeat; mask: var(--pi) center / contain no-repeat; }
|
|
||||||
#submit .fine { margin-top: 34px; font: 600 30px/1.3 var(--sans); color: var(--muted); }
|
|
||||||
/* the mask sits on the inner span: a filter on the masked element itself would be cut away by its own mask */
|
|
||||||
#cursor, #dcur { z-index: 45; width: 64px; height: 64px; opacity: 0;
|
|
||||||
filter: drop-shadow(0 0 1.5px #0b1120) drop-shadow(0 0 1.5px #0b1120) drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
|
|
||||||
#dcur { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
|
|
||||||
#cursor .pi, #dcur .pi { width: 100%; height: 100%; --pi: url(icons/navigation-arrow-fill.svg); background: #fff; }
|
|
||||||
|
|
||||||
#brand .mark { width: 220px; height: 220px; display: block; filter: drop-shadow(0 30px 60px rgba(79,70,229,.7)); }
|
/* ---------- submit + brand ---------- */
|
||||||
#brand .word { margin-top: 40px; font: 900 150px/1 var(--sans); letter-spacing: -0.045em; }
|
#sbtn { position: absolute; left: 50%; display: flex; align-items: center; gap: 22px; font: 800 58px/1 var(--display);
|
||||||
#brand .tag { margin-top: 30px; font: 600 42px/1.25 var(--sans); color: var(--ink-2); max-width: 860px; }
|
color: #fff; background: linear-gradient(#3b82f6, #2563eb); border-radius: 28px; padding: 40px 64px; letter-spacing: -0.01em;
|
||||||
#brand .tag b { color: var(--accent); font-weight: 800; }
|
box-shadow: 0 30px 80px rgba(37,99,235,.45), inset 0 2px 0 rgba(255,255,255,.25); white-space: nowrap; }
|
||||||
#brand .url { margin-top: 46px; font: 800 66px/1 var(--sans); color: var(--accent); letter-spacing: -0.01em; }
|
#sbtn .pi { font-size: 56px; }
|
||||||
#brand .meta { margin-top: 24px; font: 700 34px/1 var(--sans); color: var(--muted); letter-spacing: .02em; }
|
#sbtn .hov { position: absolute; inset: 0; border-radius: 28px; background: rgba(255,255,255,.14); opacity: 0; }
|
||||||
#brand .desk { margin-top: 18px; font: 700 34px/1 var(--sans); color: var(--ink-2); letter-spacing: .01em; }
|
#s-brand { text-align: center; }
|
||||||
#brand .inst { margin-top: 40px; font: 700 34px/1 var(--mono); padding: 22px 34px; border-radius: 20px; background: rgba(6,10,20,.92); border: 2px solid var(--line-2); color: var(--ink); }
|
#s-brand .wrap { position: absolute; left: 0; right: 0; top: 50%; }
|
||||||
#brand .inst span { color: var(--green); margin-right: 16px; }
|
#s-brand .mark { width: 240px; height: 240px; display: block; margin: 0 auto; filter: drop-shadow(0 30px 70px rgba(91,92,240,.7)); }
|
||||||
#brand > * { will-change: transform, opacity; }
|
#s-brand .word { margin-top: 36px; font: 900 150px/1 var(--display); letter-spacing: -0.05em; color: #fff; }
|
||||||
|
#s-brand .url { margin-top: 30px; font: 800 64px/1 var(--display); color: var(--accent); letter-spacing: -0.02em; }
|
||||||
/* vertical 1080 x 1920 */
|
#s-brand .plat { margin-top: 34px; font: 600 36px/1.3 var(--text); color: var(--ink-2); }
|
||||||
.v #caption { left: 80px; right: 80px; top: 250px; height: 330px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; font-size: 112px; }
|
#s-brand > .wrap > * { opacity: 0; }
|
||||||
.v #caption .sub { font-size: 30px; }
|
|
||||||
.v #term { left: 70px; width: 940px; top: 630px; height: 850px; }
|
|
||||||
.v #term .body { font-size: 28px; }
|
|
||||||
.v #term .pin { font-size: 26px; }
|
|
||||||
.v #quest { top: 900px; }
|
|
||||||
.v .panel { left: 104px; width: 872px; top: 1020px; }
|
|
||||||
.v #sizes { left: 110px; right: 110px; top: 1385px; }
|
|
||||||
|
|
||||||
/* horizontal 1920 x 1080 */
|
|
||||||
.h #caption { left: 120px; width: 760px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; font-size: 108px; }
|
|
||||||
.h #caption .sub { font-size: 28px; }
|
|
||||||
.h #term { left: 900px; width: 920px; top: 110px; height: 860px; }
|
|
||||||
.h .panel { left: 950px; width: 820px; top: 470px; }
|
|
||||||
.h #quest { top: 330px; }
|
|
||||||
.h #sizes { left: 120px; width: 700px; top: 760px; justify-content: flex-start; }
|
|
||||||
.h #brand .word { font-size: 140px; }
|
|
||||||
.h #brand .mark { width: 190px; height: 190px; }
|
|
||||||
.h #brand .tag { max-width: 1200px; margin-top: 24px; }
|
|
||||||
.h #brand .url { margin-top: 36px; }
|
|
||||||
.h #brand .desk { margin-top: 18px; font: 700 34px/1 var(--sans); color: var(--ink-2); letter-spacing: .01em; }
|
|
||||||
#brand .inst { margin-top: 32px; }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="stage">
|
<div id="stage">
|
||||||
<div id="bg"><div class="grid"></div><div class="glow g1"></div><div class="glow g2"></div><div class="glow g3"></div><div class="vig"></div></div>
|
<div id="bg"><div class="grid"></div><div class="glow g1"></div><div class="glow g2"></div><div class="glow g3"></div></div>
|
||||||
|
|
||||||
<div id="term">
|
<div class="scene" id="s-hook"><div class="cam">
|
||||||
<div class="bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span>
|
<div id="side">
|
||||||
<span class="agent"><i></i>your AI agent</span><span class="title">prism-puddle · scripted demo</span></div>
|
<div class="f on"><span class="pi i-tray"></span>Inbox<span class="n">3</span></div>
|
||||||
<div class="body"><div class="pin"></div><div class="lines"></div></div>
|
<div class="f">Flagged</div><div class="f">Sent</div><div class="f">Drafts</div><div class="f">Archive</div>
|
||||||
|
</div>
|
||||||
|
<div id="inbox">
|
||||||
|
<div class="top"><h1><span class="pi i-tray"></span>Inbox</h1><span class="cnt">0 new</span>
|
||||||
|
<span class="tools"><span class="pi i-search"></span><span class="pi i-compose"></span></span></div>
|
||||||
|
<div class="list"></div>
|
||||||
|
</div>
|
||||||
|
</div><div class="dim"></div></div>
|
||||||
|
|
||||||
|
<div class="scene" id="s-scan"><div class="cam"><div class="term" id="term"></div></div><div class="scrim"></div></div>
|
||||||
|
|
||||||
|
<div class="scene" id="s-fixed"><div class="cam">
|
||||||
|
<div class="term" id="rescan"></div>
|
||||||
|
<div id="frows"></div>
|
||||||
|
<div id="counter" class="abs"><div class="n">5</div><div class="lab">rejection risks</div></div>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div class="scene" id="s-shots"><div id="wall"></div><div class="scrim"></div>
|
||||||
|
<div class="pill abs" id="shotcount"><span class="num">0</span> store screenshots</div>
|
||||||
|
<div class="pill abs" id="shotcmd"><span class="ps">$</span> storebound shots render</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="prices" class="panel">
|
<div class="scene" id="s-decl">
|
||||||
<h4>Regional prices <span class="pill p-api">API</span></h4>
|
<div class="card" id="prop"><div class="ch"><span class="pi i-term"></span>storebound scan<span class="sub">declarations proposal</span></div><div class="body"></div></div>
|
||||||
<p class="ph">USD base · Play converts per region · your overrides</p>
|
<div class="card" id="form"><div class="ch">Data safety<span class="sub">Google Play</span></div><div class="body"></div></div>
|
||||||
<table><thead><tr><th>region</th><th>cur</th><th>remove_ads</th><th>drops_500</th></tr></thead><tbody></tbody></table>
|
<div class="pill abs" id="declcount"><span class="num">0</span> answers</div>
|
||||||
<div class="sum"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="langs" class="panel">
|
<div class="scene" id="s-desk1"></div>
|
||||||
<h4>Store listings <span class="pill p-api">API</span><span class="count">0/14</span></h4>
|
<div class="scene" id="s-desk2"></div>
|
||||||
<p class="ph">title · short + full description · keywords · per language</p>
|
<div class="scene" id="s-desk3"></div>
|
||||||
<div class="chips"></div>
|
|
||||||
|
<div class="scene" id="s-submit">
|
||||||
|
<div id="sbtn"><span class="pi i-send"></span>Submit for Review<span class="hov"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="quest" class="panel">
|
<div class="scene" id="s-brand"><div class="wrap">
|
||||||
<h4>Store questionnaires</h4>
|
<img class="mark" src="brand/logo-mark-256.png" alt="">
|
||||||
<p class="ph">API where the stores have one · a skill where they do not</p>
|
|
||||||
<div class="rows"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="shots"></div>
|
|
||||||
<div id="sizes"></div>
|
|
||||||
|
|
||||||
<div id="caption"></div>
|
|
||||||
|
|
||||||
<div id="desk">
|
|
||||||
<div class="win"><div class="tb"><span class="tl r"></span><span class="tl y"></span><span class="tl g"></span><span class="ttl">storebound</span></div>
|
|
||||||
<div class="view"><div class="cam"></div><div class="shade"></div>
|
|
||||||
<div class="dlg"><img class="ic" src="brand/logo-mark-256.png" width="64" height="64" alt="">
|
|
||||||
<b>Owner action: Apply the price sheet</b>
|
|
||||||
<p>Apply the price sheet · Prism Puddle</p>
|
|
||||||
<p>This is your decision: it changes what users get on the store right away. storebound does it only because you press the button below.</p>
|
|
||||||
<pre></pre>
|
|
||||||
<div class="btns"><span>Cancel</span><span class="ok">Yes: Apply the price sheet</span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="step"></div>
|
|
||||||
<div class="link">Submit for review<span class="pill p-you">YOUR CLICK</span></div>
|
|
||||||
<span id="dcur" aria-hidden="true"><span class="pi"></span></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="submit">
|
|
||||||
<div class="kick">storebound never presses Submit.</div>
|
|
||||||
<div class="btn"><span class="ring"></span>Submit for review</div>
|
|
||||||
<div class="yours">your click.<span class="pill p-you">YOU</span></div>
|
|
||||||
<div class="fine">Play: Send changes for review · App Store: Submit for Review</div>
|
|
||||||
</div>
|
|
||||||
<span id="cursor" aria-hidden="true"><span class="pi"></span></span>
|
|
||||||
|
|
||||||
<div id="brand">
|
|
||||||
<img class="mark" src="brand/logo-mark-256.png" width="256" height="256" alt="storebound logo">
|
|
||||||
<div class="word">storebound</div>
|
<div class="word">storebound</div>
|
||||||
<div class="tag">From zero to <b>“Submit for review”</b><br>on Google Play and the App Store.</div>
|
|
||||||
<div class="url">storebound.dev</div>
|
<div class="url">storebound.dev</div>
|
||||||
<div class="meta">open source · MIT</div>
|
<div class="plat">Open source · macOS · Windows · Linux</div>
|
||||||
<div class="desk">Desktop app for macOS, Windows, Linux</div>
|
</div></div>
|
||||||
<div class="inst"><span>$</span>bunx storebound init</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div id="cap"></div>
|
||||||
|
<span id="click"></span>
|
||||||
|
<span id="cursor" aria-hidden="true"><span class="pi i-cursor"></span></span>
|
||||||
|
<div id="vig"></div>
|
||||||
|
<div id="black"></div>
|
||||||
<div id="flash"></div>
|
<div id="flash"></div>
|
||||||
</div>
|
</div>
|
||||||
<script type="module" src="teaser.js"></script>
|
<script type="module" src="teaser.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
// Original teaser music, synthesized from nothing with the Web Audio API (OfflineAudioContext): no samples, no
|
// Original teaser music and sound design, synthesized from nothing with the Web Audio API (OfflineAudioContext): no
|
||||||
// downloaded audio. 128 BPM, F minor, tight 16th arpeggio, kick / hats / clap, offbeat bass, a pad, impacts on every
|
// samples, no downloaded audio. 128 BPM, F minor: a tense intro under the inbox, a hard cut to near silence for the
|
||||||
// scene cut (script.js CUTS), key clicks on every typed character, a riser into the end card. Deterministic (seeded).
|
// typed command, the groove from the Enter key on, a calm bar under the Submit button, the hit on the logo. On top:
|
||||||
|
// mail blips, key clicks, a whoosh into every whip / mask / zoom and a hit on every cut (script.js CUTS), ticks on
|
||||||
|
// every finding, rising chimes on every fix, ticks for the screenshot wall and the Data safety rows. Deterministic.
|
||||||
// renderWav() returns a 32-bit float stereo WAV (48 kHz) as base64; render.ts masters it with ffmpeg loudnorm.
|
// renderWav() returns a 32-bit float stereo WAV (48 kHz) as base64; render.ts masters it with ffmpeg loudnorm.
|
||||||
import { BAR, BEAT, CUTS, DURATION, keyTimes, scene } from './script.js';
|
import { B, BAR, BEAT, CUTS, DESKTOP, DURATION, ENTER_AT, keyTimes, scene, TICKS } from './script.js';
|
||||||
|
|
||||||
const SR = 48000;
|
const SR = 48000;
|
||||||
const midi = m => 440 * Math.pow(2, (m - 69) / 12);
|
const midi = m => 440 * Math.pow(2, (m - 69) / 12);
|
||||||
|
|
@ -13,9 +15,8 @@ function rng(seed) { // mulberry32
|
||||||
|
|
||||||
// chords per bar (root midi in octave 3, intervals)
|
// chords per bar (root midi in octave 3, intervals)
|
||||||
const CH = { Fm: [53, [0, 3, 7]], Db: [49, [0, 4, 7]], Ab: [56, [0, 4, 7]], Eb: [51, [0, 4, 7]] };
|
const CH = { Fm: [53, [0, 3, 7]], Db: [49, [0, 4, 7]], Ab: [56, [0, 4, 7]], Eb: [51, [0, 4, 7]] };
|
||||||
// prompt · config · prices · languages · questionnaires · shots · validate · desktop · submit · brand (script.js SCENES)
|
// 18 bars: hook (0-1) · command + scan (1-5) · fixed, shots, decl (6-10) · desktop (10-14) · submit (15-16) · brand (16-17)
|
||||||
const BARS = ['Ab', 'Eb', 'Fm', 'Db', 'Ab', 'Eb', 'Fm', 'Db', 'Ab', 'Eb', 'Fm', 'Db', 'Ab', 'Eb', 'Fm',
|
const BARS = ['Fm', 'Db', 'Fm', 'Db', 'Ab', 'Eb', 'Fm', 'Db', 'Ab', 'Eb', 'Fm', 'Db', 'Ab', 'Eb', 'Fm', 'Db', 'Eb', 'Fm'];
|
||||||
'Db', 'Ab', 'Eb', 'Fm', 'Eb', 'Eb', 'Db', 'Eb', 'Fm', 'Eb', 'Fm'];
|
|
||||||
const ARP = [0, 2, 4, 3, 5, 4, 2, 3, 0, 2, 4, 6, 5, 4, 3, 2];
|
const ARP = [0, 2, 4, 3, 5, 4, 2, 3, 0, 2, 4, 6, 5, 4, 3, 2];
|
||||||
|
|
||||||
export async function renderMusic() {
|
export async function renderMusic() {
|
||||||
|
|
@ -54,25 +55,56 @@ export async function renderMusic() {
|
||||||
}
|
}
|
||||||
const arpVerb = ctx.createGain(); arpVerb.gain.value = 0.18; arpLP.connect(arpVerb); arpVerb.connect(verbIn);
|
const arpVerb = ctx.createGain(); arpVerb.gain.value = 0.18; arpLP.connect(arpVerb); arpVerb.connect(verbIn);
|
||||||
|
|
||||||
// arp filter: closed intro, open drop, wide on the riser, dark under the Submit card, bright on the brand
|
// arp filter: closed under the inbox, open from the Enter key, wide into the Submit card, dark under it, bright on the logo
|
||||||
const f = arpLP.frequency;
|
const f = arpLP.frequency;
|
||||||
const at = s => scene(s).start;
|
const sub = scene('submit').start, brand = scene('brand').start;
|
||||||
f.setValueAtTime(420, 0);
|
f.setValueAtTime(380, 0);
|
||||||
f.exponentialRampToValueAtTime(2400, at('config') - 0.02);
|
f.exponentialRampToValueAtTime(900, B(7) - 0.01);
|
||||||
f.setValueAtTime(3000, at('config'));
|
f.setValueAtTime(2600, ENTER_AT);
|
||||||
f.linearRampToValueAtTime(3400, at('submit') - BAR);
|
f.linearRampToValueAtTime(3400, sub - BAR);
|
||||||
f.exponentialRampToValueAtTime(7000, at('submit') - 0.01);
|
f.exponentialRampToValueAtTime(7000, sub - 0.01);
|
||||||
f.setValueAtTime(900, at('submit'));
|
f.setValueAtTime(900, sub);
|
||||||
f.exponentialRampToValueAtTime(1800, at('brand') - 0.01);
|
f.exponentialRampToValueAtTime(1800, brand - 0.01);
|
||||||
f.setValueAtTime(4200, at('brand'));
|
f.setValueAtTime(4200, brand);
|
||||||
f.setValueAtTime(4200, at('brand') + BAR * 2);
|
f.exponentialRampToValueAtTime(900, DURATION);
|
||||||
f.exponentialRampToValueAtTime(800, DURATION);
|
|
||||||
|
|
||||||
const env = (g, t, a, peak, d, end = 0.0005) => {
|
const env = (g, t, a, peak, d, end = 0.0005) => {
|
||||||
g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(peak, t + a); g.gain.exponentialRampToValueAtTime(end, t + a + d);
|
g.gain.setValueAtTime(0, t); g.gain.linearRampToValueAtTime(peak, t + a); g.gain.exponentialRampToValueAtTime(end, t + a + d);
|
||||||
};
|
};
|
||||||
const noiseSrc = (t, dur, off = R() * 1.5) => { const s = ctx.createBufferSource(); s.buffer = noise; s.start(t, off, dur); return s; };
|
const noiseSrc = (t, dur, off = R() * 1.5) => { const s = ctx.createBufferSource(); s.buffer = noise; s.start(t, off, dur); return s; };
|
||||||
|
|
||||||
|
// sound effects bus (balanced under the music, before the master compressor)
|
||||||
|
const sfx = ctx.createGain(); sfx.gain.value = 0.85; sfx.connect(master);
|
||||||
|
const sfxVerb = ctx.createGain(); sfxVerb.gain.value = 0.35; sfxVerb.connect(verbIn);
|
||||||
|
function blip(t, m, g, len = 0.18, type = 'sine', pan = 0) {
|
||||||
|
const o = ctx.createOscillator(); o.type = type; o.frequency.value = midi(m);
|
||||||
|
const p = ctx.createStereoPanner(); p.pan.value = pan;
|
||||||
|
const v = ctx.createGain(); env(v, t, 0.003, g, len); o.connect(v); v.connect(p); p.connect(sfx); p.connect(sfxVerb);
|
||||||
|
o.start(t); o.stop(t + len + 0.05);
|
||||||
|
}
|
||||||
|
/** A mail arriving: a soft two-tone notification blip and a short swish. */
|
||||||
|
function mail(t) { blip(t, 84, 0.12, 0.16); blip(t + 0.075, 91, 0.1, 0.3); whoosh(t - 0.12, 0.14, 0.08, 1200, 6000); }
|
||||||
|
/** A finding landing: a low, slightly sour thud with a click on top. */
|
||||||
|
function bad(t) {
|
||||||
|
blip(t, 41, 0.3, 0.28, 'triangle'); blip(t, 47, 0.12, 0.2, 'square');
|
||||||
|
const n = noiseSrc(t, 0.03); const hp = ctx.createBiquadFilter(); hp.type = 'highpass'; hp.frequency.value = 2500;
|
||||||
|
const v = ctx.createGain(); env(v, t, 0.001, 0.25, 0.03); n.connect(hp); hp.connect(v); v.connect(sfx);
|
||||||
|
}
|
||||||
|
/** A fix: rising bell chimes (Ab major pentatonic), the fifth one brighter. */
|
||||||
|
const GOOD = [68, 70, 72, 75, 80];
|
||||||
|
function good(t, i) { blip(t, GOOD[i], 0.13, 0.5, 'sine', -0.3 + i * 0.15); blip(t, GOOD[i] + 12, 0.05, 0.35, 'triangle', 0.2); if (i === 4) { blip(t + 0.09, 84, 0.1, 0.8); blip(t + 0.09, 87, 0.07, 0.8); } }
|
||||||
|
/** A small UI pop (callouts). */
|
||||||
|
function pop(t) { const o = ctx.createOscillator(); o.type = 'sine'; o.frequency.setValueAtTime(520, t); o.frequency.exponentialRampToValueAtTime(1300, t + 0.07);
|
||||||
|
const v = ctx.createGain(); env(v, t, 0.002, 0.14, 0.09); o.connect(v); v.connect(sfx); o.start(t); o.stop(t + 0.15); }
|
||||||
|
/** A tick (screenshot tiles, checkboxes). */
|
||||||
|
function tick(t, g = 0.08, f0 = 3200) { const n = noiseSrc(t, 0.015); const bp = ctx.createBiquadFilter(); bp.type = 'bandpass'; bp.frequency.value = f0; bp.Q.value = 4;
|
||||||
|
const v = ctx.createGain(); env(v, t, 0.0006, g, 0.012); n.connect(bp); bp.connect(v); v.connect(sfx); }
|
||||||
|
/** A mouse click. */
|
||||||
|
function click(t) { tick(t, 0.22, 2400); tick(t + 0.055, 0.12, 1800); }
|
||||||
|
/** A sub drop for the hard cut. */
|
||||||
|
function thud(t, g = 0.7) { const o = ctx.createOscillator(); o.type = 'sine'; o.frequency.setValueAtTime(70, t); o.frequency.exponentialRampToValueAtTime(30, t + 0.6);
|
||||||
|
const v = ctx.createGain(); env(v, t, 0.004, g, 0.7); o.connect(v); v.connect(master); o.start(t); o.stop(t + 0.8); }
|
||||||
|
|
||||||
// ---- voices ----
|
// ---- voices ----
|
||||||
function kick(t, g = 1) {
|
function kick(t, g = 1) {
|
||||||
const o = ctx.createOscillator(); o.type = 'sine';
|
const o = ctx.createOscillator(); o.type = 'sine';
|
||||||
|
|
@ -168,56 +200,82 @@ export async function renderMusic() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- arrangement ----
|
// ---- arrangement ----
|
||||||
const sub = scene('submit').start, brand = scene('brand').start, drop = scene('config').start;
|
const cut = scene('scan').start; // the hook's hard cut to black
|
||||||
const rollBar = scene('submit').start - BAR; // last bar before the Submit card
|
const drop = ENTER_AT; // the Enter key: the groove starts
|
||||||
|
const roll = sub - BAR; // the bar before the Submit card
|
||||||
|
const music = ctx.createGain(); music.gain.value = 1; // the arrangement's gain: silent for the typed command
|
||||||
|
duck.disconnect(); duck.connect(music); drums.disconnect(); drums.connect(music); music.connect(master);
|
||||||
|
music.gain.setValueAtTime(1, 0); music.gain.setValueAtTime(1, cut - 0.01); music.gain.linearRampToValueAtTime(0.0, cut + 0.005);
|
||||||
|
music.gain.setValueAtTime(0.0, drop - 0.02); music.gain.linearRampToValueAtTime(1, drop);
|
||||||
duck.gain.setValueAtTime(1, 0);
|
duck.gain.setValueAtTime(1, 0);
|
||||||
const last = BARS.length - 1;
|
const last = BARS.length - 1;
|
||||||
for (let b = 0; b <= last; b++) {
|
for (let b = 0; b <= last; b++) {
|
||||||
const t0 = b * BAR, name = BARS[b], [root, iv] = CH[name];
|
const t0 = b * BAR, name = BARS[b], [root, iv] = CH[name];
|
||||||
const tones = [0, iv[1], iv[2], 12, 12 + iv[1], 12 + iv[2], 24].map(x => root + 12 + x);
|
const tones = [0, iv[1], iv[2], 12, 12 + iv[1], 12 + iv[2], 24].map(x => root + 12 + x);
|
||||||
const main = t0 >= drop && t0 < sub, end = b === last, calm = t0 >= sub && t0 < brand;
|
const calmBar = t0 >= sub && t0 < brand, end = b === last, intro = t0 < cut;
|
||||||
const groove = main || (t0 >= brand && !end);
|
if (!end) pad(t0, BAR, [root, root + iv[1], root + iv[2], root + 12], calmBar ? 0.06 : intro ? 0.05 : 0.035, calmBar ? 1100 : intro ? 900 : 1500);
|
||||||
// pad
|
else pad(t0, BAR * 0.9, [root, root + iv[1], root + iv[2], root + 12], 0.05, 1600);
|
||||||
if (!end) pad(t0, BAR, [root, root + iv[1], root + iv[2], root + 12], calm ? 0.06 : t0 < drop ? 0.045 : 0.035, calm ? 1100 : 1500);
|
|
||||||
for (let s = 0; s < 16; s++) {
|
for (let s = 0; s < 16; s++) {
|
||||||
const t = t0 + s * BEAT / 4;
|
const t = t0 + s * BEAT / 4;
|
||||||
const beat = s % 4 === 0, off = s % 4 === 2;
|
const beat = s % 4 === 0, off = s % 4 === 2, calm = t >= sub && t < brand;
|
||||||
const cutDrums = t0 === rollBar && s >= 8; // drums drop out for the last half bar of the riser
|
const groove = t >= drop - 0.001 && t < sub && !(t >= roll + BAR / 2);
|
||||||
// arp
|
|
||||||
if (!end) {
|
if (!end) {
|
||||||
if (calm) { if (s % 2 === 0) arpNote(t, tones[ARP[s]] ?? root, 0.09, 0.3); }
|
if (calm) { if (s % 2 === 0) arpNote(t, tones[ARP[s]] ?? root, 0.08, 0.3); }
|
||||||
else arpNote(t, tones[ARP[s]] ?? root, t0 < drop ? 0.08 : 0.11, 0.16);
|
else if (t < cut) arpNote(t, tones[ARP[s]] ?? root, 0.07, 0.14);
|
||||||
|
else if (t >= drop) arpNote(t, tones[ARP[s]] ?? root, 0.1, 0.16);
|
||||||
}
|
}
|
||||||
if (groove && !cutDrums) {
|
if (intro && s % 2 === 0) hat(t, s % 4 === 0 ? 0.05 : 0.025, 0.1);
|
||||||
|
if (intro && beat) { const o = ctx.createOscillator(); o.type = 'sine'; o.frequency.setValueAtTime(58, t); o.frequency.exponentialRampToValueAtTime(40, t + 0.2);
|
||||||
|
const v = ctx.createGain(); env(v, t, 0.004, 0.35, 0.3); o.connect(v); v.connect(drums); o.start(t); o.stop(t + 0.4); }
|
||||||
|
if (groove) {
|
||||||
if (beat) kick(t);
|
if (beat) kick(t);
|
||||||
if (off) { hat(t, 0.14, 0.2); bass(t, root - 12); }
|
if (off) { hat(t, 0.13, 0.2); bass(t, root - 12); } else if (!beat) hat(t, 0.04, -0.2);
|
||||||
else if (!beat) hat(t, 0.045, -0.2);
|
if (t >= drop + BAR && (s === 4 || s === 12)) clap(t, 0.32);
|
||||||
if (t0 >= drop + BAR * 2 && (s === 4 || s === 12)) clap(t);
|
|
||||||
}
|
}
|
||||||
if (calm && off) hat(t, 0.05, 0.15);
|
if (calm && off) hat(t, 0.045, 0.15);
|
||||||
if (b === 1 && s >= 8 && s % 2 === 0) hat(t, 0.02 + 0.06 * (s - 8) / 8, 0); // intro tick-in
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// snare roll + riser into the Submit card
|
// snare roll + riser into the Submit card
|
||||||
for (let i = 0; i < 8; i++) snare(rollBar + i * BEAT / 4, 0.04 + 0.1 * i / 7);
|
for (let i = 0; i < 8; i++) snare(roll + i * BEAT / 4, 0.04 + 0.09 * i / 7);
|
||||||
for (let i = 0; i < 16; i++) snare(rollBar + BAR / 2 + i * BEAT / 8, 0.14 + 0.18 * i / 15);
|
for (let i = 0; i < 16; i++) snare(roll + BAR / 2 + i * BEAT / 8, 0.12 + 0.16 * i / 15);
|
||||||
riser(rollBar, BAR);
|
riser(roll, BAR, 0.06);
|
||||||
riser(brand - BAR / 2, BAR / 2, 0.05);
|
riser(brand - BAR / 2, BAR / 2, 0.045);
|
||||||
whoosh(drop - BAR / 2, BAR / 2, 0.25);
|
|
||||||
// hits on the cuts
|
// ---- sound design on the cuts ----
|
||||||
|
// the hook: mails, then the two slams; the hard cut drops to silence with a sub thud
|
||||||
|
for (const t of TICKS.filter(x => x.kind === 'mail').map(x => x.t)) mail(t);
|
||||||
|
impact(B(3), true); stab(B(3), 'Db', 0.07); snare(B(3), 0.3);
|
||||||
|
impact(B(4), true); stab(B(4), 'Fm', 0.09); kick(B(4), 1); clap(B(4), 0.4);
|
||||||
|
riser(B(5), B(2) - 0.02, 0.035);
|
||||||
|
thud(cut, 0.55);
|
||||||
|
// the Enter key
|
||||||
|
click(drop - 0.01); impact(drop, true); stab(drop, 'Fm', 0.07);
|
||||||
|
// every later cut: a whoosh into it and a hit on it
|
||||||
for (const c of CUTS) {
|
for (const c of CUTS) {
|
||||||
const big = c === sub || c === brand;
|
if (c.kind === 'hard' || c.t === drop) continue;
|
||||||
if (!big && c !== drop) whoosh(c - 0.32, 0.32, 0.16, 800, 6000);
|
const big = c.id === 'submit' || c.id === 'brand';
|
||||||
impact(c, big || c === drop);
|
if (c.kind.startsWith('whip')) whoosh(c.t - 0.3, 0.32, 0.2, 700, 7500);
|
||||||
|
else if (c.kind === 'iris' || c.kind === 'wipe') whoosh(c.t - 0.22, 0.42, 0.14, 300, 3500);
|
||||||
|
else if (c.kind === 'zoom') whoosh(c.t - 0.36, 0.36, 0.22, 400, 9000);
|
||||||
|
impact(c.t, big);
|
||||||
}
|
}
|
||||||
stab(drop, 'Fm', 0.06);
|
stab(sub, 'Db', 0.09);
|
||||||
stab(sub, 'Db', 0.1);
|
stab(brand, 'Fm', 0.1); kick(brand, 1);
|
||||||
stab(brand, 'Fm', 0.1);
|
// ticks: SDKs and the risks line (soft), findings (bad), fixes (good), callouts (pop)
|
||||||
stab(last * BAR, 'Fm', 0.11);
|
for (const x of TICKS) {
|
||||||
impact(last * BAR, true);
|
if (x.kind === 'soft') tick(x.t, 0.12, 2600);
|
||||||
kick(last * BAR, 1);
|
else if (x.kind === 'bad') bad(x.t);
|
||||||
// key clicks
|
else if (x.kind === 'good') good(x.t, x.step);
|
||||||
for (const t of keyTimes()) key(t, t < drop ? 0.16 : 0.07);
|
else if (x.kind === 'pop') pop(x.t);
|
||||||
|
}
|
||||||
|
// the screenshot wall (tiles pop for 1.5 s) and the Data safety rows
|
||||||
|
const shots = scene('shots').start, decl = scene('decl').start;
|
||||||
|
for (let i = 0; i < 26; i++) tick(shots + 0.14 + i * 0.058, 0.05 + 0.03 * Math.sin(i), 2800 + (i % 5) * 300);
|
||||||
|
for (let i = 0; i < 7; i++) { tick(decl + 0.95 + i * 0.16, 0.12, 2000); blip(decl + 0.95 + i * 0.16, 79 + (i % 3) * 2, 0.035, 0.08); }
|
||||||
|
// the mouse click on "Scan again" in the desktop Checks tab
|
||||||
|
click(scene('desk3').start + DESKTOP.desk3.cursor[1][0] + 0.02);
|
||||||
|
// key clicks: the typed command loud (the only sound there), the re-scan softer
|
||||||
|
for (const t of keyTimes()) key(t, t < drop ? 0.24 : 0.08);
|
||||||
|
|
||||||
const buf = await ctx.startRendering();
|
const buf = await ctx.startRendering();
|
||||||
const n = Math.round(DURATION * SR);
|
const n = Math.round(DURATION * SR);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
// Renders the storebound teaser: frames from index.html (Playwright, headless Chrome) piped into ffmpeg, plus the
|
// Renders the storebound teaser: frames from index.html (Playwright, headless Chrome) piped into ffmpeg, plus the
|
||||||
// original music (music.js, OfflineAudioContext in the same browser), mastered to about -14 LUFS.
|
// original music and sound design (music.js, OfflineAudioContext in the same browser), mastered to about -14 LUFS.
|
||||||
// bun media/teaser/render.ts both formats, music, posters -> media/teaser/out/
|
// Frames are captured at 60 fps and blended in pairs down to 30 fps (a 180° shutter), so fast moves get real motion blur.
|
||||||
// bun media/teaser/render.ts --only v vertical only (v = 1080x1920, h = 1920x1080)
|
// bun media/teaser/render.ts both formats, sound, posters, web version -> media/teaser/out/
|
||||||
|
// bun media/teaser/render.ts --only v vertical only (v = 1080x1920, h = 1920x1080; the web version needs h)
|
||||||
// bun media/teaser/render.ts --stills 1,9.5,30 PNG stills only (out/stills/), quick layout check
|
// bun media/teaser/render.ts --stills 1,9.5,30 PNG stills only (out/stills/), quick layout check
|
||||||
// bun media/teaser/render.ts --desktop capture the desktop app frames again first (desktop.ts)
|
// bun media/teaser/render.ts --desktop capture the desktop app frames again first (desktop.ts)
|
||||||
// bun media/teaser/render.ts --serve preview server: open /index.html?w=1080&h=1920&play=1
|
// bun media/teaser/render.ts --serve preview server: open /index.html?w=1080&h=1920&play=1
|
||||||
// Needs ffmpeg and Playwright (devDependency; Playwright's Chromium or an installed Google Chrome).
|
// Needs ffmpeg and Playwright (devDependency; Playwright's Chromium or an installed Google Chrome).
|
||||||
import { existsSync, mkdirSync, statSync } from 'node:fs';
|
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { launch } from '../../cli/shots/browser';
|
import { launch } from '../../cli/shots/browser';
|
||||||
import { captureDesktop } from './desktop';
|
import { captureDesktop } from './desktop';
|
||||||
|
|
@ -19,29 +20,38 @@ const ASSETS = join(OUT, 'assets');
|
||||||
const args = process.argv.slice(2);
|
const args = process.argv.slice(2);
|
||||||
const opt = (k: string): string | undefined => { const i = args.indexOf(`--${k}`); return i >= 0 ? args[i + 1] : undefined; };
|
const opt = (k: string): string | undefined => { const i = args.indexOf(`--${k}`); return i >= 0 ? args[i + 1] : undefined; };
|
||||||
const FORMATS = [{ id: 'v', w: 1080, h: 1920 }, { id: 'h', w: 1920, h: 1080 }].filter(f => !opt('only') || opt('only') === f.id);
|
const FORMATS = [{ id: 'v', w: 1080, h: 1920 }, { id: 'h', w: 1920, h: 1080 }].filter(f => !opt('only') || opt('only') === f.id);
|
||||||
|
const CAPTURE_FPS = 60;
|
||||||
const log = (m: string): void => console.log(`${new Date().toISOString().slice(11, 19)} [teaser] ${m}`);
|
const log = (m: string): void => console.log(`${new Date().toISOString().slice(11, 19)} [teaser] ${m}`);
|
||||||
|
|
||||||
function sh(cmd: string[], input?: Uint8Array): void {
|
function sh(cmd: string[], input?: Uint8Array): string {
|
||||||
const r = Bun.spawnSync(cmd, { stdin: input, stdout: 'pipe', stderr: 'pipe' });
|
const r = Bun.spawnSync(cmd, { stdin: input, stdout: 'pipe', stderr: 'pipe' });
|
||||||
if (r.exitCode !== 0) throw new Error(`${cmd.slice(0, 3).join(' ')} failed:\n${r.stderr.toString().slice(-2000)}`);
|
if (r.exitCode !== 0) throw new Error(`${cmd.slice(0, 3).join(' ')} failed:\n${r.stderr.toString().slice(-2000)}`);
|
||||||
|
return r.stderr.toString();
|
||||||
}
|
}
|
||||||
const ff = (...a: string[]): void => sh(['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', ...a]);
|
const ff = (...a: string[]): string => sh(['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', ...a]);
|
||||||
|
|
||||||
/** Screenshots used by the store-art scene: the demo game's real renders, or crops of docs/img/showcase.jpg. */
|
/** The screenshot wall: the demo game's real store renders (4 languages, two sets), or crops of docs/img/showcase.jpg. */
|
||||||
function prepAssets(): void {
|
function prepAssets(): void {
|
||||||
mkdirSync(ASSETS, { recursive: true });
|
const dir = join(ASSETS, 'grid');
|
||||||
const names = ['en-01', 'en-02', 'en-03', 'en-04', 'tr-01', 'ja-01', 'ar-01'];
|
rmSync(dir, { recursive: true, force: true });
|
||||||
|
mkdirSync(dir, { recursive: true });
|
||||||
const renders = join(ROOT, 'examples/demo-game/store/renders');
|
const renders = join(ROOT, 'examples/demo-game/store/renders');
|
||||||
const src = (n: string): string => { const [l, k] = n.split('-'); return join(renders, l!, 'play', `${k}.png`); };
|
const files: string[] = [];
|
||||||
if (names.every(n => existsSync(src(n)))) {
|
for (const set of ['', 'b/']) for (const lang of ['en', 'tr', 'ja', 'ar']) for (const n of ['01', '02', '03', '04']) {
|
||||||
for (const n of names) ff('-i', src(n), '-vf', 'scale=720:1280:flags=lanczos', '-q:v', '2', join(ASSETS, `${n}.jpg`));
|
const src = join(renders, `${set}${lang}`, 'play', `${n}.png`);
|
||||||
log('assets: demo game renders (examples/demo-game/store/renders)');
|
if (!existsSync(src)) continue;
|
||||||
} else {
|
const name = `${set ? 'b-' : ''}${lang}-${n}.jpg`;
|
||||||
|
ff('-i', src, '-vf', 'scale=360:640:flags=lanczos', '-q:v', '3', join(dir, name));
|
||||||
|
files.push(name);
|
||||||
|
}
|
||||||
|
if (files.length) log(`assets: ${files.length} demo game renders (examples/demo-game/store/renders)`);
|
||||||
|
else {
|
||||||
// showcase.jpg: 7 panes (en 01-04, tr, ja, ar hero), 263 x 571 each, 283 px apart, from (20, 20)
|
// showcase.jpg: 7 panes (en 01-04, tr, ja, ar hero), 263 x 571 each, 283 px apart, from (20, 20)
|
||||||
const show = join(ROOT, 'docs/img/showcase.jpg');
|
const show = join(ROOT, 'docs/img/showcase.jpg');
|
||||||
names.forEach((n, i) => ff('-i', show, '-vf', `crop=263:468:${20 + i * 283}:20,scale=720:1280:flags=lanczos`, '-q:v', '2', join(ASSETS, `${n}.jpg`)));
|
for (let i = 0; i < 7; i++) { const name = `show-${i}.jpg`; ff('-i', show, '-vf', `crop=263:468:${20 + i * 283}:20,scale=360:640:flags=lanczos`, '-q:v', '3', join(dir, name)); files.push(name); }
|
||||||
log('assets: demo renders not found, using crops of docs/img/showcase.jpg (run the demo\'s `shots render` for sharper art)');
|
log('assets: demo renders not found, using crops of docs/img/showcase.jpg (run the demo\'s `shots render` for the real wall)');
|
||||||
}
|
}
|
||||||
|
writeFileSync(join(ASSETS, 'grid.json'), `${JSON.stringify(files)}\n`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function serve(): ReturnType<typeof Bun.serve> {
|
function serve(): ReturnType<typeof Bun.serve> {
|
||||||
|
|
@ -51,7 +61,7 @@ function serve(): ReturnType<typeof Bun.serve> {
|
||||||
const p = decodeURIComponent(new URL(req.url).pathname).replace(/^\/+/, '') || 'index.html';
|
const p = decodeURIComponent(new URL(req.url).pathname).replace(/^\/+/, '') || 'index.html';
|
||||||
if (p.includes('..')) return new Response('no', { status: 400 });
|
if (p.includes('..')) return new Response('no', { status: 400 });
|
||||||
// the logo comes from the repo's brand/ folder (tools/brand-assets.py), not a copy
|
// the logo comes from the repo's brand/ folder (tools/brand-assets.py), not a copy
|
||||||
const f = Bun.file(p.startsWith('brand/') ? join(DIR, '../..', p) : join(DIR, p));
|
const f = Bun.file(p.startsWith('brand/') ? join(ROOT, p) : join(DIR, p));
|
||||||
return f.size ? new Response(f) : new Response('not found', { status: 404 });
|
return f.size ? new Response(f) : new Response('not found', { status: 404 });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -60,7 +70,6 @@ function serve(): ReturnType<typeof Bun.serve> {
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
mkdirSync(OUT, { recursive: true });
|
mkdirSync(OUT, { recursive: true });
|
||||||
prepAssets();
|
prepAssets();
|
||||||
// the desktop scene's frames: the real app in fixture mode (desktop.ts); --desktop captures them again
|
|
||||||
if (args.includes('--desktop') || !existsSync(join(OUT, 'desktop/boxes.json'))) await captureDesktop();
|
if (args.includes('--desktop') || !existsSync(join(OUT, 'desktop/boxes.json'))) await captureDesktop();
|
||||||
const server = serve();
|
const server = serve();
|
||||||
const base = `http://127.0.0.1:${server.port}/index.html`;
|
const base = `http://127.0.0.1:${server.port}/index.html`;
|
||||||
|
|
@ -71,9 +80,11 @@ async function main(): Promise<void> {
|
||||||
const stills = opt('stills');
|
const stills = opt('stills');
|
||||||
for (const f of FORMATS) {
|
for (const f of FORMATS) {
|
||||||
const page = await browser.newPage({ viewport: { width: f.w, height: f.h }, deviceScaleFactor: 1 });
|
const page = await browser.newPage({ viewport: { width: f.w, height: f.h }, deviceScaleFactor: 1 });
|
||||||
page.on('pageerror', (e: Error) => console.error('page error:', e.message));
|
const errors: string[] = [];
|
||||||
|
page.on('pageerror', (e: Error) => errors.push(e.message));
|
||||||
|
page.on('response', (r: any) => { if (r.status() >= 400 && !r.url().endsWith('/favicon.ico')) errors.push(`${r.status()} ${r.url()}`); });
|
||||||
await page.goto(`${base}?w=${f.w}&h=${f.h}`);
|
await page.goto(`${base}?w=${f.w}&h=${f.h}`);
|
||||||
await page.waitForFunction('window.teaser'); // teaser.js loads out/desktop/boxes.json first
|
await page.waitForFunction('window.teaser', null, { timeout: 30_000 });
|
||||||
await page.evaluate('window.teaser.ready');
|
await page.evaluate('window.teaser.ready');
|
||||||
const { DURATION, FPS } = await page.evaluate('({ DURATION: teaser.DURATION, FPS: teaser.FPS })') as { DURATION: number; FPS: number };
|
const { DURATION, FPS } = await page.evaluate('({ DURATION: teaser.DURATION, FPS: teaser.FPS })') as { DURATION: number; FPS: number };
|
||||||
const shot = async (t: number): Promise<Buffer> => {
|
const shot = async (t: number): Promise<Buffer> => {
|
||||||
|
|
@ -82,47 +93,50 @@ async function main(): Promise<void> {
|
||||||
};
|
};
|
||||||
if (stills) {
|
if (stills) {
|
||||||
mkdirSync(join(OUT, 'stills'), { recursive: true });
|
mkdirSync(join(OUT, 'stills'), { recursive: true });
|
||||||
for (const t of stills.split(',').map(Number)) {
|
for (const t of stills.split(',').map(Number)) await Bun.write(join(OUT, 'stills', `${f.id}-${t.toFixed(2)}.png`), await shot(t));
|
||||||
await Bun.write(join(OUT, 'stills', `${f.id}-${t.toFixed(2)}.png`), await shot(t));
|
|
||||||
}
|
|
||||||
log(`${f.id}: ${stills.split(',').length} stills in out/stills`);
|
log(`${f.id}: ${stills.split(',').length} stills in out/stills`);
|
||||||
|
if (errors.length) throw new Error(`page errors:\n ${errors.join('\n ')}`);
|
||||||
await page.close();
|
await page.close();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const frames = Math.round(DURATION * FPS);
|
// 60 fps capture, then each pair of frames is averaged into one 30 fps frame (motion blur on fast moves)
|
||||||
|
const frames = Math.round(DURATION * CAPTURE_FPS);
|
||||||
const silent = join(OUT, `teaser-${f.w}x${f.h}-silent.mp4`);
|
const silent = join(OUT, `teaser-${f.w}x${f.h}-silent.mp4`);
|
||||||
const enc = Bun.spawn(['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', '-f', 'image2pipe', '-framerate', String(FPS), '-c:v', 'png', '-i', '-',
|
const enc = Bun.spawn(['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', '-f', 'image2pipe', '-framerate', String(CAPTURE_FPS), '-c:v', 'png', '-i', '-',
|
||||||
'-c:v', 'libx264', '-profile:v', 'high', '-preset', 'slow', '-crf', '17', '-pix_fmt', 'yuv420p', '-r', String(FPS),
|
'-vf', `tmix=frames=2:weights='1 1',select='not(mod(n\\,2))',setpts=N/${FPS}/TB`, '-r', String(FPS),
|
||||||
|
'-c:v', 'libx264', '-profile:v', 'high', '-preset', 'slow', '-crf', '16', '-pix_fmt', 'yuv420p',
|
||||||
'-g', String(FPS * 2), '-movflags', '+faststart', silent], { stdin: 'pipe', stdout: 'inherit', stderr: 'inherit' });
|
'-g', String(FPS * 2), '-movflags', '+faststart', silent], { stdin: 'pipe', stdout: 'inherit', stderr: 'inherit' });
|
||||||
const t0 = Date.now();
|
const t0 = Date.now();
|
||||||
for (let i = 0; i < frames; i++) {
|
for (let i = 0; i < frames; i++) {
|
||||||
enc.stdin.write(await shot(i / FPS));
|
// frame i shows t = (i + 1) / 60 blended with i / 60: the pair (2k, 2k+1) becomes output frame k
|
||||||
if (i % 60 === 0 || i === frames - 1) {
|
enc.stdin.write(await shot(i / CAPTURE_FPS));
|
||||||
|
if (i % 120 === 0 || i === frames - 1) {
|
||||||
const el = (Date.now() - t0) / 1000;
|
const el = (Date.now() - t0) / 1000;
|
||||||
log(`${f.id}: frame ${i + 1}/${frames} · ${el.toFixed(0)}s · eta ${((frames - i - 1) * el / (i + 1)).toFixed(0)}s`);
|
log(`${f.id}: frame ${i + 1}/${frames} · ${el.toFixed(0)}s · eta ${((frames - i - 1) * el / (i + 1)).toFixed(0)}s`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await enc.stdin.end();
|
await enc.stdin.end();
|
||||||
if (await enc.exited !== 0) throw new Error('ffmpeg encode failed');
|
if (await enc.exited !== 0) throw new Error('ffmpeg encode failed');
|
||||||
|
if (errors.length) throw new Error(`page errors:\n ${[...new Set(errors)].join('\n ')}`);
|
||||||
ff('-ss', String(DURATION - 0.5), '-i', silent, '-frames:v', '1', '-q:v', '3', join(OUT, `poster-${f.w}x${f.h}.jpg`));
|
ff('-ss', String(DURATION - 0.5), '-i', silent, '-frames:v', '1', '-q:v', '3', join(OUT, `poster-${f.w}x${f.h}.jpg`));
|
||||||
log(`${f.id}: ${silent} (${(statSync(silent).size / 1e6).toFixed(1)} MB)`);
|
log(`${f.id}: ${silent} (${(statSync(silent).size / 1e6).toFixed(1)} MB)`);
|
||||||
await page.close();
|
await page.close();
|
||||||
}
|
}
|
||||||
if (stills || args.includes('--no-audio')) return;
|
if (stills || args.includes('--no-audio')) return;
|
||||||
|
|
||||||
// music
|
// music + sound design
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
await page.goto(base);
|
await page.goto(base);
|
||||||
log('music: rendering (OfflineAudioContext)');
|
log('sound: rendering (OfflineAudioContext)');
|
||||||
const wav = await page.evaluate(`import('./music.js').then(m => m.renderWav())`) as { base64: string; peak: number; seconds: number };
|
const wav = await page.evaluate(`import('./music.js').then(m => m.renderWav())`) as { base64: string; peak: number; seconds: number };
|
||||||
log(`music: ${wav.seconds.toFixed(2)} s, raw peak ${wav.peak.toFixed(3)}`);
|
log(`sound: ${wav.seconds.toFixed(2)} s, raw peak ${wav.peak.toFixed(3)}`);
|
||||||
const raw = join(OUT, 'music-raw.wav'), music = join(OUT, 'music.wav');
|
const raw = join(OUT, 'music-raw.wav'), music = join(OUT, 'music.wav');
|
||||||
await Bun.write(raw, Buffer.from(wav.base64, 'base64'));
|
await Bun.write(raw, Buffer.from(wav.base64, 'base64'));
|
||||||
const dur = wav.seconds;
|
const dur = wav.seconds;
|
||||||
// two-pass loudnorm to -14 LUFS / -1 dBTP, then a 2 s fade out
|
// two-pass loudnorm to -14 LUFS / -1.5 dBTP, then a short fade out
|
||||||
const m = Bun.spawnSync(['ffmpeg', '-hide_banner', '-i', raw, '-af', 'loudnorm=I=-14:TP=-1.5:LRA=11:print_format=json', '-f', 'null', '-'], { stderr: 'pipe' });
|
const m = Bun.spawnSync(['ffmpeg', '-hide_banner', '-i', raw, '-af', 'loudnorm=I=-14:TP=-1.5:LRA=11:print_format=json', '-f', 'null', '-'], { stderr: 'pipe' });
|
||||||
const j = JSON.parse(m.stderr.toString().match(/\{[\s\S]*?\}/)![0]) as Record<string, string>;
|
const j = JSON.parse(m.stderr.toString().match(/\{[\s\S]*?\}/)![0]) as Record<string, string>;
|
||||||
ff('-i', raw, '-af', `loudnorm=I=-14:TP=-1.5:LRA=11:measured_I=${j.input_i}:measured_TP=${j.input_tp}:measured_LRA=${j.input_lra}:measured_thresh=${j.input_thresh}:offset=${j.target_offset}:linear=true,afade=t=out:st=${(dur - 2).toFixed(2)}:d=2,aresample=48000`,
|
ff('-i', raw, '-af', `loudnorm=I=-14:TP=-1.5:LRA=11:measured_I=${j.input_i}:measured_TP=${j.input_tp}:measured_LRA=${j.input_lra}:measured_thresh=${j.input_thresh}:offset=${j.target_offset}:linear=true,afade=t=out:st=${(dur - 1.2).toFixed(2)}:d=1.2,aresample=48000`,
|
||||||
'-c:a', 'pcm_s16le', '-ar', '48000', '-ac', '2', music);
|
'-c:a', 'pcm_s16le', '-ar', '48000', '-ac', '2', music);
|
||||||
for (const f of FORMATS) {
|
for (const f of FORMATS) {
|
||||||
const silent = join(OUT, `teaser-${f.w}x${f.h}-silent.mp4`), out = join(OUT, `teaser-${f.w}x${f.h}.mp4`);
|
const silent = join(OUT, `teaser-${f.w}x${f.h}-silent.mp4`), out = join(OUT, `teaser-${f.w}x${f.h}.mp4`);
|
||||||
|
|
@ -130,6 +144,19 @@ async function main(): Promise<void> {
|
||||||
ff('-i', silent, '-i', music, '-map', '0:v', '-map', '1:a', '-c:v', 'copy', '-c:a', 'aac', '-b:a', '192k', '-ar', '48000', '-ac', '2', '-shortest', '-movflags', '+faststart', out);
|
ff('-i', silent, '-i', music, '-map', '0:v', '-map', '1:a', '-c:v', 'copy', '-c:a', 'aac', '-b:a', '192k', '-ar', '48000', '-ac', '2', '-shortest', '-movflags', '+faststart', out);
|
||||||
log(`${out} (${(statSync(out).size / 1e6).toFixed(1)} MB)`);
|
log(`${out} (${(statSync(out).size / 1e6).toFixed(1)} MB)`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// web version for the site: 1280x720 H.264, about 3.5 MB (two-pass), plus its poster
|
||||||
|
const h = join(OUT, 'teaser-1920x1080.mp4');
|
||||||
|
if (existsSync(h)) {
|
||||||
|
const web = join(OUT, 'teaser-web.mp4'), pass = join(OUT, 'web-pass');
|
||||||
|
const kbps = Math.floor((3.5e6 * 8) / dur / 1000) - 96;
|
||||||
|
const common = ['-vf', 'scale=1280:720:flags=lanczos', '-c:v', 'libx264', '-profile:v', 'high', '-preset', 'slow', '-b:v', `${kbps}k`, '-maxrate', `${Math.round(kbps * 1.8)}k`, '-bufsize', `${kbps * 3}k`, '-pix_fmt', 'yuv420p', '-g', '60', '-passlogfile', pass];
|
||||||
|
ff('-i', h, ...common, '-pass', '1', '-an', '-f', 'mp4', '/dev/null');
|
||||||
|
ff('-i', h, ...common, '-pass', '2', '-c:a', 'aac', '-b:a', '96k', '-ac', '2', '-movflags', '+faststart', web);
|
||||||
|
for (const x of readdirSync(OUT)) if (x.startsWith('web-pass')) rmSync(join(OUT, x));
|
||||||
|
ff('-ss', String(dur - 0.5), '-i', web, '-frames:v', '1', '-q:v', '4', join(OUT, 'poster-web.jpg'));
|
||||||
|
log(`${web} (${(statSync(web).size / 1e6).toFixed(2)} MB, ${kbps} kbps video) + poster-web.jpg`);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
await browser.close();
|
await browser.close();
|
||||||
server.stop(true);
|
server.stop(true);
|
||||||
|
|
|
||||||
|
|
@ -1,166 +1,167 @@
|
||||||
// Teaser timeline: the single source of truth for the picture (teaser.js) and the music (music.js).
|
// Teaser timeline: the single source of truth for the picture (teaser.js) and the sound (music.js).
|
||||||
// Everything is a pure function of time, so a frame at t always looks the same and the hits land on the cuts.
|
// Every frame is a pure function of time; every cut sits on a beat of the 128 BPM grid, and the sound effects (whoosh,
|
||||||
// The terminal text is scripted, modelled on real storebound output for the demo game (examples/demo-game,
|
// tick, hit) are placed from the same numbers, so they land on the cuts.
|
||||||
// placeholder ids, dry runs). Nothing here talks to a store.
|
//
|
||||||
|
// The scan text is the real `storebound scan` output of tests/fixtures/scan/teaser (before) and teaser-fixed (after
|
||||||
|
// the five fixes); tests/teaser.test.ts runs the scan and checks every line shown here against it.
|
||||||
|
|
||||||
export const BPM = 128;
|
export const BPM = 128;
|
||||||
export const BEAT = 60 / BPM; // 0.46875 s
|
export const BEAT = 60 / BPM; // 0.46875 s
|
||||||
export const BAR = BEAT * 4; // 1.875 s
|
export const BAR = BEAT * 4; // 1.875 s
|
||||||
export const FPS = 30;
|
export const FPS = 30;
|
||||||
export const BARS = 26;
|
export const B = n => n * BEAT; // beats -> seconds
|
||||||
export const DURATION = BARS * BAR; // 48.75 s
|
export const BEATS = 72; // 18 bars
|
||||||
|
export const DURATION = B(BEATS); // 33.75 s
|
||||||
|
|
||||||
/** Scenes in bars; start/end in seconds are derived below. */
|
/** Scenes in beats (start, end). Cuts: the hook's hard cut, then whips and masks on the beat. */
|
||||||
const SCENE_BARS = [
|
export const SCENES = [
|
||||||
['prompt', 2],
|
{ id: 'hook', from: 0, to: 7, in: null }, // inbox, rejection mails stack, "Rejected. Again."
|
||||||
['config', 2],
|
{ id: 'scan', from: 7, to: 24, in: 'hard' }, // black, the terminal types `storebound scan`, the output
|
||||||
['prices', 2],
|
{ id: 'fixed', from: 24, to: 30, in: 'whip-left' }, // the re-scan after the fixes: reds flip green, 0 blockers
|
||||||
['languages', 2],
|
{ id: 'shots', from: 30, to: 36, in: 'iris' }, // store screenshots wall
|
||||||
['questionnaires', 2],
|
{ id: 'decl', from: 36, to: 42, in: 'whip-up' }, // declarations proposal -> Data safety answers
|
||||||
['shots', 3],
|
{ id: 'desk1', from: 42, to: 48, in: 'wipe' }, // desktop: Portfolio across studios
|
||||||
['validate', 2],
|
{ id: 'desk2', from: 48, to: 54, in: 'whip-left' }, // desktop: release timeline, rollout to 20%
|
||||||
['desktop', 6], // the desktop app: real UI frames (desktop.ts), see DESKTOP below
|
{ id: 'desk3', from: 54, to: 60, in: 'whip-left' }, // desktop: Checks, rejection risks turn green
|
||||||
['submit', 2],
|
{ id: 'submit', from: 60, to: 66, in: 'zoom' }, // "It never presses Submit. You do."
|
||||||
['brand', 3],
|
{ id: 'brand', from: 66, to: 72, in: 'iris' }, // logo, storebound.dev, platforms
|
||||||
];
|
].map(s => ({ ...s, start: B(s.from), end: B(s.to) }));
|
||||||
let acc = 0;
|
|
||||||
export const SCENES = SCENE_BARS.map(([id, bars]) => {
|
|
||||||
const s = { id, start: acc * BAR, end: (acc + bars) * BAR, bars };
|
|
||||||
acc += bars;
|
|
||||||
return s;
|
|
||||||
});
|
|
||||||
export const scene = id => SCENES.find(s => s.id === id);
|
export const scene = id => SCENES.find(s => s.id === id);
|
||||||
|
/** Transition length (seconds) per kind; the incoming scene starts at the cut, the outgoing one leaves before it. */
|
||||||
export const PROMPT = 'ship Prism Puddle to Google Play and the App Store';
|
export const TRANS = { hard: 0, 'whip-left': 0.34, 'whip-up': 0.34, iris: 0.42, wipe: 0.42, zoom: 0.36 };
|
||||||
export const PROMPT_AT = 0.35; // seconds
|
|
||||||
export const PROMPT_CPS = 21; // the user types
|
|
||||||
export const CMD_CPS = 62; // the agent types
|
|
||||||
|
|
||||||
export const LANGS = ['en-US', 'tr-TR', 'de-DE', 'fr-FR', 'es-ES', 'es-419', 'it-IT', 'pt-BR', 'ja-JP', 'ko-KR', 'zh-CN', 'ru-RU', 'ar', 'hi-IN'];
|
|
||||||
|
|
||||||
// Price rows for the flicker panel: illustrative local price points for a 2.99 / 0.99 USD pair (Play converts from
|
|
||||||
// USD per region; TR is a config override, as in templates/storebound.config.ts).
|
|
||||||
export const PRICES = [
|
|
||||||
['US', 'USD', '2.99', '0.99'],
|
|
||||||
['TR', 'TRY', '99.99', '34.99'],
|
|
||||||
['DE', 'EUR', '2.99', '0.99'],
|
|
||||||
['GB', 'GBP', '2.79', '0.89'],
|
|
||||||
['JP', 'JPY', '450', '150'],
|
|
||||||
['BR', 'BRL', '14.90', '4.90'],
|
|
||||||
['IN', 'INR', '249', '79'],
|
|
||||||
['KR', 'KRW', '4,100', '1,300'],
|
|
||||||
['MX', 'MXN', '59.00', '19.00'],
|
|
||||||
['ID', 'IDR', '45,000', '15,000'],
|
|
||||||
['SA', 'SAR', '10.99', '3.69'],
|
|
||||||
['FR', 'EUR', '2.99', '0.99'],
|
|
||||||
['CA', 'CAD', '3.99', '1.39'],
|
|
||||||
['AU', 'AUD', '4.49', '1.49'],
|
|
||||||
];
|
|
||||||
|
|
||||||
export const BLOCKERS = [
|
|
||||||
['apple', 'build 12 is PROCESSING'],
|
|
||||||
['apple', 'ja: missing keywords'],
|
|
||||||
['apple', 'remove_ads: MISSING_METADATA'],
|
|
||||||
['apple', 'no app price schedule'],
|
|
||||||
['play', 'tr-TR: no listing'],
|
|
||||||
['play', 'drops_500: not on Play'],
|
|
||||||
['play', 'no release on any track'],
|
|
||||||
];
|
|
||||||
export const BLOCKERS_AT = 0.45; // first blocker line, relative to the validate scene
|
|
||||||
export const BLOCKER_GAP = 0.05;
|
|
||||||
export const FIX_AT = 1.05; // first flip to ok
|
|
||||||
export const FIX_GAP = 0.26;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Terminal lines per scene. at = seconds after the scene start.
|
* Captions: one display font, at most 7 words. at / to in seconds (absolute). *word* = highlighted.
|
||||||
* kind: cmd (typed by the agent), out (printed), note (agent comment), ok / bad (coloured output).
|
* Every caption holds at least 1.2 s (tests/teaser.test.ts).
|
||||||
*/
|
*/
|
||||||
const T = {
|
export const CAPTIONS = [
|
||||||
prompt: [
|
{ id: 'rejected', at: B(3), to: B(7), lines: ['*Rejected.*', 'Again.'], hl: 'red', big: true, word: [B(3), B(4)] },
|
||||||
{ at: 2.85, kind: 'note', text: 'agent using storebound · dry runs first' },
|
{ id: 'reads', at: B(10.5), to: B(16), lines: ['It reads', 'your project.'] },
|
||||||
],
|
{ id: 'finds', at: B(16), to: B(24), lines: ['Finds the rejections', 'before *Apple* does.'] },
|
||||||
config: [
|
{ id: 'fixed', at: B(24), to: B(30), lines: ['Fix it.', 'Scan *again.*'], hl: 'green' },
|
||||||
{ at: 0.0, kind: 'cmd', text: 'bunx storebound init' },
|
{ id: 'shots', at: B(30), to: B(36), lines: ['*200* store screenshots.', 'One command.'] },
|
||||||
{ at: 0.45, kind: 'out', text: '[init] create storebound.config.ts' },
|
{ id: 'decl', at: B(36), to: B(42), lines: ['*764* answers,', 'read from your code.'] },
|
||||||
{ at: 0.55, kind: 'out', text: '[init] create store/listing.md' },
|
{ id: 'desk1', at: B(42), to: B(48), lines: ['Every app.', 'Every *studio.*'] },
|
||||||
{ at: 0.65, kind: 'out', text: '[init] create store/appstore.md' },
|
{ id: 'desk2', at: B(48), to: B(54), lines: ['Both stores.', 'One *timeline.*'] },
|
||||||
{ at: 0.75, kind: 'out', text: '[init] create store/declarations.md' },
|
{ id: 'desk3', at: B(54), to: B(60), lines: ['Risks turn', '*green.*'], hl: 'green' },
|
||||||
{ at: 0.85, kind: 'out', text: '[init] create store/app-privacy.md' },
|
{ id: 'submit', at: B(60.5), to: B(66), lines: ['It never presses *Submit.*', 'You do.'] },
|
||||||
{ at: 0.95, kind: 'out', text: '[init] create store/privacy-policy.html' },
|
];
|
||||||
{ at: 1.875, kind: 'cmd', text: 'bunx storebound check' },
|
|
||||||
{ at: 2.3, kind: 'out', text: '[check] config ok: storebound.config.ts' },
|
|
||||||
{ at: 2.42, kind: 'out', text: '[check] play listing: 14 languages' },
|
|
||||||
{ at: 2.54, kind: 'out', text: '[check] appstore listing: 14 locales' },
|
|
||||||
{ at: 2.66, kind: 'out', text: '[check] data safety: 764 CSV rows' },
|
|
||||||
{ at: 2.78, kind: 'out', text: '[check] shots copy: 14 languages x 4 scenes' },
|
|
||||||
],
|
|
||||||
prices: [
|
|
||||||
{ at: 0.0, kind: 'cmd', text: 'bunx storebound play products --dry' },
|
|
||||||
{ at: 0.62, kind: 'out', text: '[play] 1/2 remove_ads: create · 173 regions (dry)' },
|
|
||||||
{ at: 0.9, kind: 'out', text: '[play] 2/2 drops_500: create · 173 regions (dry)' },
|
|
||||||
{ at: 1.4, kind: 'cmd', text: 'bunx storebound apple iap --dry' },
|
|
||||||
{ at: 1.95, kind: 'out', text: '[apple] 1/2 remove_ads: missing (dry)' },
|
|
||||||
{ at: 2.07, kind: 'out', text: '[apple] 2/2 drops_500: missing (dry)' },
|
|
||||||
],
|
|
||||||
languages: [
|
|
||||||
{ at: 0.0, kind: 'cmd', text: 'bunx storebound play listing --dry' },
|
|
||||||
{ at: 0.6, kind: 'out', text: `[play] 14 listings: ${LANGS.slice(0, 4).join(', ')} ...` },
|
|
||||||
...LANGS.map((l, i) => ({ at: 0.8 + i * 0.13, kind: 'out', text: `[play] ${String(i + 1).padStart(2)}/14 ${l}` })),
|
|
||||||
],
|
|
||||||
questionnaires: [
|
|
||||||
{ at: 0.0, kind: 'cmd', text: 'bunx storebound play data-safety --dry' },
|
|
||||||
{ at: 0.62, kind: 'out', text: '[play] data safety: 6 data types declared' },
|
|
||||||
{ at: 0.95, kind: 'cmd', text: 'bunx storebound apple appinfo --dry' },
|
|
||||||
{ at: 1.55, kind: 'out', text: '[apple] categories: GAMES / GAMES_CASUAL (dry)' },
|
|
||||||
{ at: 1.67, kind: 'out', text: '[apple] age rating declaration: all NONE (dry)' },
|
|
||||||
{ at: 1.85, kind: 'note', text: '[apple] appinfo done (App Privacy is UI-only: store-declarations skill)' },
|
|
||||||
],
|
|
||||||
shots: [
|
|
||||||
{ at: 0.0, kind: 'cmd', text: 'bunx storebound shots render' },
|
|
||||||
...['play', 'tab7', 'tab10', 'ios69', 'ios65', 'ipad13', 'feature'].flatMap((d, k) =>
|
|
||||||
['en', 'tr', 'ja', 'ar'].map((l, j) => ({ at: 0.5 + (k * 4 + j) * 0.14, kind: 'out',
|
|
||||||
text: `[shots] store/renders/${l}/${d}/${d === 'feature' ? '1024x500' : '01'}.png` }))),
|
|
||||||
],
|
|
||||||
validate: [
|
|
||||||
{ at: 0.0, kind: 'cmd', text: 'bunx storebound validate' },
|
|
||||||
// the blocker lines are drawn by teaser.js from BLOCKERS (they change state)
|
|
||||||
],
|
|
||||||
};
|
|
||||||
export const TERMINAL = T;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The desktop scene, in seconds after its start: which captured frame (out/desktop/<frame>.jpg, desktop.ts) shows,
|
* When each caption is fully readable (every word in, before its exit), as teaser.js animates it: words pop in 0.07 s
|
||||||
* the camera zoom toward a point of the frame (fractions of the 1280 x 800 window), and the step label.
|
* apart over 0.34 s (the hook's two words slam in over 0.2 s at their beats); the exit fades over the last 0.16 s
|
||||||
* The frames are the real app in fixture mode; the confirm dialog is drawn on top (the app's is a native OS dialog).
|
* (the hook ends on a hard cut instead).
|
||||||
*/
|
*/
|
||||||
export const DESKTOP = [
|
export function captionTimes() {
|
||||||
{ at: 0.0, frame: 'portfolio', focus: [0.42, 0.42], zoom: 1.12, step: 'Every app of every studio' },
|
return CAPTIONS.map(c => {
|
||||||
{ at: 1.875, frame: 'releases', focus: [0.6, 0.38], zoom: 1.45, step: 'Both stores on one release track' },
|
const words = c.lines.join(' ').replace(/\*/g, '');
|
||||||
{ at: 3.75, frame: 'growth', focus: 'hover', zoom: 1.5, step: 'Growth and health, charted' },
|
const from = c.big ? c.word[c.word.length - 1] + 0.2 : c.at + 0.34 + 0.07 * (words.split(' ').length - 1);
|
||||||
{ at: 5.625, frame: 'palette', focus: [0.25, 0.45], zoom: 1.35, step: '⌘K: jump anywhere' },
|
const to = c.big ? c.to : c.to - 0.16;
|
||||||
{ at: 6.8, frame: 'prices-diff', focus: 'apply', zoom: 1.4, step: 'Every write: dry run first' },
|
return { id: c.id, words, count: words.split(' ').length, at: c.at, from, to, hold: to - from };
|
||||||
{ at: 7.95, frame: 'prices-diff', focus: 'apply', zoom: 1.4, dialog: true, step: 'Then your Apply, in a system dialog' },
|
});
|
||||||
{ at: 9.375, frame: 'releases', focus: [0.58, 0.22], zoom: 1.3, step: 'Submit for review stays in the console' },
|
|
||||||
];
|
|
||||||
/** Cursor waypoints of the desktop scene: [at, target, click]; targets name a boxes.json entry or a dialog button. */
|
|
||||||
export const DESK_CURSOR = [
|
|
||||||
[3.95, 'off'], [4.55, 'hover'], [6.9, 'hover'], [7.55, 'apply', true], [8.5, 'dialog-ok'], [8.75, 'dialog-ok', true],
|
|
||||||
[9.5, 'dialog-ok'], [10.25, 'console'],
|
|
||||||
];
|
|
||||||
export const DESK_HOVER_AT = 4.6; // the chart tooltip shows (growth -> growth-hover)
|
|
||||||
export const DESK_DIALOG = [7.95, 9.0]; // the dialog is up (after the Apply click, until the Yes click)
|
|
||||||
export const DESK_LINK_AT = 10.35; // "Submit for review · your click" by the console button
|
|
||||||
|
|
||||||
/** Seconds at which each typed character lands (for key clicks in the music). */
|
|
||||||
export function keyTimes() {
|
|
||||||
const out = [];
|
|
||||||
for (let i = 0; i < PROMPT.length; i++) out.push(PROMPT_AT + i / PROMPT_CPS);
|
|
||||||
for (const s of SCENES) for (const l of T[s.id] ?? []) {
|
|
||||||
if (l.kind !== 'cmd') continue;
|
|
||||||
for (let i = 0; i < l.text.length; i++) out.push(s.start + l.at + i / CMD_CPS);
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Seconds of the scene cuts that get a hit (every scene after the first). */
|
// ---------- hook: a generic, made-up inbox (no real product, no real names or addresses) ----------
|
||||||
export const CUTS = SCENES.slice(1).map(s => s.start);
|
export const MAIL_SUBJECT = "There's an issue with your Prism Puddle submission";
|
||||||
|
export const MAILS = [
|
||||||
|
{ at: B(0.5), date: 'Mon', guideline: 'Guideline 2.1 · Information Needed' },
|
||||||
|
{ at: B(1.25), date: 'Wed', guideline: 'Guideline 5.1.1(v) · Data Collection and Storage' },
|
||||||
|
{ at: B(2), date: '9:41 AM', guideline: 'Guideline 4.8 · Login Services' },
|
||||||
|
];
|
||||||
|
/** Earlier, unrelated mails under the rejections (generic, fictional). */
|
||||||
|
export const OLD_MAILS = [
|
||||||
|
{ from: 'Team Calendar', subject: 'Sprint review moved to Thursday', preview: 'The demo slot is now 3 pm. Bring the build.', date: 'Sun' },
|
||||||
|
{ from: 'Build Server', subject: 'Prism Puddle 1.0 (12) uploaded', preview: 'Processing finished. The build is ready to submit.', date: 'Sat' },
|
||||||
|
{ from: 'Design', subject: 'Final icon + screenshots', preview: 'All sizes exported, see the shared folder.', date: 'Fri' },
|
||||||
|
];
|
||||||
|
|
||||||
|
// ---------- terminal: `storebound scan` ----------
|
||||||
|
export const CMD = 'storebound scan';
|
||||||
|
export const TYPE_AT = B(7.6);
|
||||||
|
export const TYPE_CPS = 15;
|
||||||
|
export const ENTER_AT = B(10);
|
||||||
|
|
||||||
|
/** Real output lines (tests/teaser.test.ts checks each against the scan of the fixture). at = seconds (absolute). */
|
||||||
|
export const SCAN_HEAD = [
|
||||||
|
{ at: B(10.15), text: 'storebound scan · storebound.config.ts', kind: 'head' },
|
||||||
|
{ at: B(10.4), text: 'stack: iOS (native) · targets: iOS · 11 files', kind: 'dim' },
|
||||||
|
];
|
||||||
|
export const SDK_AT = B(11);
|
||||||
|
export const SDKS = [
|
||||||
|
{ at: B(11.5), name: 'Google AdMob', what: 'ads, tracking-capable', dep: 'CocoaPods Google-Mobile-Ads-SDK 11.10.0', where: 'Podfile.lock:2' },
|
||||||
|
{ at: B(12.25), name: 'Google Sign-In', what: 'auth', dep: 'CocoaPods GoogleSignIn 7.1.0', where: 'Podfile.lock:3' },
|
||||||
|
];
|
||||||
|
export const RISKS_AT = B(13.25);
|
||||||
|
export const RISKS_LINE = 'Rejection risks: 2 blocker, 3 high, 0 medium, 0 low';
|
||||||
|
/** The five findings. fix = a verbatim fragment of the real fix (the full text is in the CLI output). */
|
||||||
|
export const FINDINGS = [
|
||||||
|
{ at: B(14), 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', fix: 'Create a demo account that sees every feature', skill: 'review-access', short: 'Demo account for App Review' },
|
||||||
|
{ at: B(16), 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', fix: 'Add "Delete account" in the app', skill: 'account-deletion', short: 'In-app account deletion' },
|
||||||
|
{ at: B(18), sev: 'HIGH', guideline: '4.8', title: 'Third-party login (Google / Facebook / ...) without Sign in with Apple or another equivalent login option',
|
||||||
|
where: 'Planner/LoginView.swift:9', fix: 'Offer Sign in with Apple', skill: 'review-rejections', short: 'Sign in with Apple' },
|
||||||
|
{ at: B(20), sev: 'HIGH', guideline: '3.1.1', title: 'Restorable purchases (non-consumables or subscriptions) but no Restore Purchases path was found',
|
||||||
|
where: 'storebound.config.ts:16', fix: 'Add a visible "Restore Purchases" button', skill: 'store-iap-setup', short: 'Restore Purchases' },
|
||||||
|
{ at: B(22), sev: 'HIGH', guideline: '5.1.2(i)', title: 'Tracking-capable code without App Tracking Transparency (Google AdMob, IDFA)',
|
||||||
|
where: 'Planner/Ads.swift:7', fix: 'add NSUserTrackingUsageDescription and request ATT before the SDKs start', skill: 'ads-mediation-checks', short: 'App Tracking Transparency' },
|
||||||
|
];
|
||||||
|
|
||||||
|
// ---------- fixed: the re-scan of the fixed copy (tests/fixtures/scan/teaser-fixed) ----------
|
||||||
|
export const RESCAN_CMD = 'storebound scan';
|
||||||
|
export const RESCAN_TYPE_AT = B(24.3);
|
||||||
|
export const FLIP_AT = [B(25.5), B(26), B(26.5), B(27), B(27.5)]; // each red row turns green
|
||||||
|
export const RESCAN_LINE = 'Rejection risks: 0 blocker, 0 high, 0 medium, 0 low';
|
||||||
|
export const RESCAN_NONE = 'none found in the project files and config';
|
||||||
|
export const RESCAN_LINE_AT = B(28);
|
||||||
|
|
||||||
|
// ---------- payoff ----------
|
||||||
|
export const SHOTS_TOTAL = 200; // examples/demo-game: 4 languages x 2 sets x 25 store images (+ 8 extra)
|
||||||
|
export const SHOTS_CMD = 'storebound shots render';
|
||||||
|
export const DECL_TOTAL = 764; // Play Data safety CSV rows built from the config (`storebound check`)
|
||||||
|
/** Real lines of the declarations proposal (scan of the teaser fixture). */
|
||||||
|
export const DECL_LINES = [
|
||||||
|
{ area: 'Data safety', what: 'PSL_DEVICE_ID', value: 'collect: advertising, analytics, fraud', where: 'Podfile.lock:2' },
|
||||||
|
{ area: 'Data safety', what: 'PSL_APPROX_LOCATION', value: 'collect: advertising, analytics, fraud', where: 'Podfile.lock:2' },
|
||||||
|
{ area: 'Data safety', what: 'PSL_EMAIL', value: 'collect: account, functionality', where: 'Podfile.lock:3' },
|
||||||
|
{ area: 'Data safety', what: 'PSL_USER_ACCOUNT', value: 'collect: account, functionality', where: 'Podfile.lock:3' },
|
||||||
|
];
|
||||||
|
export const DECL_ASK = 'ask owner encryptedInTransit';
|
||||||
|
export const DATA_SAFETY_ROWS = [
|
||||||
|
'Device or other IDs', 'Approximate location', 'App interactions', 'Diagnostics', 'Name', 'Email address', 'User IDs',
|
||||||
|
];
|
||||||
|
|
||||||
|
// ---------- desktop: real frames (desktop.ts), camera from -> to (focus as fractions of the 1280 x 800 frame) ----------
|
||||||
|
export const DESKTOP = {
|
||||||
|
desk1: { frame: 'portfolio', from: { f: [0.5, 0.5], z: 1.0 }, to: { f: [0.62, 0.52], z: 1.12 },
|
||||||
|
cursor: [[0.6, 'off'], [1.25, 'studios']], callout: { at: 1.35, target: 'studios', text: '3 studios · 2 stores' } },
|
||||||
|
desk2: { frame: 'releases', empty: 'releases-empty', from: { f: [0.55, 0.5], z: 1.0 }, to: { f: [0.72, 0.62], z: 1.22 },
|
||||||
|
cursor: [[0.5, 'off'], [1.15, 'roll']], fill: [1.1, 2.0], callout: { at: 1.3, target: 'roll', text: 'Rollout · 20%' } },
|
||||||
|
desk3: { frame: 'checks', clean: 'checks-clean', from: { f: [0.55, 0.55], z: 1.0 }, to: { f: [0.55, 0.6], z: 1.14 },
|
||||||
|
cursor: [[0.5, 'off'], [1.0, 'scanAgain']], flip: 1.25, callout: { at: 1.55, target: 'scanClean', text: '0 rejection risks' } },
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------- end ----------
|
||||||
|
export const SUBMIT_HOVER = B(61.5); // the cursor stops on the button, it never clicks
|
||||||
|
export const URL = 'storebound.dev';
|
||||||
|
export const PLATFORMS = 'Open source · macOS · Windows · Linux';
|
||||||
|
|
||||||
|
// ---------- sound cues (music.js) ----------
|
||||||
|
/** Every cut that gets a hit, with the kind of transition (a whoosh leads into whips, masks and zooms). */
|
||||||
|
export const CUTS = SCENES.slice(1).map(s => ({ t: s.start, kind: s.in, id: s.id }));
|
||||||
|
/** Ticks: mails landing, findings landing, green flips, callouts. */
|
||||||
|
export const TICKS = [
|
||||||
|
...MAILS.map(m => ({ t: m.at, kind: 'mail' })),
|
||||||
|
...SDKS.map(s => ({ t: s.at, kind: 'soft' })),
|
||||||
|
{ t: RISKS_AT, kind: 'soft' },
|
||||||
|
...FINDINGS.map(f => ({ t: f.at, kind: 'bad' })),
|
||||||
|
...FLIP_AT.map((t, i) => ({ t, kind: 'good', step: i })),
|
||||||
|
...Object.entries(DESKTOP).map(([id, d]) => ({ t: scene(id).start + d.callout.at, kind: 'pop' })),
|
||||||
|
];
|
||||||
|
/** Seconds at which each typed character lands (key clicks). */
|
||||||
|
export function keyTimes() {
|
||||||
|
const out = [];
|
||||||
|
for (let i = 0; i < CMD.length; i++) out.push(TYPE_AT + i / TYPE_CPS);
|
||||||
|
for (let i = 0; i < RESCAN_CMD.length; i++) out.push(RESCAN_TYPE_AT + i / 24);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
// Teaser picture: every element is set from the time t alone (window.teaser.seek(t)), so frames render
|
// Teaser picture: every element is set from the time t alone (window.teaser.seek(t)), so frames render
|
||||||
// deterministically, in any order. URL: ?w=1080&h=1920 (or 1920x1080) · &t=12.5 to hold a frame · &play=1 to preview.
|
// deterministically, in any order. URL: ?w=1080&h=1920 (or 1920x1080) · &t=12.5 to hold a frame · &play=1 to preview.
|
||||||
import { BAR, BEAT, BLOCKERS, BLOCKERS_AT, BLOCKER_GAP, CMD_CPS, CUTS, DESK_CURSOR, DESK_DIALOG, DESK_HOVER_AT, DESK_LINK_AT,
|
import { B, BEAT, CAPTIONS, captionTimes, CMD, DATA_SAFETY_ROWS, DECL_ASK, DECL_LINES, DECL_TOTAL, DESKTOP, DURATION, ENTER_AT, FINDINGS,
|
||||||
DESKTOP, DURATION, FIX_AT, FIX_GAP, FPS, LANGS, PRICES, PROMPT, PROMPT_AT, PROMPT_CPS, SCENES, TERMINAL, scene } from './script.js';
|
FLIP_AT, FPS, MAIL_SUBJECT, MAILS, OLD_MAILS, PLATFORMS, RESCAN_CMD, RESCAN_LINE, RESCAN_LINE_AT, RESCAN_NONE, RESCAN_TYPE_AT,
|
||||||
|
RISKS_AT, RISKS_LINE, SCAN_HEAD, SCENES, SDK_AT, SDKS, SHOTS_TOTAL, SUBMIT_HOVER, TRANS, TYPE_AT, TYPE_CPS, URL, scene } from './script.js';
|
||||||
|
|
||||||
const q = new URLSearchParams(location.search);
|
const q = new URLSearchParams(location.search);
|
||||||
const W = Number(q.get('w') ?? 1080), H = Number(q.get('h') ?? 1920);
|
const W = Number(q.get('w') ?? 1080), H = Number(q.get('h') ?? 1920);
|
||||||
|
|
@ -13,465 +14,574 @@ document.body.classList.add(V ? 'v' : 'h');
|
||||||
|
|
||||||
// ---------- easing ----------
|
// ---------- easing ----------
|
||||||
const clamp = (x, a = 0, b = 1) => Math.min(b, Math.max(a, x));
|
const clamp = (x, a = 0, b = 1) => Math.min(b, Math.max(a, x));
|
||||||
const prog = (t, a, d) => clamp((t - a) / d);
|
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 eoc = p => 1 - Math.pow(1 - p, 3);
|
||||||
|
const eoq = p => 1 - Math.pow(1 - p, 5);
|
||||||
const eic = p => p * p * p;
|
const eic = p => p * p * p;
|
||||||
|
const eio = p => (p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2);
|
||||||
const eob = p => { const c1 = 1.70158, c3 = c1 + 1; return 1 + c3 * Math.pow(p - 1, 3) + c1 * Math.pow(p - 1, 2); };
|
const eob = p => { const c1 = 1.70158, c3 = c1 + 1; return 1 + c3 * Math.pow(p - 1, 3) + c1 * Math.pow(p - 1, 2); };
|
||||||
const lerp = (a, b, p) => a + (b - a) * p;
|
const lerp = (a, b, p) => a + (b - a) * p;
|
||||||
const esc = s => s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
const esc = s => String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||||
const sceneAt = t => SCENES.find(s => t >= s.start && t < s.end) ?? SCENES[SCENES.length - 1];
|
const set = (el, k, v) => { if (el.__s?.[k] !== v) { (el.__s ??= {})[k] = v; el.style[k] = v; } };
|
||||||
|
const html = (el, v) => { if (el.__h !== v) { el.__h = v; el.innerHTML = v; } };
|
||||||
|
const decay = (t, at, d) => (t >= at && t < at + d ? 1 - (t - at) / d : 0);
|
||||||
|
|
||||||
// ---------- background ----------
|
/** Layout per format: caption band on top, content below; the bottom ~22% of the vertical frame stays calm. */
|
||||||
const g1 = $('#bg .g1'), g2 = $('#bg .g2'), g3 = $('#bg .g3'), grid = $('#bg .grid'), flash = $('#flash');
|
const L = V
|
||||||
|
? { cy: 1010, top: 520, bottom: 1490, margin: 60 }
|
||||||
|
: { cy: 675, top: 300, bottom: 1045, margin: 160 };
|
||||||
|
|
||||||
|
// ---------- scenes and transitions ----------
|
||||||
|
const sceneEls = Object.fromEntries(SCENES.map(s => [s.id, $(`#s-${s.id}`)]));
|
||||||
|
const DIAG = Math.hypot(W, H);
|
||||||
|
/** Visibility, transform, clip and blur of a scene at t, from its own entry and the next scene's entry. */
|
||||||
|
function sceneFx(i, t) {
|
||||||
|
const s = SCENES[i], next = SCENES[i + 1];
|
||||||
|
const enter = s.in, exit = next?.in ?? null;
|
||||||
|
const lead = k => (k && k.startsWith('whip') ? 0.08 : 0);
|
||||||
|
const tail = k => (k === 'iris' || k === 'wipe' ? TRANS[k] : k && k.startsWith('whip') ? 0.08 : 0);
|
||||||
|
if (t < s.start - lead(enter) || t >= s.end + tail(exit)) return null;
|
||||||
|
let tx = 0, ty = 0, sc = 1, blur = 0, op = 1, clip = 'none', dark = 0;
|
||||||
|
// entry
|
||||||
|
if (enter === 'whip-left' || enter === 'whip-up') {
|
||||||
|
const p = prog(t, s.start - 0.08, 0.34), e = eoq(p);
|
||||||
|
if (enter === 'whip-left') tx += (1 - e) * W * 1.05; else ty += (1 - e) * H * 1.05;
|
||||||
|
blur += (1 - eoc(p)) * 26;
|
||||||
|
} else if (enter === 'iris') {
|
||||||
|
const p = prog(t, s.start, TRANS.iris);
|
||||||
|
if (p < 1) clip = `circle(${(eio(p) * DIAG * 0.55).toFixed(1)}px at 50% 50%)`;
|
||||||
|
} else if (enter === 'wipe') {
|
||||||
|
const p = prog(t, s.start, TRANS.wipe);
|
||||||
|
if (p < 1) { const sk = H * 0.35, x = lerp(-sk, W + sk, eio(p)); clip = `polygon(0 0, ${x + sk}px 0, ${x}px 100%, 0 100%)`; }
|
||||||
|
} else if (enter === 'zoom') {
|
||||||
|
const p = prog(t, s.start, TRANS.zoom);
|
||||||
|
sc *= lerp(0.8, 1, eoc(p)); op *= eoc(p); blur += (1 - p) * 12;
|
||||||
|
}
|
||||||
|
// exit
|
||||||
|
if (exit === 'whip-left' || exit === 'whip-up') {
|
||||||
|
const p = prog(t, s.end - 0.22, 0.3), e = eic(p);
|
||||||
|
if (exit === 'whip-left') tx -= e * W * 1.05; else ty -= e * H * 1.05;
|
||||||
|
blur += p * 26;
|
||||||
|
} else if (exit === 'iris' || exit === 'wipe') {
|
||||||
|
const p = prog(t, s.end - 0.1, TRANS[exit] + 0.1);
|
||||||
|
sc *= 1 + 0.07 * eio(p); dark = 0.5 * p;
|
||||||
|
} else if (exit === 'zoom') {
|
||||||
|
const p = prog(t, s.end - 0.26, 0.26);
|
||||||
|
sc *= 1 + 0.8 * eic(p); op *= 1 - eic(p); blur += eic(p) * 16;
|
||||||
|
}
|
||||||
|
return { tx, ty, sc, blur, op, clip, dark };
|
||||||
|
}
|
||||||
|
function scenes(t) {
|
||||||
|
SCENES.forEach((s, i) => {
|
||||||
|
const el = sceneEls[s.id], fx = sceneFx(i, t);
|
||||||
|
if (!fx) { set(el, 'opacity', '0'); set(el, 'visibility', 'hidden'); return; }
|
||||||
|
set(el, 'visibility', 'visible');
|
||||||
|
set(el, 'opacity', String(fx.op));
|
||||||
|
set(el, 'transform', `translate(${fx.tx.toFixed(1)}px, ${fx.ty.toFixed(1)}px) scale(${fx.sc.toFixed(4)})`);
|
||||||
|
set(el, 'filter', [fx.blur > 0.3 ? `blur(${fx.blur.toFixed(1)}px)` : '', fx.dark > 0.01 ? `brightness(${(1 - fx.dark).toFixed(3)})` : ''].join(' ').trim() || 'none');
|
||||||
|
set(el, 'clipPath', fx.clip);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const active = t => SCENES.find(s => t >= s.start && t < s.end) ?? SCENES[SCENES.length - 1];
|
||||||
|
|
||||||
|
// ---------- background, flash ----------
|
||||||
|
const g1 = $('#bg .g1'), g2 = $('#bg .g2'), g3 = $('#bg .g3'), grid = $('#bg .grid'), flash = $('#flash'), bg = $('#bg');
|
||||||
|
const HITS = [
|
||||||
|
{ t: B(3), a: 0.5, c: '#ff3b3b' }, { t: B(4), a: 0.6, c: '#ff3b3b' }, { t: ENTER_AT, a: 0.5, c: '#ffffff' },
|
||||||
|
...SCENES.slice(2).map(s => ({ t: s.start, a: s.id === 'brand' ? 0.55 : 0.28, c: '#ffffff' })),
|
||||||
|
...FINDINGS.map(f => ({ t: f.at, a: 0.18, c: '#ff3b3b' })),
|
||||||
|
];
|
||||||
function background(t) {
|
function background(t) {
|
||||||
|
set(bg, 'opacity', t >= scene('scan').start ? '1' : '0');
|
||||||
let pulse = 0;
|
let pulse = 0;
|
||||||
for (const c of CUTS) if (t >= c) pulse = Math.max(pulse, 1 - prog(t, c, 0.6));
|
for (const h of HITS) pulse = Math.max(pulse, decay(t, h.t, 0.6) * h.a);
|
||||||
const beat = 1 - prog((t % BEAT), 0, BEAT * 0.6);
|
g1.style.transform = `translate(${W * 0.2 + Math.sin(t * 0.33) * 160 - 550}px, ${H * 0.3 + Math.cos(t * 0.25) * 140 - 550}px) scale(${1 + pulse * 0.3})`;
|
||||||
g1.style.transform = `translate(${W * 0.15 + Math.sin(t * 0.31) * 140 - 450}px, ${H * 0.28 + Math.cos(t * 0.23) * 120 - 450}px) scale(${1 + pulse * 0.18})`;
|
g2.style.transform = `translate(${W * 0.85 + Math.cos(t * 0.29) * 180 - 450}px, ${H * 0.75 + Math.sin(t * 0.37) * 150 - 450}px)`;
|
||||||
g2.style.transform = `translate(${W * 0.85 + Math.cos(t * 0.27) * 160 - 380}px, ${H * 0.72 + Math.sin(t * 0.35) * 140 - 380}px)`;
|
const red = t >= scene('scan').start && t < scene('fixed').start + 1.5 ? clamp((t - FINDINGS[0].at) / 1.5) * (1 - prog(t, FLIP_AT[0], 1.5)) : 0;
|
||||||
g3.style.transform = `translate(${W * 0.7 + Math.sin(t * 0.19) * 200 - 320}px, ${H * 0.1 + Math.cos(t * 0.29) * 100 - 320}px)`;
|
g3.style.background = `radial-gradient(circle, rgba(255,90,95,${(0.22 * red).toFixed(3)}), rgba(255,90,95,0) 62%)`;
|
||||||
g1.style.opacity = String(0.8 + 0.2 * beat * (t > SCENES[1].start ? 1 : 0.3));
|
g3.style.transform = `translate(${W * 0.75 - 400}px, ${H * 0.45 - 400}px)`;
|
||||||
grid.style.transform = `translate(${(t * 18) % 64}px, ${(t * 26) % 64}px)`;
|
grid.style.transform = `translate(${(t * 20) % 96}px, ${(t * 28) % 96}px)`;
|
||||||
let f = 0;
|
let f = 0, c = '#fff';
|
||||||
for (const c of CUTS) if (t >= c && t < c + 0.14) f = Math.max(f, (c === scene('brand').start || c === scene('submit').start ? 0.45 : 0.2) * (1 - (t - c) / 0.14));
|
for (const h of HITS) { const v = decay(t, h.t, 0.18) * h.a; if (v > f) { f = v; c = h.c; } }
|
||||||
flash.style.opacity = String(f);
|
set(flash, 'opacity', f.toFixed(3));
|
||||||
|
set(flash, 'background', c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- captions ----------
|
// ---------- captions ----------
|
||||||
// lines: array of [text, at] ; words wrapped in *...* are highlighted. at = seconds after the caption start.
|
const capEl = $('#cap');
|
||||||
const CAPS = [
|
let capId = null, capWords = [];
|
||||||
{ id: 'prompt', lines: [['One prompt.', 0.15], ['Two *stores.*', 1.35]] },
|
|
||||||
{ id: 'config', lines: [['One *config.*', 0.05]], sub: ['storebound.config.ts + store/*.md', 0.55] },
|
|
||||||
{ id: 'prices', lines: [['IAP *prices.*', 0.05], ['Every region.', 0.55]] },
|
|
||||||
{ id: 'languages', lines: [['Listings in', 0.05], ['*14* languages.', 0.45]] },
|
|
||||||
{ id: 'questionnaires', lines: [['Every', 0.05], ['*questionnaire.*', 0.3]], sub: ['Data safety · age rating · App Privacy', 0.9] },
|
|
||||||
{ id: 'shots', lines: [['Store art,', 0.05], ['*rendered.*', 0.4]], sub: ['real renders · Prism Puddle demo', 1.0] },
|
|
||||||
{ id: 'validate', lines: [['Blockers', 0.05], ['#count', 0.3]], sub: ['read-only check · in fix order', 0.8] },
|
|
||||||
{ id: 'desktop', lines: [['And a', 0.05], ['*desktop* app.', 0.3]], sub: ['macOS · Windows · Linux', 0.9] },
|
|
||||||
];
|
|
||||||
const capEl = $('#caption');
|
|
||||||
let capId = null, capWords = [], capSub = null, capCount = null;
|
|
||||||
function buildCaption(c) {
|
function buildCaption(c) {
|
||||||
const base = V ? 112 : 108;
|
capEl.className = [c.big ? 'big' : '', c.hl ?? ''].join(' ');
|
||||||
capEl.style.fontSize = `${base}px`;
|
capEl.style.fontSize = '';
|
||||||
capEl.innerHTML = c.lines.map(([text]) => text === '#count'
|
const one = !V && !c.big && c.lines.join(' ').length <= 30;
|
||||||
? '<span class="line"><span class="w big hl" data-count>7</span></span>'
|
const lines = one ? [c.lines.join(' ')] : c.lines;
|
||||||
: `<span class="line">${text.split(' ').map(w => w.startsWith('*') ? `<span class="w hl">${esc(w.replace(/\*/g, ''))}</span>` : `<span class="w">${esc(w)}</span>`).join(' ')}</span>`).join('')
|
capEl.innerHTML = lines.map(l => `<span class="line">${l.split(' ').map(w => `<span class="w${w.startsWith('*') ? ' hl' : ''}">${esc(w.replace(/\*/g, ''))}</span>`).join(' ')}</span>`).join('');
|
||||||
+ (c.sub ? `<span class="sub">${esc(c.sub[0])}</span>` : '');
|
// fit: the widest line stays inside the centre 80% (safe area)
|
||||||
// fit: the widest line must fit the caption box
|
const avail = capEl.clientWidth, base = parseFloat(getComputedStyle(capEl).fontSize);
|
||||||
const avail = capEl.clientWidth;
|
|
||||||
const widest = Math.max(...[...capEl.querySelectorAll('.line')].map(l => l.scrollWidth));
|
const widest = Math.max(...[...capEl.querySelectorAll('.line')].map(l => l.scrollWidth));
|
||||||
if (widest > avail) capEl.style.fontSize = `${Math.floor(base * avail / widest)}px`;
|
if (widest > avail) capEl.style.fontSize = `${Math.floor(base * avail / widest)}px`;
|
||||||
capWords = [];
|
capWords = [];
|
||||||
[...capEl.querySelectorAll('.line')].forEach((l, i) => {
|
[...capEl.querySelectorAll('.line')].forEach((l, i) => [...l.querySelectorAll('.w')].forEach((w, j) => {
|
||||||
[...l.querySelectorAll('.w')].forEach((w, j) => capWords.push({ el: w, at: c.lines[i][1] + j * 0.07 }));
|
const at = c.big ? c.word[i] : c.at + capWords.length * 0.07;
|
||||||
});
|
capWords.push({ el: w, at });
|
||||||
capSub = c.sub ? { el: capEl.querySelector('.sub'), at: c.sub[1] } : null;
|
}));
|
||||||
capCount = capEl.querySelector('[data-count]');
|
|
||||||
}
|
}
|
||||||
function captions(t) {
|
function captions(t) {
|
||||||
const s = sceneAt(t);
|
const c = CAPTIONS.find(x => t >= x.at && t < x.to);
|
||||||
const c = CAPS.find(x => x.id === s.id);
|
if (!c) { set(capEl, 'opacity', '0'); return; }
|
||||||
if (!c) { capEl.style.opacity = '0'; return; }
|
|
||||||
if (capId !== c.id) { capId = c.id; buildCaption(c); }
|
if (capId !== c.id) { capId = c.id; buildCaption(c); }
|
||||||
const r = t - s.start;
|
const hard = c.id === 'rejected'; // the hook ends on a hard cut
|
||||||
const out = prog(t, s.end - 0.16, 0.16);
|
const out = hard ? 0 : prog(t, c.to - 0.16, 0.16);
|
||||||
capEl.style.opacity = String(1 - out);
|
set(capEl, 'opacity', String(1 - out));
|
||||||
capEl.style.transform = `translateY(${-50 * eic(out)}px)`;
|
let shake = 0;
|
||||||
for (const w of capWords) {
|
for (const w of capWords) {
|
||||||
const p = prog(r, w.at, 0.3);
|
const p = prog(t, w.at, c.big ? 0.2 : 0.34);
|
||||||
w.el.style.opacity = String(clamp(p * 4));
|
if (c.big) {
|
||||||
w.el.style.transform = `translateY(${(1 - eob(p)) * 0.45}em) scale(${1 + 0.3 * (1 - eoc(p))})`;
|
shake = Math.max(shake, decay(t, w.at + 0.05, 0.3));
|
||||||
|
set(w.el, 'opacity', String(clamp(p * 3)));
|
||||||
|
set(w.el, 'transform', `scale(${lerp(2.4, 1, eoc(p)).toFixed(3)})`);
|
||||||
|
set(w.el, 'filter', p < 1 ? `blur(${((1 - p) * 14).toFixed(1)}px)` : 'none');
|
||||||
|
} else {
|
||||||
|
set(w.el, 'opacity', String(clamp(p * 3)));
|
||||||
|
set(w.el, 'transform', `translateY(${((1 - eob(p)) * 0.42).toFixed(3)}em) scale(${(1 + 0.25 * (1 - eoc(p))).toFixed(3)})`);
|
||||||
|
set(w.el, 'filter', p < 1 ? `blur(${((1 - eoc(p)) * 10).toFixed(1)}px)` : 'none');
|
||||||
}
|
}
|
||||||
if (capSub) {
|
|
||||||
const p = prog(r, capSub.at, 0.3);
|
|
||||||
capSub.el.style.opacity = String(p);
|
|
||||||
capSub.el.style.transform = `translateY(${(1 - eoc(p)) * 20}px)`;
|
|
||||||
}
|
|
||||||
if (capCount) {
|
|
||||||
const n = BLOCKERS.length - fixedCount(r);
|
|
||||||
capCount.textContent = n === 0 ? '0' : String(n);
|
|
||||||
capCount.classList.toggle('g', n === 0);
|
|
||||||
const last = n < BLOCKERS.length ? FIX_AT + (BLOCKERS.length - n - 1) * FIX_GAP : -9;
|
|
||||||
const pop = 1 - prog(r, last, 0.18);
|
|
||||||
const base = prog(r, 0.3, 0.3);
|
|
||||||
capCount.style.transform = `translateY(${(1 - eob(base)) * 0.45}em) scale(${(1 + 0.3 * (1 - eoc(base))) * (1 + (n === 0 ? 0.35 : 0.18) * pop)})`;
|
|
||||||
capCount.style.opacity = String(clamp(base * 4));
|
|
||||||
capCount.style.color = n === 0 ? 'var(--green)' : '#f87171';
|
|
||||||
}
|
}
|
||||||
|
const sx = c.big ? Math.sin(t * 97) * 14 * shake : 0, sy = c.big ? Math.cos(t * 83) * 10 * shake : 0;
|
||||||
|
set(capEl, 'transform', c.big ? `translate(${sx.toFixed(1)}px, calc(-50% + ${sy.toFixed(1)}px))` : `translateY(${(-40 * eic(out)).toFixed(1)}px)`);
|
||||||
}
|
}
|
||||||
const fixedCount = r => r < FIX_AT ? 0 : Math.min(BLOCKERS.length, Math.floor((r - FIX_AT) / FIX_GAP) + 1);
|
|
||||||
|
|
||||||
// ---------- terminal ----------
|
// ---------- hook: inbox ----------
|
||||||
const term = $('#term'), pin = $('#term .pin'), linesEl = $('#term .lines');
|
const list = $('#inbox .list'), hookCam = $('#s-hook .cam'), hookDim = $('#s-hook .dim'), unread = $('#inbox .cnt');
|
||||||
const TERM_SCENES = ['prompt', 'config', 'prices', 'languages', 'questionnaires', 'shots', 'validate'];
|
const ROW_H = V ? 236 : 168;
|
||||||
const PANEL_FOR = { prices: '#prices', languages: '#langs', questionnaires: '#quest' };
|
const mailRow = (m, rej) => {
|
||||||
const cursor = '<span class="cur"></span>';
|
const el = document.createElement('div');
|
||||||
const fmtOut = text => {
|
el.className = `mrow${rej ? '' : ' old'}`;
|
||||||
const m = text.match(/^\[(\w+)\](.*)$/s);
|
el.innerHTML = rej
|
||||||
if (!m) return esc(text);
|
? `<span class="hi"></span><span class="dot"></span><span class="from">App Store Connect</span><span class="date">${esc(m.date)}</span>
|
||||||
let rest = esc(m[2]).replace(/\(dry\)/g, '<span class="dim">(dry)</span>');
|
<span class="subj">${esc(MAIL_SUBJECT)}</span><span class="prev">Hello, Thank you for submitting… <b>${esc(m.guideline)}</b></span>`
|
||||||
return `<span class="t-${m[1]}">[${m[1]}]</span>${rest}`;
|
: `<span class="hi"></span><span class="dot"></span><span class="from">${esc(m.from)}</span><span class="date">${esc(m.date)}</span>
|
||||||
|
<span class="subj">${esc(m.subject)}</span><span class="prev">${esc(m.preview)}</span>`;
|
||||||
|
list.appendChild(el);
|
||||||
|
return el;
|
||||||
};
|
};
|
||||||
let lastLines = '', lastPin = '', panelTopCache = null;
|
const oldRows = OLD_MAILS.map(m => ({ el: mailRow(m, false), at: -1 }));
|
||||||
function terminal(t) {
|
const newRows = MAILS.map(m => ({ el: mailRow(m, true), at: m.at }));
|
||||||
const s = sceneAt(t);
|
function hook(t) {
|
||||||
const on = TERM_SCENES.includes(s.id);
|
if (t >= scene('hook').end) return;
|
||||||
if (!on) { term.style.opacity = '0'; return; }
|
const slots = r => MAILS.filter(m => m.at > r.at).reduce((n, m) => n + eoc(prog(t, m.at, 0.3)), 0);
|
||||||
const r = t - s.start;
|
for (const r of [...oldRows.map((r, i) => ({ ...r, base: i })), ...newRows.map(r => ({ ...r, base: 0 }))]) {
|
||||||
// enter + punch on every cut
|
const y = (r.base + slots(r)) * ROW_H;
|
||||||
const enter = s.id === 'prompt' ? eoc(prog(t, 0, 0.35)) : 1;
|
if (r.at < 0) { set(r.el, 'transform', `translateY(${y.toFixed(1)}px)`); continue; }
|
||||||
const punch = s.id === 'prompt' ? 0 : 1 - eoc(prog(r, 0, 0.28));
|
const p = prog(t, r.at, 0.3);
|
||||||
const dim = s.id === 'shots' ? 0.72 * eoc(prog(r, 0.35, 0.35)) : 0;
|
set(r.el, 'opacity', String(clamp(p * 2.5)));
|
||||||
term.style.opacity = String(enter * (1 - dim));
|
set(r.el, 'transform', `translateY(${(y - (1 - eoc(p)) * ROW_H * 0.7).toFixed(1)}px)`);
|
||||||
term.style.transform = `translateY(${(1 - enter) * 60}px) scale(${(0.94 + 0.06 * enter) * (1 + 0.035 * punch)})`;
|
set(r.el, 'zIndex', String(10 + MAILS.findIndex(m => m.at === r.at)));
|
||||||
|
set(r.el.querySelector('.hi'), 'opacity', (0.95 * (1 - prog(t, r.at + 0.2, 1.0))).toFixed(3));
|
||||||
// pinned user prompt
|
|
||||||
const n = clamp(Math.floor((t - PROMPT_AT) * PROMPT_CPS), 0, PROMPT.length);
|
|
||||||
const typing = n < PROMPT.length;
|
|
||||||
const blink = Math.floor(t * 2.6) % 2 === 0;
|
|
||||||
const pinHtml = `<span class="gt">></span> ${esc(PROMPT.slice(0, n))}${s.id === 'prompt' && (typing || blink) ? cursor : ''}`;
|
|
||||||
if (pinHtml !== lastPin) { pin.innerHTML = pinHtml; lastPin = pinHtml; }
|
|
||||||
|
|
||||||
// scene lines
|
|
||||||
const out = [];
|
|
||||||
let busy = false;
|
|
||||||
for (const l of TERMINAL[s.id] ?? []) {
|
|
||||||
if (r < l.at) break;
|
|
||||||
if (l.kind === 'cmd') {
|
|
||||||
const k = Math.min(l.text.length, Math.floor((r - l.at) * CMD_CPS) + 1);
|
|
||||||
busy = k < l.text.length;
|
|
||||||
out.push(`<div class="l cmd"><span class="ps">$</span> ${esc(l.text.slice(0, k))}${busy ? cursor : ''}</div>`);
|
|
||||||
} else if (l.kind === 'note') out.push(`<div class="l note">${fmtOut(l.text)}</div>`);
|
|
||||||
else out.push(`<div class="l">${fmtOut(l.text)}</div>`);
|
|
||||||
}
|
}
|
||||||
if (s.id === 'validate') {
|
const n = MAILS.filter(m => t >= m.at).length;
|
||||||
const fixed = fixedCount(r);
|
html(unread, `${n} new`);
|
||||||
BLOCKERS.forEach(([store, msg], i) => {
|
let shake = 0;
|
||||||
if (r < BLOCKERS_AT + i * BLOCKER_GAP) return;
|
for (const m of MAILS) shake = Math.max(shake, decay(t, m.at + 0.1, 0.22));
|
||||||
const ok = i < fixed;
|
const slam = eoc(prog(t, B(3), 0.2));
|
||||||
out.push(`<div class="l"><span class="dim">${String(i + 1).padStart(2)}.</span> ${ok ? '<span class="okk">ok</span> ' : '<span class="bad">BLOCKER</span>'} <span class="t-${store === 'play' ? 'play' : 'apple'}">[${store}]</span> <span class="${ok ? 'fixed' : ''}">${esc(msg)}</span></div>`);
|
const z = 1 + 0.035 * t + 0.06 * slam;
|
||||||
});
|
set(hookCam, 'transform', `translate(${(Math.sin(t * 90) * 7 * shake).toFixed(1)}px, ${(Math.cos(t * 70) * 5 * shake).toFixed(1)}px) scale(${z.toFixed(4)})`);
|
||||||
const winAt = FIX_AT + BLOCKERS.length * FIX_GAP + 0.05;
|
set(hookCam, 'filter', slam > 0 ? `blur(${(slam * 7).toFixed(1)}px)` : 'none');
|
||||||
if (r >= winAt) out.push('<div class="l"><span class="t-validate">[validate]</span> <span class="win">no blockers</span></div>');
|
set(hookDim, 'opacity', (0.74 * slam).toFixed(3));
|
||||||
if (r >= winAt + 0.2) out.push('<div class="l dim">(UI-only steps are not visible to the API: App Privacy, Play App content)</div>');
|
|
||||||
}
|
|
||||||
const last = out.length ? out[out.length - 1] : '';
|
|
||||||
const idle = !busy && s.id !== 'prompt' && (blink || r < 0.05);
|
|
||||||
const html = out.join('') + (idle && !last.includes('cur') ? `<div class="l">${cursor}</div>` : '');
|
|
||||||
// visible height: up to the panel when one is shown
|
|
||||||
const panel = PANEL_FOR[s.id];
|
|
||||||
const body = linesEl.parentElement;
|
|
||||||
const top = term.offsetTop + body.offsetTop + linesEl.offsetTop;
|
|
||||||
const bottom = panel && r > 0.4 ? panelTop(panel) - 14 : term.offsetTop + term.offsetHeight - 22;
|
|
||||||
const lh = parseFloat(getComputedStyle(linesEl).lineHeight) || 40;
|
|
||||||
linesEl.style.height = `${Math.max(lh, Math.floor((bottom - top) / lh) * lh)}px`;
|
|
||||||
if (html !== lastLines) { linesEl.innerHTML = html; lastLines = html; }
|
|
||||||
linesEl.scrollTop = linesEl.scrollHeight;
|
|
||||||
}
|
|
||||||
function panelTop(sel) {
|
|
||||||
panelTopCache ??= {};
|
|
||||||
if (panelTopCache[sel] === undefined) {
|
|
||||||
const el = $(sel);
|
|
||||||
panelTopCache[sel] = parseFloat(getComputedStyle(el).top);
|
|
||||||
}
|
|
||||||
return panelTopCache[sel];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- panels ----------
|
// ---------- scan: the terminal ----------
|
||||||
const pricesEl = $('#prices'), langsEl = $('#langs'), questEl = $('#quest');
|
const term = $('#term'), scanCam = $('#s-scan .cam');
|
||||||
langsEl.querySelector('.chips').innerHTML = LANGS.map(l => `<span class="chip">${l}</span>`).join('');
|
const CW = V ? 840 : 1560;
|
||||||
const chips = [...langsEl.querySelectorAll('.chip')];
|
term.innerHTML = [
|
||||||
const QUEST = [
|
'<span class="ln" data-k="prompt"></span>',
|
||||||
['Play Data safety', 'the whole form, from the config', 'api'],
|
'<span class="ln"> </span>',
|
||||||
['App Store age rating', 'categories, content rights too', 'api'],
|
...SCAN_HEAD.map((l, i) => `<span class="ln ${l.kind === 'head' ? 'head' : 'dimt'}" data-at="${l.at}" data-k="head${i}">${esc(l.text)}</span>`),
|
||||||
['Export compliance', 'your answer, set once in the config', 'api'],
|
'<span class="ln"> </span>',
|
||||||
['Play content rating (IARC)', 'the skill walks your agent through it', 'ui'],
|
`<span class="ln sec" data-at="${SDK_AT}" data-k="sdks">SDKs</span>`,
|
||||||
['App Privacy labels + Publish', 'the skill walks your agent through it', 'ui'],
|
...SDKS.map((s, i) => `<span class="ln sdk" data-at="${s.at}" data-k="sdk${i}"> <b>${esc(s.name)}</b> · ${esc(s.what)}\n <span class="loc">${esc(s.where)}</span> <span class="dimt">${esc(s.dep)}</span></span>`),
|
||||||
['The answers themselves', 'your statements · the agent asks', 'you'],
|
'<span class="ln"> </span>',
|
||||||
|
`<span class="ln risk" data-at="${RISKS_AT}" data-k="risks">${esc(RISKS_LINE).replace(/(2 blocker, 3 high)/, '<span class="r">$1</span>')}</span>`,
|
||||||
|
...FINDINGS.map((f, i) => `<span class="fd" data-at="${f.at}" data-k="f${i}"><span class="glow"></span>`
|
||||||
|
+ `<span>${i + 1}. <span class="sev${f.sev === 'HIGH' ? ' high' : ''}">${f.sev}</span><span class="gl">${esc(f.guideline)}</span> <span class="dimt">· App Store</span></span>`
|
||||||
|
+ `<span class="ttl">${esc(f.title)}</span>`
|
||||||
|
+ `<span class="loc">at ${esc(f.where)}</span>`
|
||||||
|
+ `<span class="fx">fix: ${f.fix.match(/^[a-z]/) ? '<i>…</i> ' : ''}${esc(f.fix)} <i>…</i></span></span>`),
|
||||||
|
].join('');
|
||||||
|
const tl = Object.fromEntries([...term.querySelectorAll('[data-k]')].map(e => [e.dataset.k, e]));
|
||||||
|
const timed = [...term.querySelectorAll('[data-at]')].map(e => ({ el: e, at: Number(e.dataset.at), fd: e.classList.contains('fd') }));
|
||||||
|
const box = el => ({ y: el.offsetTop, h: el.offsetHeight });
|
||||||
|
/** Camera keys: [time, element key, zoom]. The camera eases to each key over 0.42 s, starting a little before. */
|
||||||
|
const ZF = V ? 1.14 : 1.1;
|
||||||
|
const SCAN_CAM = [
|
||||||
|
[scene('scan').start, 'prompt', V ? 1.9 : 1.7],
|
||||||
|
[ENTER_AT, 'head0', ZF + 0.04],
|
||||||
|
[SDK_AT, 'sdk0', ZF],
|
||||||
|
[RISKS_AT, 'risks', ZF],
|
||||||
|
...FINDINGS.map((f, i) => [f.at, `f${i}`, ZF]),
|
||||||
];
|
];
|
||||||
// Phosphor icons (icons/, copied unchanged by tools/site-icons.ts), shown as CSS masks in the pill colour
|
let camBoxes = null;
|
||||||
const ICON = {
|
function scanCamAt(t) {
|
||||||
api: '<span class="pi" style="--pi:url(icons/check-bold.svg);background:#86efac"></span>',
|
camBoxes ??= Object.fromEntries(SCAN_CAM.map(([, k]) => [k, box(tl[k])]));
|
||||||
ui: '<span class="pi" style="--pi:url(icons/arrow-right-bold.svg);background:#fcd34d"></span>',
|
const pos = k => { const b = camBoxes[k]; return b.y + b.h / 2; };
|
||||||
you: '<span class="pi" style="--pi:url(icons/user-bold.svg);background:#f9a8d4"></span>',
|
let y = pos(SCAN_CAM[0][1]), z = SCAN_CAM[0][2], typing = 1;
|
||||||
};
|
for (let i = 1; i < SCAN_CAM.length; i++) {
|
||||||
const BG = { api: 'var(--api-bg)', ui: 'var(--ui-bg)', you: 'var(--you-bg)' };
|
const [at, k, zz] = SCAN_CAM[i];
|
||||||
questEl.querySelector('.rows').innerHTML = QUEST.map(([nm, ds, k]) =>
|
const p = eio(prog(t, at - 0.12, 0.42));
|
||||||
`<div class="row"><span class="ico" style="background:${BG[k]}">${ICON[k]}</span><div><div class="nm">${esc(nm)}</div><div class="ds">${esc(ds)}</div></div><span class="pill p-${k}">${k.toUpperCase()}</span></div>`).join('');
|
y = lerp(y, pos(k), p); z = lerp(z, zz, p);
|
||||||
const qrows = [...questEl.querySelectorAll('.row')];
|
if (i === 1) typing = 1 - p;
|
||||||
const tbody = pricesEl.querySelector('tbody'), psum = pricesEl.querySelector('.sum');
|
|
||||||
let lastPrices = '';
|
|
||||||
|
|
||||||
function panelIn(el, r, at) {
|
|
||||||
const p = prog(r, at, 0.32);
|
|
||||||
el.style.opacity = String(clamp(p * 2));
|
|
||||||
el.style.transform = `translateY(${(1 - eob(p)) * 90}px) scale(${0.96 + 0.04 * eoc(p)})`;
|
|
||||||
}
|
|
||||||
function panels(t) {
|
|
||||||
const s = sceneAt(t), r = t - s.start;
|
|
||||||
for (const el of [pricesEl, langsEl, questEl]) el.style.opacity = '0';
|
|
||||||
if (s.id === 'prices') {
|
|
||||||
panelIn(pricesEl, r, 0.45);
|
|
||||||
const flick = r < 3.05;
|
|
||||||
const k = flick ? Math.max(0, Math.floor((r - 0.7) / 0.085)) : 0;
|
|
||||||
const rows = Array.from({ length: 5 }, (_, i) => PRICES[(k + i) % PRICES.length]);
|
|
||||||
const html = rows.map(([reg, cur, a, b], i) =>
|
|
||||||
`<tr class="${(flick && i === 0) || (!flick && reg === 'TR') ? 'hot' : ''}"><td>${reg}${reg === 'TR' ? '<span class="ov">OVERRIDE</span>' : ''}</td><td>${cur}</td><td>${a}</td><td>${b}</td></tr>`).join('');
|
|
||||||
if (html !== lastPrices) { tbody.innerHTML = html; lastPrices = html; }
|
|
||||||
psum.textContent = flick ? `${String(Math.min(173, Math.max(1, Math.floor((r - 0.7) * 72)))).padStart(3)} / 173 regions` : 'Play: 173 regions · App Store: equalized from the USA';
|
|
||||||
} else if (s.id === 'languages') {
|
|
||||||
panelIn(langsEl, r, 0.45);
|
|
||||||
let n = 0;
|
|
||||||
chips.forEach((c, i) => {
|
|
||||||
const at = 0.8 + i * 0.13;
|
|
||||||
const on = r >= at;
|
|
||||||
if (on) n++;
|
|
||||||
c.classList.toggle('on', on);
|
|
||||||
const p = prog(r, at, 0.2);
|
|
||||||
c.style.transform = `scale(${on ? 1 + 0.25 * (1 - eoc(p)) : 1})`;
|
|
||||||
});
|
|
||||||
langsEl.querySelector('.count').textContent = `${n}/14`;
|
|
||||||
} else if (s.id === 'questionnaires') {
|
|
||||||
panelIn(questEl, r, 0.3);
|
|
||||||
qrows.forEach((row, i) => {
|
|
||||||
const p = prog(r, 0.55 + i * 0.36, 0.28);
|
|
||||||
row.style.opacity = String(p);
|
|
||||||
row.style.transform = `translateX(${(1 - eob(p)) * 60}px)`;
|
|
||||||
const ico = row.querySelector('.ico');
|
|
||||||
ico.style.transform = `scale(${p >= 1 ? 1 + 0.3 * (1 - eoc(prog(r, 0.55 + i * 0.36 + 0.28, 0.2))) : eob(p)})`;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// while typing the command sits centred; afterwards the column is centred
|
||||||
|
const cmdW = (CMD.length + 2) * (V ? 31 : 30) * 0.6;
|
||||||
|
const sx = lerp(W / 2, (W - cmdW * z) / 2, typing), ax = lerp(CW / 2, 0, typing);
|
||||||
|
return { tx: sx - ax * z, ty: L.cy - y * z, z };
|
||||||
|
}
|
||||||
|
function scan(t) {
|
||||||
|
const s = scene('scan');
|
||||||
|
if (t < s.start - 0.1 || t > s.end + 0.2) return;
|
||||||
|
const n = clamp(Math.floor((t - TYPE_AT) * TYPE_CPS), 0, CMD.length);
|
||||||
|
const caret = t < ENTER_AT ? (n < CMD.length || Math.floor(t * 2.4) % 2 === 0) : false;
|
||||||
|
html(tl.prompt, `<span class="ps">$</span> <span class="cmd">${esc(CMD.slice(0, n))}</span>${caret ? '<span class="caret"></span>' : ''}`);
|
||||||
|
set(tl.prompt, 'opacity', '1');
|
||||||
|
let focus = -1;
|
||||||
|
FINDINGS.forEach((f, i) => { if (t >= f.at - 0.1) focus = i; });
|
||||||
|
for (const l of timed) {
|
||||||
|
const p = prog(t, l.at, l.fd ? 0.28 : 0.2);
|
||||||
|
set(l.el, 'opacity', String(clamp(p * 2)));
|
||||||
|
set(l.el, 'transform', `translateX(${((1 - eoc(p)) * (l.fd ? 60 : 30)).toFixed(1)}px)`);
|
||||||
|
if (l.fd) {
|
||||||
|
const i = Number(l.el.dataset.k.slice(1));
|
||||||
|
const g = l.el.querySelector('.glow');
|
||||||
|
set(g, 'opacity', (i === focus ? 1 - 0.4 * prog(t, l.at + 0.3, 0.4) : 0.18 * p).toFixed(3));
|
||||||
|
set(l.el, 'filter', i === focus || focus < 0 ? 'none' : 'brightness(.62)');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const c = scanCamAt(t);
|
||||||
|
// a small push-in on every finding as it lands (about the focus line)
|
||||||
|
let punch = 0;
|
||||||
|
for (const f of FINDINGS) punch = Math.max(punch, Math.sin(Math.PI * prog(t, f.at - 0.05, 0.9)) * 0.035);
|
||||||
|
const k = 1 + punch;
|
||||||
|
set(scanCam, 'transform', `translate(${(c.tx * k - (W / 2) * (k - 1)).toFixed(1)}px, ${(c.ty * k - L.cy * (k - 1)).toFixed(1)}px) scale(${(c.z * k).toFixed(4)})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- store art ----------
|
// ---------- fixed: re-scan, reds flip green ----------
|
||||||
const shotsEl = $('#shots'), sizesEl = $('#sizes');
|
const frows = $('#frows'), rescan = $('#rescan'), counter = $('#counter'), cN = $('#counter .n'), cLab = $('#counter .lab');
|
||||||
const FAN = ['en-01', 'en-02', 'en-03', 'en-04'];
|
const FR = V ? { x: 60, w: 960, top: 690, h: 112, gap: 18 } : { x: 150, w: 920, top: 330, h: 118, gap: 22 };
|
||||||
const BIG = [['en-01', 'English'], ['tr-01', 'Türkçe'], ['ja-01', '日本語'], ['ar-01', 'العربية']];
|
frows.innerHTML = FINDINGS.map((f, i) => `<div class="frow" style="left:${FR.x}px;width:${FR.w}px;top:${FR.top + i * (FR.h + FR.gap)}px;height:${FR.h}px">
|
||||||
const SIZES = ['Play phone', '7" tablet', '10" tablet', 'iPhone 6.9"', 'iPhone 6.5"', 'iPad 13"', 'feature graphic'];
|
<span class="tint t-bad" style="background:var(--red-bg)"></span><span class="tint t-good" style="background:var(--green-bg);opacity:0"></span>
|
||||||
const L = V
|
<span class="ic"><span class="pi i-x bad"></span><span class="pi i-ok good"></span></span>
|
||||||
? { cx: 540, cy: 1040, w: 300, off: [-330, -110, 110, 330], rot: [-9, -3, 3, 9], dy: [36, 0, 0, 36], bw: 390, bcy: 1000, ly: 1318 }
|
<span><span class="t1">${esc(f.short)}</span><span class="t2" style="display:block">${esc(f.guideline)} · ${esc(f.where)}</span></span>
|
||||||
: { cx: 1360, cy: 540, w: 290, off: [-330, -110, 110, 330], rot: [-9, -3, 3, 9], dy: [30, 0, 0, 30], bw: 330, bcy: 515, ly: 790 };
|
<span class="chip" style="background:${f.sev === 'HIGH' ? '#c2410c' : 'var(--red-2)'}"><span class="c1">${f.sev}</span><span class="c2">FIXED</span></span></div>`).join('');
|
||||||
const RATIO = 1920 / 1080;
|
const frowEls = [...frows.querySelectorAll('.frow')];
|
||||||
shotsEl.innerHTML = FAN.map(f => `<div class="card fan"><img src="out/assets/${f}.jpg" alt=""></div>`).join('')
|
if (V) Object.assign(rescan.style, { left: '60px', top: '560px', width: '960px', fontSize: '29px' });
|
||||||
+ `<div class="card big">${BIG.map(([f]) => `<img src="out/assets/${f}.jpg" alt="" style="position:absolute;inset:0">`).join('')}</div>`
|
else Object.assign(rescan.style, { left: '1150px', top: '340px', width: '660px', fontSize: '25px' });
|
||||||
+ '<div class="lang"></div>';
|
rescan.innerHTML = `<span class="ln" data-k="p"></span><span class="ln" data-k="r" style="color:var(--green);font-weight:700">${esc(RESCAN_LINE)}</span>`
|
||||||
sizesEl.innerHTML = SIZES.map(s => `<span class="sz">${esc(s)}</span>`).join('');
|
+ (V ? '' : `<span class="ln" data-k="n" style="color:var(--muted)"> ${esc(RESCAN_NONE)}</span>`);
|
||||||
const fanEls = [...shotsEl.querySelectorAll('.card.fan')], bigEl = shotsEl.querySelector('.card.big'), bigImgs = [...bigEl.querySelectorAll('img')];
|
if (V) Object.assign(counter.style, { left: '0', width: '100%', top: '1340px' });
|
||||||
const langEl = shotsEl.querySelector('.lang'), sizeEls = [...sizesEl.querySelectorAll('.sz')];
|
else Object.assign(counter.style, { left: '1150px', width: '660px', top: '560px' });
|
||||||
for (const c of fanEls) { c.style.width = `${L.w}px`; c.style.height = `${L.w * RATIO}px`; }
|
cN.style.fontSize = V ? '120px' : '230px'; cLab.style.fontSize = V ? '40px' : '50px';
|
||||||
bigEl.style.width = `${L.bw}px`; bigEl.style.height = `${L.bw * RATIO}px`;
|
if (V) { counter.style.display = 'flex'; counter.style.justifyContent = 'center'; counter.style.alignItems = 'baseline'; counter.style.gap = '24px'; }
|
||||||
|
function fixed(t) {
|
||||||
function place(el, cx, cy, w, h, rot, sc, op) {
|
const s = scene('fixed');
|
||||||
el.style.transform = `translate(${cx - w / 2}px, ${cy - h / 2}px) rotate(${rot}deg) scale(${sc})`;
|
if (t < s.start - 0.3 || t > s.end + 0.5) return;
|
||||||
el.style.opacity = String(op);
|
const n = clamp(Math.floor((t - RESCAN_TYPE_AT) * 24), 0, RESCAN_CMD.length);
|
||||||
|
const p = rescan.querySelector('[data-k="p"]'), r = rescan.querySelector('[data-k="r"]'), none = rescan.querySelector('[data-k="n"]');
|
||||||
|
html(p, `<span class="ps">$</span> <span class="cmd">${esc(RESCAN_CMD.slice(0, n))}</span>${n < RESCAN_CMD.length || t < FLIP_AT[0] - 0.2 ? '<span class="caret"></span>' : ''}`);
|
||||||
|
set(p, 'opacity', '1');
|
||||||
|
const rp = prog(t, RESCAN_LINE_AT, 0.25);
|
||||||
|
set(r, 'opacity', String(rp)); set(r, 'transform', `translateX(${((1 - eoc(rp)) * 30).toFixed(1)}px)`);
|
||||||
|
if (none) { const np = prog(t, RESCAN_LINE_AT + 0.15, 0.25); set(none, 'opacity', String(np)); }
|
||||||
|
let left = FINDINGS.length;
|
||||||
|
frowEls.forEach((el, i) => {
|
||||||
|
const enter = prog(t, s.start + 0.05 + i * 0.06, 0.3);
|
||||||
|
const f = prog(t, FLIP_AT[i], 0.32);
|
||||||
|
if (t >= FLIP_AT[i]) left--;
|
||||||
|
const pop = decay(t, FLIP_AT[i], 0.3);
|
||||||
|
set(el, 'opacity', String(enter));
|
||||||
|
set(el, 'transform', `translateY(${((1 - eoc(enter)) * 40).toFixed(1)}px) scale(${(1 + 0.035 * pop).toFixed(4)})`);
|
||||||
|
set(el, 'borderColor', f > 0.5 ? 'rgba(61,220,132,.55)' : 'rgba(255,90,95,.4)');
|
||||||
|
set(el.querySelector('.t-good'), 'opacity', String(eoc(f)));
|
||||||
|
set(el.querySelector('.t-bad'), 'opacity', String(1 - eoc(f)));
|
||||||
|
set(el.querySelector('.bad'), 'transform', `scale(${(1 - eic(f)).toFixed(3)}) rotate(${(-90 * f).toFixed(1)}deg)`);
|
||||||
|
set(el.querySelector('.good'), 'transform', `scale(${eob(f).toFixed(3)})`);
|
||||||
|
set(el.querySelector('.good'), 'opacity', String(clamp(f * 3)));
|
||||||
|
const c2 = el.querySelector('.c2');
|
||||||
|
set(c2, 'clipPath', `inset(0 ${((1 - eoc(f)) * 100).toFixed(1)}% 0 0)`);
|
||||||
|
});
|
||||||
|
const zero = left === 0;
|
||||||
|
html(cN, String(left));
|
||||||
|
html(cLab, zero ? 'blockers' : 'rejection risks');
|
||||||
|
set(cN, 'color', zero ? 'var(--green)' : 'var(--red)');
|
||||||
|
let pop = 0;
|
||||||
|
FLIP_AT.forEach((a, i) => { pop = Math.max(pop, decay(t, a, 0.25) * (i === 4 ? 1.6 : 1)); });
|
||||||
|
const ce = prog(t, s.start + 0.25, 0.35);
|
||||||
|
set(counter, 'opacity', String(ce));
|
||||||
|
set(cN, 'transform', `scale(${(1 + 0.22 * pop).toFixed(3)})`);
|
||||||
|
set(cN, 'display', 'inline-block');
|
||||||
|
set(cN, 'textShadow', zero ? `0 0 ${(40 + 60 * pop).toFixed(0)}px rgba(61,220,132,.6)` : '0 0 40px rgba(255,90,95,.4)');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------- shots: the screenshot wall ----------
|
||||||
|
const wall = $('#wall'), shotNum = $('#shotcount .num'), shotCount = $('#shotcount'), shotCmd = $('#shotcmd');
|
||||||
|
const GRID = await fetch('out/assets/grid.json').then(r => { if (!r.ok) throw new Error('out/assets/grid.json missing (bun media/teaser/render.ts prepares it)'); return r.json(); });
|
||||||
|
const WALL = V ? { cols: 7, rows: 7, tw: 210, th: 373, gap: 22 } : { cols: 11, rows: 4, tw: 200, th: 356, gap: 22 };
|
||||||
|
const tiles = [];
|
||||||
|
{
|
||||||
|
const ww = WALL.cols * (WALL.tw + WALL.gap), wh = WALL.rows * (WALL.th + WALL.gap);
|
||||||
|
let k = 0;
|
||||||
|
for (let r = 0; r < WALL.rows; r++) for (let c = 0; c < WALL.cols; c++) {
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.className = 'tile';
|
||||||
|
const x = c * (WALL.tw + WALL.gap) - ww / 2 + (r % 2 ? WALL.tw * 0.25 : 0), y = r * (WALL.th + WALL.gap) - wh / 2;
|
||||||
|
Object.assign(el.style, { left: `${x}px`, top: `${y}px`, width: `${WALL.tw}px`, height: `${WALL.th}px`, backgroundImage: `url(out/assets/grid/${GRID[(k * 7) % GRID.length]})` });
|
||||||
|
wall.appendChild(el);
|
||||||
|
const d = Math.hypot(x + WALL.tw / 2, (y + WALL.th / 2) * 0.8);
|
||||||
|
tiles.push({ el, d: d + ((k * 37) % 11) * 18 });
|
||||||
|
k++;
|
||||||
|
}
|
||||||
|
const order = [...tiles].sort((a, b) => a.d - b.d);
|
||||||
|
order.forEach((tl2, i) => { tl2.at = 0.12 + (i / order.length) * 1.45; });
|
||||||
|
}
|
||||||
|
if (V) { Object.assign(shotCmd.style, { left: '50%', top: '500px' }); Object.assign(shotCount.style, { left: '50%', top: '1300px', fontSize: '58px' }); }
|
||||||
|
else { Object.assign(shotCmd.style, { left: '50%', top: '290px' }); Object.assign(shotCount.style, { left: '50%', top: '880px', fontSize: '56px' }); }
|
||||||
function shots(t) {
|
function shots(t) {
|
||||||
const s = sceneAt(t), r = t - s.start;
|
const s = scene('shots');
|
||||||
const on = s.id === 'shots';
|
if (t < s.start - 0.1 || t > s.end + 0.6) return;
|
||||||
shotsEl.style.display = on ? '' : 'none';
|
const r = t - s.start;
|
||||||
sizesEl.style.display = on ? '' : 'none';
|
let shown = 0;
|
||||||
if (!on) return;
|
for (const tile of tiles) {
|
||||||
const h = L.w * RATIO;
|
const p = prog(r, tile.at, 0.26);
|
||||||
const spread = eoc(prog(r, 1.95, 0.35));
|
if (p > 0) shown++;
|
||||||
fanEls.forEach((el, i) => {
|
set(tile.el, 'opacity', String(clamp(p * 2)));
|
||||||
const p = prog(r, 0.3 + i * 0.2, 0.5);
|
set(tile.el, 'transform', `translateZ(${((1 - eoc(p)) * 260).toFixed(1)}px) scale(${lerp(0.72, 1, eob(p)).toFixed(3)})`);
|
||||||
const e = eob(p);
|
}
|
||||||
const dir = i < 2 ? -1 : 1;
|
const z = lerp(1.12, 0.98, eio(prog(r, 0, s.end - s.start + 0.4)));
|
||||||
const x0 = L.cx + dir * (V ? 700 : 900), y0 = L.cy + (V ? 1100 : 800);
|
set(wall, 'transform', `translate(-50%, -50%) translateY(${(-60 * r).toFixed(1)}px) perspective(2200px) rotateX(20deg) rotateZ(-11deg) scale(${z.toFixed(4)})`);
|
||||||
const fx = L.cx + L.off[i] + dir * 70 * spread, fy = L.cy + L.dy[i] + Math.sin(t * 2 + i) * 6;
|
const frac = shown / tiles.length;
|
||||||
place(el, lerp(x0, fx, e), lerp(y0, fy, e), L.w, h, lerp(dir * 40, L.rot[i] + dir * 4 * spread, e), 1 - 0.12 * spread, clamp(p * 3) * (1 - 0.45 * spread));
|
html(shotNum, String(Math.round(SHOTS_TOTAL * eoc(clamp(r / 1.65)) * (frac > 0 ? 1 : 0))));
|
||||||
});
|
const cp = prog(r, 0.1, 0.35), np = prog(r, 0.35, 0.35);
|
||||||
// big card cycling the hero screenshot through four languages
|
set(shotCmd, 'opacity', String(cp)); set(shotCmd, 'transform', `translate(-50%, ${((1 - eoc(cp)) * 20).toFixed(1)}px)`);
|
||||||
const bp = prog(r, 1.95, 0.42);
|
const pop = decay(r, 1.65, 0.3);
|
||||||
const bh = L.bw * RATIO;
|
set(shotCount, 'opacity', String(np)); set(shotCount, 'transform', `translate(-50%, ${((1 - eoc(np)) * 30).toFixed(1)}px) scale(${(1 + 0.12 * pop).toFixed(3)})`);
|
||||||
const idx = r < 2.5 ? 0 : r < 2.95 ? 1 : r < 3.4 ? 2 : 3;
|
|
||||||
const sw = [2.5, 2.95, 3.4].map(a => 1 - Math.min(1, Math.abs(r - a) / 0.09)).reduce((a, b) => Math.max(a, b), 0);
|
|
||||||
place(bigEl, L.cx, L.bcy + (1 - eob(bp)) * 500 + Math.sin(t * 1.6) * 5, L.bw, bh, (1 - eoc(bp)) * 12, (0.7 + 0.3 * eob(bp)), clamp(bp * 3));
|
|
||||||
bigEl.style.transform += ` scaleX(${1 - 0.18 * sw})`;
|
|
||||||
bigImgs.forEach((im, i) => { im.style.opacity = i === idx ? '1' : '0'; });
|
|
||||||
langEl.textContent = BIG[idx][1];
|
|
||||||
const lp = prog(r, 2.2, 0.25);
|
|
||||||
langEl.style.opacity = String(lp);
|
|
||||||
langEl.style.left = `${L.cx}px`; langEl.style.top = `${L.ly}px`;
|
|
||||||
langEl.style.transform = `translateX(-50%) scale(${(1 + 0.2 * sw) * (0.6 + 0.4 * eob(lp))})`;
|
|
||||||
// sizes
|
|
||||||
sizeEls.forEach((el, i) => {
|
|
||||||
const at = 3.75 + i * 0.16;
|
|
||||||
const p = prog(r, at, 0.22);
|
|
||||||
el.style.opacity = String(clamp(p * 3));
|
|
||||||
el.style.transform = `translateY(${(1 - eob(p)) * 30}px) scale(${1 + 0.2 * (1 - eoc(p))})`;
|
|
||||||
el.classList.toggle('on', r >= at);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- desktop app ----------
|
// ---------- declarations ----------
|
||||||
// Real frames of apps/desktop in fixture mode (out/desktop/*.jpg, 1280 x 800 at 2x, desktop.ts) in a CSS window, with
|
const prop = $('#prop'), form = $('#form'), declNum = $('#declcount .num'), declCount = $('#declcount');
|
||||||
// a camera that zooms toward the step's point, the Phosphor cursor, and the confirm dialog drawn on top.
|
const PROP_LINES = [...DECL_LINES.map(d => ({ k: 'detected', w: d.what, v: d.value, loc: d.where })), { k: 'ask owner', w: DECL_ASK.replace('ask owner ', ''), v: '?', loc: '', ask: true }];
|
||||||
|
prop.querySelector('.body').innerHTML = PROP_LINES.map(l => `<span class="ln${l.ask ? ' ask' : ''}"><span class="k">${esc(l.k)}</span> <span class="w">${esc(l.w)}</span>${l.loc ? ` <span class="loc">${esc(l.loc)}</span>` : ` ${esc(l.v)}`}</span>`).join('');
|
||||||
|
const ROW = V ? 54 : 62;
|
||||||
|
form.querySelector('.body').innerHTML = DATA_SAFETY_ROWS.map(r => `<div class="row" style="height:${ROW}px"><span class="box"><span class="fill"></span><span class="pi i-check"></span></span>${esc(r)}<span class="tag">detected</span></div>`).join('');
|
||||||
|
if (V) {
|
||||||
|
Object.assign(prop.style, { left: '60px', width: '960px', top: '540px' });
|
||||||
|
Object.assign(form.style, { left: '60px', width: '960px', top: '890px' });
|
||||||
|
Object.assign(declCount.style, { left: '50%', top: '1372px', fontSize: '50px' });
|
||||||
|
} else {
|
||||||
|
Object.assign(prop.style, { left: '130px', width: '860px', top: '320px' });
|
||||||
|
Object.assign(form.style, { left: '1040px', width: '750px', top: '300px' });
|
||||||
|
Object.assign(declCount.style, { left: '560px', top: '820px', fontSize: '56px' });
|
||||||
|
}
|
||||||
|
const propLns = [...prop.querySelectorAll('.ln')], formRows = [...form.querySelectorAll('.row')];
|
||||||
|
function decl(t) {
|
||||||
|
const s = scene('decl');
|
||||||
|
if (t < s.start - 0.4 || t > s.end + 0.5) return;
|
||||||
|
const r = t - s.start;
|
||||||
|
const ce = eoc(prog(r, 0, 0.4));
|
||||||
|
set(prop, 'transform', `translateY(${((1 - ce) * 40).toFixed(1)}px)`); set(prop, 'opacity', String(ce));
|
||||||
|
const fe = eoc(prog(r, 0.35, 0.4));
|
||||||
|
set(form, 'transform', `translateY(${((1 - fe) * 40).toFixed(1)}px)`); set(form, 'opacity', String(fe));
|
||||||
|
propLns.forEach((el, i) => { const p = prog(r, 0.2 + i * 0.16, 0.22); set(el, 'opacity', String(p)); set(el, 'transform', `translateX(${((1 - eoc(p)) * 30).toFixed(1)}px)`); });
|
||||||
|
formRows.forEach((el, i) => {
|
||||||
|
const p = prog(r, 0.95 + i * 0.16, 0.24);
|
||||||
|
set(el.querySelector('.fill'), 'opacity', String(eoc(p)));
|
||||||
|
set(el.querySelector('.pi'), 'transform', `scale(${eob(p).toFixed(3)})`);
|
||||||
|
set(el.querySelector('.box'), 'borderColor', p > 0 ? 'var(--green)' : 'var(--line-2)');
|
||||||
|
set(el.querySelector('.tag'), 'opacity', String(p));
|
||||||
|
set(el, 'color', p > 0.5 ? '#fff' : 'var(--ink-2)');
|
||||||
|
});
|
||||||
|
const np = prog(r, 0.95, 1.3);
|
||||||
|
html(declNum, String(Math.round(DECL_TOTAL * eoc(np))));
|
||||||
|
const dp = prog(r, 0.8, 0.3), pop = decay(r, 2.25, 0.3);
|
||||||
|
set(declCount, 'opacity', String(dp));
|
||||||
|
set(declCount, 'transform', `translate(${V ? '-50%' : '0'}, ${((1 - eoc(dp)) * 30).toFixed(1)}px) scale(${(1 + 0.12 * pop).toFixed(3)})`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------- desktop: real frames in a window, slow camera, one callout ----------
|
||||||
const BOXES = await fetch('out/desktop/boxes.json').then(r => { if (!r.ok) throw new Error('out/desktop/boxes.json missing (bun media/teaser/desktop.ts)'); return r.json(); });
|
const BOXES = await fetch('out/desktop/boxes.json').then(r => { if (!r.ok) throw new Error('out/desktop/boxes.json missing (bun media/teaser/desktop.ts)'); return r.json(); });
|
||||||
const FW = 1280, FH = 800;
|
const WIN = V ? { x: 40, y: 520, w: 1000, h: 950 } : { x: 210, y: 285, w: 1500, h: 760 };
|
||||||
const DW = V ? { x: 40, y: 640, w: 1000 } : { x: 880, y: 226, w: 940 };
|
const VIEW = { w: WIN.w, h: WIN.h - 44 };
|
||||||
const TB = 40, VW = DW.w, VH = DW.w * FH / FW;
|
const S0 = Math.max(VIEW.w / 1280, VIEW.h / 800);
|
||||||
const deskEl = $('#desk'), win = $('#desk .win'), viewEl = $('#desk .view'), cam = $('#desk .cam'), shade = $('#desk .shade'),
|
const desk = {};
|
||||||
dlg = $('#desk .dlg'), stepEl = $('#desk .step'), linkEl = $('#desk .link'), dcur = $('#dcur');
|
for (const [id, d] of Object.entries(DESKTOP)) {
|
||||||
win.style.left = `${DW.x}px`; win.style.top = `${DW.y}px`; win.style.width = `${VW}px`;
|
const el = $(`#s-${id}`);
|
||||||
viewEl.style.width = `${VW}px`; viewEl.style.height = `${VH}px`;
|
const img = f => `<img src="out/desktop/${f}.jpg" alt="">`;
|
||||||
const FRAMES = ['portfolio', 'releases', 'growth', 'growth-hover', 'palette', 'prices-diff'];
|
el.innerHTML = `<div class="win" style="left:${WIN.x}px;top:${WIN.y}px;width:${WIN.w}px;height:${WIN.h}px">
|
||||||
cam.innerHTML = FRAMES.map(f => `<img data-f="${f}" src="out/desktop/${f}.jpg" alt="">`).join('');
|
<div class="bar"><i></i><i></i><i></i><span class="tt">storebound</span></div>
|
||||||
const frameEls = Object.fromEntries([...cam.querySelectorAll('img')].map(im => [im.dataset.f, im]));
|
<div class="view"><div class="cam" style="position:absolute;left:0;top:0;width:1280px;height:800px;transform-origin:0 0">
|
||||||
// the dialog's dry run restates the diff rows of the prices-diff frame (fixture data)
|
${img(d.empty ?? d.frame)}
|
||||||
dlg.querySelector('pre').textContent = [
|
${d.empty ? `<div class="clip c1">${img(d.frame)}</div><div class="clip c2">${img(d.frame)}</div>` : ''}
|
||||||
'Dry run (storebound prices import --dry):',
|
${d.clean ? `<div class="clip cl">${img(d.clean)}</div><div class="scanline" style="width:1280px"></div>` : ''}
|
||||||
'coins_small Google Play TR TRY 21.99 -> 24.99',
|
</div></div></div>
|
||||||
'coins_small Google Play BR R$3.99 -> R$4.49',
|
<div class="ring${d.clean ? ' green' : ''}"></div><div class="callout${d.clean ? ' green' : ''}">${esc(d.callout.text)}</div>`;
|
||||||
'coins_small App Store TR TRY 29.99 -> 24.99',
|
desk[id] = { el, d, win: el.querySelector('.win'), cam: el.querySelector('.cam'), c1: el.querySelector('.c1'), c2: el.querySelector('.c2'),
|
||||||
'no_ads App Store BR R$14.90 -> R$12.90',
|
cl: el.querySelector('.cl'), line: el.querySelector('.scanline'), ring: el.querySelector('.ring'), callout: el.querySelector('.callout') };
|
||||||
].join('\n');
|
}
|
||||||
if (V) { stepEl.style.left = '0'; stepEl.style.right = '0'; stepEl.style.textAlign = 'center'; stepEl.style.top = `${DW.y + TB + VH + 56}px`; }
|
const pct = v => `${(v * 100).toFixed(3)}%`;
|
||||||
else { stepEl.style.left = '120px'; stepEl.style.top = '790px'; }
|
/** Camera of a desktop scene at r seconds: image scale and offset inside the window view. */
|
||||||
const focusOf = f => (typeof f === 'string' ? (b => [b.x + b.w / 2, b.y + b.h / 2])(BOXES[f]) : f);
|
function deskCam(d, r, len) {
|
||||||
/** Camera for a step: scale and offset of the frame inside the view, the focus kept on screen, no empty edge. */
|
const p = eio(clamp(r / len));
|
||||||
function camFor(st, p) {
|
// the vertical window shows a portrait crop of the landscape app: a gentler push, and the Checks card kept whole-ish
|
||||||
const z = lerp(1, st.zoom, p), S = (VW / FW) * z;
|
const zk = V ? 0.45 : 1, fxv = V && d.clean ? 0.6 : null;
|
||||||
const [fx, fy] = focusOf(st.focus);
|
const z = 1 + (lerp(d.from.z, d.to.z, p) - 1) * zk, fx = fxv ?? lerp(d.from.f[0], d.to.f[0], p), fy = lerp(d.from.f[1], d.to.f[1], p);
|
||||||
const ox = clamp(VW / 2 - fx * FW * S, VW - FW * S, 0), oy = clamp(VH / 2 - fy * FH * S, VH - FH * S, 0);
|
const S = S0 * z;
|
||||||
|
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);
|
||||||
return { S, ox, oy };
|
return { S, ox, oy };
|
||||||
}
|
}
|
||||||
let deskCam = { S: VW / FW, ox: 0, oy: 0 };
|
/** A boxes.json entry in stage pixels for the current camera (plus the window's own transform, applied by the caller). */
|
||||||
/** A point of the frame (fractions) in stage pixels, through the current camera. */
|
const stageBox = (b, c) => ({ x: WIN.x + c.ox + b.x * 1280 * c.S, y: WIN.y + 44 + c.oy + b.y * 800 * c.S, w: b.w * 1280 * c.S, h: b.h * 800 * c.S });
|
||||||
const framePt = (fx, fy) => [DW.x + deskCam.ox + fx * FW * deskCam.S, DW.y + TB + deskCam.oy + fy * FH * deskCam.S];
|
const cursorEl = $('#cursor'), clickEl = $('#click');
|
||||||
function deskTarget(name) {
|
let cursorShown = false;
|
||||||
if (name === 'off') return [DW.x + VW + 120, DW.y + TB + VH + 160];
|
function cursorAt(x, y, op, press = 0) {
|
||||||
if (name === 'dialog-ok') { const b = dlg.querySelector('.ok').getBoundingClientRect(); return [b.left + b.width * 0.9, b.top + b.height * 0.7]; }
|
cursorShown = op > 0;
|
||||||
const b = BOXES[name];
|
set(cursorEl, 'opacity', String(op));
|
||||||
return framePt(b.x + b.w * (b.w ? 0.9 : 1), b.y + b.h * (b.h ? 0.75 : 1));
|
set(cursorEl, 'transform', `translate(${(x - 10).toFixed(1)}px, ${(y - 10).toFixed(1)}px) scale(${(1 - 0.14 * press).toFixed(3)})`);
|
||||||
}
|
}
|
||||||
function desktop(t) {
|
function desktop(t) {
|
||||||
const s = sceneAt(t), r = t - s.start;
|
for (const [id, k] of Object.entries(desk)) {
|
||||||
if (s.id !== 'desktop') { deskEl.style.opacity = '0'; deskEl.style.display = 'none'; return; }
|
const s = scene(id), d = k.d, r = t - s.start, len = s.end - s.start;
|
||||||
deskEl.style.display = ''; deskEl.style.opacity = '1';
|
if (t < s.start - 0.2 || t > s.end + 0.5) continue;
|
||||||
// window in, a punch on every step
|
const c = deskCam(d, r, len + 0.3);
|
||||||
const ip = prog(r, 0.0, 0.45);
|
set(k.cam, 'transform', `translate(${c.ox.toFixed(2)}px, ${c.oy.toFixed(2)}px) scale(${(c.S).toFixed(5)})`);
|
||||||
const si = DESKTOP.findLastIndex(x => r >= x.at), st = DESKTOP[Math.max(0, si)];
|
if (k.c1) {
|
||||||
const punch = si > 0 && !st.dialog ? 1 - eoc(prog(r, st.at, 0.25)) : 0;
|
const p = eio(prog(r, d.fill[0], d.fill[1] - d.fill[0]));
|
||||||
win.style.opacity = String(clamp(ip * 2.5));
|
for (const [el, b] of [[k.c1, BOXES.roll], [k.c2, BOXES.roll2]]) {
|
||||||
win.style.transform = `translateY(${(1 - eob(ip)) * 120}px) scale(${(0.9 + 0.1 * eoc(ip)) * (1 + 0.02 * punch)})`;
|
set(el, 'clipPath', `inset(${pct(b.y)} ${pct(1 - b.x - b.w * p)} ${pct(1 - b.y - b.h)} ${pct(b.x)})`);
|
||||||
// frames: a quick crossfade on each cut; the chart tooltip fades in when the cursor gets there
|
|
||||||
const prev = DESKTOP[si - 1];
|
|
||||||
const fade = prev && prev.frame !== st.frame ? prog(r, st.at, 0.16) : 1;
|
|
||||||
const frameName = x => (x.frame === 'growth' && r >= DESK_HOVER_AT ? 'growth-hover' : x.frame);
|
|
||||||
for (const [f, im] of Object.entries(frameEls)) {
|
|
||||||
im.style.opacity = f === frameName(st) ? '1' : prev && f === frameName(prev) && fade < 1 ? '1' : '0';
|
|
||||||
im.style.zIndex = f === frameName(st) ? '2' : '1';
|
|
||||||
}
|
}
|
||||||
if (frameEls[frameName(st)]) frameEls[frameName(st)].style.opacity = String(fade);
|
|
||||||
const growthTip = st.frame === 'growth' ? prog(r, DESK_HOVER_AT, 0.15) : 0;
|
|
||||||
if (st.frame === 'growth' && r >= DESK_HOVER_AT) { frameEls.growth.style.opacity = '1'; frameEls['growth-hover'].style.opacity = String(growthTip); }
|
|
||||||
// camera: ease into the step's zoom (a fresh frame starts from the whole window)
|
|
||||||
const keep = prev && prev.frame === st.frame;
|
|
||||||
const from = keep ? camFor(prev, 1) : camFor(st, 0), to = camFor(st, 1);
|
|
||||||
const cp = eoc(prog(r, st.at + 0.1, 0.9));
|
|
||||||
deskCam = { S: lerp(from.S, to.S, cp), ox: lerp(from.ox, to.ox, cp), oy: lerp(from.oy, to.oy, cp) };
|
|
||||||
cam.style.transform = `translate(${deskCam.ox}px, ${deskCam.oy}px) scale(${deskCam.S})`;
|
|
||||||
// the confirm dialog
|
|
||||||
const dIn = prog(r, DESK_DIALOG[0], 0.3), dOut = prog(r, DESK_DIALOG[1] + 0.12, 0.2);
|
|
||||||
const dv = clamp(dIn * 3) * (1 - dOut);
|
|
||||||
shade.style.opacity = String(dv);
|
|
||||||
dlg.style.opacity = String(dv);
|
|
||||||
dlg.style.transform = `translate(-50%, -50%) scale(${(V ? 1.25 : 1.05) * (0.85 + 0.15 * eob(dIn)) * (1 - 0.06 * dOut)})`;
|
|
||||||
// step label
|
|
||||||
const sp = prog(r, st.at + 0.05, 0.3);
|
|
||||||
stepEl.innerHTML = `<i>${String(si + 1).padStart(2, '0')}</i>${esc(st.step)}`;
|
|
||||||
stepEl.style.opacity = String(clamp(sp * 2) * (1 - prog(t, s.end - 0.16, 0.16)));
|
|
||||||
stepEl.style.transform = `translateY(${(1 - eoc(sp)) * 24}px)`;
|
|
||||||
// cursor
|
|
||||||
const k = DESK_CURSOR.findLastIndex(([a]) => r >= a);
|
|
||||||
if (k < 0) dcur.style.opacity = '0';
|
|
||||||
else {
|
|
||||||
const [a0, n0] = DESK_CURSOR[k], nx = DESK_CURSOR[k + 1];
|
|
||||||
const p0 = deskTarget(n0);
|
|
||||||
let [x, y] = p0;
|
|
||||||
if (nx) { const p1 = deskTarget(nx[1]); const mp = eoc(clamp((r - a0) / (nx[0] - a0))); x = lerp(p0[0], p1[0], mp); y = lerp(p0[1], p1[1], mp); }
|
|
||||||
const click = DESK_CURSOR.filter(c => c[2]).reduce((m, c) => Math.max(m, 1 - Math.min(1, Math.abs(r - c[0]) / 0.12)), 0);
|
|
||||||
dcur.style.opacity = String(clamp((r - DESK_CURSOR[0][0]) * 5));
|
|
||||||
dcur.style.transform = `translate(${x - 10}px, ${y - 10}px) scale(${1 - 0.18 * click})`;
|
|
||||||
}
|
}
|
||||||
// "Submit for review · your click" by the console button
|
if (k.cl) {
|
||||||
const lp = prog(r, DESK_LINK_AT, 0.35);
|
const p = eio(prog(r, d.flip, 0.5));
|
||||||
const cb = BOXES.console, [bx, by] = framePt(cb.x + cb.w, cb.y + cb.h);
|
set(k.cl, 'clipPath', `inset(0 0 ${pct(1 - p)} 0)`);
|
||||||
linkEl.style.opacity = String(clamp(lp * 3));
|
set(k.line, 'opacity', String(p > 0 && p < 1 ? 1 : 0));
|
||||||
linkEl.style.left = `${Math.min(bx, DW.x + VW - 12)}px`; linkEl.style.top = `${by + 26}px`;
|
set(k.line, 'top', `${(p * 800 - 3).toFixed(1)}px`);
|
||||||
linkEl.style.transform = `translateX(-100%) scale(${0.6 + 0.4 * eob(lp)})`;
|
}
|
||||||
|
// the window itself: a gentle settle
|
||||||
|
const we = eoc(prog(r, 0, 0.6));
|
||||||
|
set(k.win, 'transform', `scale(${lerp(0.97, 1, we).toFixed(4)})`);
|
||||||
|
// callout + ring on the target
|
||||||
|
const b = BOXES[d.callout.target];
|
||||||
|
const sb = stageBox(b, c);
|
||||||
|
const cp = prog(r, d.callout.at, 0.34);
|
||||||
|
const ring = k.ring;
|
||||||
|
set(ring, 'opacity', String(clamp(cp * 2)));
|
||||||
|
// the ring stays inside the window
|
||||||
|
const rx0 = Math.max(sb.x - 10, WIN.x + 8), ry0 = Math.max(sb.y - 10, WIN.y + 52);
|
||||||
|
const rx1 = Math.min(sb.x + sb.w + 10, WIN.x + WIN.w - 8), ry1 = Math.min(sb.y + sb.h + 10, WIN.y + WIN.h - 8);
|
||||||
|
set(ring, 'left', `${rx0.toFixed(1)}px`); set(ring, 'top', `${ry0.toFixed(1)}px`);
|
||||||
|
set(ring, 'width', `${(rx1 - rx0).toFixed(1)}px`); set(ring, 'height', `${(ry1 - ry0).toFixed(1)}px`);
|
||||||
|
set(ring, 'transform', `scale(${lerp(1.15, 1, eoc(cp)).toFixed(3)})`);
|
||||||
|
let text = d.callout.text;
|
||||||
|
if (d.fill) text = `Rollout · ${Math.round(20 * eio(prog(r, d.fill[0], d.fill[1] - d.fill[0])))}%`;
|
||||||
|
html(k.callout, esc(text));
|
||||||
|
const cw = k.callout.offsetWidth;
|
||||||
|
const cx = clamp(sb.x + sb.w / 2, W * 0.1 + cw / 2, W * 0.9 - cw / 2);
|
||||||
|
const above = sb.y - 30 > WIN.y + 90;
|
||||||
|
const cy = above ? sb.y - 26 : sb.y + sb.h + 26 + 70;
|
||||||
|
set(k.callout, 'opacity', String(clamp(cp * 2.5)));
|
||||||
|
set(k.callout, 'left', `${cx.toFixed(1)}px`); set(k.callout, 'top', `${cy.toFixed(1)}px`);
|
||||||
|
set(k.callout, 'transform', `translate(-50%, -100%) scale(${lerp(0.5, 1, eob(cp)).toFixed(3)})`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
/** The cursor: in the desktop scenes and over the Submit button. */
|
||||||
// ---------- end cards ----------
|
function cursor(t) {
|
||||||
const submitEl = $('#submit'), btn = $('#submit .btn'), ring = $('#submit .ring'), kick = $('#submit .kick'),
|
const s = active(t);
|
||||||
yours = $('#submit .yours'), fine = $('#submit .fine'), cur = $('#cursor');
|
set(clickEl, 'opacity', '0');
|
||||||
const brandEl = $('#brand');
|
if (desk[s.id]) {
|
||||||
const brandParts = [...brandEl.children];
|
const k = desk[s.id], d = k.d, r = t - s.start;
|
||||||
function pop(el, r, at, dist = 50, d = 0.35) {
|
const c = deskCam(d, r, s.end - s.start + 0.3);
|
||||||
const p = prog(r, at, d);
|
const [[a0], [a1, target]] = d.cursor;
|
||||||
el.style.opacity = String(clamp(p * 2.5));
|
const b = stageBox(BOXES[target], c);
|
||||||
el.style.transform = `translateY(${(1 - eob(p)) * dist}px) scale(${0.85 + 0.15 * eob(p)})`;
|
const tx = b.x + b.w * (target === 'roll' ? 0.35 : 0.5), ty = b.y + b.h * 0.6;
|
||||||
}
|
const sx = W * 0.92, sy = WIN.y + WIN.h * 0.95;
|
||||||
function endCards(t) {
|
const p = eio(prog(r, a0, a1 - a0));
|
||||||
const s = sceneAt(t), r = t - s.start;
|
const arc = Math.sin(Math.PI * p) * 70;
|
||||||
submitEl.style.opacity = s.id === 'submit' ? '1' : '0';
|
const x = lerp(sx, tx, p) + arc * 0.4, y = lerp(sy, ty, p) - arc;
|
||||||
brandEl.style.opacity = s.id === 'brand' ? '1' : '0';
|
const op = prog(r, a0 - 0.15, 0.15) * (1 - prog(t, s.end - 0.12, 0.12));
|
||||||
cur.style.opacity = '0';
|
let press = 0;
|
||||||
|
if (id3(s.id)) {
|
||||||
|
press = decay(r, a1 + 0.02, 0.22);
|
||||||
|
const cp = prog(r, a1 + 0.02, 0.4);
|
||||||
|
if (cp > 0 && cp < 1) {
|
||||||
|
set(clickEl, 'opacity', String(0.9 * (1 - cp)));
|
||||||
|
set(clickEl, 'transform', `translate(${tx.toFixed(1)}px, ${ty.toFixed(1)}px) scale(${lerp(0.3, 1.4, eoc(cp)).toFixed(3)})`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cursorAt(x, y, op, press);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (s.id === 'submit') {
|
if (s.id === 'submit') {
|
||||||
pop(kick, r, 0.0, 30);
|
const btn = $('#sbtn').getBoundingClientRect();
|
||||||
const bp = prog(r, 0.08, 0.42);
|
const tx = btn.left + btn.width * 0.62, ty = btn.top + btn.height * 0.62;
|
||||||
btn.style.opacity = String(clamp(bp * 3));
|
const a0 = s.start + 0.35;
|
||||||
const hover = eoc(prog(r, 1.25, 0.2));
|
const p = eio(prog(t, a0, SUBMIT_HOVER - a0));
|
||||||
btn.style.transform = `scale(${(0.4 + 0.6 * eob(bp)) * (1 + 0.04 * hover)})`;
|
const arc = Math.sin(Math.PI * p) * 80;
|
||||||
btn.style.filter = `brightness(${1 + 0.18 * hover})`;
|
// it stops on the button and waits: no click
|
||||||
const rp = ((r - 0.5) % BEAT) / BEAT;
|
const hes = Math.sin(Math.max(0, t - SUBMIT_HOVER) * 3.2) * 6 * prog(t, SUBMIT_HOVER, 0.4);
|
||||||
ring.style.opacity = r > 0.5 ? String(0.7 * (1 - rp)) : '0';
|
cursorAt(lerp(W * 0.9, tx, p) + arc * 0.3 + hes, lerp(H * 0.95, ty, p) - arc, prog(t, a0, 0.15) * (1 - prog(t, s.end - 0.15, 0.15)));
|
||||||
ring.style.transform = `scale(${1 + 0.12 * eoc(rp)})`;
|
return;
|
||||||
pop(yours, r, 0.95, 70, 0.4);
|
}
|
||||||
pop(fine, r, 1.55, 30);
|
if (cursorShown) cursorAt(0, 0, 0);
|
||||||
// the cursor comes close and waits: the click stays yours
|
}
|
||||||
const b = btn.getBoundingClientRect();
|
const id3 = id => id === 'desk3';
|
||||||
const tx = b.left + b.width * 0.78, ty = b.top + b.height * 0.72;
|
|
||||||
const cp = eoc(prog(r, 0.55, 0.8));
|
// ---------- submit + brand ----------
|
||||||
const wob = Math.sin(r * 5) * 4 * prog(r, 1.35, 0.3);
|
const sbtn = $('#sbtn'), shov = $('#sbtn .hov');
|
||||||
cur.style.opacity = String(clamp((r - 0.55) * 4));
|
if (V) sbtn.style.top = '980px'; else sbtn.style.top = '560px';
|
||||||
cur.style.transform = `translate(${lerp(tx + 380, tx, cp) + wob}px, ${lerp(ty + 420, ty, cp) + wob * 0.6}px)`;
|
const brandWrap = $('#s-brand .wrap');
|
||||||
} else if (s.id === 'brand') {
|
brandWrap.querySelector('.url').textContent = URL;
|
||||||
const [mark, word, tag, url, meta, desk, inst] = brandParts;
|
brandWrap.querySelector('.plat').textContent = PLATFORMS;
|
||||||
const mp = prog(r, 0.0, 0.45);
|
if (!V) { brandWrap.querySelector('.mark').style.width = brandWrap.querySelector('.mark').style.height = '200px'; brandWrap.querySelector('.word').style.fontSize = '130px'; }
|
||||||
mark.style.opacity = String(clamp(mp * 3));
|
function endCards(t) {
|
||||||
mark.style.transform = `scale(${eob(mp)}) rotate(${(1 - eoc(mp)) * -25}deg)`;
|
const s = scene('submit');
|
||||||
pop(word, r, 0.15, 60);
|
if (t >= s.start - 0.1 && t < s.end + 0.5) {
|
||||||
pop(tag, r, 0.5, 40);
|
const r = t - s.start, e = eob(prog(r, 0.05, 0.45));
|
||||||
pop(url, r, 0.85, 40);
|
const hov = prog(t, SUBMIT_HOVER, 0.15);
|
||||||
pop(meta, r, 1.05, 30);
|
set(sbtn, 'transform', `translate(-50%, 0) scale(${(lerp(0.7, 1, e) * (1 + 0.03 * hov)).toFixed(4)})`);
|
||||||
pop(desk, r, 1.2, 30);
|
set(sbtn, 'opacity', String(clamp(prog(r, 0.05, 0.2))));
|
||||||
pop(inst, r, 1.4, 30);
|
set(shov, 'opacity', String(hov));
|
||||||
const beat = 1 - prog(((r + 1e-6) % BEAT), 0, BEAT * 0.5);
|
}
|
||||||
url.style.textShadow = `0 0 ${20 + 30 * beat * (r > 0.85 ? 1 : 0)}px rgba(129,140,248,${0.35 + 0.35 * beat})`;
|
const b = scene('brand');
|
||||||
|
if (t >= b.start - 0.1) {
|
||||||
|
const r = t - b.start;
|
||||||
|
set(brandWrap, 'transform', `translateY(-50%) scale(${lerp(1.0, 1.04, clamp(r / 4)).toFixed(4)})`);
|
||||||
|
[...brandWrap.children].forEach((el, i) => {
|
||||||
|
const p = prog(r, 0.08 + i * 0.16, i === 0 ? 0.5 : 0.36);
|
||||||
|
set(el, 'opacity', String(clamp(p * 2)));
|
||||||
|
set(el, 'transform', i === 0 ? `scale(${lerp(0.4, 1, eob(p)).toFixed(3)}) rotate(${((1 - eoc(p)) * -12).toFixed(2)}deg)` : `translateY(${((1 - eoc(p)) * 40).toFixed(1)}px)`);
|
||||||
|
set(el, 'filter', p < 1 ? `blur(${((1 - eoc(p)) * 12).toFixed(1)}px)` : 'none');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- seek ----------
|
|
||||||
function seek(t) {
|
function seek(t) {
|
||||||
t = clamp(t, 0, DURATION - 1e-6);
|
scenes(t);
|
||||||
background(t);
|
background(t);
|
||||||
captions(t);
|
hook(t);
|
||||||
terminal(t);
|
scan(t);
|
||||||
panels(t);
|
fixed(t);
|
||||||
shots(t);
|
shots(t);
|
||||||
|
decl(t);
|
||||||
desktop(t);
|
desktop(t);
|
||||||
endCards(t);
|
endCards(t);
|
||||||
|
cursor(t);
|
||||||
|
captions(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ready = (async () => {
|
const ready = (async () => {
|
||||||
await document.fonts.ready;
|
await document.fonts.ready;
|
||||||
await Promise.all([...document.images].map(im => im.decode().catch(() => { throw new Error(`image failed: ${im.src}`); })));
|
const imgs = [...document.images, ...GRID.map(f => Object.assign(new Image(), { src: `out/assets/grid/${f}` }))];
|
||||||
|
await Promise.all(imgs.map(im => im.decode().catch(() => { throw new Error(`image failed: ${im.src}`); })));
|
||||||
seek(0);
|
seek(0);
|
||||||
})();
|
})();
|
||||||
window.teaser = { ready, seek, DURATION, FPS, BAR, W, H };
|
window.teaser = { ready, seek, DURATION, FPS, W, H, BEAT, captionTimes };
|
||||||
|
|
||||||
if (q.has('t')) ready.then(() => seek(Number(q.get('t'))));
|
if (q.has('t')) ready.then(() => seek(Number(q.get('t'))));
|
||||||
if (q.has('play')) ready.then(() => {
|
if (q.has('play')) ready.then(() => {
|
||||||
|
|
|
||||||
13
tests/fixtures/scan/teaser-fixed/Planner.xcodeproj/project.pbxproj
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
objects = {
|
||||||
|
C1B2C3D4E5F6000000000002 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
INFOPLIST_FILE = Planner/Info.plist;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.planner;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
tests/fixtures/scan/teaser-fixed/Planner/Ads.swift
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import AdSupport
|
||||||
|
import AppTrackingTransparency
|
||||||
|
import GoogleMobileAds
|
||||||
|
|
||||||
|
enum Ads {
|
||||||
|
static func start() {
|
||||||
|
ATTrackingManager.requestTrackingAuthorization { _ in
|
||||||
|
GADMobileAds.sharedInstance().start(completionHandler: nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
tests/fixtures/scan/teaser-fixed/Planner/Info.plist
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>Planner</string>
|
||||||
|
<key>NSUserTrackingUsageDescription</key>
|
||||||
|
<string>Your data is used to show ads that fit your interests.</string>
|
||||||
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
25
tests/fixtures/scan/teaser-fixed/Planner/LoginView.swift
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
import AuthenticationServices
|
||||||
|
import FirebaseAuth
|
||||||
|
import GoogleSignIn
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct LoginView: View {
|
||||||
|
var body: some View {
|
||||||
|
VStack {
|
||||||
|
SignInWithAppleButton(.signIn) { _ in } onCompletion: { _ in }
|
||||||
|
Button("Continue with Google") {
|
||||||
|
GIDSignIn.sharedInstance.signIn(withPresenting: rootViewController()) { _, _ in }
|
||||||
|
}
|
||||||
|
Button("Create account") { Task { try await AccountApi.signUp() } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AccountApi {
|
||||||
|
static func signUp() async throws {
|
||||||
|
_ = try await Auth.auth().createUser(withEmail: "planner@example.com", password: "example")
|
||||||
|
}
|
||||||
|
static func deleteAccount() async throws {
|
||||||
|
try await Auth.auth().currentUser?.delete()
|
||||||
|
}
|
||||||
|
}
|
||||||
19
tests/fixtures/scan/teaser-fixed/Planner/PrivacyInfo.xcprivacy
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyTracking</key>
|
||||||
|
<false/>
|
||||||
|
<key>NSPrivacyAccessedAPITypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>CA92.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
10
tests/fixtures/scan/teaser-fixed/Planner/ProStore.swift
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import StoreKit
|
||||||
|
|
||||||
|
enum ProStore {
|
||||||
|
static func buy(_ product: Product) async throws {
|
||||||
|
_ = try await product.purchase()
|
||||||
|
}
|
||||||
|
static func restore() async throws {
|
||||||
|
try await AppStore.sync()
|
||||||
|
}
|
||||||
|
}
|
||||||
10
tests/fixtures/scan/teaser-fixed/Planner/SettingsView.swift
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SettingsView: View {
|
||||||
|
var body: some View {
|
||||||
|
List {
|
||||||
|
Link("Privacy policy", destination: URL(string: "https://example.com/privacy")!)
|
||||||
|
Text("Last opened: \(UserDefaults.standard.string(forKey: "lastOpen") ?? "-")")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
tests/fixtures/scan/teaser-fixed/Podfile.lock
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
PODS:
|
||||||
|
- Google-Mobile-Ads-SDK (11.10.0)
|
||||||
|
- GoogleSignIn (7.1.0)
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- Google-Mobile-Ads-SDK
|
||||||
|
- GoogleSignIn
|
||||||
|
|
||||||
|
COCOAPODS: 1.15.2
|
||||||
8
tests/fixtures/scan/teaser-fixed/README.md
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# teaser-fixed fixture
|
||||||
|
|
||||||
|
The teaser fixture after the five fixes the teaser video shows: an App Review demo account (kept outside the repo: in
|
||||||
|
`.storebound/credentials.json` or `REVIEW_DEMO_USER` / `REVIEW_DEMO_PASSWORD`), in-app account deletion
|
||||||
|
(`accounts.inApp`, `deleteAccount()`), Sign in with Apple next to Google Sign-In, a Restore Purchases path
|
||||||
|
(`AppStore.sync()`) and App Tracking Transparency (`requestTrackingAuthorization` plus
|
||||||
|
`NSUserTrackingUsageDescription`). With the demo account set, `storebound scan` finds no rejection risk; that re-scan
|
||||||
|
is the one the teaser video shows. Not a buildable project.
|
||||||
23
tests/fixtures/scan/teaser-fixed/store/appstore.md
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Planner · App Store listing copy
|
||||||
|
|
||||||
|
## en-US · English (U.S.)
|
||||||
|
|
||||||
|
### subtitle
|
||||||
|
```
|
||||||
|
Plan your week in a minute
|
||||||
|
```
|
||||||
|
|
||||||
|
### promotionalText
|
||||||
|
```
|
||||||
|
Weekly planning without the clutter.
|
||||||
|
```
|
||||||
|
|
||||||
|
### keywords
|
||||||
|
```
|
||||||
|
planner,week,calendar,tasks,agenda
|
||||||
|
```
|
||||||
|
|
||||||
|
### description
|
||||||
|
```
|
||||||
|
Planner lays out your week in one screen. Planner Pro adds themes and widgets.
|
||||||
|
```
|
||||||
18
tests/fixtures/scan/teaser-fixed/storebound.config.ts
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
// Fixture config (made up, example.com placeholders only).
|
||||||
|
export default {
|
||||||
|
app: {
|
||||||
|
name: 'Planner',
|
||||||
|
profile: 'app',
|
||||||
|
privacyPolicyUrl: 'https://example.com/privacy',
|
||||||
|
supportUrl: 'https://example.com/support',
|
||||||
|
website: 'https://example.com',
|
||||||
|
contactEmail: 'support@example.com',
|
||||||
|
},
|
||||||
|
accounts: { enabled: true, inApp: 'Settings > Account > Delete account' },
|
||||||
|
reviewAccess: { signInRequired: true, instructions: 'Sign in with the demo account.' },
|
||||||
|
languages: [{ id: 'en', apple: 'en-US' }],
|
||||||
|
apple: { bundleId: 'com.example.planner', usesNonExemptEncryption: false },
|
||||||
|
products: [
|
||||||
|
{ id: 'com.example.planner.pro', type: 'non_consumable', usd: 4.99, listings: { en: { title: 'Planner Pro', description: 'Themes and widgets' } } },
|
||||||
|
],
|
||||||
|
};
|
||||||
84
tests/teaser.test.ts
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
// The teaser video (media/teaser): the scan text it shows is the real `storebound scan` output of the teaser fixtures,
|
||||||
|
// every cut sits on the beat grid, every caption is short and stays readable, every scene holds long enough.
|
||||||
|
import { beforeAll, describe, expect, test } from 'bun:test';
|
||||||
|
import { join } from 'node:path';
|
||||||
|
|
||||||
|
const ROOT = join(import.meta.dir, '..');
|
||||||
|
const CLI = join(ROOT, 'cli', 'index.ts');
|
||||||
|
const FX = join(import.meta.dir, 'fixtures', 'scan');
|
||||||
|
|
||||||
|
interface Scene { id: string; from: number; to: number; start: number; end: number; in: string | null }
|
||||||
|
interface Finding { sev: string; guideline: string; title: string; where: string; fix: string; skill: string }
|
||||||
|
interface Teaser {
|
||||||
|
BEAT: number; DURATION: number; SCENES: Scene[];
|
||||||
|
CAPTIONS: { id: string; lines: string[] }[];
|
||||||
|
captionTimes(): { id: string; words: string; count: number; at: number; from: number; to: number; hold: number }[];
|
||||||
|
SCAN_HEAD: { text: string }[]; SDKS: { name: string; what: string; dep: string; where: string }[];
|
||||||
|
RISKS_LINE: string; FINDINGS: Finding[]; RESCAN_LINE: string; RESCAN_NONE: string;
|
||||||
|
DECL_LINES: { what: string; value: string; where: string }[]; DECL_ASK: string; CMD: string;
|
||||||
|
}
|
||||||
|
const path: string = join(ROOT, 'media/teaser/script.js');
|
||||||
|
const T = (await import(path)) as Teaser;
|
||||||
|
|
||||||
|
const scanText = (dir: string, demo: boolean): string => {
|
||||||
|
const env = { ...process.env, NO_COLOR: '1', REVIEW_DEMO_USER: demo ? 'demo@example.com' : '', REVIEW_DEMO_PASSWORD: demo ? 'example' : '' };
|
||||||
|
const r = Bun.spawnSync(['bun', CLI, 'scan', '--dir', join(FX, dir)], { env, stdout: 'pipe', stderr: 'pipe' });
|
||||||
|
// exit code 1 when blockers are found (the fixture before the fixes), 0 after
|
||||||
|
expect(r.exitCode).toBe(demo ? 0 : 1);
|
||||||
|
return r.stdout.toString() + r.stderr.toString();
|
||||||
|
};
|
||||||
|
let before = '', after = '';
|
||||||
|
beforeAll(() => { before = scanText('teaser', false); after = scanText('teaser-fixed', true); });
|
||||||
|
|
||||||
|
describe('teaser: the scan text is real', () => {
|
||||||
|
test('command, header, SDKs and the risks line come from `storebound scan` of tests/fixtures/scan/teaser', () => {
|
||||||
|
expect(T.CMD).toBe('storebound scan');
|
||||||
|
for (const l of T.SCAN_HEAD) expect(before).toContain(l.text);
|
||||||
|
for (const s of T.SDKS) expect(before).toMatch(new RegExp(`${s.name}\\s+${s.what.replace(/[()]/g, '\\$&')} · ${s.dep} \\(${s.where}\\)`));
|
||||||
|
expect(before).toContain(T.RISKS_LINE);
|
||||||
|
});
|
||||||
|
test('the five findings: severity, guideline, title, file:line, a verbatim piece of the fix, the skill', () => {
|
||||||
|
expect(T.FINDINGS).toHaveLength(5);
|
||||||
|
const blocks = before.split(/\n\s+\d\. /).slice(1);
|
||||||
|
T.FINDINGS.forEach((f, i) => {
|
||||||
|
const b = blocks[i]!;
|
||||||
|
expect(b.startsWith(`${f.sev.padEnd(7)} ${f.guideline} · App Store · ${f.title}`)).toBe(true);
|
||||||
|
expect(b).toContain(`at ${f.where}`);
|
||||||
|
expect(b).toContain(`skill: ${f.skill}`);
|
||||||
|
expect(b.match(/fix: (.*)/)![1]).toContain(f.fix);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
test('declarations proposal lines', () => {
|
||||||
|
for (const d of T.DECL_LINES) expect(before).toContain(`detected ${d.what}: ${d.value}`);
|
||||||
|
for (const d of T.DECL_LINES) expect(before).toContain(`(${d.where})`);
|
||||||
|
expect(before).toContain(T.DECL_ASK);
|
||||||
|
});
|
||||||
|
test('the re-scan after the fixes (tests/fixtures/scan/teaser-fixed, demo account in the environment) is clean', () => {
|
||||||
|
expect(after).toContain(T.RESCAN_LINE);
|
||||||
|
expect(after).toContain(T.RESCAN_NONE);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('teaser: timing', () => {
|
||||||
|
const near = (x: number): boolean => Math.abs(x / T.BEAT - Math.round(x / T.BEAT)) < 1e-9;
|
||||||
|
test('scenes are contiguous, cover the video and cut on the beat', () => {
|
||||||
|
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);
|
||||||
|
expect(T.SCENES.at(-1)!.end).toBeCloseTo(T.DURATION, 9);
|
||||||
|
for (const s of T.SCENES) expect(near(s.start), s.id).toBe(true);
|
||||||
|
expect(T.DURATION).toBeGreaterThan(29);
|
||||||
|
expect(T.DURATION).toBeLessThan(35);
|
||||||
|
});
|
||||||
|
test('every scene holds at least 2.5 s', () => {
|
||||||
|
for (const s of T.SCENES) expect(s.end - s.start, s.id).toBeGreaterThanOrEqual(2.5);
|
||||||
|
});
|
||||||
|
test('captions: at most 7 words, fully on screen for at least 1.2 s, never overlapping', () => {
|
||||||
|
const c = T.captionTimes();
|
||||||
|
expect(c).toHaveLength(T.CAPTIONS.length);
|
||||||
|
for (const x of c) {
|
||||||
|
expect(x.count, x.words).toBeLessThanOrEqual(7);
|
||||||
|
expect(x.hold, x.words).toBeGreaterThanOrEqual(1.2);
|
||||||
|
}
|
||||||
|
for (let i = 1; i < c.length; i++) expect(c[i]!.at).toBeGreaterThanOrEqual(c[i - 1]!.to);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
// App Store / Google Play marks from simple-icons (CC0 data)
|
// App Store / Google Play marks from simple-icons (CC0 data)
|
||||||
// apps/desktop/src/ui/store-marks the same two store marks for the desktop app (the other desktop icons come from
|
// apps/desktop/src/ui/store-marks the same two store marks for the desktop app (the other desktop icons come from
|
||||||
// @phosphor-icons/react)
|
// @phosphor-icons/react)
|
||||||
// media/teaser/icons Phosphor icons for the teaser video (the mouse cursor, the blocker-list icons)
|
// media/teaser/icons Phosphor icons for the teaser video (the mouse cursor, the inbox, finding and fix icons)
|
||||||
// Both show them as CSS masks (site/style.css .ic-*, desktop styles.css .store-mark), so they take the text colour in
|
// Both show them as CSS masks (site/style.css .ic-*, desktop styles.css .store-mark), so they take the text colour in
|
||||||
// both themes and nothing is loaded from outside. The store marks only name the store next to its name; they are
|
// both themes and nothing is loaded from outside. The store marks only name the store next to its name; they are
|
||||||
// trademarks of Apple Inc. and Google LLC (docs/desktop.md, the site footer).
|
// trademarks of Apple Inc. and Google LLC (docs/desktop.md, the site footer).
|
||||||
|
|
@ -16,7 +16,8 @@ import { join } from 'node:path';
|
||||||
export const SITE_ICONS = ['caret-right', 'play', 'user', 'squares-four', 'briefcase'] as const;
|
export const SITE_ICONS = ['caret-right', 'play', 'user', 'squares-four', 'briefcase'] as const;
|
||||||
export const STORE_MARKS = ['appstore', 'googleplay'] as const;
|
export const STORE_MARKS = ['appstore', 'googleplay'] as const;
|
||||||
/** Teaser icons: [Phosphor weight, icon name], vendored as <name>-<weight>.svg (the package's own file name). */
|
/** Teaser icons: [Phosphor weight, icon name], vendored as <name>-<weight>.svg (the package's own file name). */
|
||||||
export const TEASER_ICONS = [['fill', 'navigation-arrow'], ['bold', 'check'], ['bold', 'arrow-right'], ['bold', 'user']] as const;
|
export const TEASER_ICONS = [['fill', 'navigation-arrow'], ['bold', 'check'], ['fill', 'x-circle'], ['fill', 'check-circle'], ['bold', 'tray'],
|
||||||
|
['bold', 'magnifying-glass'], ['bold', 'pencil-simple'], ['fill', 'warning-octagon'], ['fill', 'paper-plane-tilt'], ['bold', 'terminal-window']] as const;
|
||||||
|
|
||||||
const root = new URL('..', import.meta.url).pathname;
|
const root = new URL('..', import.meta.url).pathname;
|
||||||
const phosphor = join(root, 'node_modules/@phosphor-icons/core');
|
const phosphor = join(root, 'node_modules/@phosphor-icons/core');
|
||||||
|
|
|
||||||