Browse Source

GLTFExporter: Clean up.

linbingquan 4 years ago
parent
commit
06a73a0128
2 changed files with 4 additions and 3 deletions
  1. 1 1
      examples/js/exporters/GLTFExporter.js
  2. 3 2
      examples/jsm/exporters/GLTFExporter.js

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

@@ -1777,7 +1777,7 @@ THREE.GLTFExporter.prototype = {
 
 				}
 
-				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, new THREE.Matrix4().toArray() ) ) {
 
 					gltfNode.matrix = object.matrix.elements;
 

+ 3 - 2
examples/jsm/exporters/GLTFExporter.js

@@ -17,7 +17,8 @@ import {
 	RGBAFormat,
 	RepeatWrapping,
 	Scene,
-	Vector3
+	Vector3,
+	Matrix4
 } from "../../../build/three.module.js";
 
 //------------------------------------------------------------------------------
@@ -1797,7 +1798,7 @@ GLTFExporter.prototype = {
 
 				}
 
-				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, new Matrix4().toArray() ) ) {
 
 					gltfNode.matrix = object.matrix.elements;