Przeglądaj źródła

Updated VRMLLoader to use object.quaternion.

Updated VRMLLoader to use object.quaternion instead of object.rotation
as mentioned in issue mrdoob/three.js#3728
Cecile Muller 12 lat temu
rodzic
commit
7af4c6167e
1 zmienionych plików z 5 dodań i 4 usunięć
  1. 5 4
      examples/js/loaders/VRMLLoader.js

+ 5 - 4
examples/js/loaders/VRMLLoader.js

@@ -19,7 +19,7 @@ THREE.VRMLLoader.prototype = {
 
 			scope.dispatchEvent( { type: 'load', content: object } );
 
-			if ( callback ) callback( geometry );
+			//if ( callback ) callback( geometry ); //WP what is that line for ?? and hyw only one geometry and no material ?
 
 		}, false );
 
@@ -153,11 +153,12 @@ THREE.VRMLLoader.prototype = {
 
 							var result = float4_pattern.exec( child );
 
-							object.rotation.set(
+							object.quaternion.set(
 								parseFloat( result[ 1 ] ),
 								parseFloat( result[ 2 ] ),
-								parseFloat( result[ 3 ] )
-							).multiplyScalar( result[ 4 ] );
+								parseFloat( result[ 3 ] ),
+								parseFloat( result[ 4 ] )
+							);
 
 						} else if ( /scale/.exec( child ) ) {