|
@@ -120,13 +120,8 @@ export class WebXRExperienceHelper implements IDisposable {
|
|
}).then(() => {
|
|
}).then(() => {
|
|
// run the render loop
|
|
// run the render loop
|
|
this.sessionManager.runXRRenderLoop();
|
|
this.sessionManager.runXRRenderLoop();
|
|
- // Cache pre xr scene settings
|
|
|
|
- this._originalSceneAutoClear = this.scene.autoClear;
|
|
|
|
this._nonVRCamera = this.scene.activeCamera;
|
|
this._nonVRCamera = this.scene.activeCamera;
|
|
|
|
|
|
- // Overwrite current scene settings
|
|
|
|
- this.scene.autoClear = false;
|
|
|
|
-
|
|
|
|
this.scene.activeCamera = this.camera;
|
|
this.scene.activeCamera = this.camera;
|
|
// do not compensate when AR session is used
|
|
// do not compensate when AR session is used
|
|
if (sessionMode !== 'immersive-ar') {
|
|
if (sessionMode !== 'immersive-ar') {
|
|
@@ -141,8 +136,6 @@ export class WebXRExperienceHelper implements IDisposable {
|
|
c.outputRenderTarget = null;
|
|
c.outputRenderTarget = null;
|
|
});
|
|
});
|
|
|
|
|
|
- // Restore scene settings
|
|
|
|
- this.scene.autoClear = this._originalSceneAutoClear;
|
|
|
|
this.scene.activeCamera = this._nonVRCamera;
|
|
this.scene.activeCamera = this._nonVRCamera;
|
|
if (sessionMode !== 'immersive-ar' && this.camera.compensateOnFirstFrame) {
|
|
if (sessionMode !== 'immersive-ar' && this.camera.compensateOnFirstFrame) {
|
|
if ((<any>this._nonVRCamera).setPosition) {
|
|
if ((<any>this._nonVRCamera).setPosition) {
|