File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,7 +236,6 @@ class DevGUI {
236236 devHelpers . add ( this . webglPreview , 'render' ) . listen ( ) ;
237237 devHelpers . add ( this . webglPreview , 'clear' ) . listen ( ) ;
238238
239-
240239 devHelpers . add ( this . webglPreview , 'saveCamera' ) . listen ( ) ;
241240 devHelpers . add ( this . webglPreview , 'loadCamera' ) . listen ( ) ;
242241 devHelpers . add ( this . webglPreview , 'clearCamera' ) . listen ( ) ;
Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ export class WebGLPreview {
282282 this . controls = new OrbitControls ( this . camera , this . renderer . domElement ) ;
283283
284284 this . loadCamera ( ) ;
285-
285+
286286 this . initScene ( ) ;
287287 this . animate ( ) ;
288288
@@ -1027,14 +1027,14 @@ export class WebGLPreview {
10271027 }
10281028 }
10291029
1030- saveCamera ( ) {
1031- localStorage . setItem ( 'cameraPosition' , JSON . stringify ( this . camera . position ) ) ;
1032- localStorage . setItem ( 'cameraRotation' , JSON . stringify ( this . camera . rotation ) ) ;
1033- localStorage . setItem ( 'cameraZoom' , JSON . stringify ( this . camera . zoom ) ) ;
1034- localStorage . setItem ( 'cameraTarget' , JSON . stringify ( this . controls . target ) ) ;
1035- }
1030+ saveCamera ( ) {
1031+ localStorage . setItem ( 'cameraPosition' , JSON . stringify ( this . camera . position ) ) ;
1032+ localStorage . setItem ( 'cameraRotation' , JSON . stringify ( this . camera . rotation ) ) ;
1033+ localStorage . setItem ( 'cameraZoom' , JSON . stringify ( this . camera . zoom ) ) ;
1034+ localStorage . setItem ( 'cameraTarget' , JSON . stringify ( this . controls . target ) ) ;
1035+ }
10361036 loadCamera ( ) {
1037- const position = JSON . parse ( localStorage . getItem ( 'cameraPosition' ) ) ;
1037+ const position = JSON . parse ( localStorage . getItem ( 'cameraPosition' ) ) ;
10381038 const rotation = JSON . parse ( localStorage . getItem ( 'cameraRotation' ) ) ;
10391039 const zoom = JSON . parse ( localStorage . getItem ( 'cameraZoom' ) ) ;
10401040 const target = JSON . parse ( localStorage . getItem ( 'cameraTarget' ) ) ;
You can’t perform that action at this time.
0 commit comments