diff --git a/js/intro-scene.js b/js/intro-scene.js index 113124d..ba5206d 100644 --- a/js/intro-scene.js +++ b/js/intro-scene.js @@ -125,21 +125,21 @@ function tick() { root.style.setProperty('--mx', ((mouse.px - 0.5) * 2).toFixed(4)); root.style.setProperty('--my', ((mouse.py - 0.5) * 2).toFixed(4)); - /* Trajectoire droite → gauche : - - p = 0 → entre par la droite (hors champ) - - p = 0.5 → traverse au centre haut - - p = 1 → sort par la gauche (hors champ) + /* Trajectoire droite → gauche, en montée : + - p = 0 → entre par la droite (légèrement bas) + - p = 0.5 → traverse au centre, en train de monter + - p = 1 → sorti complètement, en haut-gauche hors champ */ - const px = 16 - p * 32; - const py = 7 - p * 5; + const px = 18 - p * 40; // +18 → -22 (large marge de sortie) + const py = -1 + p * 13; // -1 → +12 (en montée, sort du cadre par le haut) const bob = Math.sin(t * 0.9) * 0.12; planeHolder.position.set(px, py + bob, 0); - /* Banking subtil — direction inversée par rapport à un vol gauche→droite */ - const targetRoll = 0.18 + (p - 0.5) * 0.25; - const targetPitch = -0.18 - p * 0.10; - const targetYaw = -(p - 0.5) * 0.10; + /* Banking — penche légèrement, nez vers le haut (montée) */ + const targetRoll = 0.18 + (p - 0.5) * 0.25; // .z = roulis + const targetPitch = 0.20 + p * 0.10; // .x = nez vers le haut (montée) + const targetYaw = -(p - 0.5) * 0.10; // .y = soupçon de yaw planeHolder.rotation.z += (targetRoll - planeHolder.rotation.z) * 0.08; planeHolder.rotation.x += (targetPitch - planeHolder.rotation.x) * 0.08; planeHolder.rotation.y += (targetYaw - planeHolder.rotation.y) * 0.08;