@woosh/meep-engine 2.124.11 → 2.124.13

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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/core/assert.d.ts +8 -0
  4. package/src/core/assert.d.ts.map +1 -1
  5. package/src/core/assert.js +14 -0
  6. package/src/core/debug/matchers/IsFinite.d.ts +6 -0
  7. package/src/core/debug/matchers/IsFinite.d.ts.map +1 -0
  8. package/src/core/debug/matchers/IsFinite.js +11 -0
  9. package/src/core/debug/matchers/IsInteger.d.ts +6 -0
  10. package/src/core/debug/matchers/IsInteger.d.ts.map +1 -0
  11. package/src/core/debug/matchers/IsInteger.js +11 -0
  12. package/src/core/debug/matchers/IsUndefined.js +1 -0
  13. package/src/core/debug/matchers/matchers.d.ts +5 -0
  14. package/src/core/debug/matchers/matchers.d.ts.map +1 -1
  15. package/src/core/debug/matchers/matchers.js +14 -0
  16. package/src/core/math/interval/NumericInterval.d.ts +49 -9
  17. package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
  18. package/src/core/math/interval/NumericInterval.js +91 -13
  19. package/src/core/math/spline/spline_hermite3_bounds.d.ts +7 -7
  20. package/src/core/math/spline/spline_hermite3_bounds.d.ts.map +1 -1
  21. package/src/core/math/spline/spline_hermite3_bounds.js +13 -7
  22. package/src/core/model/ObservedBoolean.d.ts +3 -3
  23. package/src/core/model/ObservedBoolean.d.ts.map +1 -1
  24. package/src/core/model/ObservedBoolean.js +3 -3
  25. package/src/core/model/ObservedEnum.d.ts.map +1 -1
  26. package/src/core/model/ObservedEnum.js +52 -11
  27. package/src/core/model/ObservedInteger.d.ts +7 -7
  28. package/src/core/model/ObservedInteger.d.ts.map +1 -1
  29. package/src/core/model/ObservedInteger.js +12 -11
  30. package/src/engine/animation/AnimationUtils.js +1 -1
  31. package/src/engine/animation/curve/AnimationCurve.d.ts +25 -9
  32. package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
  33. package/src/engine/animation/curve/AnimationCurve.js +40 -18
  34. package/src/engine/animation/curve/Keyframe.d.ts +4 -2
  35. package/src/engine/animation/curve/Keyframe.d.ts.map +1 -1
  36. package/src/engine/animation/curve/Keyframe.js +6 -2
  37. package/src/engine/animation/curve/animation_curve_compute_aabb.js +1 -1
  38. package/src/engine/animation/curve/animation_curve_optimize.d.ts +2 -1
  39. package/src/engine/animation/curve/animation_curve_optimize.d.ts.map +1 -1
  40. package/src/engine/animation/curve/animation_curve_optimize.js +6 -0
  41. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  42. package/src/engine/ecs/EntityComponentDataset.js +25 -7
  43. package/src/engine/ecs/EntityManager.d.ts +1 -1
  44. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  45. package/src/engine/ecs/EntityManager.js +49 -23
  46. package/src/engine/ecs/EntityObserver.d.ts.map +1 -1
  47. package/src/engine/ecs/EntityObserver.js +9 -0
  48. package/src/engine/ecs/util/EntityBuilderUtils.d.ts.map +1 -0
  49. package/src/engine/ecs/{EntityBuilderUtils.js → util/EntityBuilderUtils.js} +1 -1
  50. package/src/engine/ecs/EntityBuilderUtils.d.ts.map +0 -1
  51. /package/src/engine/ecs/{EntityBuilderUtils.d.ts → util/EntityBuilderUtils.d.ts} +0 -0
@@ -1,16 +1,34 @@
1
1
  import { assert } from "../assert.js";
2
2
  import Signal from "../events/signal/Signal.js";
3
3
 
