|
@@ -26535,7 +26535,7 @@ class WebXRDepthSensing {
|
|
|
|
|
|
}
|
|
|
|
|
|
- render( renderer, cameraXR ) {
|
|
|
+ getMesh( cameraXR ) {
|
|
|
|
|
|
if ( this.texture !== null ) {
|
|
|
|
|
@@ -26556,10 +26556,10 @@ class WebXRDepthSensing {
|
|
|
|
|
|
}
|
|
|
|
|
|
- renderer.render( this.mesh, cameraXR );
|
|
|
-
|
|
|
}
|
|
|
|
|
|
+ return this.mesh;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
reset() {
|
|
@@ -27223,6 +27223,12 @@ class WebXRManager extends EventDispatcher {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ this.getDepthSensingMesh = function () {
|
|
|
+
|
|
|
+ return depthSensing.getMesh( cameraXR );
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
// Animation Loop
|
|
|
|
|
|
let onAnimationFrameCallback = null;
|
|
@@ -27348,8 +27354,6 @@ class WebXRManager extends EventDispatcher {
|
|
|
|
|
|
}
|
|
|
|
|
|
- depthSensing.render( renderer, cameraXR );
|
|
|
-
|
|
|
if ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame );
|
|
|
|
|
|
if ( frame.detectedPlanes ) {
|
|
@@ -29437,6 +29441,18 @@ class WebGLRenderer {
|
|
|
|
|
|
renderListStack.push( currentRenderList );
|
|
|
|
|
|
+ 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 );
|
|
|
|
|
|
currentRenderList.finish();
|