From 857a84005962e48610f83b6b37496ac9372de423 Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Wed, 15 Jul 2026 18:17:11 +0530 Subject: [PATCH] fix: adjust storefront door coordinates and pivot variables to align door swing perfectly with the new high-res facade texture --- src/components/EntranceExperience.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/EntranceExperience.tsx b/src/components/EntranceExperience.tsx index b6371e2..7ba5fd3 100644 --- a/src/components/EntranceExperience.tsx +++ b/src/components/EntranceExperience.tsx @@ -27,7 +27,7 @@ const facadeFragmentShader = ` void main() { vec4 col = texture2D(uTexture, vUv); // Discard double doors in center of storefront - if (vUv.x >= 0.468 && vUv.x <= 0.532 && vUv.y >= 0.15 && vUv.y <= 0.50) { + if (vUv.x >= 0.46 && vUv.x <= 0.54 && vUv.y >= 0.10 && vUv.y <= 0.52) { discard; } gl_FragColor = vec4(col.rgb, col.a * uOpacity); @@ -40,7 +40,7 @@ const leftDoorFragmentShader = ` varying vec2 vUv; void main() { // Crop texture to left door leaf boundaries - vec2 uv = vec2(0.468 + vUv.x * 0.032, 0.15 + vUv.y * 0.35); + vec2 uv = vec2(0.46 + vUv.x * 0.04, 0.10 + vUv.y * 0.42); vec4 col = texture2D(uTexture, uv); gl_FragColor = vec4(col.rgb, col.a * uOpacity); } @@ -52,7 +52,7 @@ const rightDoorFragmentShader = ` varying vec2 vUv; void main() { // Crop texture to right door leaf boundaries - vec2 uv = vec2(0.50 + vUv.x * 0.032, 0.15 + vUv.y * 0.35); + vec2 uv = vec2(0.50 + vUv.x * 0.04, 0.10 + vUv.y * 0.42); vec4 col = texture2D(uTexture, uv); gl_FragColor = vec4(col.rgb, col.a * uOpacity); } @@ -92,11 +92,11 @@ function CinematicFlight({ progress }: { progress: number }) { const planeW = planeH * aspect; // Door dimensions matching facade coordinate percentages - const dw = 0.032 * planeW; - const dh = 0.35 * planeH; - const doorY = -0.175 * planeH; - const leftHingeX = -0.032 * planeW; - const rightHingeX = 0.032 * planeW; + const dw = 0.04 * planeW; + const dh = 0.42 * planeH; + const doorY = -0.19 * planeH; + const leftHingeX = -0.04 * planeW; + const rightHingeX = 0.04 * planeW; const extGroupRef = useRef(null); const intMeshRef = useRef(null);