Przeglądaj źródła

remove lines never called

Guide 6 lat temu
rodzic
commit
74c8c2f8b6
1 zmienionych plików z 1 dodań i 16 usunięć
  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];