From 6cf619857ad81ee6531a03a4a359d1f464dca5a4 Mon Sep 17 00:00:00 2001 From: MVA Global Fret Date: Tue, 5 May 2026 12:35:03 +0200 Subject: [PATCH] =?UTF-8?q?Switch=20trajectory=20to=20descending=20right?= =?UTF-8?q?=E2=86=92top=20to=20left=E2=86=92bottom,=20nose=20down?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reroute the plane: it now enters from the upper-right (y=+6) and exits at the lower-left (y=-10), so the path slopes downward as a ~22° descent (slope = -16/40 in world units). Pitch reversed to match — rotation.z = +0.32 + p·0.05 (≈18-21° nose-down) so the plane's body aligns with the descent line. Roll and yaw unchanged. Co-Authored-By: Claude Opus 4.6 --- js/intro-scene.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/js/intro-scene.js b/js/intro-scene.js index df5c0d2..03e9271 100644 --- a/js/intro-scene.js +++ b/js/intro-scene.js @@ -125,24 +125,26 @@ 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, 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 + /* Trajectoire droite → gauche, en descente (approche) : + - p = 0 → entre haut-droite (hors champ) + - p = 0.5 → traverse en diagonale descendante + - p = 1 → sort bas-gauche (hors champ) */ - 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; + const px = 18 - p * 40; // +18 → -22 + const py = 6 - p * 16; // +6 (haut) → -10 (bas hors champ) + const bob = Math.sin(t * 0.9) * 0.10; planeHolder.position.set(px, py + bob, 0); - /* Pour un avion volant -X (nose à gauche), avec up = +Y : - - rotation.z (axe latéral du monde) = PITCH. Négatif → nez en l'air. + /* Pour un avion volant -X (nez à gauche), avec up = +Y : + - rotation.z (axe latéral du monde) = PITCH. Positif → nez baissé. - rotation.x (axe longitudinal du monde) = ROLL. - rotation.y (axe vertical du monde) = YAW. + Slope de la trajectoire ≈ -16/40 = -22° → on incline le nez de + manière analogue pour suivre la pente. */ - const targetPitch = -0.30 - p * 0.05; // ~17°-20° nez en l'air (montée) - const targetRoll = 0.12 + (p - 0.5) * 0.10; // léger roulis + const targetPitch = 0.32 + p * 0.05; // nez en bas ~18°-21° (descente) + const targetRoll = 0.12 + (p - 0.5) * 0.10; // léger roulis const targetYaw = 0; planeHolder.rotation.z += (targetPitch - planeHolder.rotation.z) * 0.08; planeHolder.rotation.x += (targetRoll - planeHolder.rotation.x) * 0.08;