@woosh/meep-engine 2.59.5 → 2.60.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 +102 -103
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +102 -103
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +1 -1
- package/package.json +1 -1
- package/src/core/bvh2/binary/IndexedBinaryBVH.js +2 -1
- package/src/core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy.js +1 -1
- package/src/core/bvh2/serialization/serializeBinaryNode.js +4 -4
- package/src/core/collection/list/List.js +2 -2
- package/src/core/collection/map/HashMap.js +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +1 -1
- package/src/core/debug/matchers/DescribeAs.js +2 -2
- package/src/core/debug/matchers/IsIn.js +4 -1
- package/src/core/debug/matchers/matchers.js +1 -1
- package/src/core/events/signal/Signal.js +1 -1
- package/src/core/geom/2d/line/line_segment_compute_line_segment_intersection_vectors_array_2d.js +1 -1
- package/src/core/geom/2d/quad-tree/QuadTreeNode.js +2 -2
- package/src/core/geom/2d/quad-tree/qt_collect_by_circle.js +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +1 -1
- package/src/core/geom/packing/miniball/Miniball.js +0 -1
- package/src/core/geom/packing/miniball/Subspan.js +1 -3
- package/src/core/graph/coloring/colorizeGraph.js +1 -1
- package/src/core/localization/Localization.js +11 -11
- package/src/core/model/ModuleRegistry.js +4 -4
- package/src/core/primitives/strings/prefixTree/PrefixTree.js +2 -2
- package/src/core/process/buildPromiseChain.js +1 -1
- package/src/core/process/task/Task.js +3 -3
- package/src/core/process/worker/OnDemandWorkerManager.js +1 -1
- package/src/core/process/worker/WorkerProxy.js +1 -1
- package/src/core/process/worker/extractTransferables.js +1 -1
- package/src/engine/EngineConfiguration.js +0 -1
- package/src/engine/EngineHarness.js +1 -1
- package/src/engine/asset/loaders/material/computeTextureEquality.js +2 -2
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityBlueprint.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +4 -4
- package/src/engine/ecs/System.js +1 -1
- package/src/engine/ecs/parent/EntityNode.js +10 -10
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +4 -4
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +2 -3
- package/src/engine/graphics/ecs/camera/CameraSystem.js +2 -3
- package/src/engine/graphics/ecs/mesh-v2/sample/prototypeShadedGeometry.js +3 -3
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +1 -1
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +1 -1
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +2 -2
- package/src/engine/graphics/particles/node-based/simulation/GLSLSimulationShader.js +1 -1
- package/src/engine/graphics/particles/node-based/simulation/TransformFeedback.js +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +2 -2
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +1 -1
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +1 -1
- package/src/engine/graphics/render/view/CameraView.js +1 -1
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +1 -1
- package/src/engine/graphics/shaders/ClearShader.js +1 -1
- package/src/engine/graphics/shadows/testShadowMapRendering.js +1 -1
- package/src/engine/input/ecs/components/InputController.js +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +1 -1
- package/src/misc/makeMaterialIconCached.js +8 -1
package/build/meep.module.js
CHANGED
|
@@ -764,7 +764,7 @@ const dispatch_stack = [];
|
|
|
764
764
|
let dispatch_stack_top = 0;
|
|
765
765
|
|
|
766
766
|
/**
|
|
767
|
-
* Signal is a type of event bus. You can subscribe to events using {@link add
|
|
767
|
+
* Signal is a type of event bus. You can subscribe to events using {@link add} method and dispatch using sendN method where N is the number of arguments you wish to pass
|
|
768
768
|
* Signal is different from a normal event bus in that 1 signal corresponds to 1 event type. For example, in HTML you have `addEventListener` which lets you subscribe to any kind of event, let's use "mousedown" as a reference. Using a Signal you would instead have a signal corresponding to "mousedown" and dispatch this signal only for this event.
|
|
769
769
|
* @example `const mouseDown = new Signal<MouseEvent>(); mouseDown.send1(myMouseEvent);`
|
|
770
770
|
*/
|
|
@@ -55940,8 +55940,9 @@ class IndexedBinaryBVH {
|
|
|
55940
55940
|
}
|
|
55941
55941
|
|
|
55942
55942
|
/**
|
|
55943
|
+
* @template T
|
|
55943
55944
|
* @deprecated use {@link #writeLeaf} instead followed by {@link #unsortedBuiltIntermediate}
|
|
55944
|
-
* @param {function(index:number,offset:number,data
|
|
55945
|
+
* @param {function(index:number,offset:number,data:T, writeBox:function):void} visitor
|
|
55945
55946
|
*/
|
|
55946
55947
|
setLeafs(visitor) {
|
|
55947
55948
|
let offset = this.binaryNodeCount * 6;
|
|
@@ -60407,7 +60408,7 @@ class HashMap {
|
|
|
60407
60408
|
|
|
60408
60409
|
/**
|
|
60409
60410
|
* Note that dead entries are marked as such with a special reserved hash values, so records can be reused for new entries
|
|
60410
|
-
* @type {MapEntry<K,V
|
|
60411
|
+
* @type {Array<MapEntry<K,V>>}
|
|
60411
60412
|
*/
|
|
60412
60413
|
#entries = new Array(0);
|
|
60413
60414
|
|
|
@@ -62751,8 +62752,8 @@ class List {
|
|
|
62751
62752
|
}
|
|
62752
62753
|
|
|
62753
62754
|
/**
|
|
62754
|
-
*
|
|
62755
|
-
* @param {[]} json
|
|
62755
|
+
* @template J
|
|
62756
|
+
* @param {J[]} json
|
|
62756
62757
|
* @param {function} constructor
|
|
62757
62758
|
*/
|
|
62758
62759
|
fromJSON(json, constructor) {
|
|
@@ -64122,7 +64123,7 @@ class Task {
|
|
|
64122
64123
|
|
|
64123
64124
|
/**
|
|
64124
64125
|
*
|
|
64125
|
-
* @type {function(Task, executor:
|
|
64126
|
+
* @type {function(Task, executor:ConcurrentExecutor)}
|
|
64126
64127
|
*/
|
|
64127
64128
|
this.initialize = initializer;
|
|
64128
64129
|
|
|
@@ -64216,7 +64217,7 @@ class Task {
|
|
|
64216
64217
|
|
|
64217
64218
|
/**
|
|
64218
64219
|
*
|
|
64219
|
-
* @param {(Task|TaskGroup)
|
|
64220
|
+
* @param {Array<(Task|TaskGroup)>} tasks
|
|
64220
64221
|
*/
|
|
64221
64222
|
addDependencies(tasks) {
|
|
64222
64223
|
if (!Array.isArray(tasks)) {
|
|
@@ -64272,7 +64273,7 @@ class Task {
|
|
|
64272
64273
|
|
|
64273
64274
|
/**
|
|
64274
64275
|
*
|
|
64275
|
-
* @param {(Task|TaskGroup)
|
|
64276
|
+
* @param {Array<(Task|TaskGroup)>} tasks
|
|
64276
64277
|
* @return {Promise}
|
|
64277
64278
|
*/
|
|
64278
64279
|
static promiseAll(tasks) {
|
|
@@ -65110,7 +65111,7 @@ class WorkerProxy {
|
|
|
65110
65111
|
/**
|
|
65111
65112
|
* @template T
|
|
65112
65113
|
* @param {number} name
|
|
65113
|
-
* @param {
|
|
65114
|
+
* @param {Array} args
|
|
65114
65115
|
* @return {Promise<T>}
|
|
65115
65116
|
*/
|
|
65116
65117
|
$submitRequest(name, args) {
|
|
@@ -69418,7 +69419,7 @@ class System {
|
|
|
69418
69419
|
|
|
69419
69420
|
|
|
69420
69421
|
/**
|
|
69421
|
-
* @returns {
|
|
69422
|
+
* @returns {Array} Component classes
|
|
69422
69423
|
*/
|
|
69423
69424
|
get referenced_components() {
|
|
69424
69425
|
const result = [];
|
|
@@ -70652,14 +70653,13 @@ ResourceAccessSpecification.prototype.isResourceAccessSpecification = true;
|
|
|
70652
70653
|
class CameraSystem extends System {
|
|
70653
70654
|
/**
|
|
70654
70655
|
*
|
|
70655
|
-
* @param {THREE.Scene} scene
|
|
70656
70656
|
* @param {GraphicsEngine} graphics
|
|
70657
70657
|
* @constructor
|
|
70658
70658
|
*/
|
|
70659
|
-
constructor(
|
|
70659
|
+
constructor(graphics) {
|
|
70660
70660
|
super();
|
|
70661
70661
|
|
|
70662
|
-
this.scene = scene;
|
|
70662
|
+
this.scene = graphics.scene;
|
|
70663
70663
|
|
|
70664
70664
|
this.dependencies = [Camera, Transform];
|
|
70665
70665
|
|
|
@@ -71583,7 +71583,7 @@ class OnDemandWorkerManager {
|
|
|
71583
71583
|
/**
|
|
71584
71584
|
* @template T
|
|
71585
71585
|
* @param {string} name
|
|
71586
|
-
* @param {
|
|
71586
|
+
* @param {Array} [parameters]
|
|
71587
71587
|
* @return {Promise<T>}
|
|
71588
71588
|
*/
|
|
71589
71589
|
request(name, parameters) {
|
|
@@ -72063,55 +72063,28 @@ class TerrainSystem extends System {
|
|
|
72063
72063
|
}
|
|
72064
72064
|
|
|
72065
72065
|
/**
|
|
72066
|
-
*
|
|
72066
|
+
* Remove first occurrence of element from the array
|
|
72067
|
+
* @template T
|
|
72068
|
+
* @param {T[]} array
|
|
72069
|
+
* @param {T} element
|
|
72070
|
+
* @param {number} [start_index]
|
|
72071
|
+
* @param {number} [length]
|
|
72072
|
+
* @return {boolean} true if element was removed, false if it was not found
|
|
72067
72073
|
*/
|
|
72068
|
-
|
|
72069
|
-
/**
|
|
72070
|
-
* * @constructor
|
|
72071
|
-
*/
|
|
72072
|
-
constructor() {
|
|
72073
|
-
/**
|
|
72074
|
-
* Entity representing logical parent.
|
|
72075
|
-
* Must not be mutated (changed) while component is attached to a dataset
|
|
72076
|
-
* @type {number}
|
|
72077
|
-
*/
|
|
72078
|
-
this.entity = -1;
|
|
72079
|
-
}
|
|
72080
|
-
|
|
72081
|
-
/**
|
|
72082
|
-
*
|
|
72083
|
-
* @param {number} entity
|
|
72084
|
-
* @returns {ParentEntity}
|
|
72085
|
-
*/
|
|
72086
|
-
static from(entity) {
|
|
72087
|
-
const r = new ParentEntity();
|
|
72088
|
-
|
|
72089
|
-
r.entity = entity;
|
|
72074
|
+
function array_remove_first(array, element, start_index = 0, length = array.length) {
|
|
72090
72075
|
|
|
72091
|
-
|
|
72092
|
-
}
|
|
72076
|
+
const end_index = start_index + length;
|
|
72093
72077
|
|
|
72094
|
-
|
|
72095
|
-
|
|
72096
|
-
|
|
72097
|
-
};
|
|
72098
|
-
}
|
|
72078
|
+
for (let i = start_index; i < end_index; i++) {
|
|
72079
|
+
if (array[i] === element) {
|
|
72080
|
+
array.splice(i, 1);
|
|
72099
72081
|
|
|
72100
|
-
|
|
72101
|
-
|
|
72082
|
+
return true;
|
|
72083
|
+
}
|
|
72102
72084
|
}
|
|
72103
|
-
}
|
|
72104
72085
|
|
|
72105
|
-
|
|
72106
|
-
|
|
72107
|
-
* @type {string}
|
|
72108
|
-
*/
|
|
72109
|
-
ParentEntity.typeName = "ParentEntity";
|
|
72110
|
-
/**
|
|
72111
|
-
*
|
|
72112
|
-
* @type {boolean}
|
|
72113
|
-
*/
|
|
72114
|
-
ParentEntity.serializable = false;
|
|
72086
|
+
return false;
|
|
72087
|
+
}
|
|
72115
72088
|
|
|
72116
72089
|
/**
|
|
72117
72090
|
* de Bruijn sequence
|
|
@@ -74821,7 +74794,7 @@ class Entity {
|
|
|
74821
74794
|
* @returns {Entity}
|
|
74822
74795
|
*/
|
|
74823
74796
|
add(componentInstance) {
|
|
74824
|
-
if (componentInstance === undefined) {
|
|
74797
|
+
if (componentInstance === undefined || componentInstance === null) {
|
|
74825
74798
|
throw new Error(`Can not add ${componentInstance} to Entity`);
|
|
74826
74799
|
}
|
|
74827
74800
|
|
|
@@ -75136,30 +75109,6 @@ function checkExistingComponents(entity, components, dataset) {
|
|
|
75136
75109
|
return true;
|
|
75137
75110
|
}
|
|
75138
75111
|
|
|
75139
|
-
/**
|
|
75140
|
-
* Remove first occurrence of element from the array
|
|
75141
|
-
* @template T
|
|
75142
|
-
* @param {T[]} array
|
|
75143
|
-
* @param {T} element
|
|
75144
|
-
* @param {number} [start_index]
|
|
75145
|
-
* @param {number} [length]
|
|
75146
|
-
* @return {boolean} true if element was removed, false if it was not found
|
|
75147
|
-
*/
|
|
75148
|
-
function array_remove_first(array, element, start_index = 0, length = array.length) {
|
|
75149
|
-
|
|
75150
|
-
const end_index = start_index + length;
|
|
75151
|
-
|
|
75152
|
-
for (let i = start_index; i < end_index; i++) {
|
|
75153
|
-
if (array[i] === element) {
|
|
75154
|
-
array.splice(i, 1);
|
|
75155
|
-
|
|
75156
|
-
return true;
|
|
75157
|
-
}
|
|
75158
|
-
}
|
|
75159
|
-
|
|
75160
|
-
return false;
|
|
75161
|
-
}
|
|
75162
|
-
|
|
75163
75112
|
const TransformAttachmentFlags = {
|
|
75164
75113
|
/**
|
|
75165
75114
|
* Update will be performed when component is attached.
|
|
@@ -75277,6 +75226,57 @@ const EntityNodeFlags = {
|
|
|
75277
75226
|
TransformObserved: 2
|
|
75278
75227
|
};
|
|
75279
75228
|
|
|
75229
|
+
/**
|
|
75230
|
+
* Component representing logical attachment to another entity, when parent disappears - so does the child
|
|
75231
|
+
*/
|
|
75232
|
+
class ParentEntity {
|
|
75233
|
+
/**
|
|
75234
|
+
* * @constructor
|
|
75235
|
+
*/
|
|
75236
|
+
constructor() {
|
|
75237
|
+
/**
|
|
75238
|
+
* Entity representing logical parent.
|
|
75239
|
+
* Must not be mutated (changed) while component is attached to a dataset
|
|
75240
|
+
* @type {number}
|
|
75241
|
+
*/
|
|
75242
|
+
this.entity = -1;
|
|
75243
|
+
}
|
|
75244
|
+
|
|
75245
|
+
/**
|
|
75246
|
+
*
|
|
75247
|
+
* @param {number} entity
|
|
75248
|
+
* @returns {ParentEntity}
|
|
75249
|
+
*/
|
|
75250
|
+
static from(entity) {
|
|
75251
|
+
const r = new ParentEntity();
|
|
75252
|
+
|
|
75253
|
+
r.entity = entity;
|
|
75254
|
+
|
|
75255
|
+
return r;
|
|
75256
|
+
}
|
|
75257
|
+
|
|
75258
|
+
toJSON() {
|
|
75259
|
+
return {
|
|
75260
|
+
entity: this.entity,
|
|
75261
|
+
};
|
|
75262
|
+
}
|
|
75263
|
+
|
|
75264
|
+
fromJSON({ entity }) {
|
|
75265
|
+
this.entity = entity;
|
|
75266
|
+
}
|
|
75267
|
+
}
|
|
75268
|
+
|
|
75269
|
+
/**
|
|
75270
|
+
* @readonly
|
|
75271
|
+
* @type {string}
|
|
75272
|
+
*/
|
|
75273
|
+
ParentEntity.typeName = "ParentEntity";
|
|
75274
|
+
/**
|
|
75275
|
+
*
|
|
75276
|
+
* @type {boolean}
|
|
75277
|
+
*/
|
|
75278
|
+
ParentEntity.serializable = false;
|
|
75279
|
+
|
|
75280
75280
|
const DEFAULT_FLAGS$1 = EntityNodeFlags.LiveManagement;
|
|
75281
75281
|
|
|
75282
75282
|
class EntityNode {
|
|
@@ -75385,7 +75385,7 @@ class EntityNode {
|
|
|
75385
75385
|
|
|
75386
75386
|
/**
|
|
75387
75387
|
*
|
|
75388
|
-
* @param {(EntityNode)
|
|
75388
|
+
* @param {function(node:EntityNode):*} visitor
|
|
75389
75389
|
* @param {*} [context]
|
|
75390
75390
|
*/
|
|
75391
75391
|
traverseChildren(visitor, context) {
|
|
@@ -75394,7 +75394,7 @@ class EntityNode {
|
|
|
75394
75394
|
|
|
75395
75395
|
/**
|
|
75396
75396
|
*
|
|
75397
|
-
* @return {Readonly<EntityNode
|
|
75397
|
+
* @return {Readonly<Array<EntityNode>>}
|
|
75398
75398
|
*/
|
|
75399
75399
|
get children() {
|
|
75400
75400
|
return this.__children;
|
|
@@ -77110,8 +77110,8 @@ function textureImagesEqual(a, b) {
|
|
|
77110
77110
|
|
|
77111
77111
|
/**
|
|
77112
77112
|
*
|
|
77113
|
-
* @param {
|
|
77114
|
-
* @param {
|
|
77113
|
+
* @param {Array} a
|
|
77114
|
+
* @param {Array} b
|
|
77115
77115
|
* @returns {boolean}
|
|
77116
77116
|
*/
|
|
77117
77117
|
function textureMipChainEqual(a, b) {
|
|
@@ -79615,7 +79615,7 @@ class ExplicitBinaryBoundingVolumeHierarchy {
|
|
|
79615
79615
|
|
|
79616
79616
|
/**
|
|
79617
79617
|
*
|
|
79618
|
-
* @param {(node:number, tree:ExplicitBinaryBoundingVolumeHierarchy)
|
|
79618
|
+
* @param {function(node:number, tree:ExplicitBinaryBoundingVolumeHierarchy):void} callback
|
|
79619
79619
|
* @param {*} [ctx]
|
|
79620
79620
|
*/
|
|
79621
79621
|
traverse(callback, ctx) {
|
|
@@ -90391,7 +90391,7 @@ class CameraView {
|
|
|
90391
90391
|
|
|
90392
90392
|
/**
|
|
90393
90393
|
*
|
|
90394
|
-
* @type {{transform:(Float32Array, Float32Array)
|
|
90394
|
+
* @type {Array<{transform:function(Float32Array, Float32Array):void, context:*}>}
|
|
90395
90395
|
*/
|
|
90396
90396
|
this.projection_modifiers = [];
|
|
90397
90397
|
}
|
|
@@ -93047,8 +93047,8 @@ class EntityComponentDataset {
|
|
|
93047
93047
|
/**
|
|
93048
93048
|
* Convenience method for retrieving a collection of components for a given entity
|
|
93049
93049
|
* @param {number} entity ID of the entity
|
|
93050
|
-
* @param {
|
|
93051
|
-
* @returns {
|
|
93050
|
+
* @param {Array} componentClasses Classes of components to extract
|
|
93051
|
+
* @returns {Array}
|
|
93052
93052
|
*/
|
|
93053
93053
|
getComponents(entity, componentClasses) {
|
|
93054
93054
|
assert.ok(this.entityExists(entity), `Entity ${entity} doesn't exist`);
|
|
@@ -93760,7 +93760,7 @@ class EntityComponentDataset {
|
|
|
93760
93760
|
* Performs traversal on a subset of entities which have specified components.
|
|
93761
93761
|
* @example traverseEntities([Transform,Renderable,Tag],function(transform, renderable, tag, entity){ ... }, this);
|
|
93762
93762
|
* @param {Array} classes
|
|
93763
|
-
* @param {function:boolean
|
|
93763
|
+
* @param {function(...args):boolean} visitor Visitor can return optional "false" to terminate traversal earlier
|
|
93764
93764
|
* @param {object} [thisArg] specifies context object on which callbacks are to be called, optional
|
|
93765
93765
|
*/
|
|
93766
93766
|
traverseEntities(classes, visitor, thisArg) {
|
|
@@ -94385,7 +94385,7 @@ class EntityComponentDataset {
|
|
|
94385
94385
|
/**
|
|
94386
94386
|
* Main utility of this method is to facilitate serialization.
|
|
94387
94387
|
* @param {Array} componentClasses
|
|
94388
|
-
* @param {function(componentIndex:number,components:
|
|
94388
|
+
* @param {function(componentIndex:number,components:Array, componentCount:number)} visitor
|
|
94389
94389
|
*/
|
|
94390
94390
|
traverseEntitiesCompactedFiltered(componentClasses, visitor) {
|
|
94391
94391
|
|
|
@@ -105511,7 +105511,7 @@ class Localization {
|
|
|
105511
105511
|
this.debug = true;
|
|
105512
105512
|
|
|
105513
105513
|
/**
|
|
105514
|
-
* @type {Cache<string
|
|
105514
|
+
* @type {Cache<Array<string>, string>}
|
|
105515
105515
|
* @private
|
|
105516
105516
|
*/
|
|
105517
105517
|
this.__failure_cache = new Cache({
|
|
@@ -105631,7 +105631,7 @@ class Localization {
|
|
|
105631
105631
|
* @param {number} value
|
|
105632
105632
|
*/
|
|
105633
105633
|
formatIntegerByThousands(value) {
|
|
105634
|
-
const formatter = new Intl.NumberFormat(this.locale.getValue(), {
|
|
105634
|
+
const formatter = new Intl.NumberFormat(this.locale.getValue(), {useGrouping: true});
|
|
105635
105635
|
|
|
105636
105636
|
return formatter.format(value);
|
|
105637
105637
|
}
|
|
@@ -105716,7 +105716,7 @@ class ModuleRegistry {
|
|
|
105716
105716
|
#modules = new Map();
|
|
105717
105717
|
/**
|
|
105718
105718
|
*
|
|
105719
|
-
* @type {Map<*,string
|
|
105719
|
+
* @type {Map<*,Array<string>>}
|
|
105720
105720
|
*/
|
|
105721
105721
|
#reverse_lookup = new Map();
|
|
105722
105722
|
|
|
@@ -105744,7 +105744,7 @@ class ModuleRegistry {
|
|
|
105744
105744
|
|
|
105745
105745
|
/**
|
|
105746
105746
|
*
|
|
105747
|
-
* @param {(name:string,
|
|
105747
|
+
* @param {function(name:string,module:*):void} visitor
|
|
105748
105748
|
*/
|
|
105749
105749
|
traverse(visitor) {
|
|
105750
105750
|
this.#modules.forEach((klass, name) => visitor(name, klass));
|
|
@@ -105762,7 +105762,7 @@ class ModuleRegistry {
|
|
|
105762
105762
|
|
|
105763
105763
|
/**
|
|
105764
105764
|
*
|
|
105765
|
-
* @param {
|
|
105765
|
+
* @param {string} name
|
|
105766
105766
|
* @returns {boolean}
|
|
105767
105767
|
*/
|
|
105768
105768
|
has(name) {
|
|
@@ -105771,7 +105771,7 @@ class ModuleRegistry {
|
|
|
105771
105771
|
|
|
105772
105772
|
/**
|
|
105773
105773
|
* @template T
|
|
105774
|
-
* @param {
|
|
105774
|
+
* @param {string} name
|
|
105775
105775
|
* @param {T} module
|
|
105776
105776
|
* @returns {boolean}
|
|
105777
105777
|
*/
|
|
@@ -110344,7 +110344,7 @@ class InputController {
|
|
|
110344
110344
|
|
|
110345
110345
|
/**
|
|
110346
110346
|
*
|
|
110347
|
-
* @param {
|
|
110347
|
+
* @param {Array} bindings
|
|
110348
110348
|
*/
|
|
110349
110349
|
static from(bindings) {
|
|
110350
110350
|
const ic = new InputController();
|
|
@@ -112571,7 +112571,7 @@ class QuadTreeNode extends AABB2 {
|
|
|
112571
112571
|
|
|
112572
112572
|
/**
|
|
112573
112573
|
*
|
|
112574
|
-
* @param {QuadTreeDatum<D
|
|
112574
|
+
* @param {Array<QuadTreeDatum<D>>} result
|
|
112575
112575
|
* @param {number} x
|
|
112576
112576
|
* @param {number} y
|
|
112577
112577
|
* @returns {number} number of intersecting objects added to the result
|
|
@@ -112590,7 +112590,7 @@ class QuadTreeNode extends AABB2 {
|
|
|
112590
112590
|
|
|
112591
112591
|
/**
|
|
112592
112592
|
*
|
|
112593
|
-
* @param {QuadTreeDatum<D
|
|
112593
|
+
* @param {Array<QuadTreeDatum<D>>} result
|
|
112594
112594
|
* @param {number} x0
|
|
112595
112595
|
* @param {number} y0
|
|
112596
112596
|
* @param {number} x1
|
|
@@ -120169,7 +120169,6 @@ class EngineConfiguration {
|
|
|
120169
120169
|
}
|
|
120170
120170
|
|
|
120171
120171
|
/**
|
|
120172
|
-
*
|
|
120173
120172
|
* @param {System} systems
|
|
120174
120173
|
*/
|
|
120175
120174
|
addManySystems(...systems) {
|
|
@@ -121035,7 +121034,7 @@ class EngineHarness {
|
|
|
121035
121034
|
em.addSystem(new TopDownCameraControllerSystem());
|
|
121036
121035
|
}
|
|
121037
121036
|
if (em.getSystem(CameraSystem) === null) {
|
|
121038
|
-
em.addSystem(new CameraSystem(engine.graphics
|
|
121037
|
+
em.addSystem(new CameraSystem(engine.graphics));
|
|
121039
121038
|
}
|
|
121040
121039
|
|
|
121041
121040
|
if (em.getSystem(SoundListenerSystem) === null) {
|
package/package.json
CHANGED
|
@@ -164,8 +164,9 @@ export default class IndexedBinaryBVH {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
+
* @template T
|
|
167
168
|
* @deprecated use {@link #writeLeaf} instead followed by {@link #unsortedBuiltIntermediate}
|
|
168
|
-
* @param {function(index:number,offset:number,data
|
|
169
|
+
* @param {function(index:number,offset:number,data:T, writeBox:function):void} visitor
|
|
169
170
|
*/
|
|
170
171
|
setLeafs(visitor) {
|
|
171
172
|
let offset = this.binaryNodeCount * 6;
|
|
@@ -993,7 +993,7 @@ export class ExplicitBinaryBoundingVolumeHierarchy {
|
|
|
993
993
|
|
|
994
994
|
/**
|
|
995
995
|
*
|
|
996
|
-
* @param {(node:number, tree:ExplicitBinaryBoundingVolumeHierarchy)
|
|
996
|
+
* @param {function(node:number, tree:ExplicitBinaryBoundingVolumeHierarchy):void} callback
|
|
997
997
|
* @param {*} [ctx]
|
|
998
998
|
*/
|
|
999
999
|
traverse(callback, ctx) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {serializeAABB3} from "../../geom/3d/aabb/serializeAABB3.js";
|
|
2
|
+
import {isLeaf, serializeLeafNode} from "../LeafNode.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* @param {BinaryBuffer} buffer
|
|
7
7
|
* @param {BinaryNode} node
|
|
8
|
-
* @param {function(buffer:BinaryBuffer,
|
|
8
|
+
* @param {function(buffer:BinaryBuffer,value:any):void} leafValueSerializer
|
|
9
9
|
*/
|
|
10
10
|
function serializeBinaryNode(buffer, node, leafValueSerializer) {
|
|
11
11
|
serializeAABB3(buffer, node);
|
|
@@ -28,4 +28,4 @@ function serializeBinaryNode(buffer, node, leafValueSerializer) {
|
|
|
28
28
|
serializeChild(node.right);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export {
|
|
31
|
+
export {serializeBinaryNode};
|
|
@@ -168,7 +168,7 @@ export class HashMap {
|
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* Note that dead entries are marked as such with a special reserved hash values, so records can be reused for new entries
|
|
171
|
-
* @type {MapEntry<K,V
|
|
171
|
+
* @type {Array<MapEntry<K,V>>}
|
|
172
172
|
*/
|
|
173
173
|
#entries = new Array(0);
|
|
174
174
|
|
|
@@ -54,7 +54,7 @@ export const DataType2DataViewWriters = {
|
|
|
54
54
|
*
|
|
55
55
|
* @param {BinaryDataType[]} types
|
|
56
56
|
* @param {EndianType} [endianType]
|
|
57
|
-
* @returns {(data_view:DataView, byte_offset:number, result:number[])
|
|
57
|
+
* @returns {function(data_view:DataView, byte_offset:number, result:number[]):void}
|
|
58
58
|
*/
|
|
59
59
|
function genRowReader(types, endianType = EndianType.BigEndian) {
|
|
60
60
|
let offset = 0;
|
|
@@ -13,7 +13,7 @@ export class DescribeAs extends BaseMatcher {
|
|
|
13
13
|
*/
|
|
14
14
|
matcher
|
|
15
15
|
/**
|
|
16
|
-
* @type {
|
|
16
|
+
* @type {Array}
|
|
17
17
|
*/
|
|
18
18
|
values
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ export class DescribeAs extends BaseMatcher {
|
|
|
21
21
|
*
|
|
22
22
|
* @param {string} template
|
|
23
23
|
* @param {Matcher} matcher
|
|
24
|
-
* @param {
|
|
24
|
+
* @param {Array} values
|
|
25
25
|
*/
|
|
26
26
|
constructor(template, matcher, values) {
|
|
27
27
|
super();
|
|
@@ -130,7 +130,7 @@ export function isOneOf(...elements) {
|
|
|
130
130
|
* @template T
|
|
131
131
|
* @param {string} template
|
|
132
132
|
* @param {Matcher<T>} matcher
|
|
133
|
-
* @param {[]} values
|
|
133
|
+
* @param {T[]} values
|
|
134
134
|
* @returns {Matcher<T>}
|
|
135
135
|
*/
|
|
136
136
|
function describeAs(template, matcher, values) {
|
|
@@ -17,7 +17,7 @@ const dispatch_stack = [];
|
|
|
17
17
|
let dispatch_stack_top = 0;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Signal is a type of event bus. You can subscribe to events using {@link add
|
|
20
|
+
* Signal is a type of event bus. You can subscribe to events using {@link add} method and dispatch using sendN method where N is the number of arguments you wish to pass
|
|
21
21
|
* Signal is different from a normal event bus in that 1 signal corresponds to 1 event type. For example, in HTML you have `addEventListener` which lets you subscribe to any kind of event, let's use "mousedown" as a reference. Using a Signal you would instead have a signal corresponding to "mousedown" and dispatch this signal only for this event.
|
|
22
22
|
* @example `const mouseDown = new Signal<MouseEvent>(); mouseDown.send1(myMouseEvent);`
|
|
23
23
|
*/
|
package/src/core/geom/2d/line/line_segment_compute_line_segment_intersection_vectors_array_2d.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
* @param {Vector2} p1
|
|
8
8
|
* @param {Vector2} p2
|
|
9
9
|
* @param {Vector2} p3
|
|
10
|
-
* @returns {[
|
|
10
|
+
* @returns {number[]} 2 elements
|
|
11
11
|
*/
|
|
12
12
|
export function line_segment_compute_line_segment_intersection_vectors_array_2d(p0, p1, p2, p3) {
|
|
13
13
|
const p0_x = p0.x;
|
|
@@ -487,7 +487,7 @@ export class QuadTreeNode extends AABB2 {
|
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
489
|
*
|
|
490
|
-
* @param {QuadTreeDatum<D
|
|
490
|
+
* @param {Array<QuadTreeDatum<D>>} result
|
|
491
491
|
* @param {number} x
|
|
492
492
|
* @param {number} y
|
|
493
493
|
* @returns {number} number of intersecting objects added to the result
|
|
@@ -506,7 +506,7 @@ export class QuadTreeNode extends AABB2 {
|
|
|
506
506
|
|
|
507
507
|
/**
|
|
508
508
|
*
|
|
509
|
-
* @param {QuadTreeDatum<D
|
|
509
|
+
* @param {Array<QuadTreeDatum<D>>} result
|
|
510
510
|
* @param {number} x0
|
|
511
511
|
* @param {number} y0
|
|
512
512
|
* @param {number} x1
|
|
@@ -135,7 +135,7 @@ export class TetrahedralMesh {
|
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* Traverse tetrahedrons
|
|
138
|
-
* @param {(tet:number,mesh:TetrahedralMesh)
|
|
138
|
+
* @param {function(tet:number,mesh:TetrahedralMesh):*} visitor
|
|
139
139
|
* @param {*} [thisArg]
|
|
140
140
|
*/
|
|
141
141
|
forEach(visitor, thisArg) {
|
|
@@ -134,7 +134,7 @@ function is_tetrahedron_degenerate(mesh, tet) {
|
|
|
134
134
|
*
|
|
135
135
|
* @param {TetrahedralMesh} mesh
|
|
136
136
|
* @param {ArrayLike<number>} points
|
|
137
|
-
* @param {(problem:string)
|
|
137
|
+
* @param {function(problem:string):*} [consumer]
|
|
138
138
|
* @returns {boolean}
|
|
139
139
|
*/
|
|
140
140
|
export function validate_tetrahedral_mesh(mesh, points, consumer = noop) {
|
|
@@ -273,8 +273,7 @@ export class Subspan {
|
|
|
273
273
|
*
|
|
274
274
|
* Complexity: O(dim^2).
|
|
275
275
|
*
|
|
276
|
-
* @param {number} index
|
|
277
|
-
* index into <i>S</i> of the point to add
|
|
276
|
+
* @param {number} index index into <i>S</i> of the point to add
|
|
278
277
|
*/
|
|
279
278
|
add(index) {
|
|
280
279
|
let o = this.origin();
|
|
@@ -310,7 +309,6 @@ export class Subspan {
|
|
|
310
309
|
* Euclidean coordinates of point <i>p</i>
|
|
311
310
|
* @param {Array} w
|
|
312
311
|
* the squared length of <i>w</i>
|
|
313
|
-
* @return
|
|
314
312
|
* @return {number}
|
|
315
313
|
*/
|
|
316
314
|
shortestVectorToSpan(p, w) {
|