mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
fix: resize hud
This commit is contained in:
1 parent
282f34dce1
commit
fa399b303c
2 files changed
+7
-2
No files matched your search
@@ -17,7 +17,7 @@ const TicketLayoutCanvasCorner = ({ className }: { className?: string }) => {
|
||||
|
||||
export const TicketLayoutCanvas = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<div className="relative w-full aspect-[1.5841584158] border border-neutral-600">
|
||||
<div className="relative w-full h-[397px] lg:h-auto lg:aspect-[1.5841584158] border border-neutral-600">
|
||||
<TicketLayoutCanvasCorner className="top-[-1px] left-[-1px] -rotate-90"></TicketLayoutCanvasCorner>
|
||||
<TicketLayoutCanvasCorner className="top-[-1px] right-[-1px]"></TicketLayoutCanvasCorner>
|
||||
<TicketLayoutCanvasCorner className="bottom-[-1px] left-[-1px] rotate-180"></TicketLayoutCanvasCorner>
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in new issue
Block a user