瀏覽代碼

Merge pull request #5991 from BabylonJSGuide/master

Remove Lines Never Called
David Catuhe 6 年之前
父節點
當前提交
6083641c97
共有 1 個文件被更改,包括 1 次插入16 次删除
  1. 1 16
      src/Meshes/mesh.ts

+ 1 - 16
src/Meshes/mesh.ts

@@ -2401,6 +2401,7 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
 
     /**
      * Increase the number of facets and hence vertices in a mesh
+     * Vertex normals are interpolated from existing vertex normals
      * Warning : the mesh is really modified even if not set originally as updatable. A new VertexBuffer is created under the hood each call.
      * @param numberPerEdge the number of new vertices to add to each edge of a facet, optional default 1
      */
@@ -2480,22 +2481,6 @@ export class Mesh extends AbstractMesh implements IGetSetVerticesData {
                             side[b][a][idx] = side[a][b][len - 1 - idx];
                         }
                     }
-                    else {
-                        if (side[a][b] === undefined) {
-                            side[a][b] = new Array();
-                            len = side[b][a].length;
-                            for (var idx = 0; idx < len; idx++) {
-                                side[a][b][idx] = side[b][a][len - 1 - idx];
-                            }
-                        }
-                        if (side[b][a] === undefined) {
-                            side[b][a] = new Array();
-                            len = side[a][b].length;
-                            for (var idx = 0; idx < len; idx++) {
-                                side[b][a][idx] = side[a][b][len - 1 - idx];
-                            }
-                        }
-                    }
                 }
                 //Calculate positions, normals and uvs of new internal vertices
                 tempIndices[0][0] = currentIndices[i];