浏览代码

Now we just need to make sure geometry.computeCentroids() is called at the end of creating/modifying the geometry, otherwise things break...

Mr.doob 14 年之前
父节点
当前提交
8eb356db40
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 3 0
      examples/geometry_terrain.html
  2. 1 0
      examples/test.html

+ 3 - 0
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;

+ 1 - 0
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;