@@ -41,6 +41,7 @@ export class BookScene {
4141
4242 private initialCameraOffset = isDev ( ) ? new THREE . Vector3 ( 0 , 0 , 0 ) : new THREE . Vector3 ( 5 , - 5 , - 4 ) ;
4343 private initialCameraUp = isDev ( ) ? new THREE . Vector3 ( 0 , 1 , 0 ) : new THREE . Vector3 ( - 2 , 3 , 3 ) ;
44+ // FIXME: mobile dev 视角有问题
4445
4546 public openingAnimationStatus : 'none' | 'playing' | 'played' = isDev ( ) ? 'played' : 'none' ;
4647
@@ -67,8 +68,6 @@ export class BookScene {
6768 this . videoOverlayManager
6869 ) ;
6970
70- this . handleResize ( ) ; //FIXME: 现在这个 handleResize 不可以放在后面执行
71-
7271 this . renderer . setSize ( container . clientWidth , container . clientHeight ) ;
7372 this . renderer . toneMapping = THREE . NoToneMapping ;
7473 this . renderer . localClippingEnabled = true ;
@@ -79,6 +78,9 @@ export class BookScene {
7978 this . setUpLight ( ) ;
8079 // this.setupLightControls();
8180
81+ this . handleResize ( ) ; //FIXME: 现在这个 handleResize 不可以放在后面执行
82+ window . addEventListener ( 'resize' , ( ) => this . handleResize ( ) ) ;
83+
8284 this . camera . position . add ( this . initialCameraOffset ) ;
8385 this . camera . up . copy ( this . initialCameraUp ) ;
8486 this . camera . lookAt ( 0 , 0 , 0 ) ;
@@ -87,7 +89,6 @@ export class BookScene {
8789 // const axesHelper = new THREE.AxesHelper(5);
8890 // this.scene.add(axesHelper);
8991
90- window . addEventListener ( 'resize' , ( ) => this . handleResize ( ) ) ;
9192 }
9293
9394 private setUpLight ( ) {
0 commit comments