@drawcall/acta 0.1.22 → 0.1.23
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/dist/behavior.d.ts +3 -0
- package/dist/behavior.js +5 -1
- package/package.json +1 -1
package/dist/behavior.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export declare class CharacterBehavior extends EventDispatcher<CharacterBehavior
|
|
|
28
28
|
private readonly computedProperties;
|
|
29
29
|
worldHeadDirection: Vector3 | undefined;
|
|
30
30
|
worldAimDirection: Vector3 | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* vector representing the movement velocity in world space with meter per second as unit
|
|
33
|
+
*/
|
|
31
34
|
readonly worldMoveVelocity: Vector3;
|
|
32
35
|
private abortController;
|
|
33
36
|
private updateTimeline?;
|
package/dist/behavior.js
CHANGED
|
@@ -47,11 +47,15 @@ export class CharacterBehavior extends EventDispatcher {
|
|
|
47
47
|
applyJump;
|
|
48
48
|
properties = {};
|
|
49
49
|
computedProperties = {
|
|
50
|
-
|
|
50
|
+
// < 0.02 m/s (2 cm per second) is generally imperceptible to the human eye
|
|
51
|
+
isMoving: () => this.worldMoveVelocity.length() > 0.05,
|
|
51
52
|
};
|
|
52
53
|
// Direction and movement properties
|
|
53
54
|
worldHeadDirection;
|
|
54
55
|
worldAimDirection;
|
|
56
|
+
/**
|
|
57
|
+
* vector representing the movement velocity in world space with meter per second as unit
|
|
58
|
+
*/
|
|
55
59
|
worldMoveVelocity = new Vector3(0, 0, 0);
|
|
56
60
|
abortController = new AbortController();
|
|
57
61
|
updateTimeline;
|