diff --git a/examples/jsm/renderers/CSS2DRenderer.js b/examples/jsm/renderers/CSS2DRenderer.js index 8bf63c4d3736a5..3380f5e7598b80 100644 --- a/examples/jsm/renderers/CSS2DRenderer.js +++ b/examples/jsm/renderers/CSS2DRenderer.js @@ -124,6 +124,7 @@ class CSS2DRenderer { hideObject( object.children[ i ] ); } + } function renderObject( object, scene, camera ) { @@ -186,7 +187,7 @@ class CSS2DRenderer { const result = []; - scene.traverse( function ( object ) { + scene.traverseVisible( function ( object ) { if ( object.isCSS2DObject ) result.push( object );