@mml-io/3d-web-client-core 0.0.0-experimental-ec5821b-20240201 → 0.0.0-experimental-0d0c89d-20240206
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/camera/CameraManager.d.ts +1 -1
- package/build/index.js +8 -6
- package/build/index.js.map +2 -2
- package/package.json +3 -3
package/build/index.js
CHANGED
@@ -100,8 +100,8 @@ var CameraManager = class {
|
|
100
100
|
this.maxDistance = 8;
|
101
101
|
this.initialFOV = 60;
|
102
102
|
this.fov = this.initialFOV;
|
103
|
-
this.minFOV =
|
104
|
-
this.maxFOV =
|
103
|
+
this.minFOV = 85;
|
104
|
+
this.maxFOV = 60;
|
105
105
|
this.targetFOV = this.initialFOV;
|
106
106
|
this.minPolarAngle = Math.PI * 0.25;
|
107
107
|
this.maxPolarAngle = Math.PI * 0.95;
|
@@ -199,10 +199,12 @@ var CameraManager = class {
|
|
199
199
|
this.fov = this.targetFOV;
|
200
200
|
}
|
201
201
|
adjustCameraPosition() {
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
);
|
202
|
+
const offsetDistance = 0.5;
|
203
|
+
const offset = new Vector32(0, 0, offsetDistance);
|
204
|
+
offset.applyEuler(this.camera.rotation);
|
205
|
+
const rayOrigin = this.camera.position.clone().add(offset);
|
206
|
+
const rayDirection = this.target.clone().sub(rayOrigin).normalize();
|
207
|
+
this.rayCaster.set(rayOrigin, rayDirection);
|
206
208
|
const firstRaycastHit = this.collisionsManager.raycastFirst(this.rayCaster.ray);
|
207
209
|
const cameraToPlayerDistance = this.camera.position.distanceTo(this.target);
|
208
210
|
if (firstRaycastHit !== null && firstRaycastHit[0] <= cameraToPlayerDistance) {
|