feat: floodlit roadside billboard carries the selected-builds case studies
This commit is contained in:
@@ -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)),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user