Explorar el Código

Update meshSimplification.ts

aWeirdo hace 4 años
padre
commit
ce2e87b964
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Meshes/meshSimplification.ts

+ 1 - 1
src/Meshes/meshSimplification.ts

@@ -473,7 +473,7 @@ export class QuadraticErrorSimplification implements ISimplifier {
         var findInVertices = (positionToSearch: Vector3) => {
         var findInVertices = (positionToSearch: Vector3) => {
             if (optimizeMesh) {
             if (optimizeMesh) {
                 for (var ii = 0; ii < this.vertices.length; ++ii) {
                 for (var ii = 0; ii < this.vertices.length; ++ii) {
-                    if (this.vertices[ii].position.equals(positionToSearch)) {
+                    if (this.vertices[ii].position.equalsWithEpsilon(positionToSearch, 0.0001)) {
                         return this.vertices[ii];
                         return this.vertices[ii];
                     }
                     }
                 }
                 }