From 081a1fd6465e9e789ae29d24d8e30547c3fa5740 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sun, 30 Dec 2012 21:54:55 +0100 Subject: [PATCH] Renamed .multiplyMatrix* to .applyMatrix* and .multiplyQuaternion to .applyQuaternion as suggested by @WestLangley in #2860. --- examples/canvas_interactive_voxelpainter.html | 2 +- examples/js/controls/TrackballControls.js | 8 ++--- examples/js/loaders/ColladaLoader.js | 8 ++--- .../js/renderers/WebGLDeferredRenderer.js | 6 ++-- examples/webgl_interactive_voxelpainter.html | 2 +- .../webgl_lights_deferred_arealights.html | 4 +-- src/core/Geometry.js | 8 ++--- src/core/Object3D.js | 4 +-- src/core/Projector.js | 32 +++++++++---------- src/extras/GeometryUtils.js | 8 ++--- src/extras/geometries/LatheGeometry.js | 2 +- src/extras/geometries/TubeGeometry.js | 4 +-- .../renderers/plugins/LensFlarePlugin.js | 4 +-- .../renderers/plugins/ShadowMapPlugin.js | 2 +- src/math/Box3.js | 18 +++++------ src/math/Plane.js | 4 +-- src/math/Ray.js | 4 +-- src/math/Sphere.js | 2 +- src/math/Vector2.js | 4 +-- src/math/Vector3.js | 6 ++-- src/math/Vector4.js | 2 +- src/renderers/WebGLRenderer.js | 4 +-- 22 files changed, 69 insertions(+), 69 deletions(-) diff --git a/examples/canvas_interactive_voxelpainter.html b/examples/canvas_interactive_voxelpainter.html index b158a8eff1..bac982ad31 100644 --- a/examples/canvas_interactive_voxelpainter.html +++ b/examples/canvas_interactive_voxelpainter.html @@ -173,7 +173,7 @@ } else { var normal = interect.face.normal.clone(); - normal.multiplyMatrix4( interect.object.matrixRotationWorld ); + normal.applyMatrix4( interect.object.matrixRotationWorld ); var position = new THREE.Vector3().add( interect.point, normal ); diff --git a/examples/js/controls/TrackballControls.js b/examples/js/controls/TrackballControls.js index 254dff5962..287081039e 100644 --- a/examples/js/controls/TrackballControls.js +++ b/examples/js/controls/TrackballControls.js @@ -135,10 +135,10 @@ THREE.TrackballControls = function ( object, domElement ) { quaternion.setFromAxisAngle( axis, -angle ); - _eye.multiplyQuaternion( quaternion ); - _this.object.up.multiplyQuaternion( quaternion ); + _eye.applyQuaternion( quaternion ); + _this.object.up.applyQuaternion( quaternion ); - _rotateEnd.multiplyQuaternion( quaternion ); + _rotateEnd.applyQuaternion( quaternion ); if ( _this.staticMoving ) { @@ -147,7 +147,7 @@ THREE.TrackballControls = function ( object, domElement ) { } else { quaternion.setFromAxisAngle( axis, angle * ( _this.dynamicDampingFactor - 1.0 ) ); - _rotateStart.multiplyQuaternion( quaternion ); + _rotateStart.applyQuaternion( quaternion ); } diff --git a/examples/js/loaders/ColladaLoader.js b/examples/js/loaders/ColladaLoader.js index 8cfa82be41..18aeaee174 100644 --- a/examples/js/loaders/ColladaLoader.js +++ b/examples/js/loaders/ColladaLoader.js @@ -444,7 +444,7 @@ THREE.ColladaLoader = function () { for ( var i = 0; i < geometry.vertices.length; i ++ ) { - geometry.vertices[ i ].multiplyMatrix4( skin.bindShapeMatrix ); + geometry.vertices[ i ].applyMatrix4( skin.bindShapeMatrix ); } @@ -575,7 +575,7 @@ THREE.ColladaLoader = function () { for ( i = 0; i < geometry.vertices.length; i ++ ) { - geometry.vertices[i].multiplyMatrix4( skinController.skin.bindShapeMatrix ); + geometry.vertices[i].applyMatrix4( skinController.skin.bindShapeMatrix ); } @@ -619,7 +619,7 @@ THREE.ColladaLoader = function () { v.y = o.y; v.z = o.z; - v.multiplyMatrix4( bones[i].skinningMatrix ); + v.applyMatrix4( bones[i].skinningMatrix ); s.x += (v.x * weight); s.y += (v.y * weight); @@ -850,7 +850,7 @@ THREE.ColladaLoader = function () { var delta = THREE.GeometryUtils.center( obj.geometry ); delta.multiplySelf( obj.scale ); - delta.multiplyQuaternion( obj.quaternion ); + delta.applyQuaternion( obj.quaternion ); obj.position.subSelf( delta ); diff --git a/examples/js/renderers/WebGLDeferredRenderer.js b/examples/js/renderers/WebGLDeferredRenderer.js index 47778d5d8c..8c61e91cb5 100644 --- a/examples/js/renderers/WebGLDeferredRenderer.js +++ b/examples/js/renderers/WebGLDeferredRenderer.js @@ -330,7 +330,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) { uniforms[ "lightRadius" ].value = distance; positionVS.copy( light.matrixWorld.getPosition() ); - positionVS.multiplyMatrix4( camera.matrixWorldInverse ); + positionVS.applyMatrix4( camera.matrixWorldInverse ); uniforms[ "lightPositionVS" ].value.copy( positionVS ); @@ -422,7 +422,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) { var modelMatrix = light.matrixWorld; positionVS.copy( modelMatrix.getPosition() ); - positionVS.multiplyMatrix4( viewMatrix ); + positionVS.applyMatrix4( viewMatrix ); directionVS.copy( modelMatrix.getPosition() ); directionVS.subSelf( light.target.matrixWorld.getPosition() ); @@ -630,7 +630,7 @@ THREE.WebGLDeferredRenderer = function ( parameters ) { var viewMatrix = camera.matrixWorldInverse; positionVS.copy( modelMatrix.getPosition() ); - positionVS.multiplyMatrix4( viewMatrix ); + positionVS.applyMatrix4( viewMatrix ); uniforms[ "lightPositionVS" ].value.copy( positionVS ); diff --git a/examples/webgl_interactive_voxelpainter.html b/examples/webgl_interactive_voxelpainter.html index 297316e621..050b348d99 100644 --- a/examples/webgl_interactive_voxelpainter.html +++ b/examples/webgl_interactive_voxelpainter.html @@ -174,7 +174,7 @@ function setVoxelPosition( intersector ) { tmpVec.copy( intersector.face.normal ); - tmpVec.multiplyMatrix4( intersector.object.matrixRotationWorld ); + tmpVec.applyMatrix4( intersector.object.matrixRotationWorld ); voxelPosition.add( intersector.point, tmpVec ); diff --git a/examples/webgl_lights_deferred_arealights.html b/examples/webgl_lights_deferred_arealights.html index 0f89b1525c..1636b76d56 100644 --- a/examples/webgl_lights_deferred_arealights.html +++ b/examples/webgl_lights_deferred_arealights.html @@ -175,8 +175,8 @@ light.right.set( 1, 0, 0 ); light.normal.set( 0, -1, 0 ); - light.right.multiplyMatrix4( matrix ); - light.normal.multiplyMatrix4( matrix ); + light.right.applyMatrix4( matrix ); + light.normal.applyMatrix4( matrix ); } diff --git a/src/core/Geometry.js b/src/core/Geometry.js index d0f0210a43..4d9ad3b09a 100644 --- a/src/core/Geometry.js +++ b/src/core/Geometry.js @@ -65,22 +65,22 @@ THREE.Geometry.prototype = { for ( var i = 0, il = this.vertices.length; i < il; i ++ ) { var vertex = this.vertices[ i ]; - vertex.multiplyMatrix4( matrix ); + vertex.applyMatrix4( matrix ); } for ( var i = 0, il = this.faces.length; i < il; i ++ ) { var face = this.faces[ i ]; - face.normal.multiplyMatrix3( normalMatrix ).normalize(); + face.normal.applyMatrix3( normalMatrix ).normalize(); for ( var j = 0, jl = face.vertexNormals.length; j < jl; j ++ ) { - face.vertexNormals[ j ].multiplyMatrix3( normalMatrix ).normalize(); + face.vertexNormals[ j ].applyMatrix3( normalMatrix ).normalize(); } - face.centroid.multiplyMatrix4( matrix ); + face.centroid.applyMatrix4( matrix ); } diff --git a/src/core/Object3D.js b/src/core/Object3D.js index dec440cde8..8063d52816 100644 --- a/src/core/Object3D.js +++ b/src/core/Object3D.js @@ -91,13 +91,13 @@ THREE.Object3D.prototype = { localToWorld: function ( vector ) { - return vector.multiplyMatrix4( this.matrixWorld ); + return vector.applyMatrix4( this.matrixWorld ); }, worldToLocal: function ( vector ) { - return vector.multiplyMatrix4( THREE.Object3D.__m1.getInverse( this.matrixWorld ) ); + return vector.applyMatrix4( THREE.Object3D.__m1.getInverse( this.matrixWorld ) ); }, diff --git a/src/core/Projector.js b/src/core/Projector.js index c0df52e887..8f4385ed06 100644 --- a/src/core/Projector.js +++ b/src/core/Projector.js @@ -42,7 +42,7 @@ THREE.Projector = function() { _viewProjectionMatrix.multiply( camera.projectionMatrix, camera.matrixWorldInverse ); - return vector.multiplyMatrix4( _viewProjectionMatrix ); + return vector.applyMatrix4( _viewProjectionMatrix ); }; @@ -52,7 +52,7 @@ THREE.Projector = function() { _viewProjectionMatrix.multiply( camera.matrixWorld, camera.projectionMatrixInverse ); - return vector.multiplyMatrix4( _viewProjectionMatrix ); + return vector.applyMatrix4( _viewProjectionMatrix ); }; @@ -106,7 +106,7 @@ THREE.Projector = function() { } else { _vector3.copy( object.matrixWorld.getPosition() ); - _vector3.multiplyMatrix4( _viewProjectionMatrix ); + _vector3.applyMatrix4( _viewProjectionMatrix ); _object.z = _vector3.z; } @@ -129,7 +129,7 @@ THREE.Projector = function() { } else { _vector3.copy( object.matrixWorld.getPosition() ); - _vector3.multiplyMatrix4( _viewProjectionMatrix ); + _vector3.applyMatrix4( _viewProjectionMatrix ); _object.z = _vector3.z; } @@ -148,7 +148,7 @@ THREE.Projector = function() { } else { _vector3.copy( object.matrixWorld.getPosition() ); - _vector3.multiplyMatrix4( _viewProjectionMatrix ); + _vector3.applyMatrix4( _viewProjectionMatrix ); _object.z = _vector3.z; } @@ -227,10 +227,10 @@ THREE.Projector = function() { _vertex = getNextVertexInPool(); _vertex.positionWorld.copy( vertices[ v ] ); - _vertex.positionWorld.multiplyMatrix4( _modelMatrix ); + _vertex.positionWorld.applyMatrix4( _modelMatrix ); _vertex.positionScreen.copy( _vertex.positionWorld ); - _vertex.positionScreen.multiplyMatrix4( _viewProjectionMatrix ); + _vertex.positionScreen.applyMatrix4( _viewProjectionMatrix ); _vertex.positionScreen.x /= _vertex.positionScreen.w; _vertex.positionScreen.y /= _vertex.positionScreen.w; @@ -328,14 +328,14 @@ THREE.Projector = function() { } - _face.normalModel.multiplyMatrix3( _normalMatrix ); + _face.normalModel.applyMatrix3( _normalMatrix ); _face.normalModel.normalize(); _face.normalModelView.copy( _face.normalModel ); - _face.normalModelView.multiplyMatrix3( _normalViewMatrix ); + _face.normalModelView.applyMatrix3( _normalViewMatrix ); _face.centroidModel.copy( face.centroid ); - _face.centroidModel.multiplyMatrix4( _modelMatrix ); + _face.centroidModel.applyMatrix4( _modelMatrix ); faceVertexNormals = face.vertexNormals; @@ -350,12 +350,12 @@ THREE.Projector = function() { } - normalModel.multiplyMatrix3( _normalMatrix ); + normalModel.applyMatrix3( _normalMatrix ); normalModel.normalize(); var normalModelView = _face.vertexNormalsModelView[ n ]; normalModelView.copy( normalModel ); - normalModelView.multiplyMatrix3( _normalViewMatrix ); + normalModelView.applyMatrix3( _normalViewMatrix ); } @@ -379,7 +379,7 @@ THREE.Projector = function() { _face.material = material; _centroid.copy( _face.centroidModel ) - _centroid.multiplyMatrix4( _viewProjectionMatrix ); + _centroid.applyMatrix4( _viewProjectionMatrix ); _face.z = _centroid.z; @@ -395,7 +395,7 @@ THREE.Projector = function() { v1 = getNextVertexInPool(); v1.positionScreen.copy( vertices[ 0 ] ); - v1.positionScreen.multiplyMatrix4( _modelViewProjectionMatrix ); + v1.positionScreen.applyMatrix4( _modelViewProjectionMatrix ); // Handle LineStrip and LinePieces var step = object.type === THREE.LinePieces ? 2 : 1; @@ -404,7 +404,7 @@ THREE.Projector = function() { v1 = getNextVertexInPool(); v1.positionScreen.copy( vertices[ v ] ); - v1.positionScreen.multiplyMatrix4( _modelViewProjectionMatrix ); + v1.positionScreen.applyMatrix4( _modelViewProjectionMatrix ); if ( ( v + 1 ) % step > 0 ) continue; @@ -446,7 +446,7 @@ THREE.Projector = function() { if ( object instanceof THREE.Particle ) { _vector4.set( _modelMatrix.elements[12], _modelMatrix.elements[13], _modelMatrix.elements[14], 1 ); - _vector4.multiplyMatrix4( _viewProjectionMatrix ); + _vector4.applyMatrix4( _viewProjectionMatrix ); _vector4.z /= _vector4.w; diff --git a/src/extras/GeometryUtils.js b/src/extras/GeometryUtils.js index 17d2a3292b..036665eb8c 100644 --- a/src/extras/GeometryUtils.js +++ b/src/extras/GeometryUtils.js @@ -40,7 +40,7 @@ THREE.GeometryUtils = { var vertexCopy = vertex.clone(); - if ( matrix ) vertexCopy.multiplyMatrix4( matrix ); + if ( matrix ) vertexCopy.applyMatrix4( matrix ); vertices1.push( vertexCopy ); @@ -68,7 +68,7 @@ THREE.GeometryUtils = { if ( normalMatrix ) { - faceCopy.normal.multiplyMatrix3( normalMatrix ).normalize(); + faceCopy.normal.applyMatrix3( normalMatrix ).normalize(); } @@ -78,7 +78,7 @@ THREE.GeometryUtils = { if ( normalMatrix ) { - normal.multiplyMatrix3( normalMatrix ).normalize(); + normal.applyMatrix3( normalMatrix ).normalize(); } @@ -101,7 +101,7 @@ THREE.GeometryUtils = { if ( matrix ) { - faceCopy.centroid.multiplyMatrix4( matrix ); + faceCopy.centroid.applyMatrix4( matrix ); } diff --git a/src/extras/geometries/LatheGeometry.js b/src/extras/geometries/LatheGeometry.js index d73b5fc32b..cdddb1c5ee 100644 --- a/src/extras/geometries/LatheGeometry.js +++ b/src/extras/geometries/LatheGeometry.js @@ -26,7 +26,7 @@ THREE.LatheGeometry = function ( points, steps, angle ) { for ( var j = 0; j < _newV.length; j ++ ) { - _newV[ j ] = _newV[ j ].clone().multiplyMatrix4( _matrix ); + _newV[ j ] = _newV[ j ].clone().applyMatrix4( _matrix ); this.vertices.push( _newV[ j ] ); } diff --git a/src/extras/geometries/TubeGeometry.js b/src/extras/geometries/TubeGeometry.js index 6739e7b0bd..8fb028d4c6 100644 --- a/src/extras/geometries/TubeGeometry.js +++ b/src/extras/geometries/TubeGeometry.js @@ -246,7 +246,7 @@ THREE.TubeGeometry.FrenetFrames = function(path, segments, closed) { theta = Math.acos( tangents[ i-1 ].dot( tangents[ i ] ) ); - normals[ i ].multiplyMatrix4( mat.makeRotationAxis( vec, theta ) ); + normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) ); } @@ -271,7 +271,7 @@ THREE.TubeGeometry.FrenetFrames = function(path, segments, closed) { for ( i = 1; i < numpoints; i++ ) { // twist a little... - normals[ i ].multiplyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) ); + normals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) ); binormals[ i ].cross( tangents[ i ], normals[ i ] ); } diff --git a/src/extras/renderers/plugins/LensFlarePlugin.js b/src/extras/renderers/plugins/LensFlarePlugin.js index 3571570f03..77acaeb7bd 100644 --- a/src/extras/renderers/plugins/LensFlarePlugin.js +++ b/src/extras/renderers/plugins/LensFlarePlugin.js @@ -160,8 +160,8 @@ THREE.LensFlarePlugin = function ( ) { tempPosition.set( flare.matrixWorld.elements[12], flare.matrixWorld.elements[13], flare.matrixWorld.elements[14] ); - tempPosition.multiplyMatrix4( camera.matrixWorldInverse ); - tempPosition.multiplyMatrix4( camera.projectionMatrix ); + tempPosition.applyMatrix4( camera.matrixWorldInverse ); + tempPosition.applyMatrix4( camera.projectionMatrix ); // setup arrays for gl programs diff --git a/src/extras/renderers/plugins/ShadowMapPlugin.js b/src/extras/renderers/plugins/ShadowMapPlugin.js index 44c01f6dc4..6b4ff8a5bf 100644 --- a/src/extras/renderers/plugins/ShadowMapPlugin.js +++ b/src/extras/renderers/plugins/ShadowMapPlugin.js @@ -451,7 +451,7 @@ THREE.ShadowMapPlugin = function ( ) { p.copy( pointsFrustum[ i ] ); THREE.ShadowMapPlugin.__projector.unprojectVector( p, camera ); - p.multiplyMatrix4( shadowCamera.matrixWorldInverse ); + p.applyMatrix4( shadowCamera.matrixWorldInverse ); if ( p.x < _min.x ) _min.x = p.x; if ( p.x > _max.x ) _max.x = p.x; diff --git a/src/math/Box3.js b/src/math/Box3.js index 3699ccaa14..96f98d4122 100644 --- a/src/math/Box3.js +++ b/src/math/Box3.js @@ -259,15 +259,15 @@ THREE.Box3.prototype = { // NOTE: I am using a binary pattern to specify all 2^3 combinations below var newPoints = [ - THREE.Box3.__v0.set( this.min.x, this.min.y, this.min.z ).multiplyMatrix4( matrix ), - THREE.Box3.__v0.set( this.min.x, this.min.y, this.min.z ).multiplyMatrix4( matrix ), // 000 - THREE.Box3.__v1.set( this.min.x, this.min.y, this.max.z ).multiplyMatrix4( matrix ), // 001 - THREE.Box3.__v2.set( this.min.x, this.max.y, this.min.z ).multiplyMatrix4( matrix ), // 010 - THREE.Box3.__v3.set( this.min.x, this.max.y, this.max.z ).multiplyMatrix4( matrix ), // 011 - THREE.Box3.__v4.set( this.max.x, this.min.y, this.min.z ).multiplyMatrix4( matrix ), // 100 - THREE.Box3.__v5.set( this.max.x, this.min.y, this.max.z ).multiplyMatrix4( matrix ), // 101 - THREE.Box3.__v6.set( this.max.x, this.max.y, this.min.z ).multiplyMatrix4( matrix ), // 110 - THREE.Box3.__v7.set( this.max.x, this.max.y, this.max.z ).multiplyMatrix4( matrix ) // 111 + THREE.Box3.__v0.set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ), + THREE.Box3.__v0.set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ), // 000 + THREE.Box3.__v1.set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ), // 001 + THREE.Box3.__v2.set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ), // 010 + THREE.Box3.__v3.set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ), // 011 + THREE.Box3.__v4.set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ), // 100 + THREE.Box3.__v5.set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ), // 101 + THREE.Box3.__v6.set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ), // 110 + THREE.Box3.__v7.set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ) // 111 ]; this.makeEmpty(); diff --git a/src/math/Plane.js b/src/math/Plane.js index 9f8a8d234d..7429634b8e 100644 --- a/src/math/Plane.js +++ b/src/math/Plane.js @@ -160,10 +160,10 @@ THREE.Plane.prototype = { // compute new normal based on theory here: // http://www.songho.ca/opengl/gl_normaltransform.html optionalNormalMatrix = optionalNormalMatrix || new THREE.Matrix3().getInverse( matrix ).transpose(); - newNormal.copy( this.normal ).multiplyMatrix3( optionalNormalMatrix ); + newNormal.copy( this.normal ).applyMatrix3( optionalNormalMatrix ); newCoplanarPoint = this.coplanarPoint( newCoplanarPoint ); - newCoplanarPoint.multiplyMatrix4( matrix ); + newCoplanarPoint.applyMatrix4( matrix ); this.setFromNormalAndCoplanarPoint( newNormal, newCoplanarPoint ); diff --git a/src/math/Ray.js b/src/math/Ray.js index 38228c060e..c9c91f68d2 100644 --- a/src/math/Ray.js +++ b/src/math/Ray.js @@ -133,8 +133,8 @@ THREE.Ray.prototype = { transform: function ( matrix4 ) { - this.direction.addSelf( this.origin ).multiplyMatrix4( matrix4 ); - this.origin.multiplyMatrix4( matrix4 ); + this.direction.addSelf( this.origin ).applyMatrix4( matrix4 ); + this.origin.applyMatrix4( matrix4 ); this.direction.subSelf( this.origin ); return this; diff --git a/src/math/Sphere.js b/src/math/Sphere.js index a1576d2783..1d75e4c29e 100644 --- a/src/math/Sphere.js +++ b/src/math/Sphere.js @@ -98,7 +98,7 @@ THREE.Sphere.prototype = { transform: function ( matrix ) { - this.center.multiplyMatrix4( matrix ); + this.center.applyMatrix4( matrix ); this.radius = this.radius * matrix.getMaxScaleOnAxis(); return this; diff --git a/src/math/Vector2.js b/src/math/Vector2.js index 90bbb48e09..06ee8db59f 100644 --- a/src/math/Vector2.js +++ b/src/math/Vector2.js @@ -256,8 +256,8 @@ THREE.Vector2.prototype = { setLength: function ( l ) { var oldLength = this.length(); - - if ( oldLength !== 0 && l !== oldLength ) { + + if ( oldLength !== 0 && l !== oldLength ) { this.multiplyScalar( l / oldLength ); } diff --git a/src/math/Vector3.js b/src/math/Vector3.js index 07e7b96c83..38677340ec 100644 --- a/src/math/Vector3.js +++ b/src/math/Vector3.js @@ -170,7 +170,7 @@ THREE.Vector3.prototype = { }, - multiplyMatrix3: function ( m ) { + applyMatrix3: function ( m ) { var x = this.x; var y = this.y; @@ -186,7 +186,7 @@ THREE.Vector3.prototype = { }, - multiplyMatrix4: function ( m ) { + applyMatrix4: function ( m ) { var x = this.x; var y = this.y; @@ -203,7 +203,7 @@ THREE.Vector3.prototype = { }, - multiplyQuaternion: function ( q ) { + applyQuaternion: function ( q ) { var x = this.x; var y = this.y; diff --git a/src/math/Vector4.js b/src/math/Vector4.js index 3f9e8e5fc7..40abe8b0c3 100644 --- a/src/math/Vector4.js +++ b/src/math/Vector4.js @@ -167,7 +167,7 @@ THREE.Vector4.prototype = { }, - multiplyMatrix4: function ( m ) { + applyMatrix4: function ( m ) { var x = this.x; var y = this.y; diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 011d0233b3..093d1a42b2 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -1158,7 +1158,7 @@ THREE.WebGLRenderer = function ( parameters ) { vertex = vertices[ v ]; _vector3.copy( vertex ); - _vector3.multiplyMatrix4( _projScreenMatrixPS ); + _vector3.applyMatrix4( _projScreenMatrixPS ); sortArray[ v ] = [ _vector3.z, v ]; @@ -4124,7 +4124,7 @@ THREE.WebGLRenderer = function ( parameters ) { } else { _vector3.copy( object.matrixWorld.getPosition() ); - _vector3.multiplyMatrix4( _projScreenMatrix ); + _vector3.applyMatrix4( _projScreenMatrix ); webglObject.z = _vector3.z; -- GitLab