@woosh/meep-engine 2.165.7 → 2.167.0

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 (146) hide show
  1. package/build/bundle-worker-image-decoder.js +1 -1
  2. package/package.json +1 -1
  3. package/src/CORRECTNESS_HUNT_2026_07_24.md +142 -0
  4. package/src/core/binary/BinaryBuffer.js +1 -1
  5. package/src/core/binary/EncodingBinaryBuffer.d.ts.map +1 -1
  6. package/src/core/binary/EncodingBinaryBuffer.js +3 -1
  7. package/src/core/cache/Cache.d.ts.map +1 -1
  8. package/src/core/cache/Cache.js +0 -4
  9. package/src/core/cache/CacheElement.d.ts.map +1 -1
  10. package/src/core/cache/CacheElement.js +4 -0
  11. package/src/core/cache/FrequencySketch.d.ts +0 -21
  12. package/src/core/cache/FrequencySketch.d.ts.map +1 -1
  13. package/src/core/cache/FrequencySketch.js +66 -65
  14. package/src/core/cache/wtinylfu/CacheElementWTinylfu.d.ts +17 -0
  15. package/src/core/cache/wtinylfu/CacheElementWTinylfu.d.ts.map +1 -0
  16. package/src/core/cache/wtinylfu/CacheElementWTinylfu.js +18 -0
  17. package/src/core/cache/wtinylfu/CacheRegionType.d.ts +10 -0
  18. package/src/core/cache/wtinylfu/CacheRegionType.d.ts.map +1 -0
  19. package/src/core/cache/wtinylfu/CacheRegionType.js +10 -0
  20. package/src/core/cache/wtinylfu/CacheRegionWTinylfu.d.ts +66 -0
  21. package/src/core/cache/wtinylfu/CacheRegionWTinylfu.d.ts.map +1 -0
  22. package/src/core/cache/wtinylfu/CacheRegionWTinylfu.js +183 -0
  23. package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts +279 -0
  24. package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts.map +1 -0
  25. package/src/core/cache/wtinylfu/CacheWTinylfu.js +807 -0
  26. package/src/core/cache/wtinylfu/benchmark/CacheWTinylfu.bench.md +243 -0
  27. package/src/core/cache/wtinylfu/wtinylfuDecisions.d.ts +80 -0
  28. package/src/core/cache/wtinylfu/wtinylfuDecisions.d.ts.map +1 -0
  29. package/src/core/cache/wtinylfu/wtinylfuDecisions.js +102 -0
  30. package/src/core/collection/RingBuffer.d.ts.map +1 -1
  31. package/src/core/collection/RingBuffer.js +15 -3
  32. package/src/core/collection/map/HashMap.d.ts +1 -1
  33. package/src/core/collection/map/HashMap.d.ts.map +1 -1
  34. package/src/core/collection/map/HashMap.js +5 -17
  35. package/src/core/geom/2d/line/line2_compute_segment_point_distance_sqr.d.ts.map +1 -1
  36. package/src/core/geom/2d/line/line2_compute_segment_point_distance_sqr.js +5 -0
  37. package/src/core/geom/ConicRay.d.ts.map +1 -1
  38. package/src/core/geom/ConicRay.js +9 -2
  39. package/src/core/geom/Quaternion.d.ts.map +1 -1
  40. package/src/core/geom/Quaternion.js +7 -3
  41. package/src/core/math/build_gaussian_kernel_1d.d.ts +2 -2
  42. package/src/core/math/build_gaussian_kernel_1d.d.ts.map +1 -1
  43. package/src/core/math/build_gaussian_kernel_1d.js +4 -2
  44. package/src/core/math/build_gaussian_kernel_2d.d.ts +2 -2
  45. package/src/core/math/build_gaussian_kernel_2d.d.ts.map +1 -1
  46. package/src/core/math/build_gaussian_kernel_2d.js +4 -2
  47. package/src/core/math/gaussian.d.ts +2 -2
  48. package/src/core/math/gaussian.js +2 -2
  49. package/src/core/math/spline/spline3_bezier_bounds.d.ts.map +1 -1
  50. package/src/core/math/spline/spline3_bezier_bounds.js +10 -3
  51. package/src/core/math/spline/spline3_bezier_to_hermite.d.ts +8 -7
  52. package/src/core/math/spline/spline3_bezier_to_hermite.d.ts.map +1 -1
  53. package/src/core/math/spline/spline3_bezier_to_hermite.js +13 -12
  54. package/src/core/math/spline/spline3_hermite_bounds.d.ts.map +1 -1
  55. package/src/core/math/spline/spline3_hermite_bounds.js +10 -3
  56. package/src/core/math/spline/spline3_hermite_bounds_t.d.ts.map +1 -1
  57. package/src/core/math/spline/spline3_hermite_bounds_t.js +115 -109
  58. package/src/core/math/spline/spline3_hermite_to_bezier.d.ts +2 -0
  59. package/src/core/math/spline/spline3_hermite_to_bezier.d.ts.map +1 -1
  60. package/src/core/math/spline/spline3_hermite_to_bezier.js +2 -0
  61. package/src/core/math/statistics/computeStatisticalMean.js +1 -1
  62. package/src/core/math/statistics/gaussian_amplitude.d.ts.map +1 -1
  63. package/src/core/math/statistics/gaussian_amplitude.js +3 -1
  64. package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts.map +1 -1
  65. package/src/engine/animation/clip/ecd_bind_animation_curve.js +10 -1
  66. package/src/engine/animation/clip/hemisphere_align_quaternion_values.d.ts +20 -0
  67. package/src/engine/animation/clip/hemisphere_align_quaternion_values.d.ts.map +1 -0
  68. package/src/engine/animation/clip/hemisphere_align_quaternion_values.js +37 -0
  69. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
  70. package/src/engine/animation/keyed2/AnimationTrackPlayback.js +5 -1
  71. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  72. package/src/engine/ecs/EntityComponentDataset.js +5 -21
  73. package/src/engine/ecs/fow/FogOfWar.d.ts +22 -0
  74. package/src/engine/ecs/fow/FogOfWar.d.ts.map +1 -1
  75. package/src/engine/ecs/fow/FogOfWar.js +202 -54
  76. package/src/engine/ecs/fow/FogOfWarEdgeMode.d.ts +16 -0
  77. package/src/engine/ecs/fow/FogOfWarEdgeMode.d.ts.map +1 -0
  78. package/src/engine/ecs/fow/FogOfWarEdgeMode.js +39 -0
  79. package/src/engine/ecs/fow/FogOfWarSystem.d.ts.map +1 -1
  80. package/src/engine/ecs/fow/FogOfWarSystem.js +1 -0
  81. package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.d.ts.map +1 -1
  82. package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.js +3 -0
  83. package/src/engine/ecs/fow/shader/FogOfWarRenderer.d.ts +7 -0
  84. package/src/engine/ecs/fow/shader/FogOfWarRenderer.d.ts.map +1 -1
  85. package/src/engine/ecs/fow/shader/FogOfWarRenderer.js +155 -145
  86. package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.d.ts.map +1 -1
  87. package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.js +33 -8
  88. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts.map +1 -1
  89. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +3 -1
  90. package/src/engine/graphics/GraphicsEngine.d.ts +5 -1
  91. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  92. package/src/engine/graphics/GraphicsEngine.js +14 -3
  93. package/src/engine/graphics/composit/CompositLayer.d.ts.map +1 -1
  94. package/src/engine/graphics/composit/CompositLayer.js +258 -255
  95. package/src/engine/graphics/composit/LayerCompositer.d.ts +12 -0
  96. package/src/engine/graphics/composit/LayerCompositer.d.ts.map +1 -1
  97. package/src/engine/graphics/composit/LayerCompositer.js +19 -10
  98. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts +1 -1
  99. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts.map +1 -1
  100. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.js +10 -4
  101. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts +6 -0
  102. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts.map +1 -1
  103. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js +21 -0
  104. package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.d.ts.map +1 -1
  105. package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.js +5 -23
  106. package/src/engine/graphics/ecs/path/tube/build/estimatePathViaIterativeIntegral.d.ts.map +1 -1
  107. package/src/engine/graphics/ecs/path/tube/build/estimatePathViaIterativeIntegral.js +6 -4
  108. package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
  109. package/src/engine/graphics/ecs/water/WaterSystem.js +9 -3
  110. package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts +12 -0
  111. package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts.map +1 -1
  112. package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.js +46 -9
  113. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +5 -0
  114. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +1 -1
  115. package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +8 -0
  116. package/src/engine/graphics/particles/particular/engine/shader/MaterialRecord.d.ts +7 -0
  117. package/src/engine/graphics/particles/particular/engine/shader/MaterialRecord.d.ts.map +1 -1
  118. package/src/engine/graphics/particles/particular/engine/shader/MaterialRecord.js +8 -0
  119. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +10 -2
  120. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +1 -1
  121. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +42 -10
  122. package/src/engine/graphics/render/buffer/FrameBuffer.d.ts.map +1 -1
  123. package/src/engine/graphics/render/buffer/FrameBuffer.js +5 -2
  124. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts +13 -1
  125. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts.map +1 -1
  126. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js +40 -7
  127. package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.d.ts.map +1 -1
  128. package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.js +10 -4
  129. package/src/engine/graphics/render/forward_plus/LightManager.d.ts.map +1 -1
  130. package/src/engine/graphics/render/forward_plus/LightManager.js +1235 -1232
  131. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.d.ts +5 -0
  132. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.d.ts.map +1 -1
  133. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.js +11 -10
  134. package/src/engine/graphics/trail/tube/TubeX.d.ts.map +1 -1
  135. package/src/engine/graphics/trail/tube/TubeX.js +557 -555
  136. package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts +12 -1
  137. package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts.map +1 -1
  138. package/src/engine/graphics/trail/x/RibbonXPlugin.js +15 -8
  139. package/src/engine/input/ecs/systems/InputControllerSystem.d.ts.map +1 -1
  140. package/src/engine/input/ecs/systems/InputControllerSystem.js +9 -6
  141. package/src/engine/navigation/ecs/components/Path.d.ts +5 -2
  142. package/src/engine/navigation/ecs/components/Path.d.ts.map +1 -1
  143. package/src/engine/navigation/ecs/components/Path.js +10 -4
  144. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +1 -1
  145. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  146. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
