diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index 44c8b5f34e54fee95bf56a6bf4602e53f7932f61..51217a96374d002f877ae33f7e9d5fb8c7c42d38 100644 --- a/src/Three.Legacy.js +++ b/src/Three.Legacy.js @@ -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 () { diff --git a/src/math/Matrix3.js b/src/math/Matrix3.js index f129ffe8d8b674968ebb695d1d09cc321a86f420..fae7f564e1f898328c7b07485821140de270d944 100644 --- a/src/math/Matrix3.js +++ b/src/math/Matrix3.js @@ -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; diff --git a/src/math/Matrix4.js b/src/math/Matrix4.js index a1a216f5ddb86a8aea225a6ebc57cd165e80d124..3681d6376f85c87dcdb7a81c9cde2ce5a26a54d6 100644 --- a/src/math/Matrix4.js +++ b/src/math/Matrix4.js @@ -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;