|
@@ -1,5 +1,5 @@
|
|
// threejs.org/license
|
|
// threejs.org/license
|
|
-const REVISION = '123';
|
|
|
|
|
|
+const REVISION = '124dev';
|
|
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
|
|
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
|
|
const CullFaceNone = 0;
|
|
const CullFaceNone = 0;
|
|
@@ -15064,7 +15064,6 @@ function WebGLCubeMaps( renderer ) {
|
|
|
|
|
|
const currentRenderList = renderer.getRenderList();
|
|
const currentRenderList = renderer.getRenderList();
|
|
const currentRenderTarget = renderer.getRenderTarget();
|
|
const currentRenderTarget = renderer.getRenderTarget();
|
|
- const currentRenderState = renderer.getRenderState();
|
|
|
|
|
|
|
|
const renderTarget = new WebGLCubeRenderTarget( image.height / 2 );
|
|
const renderTarget = new WebGLCubeRenderTarget( image.height / 2 );
|
|
renderTarget.fromEquirectangularTexture( renderer, texture );
|
|
renderTarget.fromEquirectangularTexture( renderer, texture );
|
|
@@ -15072,7 +15071,6 @@ function WebGLCubeMaps( renderer ) {
|
|
|
|
|
|
renderer.setRenderTarget( currentRenderTarget );
|
|
renderer.setRenderTarget( currentRenderTarget );
|
|
renderer.setRenderList( currentRenderList );
|
|
renderer.setRenderList( currentRenderList );
|
|
- renderer.setRenderState( currentRenderState );
|
|
|
|
|
|
|
|
texture.addEventListener( 'dispose', onTextureDispose );
|
|
texture.addEventListener( 'dispose', onTextureDispose );
|
|
|
|
|
|
@@ -15713,6 +15711,12 @@ function WebGLObjects( gl, geometries, attributes, info ) {
|
|
|
|
|
|
if ( object.isInstancedMesh ) {
|
|
if ( object.isInstancedMesh ) {
|
|
|
|
|
|
|
|
+ if ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) {
|
|
|
|
+
|
|
|
|
+ object.addEventListener( 'dispose', onInstancedMeshDispose );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
attributes.update( object.instanceMatrix, 34962 );
|
|
attributes.update( object.instanceMatrix, 34962 );
|
|
|
|
|
|
if ( object.instanceColor !== null ) {
|
|
if ( object.instanceColor !== null ) {
|
|
@@ -15733,6 +15737,18 @@ function WebGLObjects( gl, geometries, attributes, info ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function onInstancedMeshDispose( event ) {
|
|
|
|
+
|
|
|
|
+ const instancedMesh = event.target;
|
|
|
|
+
|
|
|
|
+ instancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose );
|
|
|
|
+
|
|
|
|
+ attributes.remove( instancedMesh.instanceMatrix );
|
|
|
|
+
|
|
|
|
+ if ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
return {
|
|
return {
|
|
|
|
|
|
update: update,
|
|
update: update,
|
|
@@ -18393,7 +18409,7 @@ function WebGLLights( extensions, capabilities ) {
|
|
const matrix4 = new Matrix4();
|
|
const matrix4 = new Matrix4();
|
|
const matrix42 = new Matrix4();
|
|
const matrix42 = new Matrix4();
|
|
|
|
|
|
- function setup( lights, shadows, camera ) {
|
|
|
|
|
|
+ function setup( lights ) {
|
|
|
|
|
|
let r = 0, g = 0, b = 0;
|
|
let r = 0, g = 0, b = 0;
|
|
|
|
|
|
@@ -18409,8 +18425,6 @@ function WebGLLights( extensions, capabilities ) {
|
|
let numPointShadows = 0;
|
|
let numPointShadows = 0;
|
|
let numSpotShadows = 0;
|
|
let numSpotShadows = 0;
|
|
|
|
|
|
- const viewMatrix = camera.matrixWorldInverse;
|
|
|
|
-
|
|
|
|
lights.sort( shadowCastingLightsFirst );
|
|
lights.sort( shadowCastingLightsFirst );
|
|
|
|
|
|
for ( let i = 0, l = lights.length; i < l; i ++ ) {
|
|
for ( let i = 0, l = lights.length; i < l; i ++ ) {
|
|
@@ -18442,10 +18456,6 @@ function WebGLLights( extensions, capabilities ) {
|
|
const uniforms = cache.get( light );
|
|
const uniforms = cache.get( light );
|
|
|
|
|
|
uniforms.color.copy( light.color ).multiplyScalar( light.intensity );
|
|
uniforms.color.copy( light.color ).multiplyScalar( light.intensity );
|
|
- uniforms.direction.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
- vector3.setFromMatrixPosition( light.target.matrixWorld );
|
|
|
|
- uniforms.direction.sub( vector3 );
|
|
|
|
- uniforms.direction.transformDirection( viewMatrix );
|
|
|
|
|
|
|
|
if ( light.castShadow ) {
|
|
if ( light.castShadow ) {
|
|
|
|
|
|
@@ -18475,16 +18485,10 @@ function WebGLLights( extensions, capabilities ) {
|
|
const uniforms = cache.get( light );
|
|
const uniforms = cache.get( light );
|
|
|
|
|
|
uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
- uniforms.position.applyMatrix4( viewMatrix );
|
|
|
|
|
|
|
|
uniforms.color.copy( color ).multiplyScalar( intensity );
|
|
uniforms.color.copy( color ).multiplyScalar( intensity );
|
|
uniforms.distance = distance;
|
|
uniforms.distance = distance;
|
|
|
|
|
|
- uniforms.direction.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
- vector3.setFromMatrixPosition( light.target.matrixWorld );
|
|
|
|
- uniforms.direction.sub( vector3 );
|
|
|
|
- uniforms.direction.transformDirection( viewMatrix );
|
|
|
|
-
|
|
|
|
uniforms.coneCos = Math.cos( light.angle );
|
|
uniforms.coneCos = Math.cos( light.angle );
|
|
uniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) );
|
|
uniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) );
|
|
uniforms.decay = light.decay;
|
|
uniforms.decay = light.decay;
|
|
@@ -18522,24 +18526,9 @@ function WebGLLights( extensions, capabilities ) {
|
|
// (b) intensity is the brightness of the light
|
|
// (b) intensity is the brightness of the light
|
|
uniforms.color.copy( color ).multiplyScalar( intensity );
|
|
uniforms.color.copy( color ).multiplyScalar( intensity );
|
|
|
|
|
|
- uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
- uniforms.position.applyMatrix4( viewMatrix );
|
|
|
|
-
|
|
|
|
- // extract local rotation of light to derive width/height half vectors
|
|
|
|
- matrix42.identity();
|
|
|
|
- matrix4.copy( light.matrixWorld );
|
|
|
|
- matrix4.premultiply( viewMatrix );
|
|
|
|
- matrix42.extractRotation( matrix4 );
|
|
|
|
-
|
|
|
|
uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );
|
|
uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );
|
|
uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );
|
|
uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );
|
|
|
|
|
|
- uniforms.halfWidth.applyMatrix4( matrix42 );
|
|
|
|
- uniforms.halfHeight.applyMatrix4( matrix42 );
|
|
|
|
-
|
|
|
|
- // TODO (abelnation): RectAreaLight distance?
|
|
|
|
- // uniforms.distance = distance;
|
|
|
|
-
|
|
|
|
state.rectArea[ rectAreaLength ] = uniforms;
|
|
state.rectArea[ rectAreaLength ] = uniforms;
|
|
|
|
|
|
rectAreaLength ++;
|
|
rectAreaLength ++;
|
|
@@ -18548,9 +18537,6 @@ function WebGLLights( extensions, capabilities ) {
|
|
|
|
|
|
const uniforms = cache.get( light );
|
|
const uniforms = cache.get( light );
|
|
|
|
|
|
- uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
- uniforms.position.applyMatrix4( viewMatrix );
|
|
|
|
-
|
|
|
|
uniforms.color.copy( light.color ).multiplyScalar( light.intensity );
|
|
uniforms.color.copy( light.color ).multiplyScalar( light.intensity );
|
|
uniforms.distance = light.distance;
|
|
uniforms.distance = light.distance;
|
|
uniforms.decay = light.decay;
|
|
uniforms.decay = light.decay;
|
|
@@ -18584,10 +18570,6 @@ function WebGLLights( extensions, capabilities ) {
|
|
|
|
|
|
const uniforms = cache.get( light );
|
|
const uniforms = cache.get( light );
|
|
|
|
|
|
- uniforms.direction.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
- uniforms.direction.transformDirection( viewMatrix );
|
|
|
|
- uniforms.direction.normalize();
|
|
|
|
-
|
|
|
|
uniforms.skyColor.copy( light.color ).multiplyScalar( intensity );
|
|
uniforms.skyColor.copy( light.color ).multiplyScalar( intensity );
|
|
uniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity );
|
|
uniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity );
|
|
|
|
|
|
@@ -18679,8 +18661,94 @@ function WebGLLights( extensions, capabilities ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function setupView( lights, camera ) {
|
|
|
|
+
|
|
|
|
+ let directionalLength = 0;
|
|
|
|
+ let pointLength = 0;
|
|
|
|
+ let spotLength = 0;
|
|
|
|
+ let rectAreaLength = 0;
|
|
|
|
+ let hemiLength = 0;
|
|
|
|
+
|
|
|
|
+ const viewMatrix = camera.matrixWorldInverse;
|
|
|
|
+
|
|
|
|
+ for ( let i = 0, l = lights.length; i < l; i ++ ) {
|
|
|
|
+
|
|
|
|
+ const light = lights[ i ];
|
|
|
|
+
|
|
|
|
+ if ( light.isDirectionalLight ) {
|
|
|
|
+
|
|
|
|
+ const uniforms = state.directional[ directionalLength ];
|
|
|
|
+
|
|
|
|
+ uniforms.direction.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
+ vector3.setFromMatrixPosition( light.target.matrixWorld );
|
|
|
|
+ uniforms.direction.sub( vector3 );
|
|
|
|
+ uniforms.direction.transformDirection( viewMatrix );
|
|
|
|
+
|
|
|
|
+ directionalLength ++;
|
|
|
|
+
|
|
|
|
+ } else if ( light.isSpotLight ) {
|
|
|
|
+
|
|
|
|
+ const uniforms = state.spot[ spotLength ];
|
|
|
|
+
|
|
|
|
+ uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
+ uniforms.position.applyMatrix4( viewMatrix );
|
|
|
|
+
|
|
|
|
+ uniforms.direction.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
+ vector3.setFromMatrixPosition( light.target.matrixWorld );
|
|
|
|
+ uniforms.direction.sub( vector3 );
|
|
|
|
+ uniforms.direction.transformDirection( viewMatrix );
|
|
|
|
+
|
|
|
|
+ spotLength ++;
|
|
|
|
+
|
|
|
|
+ } else if ( light.isRectAreaLight ) {
|
|
|
|
+
|
|
|
|
+ const uniforms = state.rectArea[ rectAreaLength ];
|
|
|
|
+
|
|
|
|
+ uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
+ uniforms.position.applyMatrix4( viewMatrix );
|
|
|
|
+
|
|
|
|
+ // extract local rotation of light to derive width/height half vectors
|
|
|
|
+ matrix42.identity();
|
|
|
|
+ matrix4.copy( light.matrixWorld );
|
|
|
|
+ matrix4.premultiply( viewMatrix );
|
|
|
|
+ matrix42.extractRotation( matrix4 );
|
|
|
|
+
|
|
|
|
+ uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );
|
|
|
|
+ uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );
|
|
|
|
+
|
|
|
|
+ uniforms.halfWidth.applyMatrix4( matrix42 );
|
|
|
|
+ uniforms.halfHeight.applyMatrix4( matrix42 );
|
|
|
|
+
|
|
|
|
+ rectAreaLength ++;
|
|
|
|
+
|
|
|
|
+ } else if ( light.isPointLight ) {
|
|
|
|
+
|
|
|
|
+ const uniforms = state.point[ pointLength ];
|
|
|
|
+
|
|
|
|
+ uniforms.position.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
+ uniforms.position.applyMatrix4( viewMatrix );
|
|
|
|
+
|
|
|
|
+ pointLength ++;
|
|
|
|
+
|
|
|
|
+ } else if ( light.isHemisphereLight ) {
|
|
|
|
+
|
|
|
|
+ const uniforms = state.hemi[ hemiLength ];
|
|
|
|
+
|
|
|
|
+ uniforms.direction.setFromMatrixPosition( light.matrixWorld );
|
|
|
|
+ uniforms.direction.transformDirection( viewMatrix );
|
|
|
|
+ uniforms.direction.normalize();
|
|
|
|
+
|
|
|
|
+ hemiLength ++;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
return {
|
|
return {
|
|
setup: setup,
|
|
setup: setup,
|
|
|
|
+ setupView: setupView,
|
|
state: state
|
|
state: state
|
|
};
|
|
};
|
|
|
|
|
|
@@ -18712,9 +18780,15 @@ function WebGLRenderState( extensions, capabilities ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- function setupLights( camera ) {
|
|
|
|
|
|
+ function setupLights() {
|
|
|
|
|
|
- lights.setup( lightsArray, shadowsArray, camera );
|
|
|
|
|
|
+ lights.setup( lightsArray );
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function setupLightsView( camera ) {
|
|
|
|
+
|
|
|
|
+ lights.setupView( lightsArray, camera );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -18729,6 +18803,7 @@ function WebGLRenderState( extensions, capabilities ) {
|
|
init: init,
|
|
init: init,
|
|
state: state,
|
|
state: state,
|
|
setupLights: setupLights,
|
|
setupLights: setupLights,
|
|
|
|
+ setupLightsView: setupLightsView,
|
|
|
|
|
|
pushLight: pushLight,
|
|
pushLight: pushLight,
|
|
pushShadow: pushShadow
|
|
pushShadow: pushShadow
|
|
@@ -18740,26 +18815,26 @@ function WebGLRenderStates( extensions, capabilities ) {
|
|
|
|
|
|
let renderStates = new WeakMap();
|
|
let renderStates = new WeakMap();
|
|
|
|
|
|
- function get( scene, camera ) {
|
|
|
|
|
|
+ function get( scene, renderCallDepth = 0 ) {
|
|
|
|
|
|
let renderState;
|
|
let renderState;
|
|
|
|
|
|
if ( renderStates.has( scene ) === false ) {
|
|
if ( renderStates.has( scene ) === false ) {
|
|
|
|
|
|
renderState = new WebGLRenderState( extensions, capabilities );
|
|
renderState = new WebGLRenderState( extensions, capabilities );
|
|
- renderStates.set( scene, new WeakMap() );
|
|
|
|
- renderStates.get( scene ).set( camera, renderState );
|
|
|
|
|
|
+ renderStates.set( scene, [] );
|
|
|
|
+ renderStates.get( scene ).push( renderState );
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- if ( renderStates.get( scene ).has( camera ) === false ) {
|
|
|
|
|
|
+ if ( renderCallDepth >= renderStates.get( scene ).length ) {
|
|
|
|
|
|
renderState = new WebGLRenderState( extensions, capabilities );
|
|
renderState = new WebGLRenderState( extensions, capabilities );
|
|
- renderStates.get( scene ).set( camera, renderState );
|
|
|
|
|
|
+ renderStates.get( scene ).push( renderState );
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- renderState = renderStates.get( scene ).get( camera );
|
|
|
|
|
|
+ renderState = renderStates.get( scene )[ renderCallDepth ];
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -23258,6 +23333,11 @@ function WebGLRenderer( parameters ) {
|
|
let currentRenderList = null;
|
|
let currentRenderList = null;
|
|
let currentRenderState = null;
|
|
let currentRenderState = null;
|
|
|
|
|
|
|
|
+ // render() can be called from within a callback triggered by another render.
|
|
|
|
+ // We track this so that the nested render call gets its state isolated from the parent render call.
|
|
|
|
+
|
|
|
|
+ const renderStateStack = [];
|
|
|
|
+
|
|
// public properties
|
|
// public properties
|
|
|
|
|
|
this.domElement = _canvas;
|
|
this.domElement = _canvas;
|
|
@@ -23324,7 +23404,6 @@ function WebGLRenderer( parameters ) {
|
|
let _currentMaterialId = - 1;
|
|
let _currentMaterialId = - 1;
|
|
|
|
|
|
let _currentCamera = null;
|
|
let _currentCamera = null;
|
|
- let _currentArrayCamera = null;
|
|
|
|
|
|
|
|
const _currentViewport = new Vector4();
|
|
const _currentViewport = new Vector4();
|
|
const _currentScissor = new Vector4();
|
|
const _currentScissor = new Vector4();
|
|
@@ -24078,7 +24157,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
this.compile = function ( scene, camera ) {
|
|
this.compile = function ( scene, camera ) {
|
|
|
|
|
|
- currentRenderState = renderStates.get( scene, camera );
|
|
|
|
|
|
+ currentRenderState = renderStates.get( scene );
|
|
currentRenderState.init();
|
|
currentRenderState.init();
|
|
|
|
|
|
scene.traverseVisible( function ( object ) {
|
|
scene.traverseVisible( function ( object ) {
|
|
@@ -24097,7 +24176,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
} );
|
|
} );
|
|
|
|
|
|
- currentRenderState.setupLights( camera );
|
|
|
|
|
|
+ currentRenderState.setupLights();
|
|
|
|
|
|
const compiled = new WeakMap();
|
|
const compiled = new WeakMap();
|
|
|
|
|
|
@@ -24212,9 +24291,11 @@ function WebGLRenderer( parameters ) {
|
|
//
|
|
//
|
|
if ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, renderTarget || _currentRenderTarget );
|
|
if ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, renderTarget || _currentRenderTarget );
|
|
|
|
|
|
- currentRenderState = renderStates.get( scene, camera );
|
|
|
|
|
|
+ currentRenderState = renderStates.get( scene, renderStateStack.length );
|
|
currentRenderState.init();
|
|
currentRenderState.init();
|
|
|
|
|
|
|
|
+ renderStateStack.push( currentRenderState );
|
|
|
|
+
|
|
_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
|
|
_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
|
|
_frustum.setFromProjectionMatrix( _projScreenMatrix );
|
|
_frustum.setFromProjectionMatrix( _projScreenMatrix );
|
|
|
|
|
|
@@ -24242,7 +24323,8 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
shadowMap.render( shadowsArray, scene, camera );
|
|
shadowMap.render( shadowsArray, scene, camera );
|
|
|
|
|
|
- currentRenderState.setupLights( camera );
|
|
|
|
|
|
+ currentRenderState.setupLights();
|
|
|
|
+ currentRenderState.setupLightsView( camera );
|
|
|
|
|
|
if ( _clippingEnabled === true ) clipping.endShadows();
|
|
if ( _clippingEnabled === true ) clipping.endShadows();
|
|
|
|
|
|
@@ -24296,8 +24378,18 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
// _gl.finish();
|
|
// _gl.finish();
|
|
|
|
|
|
|
|
+ renderStateStack.pop();
|
|
|
|
+ if ( renderStateStack.length > 0 ) {
|
|
|
|
+
|
|
|
|
+ currentRenderState = renderStateStack[ renderStateStack.length - 1 ];
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ currentRenderState = null;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
currentRenderList = null;
|
|
currentRenderList = null;
|
|
- currentRenderState = null;
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -24441,8 +24533,6 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
if ( camera.isArrayCamera ) {
|
|
if ( camera.isArrayCamera ) {
|
|
|
|
|
|
- _currentArrayCamera = camera;
|
|
|
|
-
|
|
|
|
const cameras = camera.cameras;
|
|
const cameras = camera.cameras;
|
|
|
|
|
|
for ( let j = 0, jl = cameras.length; j < jl; j ++ ) {
|
|
for ( let j = 0, jl = cameras.length; j < jl; j ++ ) {
|
|
@@ -24453,7 +24543,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
state.viewport( _currentViewport.copy( camera2.viewport ) );
|
|
state.viewport( _currentViewport.copy( camera2.viewport ) );
|
|
|
|
|
|
- currentRenderState.setupLights( camera2 );
|
|
|
|
|
|
+ currentRenderState.setupLightsView( camera2 );
|
|
|
|
|
|
renderObject( object, scene, camera2, geometry, material, group );
|
|
renderObject( object, scene, camera2, geometry, material, group );
|
|
|
|
|
|
@@ -24463,8 +24553,6 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- _currentArrayCamera = null;
|
|
|
|
-
|
|
|
|
renderObject( object, scene, camera, geometry, material, group );
|
|
renderObject( object, scene, camera, geometry, material, group );
|
|
|
|
|
|
}
|
|
}
|
|
@@ -24476,7 +24564,6 @@ function WebGLRenderer( parameters ) {
|
|
function renderObject( object, scene, camera, geometry, material, group ) {
|
|
function renderObject( object, scene, camera, geometry, material, group ) {
|
|
|
|
|
|
object.onBeforeRender( _this, scene, camera, geometry, material, group );
|
|
object.onBeforeRender( _this, scene, camera, geometry, material, group );
|
|
- currentRenderState = renderStates.get( scene, _currentArrayCamera || camera );
|
|
|
|
|
|
|
|
object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
|
|
object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
|
|
object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
|
|
object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
|
|
@@ -24498,7 +24585,6 @@ function WebGLRenderer( parameters ) {
|
|
}
|
|
}
|
|
|
|
|
|
object.onAfterRender( _this, scene, camera, geometry, material, group );
|
|
object.onAfterRender( _this, scene, camera, geometry, material, group );
|
|
- currentRenderState = renderStates.get( scene, _currentArrayCamera || camera );
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -24957,18 +25043,6 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
- this.getRenderState = function () {
|
|
|
|
-
|
|
|
|
- return currentRenderState;
|
|
|
|
-
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- this.setRenderState = function ( renderState ) {
|
|
|
|
-
|
|
|
|
- currentRenderState = renderState;
|
|
|
|
-
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
this.getRenderTarget = function () {
|
|
this.getRenderTarget = function () {
|
|
|
|
|
|
return _currentRenderTarget;
|
|
return _currentRenderTarget;
|
|
@@ -26684,6 +26758,12 @@ InstancedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
|
|
|
|
|
|
updateMorphTargets: function () {
|
|
updateMorphTargets: function () {
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ dispose: function () {
|
|
|
|
+
|
|
|
|
+ this.dispatchEvent( { type: 'dispose' } );
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
} );
|
|
} );
|