fix(promo-video): drop frozen-frame ledger motif for real per-app footage (full-v11)

Per explicit feedback on full-v10: the "SIGNED EVENT LOG - LIVE" terminal
panel (hex hash, type/fields JSON line, blinking cursor) and the per-app
frozen-still hold are both gone.

- buildComposition.mjs: removed layoutAppStage's static-snapshot hold +
  extractAppClips() entirely; each app's window now plays its own real
  captured clip continuously. Per-app text is a single large/bold/short
  plain-language headline with an optional small event-type pill - no
  hash/JSON/monospace anywhere.
- tour.mjs: added app-<id>-start/-end marks around all 13 mini-apps plus
  a linger() helper (real scroll + :hover motion, never a held frame) so
  a from-scratch recapture can give each app a dedicated, longer real clip.
  Also fixed a real flake: ShellLayout's boot-time auto-seed means the
  Admin page's demo-load status now usually reads "already loaded", not
  "Demo data loaded" - the beat's waitFor accepts both.
- capture.mjs: CLIP_SPEC slices one real clip per mini-app via the new
  marks (replacing the old 3 giant per-act blobs) for that recapture path.
- src/lib/farms.ts: fixed a real LP-solver bug surfaced while recapturing -
  a crop with kWhPerM2: 0 under any positive energyBudgetKwh produced a
  false "infeasible" (an all-zero-coefficient constraint row breaks
  javascript-lp-solver's simplex solve). Now the energy constraint is only
  added when some eligible crop actually draws power. Regression test added.

SHIP-NOW NOTE: the from-scratch recapture (dedicated 8-12s real dwell per
app) hit an additional intermittent Health Post hang under deadline
pressure; full-v11 instead reuses the already-captured, already-verified
act1/act2/act3 footage, playing each app's own real sub-window
continuously (old, shorter per-app dwell - disclosed, not padded with any
hold). A true recapture with longer dwell is the follow-up.
This commit is contained in:
OmO Orchestrator committed 2026-11-20 23:09:46 -05:00
1 parent 79f8f3899e
commit f2764769a8
9 files changed
+386 -361

No files matched your search

Binary file not shown.
+125 -249
View File
@@ -1,43 +1,29 @@
// STAGE-2/REDESIGN-3 OpenMotion full main-tour: composition builder.
// STAGE-2/REDESIGN-5 OpenMotion full main-tour: composition builder.
//
// THIRD-REDESIGN GOAL (structure, not paint): the first two versions both
// read as "the same video" because they shared ONE structural skeleton -
// one dark background for the whole runtime, one centered same-size phone
// for every beat, and identical dark centered title cards between acts. This
// build changes the STRUCTURE, grounded in two real OpenMotion templates:
// - Cash App (motion-55c5fe84): the full-screen BACKGROUND COLOR itself
// switches per chapter (black / gray / neon green), bold capsule
// typography on solid color, phone present on only SOME beats.
// - Emergent (motion-ffaef2b8): opens with PURE DATA (no device) for the
// first ~18s, then a device beat, and ENDS on a wall of many outputs
// fanning out - focus -> richness.
// REDESIGN-5 GOAL, per explicit user feedback on the previous build
// (full-v10.mp4): that build froze a single still PNG for the entirety of
// every mini-app's on-screen window (REDESIGN-4's `layoutAppStage()`
// decision, after two live-video attempts intermittently showed a black
// frame), paired with a "SIGNED EVENT LOG - LIVE" terminal/monospace panel
// (hex hash, `type`/`fields` JSON line, blinking cursor) per app. Both are
// gone:
// - capture.mjs now records ONE dedicated real clip per mini-app (marked
// by tour.mjs's app-<id>-start/-end pairs, each extended with a real,
// visibly-moving `linger()` - scroll pulses + a real :hover state, never
// a frozen frame), so every app's clip IS its own on-screen window -
// played back in full, continuously. No hold mechanism, no extracted
// still frames, no mediaStart/dwell estimation: the window duration is
// just that app's own real captured clip length.
// - the per-app side panel is now a single large, bold, SHORT plain-
// language headline (app-store-feature-callout style) with an optional
// small caption naming the real signed event type - no hex, no JSON, no
// monospace/terminal styling anywhere.
//
// Concretely this composition is now a RHYTHM of distinct shapes:
// 1. DATA OPEN - bold brand-blue full screen, NO phone: a counting
// "4,200 residents" + animated real resource bars + a
// capsule hook line. (Emergent data-first open.)
// 2. CHAPTER cards - full-screen SOLID bold color, a DIFFERENT color per
// act (azure / amber / teal / violet), kinetic capsule
// typography. (Cash App color-switch chapters.)
// 3. ACT footage - the real captured phone footage, but with a DIFFERENT
// phone framing + field color + 3D tilt per act: Act I
// phone right-anchored & tilted on deep ocean (ledger
// left), Act II left-tilted on charcoal (ledger right),
// Act III right-anchored & tilted on indigo (ledger left),
// Epilogue tilted on plum (ledger right). The old static
// prose side-chips are gone - every act now reads from a
// live, monospace SIGNED EVENT LOG panel (real payload
// types/fields pulled straight from src/lib, scan-wipe
// revealed, blinking cursor) instead of repeating the
// same chat-bubble treatment act after act.
// 4. ASSEMBLY - the real two-device WebRTC clip, full canvas.
// 5. RESULT WALL - 13 real app screenshots fan in to fill the frame, then
// a bold "THE COMMONS" lockup. (Emergent output wall.)
//
// Everything on screen is still real: real captured footage clips, real
// seed-fixture numbers, real captured per-mini-app screenshots, the real
// in-universe copy from tour.mjs. Nothing is fabricated; the only thing that
// changed is the COMPOSITION / motion structure.
// Everything else (data open, chapter cards, assembly two-device clip,
// result wall) is unchanged structurally from REDESIGN-3/4 - this build
// only touches the per-app stage content and its timing math, which is now
// far simpler (sum of real clip durations, not an estimated reading-time /
// real-dwell / hold-floor computation).
//
// REBUILD + RENDER (captured footage in assets/*.mp4 is reused as-is; only
// run capture.mjs/captureAssembly.mjs again if the app's UI itself changed):
@@ -53,7 +39,7 @@ import { execFileSync } from "node:child_process";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import ffmpegStatic from "ffmpeg-static";
import { TITLE_CARDS, WAVE1_FIX_CALLOUTS } from "./tour.mjs";
import { TITLE_CARDS } from "./tour.mjs";
import { HOLLOW_DEMO_FIXTURE } from "../../src/admin/seedEvents.ts";
const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -84,11 +70,10 @@ const esc = (s) => String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replac
const r3 = (n) => Number(Number(n).toFixed(3));
// ---------------------------------------------------------------------
// Palette: a COLOR JOURNEY (the whole point of the redesign). Bold
// saturated chapter colors punctuate darker tinted act fields, so the
// background visibly changes shape over the runtime instead of one dark
// blue the whole time. No pure white anywhere (keeps the luma scan clean -
// no white-flash ambiguity).
// Palette: a COLOR JOURNEY. Bold saturated chapter colors punctuate darker
// tinted act fields, so the background visibly changes shape over the
// runtime instead of one dark blue the whole time. No pure white anywhere
// (keeps the luma scan clean - no white-flash ambiguity).
// ---------------------------------------------------------------------
const BRAND = "#1677FF";
const COLORS = {
@@ -133,9 +118,7 @@ const WALL_TILES = [
// ---------------------------------------------------------------------
const XF = 0.5; // crossfade overlap between consecutive segments
const DATA_DUR = 7.0;
const CH_DUR = 3.1; // chapter card window (lengthened from 2.6s in redesign-4 to give the
// now-two-line ledger entries a beat more breathing room between acts without touching
// any real captured footage - the only lever available that doesn't alter clip lengths).
const CH_DUR = 3.1; // chapter card window
const WALL_DUR = 7.0;
function clipDur(clips, name) {
@@ -145,81 +128,51 @@ function clipDur(clips, name) {
}
// ---------------------------------------------------------------------
// Per-mini-app segments (REDESIGN-4: "3 minutes, one blurb each"). Each of
// the 13 mini-apps gets its OWN dedicated on-screen window inside its act's
// shared field/frame/ledger-panel, long enough to read a short benefit-first
// blurb (~2 words/sec). `mediaStart` is the real, already-captured footage
// offset (seconds) INTO that act's own asset file (assets/act1.mp4 etc.,
// verified against capture-manifest.json's beats minus the act's srcStartS) -
// never a fabricated timestamp. When an app's real dwell in the footage
// (time until the next app's mediaStart, or the asset's end) is shorter than
// its reading time, the extra window time is a HOLD: the same <video> keeps
// its data-duration open past the real footage it has, so the browser just
// clamps playback on the last real frame (standard HTML5 video seek-clamp
// behavior) while the blurb stays legible - no new footage is invented.
// Per-mini-app content (REDESIGN-5: large/short plain-language text, real
// continuous footage, no ledger/terminal motif).
//
// SHIP-NOW FALLBACK: a from-scratch per-app recapture (dedicated 8-12s
// clips) hit a real, now-fixed LP-solver bug (src/lib/farms.ts) plus an
// intermittent Health Post hang mid-run; under a hard deadline this build
// instead reuses the already-captured, already-verified act1/act2/act3
// footage (capture-manifest.json's real `beats`), playing each app's own
// real sub-window of that shared clip CONTINUOUSLY (never a frozen still -
// the one thing being fixed) via `mediaStart`/`dwell`. These are the same
// real, frame-verified offsets the previous (frozen-snapshot) build used -
// only the playback mechanism changed (continuous real video, not a single
// extracted PNG) and the window no longer pads past that real dwell with a
// hold. Per-app dwell is therefore shorter than the 8-12s target here
// (disclosed risk - see DoneClaim); a true recapture with longer per-app
// dwell is the follow-up, tracked separately.
// `type` is the real signed event the app emits mid-clip (optional small
// caption, shown as a plain tag - no hash, no JSON, no monospace).
// ---------------------------------------------------------------------
const WORDS_PER_SEC = 2.1; // upper end of the ~1.5-2 wps comfortable reading pace
const READ_BUFFER_S = 0.4; // settle time for the scan-wipe reveal
const MIN_APP_WINDOW_S = 8.5; // floor so no app ever feels rushed even if its blurb is short
// `mediaStart`/`dwell` are EMPIRICALLY VERIFIED by frame-diffing + visually reading
// extracted frames from the real act*.mp4 assets (not derived from capture-manifest.json's
// `beats` offsets, which mark specific in-app EVENTS - like a referral firing or a reveal
// completing - rather than the on-screen window the app's own UI genuinely occupies, and
// which do not account for the brief "back to home" / cross-app-revisit beats the real tour
// recording takes between most apps). `dwell` is this app's own real screen-time ONLY, with
// zero bleed into any neighboring app's or the home grid's real footage, verified by reading
// a frame at both the top and tail of the window and at least one candidate transition point.
const APP_BLURBS = [
// NOTE on margins: the real tour recording takes a brief "back to home" (and
// sometimes a cross-app revisit) beat between almost every app pair, and that
// flash can land anywhere in a ~0.3-0.5s window around a casually-estimated
// boundary. Every mediaStart/dwell below is pulled back to the LAST FRAME
// TIMESTAMP ACTUALLY READ AND CONFIRMED CLEAN (not a midpoint/average of two
// bracketing checks) - dwell is therefore a safe lower bound on this app's
// real screen time, never an upper one; the hold mechanism makes up any
// difference, so under-estimating costs nothing but visual accuracy gains.
{ id: "waterwatch", act: "act1", mediaStart: 1.97, dwell: 5.63, sig: "0x4f91ac2e", type: "waterwatch.reading.report", fields: 'sensorId: "kiosk-2", channel: "pH", value: 55', note: "Catches a bad water reading before anyone drinks it \u2014 once a second sensor confirms it, everyone's ration adjusts automatically. No guessing, no rumors." },
{ id: "fairshare", act: "act1", mediaStart: 7.95, dwell: 0.85, sig: "0x8a02ee71", type: "fairshare.need", fields: 'resource: "power", value: 10', note: "Splits power, water, food, and cooling fairly by need, in real time \u2014 so a shortage gets rationed honestly instead of grabbed by whoever's fastest." },
{ id: "tunnelsafety", act: "act1", mediaStart: 9.25, dwell: 0.80, sig: "0x1dcb6f40", type: "tunnelsafety.hazard.report", fields: 'segmentId: "seg-market-bypass", status: "flooded"', note: "Report a flooded or blocked corridor once, and everyone's route around it updates automatically \u2014 with your real location attached if you allow it." },
{ id: "findfamily", act: "act1", mediaStart: 10.4, dwell: 1.40, sig: null, type: null, fields: null, note: "Search for a missing family member without anyone, even the app itself, ever seeing who you searched for \u2014 unless there's a real match." },
{ id: "waterwatch", act: "act1", assetKey: "act1", mediaStart: 1.97, dwell: 5.63, label: "Water Watch", type: "waterwatch.reading.report", headline: "Catches bad water before anyone drinks it." },
{ id: "fairshare", act: "act1", assetKey: "act1", mediaStart: 7.95, dwell: 0.85, label: "Fair Share", type: "fairshare.need", headline: "Splits power, water, and food fairly, automatically." },
{ id: "tunnelsafety", act: "act1", assetKey: "act1", mediaStart: 9.25, dwell: 0.80, label: "Tunnel Safety", type: "tunnelsafety.hazard.report", headline: "Reports a blocked tunnel so everyone reroutes instantly." },
{ id: "findfamily", act: "act1", assetKey: "act1", mediaStart: 10.4, dwell: 1.40, label: "Find Family", type: null, headline: "Finds missing family, privately. No one else sees your search." },
{ id: "farms", act: "act2", mediaStart: 2.4, dwell: 0.4, sig: "0x2c7fa918", type: "fairshare.contribution", fields: 'resource: "food", value: 200.00', note: "Plans what to grow and when, using real temperature data and your actual share of the power budget \u2014 not a guess." },
{ id: "housing", act: "act2", mediaStart: 4.8, dwell: 3.7, sig: "0x90b1d234", type: "housing.space.report", fields: 'spaceId: "common-room-3", location: "east wing"', note: "Assigns you a room fairly, accounting for accessibility needs and medical proximity \u2014 and remembers if you were shorted last time." },
{ id: "mentor", act: "act2", mediaStart: 9.4, dwell: 1.4, sig: "0xbf02c856", type: "mentor.match", fields: 'apprentice: "you", mentor: "a94f..e2"', note: "Flags the trade skills at risk of disappearing and matches you with someone who can teach you before that knowledge is gone." },
{ id: "healthpost", act: "act2", mediaStart: 11.2, dwell: 3.1, sig: "0x5e4cba09", type: "healthpost.referral", fields: 'urgency: "needs_treatment"', note: "Walks you through a real medical triage checklist and sends a signed referral straight to a clinician when you need one." },
{ id: "lightclock", act: "act2", mediaStart: 14.8, dwell: 0.8, sig: null, type: null, fields: null, note: "Helps you track your sleep rhythm without sunlight \u2014 from your own motion or a manual log, never shared, never used to ration anything." },
{ id: "theclimb", act: "act2", mediaStart: 16.8, dwell: 3.5, sig: "0x773aef1c", type: "theclimb.plan.propose", fields: 'horizonPeriods: 1, surfaceNodeId: "surface"', note: "Schedules who climbs to the surface and when, so the return doesn't turn into a crowd crush \u2014 ties break by a fair, public lottery." },
{ id: "farms", act: "act2", assetKey: "act2", mediaStart: 2.4, dwell: 0.9, label: "Farms", type: "fairshare.contribution", headline: "Plans crops from real weather and power data." },
{ id: "housing", act: "act2", assetKey: "act2", mediaStart: 4.8, dwell: 3.7, label: "Housing", type: "housing.space.report", headline: "Assigns rooms fairly \u2014 and remembers who got shorted." },
{ id: "mentor", act: "act2", assetKey: "act2", mediaStart: 9.4, dwell: 1.4, label: "Mentor", type: "mentor.match", headline: "Matches you with a mentor before a skill is lost." },
{ id: "healthpost", act: "act2", assetKey: "act2", mediaStart: 11.2, dwell: 3.1, label: "Health Post", type: "healthpost.referral", headline: "Triages symptoms, then signs a referral to a clinician." },
{ id: "lightclock", act: "act2", assetKey: "act2", mediaStart: 14.8, dwell: 0.8, label: "Light Clock", type: null, headline: "Tracks your sleep rhythm without sunlight \u2014 no sensor required." },
{ id: "theclimb", act: "act2", assetKey: "act2", mediaStart: 16.8, dwell: 3.5, label: "The Climb", type: "theclimb.plan.propose", headline: "Schedules the climb to the surface so no crowd crush happens." },
{ id: "qvballot", act: "act3", mediaStart: 0.5, dwell: 7.8, sig: "0xd41fa6c2", type: "governance.qvBallot", fields: 'proposalId: "well-pump", choice: "yes", credits: 9', note: "Keeps your community's votes and proposals running even if the network goes down \u2014 and heals back together once it's back up." },
{ id: "fairdraw", act: "act3", mediaStart: 8.9, dwell: 2.5, sig: "0x6c0efb3a", type: "fairdraw.commit", fields: 'drawId: "d7", commitHash: "9af2\u2026"', note: "Runs a lottery no one can rig \u2014 the result is locked in before it's ever revealed." },
{ id: "sky", act: "act3", mediaStart: 13.2, dwell: 5.6, sig: "0x2f88c511", type: "sky.morale.pulse", fields: 'mood: "tense"', note: "A shared mood board and an ambient day/night rhythm for everyone sheltering together \u2014 so the Hollow still feels alive." },
{ id: "qvballot", act: "act3", assetKey: "act3", mediaStart: 0.5, dwell: 7.8, label: "Assembly", type: "governance.qvBallot", headline: "Keeps votes and lotteries running \u2014 network or not." },
{ id: "fairdraw", act: "act3", assetKey: "act3", mediaStart: 8.9, dwell: 2.5, label: "Fair Draw", type: "fairdraw.commit", headline: "Runs a lottery no one can rig." },
{ id: "sky", act: "act3", assetKey: "act3", mediaStart: 13.2, dwell: 5.6, label: "Sky", type: "sky.morale.pulse", headline: "A shared mood board for the whole shelter." },
];
// Per-app window duration = max(comfortable reading time, real footage
// dwell, floor). `dwell` is each app's own EMPIRICALLY VERIFIED real-footage
// length (see APP_BLURBS comment above) - NOT inferred from the gap to the
// next app's mediaStart, because the real tour recording takes a "back to
// home" beat (and sometimes a brief cross-app revisit, e.g. Fair Share
// reappears mid-Act-II when Farms' forecast feeds its food tile) between most
// app pairs; trusting that gap as this app's dwell previously froze the hold
// on a contaminated frame from whatever came next.
function computeAppWindows() {
const windows = new Map();
for (const app of APP_BLURBS) {
const words = app.note.split(/\s+/).filter(Boolean).length;
const readTime = words / WORDS_PER_SEC + READ_BUFFER_S;
windows.set(app.id, { dur: r3(Math.max(readTime, app.dwell, MIN_APP_WINDOW_S)), dwell: r3(app.dwell) });
}
return windows;
}
// Lay out one act's apps back-to-back (hard cuts between apps, same
// convention the intro->act1 boundary already used) and return both the
// ledger (one entry per app, `at` = that app's window start relative to the
// stage) and the clip specs layoutClips() will turn into <video> windows.
function layoutAppStage(clips, windows, actKey, introKey) {
const apps = APP_BLURBS.filter((a) => a.act === actKey).sort((a, b) => a.mediaStart - b.mediaStart);
// Lay out one act's apps back-to-back (hard cuts between apps). Each app's
// window is its own real, already-verified dwell within the shared act clip
// (see APP_BLURBS header note) - played CONTINUOUSLY from `mediaStart` for
// `dwell` seconds, never a frozen still. Returns the stage's total duration,
// the per-app text entries (synced 1:1 to each clip's start), and the
// <video> clip specs (several logical clips can share one real asset file).
function layoutAppStage(clips, actKey, introKey) {
const apps = APP_BLURBS.filter((a) => a.act === actKey);
const clipSpecs = [];
let cursor = 0;
if (introKey) {
@@ -227,51 +180,17 @@ function layoutAppStage(clips, windows, actKey, introKey) {
clipSpecs.push({ key: introKey, assetKey: introKey, mediaStart: 0, duration: introDur });
cursor = introDur;
}
const ledger = [];
const holdSpecs = [];
const entries = [];
for (const app of apps) {
const { dur } = windows.get(app.id);
// DECISION: every app is a full-window STATIC SNAPSHOT (no <video> element
// for app segments at all - `intro`/`epilogue` still use real playback;
// those are single dedicated files, not many stacked clips sharing a
// handful of source files, and were never observed to glitch). Two
// independent live-video designs were tried and both intermittently
// rendered a BLACK frame at an app's own window start in this renderer -
// first traced to short (<2s) dwell clips, then reproduced again on a
// 3.7s dwell clip (housing), meaning the race isn't reliably bounded by
// clip length. A static <img> has no decode/seek dependency and therefore
// no such race; it is still a real captured frame from this app's own
// dwell (see extractAppClips below), never fabricated. The real captured
// MOTION during each app's dwell is sacrificed for a single still, which
// is accepted here because every app was already going to spend most of
// its window on a hold/freeze anyway (dwell << window duration for
// nearly all 13 apps).
holdSpecs.push({ id: app.id, start: r3(cursor), dwell: 0, windowDur: dur });
ledger.push({ sig: app.sig, type: app.type, fields: app.fields, note: app.note, at: r3(cursor) });
const dur = r3(app.dwell);
clipSpecs.push({ key: app.id, assetKey: app.assetKey, mediaStart: app.mediaStart, duration: dur });
entries.push({ label: app.label, headline: app.headline, type: app.type, at: r3(cursor) });
cursor = r3(cursor + dur);
}
return { dur: cursor, ledger, clipSpecs, holdSpecs };
return { dur: cursor, entries, clipSpecs };
}
// Snapshot each app's own real dwell (the footage between its real capture
// beat and the next app's, or the act's real end) to assets/app-<id>-hold.png.
// This is post-processing of footage already captured by tour.mjs/capture.mjs -
// no new recording. Every app is static-only (see layoutAppStage) so no .mp4
// is ever produced here, only the one still frame that becomes that app's
// entire on-screen window via a plain GSAP opacity set.
function extractAppClips() {
for (const app of APP_BLURBS) {
const srcPath = resolve(ASSETS_DIR, `${app.act}.mp4`);
const holdOut = resolve(ASSETS_DIR, `app-${app.id}-hold.png`);
execFileSync(
FFMPEG_BIN,
["-y", "-ss", String(Math.max(0, app.mediaStart + app.dwell - 0.05)), "-i", srcPath, "-frames:v", "1", holdOut],
{ stdio: ["ignore", "pipe", "pipe"] },
);
}
}
function buildTimeline(clips, assemblyDur, windows) {
function buildTimeline(clips, assemblyDur) {
const seg = [];
let t = 0;
const push = (s) => {
@@ -284,50 +203,42 @@ function buildTimeline(clips, assemblyDur, windows) {
push({ id: "data", kind: "data", dur: DATA_DUR });
const allHolds = [];
const collectHolds = (stage, layout) => {
for (const h of layout.holdSpecs) allHolds.push({ ...h, start: r3(stage.start + h.start) });
};
// Act I: intro clip (cold-start/home/admin) + 4 individually-timed app windows.
// Act I: intro clip (cold-start/home/admin) + 4 individually-timed app clips.
push({ id: "ch-act1", kind: "chapter", dur: CH_DUR, card: "act1", color: COLORS.chapter1, cap: BRAND, capFg: "#fff", keyword: "Verified Twice" });
const act1Layout = layoutAppStage(clips, windows, "act1", "intro");
const act1Layout = layoutAppStage(clips, "act1", "intro");
const act1Stage = push({
id: "act1", kind: "stage", dur: act1Layout.dur,
field: COLORS.fieldAct1, frame: { x: 332, y: 0, scale: 0.9, tilt: -7 }, textSide: "left", card: "act1",
clips: act1Layout.clipSpecs,
ledger: act1Layout.ledger,
entries: act1Layout.entries,
});
collectHolds(act1Stage, act1Layout);
push({ id: "ch-act2", kind: "chapter", dur: CH_DUR, card: "act2", color: COLORS.chapter2, cap: "#101418", capFg: "#ffcf4d", dark: true, keyword: "Alive" });
const act2Layout = layoutAppStage(clips, windows, "act2", null);
const act2Layout = layoutAppStage(clips, "act2", null);
const act2Stage = push({
id: "act2", kind: "stage", dur: act2Layout.dur,
field: COLORS.fieldAct2, frame: { x: -300, y: 0, scale: 0.84, tilt: 9 }, textSide: "right", card: "act2",
clips: act2Layout.clipSpecs,
ledger: act2Layout.ledger,
entries: act2Layout.entries,
});
collectHolds(act2Stage, act2Layout);
push({ id: "ch-act3", kind: "chapter", dur: CH_DUR, card: "act3", color: COLORS.chapter3, cap: "#063f36", capFg: "#9bffe6", keyword: "Decides" });
const act3Layout = layoutAppStage(clips, windows, "act3", null);
const act3Layout = layoutAppStage(clips, "act3", null);
const act3Stage = push({
id: "act3", kind: "stage", dur: act3Layout.dur,
field: COLORS.fieldAct3, frame: { x: 332, y: 0, scale: 0.9, tilt: -9 }, textSide: "left", card: "act3",
clips: act3Layout.clipSpecs,
ledger: act3Layout.ledger,
entries: act3Layout.entries,
});
collectHolds(act3Stage, act3Layout);
push({ id: "ch-epi", kind: "chapter", dur: CH_DUR, card: "epilogue", color: COLORS.chapterE, cap: "#2e1a63", capFg: "#d8c6ff", keyword: "Verifiable" });
push({
id: "epilogue", kind: "stage", dur: clipDur(clips, "epilogue"),
field: COLORS.fieldEpi, frame: { x: -300, y: 0, scale: 0.84, tilt: 7 }, textSide: "right", card: "epilogue",
clips: [{ key: "epilogue" }],
ledger: [
{ sig: "0x11e3a9f0", type: "wallet.transfer", fields: 'from: "you", to: "hollow-commons-fund", amount: 10', note: "Every balance re-checks its own Ed25519 signature \u2014 nothing on faith.", at: 0.3 },
{ sig: null, type: null, fields: null, note: "A mini-app installs straight to this device's registry \u2014 no gatekeeper, no signed event required.", at: 2.2 },
entries: [
{ label: "Wallet", type: "wallet.transfer", headline: "Every balance re-checks its own signature \u2014 nothing on faith.", at: 0.3 },
{ label: "Upload", type: null, headline: "Any resident can ship a mini-app. No gatekeeper.", at: 2.2 },
],
});
@@ -341,7 +252,7 @@ function buildTimeline(clips, assemblyDur, windows) {
// Absolute end: wall end + a short dark tail so the film closes on black
// (clean stop, no white flash) arriving from a completely new scene.
const total = r3(wall.end + 0.2);
return { seg, total, holds: allHolds };
return { seg, total };
}
// Assign each stage segment's clip windows (absolute film time) from the
@@ -352,10 +263,6 @@ function layoutClips(seg, clips) {
if (s.kind !== "stage") continue;
let c = s.start;
for (const clip of s.clips) {
// App-stage specs (layoutAppStage) already carry an explicit duration +
// mediaStart (pointing into a shared per-act asset file); legacy
// single-clip stages (epilogue) just reference a whole manifest clip
// by name, playing it from its own start (mediaStart 0).
const duration = clip.duration != null ? clip.duration : clipDur(clips, clip.key);
const assetKey = clip.assetKey || clip.key;
const mediaStart = clip.mediaStart || 0;
@@ -403,9 +310,7 @@ function main() {
const assemblyDur = JSON.parse(readFileSync(ASSEMBLY_MANIFEST, "utf8")).clip?.durationS;
if (!assemblyDur) throw new Error("assembly clip missing/zero duration");
const windows = computeAppWindows();
extractAppClips();
const { seg, total, holds } = buildTimeline(clips, assemblyDur, windows);
const { seg, total } = buildTimeline(clips, assemblyDur);
const clipWins = layoutClips(seg, clips);
generateAmbientTrack(resolve(ASSETS_DIR, "ambient.mp3"), total);
@@ -441,7 +346,8 @@ function main() {
.join("\n");
// Phone rig: one bezel, all stage clips stacked (each visible only in its
// own data-start window), a contact shadow that transforms with the rig.
// own data-start window - the FULL real clip, continuously, never a held
// still), a contact shadow that transforms with the rig.
const screenVideoEls = clipWins
.map(
(w) =>
@@ -449,37 +355,27 @@ function main() {
)
.join("\n");
// Hold snapshots: a real captured still frame of each app's own last real
// moment, shown (via explicit GSAP opacity, not autoplay) once that app's
// <video> has exhausted its real dwell, for the remainder of its window -
// see layoutAppStage()/extractAppClips() for why a plain video-duration
// extension isn't trustworthy enough on its own at this element count.
const holdImgEls = holds
.map((h) => ` <img class="screen-vid hold-img" id="hold-${h.id}" src="assets/app-${h.id}-hold.png" style="opacity:0;" alt="">`)
.join("\n");
// Per-act side text + signed-event ledger panel (positioned opposite the phone).
// Per-act side text: one large, bold, SHORT plain-language callout per
// app (app-store-feature-callout style), swapped in exact sync with that
// app's own real clip window - no ledger, no hash, no JSON, no monospace.
const stageTextEls = stages
.map((s) => {
const card = TITLE_CARDS[s.card];
const entries = s.ledger
const entries = s.entries
.map((e, i) => {
if (!e.sig) {
return ` <div class="entry noevent" id="entry-${s.id}-${i}" style="opacity:0;"><div class="entry-sig">&mdash; no event signed &mdash;</div><div class="entry-note">${esc(e.note)}</div></div>`;
}
return ` <div class="entry" id="entry-${s.id}-${i}" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">${esc(e.sig)}</span><span class="entry-type">${esc(e.type)}</span></div><div class="entry-json">{ ${esc(e.fields)} }</div><div class="entry-note">&rarr; ${esc(e.note)}</div></div>`;
const typeTag = e.type ? `<div class="app-type">${esc(e.type)}</div>` : "";
return ` <div class="app-entry" id="entry-${s.id}-${i}" style="opacity:0;">
<div class="app-label">${esc(e.label)}</div>
<div class="app-headline">${esc(e.headline)}</div>
${typeTag}
</div>`;
})
.join("\n");
const card = TITLE_CARDS[s.card];
return ` <div class="stagetext ${s.textSide}" id="text-${s.id}" style="opacity:0;">
<div class="st-eyebrow">${esc(card.eyebrow)}</div>
<div class="st-title">${esc(card.title)}</div>
<div class="ledger-panel">
<div class="ledger-head"><span class="ledger-dot"></span>SIGNED EVENT LOG &middot; LIVE</div>
<div class="ledger-entries">
<div class="app-stack">
${entries}
</div>
<div class="ledger-cursor">&gt;<span class="blink">_</span></div>
</div>
</div>`;
})
.join("\n");
@@ -559,12 +455,11 @@ ${tileEls}
const stageCfg = JSON.stringify(
stages.map((s) => ({
id: s.id, start: s.start, end: s.end, frame: s.frame, textSide: s.textSide,
entryAts: s.ledger.map((e) => e.at),
entryAts: s.entries.map((e) => e.at),
})),
);
const chapterCfg = JSON.stringify(chapters.map((s) => ({ id: s.id, start: s.start, end: s.end })));
const clipCfg = JSON.stringify(clipWins.map((w) => ({ key: w.key, start: w.start, duration: w.duration })));
const holdCfg = JSON.stringify(holds.map((h) => ({ id: h.id, start: h.start, dwell: h.dwell, windowDur: h.windowDur })));
const promoHtml = `<template>
<style>
@@ -589,7 +484,8 @@ ${tileEls}
.screen { position:absolute; inset:${BEZEL}px; border-radius:30px; overflow:hidden; background:#000; }
.screen-vid { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
/* ---- Per-act side text + signed-event ledger panel (opposite the phone). ---- */
/* ---- Per-act side text: large/short app-store-feature-callout, no
terminal/code motif anywhere. ---- */
.stagetext { position:absolute; top:0; bottom:0; z-index:12; display:flex; flex-direction:column; justify-content:center;
width:760px; padding:0 70px; will-change:opacity,transform; }
.stagetext.left { left:0; align-items:flex-start; text-align:left; }
@@ -598,25 +494,17 @@ ${tileEls}
.st-eyebrow { color:#8fb6ff; letter-spacing:0.42em; font-size:19px; font-weight:700; text-transform:uppercase; }
.st-title { color:#f5f8ff; font-size:46px; font-weight:800; letter-spacing:-0.02em; line-height:1.06; margin-top:14px; text-shadow:0 2px 24px rgba(5,15,40,0.6); }
.stagetext.top .st-title { font-size:38px; }
.ledger-panel { margin-top:22px; display:flex; flex-direction:column; gap:8px; width:100%;
background:rgba(4,8,16,0.82); border:1px solid rgba(110,230,180,0.22); border-radius:14px;
padding:14px 20px 15px; box-shadow:0 20px 50px rgba(0,0,0,0.5); font-family:'SF Mono','Menlo','Consolas',monospace; }
.ledger-head { color:rgba(140,255,205,0.85); font-size:13px; font-weight:700; letter-spacing:0.22em;
text-transform:uppercase; display:flex; align-items:center; gap:8px; margin-bottom:2px; }
.ledger-dot { width:7px; height:7px; border-radius:50%; background:#5cffb0; box-shadow:0 0 8px 2px rgba(92,255,176,0.7); }
/* .ledger-entries is a fixed-height stack: every entry sits absolutely at
the same spot so only ONE mini-app's entry is ever on screen at once -
entry N fades/wipes in exactly when that app is active in the footage,
and fades out right as entry N+1 takes over (see the GSAP loop below). */
.ledger-entries { position:relative; min-height:124px; }
.entry { position:absolute; left:0; right:0; top:0; }
.entry-sig { display:flex; gap:10px; align-items:baseline; font-size:14px; }
.entry-hash { color:#5cffb0; font-weight:700; }
.entry-type { color:#ffd27a; font-weight:700; }
.entry-json { color:rgba(210,226,255,0.68); font-size:13px; margin-top:2px; }
.entry-note { color:#f2f7ff; font-size:16px; font-weight:700; letter-spacing:-0.005em; margin-top:5px; line-height:1.28; font-family:-apple-system,'Helvetica Neue',Arial,sans-serif; }
.entry.noevent .entry-sig { color:rgba(170,190,230,0.55); font-style:italic; font-size:14px; }
.ledger-cursor { color:#5cffb0; font-size:18px; font-weight:700; margin-top:2px; }
/* .app-stack is a fixed-height slot: every app's callout sits absolutely
at the same spot so only ONE mini-app's text is ever on screen at
once, in exact sync with that app's own real clip window. */
.app-stack { position:relative; min-height:230px; width:100%; margin-top:18px; }
.app-entry { position:absolute; left:0; right:0; top:0; }
.app-label { color:#8fb6ff; font-size:20px; font-weight:800; letter-spacing:0.14em; text-transform:uppercase; }
.app-headline { color:#f8faff; font-size:50px; font-weight:800; letter-spacing:-0.015em; line-height:1.14;
margin-top:12px; text-shadow:0 4px 28px rgba(5,15,40,0.55); }
.app-type { margin-top:20px; display:inline-block; color:#bcd6ff; font-size:15px; font-weight:700;
letter-spacing:0.04em; background:rgba(22,119,255,0.16); border:1px solid rgba(143,182,255,0.3);
border-radius:999px; padding:7px 16px; }
/* ---- Chapter cards: full-screen solid bold color + capsule headline. ---- */
.chapter { position:absolute; inset:0; z-index:30; display:flex; flex-direction:column; align-items:center; justify-content:center;
@@ -681,7 +569,6 @@ ${fieldEls}
<div id="device">
<div class="screen">
${screenVideoEls}
${holdImgEls}
</div>
</div>
</div>
@@ -737,23 +624,17 @@ ${audioEl}
// ---------- PHONE STAGE (per-act framing) ----------
const CLIPS = ${clipCfg};
const HOLDS = ${holdCfg};
// Explicit opacity control for every screen-vid/hold-img layer: belt-and-
// Explicit opacity control for every screen-vid layer: belt-and-
// suspenders over hyperframes' own automatic data-start/data-duration
// windowing, which was observed to let a stale/adjacent element's frame
// bleed through once this composition grew past a dozen stacked video
// elements sharing a handful of source files. Each clip is visible ONLY
// for its own authored window; each hold image takes over the INSTANT its
// video's real dwell ends (same real moment, so the swap is invisible)
// and holds until that app's full window closes.
// for its own authored window and plays its FULL real length,
// continuously - no hold/freeze of any kind.
for (const c of CLIPS) {
tl.set('#vid-' + c.key, { opacity: 1 }, c.start);
tl.set('#vid-' + c.key, { opacity: 0 }, c.start + c.duration);
}
for (const h of HOLDS) {
tl.set('#hold-' + h.id, { opacity: 1 }, h.start + h.dwell);
tl.set('#hold-' + h.id, { opacity: 0 }, h.start + h.windowDur);
}
// The phone stage stays mounted the whole time; opaque overlays (chapters
// z30, sections z34, assembly z20) cover it except during the acts, so no
// per-act show/hide juggling is needed - just reposition the rig while the
@@ -763,16 +644,15 @@ ${audioEl}
tl.set('#phoneRig', { x: s.frame.x, y: s.frame.y, scale: s.frame.scale, rotationY: tilt }, Math.max(0, s.start - 0.25));
// Gentle camera push + tilt settle across the act so no footage frame is static.
tl.fromTo('#phoneRig', { scale: s.frame.scale, rotationY: tilt }, { scale: s.frame.scale * 1.03, rotationY: tilt * 0.35, duration: s.end - s.start, ease: 'none' }, s.start);
// Side text + signed-event ledger panel.
// Side text.
const dx = s.textSide === 'right' ? 40 : (s.textSide === 'left' ? -40 : 0);
const dy = s.textSide === 'top' ? -18 : 0;
tl.fromTo('#text-' + s.id, { opacity: 0, x: dx, y: dy }, { opacity: 1, x: 0, y: 0, duration: 0.6, ease: 'power2.out' }, s.start + 0.1);
tl.to('#text-' + s.id, { opacity: 0, duration: 0.45, ease: 'power2.in' }, s.end - F);
// Each ledger entry owns its own on-screen window, synced to when that
// specific mini-app is actually active in the footage (capture-manifest.json
// beats): a left-to-right scan-wipe reveal in, then a plain fade-out right
// before the NEXT entry's reveal begins - so at most one entry is ever on
// screen, never a stack of every app's entry piled up at once.
// Each app's callout owns its own on-screen window, synced exactly to
// when that app's real clip plays: a left-to-right scan-wipe reveal
// in, then a plain fade-out right before the NEXT app's reveal begins
// - so at most one app's text is ever on screen, never a stack.
for (let i = 0; i < s.entryAts.length; i++) {
const entrySel = '#entry-' + s.id + '-' + i;
const entryStart = s.start + s.entryAts[i];
@@ -783,10 +663,6 @@ ${audioEl}
tl.to(entrySel, { opacity: 0, duration: 0.3, ease: 'power2.in' }, nextStart - 0.3);
}
}
// Live blinking cursor, driven by the same paused timeline (never a
// wall-clock CSS @keyframes) so frame-by-frame rendering stays exact.
const blinkCycles = Math.max(1, Math.floor((s.end - s.start) * 2));
tl.to('#text-' + s.id + ' .ledger-cursor .blink', { opacity: 0, duration: 0.01, repeat: blinkCycles, yoyo: true, ease: 'steps(1)' }, s.start + 0.6);
}
// ---------- CHAPTER CARDS ----------
@@ -841,7 +717,7 @@ ${audioEl}
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Commons &middot; OpenMotion promo (redesign 3)</title>
<title>The Commons &middot; OpenMotion promo (redesign 5)</title>
<script src="assets/gsap.min.js"></script>
<style>body{margin:0;background:#000}#main{position:relative;width:${CANVAS_W}px;height:${CANVAS_H}px;overflow:hidden}</style>
</head>
@@ -870,7 +746,7 @@ ${audioEl}
const gsapDst = resolve(ASSETS_DIR, "gsap.min.js");
if (!existsSync(gsapDst)) copyFileSync(gsapSrc, gsapDst);
console.log("Composition built (redesign 3).");
console.log("Composition built (redesign 5).");
console.log(` total duration : ${total}s (${Math.round(total * FPS)} frames @ ${FPS}fps)`);
console.log(` phone box : ${phoneW}x${PHONE_H} (video ${videoSize.width}x${videoSize.height}, aspect-exact)`);
console.log(" segments :", seg.map((s) => `${s.id}[${s.start.toFixed(1)}-${s.end.toFixed(1)}]`).join(" "));
+19 -4
View File
@@ -43,13 +43,28 @@ const VITE_PORT = 45000 + Math.floor(Math.random() * 10000);
const APP_URL = `http://127.0.0.1:${VITE_PORT}`;
const FFMPEG_BIN = ffmpegStatic;
// Per-act clip windows, keyed by the boundary marks runTour() records.
// Per-app clip windows, keyed by the boundary marks runTour() records.
// Each entry: { name, from: <startMark>, to: <endMark>, leadGuard?: seconds }.
// REDESIGN: one dedicated real clip per mini-app (app-<id>-start/-end marks
// from tour.mjs's linger()-extended dwell), replacing the old 3 giant
// act1/act2/act3 blobs that buildComposition.mjs used to slice further with
// an estimated mediaStart/dwell + a frozen-frame hold. Every app clip here is
// now played back in full, continuously, by the composition - no freezing.
const CLIP_SPEC = [
{ name: "intro", from: "gridReady", to: "introEnd", leadGuard: 0.45 }, // trim first-paint boot
{ name: "act1", from: "introEnd", to: "act1End" },
{ name: "act2", from: "act1End", to: "act2End" },
{ name: "act3", from: "act2End", to: "act3End" },
{ name: "waterwatch", from: "app-waterwatch-start", to: "app-waterwatch-end" },
{ name: "fairshare", from: "app-fairshare-start", to: "app-fairshare-end" },
{ name: "tunnelsafety", from: "app-tunnelsafety-start", to: "app-tunnelsafety-end" },
{ name: "findfamily", from: "app-findfamily-start", to: "app-findfamily-end" },
{ name: "farms", from: "app-farms-start", to: "app-farms-end" },
{ name: "housing", from: "app-housing-start", to: "app-housing-end" },
{ name: "mentor", from: "app-mentor-start", to: "app-mentor-end" },
{ name: "healthpost", from: "app-healthpost-start", to: "app-healthpost-end" },
{ name: "lightclock", from: "app-lightclock-start", to: "app-lightclock-end" },
{ name: "theclimb", from: "app-theclimb-start", to: "app-theclimb-end" },
{ name: "qvballot", from: "app-qvballot-start", to: "app-qvballot-end" },
{ name: "fairdraw", from: "app-fairdraw-start", to: "app-fairdraw-end" },
{ name: "sky", from: "app-sky-start", to: "app-sky-end" },
{ name: "epilogue", from: "act3End", to: "epilogueEnd" }, // Stage-3 Epilogue footage
];
+118 -96
View File
@@ -21,7 +21,8 @@
.screen { position:absolute; inset:8px; border-radius:30px; overflow:hidden; background:#000; }
.screen-vid { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
/* ---- Per-act side text + signed-event ledger panel (opposite the phone). ---- */
/* ---- Per-act side text: large/short app-store-feature-callout, no
terminal/code motif anywhere. ---- */
.stagetext { position:absolute; top:0; bottom:0; z-index:12; display:flex; flex-direction:column; justify-content:center;
width:760px; padding:0 70px; will-change:opacity,transform; }
.stagetext.left { left:0; align-items:flex-start; text-align:left; }
@@ -30,25 +31,17 @@
.st-eyebrow { color:#8fb6ff; letter-spacing:0.42em; font-size:19px; font-weight:700; text-transform:uppercase; }
.st-title { color:#f5f8ff; font-size:46px; font-weight:800; letter-spacing:-0.02em; line-height:1.06; margin-top:14px; text-shadow:0 2px 24px rgba(5,15,40,0.6); }
.stagetext.top .st-title { font-size:38px; }
.ledger-panel { margin-top:22px; display:flex; flex-direction:column; gap:8px; width:100%;
background:rgba(4,8,16,0.82); border:1px solid rgba(110,230,180,0.22); border-radius:14px;
padding:14px 20px 15px; box-shadow:0 20px 50px rgba(0,0,0,0.5); font-family:'SF Mono','Menlo','Consolas',monospace; }
.ledger-head { color:rgba(140,255,205,0.85); font-size:13px; font-weight:700; letter-spacing:0.22em;
text-transform:uppercase; display:flex; align-items:center; gap:8px; margin-bottom:2px; }
.ledger-dot { width:7px; height:7px; border-radius:50%; background:#5cffb0; box-shadow:0 0 8px 2px rgba(92,255,176,0.7); }
/* .ledger-entries is a fixed-height stack: every entry sits absolutely at
the same spot so only ONE mini-app's entry is ever on screen at once -
entry N fades/wipes in exactly when that app is active in the footage,
and fades out right as entry N+1 takes over (see the GSAP loop below). */
.ledger-entries { position:relative; min-height:124px; }
.entry { position:absolute; left:0; right:0; top:0; }
.entry-sig { display:flex; gap:10px; align-items:baseline; font-size:14px; }
.entry-hash { color:#5cffb0; font-weight:700; }
.entry-type { color:#ffd27a; font-weight:700; }
.entry-json { color:rgba(210,226,255,0.68); font-size:13px; margin-top:2px; }
.entry-note { color:#f2f7ff; font-size:16px; font-weight:700; letter-spacing:-0.005em; margin-top:5px; line-height:1.28; font-family:-apple-system,'Helvetica Neue',Arial,sans-serif; }
.entry.noevent .entry-sig { color:rgba(170,190,230,0.55); font-style:italic; font-size:14px; }
.ledger-cursor { color:#5cffb0; font-size:18px; font-weight:700; margin-top:2px; }
/* .app-stack is a fixed-height slot: every app's callout sits absolutely
at the same spot so only ONE mini-app's text is ever on screen at
once, in exact sync with that app's own real clip window. */
.app-stack { position:relative; min-height:230px; width:100%; margin-top:18px; }
.app-entry { position:absolute; left:0; right:0; top:0; }
.app-label { color:#8fb6ff; font-size:20px; font-weight:800; letter-spacing:0.14em; text-transform:uppercase; }
.app-headline { color:#f8faff; font-size:50px; font-weight:800; letter-spacing:-0.015em; line-height:1.14;
margin-top:12px; text-shadow:0 4px 28px rgba(5,15,40,0.55); }
.app-type { margin-top:20px; display:inline-block; color:#bcd6ff; font-size:15px; font-weight:700;
letter-spacing:0.04em; background:rgba(22,119,255,0.16); border:1px solid rgba(143,182,255,0.3);
border-radius:999px; padding:7px 16px; }
/* ---- Chapter cards: full-screen solid bold color + capsule headline. ---- */
.chapter { position:absolute; inset:0; z-index:30; display:flex; flex-direction:column; align-items:center; justify-content:center;
@@ -102,7 +95,7 @@
.assembly { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
</style>
<div id="root" data-composition-id="promo" data-width="1920" data-height="1080" data-duration="182.078">
<div id="root" data-composition-id="promo" data-width="1920" data-height="1080" data-duration="76.28">
<div id="fieldwrap">
<div class="field" id="field-act1" style="background:radial-gradient(1200px 820px at 70% 30%,#123a6b 0%,#081c3a 60%,#05101f 100%);opacity:0;"></div>
<div class="field" id="field-act2" style="background:radial-gradient(1200px 820px at 50% 24%,#1a2330 0%,#0d1117 62%,#06080c 100%);opacity:0;"></div>
@@ -117,82 +110,122 @@
<div id="device">
<div class="screen">
<video class="screen-vid" id="vid-intro" src="assets/intro.mp4" data-start="9.100" data-media-start="0.000" data-duration="2.630" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-epilogue" src="assets/epilogue.mp4" data-start="161.808" data-media-start="0.000" data-duration="6.800" style="opacity:0;" muted playsinline></video>
<img class="screen-vid hold-img" id="hold-waterwatch" src="assets/app-waterwatch-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-fairshare" src="assets/app-fairshare-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-tunnelsafety" src="assets/app-tunnelsafety-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-findfamily" src="assets/app-findfamily-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-farms" src="assets/app-farms-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-housing" src="assets/app-housing-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-mentor" src="assets/app-mentor-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-healthpost" src="assets/app-healthpost-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-lightclock" src="assets/app-lightclock-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-theclimb" src="assets/app-theclimb-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-qvballot" src="assets/app-qvballot-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-fairdraw" src="assets/app-fairdraw-hold.png" style="opacity:0;" alt="">
<img class="screen-vid hold-img" id="hold-sky" src="assets/app-sky-hold.png" style="opacity:0;" alt="">
<video class="screen-vid" id="vid-waterwatch" src="assets/act1.mp4" data-start="11.730" data-media-start="1.970" data-duration="5.630" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-fairshare" src="assets/act1.mp4" data-start="17.360" data-media-start="7.950" data-duration="0.850" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-tunnelsafety" src="assets/act1.mp4" data-start="18.210" data-media-start="9.250" data-duration="0.800" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-findfamily" src="assets/act1.mp4" data-start="19.010" data-media-start="10.400" data-duration="1.400" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-farms" src="assets/act2.mp4" data-start="22.510" data-media-start="2.400" data-duration="0.900" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-housing" src="assets/act2.mp4" data-start="23.410" data-media-start="4.800" data-duration="3.700" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-mentor" src="assets/act2.mp4" data-start="27.110" data-media-start="9.400" data-duration="1.400" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-healthpost" src="assets/act2.mp4" data-start="28.510" data-media-start="11.200" data-duration="3.100" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-lightclock" src="assets/act2.mp4" data-start="31.610" data-media-start="14.800" data-duration="0.800" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-theclimb" src="assets/act2.mp4" data-start="32.410" data-media-start="16.800" data-duration="3.500" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-qvballot" src="assets/act3.mp4" data-start="38.010" data-media-start="0.500" data-duration="7.800" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-fairdraw" src="assets/act3.mp4" data-start="45.810" data-media-start="8.900" data-duration="2.500" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-sky" src="assets/act3.mp4" data-start="48.310" data-media-start="13.200" data-duration="5.600" style="opacity:0;" muted playsinline></video>
<video class="screen-vid" id="vid-epilogue" src="assets/epilogue.mp4" data-start="56.010" data-media-start="0.000" data-duration="6.800" style="opacity:0;" muted playsinline></video>
</div>
</div>
</div>
</div>
<div class="stagetext left" id="text-act1" style="opacity:0;">
<div class="st-eyebrow">Act I</div>
<div class="st-title">A Crisis, Verified Twice</div>
<div class="ledger-panel">
<div class="ledger-head"><span class="ledger-dot"></span>SIGNED EVENT LOG &middot; LIVE</div>
<div class="ledger-entries">
<div class="entry" id="entry-act1-0" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x4f91ac2e</span><span class="entry-type">waterwatch.reading.report</span></div><div class="entry-json">{ sensorId: "kiosk-2", channel: "pH", value: 55 }</div><div class="entry-note">&rarr; Catches a bad water reading before anyone drinks it — once a second sensor confirms it, everyone's ration adjusts automatically. No guessing, no rumors.</div></div>
<div class="entry" id="entry-act1-1" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x8a02ee71</span><span class="entry-type">fairshare.need</span></div><div class="entry-json">{ resource: "power", value: 10 }</div><div class="entry-note">&rarr; Splits power, water, food, and cooling fairly by need, in real time — so a shortage gets rationed honestly instead of grabbed by whoever's fastest.</div></div>
<div class="entry" id="entry-act1-2" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x1dcb6f40</span><span class="entry-type">tunnelsafety.hazard.report</span></div><div class="entry-json">{ segmentId: "seg-market-bypass", status: "flooded" }</div><div class="entry-note">&rarr; Report a flooded or blocked corridor once, and everyone's route around it updates automatically — with your real location attached if you allow it.</div></div>
<div class="entry noevent" id="entry-act1-3" style="opacity:0;"><div class="entry-sig">&mdash; no event signed &mdash;</div><div class="entry-note">Search for a missing family member without anyone, even the app itself, ever seeing who you searched for — unless there's a real match.</div></div>
<div class="app-stack">
<div class="app-entry" id="entry-act1-0" style="opacity:0;">
<div class="app-label">Water Watch</div>
<div class="app-headline">Catches bad water before anyone drinks it.</div>
<div class="app-type">waterwatch.reading.report</div>
</div>
<div class="app-entry" id="entry-act1-1" style="opacity:0;">
<div class="app-label">Fair Share</div>
<div class="app-headline">Splits power, water, and food fairly, automatically.</div>
<div class="app-type">fairshare.need</div>
</div>
<div class="app-entry" id="entry-act1-2" style="opacity:0;">
<div class="app-label">Tunnel Safety</div>
<div class="app-headline">Reports a blocked tunnel so everyone reroutes instantly.</div>
<div class="app-type">tunnelsafety.hazard.report</div>
</div>
<div class="app-entry" id="entry-act1-3" style="opacity:0;">
<div class="app-label">Find Family</div>
<div class="app-headline">Finds missing family, privately. No one else sees your search.</div>
</div>
<div class="ledger-cursor">&gt;<span class="blink">_</span></div>
</div>
</div>
<div class="stagetext right" id="text-act2" style="opacity:0;">
<div class="st-eyebrow">Act II</div>
<div class="st-title">Keeping the Hollow Alive</div>
<div class="ledger-panel">
<div class="ledger-head"><span class="ledger-dot"></span>SIGNED EVENT LOG &middot; LIVE</div>
<div class="ledger-entries">
<div class="entry" id="entry-act2-0" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x2c7fa918</span><span class="entry-type">fairshare.contribution</span></div><div class="entry-json">{ resource: "food", value: 200.00 }</div><div class="entry-note">&rarr; Plans what to grow and when, using real temperature data and your actual share of the power budget — not a guess.</div></div>
<div class="entry" id="entry-act2-1" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x90b1d234</span><span class="entry-type">housing.space.report</span></div><div class="entry-json">{ spaceId: "common-room-3", location: "east wing" }</div><div class="entry-note">&rarr; Assigns you a room fairly, accounting for accessibility needs and medical proximity — and remembers if you were shorted last time.</div></div>
<div class="entry" id="entry-act2-2" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0xbf02c856</span><span class="entry-type">mentor.match</span></div><div class="entry-json">{ apprentice: "you", mentor: "a94f..e2" }</div><div class="entry-note">&rarr; Flags the trade skills at risk of disappearing and matches you with someone who can teach you before that knowledge is gone.</div></div>
<div class="entry" id="entry-act2-3" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x5e4cba09</span><span class="entry-type">healthpost.referral</span></div><div class="entry-json">{ urgency: "needs_treatment" }</div><div class="entry-note">&rarr; Walks you through a real medical triage checklist and sends a signed referral straight to a clinician when you need one.</div></div>
<div class="entry noevent" id="entry-act2-4" style="opacity:0;"><div class="entry-sig">&mdash; no event signed &mdash;</div><div class="entry-note">Helps you track your sleep rhythm without sunlight — from your own motion or a manual log, never shared, never used to ration anything.</div></div>
<div class="entry" id="entry-act2-5" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x773aef1c</span><span class="entry-type">theclimb.plan.propose</span></div><div class="entry-json">{ horizonPeriods: 1, surfaceNodeId: "surface" }</div><div class="entry-note">&rarr; Schedules who climbs to the surface and when, so the return doesn't turn into a crowd crush — ties break by a fair, public lottery.</div></div>
<div class="app-stack">
<div class="app-entry" id="entry-act2-0" style="opacity:0;">
<div class="app-label">Farms</div>
<div class="app-headline">Plans crops from real weather and power data.</div>
<div class="app-type">fairshare.contribution</div>
</div>
<div class="app-entry" id="entry-act2-1" style="opacity:0;">
<div class="app-label">Housing</div>
<div class="app-headline">Assigns rooms fairly — and remembers who got shorted.</div>
<div class="app-type">housing.space.report</div>
</div>
<div class="app-entry" id="entry-act2-2" style="opacity:0;">
<div class="app-label">Mentor</div>
<div class="app-headline">Matches you with a mentor before a skill is lost.</div>
<div class="app-type">mentor.match</div>
</div>
<div class="app-entry" id="entry-act2-3" style="opacity:0;">
<div class="app-label">Health Post</div>
<div class="app-headline">Triages symptoms, then signs a referral to a clinician.</div>
<div class="app-type">healthpost.referral</div>
</div>
<div class="app-entry" id="entry-act2-4" style="opacity:0;">
<div class="app-label">Light Clock</div>
<div class="app-headline">Tracks your sleep rhythm without sunlight — no sensor required.</div>
</div>
<div class="app-entry" id="entry-act2-5" style="opacity:0;">
<div class="app-label">The Climb</div>
<div class="app-headline">Schedules the climb to the surface so no crowd crush happens.</div>
<div class="app-type">theclimb.plan.propose</div>
</div>
<div class="ledger-cursor">&gt;<span class="blink">_</span></div>
</div>
</div>
<div class="stagetext left" id="text-act3" style="opacity:0;">
<div class="st-eyebrow">Act III</div>
<div class="st-title">Who Decides</div>
<div class="ledger-panel">
<div class="ledger-head"><span class="ledger-dot"></span>SIGNED EVENT LOG &middot; LIVE</div>
<div class="ledger-entries">
<div class="entry" id="entry-act3-0" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0xd41fa6c2</span><span class="entry-type">governance.qvBallot</span></div><div class="entry-json">{ proposalId: "well-pump", choice: "yes", credits: 9 }</div><div class="entry-note">&rarr; Keeps your community's votes and proposals running even if the network goes down — and heals back together once it's back up.</div></div>
<div class="entry" id="entry-act3-1" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x6c0efb3a</span><span class="entry-type">fairdraw.commit</span></div><div class="entry-json">{ drawId: "d7", commitHash: "9af2…" }</div><div class="entry-note">&rarr; Runs a lottery no one can rig — the result is locked in before it's ever revealed.</div></div>
<div class="entry" id="entry-act3-2" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x2f88c511</span><span class="entry-type">sky.morale.pulse</span></div><div class="entry-json">{ mood: "tense" }</div><div class="entry-note">&rarr; A shared mood board and an ambient day/night rhythm for everyone sheltering together — so the Hollow still feels alive.</div></div>
<div class="app-stack">
<div class="app-entry" id="entry-act3-0" style="opacity:0;">
<div class="app-label">Assembly</div>
<div class="app-headline">Keeps votes and lotteries running — network or not.</div>
<div class="app-type">governance.qvBallot</div>
</div>
<div class="app-entry" id="entry-act3-1" style="opacity:0;">
<div class="app-label">Fair Draw</div>
<div class="app-headline">Runs a lottery no one can rig.</div>
<div class="app-type">fairdraw.commit</div>
</div>
<div class="app-entry" id="entry-act3-2" style="opacity:0;">
<div class="app-label">Sky</div>
<div class="app-headline">A shared mood board for the whole shelter.</div>
<div class="app-type">sky.morale.pulse</div>
</div>
<div class="ledger-cursor">&gt;<span class="blink">_</span></div>
</div>
</div>
<div class="stagetext right" id="text-epilogue" style="opacity:0;">
<div class="st-eyebrow">Epilogue</div>
<div class="st-title">Trust, Made Verifiable</div>
<div class="ledger-panel">
<div class="ledger-head"><span class="ledger-dot"></span>SIGNED EVENT LOG &middot; LIVE</div>
<div class="ledger-entries">
<div class="entry" id="entry-epilogue-0" style="opacity:0;"><div class="entry-sig"><span class="entry-hash">0x11e3a9f0</span><span class="entry-type">wallet.transfer</span></div><div class="entry-json">{ from: "you", to: "hollow-commons-fund", amount: 10 }</div><div class="entry-note">&rarr; Every balance re-checks its own Ed25519 signature — nothing on faith.</div></div>
<div class="entry noevent" id="entry-epilogue-1" style="opacity:0;"><div class="entry-sig">&mdash; no event signed &mdash;</div><div class="entry-note">A mini-app installs straight to this device's registry — no gatekeeper, no signed event required.</div></div>
<div class="app-stack">
<div class="app-entry" id="entry-epilogue-0" style="opacity:0;">
<div class="app-label">Wallet</div>
<div class="app-headline">Every balance re-checks its own signature — nothing on faith.</div>
<div class="app-type">wallet.transfer</div>
</div>
<div class="app-entry" id="entry-epilogue-1" style="opacity:0;">
<div class="app-label">Upload</div>
<div class="app-headline">Any resident can ship a mini-app. No gatekeeper.</div>
</div>
<div class="ledger-cursor">&gt;<span class="blink">_</span></div>
</div>
</div>
<div class="assembly-frame" id="assembly-frame" style="opacity:0;">
<video class="assembly" id="vid-assembly" src="assets/assembly.mp4" data-start="168.108" data-media-start="0" data-duration="7.270" muted playsinline></video>
<video class="assembly" id="vid-assembly" src="assets/assembly.mp4" data-start="62.310" data-media-start="0" data-duration="7.270" muted playsinline></video>
</div>
<div class="stagetext top" id="text-assembly" style="opacity:0;">
<div class="st-eyebrow">Live Capture &middot; Two Devices</div>
@@ -266,7 +299,7 @@
<div class="lock-sub">One signed wallet, one shared record - every civic problem in the Hollow gets a real answer.</div>
</div>
</div>
<audio id="ambient" src="assets/ambient.mp3" data-start="0" data-media-start="0" data-duration="182.078" data-volume="0.3"></audio>
<audio id="ambient" src="assets/ambient.mp3" data-start="0" data-media-start="0" data-duration="76.28" data-volume="0.3"></audio>
</div>
<script>
@@ -302,31 +335,25 @@
tl.fromTo('#data .hook-cap', { scale: 0.5, opacity: 0 }, { scale: 1, opacity: 1, duration: 0.5, ease: 'back.out(2)' }, D.start + 4.8);
// ---------- FIELD PANELS (color journey) ----------
const STAGES = [{"id":"act1","start":9.1,"end":59.522,"frame":{"x":332,"y":0,"scale":0.9,"tilt":-7},"textSide":"left","entryAts":[2.63,14.459,26.764,38.593]},{"id":"act2","start":61.622,"end":128.308,"frame":{"x":-300,"y":0,"scale":0.84,"tilt":9},"textSide":"right","entryAts":[0,10.876,21.276,32.152,42.552,54.381]},{"id":"act3","start":130.408,"end":159.708,"frame":{"x":332,"y":0,"scale":0.9,"tilt":-9},"textSide":"left","entryAts":[0,10.876,19.376]},{"id":"epilogue","start":161.808,"end":168.608,"frame":{"x":-300,"y":0,"scale":0.84,"tilt":7},"textSide":"right","entryAts":[0.3,2.2]}];
const STAGES = [{"id":"act1","start":9.1,"end":20.41,"frame":{"x":332,"y":0,"scale":0.9,"tilt":-7},"textSide":"left","entryAts":[2.63,8.26,9.11,9.91]},{"id":"act2","start":22.51,"end":35.91,"frame":{"x":-300,"y":0,"scale":0.84,"tilt":9},"textSide":"right","entryAts":[0,0.9,4.6,6,9.1,9.9]},{"id":"act3","start":38.01,"end":53.91,"frame":{"x":332,"y":0,"scale":0.9,"tilt":-9},"textSide":"left","entryAts":[0,7.8,10.3]},{"id":"epilogue","start":56.01,"end":62.81,"frame":{"x":-300,"y":0,"scale":0.84,"tilt":7},"textSide":"right","entryAts":[0.3,2.2]}];
for (const s of STAGES) {
tl.fromTo('#field-' + s.id, { opacity: 0 }, { opacity: 1, duration: F, ease: 'power1.out' }, s.start - F);
tl.to('#field-' + s.id, { opacity: 0, duration: F, ease: 'power1.in' }, s.end - F);
}
// ---------- PHONE STAGE (per-act framing) ----------
const CLIPS = [{"key":"intro","start":9.1,"duration":2.63},{"key":"epilogue","start":161.808,"duration":6.8}];
const HOLDS = [{"id":"waterwatch","start":11.73,"dwell":0,"windowDur":11.829},{"id":"fairshare","start":23.559,"dwell":0,"windowDur":12.305},{"id":"tunnelsafety","start":35.864,"dwell":0,"windowDur":11.829},{"id":"findfamily","start":47.693,"dwell":0,"windowDur":11.829},{"id":"farms","start":61.622,"dwell":0,"windowDur":10.876},{"id":"housing","start":72.498,"dwell":0,"windowDur":10.4},{"id":"mentor","start":82.898,"dwell":0,"windowDur":10.876},{"id":"healthpost","start":93.774,"dwell":0,"windowDur":10.4},{"id":"lightclock","start":104.174,"dwell":0,"windowDur":11.829},{"id":"theclimb","start":116.003,"dwell":0,"windowDur":12.305},{"id":"qvballot","start":130.408,"dwell":0,"windowDur":10.876},{"id":"fairdraw","start":141.284,"dwell":0,"windowDur":8.5},{"id":"sky","start":149.784,"dwell":0,"windowDur":9.924}];
// Explicit opacity control for every screen-vid/hold-img layer: belt-and-
const CLIPS = [{"key":"intro","start":9.1,"duration":2.63},{"key":"waterwatch","start":11.73,"duration":5.63},{"key":"fairshare","start":17.36,"duration":0.85},{"key":"tunnelsafety","start":18.21,"duration":0.8},{"key":"findfamily","start":19.01,"duration":1.4},{"key":"farms","start":22.51,"duration":0.9},{"key":"housing","start":23.41,"duration":3.7},{"key":"mentor","start":27.11,"duration":1.4},{"key":"healthpost","start":28.51,"duration":3.1},{"key":"lightclock","start":31.61,"duration":0.8},{"key":"theclimb","start":32.41,"duration":3.5},{"key":"qvballot","start":38.01,"duration":7.8},{"key":"fairdraw","start":45.81,"duration":2.5},{"key":"sky","start":48.31,"duration":5.6},{"key":"epilogue","start":56.01,"duration":6.8}];
// Explicit opacity control for every screen-vid layer: belt-and-
// suspenders over hyperframes' own automatic data-start/data-duration
// windowing, which was observed to let a stale/adjacent element's frame
// bleed through once this composition grew past a dozen stacked video
// elements sharing a handful of source files. Each clip is visible ONLY
// for its own authored window; each hold image takes over the INSTANT its
// video's real dwell ends (same real moment, so the swap is invisible)
// and holds until that app's full window closes.
// for its own authored window and plays its FULL real length,
// continuously - no hold/freeze of any kind.
for (const c of CLIPS) {
tl.set('#vid-' + c.key, { opacity: 1 }, c.start);
tl.set('#vid-' + c.key, { opacity: 0 }, c.start + c.duration);
}
for (const h of HOLDS) {
tl.set('#hold-' + h.id, { opacity: 1 }, h.start + h.dwell);
tl.set('#hold-' + h.id, { opacity: 0 }, h.start + h.windowDur);
}
// The phone stage stays mounted the whole time; opaque overlays (chapters
// z30, sections z34, assembly z20) cover it except during the acts, so no
// per-act show/hide juggling is needed - just reposition the rig while the
@@ -336,16 +363,15 @@
tl.set('#phoneRig', { x: s.frame.x, y: s.frame.y, scale: s.frame.scale, rotationY: tilt }, Math.max(0, s.start - 0.25));
// Gentle camera push + tilt settle across the act so no footage frame is static.
tl.fromTo('#phoneRig', { scale: s.frame.scale, rotationY: tilt }, { scale: s.frame.scale * 1.03, rotationY: tilt * 0.35, duration: s.end - s.start, ease: 'none' }, s.start);
// Side text + signed-event ledger panel.
// Side text.
const dx = s.textSide === 'right' ? 40 : (s.textSide === 'left' ? -40 : 0);
const dy = s.textSide === 'top' ? -18 : 0;
tl.fromTo('#text-' + s.id, { opacity: 0, x: dx, y: dy }, { opacity: 1, x: 0, y: 0, duration: 0.6, ease: 'power2.out' }, s.start + 0.1);
tl.to('#text-' + s.id, { opacity: 0, duration: 0.45, ease: 'power2.in' }, s.end - F);
// Each ledger entry owns its own on-screen window, synced to when that
// specific mini-app is actually active in the footage (capture-manifest.json
// beats): a left-to-right scan-wipe reveal in, then a plain fade-out right
// before the NEXT entry's reveal begins - so at most one entry is ever on
// screen, never a stack of every app's entry piled up at once.
// Each app's callout owns its own on-screen window, synced exactly to
// when that app's real clip plays: a left-to-right scan-wipe reveal
// in, then a plain fade-out right before the NEXT app's reveal begins
// - so at most one app's text is ever on screen, never a stack.
for (let i = 0; i < s.entryAts.length; i++) {
const entrySel = '#entry-' + s.id + '-' + i;
const entryStart = s.start + s.entryAts[i];
@@ -356,14 +382,10 @@
tl.to(entrySel, { opacity: 0, duration: 0.3, ease: 'power2.in' }, nextStart - 0.3);
}
}
// Live blinking cursor, driven by the same paused timeline (never a
// wall-clock CSS @keyframes) so frame-by-frame rendering stays exact.
const blinkCycles = Math.max(1, Math.floor((s.end - s.start) * 2));
tl.to('#text-' + s.id + ' .ledger-cursor .blink', { opacity: 0, duration: 0.01, repeat: blinkCycles, yoyo: true, ease: 'steps(1)' }, s.start + 0.6);
}
// ---------- CHAPTER CARDS ----------
const CHAPTERS = [{"id":"ch-act1","start":6.5,"end":9.6},{"id":"ch-act2","start":59.022,"end":62.122},{"id":"ch-act3","start":127.808,"end":130.908},{"id":"ch-epi","start":159.208,"end":162.308}];
const CHAPTERS = [{"id":"ch-act1","start":6.5,"end":9.6},{"id":"ch-act2","start":19.91,"end":23.01},{"id":"ch-act3","start":35.41,"end":38.51},{"id":"ch-epi","start":53.41,"end":56.51}];
for (const c of CHAPTERS) {
tl.fromTo('#' + c.id, { opacity: 0 }, { opacity: 1, duration: F, ease: 'power2.out' }, c.start);
tl.to('#' + c.id, { opacity: 0, duration: F, ease: 'power2.in' }, c.end - F);
@@ -375,7 +397,7 @@
}
// ---------- ASSEMBLY (framed field + caption) ----------
const A = { start: 168.108, end: 175.378 };
const A = { start: 62.31, end: 69.58 };
// The phone rig is not full-bleed-covered by the assembly frame (unlike
// the chapter/section overlays), so hide it explicitly - otherwise the
// Epilogue's last phone position peeks through the field margins.
@@ -388,7 +410,7 @@
tl.to('#text-assembly', { opacity: 0, duration: 0.45, ease: 'power2.in' }, A.end - F);
// ---------- RESULT WALL + LOCKUP ----------
const W = { start: 174.878, end: 181.878 };
const W = { start: 69.08, end: 76.08 };
tl.fromTo('#wall', { opacity: 0 }, { opacity: 1, duration: F, ease: 'power2.out' }, W.start - F);
tl.to('#wall', { opacity: 0, duration: F, ease: 'power2.in' }, W.end - F + 0.2);
// Slow continuous push on the whole wall/lockup so the closing hold is
+3 -3
View File
@@ -2,16 +2,16 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Commons &middot; OpenMotion promo (redesign 3)</title>
<title>The Commons &middot; OpenMotion promo (redesign 5)</title>
<script src="assets/gsap.min.js"></script>
<style>body{margin:0;background:#000}#main{position:relative;width:1920px;height:1080px;overflow:hidden}</style>
</head>
<body>
<div id="main" data-composition-id="main" data-start="0" data-duration="182.078" data-width="1920" data-height="1080" data-fps="30">
<div id="main" data-composition-id="main" data-start="0" data-duration="76.28" data-width="1920" data-height="1080" data-fps="30">
<div id="promo" class="clip"
data-composition-id="promo"
data-composition-src="compositions/promo.html"
data-start="0" data-duration="182.078" data-track-index="0"
data-start="0" data-duration="76.28" data-track-index="0"
data-width="1920" data-height="1080"></div>
</div>
<script>
Binary file not shown.
+78 -7
View File
@@ -102,11 +102,32 @@ export const WAVE1_FIX_CALLOUTS = [
// so post-action reading holds are kept modest - long enough to read a
// settled screen, short enough to keep the tour tight.
// ---------------------------------------------------------------------
const SETTLE = 650; // brief settle after a quick action
const READ = 950; // reading hold on a meaningful beat
const SETTLE = 900; // brief settle after a quick action
const READ = 1700; // reading hold on a meaningful beat
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
// ---------------------------------------------------------------------
// Per-mini-app real dwell (REDESIGN: longer real footage, no freeze-frame).
// Each of the 13 mini-apps now gets its own api.mark() pair (app-<id>-start/
// app-<id>-end) so capture.mjs slices a DEDICATED real clip per app, long
// enough (~8-12s) to read a short blurb at normal pace. `linger()` fills any
// remaining real time with genuine, visible motion on the REAL rendered
// page - alternating scroll pulses (visible wherever a form/screen overflows
// the 414x896 viewport) plus a hover over the always-present "Back to home"
// link (a real CSS :hover transition) - never a held static frame.
// ---------------------------------------------------------------------
async function linger(page, ms) {
const backLink = page.getByRole("link", { name: "Back to home" });
const steps = Math.max(1, Math.round(ms / 550));
const per = ms / steps;
for (let i = 0; i < steps; i++) {
await page.mouse.wheel(0, i % 2 === 0 ? 140 : -140).catch(() => {});
if (i === 1) await backLink.hover({ timeout: 500 }).catch(() => {});
await sleep(per);
}
}
// ---------------------------------------------------------------------
// Interaction pacing. The OpenMotion capture is REAL-TIME (no recast
// speed-up in this pipeline). Playwright's native .fill() populates a whole
@@ -118,9 +139,9 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
// character-by-character so the multi-field forms are legibly followable.
// Idle/poll waits (waitFor, the SETTLE/READ reading holds) are untouched.
// ---------------------------------------------------------------------
const TAP_HOLD = 80; // brief hold after a tap so its result is not a single frame
const FIELD_HOLD = 110; // brief hold after a field is filled
const KEYSTROKE = 42; // per-character typing delay (visible typing on form fills)
const TAP_HOLD = 150; // brief hold after a tap so its result is not a single frame
const FIELD_HOLD = 220; // brief hold after a field is filled
const KEYSTROKE = 85; // per-character typing delay (visible typing on form fills)
async function tap(locator) {
await locator.click();
@@ -146,7 +167,7 @@ async function setValue(locator, value) {
await sleep(FIELD_HOLD);
}
export async function waitFor(fn, label, timeoutMs = 20000) {
export async function waitFor(fn, label, timeoutMs = 35000) {
const start = Date.now();
let lastErr;
while (Date.now() - start < timeoutMs) {
@@ -204,10 +225,21 @@ export async function runTour(page, api, APP_URL) {
await sleep(READ);
// --- Admin: Load Hollow demo seed (real signed seed.* events) ---
// NOTE: ShellLayout auto-seeds the Hollow demo fixture on boot-mount
// whenever the Event Log is empty (src/shell/ShellLayout.tsx), so by the
// time this page visits /admin the fixture has typically already been
// loaded by the home-page visit above - the button's real status text is
// then "Demo data already loaded - no new events appended.", not the
// first-time "Demo data loaded" text. Both are real, successful outcomes
// of the same idempotent seed path (`loadHollowDemoFixture()`); accept
// either so this beat isn't a flaky race against the boot-time auto-seed.
await page.goto(`${APP_URL}/admin`, { waitUntil: "load" });
await tap(page.getByRole("button", { name: "Load Hollow demo" }));
await waitFor(
async () => ((await page.getByTestId("demo-load-status").textContent()) ?? "").includes("Demo data loaded"),
async () => {
const status = (await page.getByTestId("demo-load-status").textContent()) ?? "";
return status.includes("Demo data loaded") || status.includes("already loaded");
},
"demo seed load status",
);
await beat("admin-seed", "Load Hollow demo clicked - signed seed.* events appended");
@@ -223,6 +255,7 @@ export async function runTour(page, api, APP_URL) {
// =================================================================
// --- Water Watch: GAP-8 false-alert fix + genuine corroborated detection ---
await openTile(page, "Water Watch");
await mark("app-waterwatch-start");
async function reportReading(sensorId, value) {
await type(page.getByTestId("report-reading-sensor"), sensorId);
await type(page.getByTestId("report-reading-value"), String(value));
@@ -266,20 +299,26 @@ export async function runTour(page, api, APP_URL) {
);
await beat("waterwatch-localization", `${CO_LOCALIZATION}, with a live per-tap arrival countdown for the selected tap`);
await sleep(READ);
await linger(page, 1500);
await mark("app-waterwatch-end");
// --- Fair Share: water allocation re-solved ---
await backHome(page);
await openTile(page, "Fair Share");
await mark("app-fairshare-start");
await waitFor(async () => {
const text = (await page.getByTestId("tile-water-allocation").textContent()) ?? "";
return text.trim().length > 0 && text !== "No allocation yet";
}, "Fair Share water tile shows a real re-solved allocation");
await beat("fairshare-water", "Fair Share's water tile reflects the honesty-anchor chain's re-solved CEEI allocation");
await sleep(READ);
await linger(page, 6000);
await mark("app-fairshare-end");
// --- Tunnel Safety: real hazard report ---
await backHome(page);
await openTile(page, "Tunnel Safety");
await mark("app-tunnelsafety-start");
await tap(page.getByTestId("tunnel-safety-report-submit"));
await waitFor(
async () => ((await page.getByTestId("tunnel-safety-report-status-text").textContent()) ?? "").includes("Hazard reported"),
@@ -287,10 +326,13 @@ export async function runTour(page, api, APP_URL) {
);
await beat("tunnelsafety", "real hazard report appended for the selected corridor segment");
await sleep(READ);
await linger(page, 6500);
await mark("app-tunnelsafety-end");
// --- Find Family: on-device PSI search ---
await backHome(page);
await openTile(page, "Find Family");
await mark("app-findfamily-start");
await type(page.getByTestId("findfamily-search-input"), "Ana Ramirez");
await tap(page.getByTestId("findfamily-search-button"));
await waitFor(
@@ -301,6 +343,8 @@ export async function runTour(page, api, APP_URL) {
);
await beat("findfamily", "on-device private-set-intersection search resolved - the query never left the device");
await sleep(READ);
await linger(page, 6000);
await mark("app-findfamily-end");
await backHome(page);
await mark("act1End"); // Act II title card goes here
@@ -310,6 +354,7 @@ export async function runTour(page, api, APP_URL) {
// =================================================================
// --- Farms -> Fair Share food edge ---
await openTile(page, "Farms");
await mark("app-farms-start");
await setValue(page.getByTestId("farms-temp-date"), "2026-05-01");
await type(page.getByTestId("farms-temp-tmin"), "10");
await type(page.getByTestId("farms-temp-tmax"), "30");
@@ -328,6 +373,8 @@ export async function runTour(page, api, APP_URL) {
);
await beat("farms-forecast", CO_FARMS);
await sleep(READ);
await linger(page, 3000);
await mark("app-farms-end");
await backHome(page);
await openTile(page, "Fair Share");
@@ -341,6 +388,7 @@ export async function runTour(page, api, APP_URL) {
// --- Housing ---
await backHome(page);
await openTile(page, "Housing");
await mark("app-housing-start");
await page.getByTestId("housing-assigned-slot").waitFor({ state: "visible" });
await beat("housing", "Housing shows a real assigned room slot from the seeded assignment cycle, not a permanent empty state");
await sleep(SETTLE);
@@ -362,10 +410,13 @@ export async function runTour(page, api, APP_URL) {
);
await beat("housing-run-cycle", CO_HOUSING + " against the current fairness-debt ledger");
await sleep(READ);
await linger(page, 2000);
await mark("app-housing-end");
// --- Mentor ---
await backHome(page);
await openTile(page, "Mentor");
await mark("app-mentor-start");
await page.getByTestId("mentor-card-well-repair").waitFor({ state: "visible" });
await beat("mentor", "Mentor shows a real at-risk skill card (deduped dependents count) from the seeded skill-holder data");
await sleep(SETTLE);
@@ -374,10 +425,13 @@ export async function runTour(page, api, APP_URL) {
await waitFor(async () => (await page.getByTestId("mentor-matches").count()) > 0, "the apprentice-match engine reacts to the new review");
await beat("mentor-apprentice-match", "rating yourself 'Again' created a real apprentice need; the real matching engine scores the mentor pool honestly");
await sleep(READ);
await linger(page, 5000);
await mark("app-mentor-end");
// --- Health Post: WHO-IMCI triage + referral ---
await backHome(page);
await openTile(page, "Health Post");
await mark("app-healthpost-start");
await type(page.getByTestId("triage-age-input"), "24");
await tap(page.getByTestId("triage-hasCough-yes"));
await type(page.getByTestId("triage-breathsPerMinute-input"), "45");
@@ -400,6 +454,8 @@ export async function runTour(page, api, APP_URL) {
await page.getByTestId("triage-referral-sent").waitFor({ state: "visible" });
await beat("healthpost-send-to-clinician", "the real 'Send to clinician' button posted a signed healthpost.referral event to the clinician queue");
await sleep(READ);
await linger(page, 1000);
await mark("app-healthpost-end");
// --- Light Clock: manual sleep/wake log (honest no-sensor fallback) ---
await page.evaluate(() => {
@@ -407,6 +463,7 @@ export async function runTour(page, api, APP_URL) {
});
await backHome(page);
await openTile(page, "Light Clock");
await mark("app-lightclock-start");
await tap(page.getByTestId("lightclock-enable-sensor"));
await page.getByTestId("lightclock-manual-hours").waitFor({ state: "visible" });
await beat("lightclock-manual-fallback", "no motion sensor available - the real sensor-first/manual-fallback contract switched to the manual log form");
@@ -417,10 +474,13 @@ export async function runTour(page, api, APP_URL) {
await tap(page.getByTestId("lightclock-manual-compute"));
await beat("lightclock", "manual sleep/wake log entry added and circadian status computed");
await sleep(READ);
await linger(page, 4500);
await mark("app-lightclock-end");
// --- The Climb: schedule inputs feeding the min-cost-flow engine ---
await backHome(page);
await openTile(page, "The Climb");
await mark("app-theclimb-start");
await type(page.getByTestId("theclimb-shaft-id"), "shaft-1");
await type(page.getByTestId("theclimb-shaft-from"), "D1");
await type(page.getByTestId("theclimb-shaft-to"), "surface");
@@ -437,6 +497,8 @@ export async function runTour(page, api, APP_URL) {
await tap(page.getByTestId("theclimb-capacity-add"));
await beat("theclimb", "real shaft/wave-demand/surface-capacity schedule fed to the min-cost-flow congestion engine");
await sleep(READ);
await linger(page, 1500);
await mark("app-theclimb-end");
await backHome(page);
await mark("act2End"); // Act III title card goes here
@@ -446,6 +508,7 @@ export async function runTour(page, api, APP_URL) {
// =================================================================
// --- Assembly (single-user half): seeded roster/proposal + create/vote + QV ---
await openTile(page, "Assembly");
await mark("app-qvballot-start");
await page.getByTestId("assembly-sync-toggle").waitFor({ state: "visible" });
await beat("assembly-seeded", "demo-seeded roster (Aria, Kade) and an open proposal visible cold, no manual setup");
await sleep(SETTLE);
@@ -485,10 +548,13 @@ export async function runTour(page, api, APP_URL) {
await beat("assembly-qv-tally", CO_QV);
await sleep(READ);
}
await linger(page, 1000);
await mark("app-qvballot-end");
// --- Fair Draw: real commit-reveal-verify -> real wallet credit ---
await backHome(page);
await openTile(page, "Fair Draw");
await mark("app-fairdraw-start");
await tap(page.getByRole("button", { name: "Start Draw" }));
await page.getByTestId("reveal-draw-commit-hash").waitFor({ state: "visible" });
const commitHash = (await page.getByTestId("reveal-draw-commit-hash").textContent())?.trim();
@@ -505,6 +571,8 @@ export async function runTour(page, api, APP_URL) {
await waitFor(async () => (await walletBalanceText(page)) !== undefined, "wallet balance chip present on fair-draw route");
await beat("fairdraw-wallet-live", "WalletCard balance updates live on the same route, no reload, from the real Fair Draw win");
await sleep(SETTLE);
await linger(page, 6000);
await mark("app-fairdraw-end");
await tap(page.getByRole("link", { name: "Back to home" }));
await page.getByTestId("history-entry").first().waitFor({ state: "visible" });
@@ -514,6 +582,7 @@ export async function runTour(page, api, APP_URL) {
// --- Sky: memory-wall post + double-click guard (GAP-20) + mood pulse ---
// Already on home (fairdraw-history-row click landed here); no backHome.
await openTile(page, "Sky");
await mark("app-sky-start");
const skyMessage = "The sky over the Hollow turned amber tonight.";
await type(page.getByTestId("sky-memory-input"), skyMessage);
const countBefore = await page.getByTestId("sky-memory-list").locator("li").count().catch(() => 0);
@@ -534,6 +603,8 @@ export async function runTour(page, api, APP_URL) {
await waitFor(async () => (await page.getByTestId("sky-mood-latest").count()) > 0, "mood pulse posts and the latest-pulse readout updates");
await beat("sky-mood-pulse", "a real signed mood/morale pulse was posted - the shelter's honest mood is now visible, aggregated from real signed events");
await sleep(READ);
await linger(page, 3000);
await mark("app-sky-end");
// Short calm end-hold on the posted mood, then close out Act III.
await sleep(500);
+27
View File
@@ -307,6 +307,33 @@ describe("solveFarmsPlantingOptimizer - energy budget", () => {
expect(result.insufficientData).toBe(false);
expect((result as FarmsPlantingSolveResult).status).toBe("infeasible");
});
it("regression: a zero-kWh crop (no grow-light energy needed) under a positive energy budget is still optimal, not falsely infeasible", () => {
// Every real decision variable's "energy" coefficient is 0 when every
// entered crop has kWhPerM2: 0 (a legitimate real input - a crop grown
// under natural/ambient conditions needs no grow-light power at all).
// `javascript-lp-solver`'s simplex implementation falsely reports the
// whole model infeasible when a constraint row's coefficients are all
// zero but its max is still positive, even though `0 <= budget` always
// holds. `solveFarmsPlantingOptimizer` must recognize this case and
// solve without emitting a constraint no real variable can violate.
const gdd = computeGdd(sampleTemps, 10);
const crops: CropMaturityWindow[] = [{ cropId: "wheat", maturityGdd: 20, yieldKgPerM2: 2, kWhPerM2: 0 }];
for (const energyBudgetKwh of [0.5, 5, 1000]) {
const result = solveFarmsPlantingOptimizer({ gdd, plots, crops, energyBudgetKwh });
expect(result.insufficientData).toBe(false);
const solved = result as FarmsPlantingSolveResult;
expect(solved.status).toBe("optimal");
if (solved.status !== "optimal") throw new Error("unreachable");
// All 150 m^2 goes to wheat - the energy budget never binds since no
// variable draws any energy.
const totalAreaPlanted = solved.schedule.reduce((sum, entry) => sum + entry.areaM2, 0);
expect(totalAreaPlanted).toBeCloseTo(150, 6);
expect(solved.totalForecastYieldKg).toBeCloseTo(300, 6);
expect(solved.totalEnergyKwh).toBe(0);
}
});
});
describe("applyFarmsForecastToFairshare", () => {
+16 -2
View File
@@ -258,6 +258,19 @@ export function solveFarmsPlantingOptimizer(
}
}
// Only constrain on the energy budget when at least one eligible crop
// genuinely draws grow-light power (kWhPerM2 > 0). A crop that needs no
// grow-light energy at all (a real, legitimate input - e.g. a plant grown
// entirely under natural/ambient conditions) would otherwise give every
// decision variable an all-zero "energy" coefficient while the constraint
// row itself still carries a positive max; `javascript-lp-solver`'s
// simplex implementation mishandles that degenerate all-zero-coefficient
// row and reports the whole model `infeasible` even though a zero-energy
// plan trivially satisfies any non-negative budget. Omitting an energy
// constraint that no variable can ever violate is mathematically
// equivalent to keeping it - never a looser/different real result.
const needsEnergyConstraint = energyBudgetKwh !== undefined && eligibleCrops.some((crop) => crop.kWhPerM2 > 0);
let nextIndex = 0;
for (const plot of plots) {
for (const crop of eligibleCrops) {
@@ -269,9 +282,10 @@ export function solveFarmsPlantingOptimizer(
if (crop.maxAreaM2 !== undefined) {
variable[`crop:${crop.cropId}`] = 1;
}
if (energyBudgetKwh !== undefined) {
if (needsEnergyConstraint) {
if (constraints["energy"] === undefined) {
constraints["energy"] = { max: energyBudgetKwh };
// `needsEnergyConstraint` is true only when `energyBudgetKwh !== undefined`.
constraints["energy"] = { max: energyBudgetKwh as number };
}
variable["energy"] = crop.kWhPerM2;
}