Tweak: camera FOVs

This commit is contained in:
Dejvino 2025-11-22 17:10:48 +01:00
parent 363e56ff18
commit 2613d152dd

View File

@ -19,12 +19,14 @@ export class CameraManager extends SceneFeature {
init() { init() {
// The main camera from init.js is our first camera // The main camera from init.js is our first camera
const mainCamera = state.camera; const mainCamera = state.camera;
this.cameras.push({ mainCamera.fov = 20;
const mainCameraSetup = {
camera: mainCamera, camera: mainCamera,
type: 'dynamic', type: 'dynamic',
name: 'MainDynamicCamera', name: 'MainDynamicCamera',
update: this.updateDynamicCamera, // Assign its update function update: this.updateDynamicCamera, // Assign its update function
}); };
this.cameras.push(mainCameraSetup);
// --- Static Camera 1: Left Aisle View --- // --- Static Camera 1: Left Aisle View ---
const staticCam1 = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100); const staticCam1 = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100);
@ -37,7 +39,7 @@ export class CameraManager extends SceneFeature {
}); });
// --- Static Camera 2: Right Aisle View --- // --- Static Camera 2: Right Aisle View ---
const staticCam2 = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100); const staticCam2 = new THREE.PerspectiveCamera(65, window.innerWidth / window.innerHeight, 0.1, 100);
staticCam2.position.set(5, 4, -12); staticCam2.position.set(5, 4, -12);
staticCam2.lookAt(0, 1.5, -18); // Look at the stage staticCam2.lookAt(0, 1.5, -18); // Look at the stage
this.cameras.push({ this.cameras.push({
@ -47,7 +49,7 @@ export class CameraManager extends SceneFeature {
}); });
// --- Static Camera 3: Far-Back view --- // --- Static Camera 3: Far-Back view ---
const staticCam3 = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100); const staticCam3 = new THREE.PerspectiveCamera(65, window.innerWidth / window.innerHeight, 0.1, 100);
staticCam3.position.set(0, 3, 12); staticCam3.position.set(0, 3, 12);
staticCam3.lookAt(0, 1.5, -20); // Look at the stage staticCam3.lookAt(0, 1.5, -20); // Look at the stage
this.cameras.push({ this.cameras.push({
@ -57,7 +59,7 @@ export class CameraManager extends SceneFeature {
}); });
// --- Static Camera 3: Back view --- // --- Static Camera 3: Back view ---
const staticCam4 = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 100); const staticCam4 = new THREE.PerspectiveCamera(55, window.innerWidth / window.innerHeight, 0.1, 100);
staticCam4.position.set(0, 4, 0); staticCam4.position.set(0, 4, 0);
staticCam4.lookAt(0, 1.5, -20); // Look at the stage staticCam4.lookAt(0, 1.5, -20); // Look at the stage
this.cameras.push({ this.cameras.push({
@ -66,6 +68,9 @@ export class CameraManager extends SceneFeature {
name: 'BackCam' name: 'BackCam'
}); });
// make the main camera come up more often
this.cameras.push(mainCameraSetup);
// --- Add Debug Helpers --- // --- Add Debug Helpers ---
if (state.debugCamera) { if (state.debugCamera) {
this.cameras.forEach(camData => { this.cameras.forEach(camData => {
@ -75,7 +80,7 @@ export class CameraManager extends SceneFeature {
} }
this.lastSwitchTime = state.clock.getElapsedTime(); this.lastSwitchTime = state.clock.getElapsedTime();
this.switchCamera(4); this.switchCamera(0);
} }
// This is the logic moved from animate.js // This is the logic moved from animate.js