Sfoglia il codice sorgente

if overriding vrOptions the defaults would be overwritten

Raanan Weber 7 anni fa
parent
commit
ffe4ec3239
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      Viewer/src/managers/sceneManager.ts

+ 2 - 2
Viewer/src/managers/sceneManager.ts

@@ -796,11 +796,11 @@ export class SceneManager {
             }
             return;
         }
-        let vrOptions: VRExperienceHelperOptions = vrConfig.vrOptions || {
+        let vrOptions: VRExperienceHelperOptions = deepmerge({
             useCustomVRButton: true,
             createDeviceOrientationCamera: false,
             trackPosition: true
-        }
+        }, vrConfig.vrOptions || {});
 
         this._vrHelper = this.scene.createDefaultVRExperience(vrOptions);
         if (!vrConfig.disableInteractions) {