From fa399b303ccd3f27bef60f123e6a5cf2f765e693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Goszczy=C5=84ski?= Date: Wed, 19 Mar 2025 14:50:14 +0100 Subject: [PATCH] fix: resize hud --- apps/www/components/LaunchWeek/14/TicketLayout.tsx | 2 +- apps/www/components/LaunchWeek/14/scenes/HUDScene.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/www/components/LaunchWeek/14/TicketLayout.tsx b/apps/www/components/LaunchWeek/14/TicketLayout.tsx index 7552f62dc83..19bf2b2a69f 100644 --- a/apps/www/components/LaunchWeek/14/TicketLayout.tsx +++ b/apps/www/components/LaunchWeek/14/TicketLayout.tsx @@ -17,7 +17,7 @@ const TicketLayoutCanvasCorner = ({ className }: { className?: string }) => { export const TicketLayoutCanvas = ({ children }: { children: ReactNode }) => { return ( -
+
diff --git a/apps/www/components/LaunchWeek/14/scenes/HUDScene.ts b/apps/www/components/LaunchWeek/14/scenes/HUDScene.ts index c1ba44ee859..10f6f7546de 100644 --- a/apps/www/components/LaunchWeek/14/scenes/HUDScene.ts +++ b/apps/www/components/LaunchWeek/14/scenes/HUDScene.ts @@ -545,7 +545,12 @@ class HUDScene implements BaseScene { } private repositionHudElements(): void { - if (!this.hudGroup) return + if (!this.hudGroup || !this.hudMesh) return + + // Update the plane geometry with new dimensions + this.hudMesh.geometry.dispose(); // Dispose of the old geometry + this.hudPlane = new THREE.PlaneGeometry(this.width, this.height); + this.hudMesh.geometry = this.hudPlane; } private getSize(num: number, axis: 'y' | 'x') {