Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed May 30, 2024
1 parent 5137299 commit 584e29b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,17 @@ class WebGLRenderer {

renderListStack.push( currentRenderList );

if ( _this.xr.getDepthSensingMesh() ) projectObject( _this.xr.getDepthSensingMesh(), camera, - Infinity, _this.sortObjects );
if ( xr.enabled === true && xr.isPresenting === true ) {

const depthSensingMesh = _this.xr.getDepthSensingMesh();

if ( depthSensingMesh !== null ) {

projectObject( depthSensingMesh, camera, - Infinity, _this.sortObjects );

}

}

projectObject( scene, camera, 0, _this.sortObjects );

Expand Down

0 comments on commit 584e29b

Please sign in to comment.