feat: floodlit roadside billboard carries the selected-builds case studies

This commit is contained in:
2026-10-11 07:09:31 +03:00
parent 19f3ce79e6
commit d71b0ecfd4
31 changed files with 1216 additions and 6 deletions

View File

@@ -11,6 +11,25 @@ export interface SceneInstrumentationSnapshot {
clearColors: string[];
unhandledRejections: string[];
signFrames: SignFrameInstrumentation[];
/** DRIVE-IN: one entry per billboard state change (portfolio-billboard-frame, test builds only). */
billboardFrames: BillboardFrameInstrumentation[];
}
export interface BillboardFrameInstrumentation {
now: number;
activeSectionId: string;
direction: number;
rise: number;
z: number;
progress: { activeProjectId: string | null; index: number; t: number; direction: number };
shown: string | null;
lit: number;
floods: [number, number];
zoom: number;
nudge: number;
flickers: number;
shimmers: number;
textures: number;
}
export interface SignFrameInstrumentation {
@@ -60,6 +79,7 @@ export async function installSceneInstrumentation(page: Page): Promise<void> {
clearColors: [],
unhandledRejections: [],
signFrames: [],
billboardFrames: [],
animationFrameIds: new Set<number>(),
audioContexts: [],
};
@@ -166,6 +186,11 @@ export async function installSceneInstrumentation(page: Page): Promise<void> {
if (!detail || state.signFrames.length >= 600) return;
state.signFrames.push(structuredClone(detail));
});
window.addEventListener('portfolio-billboard-frame', (event) => {
const detail = (event as CustomEvent<BillboardFrameInstrumentation>).detail;
if (!detail || state.billboardFrames.length >= 600) return;
state.billboardFrames.push(structuredClone(detail));
});
});
}
@@ -182,6 +207,7 @@ export async function readSceneInstrumentation(page: Page): Promise<SceneInstrum
clearColors: [...state.clearColors],
unhandledRejections: [...state.unhandledRejections],
signFrames: state.signFrames.map((frame) => structuredClone(frame)),
billboardFrames: state.billboardFrames.map((frame) => structuredClone(frame)),
};
});
}