David Catuhe 8 년 전
부모
커밋
33e3ee5d45
3개의 변경된 파일7962개의 추가작업 그리고 7940개의 파일을 삭제
  1. 3970 3970
      dist/preview release/babylon.d.ts
  2. 3970 3970
      dist/preview release/babylon.module.d.ts
  3. 22 0
      src/Mesh/babylon.mesh.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3970 - 3970
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3970 - 3970
dist/preview release/babylon.module.d.ts


+ 22 - 0
src/Mesh/babylon.mesh.ts

@@ -651,6 +651,28 @@
                 return null;
             }
 
+            // Check if we need to recreate the submeshes
+            if (this.subMeshes && this.subMeshes.length > 0) {
+                var totalIndices = this.getIndices().length;
+                let needToRecreate = false;
+    
+                for (var submesh of this.subMeshes) {
+                    if (submesh.indexStart + submesh.indexCount >= totalIndices) {
+                        needToRecreate = true;
+                        break;
+                    }
+
+                    if (submesh.verticesStart + submesh.verticesCount >= totalVertices) {
+                        needToRecreate = true;
+                        break;
+                    }
+                }
+
+                if (!needToRecreate) {
+                    return;
+                }
+            }
+
             this.releaseSubMeshes();
             return new SubMesh(0, 0, totalVertices, 0, this.getTotalIndices(), this);
         }