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.
167 lines
11 KiB
JavaScript
167 lines
11 KiB
JavaScript
// Teaser timeline: the single source of truth for the picture (teaser.js) and the sound (music.js).
|
|
// Every frame is a pure function of time; every cut sits on a beat of the 128 BPM grid, and the sound effects (whoosh,
|
|
// tick, hit) are placed from the same numbers, so they land on the cuts.
|
|
//
|
|
// 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 BEAT = 60 / BPM; // 0.46875 s
|
|
export const BAR = BEAT * 4; // 1.875 s
|
|
export const FPS = 30;
|
|
export const B = n => n * BEAT; // beats -> seconds
|
|
export const BEATS = 72; // 18 bars
|
|
export const DURATION = B(BEATS); // 33.75 s
|
|
|
|
/** Scenes in beats (start, end). Cuts: the hook's hard cut, then whips and masks on the beat. */
|
|
export const SCENES = [
|
|
{ id: 'hook', from: 0, to: 7, in: null }, // inbox, rejection mails stack, "Rejected. Again."
|
|
{ id: 'scan', from: 7, to: 24, in: 'hard' }, // black, the terminal types `storebound scan`, the output
|
|
{ id: 'fixed', from: 24, to: 30, in: 'whip-left' }, // the re-scan after the fixes: reds flip green, 0 blockers
|
|
{ id: 'shots', from: 30, to: 36, in: 'iris' }, // store screenshots wall
|
|
{ id: 'decl', from: 36, to: 42, in: 'whip-up' }, // declarations proposal -> Data safety answers
|
|
{ id: 'desk1', from: 42, to: 48, in: 'wipe' }, // desktop: Portfolio across studios
|
|
{ id: 'desk2', from: 48, to: 54, in: 'whip-left' }, // desktop: release timeline, rollout to 20%
|
|
{ id: 'desk3', from: 54, to: 60, in: 'whip-left' }, // desktop: Checks, rejection risks turn green
|
|
{ id: 'submit', from: 60, to: 66, in: 'zoom' }, // "It never presses Submit. You do."
|
|
{ id: 'brand', from: 66, to: 72, in: 'iris' }, // logo, storebound.dev, platforms
|
|
].map(s => ({ ...s, start: B(s.from), end: B(s.to) }));
|
|
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 TRANS = { hard: 0, 'whip-left': 0.34, 'whip-up': 0.34, iris: 0.42, wipe: 0.42, zoom: 0.36 };
|
|
|
|
/**
|
|
* Captions: one display font, at most 7 words. at / to in seconds (absolute). *word* = highlighted.
|
|
* Every caption holds at least 1.2 s (tests/teaser.test.ts).
|
|
*/
|
|
export const CAPTIONS = [
|
|
{ id: 'rejected', at: B(3), to: B(7), lines: ['*Rejected.*', 'Again.'], hl: 'red', big: true, word: [B(3), B(4)] },
|
|
{ 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.'] },
|
|
{ id: 'fixed', at: B(24), to: B(30), lines: ['Fix it.', 'Scan *again.*'], hl: 'green' },
|
|
{ id: 'shots', at: B(30), to: B(36), lines: ['*200* store screenshots.', 'One command.'] },
|
|
{ id: 'decl', at: B(36), to: B(42), lines: ['*764* answers,', 'read from your code.'] },
|
|
{ id: 'desk1', at: B(42), to: B(48), lines: ['Every app.', 'Every *studio.*'] },
|
|
{ id: 'desk2', at: B(48), to: B(54), lines: ['Both stores.', 'One *timeline.*'] },
|
|
{ id: 'desk3', at: B(54), to: B(60), lines: ['Risks turn', '*green.*'], hl: 'green' },
|
|
{ id: 'submit', at: B(60.5), to: B(66), lines: ['It never presses *Submit.*', 'You do.'] },
|
|
];
|
|
|
|
/**
|
|
* When each caption is fully readable (every word in, before its exit), as teaser.js animates it: words pop in 0.07 s
|
|
* 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 hook ends on a hard cut instead).
|
|
*/
|
|
export function captionTimes() {
|
|
return CAPTIONS.map(c => {
|
|
const words = c.lines.join(' ').replace(/\*/g, '');
|
|
const from = c.big ? c.word[c.word.length - 1] + 0.2 : c.at + 0.34 + 0.07 * (words.split(' ').length - 1);
|
|
const to = c.big ? c.to : c.to - 0.16;
|
|
return { id: c.id, words, count: words.split(' ').length, at: c.at, from, to, hold: to - from };
|
|
});
|
|
}
|
|
|
|
// ---------- hook: a generic, made-up inbox (no real product, no real names or addresses) ----------
|
|
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;
|
|
}
|