feat: integrate the cinematic nightdrive scene
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user