提交 66204777 编写于 作者: M Mr.doob

Mover Matrix* legacy code.

上级 80bfa452
......@@ -28,6 +28,93 @@ Object.defineProperties( THREE.Box3.prototype, {
//
Object.defineProperties( THREE.Matrix3.prototype, {
multiplyVector3: {
value: function ( vector ) {
console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
return vector.applyMatrix3( this );
}
},
multiplyVector3Array: {
value: function ( a ) {
console.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
return this.applyToVector3Array( a );
}
}
} );
Object.defineProperties( THREE.Matrix4.prototype, {
extractPosition: {
value: function ( m ) {
console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
return this.copyPosition( m );
}
},
setRotationFromQuaternion: {
value: function ( q ) {
console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
return this.makeRotationFromQuaternion( q );
}
},
multiplyVector3: {
value: function ( vector ) {
console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.' );
return vector.applyProjection( this );
}
},
multiplyVector4: {
value: function ( vector ) {
console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
return vector.applyMatrix4( this );
}
},
multiplyVector3Array: {
value: function ( a ) {
console.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
return this.applyToVector3Array( a );
}
},
rotateAxis: {
value: function ( v ) {
console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
v.transformDirection( this );
}
},
crossVector: {
value: function ( vector ) {
console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
return vector.applyMatrix4( this );
}
},
translate: {
value: function ( v ) {
console.error( 'THREE.Matrix4: .translate() has been removed.' );
}
},
rotateX: {
value: function ( angle ) {
console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
}
},
rotateY: {
value: function ( angle ) {
console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
}
},
rotateZ: {
value: function ( angle ) {
console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
}
},
rotateByAxis: {
value: function ( axis, angle ) {
console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
}
}
} );
//
Object.defineProperties( THREE.Vector3.prototype, {
setEulerFromRotationMatrix: {
value: function () {
......
......@@ -74,20 +74,6 @@ THREE.Matrix3.prototype = {
},
multiplyVector3: function ( vector ) {
console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
return vector.applyMatrix3( this );
},
multiplyVector3Array: function ( a ) {
console.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
return this.applyToVector3Array( a );
},
applyToVector3Array: function () {
var v1;
......
......@@ -76,13 +76,6 @@ THREE.Matrix4.prototype = {
},
extractPosition: function ( m ) {
console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
return this.copyPosition( m );
},
copyPosition: function ( m ) {
var te = this.elements;
......@@ -282,14 +275,6 @@ THREE.Matrix4.prototype = {
},
setRotationFromQuaternion: function ( q ) {
console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
return this.makeRotationFromQuaternion( q );
},
makeRotationFromQuaternion: function ( q ) {
var te = this.elements;
......@@ -450,27 +435,6 @@ THREE.Matrix4.prototype = {
},
multiplyVector3: function ( vector ) {
console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.' );
return vector.applyProjection( this );
},
multiplyVector4: function ( vector ) {
console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
return vector.applyMatrix4( this );
},
multiplyVector3Array: function ( a ) {
console.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
return this.applyToVector3Array( a );
},
applyToVector3Array: function () {
var v1;
......@@ -523,21 +487,6 @@ THREE.Matrix4.prototype = {
}(),
rotateAxis: function ( v ) {
console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
v.transformDirection( this );
},
crossVector: function ( vector ) {
console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
return vector.applyMatrix4( this );
},
determinant: function () {
var te = this.elements;
......@@ -717,36 +666,6 @@ THREE.Matrix4.prototype = {
},
translate: function ( v ) {
console.error( 'THREE.Matrix4: .translate() has been removed.' );
},
rotateX: function ( angle ) {
console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
},
rotateY: function ( angle ) {
console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
},
rotateZ: function ( angle ) {
console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
},
rotateByAxis: function ( axis, angle ) {
console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
},
scale: function ( v ) {
var te = this.elements;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册