Skip to content
Snippets Groups Projects
Commit b2eb776b authored by Thomas KANY's avatar Thomas KANY
Browse files

poteau

parent 0227c412
No related branches found
No related tags found
No related merge requests found
...@@ -117,6 +117,35 @@ function fillScene() { ...@@ -117,6 +117,35 @@ function fillScene() {
scene.add(capsuleMesh); 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 // ARBRES
new MTLLoader() new MTLLoader()
...@@ -144,7 +173,7 @@ function fillScene() { ...@@ -144,7 +173,7 @@ function fillScene() {
} }
// Arbres à droite de la route // 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; startZ = -50000;
startX = -10000; startX = -10000;
for (var x = 0; x < numTreesX; x++) { for (var x = 0; x < numTreesX; x++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment