Explorar o código

fixed GLTFExporter process when mesh is set matrixAutoUpdate to false

George Baxter %!s(int64=6) %!d(string=hai) anos
pai
achega
a292ec3e8f
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      examples/js/exporters/GLTFExporter.js

+ 4 - 1
examples/js/exporters/GLTFExporter.js

@@ -1740,7 +1740,10 @@ THREE.GLTFExporter.prototype = {
 
 
 			} else {
 			} else {
 
 
-				object.updateMatrix();
+				if (object.matrixAutoUpdate) {
+						object.updateMatrix();
+				}
+
 				if ( ! equalArray( object.matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] ) ) {
 				if ( ! equalArray( object.matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] ) ) {
 
 
 					gltfNode.matrix = object.matrix.elements;
 					gltfNode.matrix = object.matrix.elements;