Explorar o código

FBXLoader_fix_euler_from_array

Lewy Blue %!s(int64=7) %!d(string=hai) anos
pai
achega
c6319ae508
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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 );