@woosh/meep-engine 2.94.4 → 2.94.5
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 +47 -9
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +47 -9
- package/editor/ecs/component/editors/ecs/Trail2DEditor.js +1 -1
- package/package.json +1 -1
- package/src/core/binary/BitSet.spec.js +14 -12
- package/src/core/geom/2d/aabb/AABB2.d.ts.map +1 -1
- package/src/core/geom/2d/aabb/AABB2.js +34 -4
- package/src/core/geom/3d/util/make_justified_point_grid.d.ts +2 -1
- package/src/core/geom/3d/util/make_justified_point_grid.d.ts.map +1 -1
- package/src/core/geom/3d/util/make_justified_point_grid.js +6 -3
- package/src/core/geom/vec3/v3_distance_sqr.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_distance_sqr.js +4 -1
- package/src/core/math/clamp.js +1 -1
- package/src/core/math/clamp01.d.ts +5 -0
- package/src/core/math/clamp01.d.ts.map +1 -1
- package/src/core/math/clamp01.js +6 -0
- package/src/engine/EngineConfiguration.d.ts.map +1 -1
- package/src/engine/EngineConfiguration.js +7 -0
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +0 -3
- package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
- package/src/engine/animation/AnimationUtils.js +2 -1
- package/src/engine/ecs/System.d.ts.map +1 -1
- package/src/engine/ecs/System.js +6 -0
- package/src/engine/ecs/util/hideEntityGracefully.d.ts.map +1 -1
- package/src/engine/ecs/util/hideEntityGracefully.js +12 -11
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts +10 -6
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2D.js +61 -13
- package/src/engine/graphics/ecs/trail2d/Trail2DFlags.d.ts +8 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DFlags.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DFlags.js +10 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +14 -33
- package/src/engine/graphics/ecs/trail2d/makeGradientTrail.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/makeGradientTrail.js +2 -1
- package/src/engine/graphics/ecs/trail2d/prototypeTrail2D.d.ts +2 -0
- package/src/engine/graphics/ecs/trail2d/prototypeTrail2D.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail2d/prototypeTrail2D.js +65 -0
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +1 -1
- package/src/engine/graphics/trail/x/RibbonX.d.ts +2 -2
- package/src/engine/graphics/trail/x/RibbonX.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/RibbonX.js +16 -8
- package/src/engine/graphics/trail/x/simulator/RibbonXFixedPhysicsSimulator.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/simulator/RibbonXFixedPhysicsSimulator.js +2 -1
package/build/meep.cjs
CHANGED
|
@@ -1722,7 +1722,7 @@ function dispatchViaProxy(handlers, args) {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
|
|
1724
1724
|
/**
|
|
1725
|
-
*
|
|
1725
|
+
* Constrain a value to lie between specified min/max values
|
|
1726
1726
|
* @param {number} value
|
|
1727
1727
|
* @param {number} min
|
|
1728
1728
|
* @param {number} max
|
|
@@ -68379,6 +68379,12 @@ class System {
|
|
|
68379
68379
|
|
|
68380
68380
|
}
|
|
68381
68381
|
|
|
68382
|
+
/**
|
|
68383
|
+
* @readonly
|
|
68384
|
+
* @type {boolean}
|
|
68385
|
+
*/
|
|
68386
|
+
System.prototype.isSystem = true;
|
|
68387
|
+
|
|
68382
68388
|
/**
|
|
68383
68389
|
* Fixed update function, every step happens with the same exact time increment
|
|
68384
68390
|
* useful for systems that must have a fixed time step to be predictable and stable, such as physics
|
|
@@ -74309,7 +74315,10 @@ function returnTrue() {
|
|
|
74309
74315
|
* @param {number} z1
|
|
74310
74316
|
* @returns {number}
|
|
74311
74317
|
*/
|
|
74312
|
-
function v3_distance_sqr(
|
|
74318
|
+
function v3_distance_sqr(
|
|
74319
|
+
x0, y0, z0,
|
|
74320
|
+
x1, y1, z1
|
|
74321
|
+
) {
|
|
74313
74322
|
const x = x0 - x1;
|
|
74314
74323
|
const y = y0 - y1;
|
|
74315
74324
|
const z = z0 - z1;
|
|
@@ -79725,10 +79734,24 @@ class AABB2 {
|
|
|
79725
79734
|
* @param {Vector2} result
|
|
79726
79735
|
*/
|
|
79727
79736
|
getCenter(result) {
|
|
79728
|
-
result.set(
|
|
79729
|
-
|
|
79730
|
-
|
|
79731
|
-
|
|
79737
|
+
result.set(this.centerX, this.centerY);
|
|
79738
|
+
}
|
|
79739
|
+
|
|
79740
|
+
/**
|
|
79741
|
+
*
|
|
79742
|
+
* @return {number}
|
|
79743
|
+
*/
|
|
79744
|
+
get centerX() {
|
|
79745
|
+
return (this.x0 + this.x1) * 0.5;
|
|
79746
|
+
}
|
|
79747
|
+
|
|
79748
|
+
/**
|
|
79749
|
+
*
|
|
79750
|
+
* @return {number}
|
|
79751
|
+
*/
|
|
79752
|
+
get centerY() {
|
|
79753
|
+
|
|
79754
|
+
return (this.y0 + this.y1) * 0.5
|
|
79732
79755
|
}
|
|
79733
79756
|
|
|
79734
79757
|
/**
|
|
@@ -79739,6 +79762,14 @@ class AABB2 {
|
|
|
79739
79762
|
return this.x1 - this.x0;
|
|
79740
79763
|
}
|
|
79741
79764
|
|
|
79765
|
+
/**
|
|
79766
|
+
*
|
|
79767
|
+
* @return {number}
|
|
79768
|
+
*/
|
|
79769
|
+
get width() {
|
|
79770
|
+
return this.getWidth();
|
|
79771
|
+
}
|
|
79772
|
+
|
|
79742
79773
|
/**
|
|
79743
79774
|
*
|
|
79744
79775
|
* @returns {number}
|
|
@@ -79747,6 +79778,14 @@ class AABB2 {
|
|
|
79747
79778
|
return this.y1 - this.y0;
|
|
79748
79779
|
}
|
|
79749
79780
|
|
|
79781
|
+
/**
|
|
79782
|
+
*
|
|
79783
|
+
* @return {number}
|
|
79784
|
+
*/
|
|
79785
|
+
get height() {
|
|
79786
|
+
return this.getHeight();
|
|
79787
|
+
}
|
|
79788
|
+
|
|
79750
79789
|
/**
|
|
79751
79790
|
*
|
|
79752
79791
|
* @param {Number} x0
|
|
@@ -103937,6 +103976,7 @@ class EngineConfiguration {
|
|
|
103937
103976
|
* @returns {boolean}
|
|
103938
103977
|
*/
|
|
103939
103978
|
addSystem(system) {
|
|
103979
|
+
|
|
103940
103980
|
this.systems.push(system);
|
|
103941
103981
|
|
|
103942
103982
|
return true;
|
|
@@ -103946,6 +103986,7 @@ class EngineConfiguration {
|
|
|
103946
103986
|
* @param {System} systems
|
|
103947
103987
|
*/
|
|
103948
103988
|
addManySystems(...systems) {
|
|
103989
|
+
|
|
103949
103990
|
systems.forEach(s => this.addSystem(s));
|
|
103950
103991
|
}
|
|
103951
103992
|
|
|
@@ -115305,9 +115346,6 @@ class EngineHarness {
|
|
|
115305
115346
|
terrain.splat.resize(1, 1, 1);
|
|
115306
115347
|
terrain.splat.fillLayerWeights(0, 255);
|
|
115307
115348
|
|
|
115308
|
-
terrain.build(engine.assetManager);
|
|
115309
|
-
|
|
115310
|
-
|
|
115311
115349
|
const eb = new Entity();
|
|
115312
115350
|
|
|
115313
115351
|
eb.add(new Transform());
|