TA159

Notas, resueltos y trabajos practicos de la materia Sistemas Gráficos
Index Commits Files Refs Submodules README LICENSE
commit c41b8a9613e5f41c314ef67675d6c4ca412ba693
parent 4febc237edbf33299c1f03a76ced9c077e2125f4
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Wed,  3 Jul 2024 23:25:46 -0300

fix water position

Diffstat:
Mtp/src/scene.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tp/src/scene.js b/tp/src/scene.js
@@ -246,11 +246,11 @@ function buildTerrain() {
     scene.add(terrain);
 
     console.log('Generating water');
-    const waterGeometry = new THREE.PlaneGeometry(width/2, height);
+    const waterGeometry = new THREE.PlaneGeometry(width/2, height-1.25);
     const waterMaterial = new THREE.MeshPhongMaterial( {color: 0x12ABFF, side: THREE.DoubleSide} );
     const water = new THREE.Mesh( waterGeometry, waterMaterial );
     water.rotateX(Math.PI/2);
-    water.position.set(0, 0, 0);
+    water.position.set(0, 0, -0.65);
     scene.add(water);
 }