Skip to content

Commit

Permalink
Merge pull request #19487 from Mugen87/dev50
Browse files Browse the repository at this point in the history
WebGLRenderer: Call Scene.on*Render() only for scenes.
  • Loading branch information
mrdoob authored May 28, 2020
2 parents ca9a1ed + 23466af commit 1951823
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 1951823

Please sign in to comment.