Adjust zoom settings and sync slider with mouse wheel.

- Changed default zoom from 2.5 to 6.0 (further away).
- Reduced max zoom distance from 30 to 15.
- Fixed slider not updating when using mouse wheel zoom.
This commit is contained in:
2026-01-03 00:27:09 +01:00
parent 019e527441
commit 46b5466701
3 changed files with 21 additions and 9 deletions

View File

@@ -7,9 +7,11 @@ export class CameraManager {
// Configuration
// Configuration
this.zoomLevel = 2.5; // Orthographic zoom factor (Lower = Closer)
this.zoomLevel = 6.0; // Started further back as requested
this.aspect = window.innerWidth / window.innerHeight;
this.onZoomChange = null;
// Isometric Setup: Orthographic Camera
this.camera = new THREE.OrthographicCamera(
-this.zoomLevel * this.aspect,
@@ -69,9 +71,10 @@ export class CameraManager {
e.preventDefault();
// Adjust Zoom Level property
if (e.deltaY < 0) this.zoomLevel = Math.max(3, this.zoomLevel - 1);
else this.zoomLevel = Math.min(30, this.zoomLevel + 1);
else this.zoomLevel = Math.min(15, this.zoomLevel + 1);
this.updateProjection();
if (this.onZoomChange) this.onZoomChange(this.zoomLevel);
}, { passive: false });
// Pan Listeners (Middle Click)