@@ -17,7 +17,18 @@ export class RibbonXPlugin extends EnginePlugin {
17
17
  * @private
18
18
  */
19
19
  private __materials;
20
- __handle_viewport_size_change(): void;
20
+ /**
21
+ * The `resolution` uniform is the pixel grid {@link RibbonMaterialX} projects into and back out
22
+ * of, so it is the grid the ribbon actually rasterizes on -- device pixels, the same authority
23
+ * every render target is sized from. Only the aspect ratio of the value reaches the final
24
+ * geometry today, and that is the same either way, but naming the render resolution keeps the
25
+ * shader honest about what "screen space" means in it.
26
+ *
27
+ * @param {number} x
28
+ * @param {number} y
29
+ * @private
30
+ */
31
+ private __set_render_resolution;
21
32
  /**
22
33
  *
23
34
  * @param {RibbonXMaterialSpec} spec
@@ -1 +1 @@
1
- {"version":3,"file":"RibbonXPlugin.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/trail/x/RibbonXPlugin.js"],"names":[],"mappings":"AASA;IACI,8BA6BC;IAxBG;;;;OAIG;IACH,+BAKE;IAEF;;;;MAIC;IAED;;;;OAIG;IACH,oBAAwC;IAG5C,sCAIC;IAiBD;;;;OAIG;IACH,0EAIC;IAED;;;;OAIG;IACH,8CAFa,eAAe,CAI3B;IAED;;;;;OAKG;IACH,yBAsCC;CACJ;6BA1H4B,iCAAiC;wBAL1B,OAAO;gCAOX,sBAAsB"}
1
+ {"version":3,"file":"RibbonXPlugin.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/trail/x/RibbonXPlugin.js"],"names":[],"mappings":"AASA;IACI,8BA6BC;IAxBG;;;;OAIG;IACH,+BAKE;IAEF;;;;MAIC;IAED;;;;OAIG;IACH,oBAAwC;IAG5C;;;;;;;;;;OAUG;IACH,gCAEC;IAeD;;;;OAIG;IACH,0EAIC;IAED;;;;OAIG;IACH,8CAFa,eAAe,CAI3B;IAED;;;;;OAKG;IACH,yBAsCC;CACJ;6BAjI4B,iCAAiC;wBAL1B,OAAO;gCAOX,sBAAsB"}
@@ -39,23 +39,30 @@ export class RibbonXPlugin extends EnginePlugin {
39
39
  this.__materials = new MaterialManager();
40
40
  }
41
41
 
42
- __handle_viewport_size_change() {
43
- const s = this.engine.graphics.viewport.size;
44
-
45
- this.__shared_uniforms.resolution.value.set(s.x, s.y);
42
+ /**
43
+ * The `resolution` uniform is the pixel grid {@link RibbonMaterialX} projects into and back out
44
+ * of, so it is the grid the ribbon actually rasterizes on -- device pixels, the same authority
45
+ * every render target is sized from. Only the aspect ratio of the value reaches the final
46
+ * geometry today, and that is the same either way, but naming the render resolution keeps the
47
+ * shader honest about what "screen space" means in it.
48
+ *
49
+ * @param {number} x
50
+ * @param {number} y
51
+ * @private
52
+ */
53
+ __set_render_resolution(x, y) {
54
+ this.__shared_uniforms.resolution.value.set(x, y);
46
55
  }
47
56
 
48
57
  async startup() {
49
- this.__handle_viewport_size_change();
50
-
51
- this.engine.graphics.viewport.size.onChanged.add(this.__handle_viewport_size_change, this);
58
+ this.engine.graphics.output_resolution.process(this.__set_render_resolution, this);
52
59
 
53
60
  return super.startup();
54
61
  }
55
62
 
56
63
  async shutdown() {
57
64
 
58
- this.engine.graphics.viewport.size.onChanged.remove(this.__handle_viewport_size_change, this);
65
+ this.engine.graphics.output_resolution.onChanged.remove(this.__set_render_resolution, this);
59
66
 
60
67
  return super.shutdown();
61
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InputControllerSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/systems/InputControllerSystem.js"],"names":[],"mappings":";AAsLA;;GAEG;AACH;IACI,0BA+BC;IA7BG,uBAAsC;IAEtC,yCAAqC;IAErC,aAAsB;IA2B1B,2CAGC;IADG,YAAiB;IAGrB;;;;OAIG;IACH,gBAHW,eAAe,qBAOzB;IAED;;;;OAIG;IACH,kBAHW,eAAe,qBASzB;CACJ;uBApPsB,wBAAwB;0BADrB,yCAAyC;4BAEvC,kCAAkC"}
1
+ {"version":3,"file":"InputControllerSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/systems/InputControllerSystem.js"],"names":[],"mappings":";AAsLA;;GAEG;AACH;IACI,0BA+BC;IA7BG,uBAAsC;IAEtC,yCAAqC;IAErC,aAAsB;IA2B1B,2CAGC;IADG,YAAiB;IAGrB;;;;OAIG;IACH,gBAHW,eAAe,qBAUzB;IAED;;;;OAIG;IACH,kBAHW,eAAe,qBASzB;CACJ;uBAvPsB,wBAAwB;0BADrB,yCAAyC;4BAEvC,kCAAkC"}
@@ -228,9 +228,12 @@ class InputControllerSystem extends System {
228
228
  * @param entity
229
229
  */
230
230
  link(component, entity) {
231
- const mapping = component.mapping;
232
- const devices = this.devices;
233
- applyBindings(mapping, devices, this.proxies);
231
+ // Respect the enabled gate: while disabled, bindings are held out of the proxies. A component
232
+ // linked during the disabled window is (re-)applied for all components by the enabled onChanged
233
+ // handler on re-enable, so applying here too would double-register it (registerBinding has no dedupe).
234
+ if (this.enabled.getValue()) {
235
+ applyBindings(component.mapping, this.devices, this.proxies);
236
+ }
234
237
  }
235
238
 
236
239
  /**
@@ -239,9 +242,9 @@ class InputControllerSystem extends System {
239
242
  * @param entity
240
243
  */
241
244
  unlink(component, entity) {
242
- const mapping = component.mapping;
243
- const devices = this.devices;
244
- removeBindings(mapping, devices, this.proxies);
245
+ if (this.enabled.getValue()) {
246
+ removeBindings(component.mapping, this.devices, this.proxies);
247
+ }
245
248
 
246
249
  component.on.unlinked.send1(entity);
247
250
  }
@@ -115,7 +115,9 @@ declare class Path {
115
115
  * Read position along the path at a given 1D offset
116
116
  * @param {Vector3} result
117
117
  * @param {number} offset
118
- * @returns {boolean}
118
+ * @returns {boolean} true while `offset` lies within the path (a genuine interpolated point was
119
+ * produced); false once `offset` is at or beyond the end (the result is clamped to the last point)
120
+ * or the path is empty
119
121
  */
120
122
  sample_linear(result: Vector3, offset: number): boolean;
121
123
  /**
@@ -137,7 +139,8 @@ declare class Path {
137
139
  * @param {Vector3} result
138
140
  * @param {number} offset absolute distance offset along the path
139
141
  * @param {InterpolationType} [interpolation=this.interpolation]
140
- * @returns {boolean}
142
+ * @returns {boolean} true while `offset` lies within the path; false once it is clamped to the end
143
+ * (offset >= length) or the path is empty
141
144
  */
142
145
  sample(result: Vector3, offset: number, interpolation?: InterpolationType): boolean;
143
146
  toString(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/components/Path.js"],"names":[],"mappings":";AAyDA;IAqcI,8BAMC;IAzcG;;;;OAIG;IACH,eAOC;IAED;;;;OAIG;IACH,wBAA6C;IAE7C;;;OAGG;IACH,eAFU,iBAAiB,GAAC,MAAM,CAEW;IAE7C;;;;OAIG;IACH,iBAAkB;IAGtB;;;OAGG;IACH,WAFY,OAAO,CAIlB;IAED,cAEC;IAED;;;OAGG;IACH,iBAFY,MAAM,CAIjB;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,iBAFW,MAAM,QAkBhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,OAAO,CAenB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAiBhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,yBAWhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,UACN,UAAU,MAAM,CAAC,GAAC,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBACpD,MAAM,QAYhB;IAED;;;;OAIG;IACH,6BAHW,MAAM,oBAMhB;IAED;;;OAGG;IACH,mCAFW,SAAS,QAYnB;IAED;;OAEG;IACH,gBAEC;IAED;;;OAGG;IACH,YAFW,IAAI,QAMd;IAED;;;OAGG;IACH,SAFY,IAAI,CAQf;IAED;;;;OAIG;IACH,+CAFa,MAAM,CA0ClB;IAED;;;;;OAKG;IACH,uCAHW,MAAM,GACJ,OAAO,CA0BnB;IAED;;;;;OAKG;IACH,2CAJW,MAAM,EAAE,qBACR,MAAM,GACJ,OAAO,CAkDnB;IAED;;;;;OAKG;IACH,4CAHW,MAAM,GACJ,OAAO,CAuCnB;IAED;;;;;;OAMG;IACH,gCAJW,MAAM,kBACN,iBAAiB,GACf,OAAO,CAWnB;IAED,mBAEC;IAED;;;MAaC;IAUD;;;aAcC;IAED;;;OAGG;IACH,qBAYC;IAED;;;OAGG;IACH,iBAFa,MAAM,CAsClB;CAEJ;;;;kCAlkBiC,wBAAwB"}
1
+ {"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/navigation/ecs/components/Path.js"],"names":[],"mappings":";AAyDA;IA2cI,8BAMC;IA/cG;;;;OAIG;IACH,eAOC;IAED;;;;OAIG;IACH,wBAA6C;IAE7C;;;OAGG;IACH,eAFU,iBAAiB,GAAC,MAAM,CAEW;IAE7C;;;;OAIG;IACH,iBAAkB;IAGtB;;;OAGG;IACH,WAFY,OAAO,CAIlB;IAED,cAEC;IAED;;;OAGG;IACH,iBAFY,MAAM,CAIjB;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,iBAFW,MAAM,QAkBhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,OAAO,CAenB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAUhB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAiBhB;IAED;;;;OAIG;IACH,mBAHW,MAAM,yBAWhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,UACN,UAAU,MAAM,CAAC,GAAC,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBACpD,MAAM,QAYhB;IAED;;;;OAIG;IACH,6BAHW,MAAM,oBAMhB;IAED;;;OAGG;IACH,mCAFW,SAAS,QAYnB;IAED;;OAEG;IACH,gBAEC;IAED;;;OAGG;IACH,YAFW,IAAI,QAMd;IAED;;;OAGG;IACH,SAFY,IAAI,CAQf;IAED;;;;OAIG;IACH,+CAFa,MAAM,CA0ClB;IAED;;;;;;;OAOG;IACH,uCALW,MAAM,GACJ,OAAO,CA8BnB;IAED;;;;;OAKG;IACH,2CAJW,MAAM,EAAE,qBACR,MAAM,GACJ,OAAO,CAkDnB;IAED;;;;;OAKG;IACH,4CAHW,MAAM,GACJ,OAAO,CAwCnB;IAED;;;;;;;OAOG;IACH,gCALW,MAAM,kBACN,iBAAiB,GACf,OAAO,CAYnB;IAED,mBAEC;IAED;;;MAaC;IAUD;;;aAcC;IAED;;;OAGG;IACH,qBAYC;IAED;;;OAGG;IACH,iBAFa,MAAM,CAsClB;CAEJ;;;;kCAxkBiC,wBAAwB"}
@@ -342,7 +342,9 @@ class Path {
342
342
  * Read position along the path at a given 1D offset
343
343
  * @param {Vector3} result
344
344
  * @param {number} offset
345
- * @returns {boolean}
345
+ * @returns {boolean} true while `offset` lies within the path (a genuine interpolated point was
346
+ * produced); false once `offset` is at or beyond the end (the result is clamped to the last point)
347
+ * or the path is empty
346
348
  */
347
349
  sample_linear(result, offset) {
348
350
 
@@ -366,7 +368,9 @@ class Path {
366
368
  lerp(scratch_v3_a[1], scratch_v3_b[1], t),
367
369
  lerp(scratch_v3_a[2], scratch_v3_b[2], t),
368
370
  )
369
- return (t < 0 && index_next !== max_index);
371
+
372
+ // false once the offset is clamped to the last point (offset >= length); true while inside the path
373
+ return index !== max_index;
370
374
 
371
375
  }
372
376
 
@@ -468,7 +472,8 @@ class Path {
468
472
 
469
473
  result.fromArray(scratch_array_4, 0);
470
474
 
471
- return (t < 0 && i1 !== max_index);
475
+ // false once the offset is clamped to the last point (offset >= length); true while inside the path
476
+ return i1 !== max_index;
472
477
  }
473
478
 
474
479
  /**
@@ -476,7 +481,8 @@ class Path {
476
481
  * @param {Vector3} result
477
482
  * @param {number} offset absolute distance offset along the path
478
483
  * @param {InterpolationType} [interpolation=this.interpolation]
479
- * @returns {boolean}
484
+ * @returns {boolean} true while `offset` lies within the path; false once it is clamped to the end
485
+ * (offset >= length) or the path is empty
480
486
  */
481
487
  sample(result, offset, interpolation = this.interpolation) {
482
488
  switch (interpolation) {
@@ -48,7 +48,7 @@ function performStep(pathFollower, path, transform, timeDelta) {
48
48
  const next_offset = pathFollower.position + stepDistance;
49
49
  const next_offset_truncated = next_offset % path_length;
50
50
 
51
- if (next_offset > path_length && !pathFollower.getFlag(PathFollowerFlags.Loop)) {
51
+ if (next_offset >= path_length && !pathFollower.getFlag(PathFollowerFlags.Loop)) {
52
52
  // we're not looping
53
53
  remainingDistance = 0;
54
54
  path.sample(nextPosition, path_length);
@@ -64,11 +64,11 @@ export class FluidObstacleSystem extends System<any> {
64
64
  /**
65
65
  * @param {FluidComponent} fluid
66
66
  */
67
- static "__#165@#refresh_masks"(fluid: FluidComponent): void;
67
+ static "__#168@#refresh_masks"(fluid: FluidComponent): void;
68
68
  /**
69
69
  * @param {FluidComponent} fluid
70
70
  */
71
- static "__#165@#clear_field"(fluid: FluidComponent): void;
71
+ static "__#168@#clear_field"(fluid: FluidComponent): void;
72
72
  /**
73
73
  * Mark every cell of `fluid` whose centre lies within `inflation` of the
74
74
  * posed shape as solid. Iteration is clipped to the shape's world AABB
@@ -80,7 +80,7 @@ export class FluidObstacleSystem extends System<any> {
80
80
  * @param {number} inflation world-units SDF threshold
81
81
  * @param {Float64Array} point length-3 scratch
82
82
  */
83
- static "__#165@#voxelize"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array): void;
83
+ static "__#168@#voxelize"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array): void;
84
84
  /**
85
85
  * Write the obstacle's translation velocity onto every face of every cell
86
86
  * it voxelized — the moving-wall boundary condition. Runs AFTER the mask
@@ -100,7 +100,7 @@ export class FluidObstacleSystem extends System<any> {
100
100
  * @param {number} wvy
101
101
  * @param {number} wvz
102
102
  */
103
- static "__#165@#stamp_wall_velocity"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array, wvx: number, wvy: number, wvz: number): void;
103
+ static "__#168@#stamp_wall_velocity"(fluid: FluidComponent, posed: PosedShape3D, aabb: Float64Array, inflation: number, point: Float64Array, wvx: number, wvy: number, wvz: number): void;
104
104
  constructor();
105
105
  dependencies: (typeof FluidObstacle)[];
106
106
  components_used: (ResourceAccessSpecification<typeof Transform> | ResourceAccessSpecification<typeof RigidBody> | ResourceAccessSpecification<typeof Collider> | ResourceAccessSpecification<typeof FluidComponent> | ResourceAccessSpecification<typeof FluidObstacle>)[];
@@ -38,7 +38,7 @@ export class FluidSystem extends System<any> {
38
38
  * @param {FluidEffectorsComponent} effectors_component
39
39
  * @param {Transform} transform
40
40
  */
41
- static "__#164@#sync_effectors_from_transform"(effectors_component: FluidEffectorsComponent, transform: Transform): void;
41
+ static "__#167@#sync_effectors_from_transform"(effectors_component: FluidEffectorsComponent, transform: Transform): void;
42
42
  /**
43
43
  * Visitor for the (FluidComponent, Transform) traversal — keeps the field's
44
44
  * grid origin locked to a cell-aligned position near the transform.
@@ -61,7 +61,7 @@ export class FluidSystem extends System<any> {
61
61
  * @param {FluidComponent} component
62
62
  * @param {Transform} transform
63
63
  */
64
- static "__#164@#reanchor_field"(component: FluidComponent, transform: Transform): void;
64
+ static "__#167@#reanchor_field"(component: FluidComponent, transform: Transform): void;
65
65
  /**
66
66
  * Write the world-to-grid affine for a FluidComponent into `out`. Axis-aligned,
67
67
  * uniform-scale, so the matrix is sparse:
@@ -76,7 +76,7 @@ export class FluidSystem extends System<any> {
76
76
  * @param {Float32Array} out length-16
77
77
  * @param {FluidComponent} component
78
78
  */
79
- static "__#164@#build_world_to_grid"(out: Float32Array, component: FluidComponent): void;
79
+ static "__#167@#build_world_to_grid"(out: Float32Array, component: FluidComponent): void;
80
80
  constructor();
81
81
  dependencies: (typeof FluidComponent)[];
82
82
  /**