feat: integrate the cinematic nightdrive scene

This commit is contained in:
2026-09-02 15:14:19 +03:00
parent e4c832356b
commit 8deb56ed0c
8 changed files with 257 additions and 55 deletions

View File

@@ -78,13 +78,23 @@ export async function installSceneInstrumentation(page: Page): Promise<void> {
}, { once: true });
const nativeFillText = CanvasRenderingContext2D.prototype.fillText;
const routeLabels = new Set([
'Start',
'Profile',
'Experience',
'Infrastructure',
'Selected builds',
'Additional work',
'Toolkit',
'Contact',
]);
CanvasRenderingContext2D.prototype.fillText = function fillText(
text: string,
x: number,
y: number,
maxWidth?: number,
): void {
if (/^0[0-7] \/ /u.test(text)) state.routeLabelsDrawn.push(text);
if (routeLabels.has(text)) state.routeLabelsDrawn.push(text);
if (maxWidth === undefined) nativeFillText.call(this, text, x, y);
else nativeFillText.call(this, text, x, y, maxWidth);
};