Browse Source

if overriding vrOptions the defaults would be overwritten

Raanan Weber 7 năm trước cách đây
mục cha
commit
ffe4ec3239
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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) {