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;
350350proto . initializeGLCamera = function ( ) {
351351
352352 var cameraData = this . fullSceneLayout . camera ;
353- var ortho = ( cameraData . projection . type === 'orthographic' ) ;
353+ var ortho = ( cameraData . projection && cameraData . projection . type === 'orthographic' ) ;
354354
355355 this . camera = createCamera ( this . container , {
356356 center : [ cameraData . center . x , cameraData . center . y , cameraData . center . z ] ,
@@ -791,7 +791,13 @@ proto.saveCamera = function saveCamera(layout) {
791791 }
792792 }
793793 }
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+ }
795801 }
796802
797803 if ( hasChanged ) {
You can’t perform that action at this time.
0 commit comments