From 8eb356db4005ba6f0a157e250ed656248cadaf89 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sun, 31 Oct 2010 02:49:14 +0000 Subject: [PATCH] Now we just need to make sure geometry.computeCentroids() is called at the end of creating/modifying the geometry, otherwise things break... --- examples/geometry_terrain.html | 3 +++ examples/test.html | 1 + 2 files changed, 4 insertions(+) diff --git a/examples/geometry_terrain.html b/examples/geometry_terrain.html index 30a9b1e922..f9f9070c2a 100644 --- a/examples/geometry_terrain.html +++ b/examples/geometry_terrain.html @@ -92,6 +92,9 @@ } + plane.computeNormals(); + plane.computeCentroids(); + mesh = new THREE.Mesh( plane, material ); mesh.rotation.x = -90 * Math.PI / 180; mesh.overdraw = true; diff --git a/examples/test.html b/examples/test.html index ab04ba3e96..a83fc16d49 100644 --- a/examples/test.html +++ b/examples/test.html @@ -170,6 +170,7 @@ } geometry.computeNormals(); + geometry.computeCentroids(); mesh = new THREE.Mesh( geometry, [ new THREE.MeshFaceMaterial(), new THREE.MeshColorStrokeMaterial( 0xff0000, 0.5, 10 ) ] ); mesh.doubleSided = true; -- GitLab