Update engine.ts

This commit is contained in:
syuilo 2026-06-02 18:50:58 +09:00
commit 3a97e26f80

View file

@ -450,8 +450,13 @@ export class RoomEngine extends EngineBase<{
if (this.grabbingCtx != null) {
this.changeGrabbingDistance(ev.delta * 0.1);
} else {
this.camera.fov += -ev.delta * 0.003;
this.camera.fov = Math.max(0.25, Math.min(this.fov, this.camera.fov));
if (this.scene.activeCamera === this.camera) {
this.camera.fov += -ev.delta * 0.003;
this.camera.fov = Math.max(0.25, Math.min(this.fov, this.camera.fov));
} else if (this.scene.activeCamera === this.fixedCamera) {
this.fixedCamera.fov += -ev.delta * 0.003;
this.fixedCamera.fov = Math.max(0.25, Math.min(this.fov, this.fixedCamera.fov));
}
}
});