@@ -592,6 +592,8 @@ export class Website
592
592
this . viewer . Init ( canvas ) ;
593
593
this . viewer . SetEdgeSettings ( this . settings . edgeSettings ) ;
594
594
this . viewer . SetBackgroundColor ( this . settings . backgroundColor ) ;
595
+ this . viewer . SetNavigationMode ( this . cameraSettings . navigationMode ) ;
596
+ this . viewer . SetProjectionMode ( this . cameraSettings . projectionMode ) ;
595
597
this . UpdateEnvironmentMap ( ) ;
596
598
}
597
599
@@ -651,6 +653,8 @@ export class Website
651
653
}
652
654
653
655
let importer = this . modelLoaderUI . GetImporter ( ) ;
656
+ let navigationModeIndex = ( this . cameraSettings . navigationMode === NavigationMode . FixedUpVector ? 0 : 1 ) ;
657
+ let projectionModeIndex = ( this . cameraSettings . projectionMode === ProjectionMode . Perspective ? 0 : 1 ) ;
654
658
655
659
AddButton ( this . toolbar , 'open' , 'Open from your device' , [ ] , ( ) => {
656
660
this . OpenFileBrowserDialog ( ) ;
@@ -676,7 +680,7 @@ export class Website
676
680
this . viewer . FlipUpVector ( ) ;
677
681
} ) ;
678
682
AddSeparator ( this . toolbar , [ 'only_full_width' , 'only_on_model' ] ) ;
679
- AddRadioButton ( this . toolbar , [ 'fix_up_on' , 'fix_up_off' ] , [ 'Fixed up vector' , 'Free orbit' ] , 0 , [ 'only_full_width' , 'only_on_model' ] , ( buttonIndex ) => {
683
+ AddRadioButton ( this . toolbar , [ 'fix_up_on' , 'fix_up_off' ] , [ 'Fixed up vector' , 'Free orbit' ] , navigationModeIndex , [ 'only_full_width' , 'only_on_model' ] , ( buttonIndex ) => {
680
684
if ( buttonIndex === 0 ) {
681
685
this . cameraSettings . navigationMode = NavigationMode . FixedUpVector ;
682
686
} else if ( buttonIndex === 1 ) {
@@ -686,7 +690,7 @@ export class Website
686
690
this . viewer . SetNavigationMode ( this . cameraSettings . navigationMode ) ;
687
691
} ) ;
688
692
AddSeparator ( this . toolbar , [ 'only_full_width' , 'only_on_model' ] ) ;
689
- AddRadioButton ( this . toolbar , [ 'camera_perspective' , 'camera_orthographic' ] , [ 'Perspective camera' , 'Orthographic camera' ] , 0 , [ 'only_full_width' , 'only_on_model' ] , ( buttonIndex ) => {
693
+ AddRadioButton ( this . toolbar , [ 'camera_perspective' , 'camera_orthographic' ] , [ 'Perspective camera' , 'Orthographic camera' ] , projectionModeIndex , [ 'only_full_width' , 'only_on_model' ] , ( buttonIndex ) => {
690
694
if ( buttonIndex === 0 ) {
691
695
this . cameraSettings . projectionMode = ProjectionMode . Perspective ;
692
696
} else if ( buttonIndex === 1 ) {
0 commit comments