@woosh/meep-engine 2.92.23 → 2.93.1

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 (61) hide show
  1. package/build/meep.cjs +99 -129
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +99 -129
  4. package/package.json +6 -4
  5. package/src/core/geom/Quaternion.d.ts +29 -14
  6. package/src/core/geom/Quaternion.d.ts.map +1 -1
  7. package/src/core/geom/Quaternion.js +63 -99
  8. package/src/core/math/spline/spline_hermite3.d.ts +4 -3
  9. package/src/core/math/spline/spline_hermite3.d.ts.map +1 -1
  10. package/src/core/math/spline/spline_hermite3.js +4 -3
  11. package/src/engine/animation/clip/AnimationClip.d.ts +4 -0
  12. package/src/engine/animation/clip/AnimationClip.d.ts.map +1 -0
  13. package/src/engine/animation/clip/AnimationClip.js +23 -0
  14. package/src/engine/animation/clip/AnimationClipBinding.d.ts +14 -0
  15. package/src/engine/animation/clip/AnimationClipBinding.d.ts.map +1 -0
  16. package/src/engine/animation/clip/AnimationClipBinding.js +94 -0
  17. package/src/engine/animation/clip/AnimationTrack.d.ts +45 -0
  18. package/src/engine/animation/clip/AnimationTrack.d.ts.map +1 -0
  19. package/src/engine/animation/clip/AnimationTrack.js +83 -0
  20. package/src/engine/animation/clip/AnimationTrackBinding.d.ts +25 -0
  21. package/src/engine/animation/clip/AnimationTrackBinding.d.ts.map +1 -0
  22. package/src/engine/animation/clip/AnimationTrackBinding.js +42 -0
  23. package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts +9 -0
  24. package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts.map +1 -0
  25. package/src/engine/animation/{curve → clip}/ecd_bind_animation_curve.js +28 -20
  26. package/src/engine/animation/curve/AnimationCurve.d.ts +31 -0
  27. package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
  28. package/src/engine/animation/curve/AnimationCurve.js +81 -23
  29. package/src/engine/animation/curve/AnimationCurve.spec.js +37 -2
  30. package/src/engine/animation/curve/Keyframe.d.ts +8 -0
  31. package/src/engine/animation/curve/Keyframe.d.ts.map +1 -1
  32. package/src/engine/animation/curve/Keyframe.js +53 -44
  33. package/src/engine/animation/curve/Keyframe.spec.d.ts +2 -0
  34. package/src/engine/animation/curve/Keyframe.spec.d.ts.map +1 -0
  35. package/src/engine/animation/curve/Keyframe.spec.js +31 -0
  36. package/src/engine/animation/curve/binding/BoundQuaternionWriter.d.ts.map +1 -0
  37. package/src/engine/animation/curve/binding/BoundValueWriter.d.ts +14 -0
  38. package/src/engine/animation/curve/binding/BoundValueWriter.d.ts.map +1 -0
  39. package/src/engine/animation/curve/binding/BoundValueWriter.js +19 -0
  40. package/src/engine/animation/curve/binding/BoundVector3Writer.d.ts.map +1 -0
  41. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationController.d.ts +2 -2
  42. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationControllerSystem.js +1 -1
  43. package/src/engine/graphics/texture/virtual/VirtualTextureUsageUpdater.d.ts.map +1 -1
  44. package/src/engine/graphics/texture/virtual/VirtualTextureUsageUpdater.js +5 -3
  45. package/src/engine/animation/curve/EntityNodeAnimationClip.d.ts +0 -4
  46. package/src/engine/animation/curve/EntityNodeAnimationClip.d.ts.map +0 -1
  47. package/src/engine/animation/curve/EntityNodeAnimationClip.js +0 -24
  48. package/src/engine/animation/curve/ecd_bind_animation_curve.d.ts +0 -8
  49. package/src/engine/animation/curve/ecd_bind_animation_curve.d.ts.map +0 -1
  50. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/AnimatedValueBinding.d.ts +0 -27
  51. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/AnimatedValueBinding.d.ts.map +0 -1
  52. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/AnimatedValueBinding.js +0 -61
  53. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundQuaternionWriter.d.ts.map +0 -1
  54. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundValueWriter.d.ts +0 -8
  55. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundValueWriter.d.ts.map +0 -1
  56. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundValueWriter.js +0 -10
  57. package/src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundVector3Writer.d.ts.map +0 -1
  58. /package/src/engine/{graphics/ecs/mesh-v2/aggregate/animation → animation/curve/binding}/BoundQuaternionWriter.d.ts +0 -0
  59. /package/src/engine/{graphics/ecs/mesh-v2/aggregate/animation → animation/curve/binding}/BoundQuaternionWriter.js +0 -0
  60. /package/src/engine/{graphics/ecs/mesh-v2/aggregate/animation → animation/curve/binding}/BoundVector3Writer.d.ts +0 -0
  61. /package/src/engine/{graphics/ecs/mesh-v2/aggregate/animation → animation/curve/binding}/BoundVector3Writer.js +0 -0
