瀏覽代碼

better recomputeNormals function

David Catuhe 8 年之前
父節點
當前提交
c620ee4905
共有 3 個文件被更改,包括 12680 次插入12680 次删除
  1. 6339 6339
      dist/preview release/babylon.d.ts
  2. 6339 6339
      dist/preview release/babylon.module.d.ts
  3. 2 2
      src/Mesh/babylon.mesh.ts

File diff suppressed because it is too large
+ 6339 - 6339
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 6339 - 6339
dist/preview release/babylon.module.d.ts


+ 2 - 2
src/Mesh/babylon.mesh.ts

@@ -809,7 +809,7 @@
          * Please note that the mesh must have normals vertex data already.
          * Returns the Mesh. 
          */
-        public recomputeNormals(): Mesh {
+        public recomputeNormals(markDataAsUpdatable?: boolean): Mesh {
             var positions = this.getVerticesData(VertexBuffer.PositionKind);
             var indices = this.getIndices();
             var normals: number[] | Float32Array;
@@ -820,7 +820,7 @@
                 normals = [];
             }
             VertexData.ComputeNormals(positions, indices, normals);
-            this.updateVerticesData(VertexBuffer.NormalKind, normals, false, false);
+            this.setVerticesData(VertexBuffer.NormalKind, normals, markDataAsUpdatable);
 
             return this;
         }