Pārlūkot izejas kodu

BugFix SubMesh with CreateFromIndices

If the indexes decrease, the maxVertexIndex is never set and stay -Number.MAX_VALUE which is obviously not the good value
Clément Levasseur 11 gadi atpakaļ
vecāks
revīzija
10c4710a9c
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      Babylon/Mesh/babylon.subMesh.ts

+ 2 - 2
Babylon/Mesh/babylon.subMesh.ts

@@ -172,11 +172,11 @@
 
                 if (vertexIndex < minVertexIndex)
                     minVertexIndex = vertexIndex;
-                else if (vertexIndex > maxVertexIndex)
+                if (vertexIndex > maxVertexIndex)
                     maxVertexIndex = vertexIndex;
             }
 
             return new BABYLON.SubMesh(materialIndex, minVertexIndex, maxVertexIndex - minVertexIndex + 1, startIndex, indexCount, mesh, renderingMesh);
         }
     }
-}
+}