Explorar o código

bug fix : CreateRibbon with closeArray and closePath both set to true

jbousquie %!s(int64=10) %!d(string=hai) anos
pai
achega
7a6eb3fe37
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/Mesh/babylon.mesh.vertexData.ts

+ 4 - 1
src/Mesh/babylon.mesh.vertexData.ts

@@ -485,7 +485,10 @@
                 if (closeArray) {
                     path1 = pathArray[p];
                     path2 = pathArray[0];
-                    vectlg = path2[i].subtract(path1[i]).length();
+                    if (i === minlg) {   // closePath
+                        vertex2 = path2[0];
+                    }
+                    vectlg = vertex2.subtract(vertex1).length();
                     dist = vectlg + vTotalDistance[i];
                     vTotalDistance[i] = dist;
                 }