@woosh/meep-engine 2.92.9 → 2.92.11

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 (35) hide show
  1. package/build/meep.cjs +7 -13
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +7 -13
  4. package/package.json +1 -1
  5. package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts.map +1 -1
  6. package/src/core/bvh2/binary/2/BinaryUint32BVH.js +4 -0
  7. package/src/core/math/interval/NumericInterval.d.ts +3 -3
  8. package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
  9. package/src/core/math/interval/NumericInterval.js +7 -13
  10. package/src/core/math/interval/NumericInterval.spec.js +9 -0
  11. package/src/core/math/max3.spec.js +2 -0
  12. package/src/core/math/min3.spec.js +2 -0
  13. package/src/core/math/spline/spline_bezier3_bounds.js +3 -3
  14. package/src/core/math/spline/spline_hermite3.d.ts +11 -0
  15. package/src/core/math/spline/spline_hermite3.d.ts.map +1 -0
  16. package/src/core/math/spline/spline_hermite3.js +21 -0
  17. package/src/core/math/spline/spline_hermite3_bounds.d.ts +17 -0
  18. package/src/core/math/spline/spline_hermite3_bounds.d.ts.map +1 -0
  19. package/src/core/math/spline/spline_hermite3_bounds.js +95 -0
  20. package/src/core/math/spline/spline_hermite3_bounds.spec.d.ts +2 -0
  21. package/src/core/math/spline/spline_hermite3_bounds.spec.d.ts.map +1 -0
  22. package/src/core/math/spline/spline_hermite3_bounds.spec.js +37 -0
  23. package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
  24. package/src/engine/animation/curve/AnimationCurve.js +10 -16
  25. package/src/engine/animation/curve/AnimationCurve.spec.js +11 -0
  26. package/src/engine/animation/curve/compression/prototypeCurveCompression.js +13 -2
  27. package/src/engine/animation/curve/compute_curve_aabb.d.ts.map +1 -1
  28. package/src/engine/animation/curve/compute_curve_aabb.js +25 -4
  29. package/src/engine/animation/curve/draw/build_plot_entity_from_array.d.ts.map +1 -1
  30. package/src/engine/animation/curve/draw/build_plot_entity_from_array.js +10 -2
  31. package/src/engine/animation/curve/prototypeGLTF.js +14 -14
  32. package/src/engine/graphics/canvas/canvas2d_draw_label.d.ts +4 -1
  33. package/src/engine/graphics/canvas/canvas2d_draw_label.d.ts.map +1 -1
  34. package/src/engine/graphics/canvas/canvas2d_draw_label.js +10 -4
  35. package/src/engine/graphics/geometry/buffered/query/GeometrySpatialQueryAccelerator.js +2 -2
package/build/meep.cjs CHANGED
@@ -54357,13 +54357,6 @@ function inverseLerp(a, b, value) {
54357
54357
  return scaledValue / range;
54358
54358
  }
54359
54359
 
54360
- /**
54361
- *
54362
- * @param {number} min
54363
- * @param {number} max
54364
- * @constructor
54365
- */
54366
-
54367
54360
  class NumericInterval {
54368
54361
  /**
54369
54362
  *
@@ -54437,9 +54430,9 @@ class NumericInterval {
54437
54430
  }
54438
54431
 
54439
54432
  /**
54440
- * Performs inverse linear interpolation on a given input
54441
- * @param {number} v
54442
- * @returns {number}
54433
+ * Compute normalized position of input within this interval, where result is 0 if input is equal to `min`, and 1 when input is equal to `max`
54434
+ * @param {number} v value to be normalized
54435
+ * @returns {number} value between 0..1 if input is within [min,max] range, otherwise result will be extrapolated proportionately outside the 0,1 region
54443
54436
  */
54444
54437
  normalizeValue(v) {
54445
54438
  return inverseLerp(this.min, this.max, v);
@@ -54467,7 +54460,7 @@ class NumericInterval {
54467
54460
  * @returns {number}
54468
54461
  */
54469
54462
  computeAverage() {
54470
- return (this.min + this.max) / 2;
54463
+ return (this.min + this.max) * 0.5;
54471
54464
  }
54472
54465
 
54473
54466
  /**
@@ -55270,6 +55263,7 @@ class BinaryUint32BVH {
55270
55263
  * @param {number} count
55271
55264
  */
55272
55265
  setLeafCount(count) {
55266
+
55273
55267
  this.__node_count_leaf = count;
55274
55268
 
55275
55269
  const twoLeafLimit = ceilPowerOfTwo(count);
@@ -66308,14 +66302,14 @@ class GeometrySpatialQueryAccelerator {
66308
66302
  * @returns {BinaryUint32BVH}
66309
66303
  */
66310
66304
  __buildBVH(geometry) {
66305
+ const bvh = new BinaryUint32BVH();
66306
+
66311
66307
  const position_attribute = geometry.getAttribute('position');
66312
66308
  const index_attribute = geometry.getIndex();
66313
66309
 
66314
66310
  const de_interleaved_position_attribute = deinterleaveBufferAttribute(position_attribute);
66315
66311
  const vertices = de_interleaved_position_attribute.array;
66316
66312
 
66317
- const bvh = new BinaryUint32BVH();
66318
-
66319
66313
  if (index_attribute === undefined || index_attribute === null) {
66320
66314
  bvh32_from_unindexed_geometry(bvh, vertices);
66321
66315
  } else {