浏览代码

update transform calculations to match FBX SDK (tidy)

Lewy Blue 6 年之前
父节点
当前提交
63c611f98c
共有 1 个文件被更改,包括 0 次插入10 次删除
  1. 0 10
      examples/js/loaders/FBXLoader.js

+ 0 - 10
examples/js/loaders/FBXLoader.js

@@ -835,13 +835,8 @@ THREE.FBXLoader = ( function () {
 
 					var transform = generateTransform( node.userData.transformData );
 
-					// if ( node.parent ) transform = node.parent.matrix.getInverse( node.parent.matrix ).multiply( transform );
-
 					node.applyMatrix( transform );
 
-					// if ( node.parent )
-
-
 				}
 
 			} );
@@ -3931,8 +3926,6 @@ THREE.FBXLoader = ( function () {
 	// ref: http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/index.html?url=cpp_ref/_transformations_2main_8cxx-example.html,topicNumber=cpp_ref__transformations_2main_8cxx_example_htmlfc10a1e1-b18d-4e72-9dc0-70d0f1959f5e
 	function generateTransform( transformData ) {
 
-		// console.log( 'transformData', transformData );
-
 		var lTranslationM = new THREE.Matrix4();
 		var lPreRotationM = new THREE.Matrix4();
 		var lRotationM = new THREE.Matrix4();
@@ -4023,7 +4016,6 @@ THREE.FBXLoader = ( function () {
 
 		}
 
-
 		// Calculate the local transform matrix
 		lTransform = lTranslationM.multiply( lRotationOffsetM ).multiply( lRotationPivotM ).multiply( lPreRotationM ).multiply( lRotationM ).multiply( lPostRotationM ).multiply( lRotationPivotM.getInverse( lRotationPivotM ) ).multiply( lScalingOffsetM ).multiply( lScalingPivotM ).multiply( lScalingM ).multiply( lScalingPivotM.getInverse( lScalingPivotM ) );
 
@@ -4036,8 +4028,6 @@ THREE.FBXLoader = ( function () {
 
 		return lTransform;
 
-		// = new THREE.Matrix4();
-
 	}
 
 	// Returns the three.js intrinsic Euler order corresponding to FBX extrinsic Euler order