diff --git a/src/finalizeMesh.js b/src/finalizeMesh.js index fd19b05..dc043c5 100644 --- a/src/finalizeMesh.js +++ b/src/finalizeMesh.js @@ -38,9 +38,8 @@ finalizeMesh.prototype = { newGeometry.attributes.position.setXYZ(i, vertex.x, vertex.y, vertex.z); } else { var finalVector = new Vector4(); + var morphVector = new Vector4(vertex.x, vertex.y, vertex.z); if (geometry.morphTargetInfluences !== undefined) { - - var morphVector = new Vector4(vertex.x, vertex.y, vertex.z); var tempMorph = new Vector4(); for (var mt = 0; mt < geometry.morphAttributes.position.length; mt++) { @@ -52,7 +51,7 @@ finalizeMesh.prototype = { geometry.morphAttributes.position[mt].getY(i), geometry.morphAttributes.position[mt].getZ(i)); - tempMorph.addScaledVector(morph.sub(morphVector), geometry.morphTargetInfluences[mt]); + tempMorph.addScaledVector(morph, geometry.morphTargetInfluences[mt]); } morphVector.add(tempMorph); }