File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ var proto = Scene.prototype;
350
350
proto . initializeGLCamera = function ( ) {
351
351
352
352
var cameraData = this . fullSceneLayout . camera ;
353
- var ortho = ( cameraData . projection . type === 'orthographic' ) ;
353
+ var ortho = ( cameraData . projection && cameraData . projection . type === 'orthographic' ) ;
354
354
355
355
this . camera = createCamera ( this . container , {
356
356
center : [ cameraData . center . x , cameraData . center . y , cameraData . center . z ] ,
@@ -791,7 +791,13 @@ proto.saveCamera = function saveCamera(layout) {
791
791
}
792
792
}
793
793
}
794
- if ( cameraData . projection . type !== cameraDataLastSave . projection . type ) hasChanged = true ;
794
+
795
+ if ( ! cameraDataLastSave . projection || (
796
+ cameraData . projection &&
797
+ cameraData . projection . type !== cameraDataLastSave . projection . type ) ) {
798
+
799
+ hasChanged = true ;
800
+ }
795
801
}
796
802
797
803
if ( hasChanged ) {
You can’t perform that action at this time.
0 commit comments