Skip to content

Commit

Permalink
WebGLRenderer: Call Scene.on*Render() only for scenes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed May 28, 2020
1 parent b993f5c commit 23466af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ function WebGLRenderer( parameters ) {
}

//
scene.onBeforeRender( _this, scene, camera, renderTarget || _currentRenderTarget );
if ( scene.isScene ) scene.onBeforeRender( _this, scene, camera, renderTarget || _currentRenderTarget );

currentRenderState = renderStates.get( scene, camera );
currentRenderState.init();
Expand Down Expand Up @@ -1247,7 +1247,7 @@ function WebGLRenderer( parameters ) {

//

scene.onAfterRender( _this, scene, camera );
if ( scene.isScene ) scene.onAfterRender( _this, scene, camera );

//

Expand Down

0 comments on commit 23466af

Please sign in to comment.