提交 c589751d 编写于 作者: B Ben Houston

removed "position = _vector3" pattern per @WestLangley

上级 3db966d6
......@@ -6035,12 +6035,11 @@ THREE.WebGLRenderer = function ( parameters ) {
}
position = _vector3;
position.getPositionFromMatrix( light.matrixWorld );
_vector3.getPositionFromMatrix( light.matrixWorld );
pointPositions[ pointOffset ] = position.x;
pointPositions[ pointOffset + 1 ] = position.y;
pointPositions[ pointOffset + 2 ] = position.z;
pointPositions[ pointOffset ] = _vector3.x;
pointPositions[ pointOffset + 1 ] = _vector3.y;
pointPositions[ pointOffset + 2 ] = _vector3.z;
pointDistances[ pointLength ] = distance;
......@@ -6064,16 +6063,15 @@ THREE.WebGLRenderer = function ( parameters ) {
}
position = _vector3;
position.getPositionFromMatrix( light.matrixWorld );
_vector3.getPositionFromMatrix( light.matrixWorld );
spotPositions[ spotOffset ] = position.x;
spotPositions[ spotOffset + 1 ] = position.y;
spotPositions[ spotOffset + 2 ] = position.z;
spotPositions[ spotOffset ] = _vector3.x;
spotPositions[ spotOffset + 1 ] = _vector3.y;
spotPositions[ spotOffset + 2 ] = _vector3.z;
spotDistances[ spotLength ] = distance;
_direction.copy( position );
_direction.copy( _vector3 );
_vector3.getPositionFromMatrix( light.target.matrixWorld );
_direction.sub( _vector3 );
_direction.normalize();
......
......@@ -2507,9 +2507,8 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
if ( p_uniforms.cameraPosition !== null ) {
var position = _vector3;
position.getPositionFromMatrix( camera.matrixWorld );
renderer.uniform3f( p_uniforms.cameraPosition, position.x, position.y, position.z );
_vector3.getPositionFromMatrix( camera.matrixWorld );
renderer.uniform3f( p_uniforms.cameraPosition, _vector3.x, _vector3.y, _vector3.z );
}
......@@ -3156,12 +3155,11 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
}
position = _vector3;
position.getPositionFromMatrix( light.matrixWorld );
_vector3.getPositionFromMatrix( light.matrixWorld );
pointPositions[ pointOffset ] = position.x;
pointPositions[ pointOffset + 1 ] = position.y;
pointPositions[ pointOffset + 2 ] = position.z;
pointPositions[ pointOffset ] = _vector3.x;
pointPositions[ pointOffset + 1 ] = _vector3.y;
pointPositions[ pointOffset + 2 ] = _vector3.z;
pointDistances[ pointLength ] = distance;
......@@ -3185,16 +3183,15 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
}
position = _vector3;
position.getPositionFromMatrix( light.matrixWorld );
_vector3.getPositionFromMatrix( light.matrixWorld );
spotPositions[ spotOffset ] = position.x;
spotPositions[ spotOffset + 1 ] = position.y;
spotPositions[ spotOffset + 2 ] = position.z;
spotPositions[ spotOffset ] = _vector3.x;
spotPositions[ spotOffset + 1 ] = _vector3.y;
spotPositions[ spotOffset + 2 ] = _vector3.z;
spotDistances[ spotLength ] = distance;
_direction.copy( position );
_direction.copy( _vector3 );
_vector3.getPositionFromMatrix( light.target.matrixWorld );
_direction.sub( _vector3 );
_direction.normalize();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册