Browse Source

Remove getWorldRotation()

WestLangley 7 years ago
parent
commit
f26e7cc082
3 changed files with 5 additions and 28 deletions
  1. 0 7
      docs/api/core/Object3D.html
  2. 5 0
      src/Three.Legacy.js
  3. 0 21
      src/core/Object3D.js

+ 0 - 7
docs/api/core/Object3D.html

@@ -254,13 +254,6 @@
 		Returns a quaternion representing the rotation of the object in world space.
 		Returns a quaternion representing the rotation of the object in world space.
 		</div>
 		</div>
 
 
-		<h3>[method:Euler getWorldRotation]( [param:Euler target] )</h3>
-		<div>
-		[page:Euler target] — the result will be copied into this Euler. <br /><br />
-
-		Returns the euler angles representing the rotation of the object in world space.
-		</div>
-
 		<h3>[method:Vector3 getWorldScale]( [param:Vector3 target] )</h3>
 		<h3>[method:Vector3 getWorldScale]( [param:Vector3 target] )</h3>
 		<div>
 		<div>
 		[page:Vector3 target] — the result will be copied into this Vector3. <br /><br />
 		[page:Vector3 target] — the result will be copied into this Vector3. <br /><br />

+ 5 - 0
src/Three.Legacy.js

@@ -865,6 +865,11 @@ Object.assign( Object3D.prototype, {
 		console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
 		console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
 		return this.translateOnAxis( axis, distance );
 		return this.translateOnAxis( axis, distance );
 
 
+	},
+	getWorldRotation: function () {
+
+		console.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' );
+
 	}
 	}
 
 
 } );
 } );

+ 0 - 21
src/core/Object3D.js

@@ -482,27 +482,6 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 	}(),
 	}(),
 
 
-	getWorldRotation: function () {
-
-		var quaternion = new Quaternion();
-
-		return function getWorldRotation( target ) {
-
-			if ( target === undefined ) {
-
-				console.warn( 'THREE.Object3D: .getWorldRotation() target is now required' );
-				target = new Euler();
-
-			}
-
-			this.getWorldQuaternion( quaternion );
-
-			return target.setFromQuaternion( quaternion, this.rotation.order, false );
-
-		};
-
-	}(),
-
 	getWorldScale: function () {
 	getWorldScale: function () {
 
 
 		var position = new Vector3();
 		var position = new Vector3();