From b2eb776b118c4757d688a78064bed3023d681adf Mon Sep 17 00:00:00 2001 From: Thomas KANY <thomas.kany8@univ-lorraine.fr> Date: Wed, 12 Mar 2025 16:48:44 +0100 Subject: [PATCH] poteau --- ALVARIZA-BILLAR_DESERT_KANY/projet.js | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/ALVARIZA-BILLAR_DESERT_KANY/projet.js b/ALVARIZA-BILLAR_DESERT_KANY/projet.js index 397bdcd..045acb0 100644 --- a/ALVARIZA-BILLAR_DESERT_KANY/projet.js +++ b/ALVARIZA-BILLAR_DESERT_KANY/projet.js @@ -117,6 +117,35 @@ function fillScene() { scene.add(capsuleMesh); + // Matériaux + const redMaterial = new THREE.MeshStandardMaterial({ color: 0xff0000 }); // Rouge + const grayMaterial = new THREE.MeshStandardMaterial({ color: 0x888888 }); // Gris + + // Bas du poteau (rouge) + const bottomPoleGeometry = new THREE.CylinderGeometry(30, 30, 1500, 32); + const bottomPole = new THREE.Mesh(bottomPoleGeometry, redMaterial); + bottomPole.position.set(-5000, 750, 6000); + scene.add(bottomPole); + + // Haut du poteau (gris) + const topPoleGeometry = new THREE.CylinderGeometry(30, 30, 1500, 32); + const topPole = new THREE.Mesh(topPoleGeometry, grayMaterial); + topPole.position.set(-5000, 2250, 6000); + scene.add(topPole); + + // Enseigne (panneau plus petit) + const signTexture = new THREE.TextureLoader().load('textures/sign.png'); + const signGeometry = new THREE.PlaneGeometry(400, 300); // Réduction de taille + const signMaterial = new THREE.MeshStandardMaterial({ map: signTexture, side: THREE.DoubleSide }); + const sign = new THREE.Mesh(signGeometry, signMaterial); + + // enseigne comme un drapeau + sign.position.set(-4800, 2500, 6000); + sign.rotation.y = 0; + + // Ajouter l'enseigne + scene.add(sign); + // ARBRES new MTLLoader() @@ -144,7 +173,7 @@ function fillScene() { } // Arbres à droite de la route - var numTreesX = 20, numTreesZ = 100, spacingX = 2000, spacingZ = 1000, startX = 3000, + var numTreesX = 19, numTreesZ = 100, spacingX = 2000, spacingZ = 1000, startX = 3000, startZ = -50000; startX = -10000; for (var x = 0; x < numTreesX; x++) { -- GitLab