@@ -83,7 +83,7 @@ export class VirtualTextureUsageUpdater {
83
83
  */
84
84
  #frame_jitter_offsets = new Float32Array([0, 0]);
85
85
  #frame_jitter_samples = 1;
86
- #frame_jitter_enabled = false;
86
+ #frame_jitter_enabled = true;
87
87
 
88
88
  get frame_jitter_enabled() {
89
89
  return this.#frame_jitter_enabled;
@@ -264,8 +264,10 @@ export class VirtualTextureUsageUpdater {
264
264
  // apply jitter to projection matrix
265
265
  const jitter_index = this.#frame_index % this.#frame_jitter_samples;
266
266
 
267
- const jitter_offset_x = this.#frame_jitter_offsets[jitter_index * 2];
268
- const jitter_offset_y = this.#frame_jitter_offsets[jitter_index * 2 + 1];
267
+ const jitter_index_2 = jitter_index * 2;
268
+
269
+ const jitter_offset_x = this.#frame_jitter_offsets[jitter_index_2];
270
+ const jitter_offset_y = this.#frame_jitter_offsets[jitter_index_2 + 1];
269
271
 
270
272
  camera_projection_matrix[8] = jitter_offset_x / usage_buffer.width;
271
273
  camera_projection_matrix[9] = jitter_offset_y / usage_buffer.height;
@@ -1,4 +0,0 @@
1
- export class EntityNodeAnimationClip {
2
- name: string
3
- duration: number
4
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntityNodeAnimationClip.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/EntityNodeAnimationClip.js"],"names":[],"mappings":"AAAA;IACI,aAAS;IACT;;;OAGG;IACH,QAFU,sBAAsB,CAErB;IACX,iBAAY;IAEZ;;;OAGG;IACH,cAFW,MAAM,QAWhB;CACJ"}
@@ -1,24 +0,0 @@
1
- export class EntityNodeAnimationClip {
2
- name = ""
3
- /**
4
- *
5
- * @type {AnimatedValueBinding[]}
6
- */
7
- tracks = []
8
- duration = 0
9
-
10
- /**
11
- *
12
- * @param {number} time time in seconds
13
- */
14
- writeAt(time) {
15
- const tracks = this.tracks;
16
- const track_count = tracks.length;
17
-
18
- for (let i = 0; i < track_count; i++) {
19
- const track = tracks[i];
20
-
21
- track.writeAt(time);
22
- }
23
- }
24
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Three.js clip to internal representation
3
- * @param {EntityNode} node
4
- * @param {AnimationClip} clip
5
- */
6
- export function convert_three_clip(node: EntityNode, clip: AnimationClip): EntityNodeAnimationClip;
7
- import { EntityNodeAnimationClip } from "./EntityNodeAnimationClip.js";
8
- //# sourceMappingURL=ecd_bind_animation_curve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ecd_bind_animation_curve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/ecd_bind_animation_curve.js"],"names":[],"mappings":"AAgUA;;;;GAIG;AACH,mGAsBC;wCApVuC,8BAA8B"}
@@ -1,27 +0,0 @@
1
- export class AnimatedValueBinding {
2
- /**
3
- *
4
- * @param {BoundValueWriter} writer
5
- * @param {AnimationCurve[]} curves
6
- * @returns {AnimatedValueBinding}
7
- */
8
- static from(writer: BoundValueWriter, curves: AnimationCurve[]): AnimatedValueBinding;
9
- constructor(itemSize: any);
10
- /**
11
- *
12
- * @type {BoundValueWriter|null}
13
- */
14
- writer: BoundValueWriter | null;
15
- /**
16
- *
17
- * @type {AnimationCurve[]}
18
- */
19
- curves: AnimationCurve[];
20
- /**
21
- *
22
- * @param {number} time
23
- */
24
- writeAt(time: number): void;
25
- #private;
26
- }
27
- //# sourceMappingURL=AnimatedValueBinding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnimatedValueBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/animation/AnimatedValueBinding.js"],"names":[],"mappings":"AAAA;IAoBI;;;;;OAKG;IACH,8CAHW,gBAAgB,GACd,oBAAoB,CAWhC;IArBD,2BAIC;IAjBD;;;OAGG;IACH,QAFU,mBAAiB,IAAI,CAElB;IAEb;;;OAGG;IACH,QAFU,gBAAgB,CAEf;IAkCX;;;OAGG;IACH,cAFW,MAAM,QAYhB;;CACJ"}
@@ -1,61 +0,0 @@
1
- export class AnimatedValueBinding {
2
- /**
3
- *
4
- * @type {BoundValueWriter|null}
5
- */
6
- writer = null
7
-
8
- /**
9
- *
10
- * @type {AnimationCurve[]}
11
- */
12
- curves = []
13
-
14
-
15
- constructor(itemSize) {
16
- this.#itemSize = itemSize;
17
-
18
- this.#sample = new Float32Array(itemSize);
19
- }
20
-
21
- /**
22
- *
23
- * @param {BoundValueWriter} writer
24
- * @param {AnimationCurve[]} curves
25
- * @returns {AnimatedValueBinding}
26
- */
27
- static from(writer, curves) {
28
-
29
- const r = new AnimatedValueBinding(curves.length);
30
-
31
- r.writer = writer;
32
- r.curves = curves;
33
-
34
- return r;
35
-
36
- }
37
-
38
- #itemSize = 1;
39
-
40
- /**
41
- *
42
- * @type {Float32Array|null}
43
- */
44
- #sample = null;
45
-
46
- /**
47
- *
48
- * @param {number} time
49
- */
50
- writeAt(time) {
51
-
52
- for (let i = 0; i < this.#itemSize; i++) {
53
- const curve = this.curves[i];
54
-
55
- this.#sample[i] = curve.evaluate(time)
56
- }
57
-
58
-
59
- this.writer.write(this.#sample);
60
- }
61
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"BoundQuaternionWriter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundQuaternionWriter.js"],"names":[],"mappings":"AAEA;IAOI,6BAIC;IAED,uBAGC;;CACJ;iCAnBgC,uBAAuB"}
@@ -1,8 +0,0 @@
1
- export class BoundValueWriter {
2
- /**
3
- *
4
- * @param {number[]} data
5
- */
6
- write(data: number[]): void;
7
- }
8
- //# sourceMappingURL=BoundValueWriter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BoundValueWriter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundValueWriter.js"],"names":[],"mappings":"AAAA;IAEI;;;OAGG;IACH,YAFW,MAAM,EAAE,QAIlB;CACJ"}
@@ -1,10 +0,0 @@
1
- export class BoundValueWriter {
2
-
3
- /**
4
- *
5
- * @param {number[]} data
6
- */
7
- write(data) {
8
-
9
- }
10
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"BoundVector3Writer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/animation/BoundVector3Writer.js"],"names":[],"mappings":"AAEA;IAOI,yBAIC;IAED,uBAEC;;CACJ;iCAlBgC,uBAAuB"}