@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.
- package/build/meep.cjs +7 -13
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +7 -13
- package/package.json +1 -1
- package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts.map +1 -1
- package/src/core/bvh2/binary/2/BinaryUint32BVH.js +4 -0
- package/src/core/math/interval/NumericInterval.d.ts +3 -3
- package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
- package/src/core/math/interval/NumericInterval.js +7 -13
- package/src/core/math/interval/NumericInterval.spec.js +9 -0
- package/src/core/math/max3.spec.js +2 -0
- package/src/core/math/min3.spec.js +2 -0
- package/src/core/math/spline/spline_bezier3_bounds.js +3 -3
- package/src/core/math/spline/spline_hermite3.d.ts +11 -0
- package/src/core/math/spline/spline_hermite3.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3.js +21 -0
- package/src/core/math/spline/spline_hermite3_bounds.d.ts +17 -0
- package/src/core/math/spline/spline_hermite3_bounds.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3_bounds.js +95 -0
- package/src/core/math/spline/spline_hermite3_bounds.spec.d.ts +2 -0
- package/src/core/math/spline/spline_hermite3_bounds.spec.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3_bounds.spec.js +37 -0
- package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
- package/src/engine/animation/curve/AnimationCurve.js +10 -16
- package/src/engine/animation/curve/AnimationCurve.spec.js +11 -0
- package/src/engine/animation/curve/compression/prototypeCurveCompression.js +13 -2
- package/src/engine/animation/curve/compute_curve_aabb.d.ts.map +1 -1
- package/src/engine/animation/curve/compute_curve_aabb.js +25 -4
- package/src/engine/animation/curve/draw/build_plot_entity_from_array.d.ts.map +1 -1
- package/src/engine/animation/curve/draw/build_plot_entity_from_array.js +10 -2
- package/src/engine/animation/curve/prototypeGLTF.js +14 -14
- package/src/engine/graphics/canvas/canvas2d_draw_label.d.ts +4 -1
- package/src/engine/graphics/canvas/canvas2d_draw_label.d.ts.map +1 -1
- package/src/engine/graphics/canvas/canvas2d_draw_label.js +10 -4
- 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
|
-
*
|
|
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)
|
|
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 {
|