4
+ /**
5
+ * Enumerable value abstraction. Think `enum` keyword in TypeScript or any other programming language.
6
+ * Given a set of valid values, holds one of such values.
7
+ * This is an observable value, meaning you can subscribe to be notified of changes via {@link onChanged} signal.
8
+ *
9
+ * @example
10
+ * const v = new ObservedEnum(7, {
11
+ * ONE: 1,
12
+ * SEVEN: 7
13
+ * });
14
+ *
15
+ * v.getValue(); // 7
16
+ *
17
+ * v.set(1);
18
+ *
19
+ * v.getValue(); // 1
20
+ *
21
+ * v.set(2); // will throw error, as 2 is not a valid enum value
22
+ */
4
23
  class ObservedEnum {
5
24
  /**
6
25
  * @template T
7
26
  * @param {T} value
8
27
  * @param {Object.<string,T>} validSet
9
- * @constructor
10
28
  */
11
29
  constructor(value, validSet) {
12
- assert.equal(typeof validSet, "object", `ValidSet must be of type "object", instead was ${typeof validSet}`);
13
- assert.notEqual(Object.values(validSet).indexOf(value), -1, `Value must be one of [${Object.values(validSet).join(", ")}], instead was "${value}"`);
30
+ assert.isObject(validSet, "validSet");
31
+ assert.enum(value, validSet, "value");
14
32
 
15
33
  /**
16
34
  *
@@ -18,13 +36,22 @@ class ObservedEnum {
18
36
  * @private
19
37
  */
20
38
  this.__value = value;
39
+ /**
40
+ *
41
+ * @type {Object<string, T>}
42
+ * @private
43
+ */
21
44
  this.__validSet = validSet;
22
45
 
46
+ /**
47
+ * @readonly
48
+ * @type {Signal<T,T>}
49
+ */
23
50
  this.onChanged = new Signal();
24
51
  }
25
52
 
26
53
  /**
27
- *
54
+ * Do not modify result
28
55
  * @returns {Object<string, T>}
29
56
  */
30
57
  getValidValueSet() {
@@ -37,7 +64,7 @@ class ObservedEnum {
37
64
  * @returns {ObservedEnum}
38
65
  */
39
66
  set(value) {
40
- assert.notEqual(Object.values(this.__validSet).indexOf(value), -1, `Value must be one of [${Object.values(this.__validSet).join(", ")}], instead was "${value}"`);
67
+ assert.enum(value, this.__validSet, "value")
41
68
 
42
69
  const oldValue = this.__value;
43
70
  if (oldValue !== value) {
@@ -49,14 +76,32 @@ class ObservedEnum {
49
76
  }
50
77
 
51
78
  /**
52
- * @template X
53
- * @param {ObservedEnum<X>} other
79
+ * @template T
80
+ * @param {ObservedEnum<T>} other
54
81
  * @returns {boolean}
55
82
  */
56
83
  equals(other) {
57
84
  return this.__value === other.__value;
58
85
  }
59
86
 
87
+ /**
88
+ *
89
+ * @return {number}
90
+ */
91
+ hash() {
92
+ let hash = 0;
93
+
94
+ for (const n of this.__validSet) {
95
+ if(this.__validSet[n] === this.__value) {
96
+ break;
97
+ }
98
+
99
+ hash++;
100
+ }
101
+
102
+ return hash;
103
+ }
104
+
60
105
  /**
61
106
  *
62
107
  * @param {ObservedEnum} other
@@ -73,10 +118,6 @@ class ObservedEnum {
73
118
  return this.__value;
74
119
  }
75
120
 
76
- invert() {
77
- this.set(!this.__value);
78
- }
79
-
80
121
  /**
81
122
  *
82
123
  * @param {function(T,T)} processor
@@ -2,7 +2,7 @@ export default ObservedInteger;
2
2
  declare class ObservedInteger extends Number {
3
3
  /**
4
4
  *
5
- * @param {Number} [value]
5
+ * @param {number} [value=0]
6
6
  * @constructor
7
7
  */
8
8
  constructor(value?: number);
@@ -13,17 +13,17 @@ declare class ObservedInteger extends Number {
13
13
  readonly onChanged: Signal;
14
14
  /**
15
15
  *
16
- * @type {Number}
16
+ * @type {number}
17
17
  * @private
18
18
  */
19
19
  private __value;
20
20
  toString(): string;
21
21
  /**
22
22
  *
23
- * @param {Number} value
24
- * @returns {ObservedInteger}
23
+ * @param {number} value
24
+ * @returns {this}
25
25
  */
26
- set(value: number): ObservedInteger;
26
+ set(value: number): this;
27
27
  /**
28
28
  * Set value without dispatching change notification
29
29
  * @param {number} value
@@ -64,7 +64,7 @@ declare class ObservedInteger extends Number {
64
64
  decrement(): void;
65
65
  /**
66
66
  *
67
- * @returns {Number}
67
+ * @returns {number}
68
68
  */
69
69
  getValue(): number;
70
70
  /**
@@ -80,7 +80,7 @@ declare class ObservedInteger extends Number {
80
80
  equals(other: ObservedInteger): boolean;
81
81
  /**
82
82
  *
83
- * @returns {Number}
83
+ * @returns {number}
84
84
  */
85
85
  hash(): number;
86
86
  toJSON(): number;
@@ -1 +1 @@
1
- {"version":3,"file":"ObservedInteger.d.ts","sourceRoot":"","sources":["../../../../src/core/model/ObservedInteger.js"],"names":[],"mappings":";AAGA;IAOI;;;;OAIG;IACH,4BAcC;IAzBD;;;OAGG;IACH,oBAFU,MAAM,CAES;IAcrB;;;;OAIG;IACH,gBAAoB;IAYxB,mBAEC;IAED;;;;OAIG;IACH,oBAFa,eAAe,CAa3B;IAED;;;OAGG;IACH,iBAFW,MAAM,QAOhB;IAED;;;OAGG;IACH,UAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,gBAFW,eAAe,QAIzB;IAED;;;OAGG;IACH,iBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,WAFW,eAAe,QAIzB;IAED;;;OAGG;IACH,YAFW,MAAM,QAIhB;IAED;;OAEG;IACH,kBAEC;IAED;;OAEG;IACH,kBAEC;IAED;;;OAGG;IACH,mBAEC;IAED;;;OAGG;IACH,YAFW,eAAe,QAIzB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACb,OAAO,CAInB;IAED;;;OAGG;IACH,eAEC;IAED,iBAEC;IAED,yBAEC;IAED;;;OAGG;IACH,uBAFW,YAAY,QAatB;IAED;;;OAGG;IACH,yBAFW,YAAY,QAYtB;IAIL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAP1C;mBAtMkB,4BAA4B"}
1
+ {"version":3,"file":"ObservedInteger.d.ts","sourceRoot":"","sources":["../../../../src/core/model/ObservedInteger.js"],"names":[],"mappings":";AAIA;IAOI;;;;OAIG;IACH,oBAHW,MAAM,EAgBhB;IAxBD;;;OAGG;IACH,oBAFU,MAAM,CAES;IAarB;;;;OAIG;IACH,gBAAoB;IAYxB,mBAEC;IAED;;;;OAIG;IACH,WAHW,MAAM,GACJ,IAAI,CAchB;IAED;;;OAGG;IACH,iBAFW,MAAM,QAOhB;IAED;;;OAGG;IACH,UAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,gBAFW,eAAe,QAIzB;IAED;;;OAGG;IACH,iBAFW,MAAM,QAIhB;IAED;;;OAGG;IACH,WAFW,eAAe,QAIzB;IAED;;;OAGG;IACH,YAFW,MAAM,QAIhB;IAED;;OAEG;IACH,kBAEC;IAED;;OAEG;IACH,kBAEC;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,YAFW,eAAe,QAIzB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACb,OAAO,CAInB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED,iBAEC;IAED,yBAEC;IAED;;;OAGG;IACH,uBAFW,YAAY,QAatB;IAED;;;OAGG;IACH,yBAFW,YAAY,QAYtB;IAIL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAP1C;mBAtMkB,4BAA4B"}
@@ -1,4 +1,5 @@
1
1
  import { assert } from "../assert.js";
2
+ import { anyOf, isInfinite, isInteger } from "../debug/matchers/matchers.js";
2
3
  import Signal from "../events/signal/Signal.js";
3
4
 
4
5
  class ObservedInteger extends Number {
@@ -10,19 +11,18 @@ class ObservedInteger extends Number {
10
11
 
11
12
  /**
12
13
  *
13
- * @param {Number} [value]
14
+ * @param {number} [value=0]
14
15
  * @constructor
15
16
  */
16
17
  constructor(value = 0) {
17
18
  super();
18
19
 
19
20
  assert.isNumber(value, 'value');
20
- assert.ok(Number.isInteger(value) || !Number.isFinite(value), `Value must be an integer, instead was ${value}`);
21
-
21
+ assert.that(value,'value',anyOf(isInfinite(),isInteger()))
22
22
 
23
23
  /**
24
24
  *
25
- * @type {Number}
25
+ * @type {number}
26
26
  * @private
27
27
  */
28
28
  this.__value = value;
@@ -31,7 +31,7 @@ class ObservedInteger extends Number {
31
31
 
32
32
  /**
33
33
  *
34
- * @returns {Number}
34
+ * @returns {number}
35
35
  */
36
36
  valueOf() {
37
37
  return this.getValue();
@@ -43,12 +43,13 @@ class ObservedInteger extends Number {
43
43
 
44
44
  /**
45
45
  *
46
- * @param {Number} value
47
- * @returns {ObservedInteger}
46
+ * @param {number} value
47
+ * @returns {this}
48
48
  */
49
49
  set(value) {
50
50
  assert.isNumber(value, 'value');
51
- assert.ok(Number.isInteger(value) || !Number.isFinite(value), `Value must be an integer, instead was ${value}`);
51
+ assert.that(value,'value',anyOf(isInfinite(),isInteger()))
52
+
52
53
 
53
54
  const oldValue = this.__value;
54
55
  if (oldValue !== value) {
@@ -65,7 +66,7 @@ class ObservedInteger extends Number {
65
66
  */
66
67
  setSilent(value) {
67
68
  assert.isNumber(value, 'value');
68
- assert.ok(Number.isInteger(value) || !Number.isFinite(value), `Value must be an integer, instead was ${value}`);
69
+ assert.that(value,'value',anyOf(isInfinite(),isInteger()))
69
70
 
70
71
  this.__value = value;
71
72
  }
@@ -126,7 +127,7 @@ class ObservedInteger extends Number {
126
127
 
127
128
  /**
128
129
  *
129
- * @returns {Number}
130
+ * @returns {number}
130
131
  */
131
132
  getValue() {
132
133
  return this.__value;
@@ -151,7 +152,7 @@ class ObservedInteger extends Number {
151
152
 
152
153
  /**
153
154
  *
154
- * @returns {Number}
155
+ * @returns {number}
155
156
  */
156
157
  hash() {
157
158
  return this.__value;
@@ -1,8 +1,8 @@
1
1
  import { SerializationMetadata } from "../ecs/components/SerializationMetadata.js";
2
2
  import Timer from "../ecs/components/Timer.js";
3
3
  import Entity from "../ecs/Entity.js";
4
- import { whenAllEntitiesDestroyed, whenEntityDestroyed } from "../ecs/EntityBuilderUtils.js";
5
4
  import { Transform } from "../ecs/transform/Transform.js";
5
+ import { whenAllEntitiesDestroyed, whenEntityDestroyed } from "../ecs/util/EntityBuilderUtils.js";
6
6
  import { removeComponentsExcept } from "../ecs/util/removeComponentsExcept.js";
7
7
  import { createSound, createTimer } from "../EntityCreator.js";
8
8
  import Mesh from "../graphics/ecs/mesh/Mesh.js";
@@ -3,6 +3,15 @@
3
3
  * Values are stored in {@link Keyframe}s, interpolation is defined by tangents on {@link Keyframe}s.
4
4
  * The curve is a cubic Hermite spline, see https://en.wikipedia.org/wiki/Cubic_Hermite_spline.
5
5
  *
6
+ * @example
7
+ * const jump_curve = AnimationCurve.from([
8
+ * Keyframe.from(0, 0), // start at height 0
9
+ * Keyframe.from(0.3, 2), // at time 0.3, jump height will be 2 meters
10
+ * Keyframe.from(1, 0) // at time 1.0, land back on the ground
11
+ * ]);
12
+ *
13
+ * jump_curve.evaluate(0.1); // what is the height at time 0.1?
14
+ *
6
15
  * @author Alex Goldring
7
16
  * @copyright Company Named Limited (c) 2025
8
17
  */
@@ -23,7 +32,7 @@ export class AnimationCurve {
23
32
  */
24
33
  static easeInOut(timeStart?: number, valueStart?: number, timeEnd?: number, valueEnd?: number): AnimationCurve;
25
34
  /**
26
- *
35
+ * A flat-line curve with a specific start and end times
27
36
  * @param {number} [timeStart]
28
37
  * @param {number} [timeEnd]
29
38
  * @param {number} [value]
@@ -31,7 +40,7 @@ export class AnimationCurve {
31
40
  */
32
41
  static constant(timeStart?: number, timeEnd?: number, value?: number): AnimationCurve;
33
42
  /**
34
- *
43
+ * Curve with two keyframes connected by a straight line
35
44
  * @param {number} [timeStart]
36
45
  * @param {number} [valueStart]
37
46
  * @param {number} [timeEnd]
@@ -45,13 +54,14 @@ export class AnimationCurve {
45
54
  */
46
55
  readonly keys: Keyframe[];
47
56
  /**
48
- *
57
+ * Add a new keyframe into the animation.
58
+ * Keyframes can be added out of order, they will be inserted into correct chronological position.
49
59
  * @param {Keyframe} key
50
60
  * @returns {number} key index where it was inserted at
51
61
  */
52
62
  add(key: Keyframe): number;
53
63
  /**
54
- *
64
+ * Insert multiple keyframes. Input doesn't need to be sorted.
55
65
  * @param {Keyframe[]} keys
56
66
  */
57
67
  addMany(keys: Keyframe[]): void;
@@ -62,26 +72,32 @@ export class AnimationCurve {
62
72
  */
63
73
  remove(key: Keyframe): boolean;
64
74
  /**
65
- * Remove all keys
75
+ * Remove all keys, making the curve empty.
66
76
  */
67
77
  clear(): void;
68
78
  /**
69
- * Number of keys
79
+ * Does this curve have any frames?
80
+ * @return {boolean} true if keyframe count == 0, false otherwise
81
+ */
82
+ isEmpty(): boolean;
83
+ /**
84
+ * Number of keys, will be 0 if curve is empty
70
85
  * @returns {number}
71
86
  */
72
87
  get length(): number;
73
88
  /**
74
- * Time of the first keyframe, returns 0 if there are no keys
89
+ * Timestamp of the first keyframe, returns 0 if there are no keys
75
90
  * @returns {number}
76
91
  */
77
92
  get start_time(): number;
78
93
  /**
79
- * Time of the last chronological key in the curve
94
+ * Time of the last chronological key in the curve.
95
+ * returns 0 if there are no keys.
80
96
  * @return {number}
81
97
  */
82
98
  get end_time(): number;
83
99
  /**
84
- * Time difference between first and last frame
100
+ * Time difference between first and last frame.
85
101
  * @returns {number}
86
102
  */
87
103
  get duration(): number;
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationCurve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/AnimationCurve.js"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH;IAkFI;;;;OAIG;IACH,kBAHW,QAAQ,EAAE,GACR,cAAc,CAQ1B;IAgRD;;;;;;;OAOG;IACH,6BANW,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,GACL,cAAc,CAUzB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,YACN,MAAM,UACN,MAAM,GACL,cAAc,CAOzB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,GACL,cAAc,CAYzB;IA9ZD;;;OAGG;IACH,eAFU,QAAQ,EAAE,CAEV;IAEV;;;;OAIG;IACH,SAHW,QAAQ,GACN,MAAM,CAgClB;IAED;;;OAGG;IACH,cAFW,QAAQ,EAAE,QAUpB;IAED;;;;OAIG;IACH,YAHW,QAAQ,GACN,OAAO,CAYnB;IAED;;OAEG;IACH,cAEC;IAeD;;;OAGG;IACH,cAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAYlB;IAED;;;OAGG;IACH,gBAFY,MAAM,CAYjB;IAED;;;OAGG;IACH,gBAFa,MAAM,CAelB;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CA0ClB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,MAAM,CAoCjB;IAED;;;;OAIG;IACH,qBAFW,MAAM,QAmChB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAWhB;IAED,0BAKC;IAED;;;;OAIG;IACH,cAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;OAGG;IACH,YAFW,cAAc,QAIxB;IAED;;;OAGG;IACH,SAFY,cAAc,CAQzB;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;MAIC;IAED;;aAeC;CAqDJ;yBApbwB,eAAe"}
1
+ {"version":3,"file":"AnimationCurve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/AnimationCurve.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;GAgBG;AACH;IA6WI;;;;OAIG;IACH,kBAHW,QAAQ,EAAE,GACR,cAAc,CAQ1B;IAED;;;;;;;OAOG;IACH,6BANW,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,GACL,cAAc,CAUzB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,YACN,MAAM,UACN,MAAM,GACL,cAAc,CAOzB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,GACL,cAAc,CAYzB;IA3aD;;;OAGG;IACH,eAFU,QAAQ,EAAE,CAEV;IAEV;;;;;OAKG;IACH,SAHW,QAAQ,GACN,MAAM,CAiClB;IAED;;;OAGG;IACH,cAFW,QAAQ,EAAE,QAUpB;IAED;;;;OAIG;IACH,YAHW,QAAQ,GACN,OAAO,CAYnB;IAED;;OAEG;IACH,cAEC;IAGD;;;OAGG;IACH,WAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,cAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAYlB;IAED;;;;OAIG;IACH,gBAFY,MAAM,CAYjB;IAED;;;OAGG;IACH,gBAFa,MAAM,CAgBlB;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CA0ClB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,MAAM,CAoCjB;IAED;;;;OAIG;IACH,qBAFW,MAAM,QAmChB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAWhB;IAED,0BAKC;IAED;;;;OAIG;IACH,cAHW,cAAc,GACb,OAAO,CAIlB;IAED;;;OAGG;IACH,YAFW,cAAc,QAIxB;IAED;;;OAGG;IACH,SAFY,cAAc,CAQzB;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;MAIC;IAED;;aAeC;CAkEJ;yBA1cwB,eAAe"}
@@ -24,6 +24,15 @@ function compareKeyframeToTime(time, keyframe) {
24
24
  * Values are stored in {@link Keyframe}s, interpolation is defined by tangents on {@link Keyframe}s.
25
25
  * The curve is a cubic Hermite spline, see https://en.wikipedia.org/wiki/Cubic_Hermite_spline.
26
26
  *
27
+ * @example
28
+ * const jump_curve = AnimationCurve.from([
29
+ * Keyframe.from(0, 0), // start at height 0
30
+ * Keyframe.from(0.3, 2), // at time 0.3, jump height will be 2 meters
31
+ * Keyframe.from(1, 0) // at time 1.0, land back on the ground
32
+ * ]);
33
+ *
34
+ * jump_curve.evaluate(0.1); // what is the height at time 0.1?
35
+ *
27
36
  * @author Alex Goldring
28
37
  * @copyright Company Named Limited (c) 2025
29
38
  */
@@ -35,7 +44,8 @@ export class AnimationCurve {
35
44
  keys = [];
36
45
 
37
46
  /**
38
- *
47
+ * Add a new keyframe into the animation.
48
+ * Keyframes can be added out of order, they will be inserted into correct chronological position.
39
49
  * @param {Keyframe} key
40
50
  * @returns {number} key index where it was inserted at
41
51
  */
@@ -62,6 +72,7 @@ export class AnimationCurve {
62
72
  } else {
63
73
 
64
74
  // figure out the right place to insert the key
75
+ // TODO make use of this.getKeyIndexByTime instead
65
76
  const i = binarySearchHighIndex(keys, key.time, compareKeyframeToTime, 0, last_key_index);
66
77
 
67
78
  // insert key at the right place
@@ -72,7 +83,7 @@ export class AnimationCurve {
72
83
  }
73
84
 
74
85
  /**
75
- *
86
+ * Insert multiple keyframes. Input doesn't need to be sorted.
76
87
  * @param {Keyframe[]} keys
77
88
  */
78
89
  addMany(keys) {
@@ -103,27 +114,23 @@ export class AnimationCurve {
103
114
  }
104
115
 
105
116
  /**
106
- * Remove all keys
117
+ * Remove all keys, making the curve empty.
107
118
  */
108
119
  clear() {
109
120
  this.keys.splice(0, this.keys.length);
110
121
  }
111
122
 
123
+
112
124
  /**
113
- *
114
- * @param {Keyframe[]} keys
115
- * @returns {AnimationCurve}
125
+ * Does this curve have any frames?
126
+ * @return {boolean} true if keyframe count == 0, false otherwise
116
127
  */
117
- static from(keys) {
118
- const curve = new AnimationCurve();
119
-
120
- curve.addMany(keys);
121
-
122
- return curve;
128
+ isEmpty() {
129
+ return this.keys.length === 0;
123
130
  }
124
131
 
125
132
  /**
126
- * Number of keys
133
+ * Number of keys, will be 0 if curve is empty
127
134
  * @returns {number}
128
135
  */
129
136
  get length() {
@@ -131,7 +138,7 @@ export class AnimationCurve {
131
138
  }
132
139
 
133
140
  /**
134
- * Time of the first keyframe, returns 0 if there are no keys
141
+ * Timestamp of the first keyframe, returns 0 if there are no keys
135
142
  * @returns {number}
136
143
  */
137
144
  get start_time() {
@@ -147,7 +154,8 @@ export class AnimationCurve {
147
154
  }
148
155
 
149
156
  /**
150
- * Time of the last chronological key in the curve
157
+ * Time of the last chronological key in the curve.
158
+ * returns 0 if there are no keys.
151
159
  * @return {number}
152
160
  */
153
161
  get end_time() {
@@ -163,7 +171,7 @@ export class AnimationCurve {
163
171
  }
164
172
 
165
173
  /**
166
- * Time difference between first and last frame
174
+ * Time difference between first and last frame.
167
175
  * @returns {number}
168
176
  */
169
177
  get duration() {
@@ -172,6 +180,7 @@ export class AnimationCurve {
172
180
  const key_count = keys.length;
173
181
 
174
182
  if (key_count < 2) {
183
+ // too few frames to compare
175
184
  return 0;
176
185
  }
177
186
 
@@ -392,6 +401,19 @@ export class AnimationCurve {
392
401
 
393
402
  }
394
403
 
404
+ /**
405
+ *
406
+ * @param {Keyframe[]} keys
407
+ * @returns {AnimationCurve}
408
+ */
409
+ static from(keys) {
410
+ const curve = new AnimationCurve();
411
+
412
+ curve.addMany(keys);
413
+
414
+ return curve;
415
+ }
416
+
395
417
  /**
396
418
  *
397
419
  * @param {number} [timeStart]
@@ -411,7 +433,7 @@ export class AnimationCurve {
411
433
  }
412
434
 
413
435
  /**
414
- *
436
+ * A flat-line curve with a specific start and end times
415
437
  * @param {number} [timeStart]
416
438
  * @param {number} [timeEnd]
417
439
  * @param {number} [value]
@@ -425,7 +447,7 @@ export class AnimationCurve {
425
447
  }
426
448
 
427
449
  /**
428
- *
450
+ * Curve with two keyframes connected by a straight line
429
451
  * @param {number} [timeStart]
430
452
  * @param {number} [valueStart]
431
453
  * @param {number} [timeEnd]
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Single keyframe of {@link AnimationCurve}
2
+ * Single keyframe of {@link AnimationCurve}.
3
+ * Note that {@link AnimationCurve} relies on Keyframes to be static, so treat them as immutable.
4
+ * Do not change keyframe values unless you understand the implications of doing so.
3
5
  *
4
6
  * @author Alex Goldring
5
7
  * @copyright Company Named Limited (c) 2025
@@ -20,7 +22,7 @@ export class Keyframe {
20
22
  */
21
23
  value: number;
22
24
  /**
23
- * Timestamp
25
+ * Timestamp/position for the value
24
26
  * @type {number}
25
27
  */
26
28
  time: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Keyframe.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/Keyframe.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH;IAyBI;;;;;;;OAOG;IACH,kBANW,MAAM,SACN,MAAM,cACN,MAAM,eACN,MAAM,GACL,QAAQ,CAQnB;IAtCD;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,YAFU,MAAM,CAED;IAkBf;;;;;;OAMG;IACH,UALW,MAAM,SACN,MAAM,aACN,MAAM,cACN,MAAM,QAmBhB;IAED;;;;OAIG;IACH,cAHW,QAAQ,GACN,OAAO,CAQnB;IAED;;;OAGG;IACH,YAFW,QAAQ,QAOlB;IAED;;;OAGG;IACH,SAFY,QAAQ,CAQnB;IAED;;;OAGG;IACH,QAFY,MAAM,CAKjB;IAED;;;;;MAOC;IAED;;;;;aAQC;IAIL;;;;OAIG;IACH,qBAFU,OAAO,CAEY;CAP5B"}
1
+ {"version":3,"file":"Keyframe.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/Keyframe.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IAyBI;;;;;;;OAOG;IACH,kBANW,MAAM,SACN,MAAM,cACN,MAAM,eACN,MAAM,GACL,QAAQ,CAQnB;IAtCD;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,YAFU,MAAM,CAED;IAkBf;;;;;;OAMG;IACH,UALW,MAAM,SACN,MAAM,aACN,MAAM,cACN,MAAM,QAqBhB;IAED;;;;OAIG;IACH,cAHW,QAAQ,GACN,OAAO,CAQnB;IAED;;;OAGG;IACH,YAFW,QAAQ,QAOlB;IAED;;;OAGG;IACH,SAFY,QAAQ,CAQnB;IAED;;;OAGG;IACH,QAFY,MAAM,CAKjB;IAED;;;;;MAOC;IAED;;;;;aAQC;IAIL;;;;OAIG;IACH,qBAFU,OAAO,CAEY;CAP5B"}
@@ -2,7 +2,9 @@ import { assert } from "../../../core/assert.js";
2
2
  import { computeHashFloat } from "../../../core/primitives/numbers/computeHashFloat.js";
3
3
 
4
4
  /**
5
- * Single keyframe of {@link AnimationCurve}
5
+ * Single keyframe of {@link AnimationCurve}.
6
+ * Note that {@link AnimationCurve} relies on Keyframes to be static, so treat them as immutable.
7
+ * Do not change keyframe values unless you understand the implications of doing so.
6
8
  *
7
9
  * @author Alex Goldring
8
10
  * @copyright Company Named Limited (c) 2025
@@ -15,7 +17,7 @@ export class Keyframe {
15
17
  value = 0;
16
18
 
17
19
  /**
18
- * Timestamp
20
+ * Timestamp/position for the value
19
21
  * @type {number}
20
22
  */
21
23
  time = 0;
@@ -64,9 +66,11 @@ export class Keyframe {
64
66
 
65
67
  assert.isNumber(inTangent, 'inTangent');
66
68
  assert.notNaN(inTangent, 'inTangent');
69
+ assert.isFinite(inTangent, 'inTangent');
67
70
 
68
71
  assert.isNumber(outTangent, 'outTangent');
69
72
  assert.notNaN(outTangent, 'outTangent');
73
+ assert.isFinite(outTangent, 'outTangent');
70
74
 
71
75
  this.time = time;
72
76
  this.value = value;
@@ -2,7 +2,7 @@ import { max2 } from "../../../core/math/max2.js";
2
2
  import { min2 } from "../../../core/math/min2.js";
3
3
  import { spline_hermite3_bounds } from "../../../core/math/spline/spline_hermite3_bounds.js";
4
4
 
5
- const temp_bounds = new Float32Array(4);
5
+ const temp_bounds = new Float32Array(2);
6
6
 
7
7
  /**
8
8
  * Compute bounding box for a given curve. X-axis is time, Y-axis is value.
@@ -3,9 +3,10 @@
3
3
  * Intended to reduce complexity of a curve to improve performance and lower memory usage
4
4
  * @param {AnimationCurve} curve
5
5
  * @param {number} [error_tolerance] how much of a loss to accept, this is relative to normalized value bounds of the curve
6
+ * @returns {number} number of removed keys, 0 if curve was unchanged
6
7
  *
7
8
  * @author Alex Goldring
8
9
  * @copyright Company Named Limited (c) 2025
9
10
  */
10
- export function animation_curve_optimize(curve: AnimationCurve, error_tolerance?: number): void;
11
+ export function animation_curve_optimize(curve: AnimationCurve, error_tolerance?: number): number;
11
12
  //# sourceMappingURL=animation_curve_optimize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"animation_curve_optimize.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/animation_curve_optimize.js"],"names":[],"mappings":"AAkDA;;;;;;;;GAQG;AACH,gDANW,cAAc,oBACd,MAAM,QA6ChB"}
1
+ {"version":3,"file":"animation_curve_optimize.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/animation_curve_optimize.js"],"names":[],"mappings":"AAkDA;;;;;;;;;GASG;AACH,gDAPW,cAAc,oBACd,MAAM,GACJ,MAAM,CAkDlB"}
@@ -53,6 +53,7 @@ function compute_keyframe_value_effect(
53
53
  * Intended to reduce complexity of a curve to improve performance and lower memory usage
54
54
  * @param {AnimationCurve} curve
55
55
  * @param {number} [error_tolerance] how much of a loss to accept, this is relative to normalized value bounds of the curve
56
+ * @returns {number} number of removed keys, 0 if curve was unchanged
56
57
  *
57
58
  * @author Alex Goldring
58
59
  * @copyright Company Named Limited (c) 2025
@@ -68,6 +69,8 @@ export function animation_curve_optimize(curve, error_tolerance = 1e-3) {
68
69
 
69
70
  const keyframes = curve.keys;
70
71
 
72
+ const initial_key_count = key_count;
73
+
71
74
  for (let i = 1; i < key_count; i++) {
72
75
  const key_previous = keyframes[i - 1];
73
76
  const key_current = keyframes[i];
@@ -97,4 +100,7 @@ export function animation_curve_optimize(curve, error_tolerance = 1e-3) {
97
100
  key_count--;
98
101
  }
99
102
  }
103
+
104
+ // number of removed keys
105
+ return initial_key_count - key_count;
100
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EntityComponentDataset.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityComponentDataset.js"],"names":[],"mappings":"AAyHA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,+CAfgB,QAAQ,CAAC,MAAM;IAiB3B;;;;OAIG;IACH,wBAA+B;IAE/B;;;;;OAKG;IACH,yBAAsC;IAEtC;;;;;;;;;OASG;IACH,2BAAkC;IAElC;;;;;OAKG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAgC;IAEhC;;;;OAIG;IACH,2BAAuB;IAEvB;;;OAGG;IACH,mBAAgB;IAEhB;;;;OAIG;IACH,oBAAgB;IAEhB;;;;;;;OAOG;IACH,mBAAe;IAEf;;;OAGG;IACH,0BAFU,MAAM,CAAC,MAAM,CAAC,CAEO;IAE/B;;;OAGG;IACH,0BAFU,MAAM,CAEe;IAG/B;;;;OAIG;IACH,+BAA4B;IAE5B;;;;OAIG;IACH,kCAA+B;IAE/B;;;OAGG;IACH,kBAAe;IAGf;;;;;;OA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"version":3,"file":"EntityComponentDataset.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityComponentDataset.js"],"names":[],"mappings":"AAyHA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,+CAfgB,QAAQ,CAAC,MAAM;IAiB3B;;;;OAIG;IACH,wBAA+B;IAE/B;;;;;OAKG;IACH,yBAAsC;IAEtC;;;;;;;;;OASG;IACH,2BAAkC;IAElC;;;;;OAKG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAgC;IAEhC;;;;OAIG;IACH,2BAAuB;IAEvB;;;OAGG;IACH,mBAAgB;IAEhB;;;;OAIG;IACH,oBAAgB;IAEhB;;;;;;;OAOG;IACH,mBAAe;IAEf;;;OAGG;IACH,0BAFU,MAAM,CAAC,MAAM,CAAC,CAEO;IAE/B;;;OAGG;IACH,0BAFU,MAAM,CAEe;IAG/B;;;;OAIG;IACH,+BAA4B;IAE5B;;;;OAIG;IACH,kCAA+B;IAE/B;;;OAGG;IACH,kBAAe;IAGf;;;;;;OAMG;IACH,iBALa,CAAC,EAAE,CAAC,UACN,GAAG,kBACH,CAAC,GACC,OAAO,CAAC,CAAC,CAAC,CAoCtB;IAED;;;;;OAKG;IACH,sBAJW,cAAc,cACd,OAAO,GACL,OAAO,CAqDnB;IAED;;;;;OAKG;IACH,yBAJW,cAAc,cACd,OAAO,GACL,OAAO,CA4DnB;IAED;;;OAGG;IACH,kBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,yBAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,sBAJW,MAAM,qBACN,EAAE,SAmCZ;IAED;;;;OAIG;IACH,4BAHW,MAAM,GACJ,EAAE,CAyBd;IAED;;;;;OAKG;IACH,yBAJW,KAAK,EAAE,GACL,IAAI,CA0LhB;IAED;;;;OAIG;IACH,mCAHW,KAAK,EAAE,GACL,OAAO,CAenB;IAED;;;;;OAKG;IACH,gCAHW,KAAK,WAAS,GACb,OAAO,CASlB;IAED;;;OAGG;IACH,u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