Browse Source

Moved Quaternion legacy code.

Mr.doob 9 years ago
parent
commit
0eeb0998b2
2 changed files with 11 additions and 8 deletions
  1. 11 0
      src/Three.Legacy.js
  2. 0 8
      src/math/Quaternion.js

+ 11 - 0
src/Three.Legacy.js

@@ -126,6 +126,17 @@ Object.defineProperties( THREE.Plane.prototype, {
 
 //
 
+Object.defineProperties( THREE.Quaternion.prototype, {
+	multiplyVector3: {
+		value: function ( vector ) {
+			console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
+			return vector.applyQuaternion( this );
+		}
+	}
+} );
+
+//
+
 Object.defineProperties( THREE.Ray.prototype, {
 	isIntersectionBox: {
 		value: function ( box ) {

+ 0 - 8
src/math/Quaternion.js

@@ -397,13 +397,6 @@ THREE.Quaternion.prototype = {
 
 	},
 
-	multiplyVector3: function ( vector ) {
-
-		console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
-		return vector.applyQuaternion( this );
-
-	},
-
 	slerp: function ( qb, t ) {
 
 		if ( t === 0 ) return this;
@@ -588,4 +581,3 @@ Object.assign( THREE.Quaternion, {
 	}
 
 } );
-