|
@@ -2507,9 +2507,8 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
|
|
|
|
|
|
if ( p_uniforms.cameraPosition !== null ) {
|
|
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;
|
|
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;
|
|
spotDistances[ spotLength ] = distance;
|
|
|
|
|
|
- _direction.copy( position );
|
|
|
|
|
|
+ _direction.copy( _vector3 );
|
|
_vector3.getPositionFromMatrix( light.target.matrixWorld );
|
|
_vector3.getPositionFromMatrix( light.target.matrixWorld );
|
|
_direction.sub( _vector3 );
|
|
_direction.sub( _vector3 );
|
|
_direction.normalize();
|
|
_direction.normalize();
|