浏览代码

Merge pull request #4711 from RaananW/viewer-fixes

Viewer - 2 issues
David Catuhe 7 年之前
父节点
当前提交
79b022aee8
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 3 3
      Viewer/src/configuration/types/extended.ts
  2. 3 2
      Viewer/src/managers/sceneManager.ts

+ 3 - 3
Viewer/src/configuration/types/extended.ts

@@ -62,7 +62,7 @@ export let extendedConfiguration: ViewerConfiguration = {
             intensity: 7,
             intensityMode: 0,
             radius: 0.6,
-            range: 0.6,
+            range: 4.4,
             spotAngle: 60,
             diffuse: {
                 r: 1,
@@ -101,7 +101,7 @@ export let extendedConfiguration: ViewerConfiguration = {
             intensity: 7,
             intensityMode: 0,
             radius: 0.4,
-            range: 0.4,
+            range: 5.8,
             spotAngle: 57,
             diffuse: {
                 r: 1,
@@ -132,7 +132,7 @@ export let extendedConfiguration: ViewerConfiguration = {
             intensity: 1,
             intensityMode: 0,
             radius: 0.5,
-            range: 0.5,
+            range: 6,
             spotAngle: 42.85,
             diffuse: {
                 r: 0.8,

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

@@ -7,6 +7,7 @@ import { ViewerLabs } from '../labs/viewerLabs';
 import { getCustomOptimizerByName } from '../optimizer/custom/';
 import { ObservablesManager } from '../managers/observablesManager';
 import { ConfigurationContainer } from '../configuration/configurationContainer';
+import { deepmerge } from '../helper';
 
 /**
  * This interface describes the structure of the variable sent with the configuration observables of the scene manager.
@@ -796,11 +797,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) {