浏览代码

bug fix when no camera configuration provided

Raanan Weber 7 年之前
父节点
当前提交
3fc7299c02

+ 2 - 2
Viewer/src/viewer/viewer.ts

@@ -861,8 +861,8 @@ export abstract class AbstractViewer {
                 .then(() => {
                     this._configureLights(this._configuration.lights);
 
-                    if (this._configuration.camera) {
-                        this._configureCamera(this._configuration.camera, model);
+                    if (this._configuration.camera || !this.scene.activeCamera) {
+                        this._configureCamera(this._configuration.camera || {}, model);
                     }
                     return this._initEnvironment(model);
                 }).then(() => {

文件差异内容过多而无法显示
+ 5 - 5
dist/preview release/viewer/babylon.viewer.js


+ 2 - 2
dist/preview release/viewer/babylon.viewer.max.js

@@ -94347,8 +94347,8 @@ var AbstractViewer = (function () {
             _this.onModelLoadedObservable.notifyObserversWithPromise(model)
                 .then(function () {
                 _this._configureLights(_this._configuration.lights);
-                if (_this._configuration.camera) {
-                    _this._configureCamera(_this._configuration.camera, model);
+                if (_this._configuration.camera || !_this.scene.activeCamera) {
+                    _this._configureCamera(_this._configuration.camera || {}, model);
                 }
                 return _this._initEnvironment(model);
             }).then(function () {