@mml-io/3d-web-client-core 0.0.0-experimental-36db237-20250514 → 0.0.0-experimental-d8bb262-20250624
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.
@@ -59,6 +59,7 @@ export declare class CameraManager {
|
|
59
59
|
private easeOutExpo;
|
60
60
|
updateAspect(aspect: number): void;
|
61
61
|
recomputeFoV(immediately?: boolean): void;
|
62
|
+
isFlyCameraOn(): boolean;
|
62
63
|
toggleFlyCamera(): void;
|
63
64
|
get activeCamera(): PerspectiveCamera;
|
64
65
|
update(): void;
|
package/build/index.js
CHANGED
@@ -431,6 +431,9 @@ var CameraManager = class {
|
|
431
431
|
this.fov = this.targetFOV;
|
432
432
|
}
|
433
433
|
}
|
434
|
+
isFlyCameraOn() {
|
435
|
+
return this.isMainCameraActive === false && this.orbitControls.enabled === true;
|
436
|
+
}
|
434
437
|
toggleFlyCamera() {
|
435
438
|
this.isMainCameraActive = !this.isMainCameraActive;
|
436
439
|
this.orbitControls.enabled = !this.isMainCameraActive;
|
@@ -1530,6 +1533,7 @@ var Character = class extends Group {
|
|
1530
1533
|
};
|
1531
1534
|
|
1532
1535
|
// src/character/CharacterManager.ts
|
1536
|
+
import { radToDeg } from "@mml-io/mml-web";
|
1533
1537
|
import { Euler as Euler2, Group as Group2, Quaternion as Quaternion5, Vector3 as Vector39 } from "three";
|
1534
1538
|
|
1535
1539
|
// src/character/LocalController.ts
|
@@ -2318,9 +2322,14 @@ var CharacterManager = class {
|
|
2318
2322
|
}
|
2319
2323
|
getLocalCharacterPositionAndRotation() {
|
2320
2324
|
if (this.localCharacter && this.localCharacter && this.localCharacter) {
|
2325
|
+
const rotation = this.localCharacter.rotation;
|
2321
2326
|
return {
|
2322
2327
|
position: this.localCharacter.position,
|
2323
|
-
rotation:
|
2328
|
+
rotation: {
|
2329
|
+
x: radToDeg(rotation.x),
|
2330
|
+
y: radToDeg(rotation.y),
|
2331
|
+
z: radToDeg(rotation.z)
|
2332
|
+
}
|
2324
2333
|
};
|
2325
2334
|
}
|
2326
2335
|
return {
|
@@ -2556,8 +2565,17 @@ var KeyInputManager = class {
|
|
2556
2565
|
return this.keys.get(key) || false;
|
2557
2566
|
}
|
2558
2567
|
createKeyBinding(key, callback) {
|
2568
|
+
if (this.bindings.has(key)) {
|
2569
|
+
return;
|
2570
|
+
}
|
2559
2571
|
this.bindings.set(key, callback);
|
2560
2572
|
}
|
2573
|
+
removeKeyBinding(key) {
|
2574
|
+
if (!this.bindings.has(key)) {
|
2575
|
+
return;
|
2576
|
+
}
|
2577
|
+
this.bindings.delete(key);
|
2578
|
+
}
|
2561
2579
|
isMovementKeyPressed() {
|
2562
2580
|
return ["w" /* W */, "a" /* A */, "s" /* S */, "d" /* D */].some((key) => this.isKeyPressed(key));
|
2563
2581
|
}
|