@woosh/meep-engine 2.63.0 → 2.64.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.
- package/build/meep.cjs +30 -23
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +30 -23
- package/package.json +1 -1
- package/src/core/binary/UINT16_MAX.js +5 -0
- package/src/core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy.js +5 -5
- package/src/core/bvh2/bvh3/query/BVHQueryIntersectsFrustum.js +8 -10
- package/src/core/bvh2/bvh3/query/BVHQueryIntersectsRay.js +7 -7
- package/src/core/bvh2/bvh3/query/BVHQueryIntersectsSphere.js +37 -0
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_generic.js +12 -4
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_generic.spec.js +29 -0
- package/src/core/collection/list/List.js +9 -3
- package/src/core/geom/3d/aabb/aabb3_from_v3_array.js +11 -4
- package/src/core/geom/Vector2.js +6 -4
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +49 -86
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +41 -72
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +28 -0
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +17 -17
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.js +0 -81
- package/src/engine/ecs/foliage/Foliage.js +0 -151
- package/src/engine/ecs/foliage/FoliageLoader.js +0 -39
- package/src/engine/ecs/foliage/FoliageVisibilitySetBuilder.js +0 -27
- package/src/engine/ecs/foliage/ImpostorFoliage.js +0 -106
- package/src/engine/ecs/foliage/InstancedFoliage.js +0 -395
- package/src/engine/ecs/foliage/ViewState.js +0 -181
- package/src/engine/ecs/foliage/ecs/Foliage2System.js +0 -333
- package/src/engine/ecs/foliage/ecs/InstancedMeshComponent.js +0 -70
- package/src/engine/ecs/foliage/ecs/InstancedMeshLayer.js +0 -138
- package/src/engine/ecs/foliage/ecs/InstancedMeshSerializationAdapter.js +0 -28
- package/src/engine/ecs/foliage/ecs/convertInstancedMeshComponents2Entities.js +0 -64
- package/src/engine/ecs/foliage/ecs/optimizeIndividualMeshesEntitiesToInstances.js +0 -233
- package/src/engine/save/storage/GooglePlayStorage.js +0 -47
- package/src/engine/save/storage/JsonStringCodec.js +0 -24
- /package/src/engine/sound/ecs/emitter/{SoundEmitter.spec.js → SoundEmitterSerializationAdapter.spec.js} +0 -0
package/build/meep.cjs
CHANGED
|
@@ -53508,8 +53508,8 @@ class Vector2 {
|
|
|
53508
53508
|
* @returns {number}
|
|
53509
53509
|
*/
|
|
53510
53510
|
hash() {
|
|
53511
|
-
const x =
|
|
53512
|
-
const y =
|
|
53511
|
+
const x = computeHashFloat(this.x);
|
|
53512
|
+
const y = computeHashFloat(this.y);
|
|
53513
53513
|
|
|
53514
53514
|
let hash = ((x << 5) - x) + y;
|
|
53515
53515
|
|
|
@@ -53646,6 +53646,7 @@ Vector2.one = Object.freeze(new Vector2(1, 1));
|
|
|
53646
53646
|
* @type {boolean}
|
|
53647
53647
|
*/
|
|
53648
53648
|
Vector2.prototype.isVector2 = true;
|
|
53649
|
+
|
|
53649
53650
|
/**
|
|
53650
53651
|
*
|
|
53651
53652
|
* @param {number} x0
|
|
@@ -62095,9 +62096,12 @@ class List {
|
|
|
62095
62096
|
/**
|
|
62096
62097
|
* Retrieve element at a given position in the list
|
|
62097
62098
|
* @param {number} index
|
|
62098
|
-
* @returns {T}
|
|
62099
|
+
* @returns {T|undefined}
|
|
62099
62100
|
*/
|
|
62100
62101
|
get(index) {
|
|
62102
|
+
assert.isNumber(index, 'index');
|
|
62103
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
62104
|
+
|
|
62101
62105
|
return this.data[index];
|
|
62102
62106
|
}
|
|
62103
62107
|
|
|
@@ -62107,6 +62111,9 @@ class List {
|
|
|
62107
62111
|
* @param {T} value
|
|
62108
62112
|
*/
|
|
62109
62113
|
set(index, value) {
|
|
62114
|
+
assert.isNumber(index, 'index');
|
|
62115
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
62116
|
+
|
|
62110
62117
|
const oldValue = this.data[index];
|
|
62111
62118
|
|
|
62112
62119
|
if (oldValue !== undefined) {
|
|
@@ -62227,7 +62234,7 @@ class List {
|
|
|
62227
62234
|
/**
|
|
62228
62235
|
* Replace the data, replacements is performed surgically, meaning that diff is computed and add/remove operations are performed on the set
|
|
62229
62236
|
* This method is tailored to work well with visualisation as only elements that's missing from the new set is removed, and only elements that are new to are added
|
|
62230
|
-
* Conversely, relevant events are dispatched that
|
|
62237
|
+
* Conversely, relevant events are dispatched that can observe. This results in fewer changes required to the visualisation
|
|
62231
62238
|
* @param {T[]} newOutput
|
|
62232
62239
|
*/
|
|
62233
62240
|
patch(newOutput) {
|
|
@@ -79042,7 +79049,7 @@ class ExplicitBinaryBoundingVolumeHierarchy {
|
|
|
79042
79049
|
/**
|
|
79043
79050
|
*
|
|
79044
79051
|
* @param {number} id
|
|
79045
|
-
* @param {number[]} result
|
|
79052
|
+
* @param {number[]|Float32Array} result
|
|
79046
79053
|
*/
|
|
79047
79054
|
node_get_aabb(id, result) {
|
|
79048
79055
|
assert.isNonNegativeInteger(id, 'id');
|
|
@@ -80201,18 +80208,6 @@ function bvh_query_leaves_generic(
|
|
|
80201
80208
|
return result_cursor - result_offset;
|
|
80202
80209
|
}
|
|
80203
80210
|
|
|
80204
|
-
class BVHQuery {
|
|
80205
|
-
/**
|
|
80206
|
-
*
|
|
80207
|
-
* @param {number} node
|
|
80208
|
-
* @param {ExplicitBinaryBoundingVolumeHierarchy} tree
|
|
80209
|
-
* @returns {boolean}
|
|
80210
|
-
*/
|
|
80211
|
-
evaluate(node, tree) {
|
|
80212
|
-
throw new Error('Not Implemented');
|
|
80213
|
-
}
|
|
80214
|
-
}
|
|
80215
|
-
|
|
80216
80211
|
/**
|
|
80217
80212
|
*
|
|
80218
80213
|
* @param {ArrayLike<number>|number[]|Float32Array} aabb bounding box, order: x0,y0,z0,x1,y1,z1
|
|
@@ -80227,21 +80222,33 @@ function aabb3_array_intersects_ray_array(aabb, ray) {
|
|
|
80227
80222
|
);
|
|
80228
80223
|
}
|
|
80229
80224
|
|
|
80225
|
+
class BVHQuery {
|
|
80226
|
+
/**
|
|
80227
|
+
*
|
|
80228
|
+
* @param {number} node
|
|
80229
|
+
* @param {ExplicitBinaryBoundingVolumeHierarchy} tree
|
|
80230
|
+
* @returns {boolean}
|
|
80231
|
+
*/
|
|
80232
|
+
evaluate(node, tree) {
|
|
80233
|
+
throw new Error('Not Implemented');
|
|
80234
|
+
}
|
|
80235
|
+
}
|
|
80236
|
+
|
|
80230
80237
|
const scratch_aabb = [];
|
|
80231
80238
|
|
|
80232
80239
|
class BVHQueryIntersectsRay extends BVHQuery {
|
|
80233
|
-
|
|
80234
|
-
|
|
80235
|
-
|
|
80236
|
-
|
|
80237
|
-
|
|
80240
|
+
/**
|
|
80241
|
+
*
|
|
80242
|
+
* @type {number[]}
|
|
80243
|
+
*/
|
|
80244
|
+
ray = [];
|
|
80238
80245
|
|
|
80239
80246
|
/**
|
|
80240
80247
|
*
|
|
80241
80248
|
* @param {number[]|ArrayLike<number>} ray
|
|
80242
80249
|
* @returns {BVHQueryIntersectsRay}
|
|
80243
80250
|
*/
|
|
80244
|
-
static from(ray){
|
|
80251
|
+
static from(ray) {
|
|
80245
80252
|
const r = new BVHQueryIntersectsRay();
|
|
80246
80253
|
|
|
80247
80254
|
r.ray = ray;
|