소스 검색

Merge pull request #3987 from RaananW/small-feature-viewer

bug fix when no camera configuration provided
Raanan Weber 7 년 전
부모
커밋
4f05cec95d
3개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 2 2
      Viewer/src/viewer/viewer.ts
  2. 5 5
      dist/preview release/viewer/babylon.viewer.js
  3. 2 2
      dist/preview release/viewer/babylon.viewer.max.js

+ 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 () {