diff --git a/public/assets/models3d/bmu-assembly.glb b/public/assets/models3d/bmu-assembly.glb index 73b6779..9fe17dd 100644 Binary files a/public/assets/models3d/bmu-assembly.glb and b/public/assets/models3d/bmu-assembly.glb differ diff --git a/src/components/WebGLBackground.tsx b/src/components/WebGLBackground.tsx index 79ef2d1..71981c2 100644 --- a/src/components/WebGLBackground.tsx +++ b/src/components/WebGLBackground.tsx @@ -361,28 +361,26 @@ function CameraLight() { useFrame(() => { if (!lightRef.current) return; lightRef.current.position.copy(camera.position); - lightRef.current.position.y += 15; + lightRef.current.position.y += 0.03; }); return ( - + ); } /* ---------- Camera — orbits around PCB, zooms on scroll ---------- */ -// PCB bounds: X[-74,81] Y[-43,63] Z[-17,150] mm. Center ≈ (4, 10, 66). -// After rotation -π/2 on X, the Y/Z swap: model Y→scene -Z, model Z→scene Y. -// So in scene coords, board center ≈ (4, 66, -10), extends ~155mm in Y (height). -const BOARD_CENTER = [4, 66, -10]; +// STEP units = METERS. Board ~0.17m wide, ~0.10m tall. After -π/2 X rotation: +// model Y→scene -Z, model Z→scene Y. Board center ≈ (0, 0.04, 0). const CAMERA_STOPS = [ - { scroll: 0.00, pos: [0, 250, 120], look: [4, 66, -10] }, // Overview — sees full assembly - { scroll: 0.12, pos: [50, 140, 20], look: [40, 80, -10] }, // MCU zone (top-right) - { scroll: 0.28, pos: [-40, 140, 20], look: [-30, 80, -10] }, // Analog zone (top-left) - { scroll: 0.42, pos: [40, 40, -20], look: [30, 20, -10] }, // Power zone (bottom-right) - { scroll: 0.56, pos: [-40, 40, -20], look: [-30, 20, -10] }, // Formation zone (bottom-left) - { scroll: 0.70, pos: [0, 120, 40], look: [0, 100, -10] }, // Missions zone (mid) - { scroll: 0.85, pos: [4, 80, 5], look: [4, 66, -10] }, // Contact (center close) - { scroll: 1.00, pos: [0, 300, 150], look: [4, 66, -10] }, // Pull back + { scroll: 0.00, pos: [0, 0.3, 0.2], look: [0, 0.04, 0] }, // Overview + { scroll: 0.12, pos: [0.06, 0.12, 0.02], look: [0.04, 0.04, 0] }, // MCU (right) + { scroll: 0.28, pos: [-0.06, 0.12, 0.02], look: [-0.04, 0.04, 0] }, // Analog (left) + { scroll: 0.42, pos: [0.05, 0.08, -0.03], look: [0.03, 0.04, -0.02] }, // Power + { scroll: 0.56, pos: [-0.05, 0.08, -0.03], look: [-0.03, 0.04, -0.02] }, // Formation + { scroll: 0.70, pos: [0, 0.15, 0.05], look: [0, 0.06, 0] }, // Missions + { scroll: 0.85, pos: [0, 0.08, 0.01], look: [0, 0.04, 0] }, // Contact (close) + { scroll: 1.00, pos: [0, 0.4, 0.25], look: [0, 0.04, 0] }, // Pull back ]; function OrbitCamera() { @@ -405,10 +403,10 @@ function OrbitCamera() { const t = range > 0 ? (s - a.scroll) / range : 0; const ease = t * t * (3 - 2 * t); - const tx = a.pos[0] + (b.pos[0] - a.pos[0]) * ease + pointer.x * 20; - const ty = a.pos[1] + (b.pos[1] - a.pos[1]) * ease + pointer.y * 8; + const tx = a.pos[0] + (b.pos[0] - a.pos[0]) * ease + pointer.x * 0.03; + const ty = a.pos[1] + (b.pos[1] - a.pos[1]) * ease + pointer.y * 0.01; const tz = a.pos[2] + (b.pos[2] - a.pos[2]) * ease; - const lx = a.look[0] + (b.look[0] - a.look[0]) * ease + pointer.x * 5; + const lx = a.look[0] + (b.look[0] - a.look[0]) * ease + pointer.x * 0.005; const ly = a.look[1] + (b.look[1] - a.look[1]) * ease; const lz = a.look[2] + (b.look[2] - a.look[2]) * ease; @@ -467,18 +465,18 @@ export default function WebGLBackground() { aria-hidden="true" > - + - - - + + +