diff --git a/src/scenes/camera-rotating-scene.ts b/src/scenes/camera-rotating-scene.ts index b36b46a..0f3da51 100644 --- a/src/scenes/camera-rotating-scene.ts +++ b/src/scenes/camera-rotating-scene.ts @@ -19,15 +19,14 @@ export class CameraRotatingScene extends Scene { new Vector3(0, 100, -500), )); camera.rotate(Vector3.left, Math.PI / 9); - camera.rotate(Vector3.up, Math.PI / 6); const DEFAULT_ANGLE = Math.PI / 3; - const cube = this.createObject('cube', { + const shuttle = this.createObject('shuttle', { position: Vector3.zero, - scale: new Vector3(100, 100, 100), - color: new Color(0, 0, 255, 0.5), + scale: new Vector3(20, 20, 20), + color: new Color(0, 0, 255, 0.6), }); - cube.rotate(Vector3.up, DEFAULT_ANGLE); + shuttle.rotate(Vector3.left, Math.PI / 1.5); // X axis const xCube = this.createObject('cube', { @@ -105,22 +104,14 @@ export class CameraRotatingScene extends Scene { } onBeforeUpdate(): void { - const speed = 0.005; - if (this.count < 200) { - this.mainCamera.fov -= 0.0001; - // this.mainCamera.rotate(Vector3.down, speed); - // this.count++; - } else if (this.count < 400) { - this.mainCamera.fov += 0.0001; - // this.mainCamera.rotate(Vector3.up, speed); - // this.count++; - } else { - this.count = 0; - } - console.log(this.mainCamera.fov); + this.mainCamera.rotate(Vector3.up, 0.02); } async prepareResources(): Promise { - await Promise.all([this.resourceLoader.loadObject('cube'), this.resourceLoader.loadObject('pyramid')]); + await Promise.all([ + this.resourceLoader.loadObject('shuttle'), + this.resourceLoader.loadObject('cube'), + this.resourceLoader.loadObject('pyramid'), + ]); } }