@@ -350,12 +350,13 @@ var proto = Scene.prototype;
350350proto . initializeGLCamera = function ( ) {
351351
352352 var cameraData = this . fullSceneLayout . camera ;
353+ var ortho = ( cameraData . projection . type === 'orthographic' ) ;
353354
354355 this . camera = createCamera ( this . container , {
355356 center : [ cameraData . center . x , cameraData . center . y , cameraData . center . z ] ,
356357 eye : [ cameraData . eye . x , cameraData . eye . y , cameraData . eye . z ] ,
357358 up : [ cameraData . up . x , cameraData . up . y , cameraData . up . z ] ,
358- ortho : cameraData . ortho ,
359+ ortho : ortho ,
359360 zoomMin : 0.01 ,
360361 zoomMax : 100 ,
361362 mode : 'orbit'
@@ -750,7 +751,7 @@ function getLayoutCamera(camera) {
750751 up : { x : camera . up [ 0 ] , y : camera . up [ 1 ] , z : camera . up [ 2 ] } ,
751752 center : { x : camera . center [ 0 ] , y : camera . center [ 1 ] , z : camera . center [ 2 ] } ,
752753 eye : { x : camera . eye [ 0 ] , y : camera . eye [ 1 ] , z : camera . eye [ 2 ] } ,
753- ortho : ! ! camera . ortho
754+ projection : { type : ( camera . projection && camera . projection . type === 'orthographic' ) ? 'orthographic' : 'perspective' }
754755 } ;
755756}
756757
@@ -790,7 +791,7 @@ proto.saveCamera = function saveCamera(layout) {
790791 }
791792 }
792793 }
793- if ( cameraData . ortho !== cameraDataLastSave . ortho ) hasChanged = true ;
794+ if ( cameraData . projection . type !== cameraDataLastSave . projection . type ) hasChanged = true ;
794795 }
795796
796797 if ( hasChanged ) {
0 commit comments