diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 2d3a542bb92465..bf7e418ebd777f 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -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(); @@ -1247,7 +1247,7 @@ function WebGLRenderer( parameters ) { // - scene.onAfterRender( _this, scene, camera ); + if ( scene.isScene ) scene.onAfterRender( _this, scene, camera ); //