From 429520d6c1eecb5729f45a18642b317f353857d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Tue, 28 Apr 2026 15:35:44 +0200 Subject: [PATCH] fix(3d): caption tiles below media plane MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plane was 1.9x1.425 — at media zoom Z=-0.5 it filled the entire viewport, so any tile inside the card group overlapped the image. Shrink plane to 1.2x0.9 (still 4:3) so it occupies ~60% viewport vertical, leaving room below. Move cas tile localOffset from (0, 0, -0.7) to (0, 0.5, 0): at full explode the mosfet rotation is [0, 0, pi] which sends local +Y -> world -Y -> screen down. So local Y +0.5 places tile clearly below plane bottom in screen space. --- src/components/BmuViewer.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/BmuViewer.tsx b/src/components/BmuViewer.tsx index da8bd16..f6b066e 100644 --- a/src/components/BmuViewer.tsx +++ b/src/components/BmuViewer.tsx @@ -155,13 +155,13 @@ const PCB_LABELS: PcbLabel[] = [ { section: 'exp-consulting', cardIndex: 0, localOffset: [0.3, 0.005, -0.45], title: 'Consulting & Formation', sub: 'Audit · Transfert · Pédagogie · Projet' }, // 6-9. CAS — les 4 tuiles visibles en même temps, sous l image/video sur la face bottom des mosfets - { section: 'cas', cardIndex: 2, localOffset: [0.0, 0.0, -0.7], + { section: 'cas', cardIndex: 2, localOffset: [0.0, 0.5, 0.0], title: 'Industries créatives', sub: 'Audio embarqué · Batterie LiFePO4 · KXKM' }, - { section: 'cas', cardIndex: 3, localOffset: [0.0, 0.0, -0.7], + { section: 'cas', cardIndex: 3, localOffset: [0.0, 0.5, 0.0], title: 'Industrie', sub: 'Production V3.2 · KXKM ESP32 → STM32F070' }, - { section: 'cas', cardIndex: 4, localOffset: [0.0, 0.0, -0.7], + { section: 'cas', cardIndex: 4, localOffset: [0.0, 0.5, 0.0], title: 'Formation', sub: 'PCB · KiCad · µC' }, - { section: 'cas', cardIndex: 5, localOffset: [0.0, 0.0, -0.7], + { section: 'cas', cardIndex: 5, localOffset: [0.0, 0.5, 0.0], title: 'Service', sub: 'Mise en service · Maintenance · Support terrain' }, // 9. Conception — Mosfet #1 (card 2) { section: 'formats', cardIndex: 2, localOffset: [0.0, 0.005, 0.0], @@ -276,8 +276,8 @@ function PcbVideoMesh({ offset, src, visible }: { const videoRef = useRef(null); const texRef = useRef(null); - // Plane size in 4:3 landscape; covers center of the mosfet bottom face - const planeW = 1.9, planeH = planeW / MEDIA_ASPECT; + // Plane size in 4:3 landscape, sized to leave vertical room for caption tile below + const planeW = 1.2, planeH = planeW / MEDIA_ASPECT; useEffect(() => { const video = document.createElement('video'); @@ -353,7 +353,7 @@ function PcbCarouselMesh({ offset, visible }: { const textures = useRef([]); const [idx, setIdx] = useState(0); const autoTimer = useRef(0); - const planeW = 1.9, planeH = planeW / MEDIA_ASPECT; + const planeW = 1.2, planeH = planeW / MEDIA_ASPECT; useEffect(() => { const loader = new THREE.TextureLoader();