浏览代码

Merge pull request #12511 from looeee/FBXLoader_rotations_bug

FBXLoader fix Euler.fromArray syntax
Mr.doob 7 年之前
父节点
当前提交
21ab28ec24
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      examples/js/loaders/FBXLoader.js

+ 5 - 1
examples/js/loaders/FBXLoader.js

@@ -1796,7 +1796,11 @@
 
 			if ( 'PreRotation' in node.properties ) {
 
-				var preRotations = new THREE.Euler().fromArray( node.properties.PreRotation.value.map( THREE.Math.degToRad ), 'ZYX' );
+				var array = node.properties.PreRotation.value.map( THREE.Math.degToRad );
+				array[ 3 ] = 'ZYX';
+
+				var preRotations = new THREE.Euler().fromArray( array );
+
 				preRotations = new THREE.Quaternion().setFromEuler( preRotations );
 				var currentRotation = new THREE.Quaternion().setFromEuler( model.rotation );
 				preRotations.multiply( currentRotation );