diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index e13131d6f0ffa9adb16703e0ba41c62e51d08f64..69d424185d720c06f7de886bdc975c4764231998 100644 --- a/src/Three.Legacy.js +++ b/src/Three.Legacy.js @@ -113,6 +113,8 @@ Object.defineProperties( THREE.Matrix4.prototype, { } } ); +// + Object.defineProperties( THREE.Plane.prototype, { isIntersectionLine: { value: function ( line ) { @@ -124,6 +126,29 @@ Object.defineProperties( THREE.Plane.prototype, { // +Object.defineProperties( THREE.Ray.prototype, { + isIntersectionBox: { + value: function ( box ) { + console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' ); + return this.intersectsBox( box ); + } + }, + isIntersectionPlane: { + value: function ( plane ) { + console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' ); + return this.intersectsPlane( plane ); + } + }, + isIntersectionSphere: { + value: function ( sphere ) { + console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' ); + return this.intersectsSphere( sphere ); + } + } +} ); + +// + Object.defineProperties( THREE.Vector3.prototype, { setEulerFromRotationMatrix: { value: function () { diff --git a/src/math/Ray.js b/src/math/Ray.js index a9b8dfc6abd56228acbaa9ed51ccd517b59c98aa..58a4669328997d349bf0094593e847ee469226f3 100644 --- a/src/math/Ray.js +++ b/src/math/Ray.js @@ -279,14 +279,6 @@ THREE.Ray.prototype = { }, - isIntersectionSphere: function ( sphere ) { - - console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' ); - - return this.intersectsSphere( sphere ); - - }, - distanceToPlane: function ( plane ) { var denominator = plane.normal.dot( this.direction ); @@ -356,14 +348,6 @@ THREE.Ray.prototype = { }, - isIntersectionPlane: function ( plane ) { - - console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' ); - - return this.intersectsPlane( plane ); - - }, - intersectBox: function ( box, optionalTarget ) { // http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-7-intersecting-simple-shapes/ray-box-intersection/ @@ -447,14 +431,6 @@ THREE.Ray.prototype = { } )(), - isIntersectionBox: function ( box ) { - - console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' ); - - return this.intersectsBox( box ); - - }, - intersectTriangle: function () { // Compute the offset origin, edges, and normal.