@woosh/meep-engine 2.59.6 → 2.60.1

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 (41) hide show
  1. package/build/meep.cjs +194 -184
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +194 -184
  4. package/package.json +1 -1
  5. package/src/core/bvh2/binary/IndexedBinaryBVH.js +2 -1
  6. package/src/core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy.js +1 -1
  7. package/src/core/bvh2/serialization/serializeBinaryNode.js +4 -4
  8. package/src/core/collection/map/HashMap.js +1 -1
  9. package/src/core/collection/table/RowFirstTableSpec.js +1 -1
  10. package/src/core/geom/2d/line/line_segment_compute_line_segment_intersection_vectors_array_2d.js +1 -1
  11. package/src/core/geom/2d/quad-tree/QuadTreeNode.js +2 -2
  12. package/src/core/geom/2d/quad-tree/qt_collect_by_circle.js +1 -1
  13. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +3 -3
  14. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +1 -1
  15. package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +1 -1
  16. package/src/core/geom/packing/miniball/Miniball.js +0 -1
  17. package/src/core/geom/packing/miniball/Subspan.js +1 -3
  18. package/src/core/graph/coloring/colorizeGraph.js +1 -1
  19. package/src/core/localization/Localization.js +11 -11
  20. package/src/core/model/ModuleRegistry.js +4 -4
  21. package/src/core/process/task/Task.js +3 -3
  22. package/src/engine/EngineConfiguration.js +0 -1
  23. package/src/engine/EngineHarness.js +1 -1
  24. package/src/engine/ecs/EntityComponentDataset.js +2 -2
  25. package/src/engine/ecs/parent/EntityNode.js +10 -10
  26. package/src/engine/graphics/camera/testClippingPlaneComputation.js +1 -1
  27. package/src/engine/graphics/ecs/camera/Camera.js +11 -11
  28. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +2 -3
  29. package/src/engine/graphics/ecs/camera/CameraSystem.js +2 -3
  30. package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +1 -1
  31. package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +1 -1
  32. package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +2 -2
  33. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +15 -4
  34. package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +2 -2
  35. package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +1 -1
  36. package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +1 -1
  37. package/src/engine/graphics/render/view/CameraView.js +1 -1
  38. package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +1 -1
  39. package/src/engine/graphics/shaders/ClearShader.js +1 -1
  40. package/src/engine/graphics/shadows/testShadowMapRendering.js +1 -1
  41. package/src/misc/makeMaterialIconCached.js +8 -1
@@ -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:*, writeBox:function):*} visitor
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
 
@@ -64122,7 +64123,7 @@ class Task {
64122
64123
 
64123
64124
  /**
64124
64125
  *
64125
- * @type {function(Task, executor:{run:function(Task)})}
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)[]} tasks
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)[]} tasks
64276
+ * @param {Array<(Task|TaskGroup)>} tasks
64276
64277
  * @return {Promise}
64277
64278
  */
64278
64279
  static promiseAll(tasks) {
@@ -69551,6 +69552,84 @@ function computeSystemName(system) {
69551
69552
  return system.constructor.name;
69552
69553
  }
69553
69554
 
69555
+ /**
69556
+ *
69557
+ * @param {Vector3} out Result will be written here
69558
+ * @param {number} originX Ray origin
69559
+ * @param {number} originY Ray origin
69560
+ * @param {number} originZ Ray origin
69561
+ * @param {number} directionX Ray direction
69562
+ * @param {number} directionY Ray direction
69563
+ * @param {number} directionZ Ray direction
69564
+ * @param {number} normalX Plane normal
69565
+ * @param {number} normalY Plane normal
69566
+ * @param {number} normalZ Plane normal
69567
+ * @param {number} dist Plane distance
69568
+ * @returns {boolean} true if intersection is found, false otherwise
69569
+ */
69570
+ function plane3_compute_ray_intersection(
69571
+ out,
69572
+ originX, originY, originZ,
69573
+ directionX, directionY, directionZ,
69574
+ normalX, normalY, normalZ, dist
69575
+ ) {
69576
+ const denom = v3_dot(directionX, directionY, directionZ, normalX, normalY, normalZ);
69577
+
69578
+ const p = v3_dot(normalX, normalY, normalZ, originX, originY, originZ) + dist;
69579
+
69580
+ if (denom !== 0) {
69581
+
69582
+ const t = -p / denom;
69583
+
69584
+ if (t < 0) {
69585
+ return false;
69586
+ }
69587
+
69588
+ out.set(
69589
+ directionX * t + originX,
69590
+ directionY * t + originY,
69591
+ directionZ * t + originZ
69592
+ );
69593
+
69594
+ return true;
69595
+
69596
+ } else {
69597
+
69598
+ if (p === 0) {
69599
+
69600
+ out.set(originX, originY, originZ);
69601
+
69602
+ return true;
69603
+
69604
+ } else {
69605
+
69606
+ //no intersection
69607
+ return false;
69608
+
69609
+ }
69610
+
69611
+ }
69612
+ }
69613
+
69614
+ /**
69615
+ * Orthogonal distance of a point to a plane, the distance is positive when the point lies above the plane and negative when the point is below
69616
+ * @param {number} x
69617
+ * @param {number} y
69618
+ * @param {number} z
69619
+ * @param {number} normalX
69620
+ * @param {number} normalY
69621
+ * @param {number} normalZ
69622
+ * @param {number} planeConstant
69623
+ * @returns {number}
69624
+ */
69625
+ function v3_distance_above_plane(
69626
+ x, y, z,
69627
+ normalX, normalY, normalZ, planeConstant
69628
+ ) {
69629
+ // this is the same as v4_dot(v4(x,y,z,1.0), v4(plane.normal, plane.constant));
69630
+ return v3_dot(normalX, normalY, normalZ, x, y, z) + planeConstant;
69631
+ }
69632
+
69554
69633
  class ObservedBoolean extends Boolean {
69555
69634
  /**
69556
69635
  *
@@ -69791,21 +69870,6 @@ ObservedEnum.prototype.fromJSON = function (obj) {
69791
69870
  this.set(obj);
69792
69871
  };
69793
69872
 
69794
- //
69795
-
69796
- /**
69797
- *
69798
- * @param {Vector3} result
69799
- * @param {Vector3} input
69800
- * @param {number[]} projection_matrix_inverse inverse of projection matrix
69801
- * @param {number[]} world_matrix world transform
69802
- */
69803
- function unprojectPoint(result, input, projection_matrix_inverse, world_matrix) {
69804
- result.copy(input);
69805
- result.applyMatrix4(projection_matrix_inverse);
69806
- result.applyMatrix4(world_matrix);
69807
- }
69808
-
69809
69873
  const matrix4 = new Matrix4();
69810
69874
 
69811
69875
  /**
@@ -69849,25 +69913,6 @@ function invertQuaternionOrientation(output, input) {
69849
69913
  output.setFromRotationMatrix(m4_scratch);
69850
69914
  }
69851
69915
 
69852
- /**
69853
- * Orthogonal distance of a point to a plane, the distance is positive when the point lies above the plane and negative when the point is below
69854
- * @param {number} x
69855
- * @param {number} y
69856
- * @param {number} z
69857
- * @param {number} normalX
69858
- * @param {number} normalY
69859
- * @param {number} normalZ
69860
- * @param {number} planeConstant
69861
- * @returns {number}
69862
- */
69863
- function v3_distance_above_plane(
69864
- x, y, z,
69865
- normalX, normalY, normalZ, planeConstant
69866
- ) {
69867
- // this is the same as v4_dot(v4(x,y,z,1.0), v4(plane.normal, plane.constant));
69868
- return v3_dot(normalX, normalY, normalZ, x, y, z) + planeConstant;
69869
- }
69870
-
69871
69916
  /**
69872
69917
  *
69873
69918
  * @enum {String}
@@ -69878,63 +69923,19 @@ const ProjectionType = {
69878
69923
  Orthographic: "orthographic"
69879
69924
  };
69880
69925
 
69926
+ //
69927
+
69881
69928
  /**
69882
69929
  *
69883
- * @param {Vector3} out Result will be written here
69884
- * @param {number} originX Ray origin
69885
- * @param {number} originY Ray origin
69886
- * @param {number} originZ Ray origin
69887
- * @param {number} directionX Ray direction
69888
- * @param {number} directionY Ray direction
69889
- * @param {number} directionZ Ray direction
69890
- * @param {number} normalX Plane normal
69891
- * @param {number} normalY Plane normal
69892
- * @param {number} normalZ Plane normal
69893
- * @param {number} dist Plane distance
69894
- * @returns {boolean} true if intersection is found, false otherwise
69930
+ * @param {Vector3} result
69931
+ * @param {Vector3} input
69932
+ * @param {number[]} projection_matrix_inverse inverse of projection matrix
69933
+ * @param {number[]} world_matrix world transform
69895
69934
  */
69896
- function plane3_compute_ray_intersection(
69897
- out,
69898
- originX, originY, originZ,
69899
- directionX, directionY, directionZ,
69900
- normalX, normalY, normalZ, dist
69901
- ) {
69902
- const denom = v3_dot(directionX, directionY, directionZ, normalX, normalY, normalZ);
69903
-
69904
- const p = v3_dot(normalX, normalY, normalZ, originX, originY, originZ) + dist;
69905
-
69906
- if (denom !== 0) {
69907
-
69908
- const t = -p / denom;
69909
-
69910
- if (t < 0) {
69911
- return false;
69912
- }
69913
-
69914
- out.set(
69915
- directionX * t + originX,
69916
- directionY * t + originY,
69917
- directionZ * t + originZ
69918
- );
69919
-
69920
- return true;
69921
-
69922
- } else {
69923
-
69924
- if (p === 0) {
69925
-
69926
- out.set(originX, originY, originZ);
69927
-
69928
- return true;
69929
-
69930
- } else {
69931
-
69932
- //no intersection
69933
- return false;
69934
-
69935
- }
69936
-
69937
- }
69935
+ function unprojectPoint(result, input, projection_matrix_inverse, world_matrix) {
69936
+ result.copy(input);
69937
+ result.applyMatrix4(projection_matrix_inverse);
69938
+ result.applyMatrix4(world_matrix);
69938
69939
  }
69939
69940
 
69940
69941
  /**
@@ -69976,7 +69977,7 @@ class Camera {
69976
69977
  *
69977
69978
  * @type {ObservedBoolean}
69978
69979
  */
69979
- this.active = new ObservedBoolean(false);
69980
+ this.active = new ObservedBoolean(true);
69980
69981
 
69981
69982
  /**
69982
69983
  * Near clipping plane
@@ -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(scene, graphics) {
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
 
@@ -72063,55 +72063,28 @@ class TerrainSystem extends System {
72063
72063
  }
72064
72064
 
72065
72065
  /**
72066
- * Component representing logical attachment to another entity, when parent disappears - so does the child
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
- class ParentEntity {
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
- return r;
72092
- }
72076
+ const end_index = start_index + length;
72093
72077
 
72094
- toJSON() {
72095
- return {
72096
- entity: this.entity,
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
- fromJSON({ entity }) {
72101
- this.entity = entity;
72082
+ return true;
72083
+ }
72102
72084
  }
72103
- }
72104
72085
 
72105
- /**
72106
- * @readonly
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
@@ -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) => *} visitor
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;
@@ -77701,9 +77701,15 @@ function rewriteMaterial(shader) {
77701
77701
  `+shader.fragmentShader;
77702
77702
  }
77703
77703
 
77704
+ /**
77705
+ * @typedef {Object} CacheKey
77706
+ * @property {Material} color
77707
+ * @property {Material} depth
77708
+ */
77709
+
77704
77710
  /**
77705
77711
  * @readonly
77706
- * @type {Cache<Material, {color:Material, depth:Material}>}
77712
+ * @type {Cache<Material,CacheKey>}
77707
77713
  */
77708
77714
  const material_cache = new Cache({
77709
77715
  maxWeight: 1024,
@@ -77718,14 +77724,14 @@ class InstancedMeshGroup {
77718
77724
  constructor() {
77719
77725
  /**
77720
77726
  * Instanced geometry
77721
- * @type {THREE.InstancedBufferGeometry|null}
77727
+ * @type {InstancedBufferGeometry|null}
77722
77728
  * @private
77723
77729
  */
77724
77730
  this.__threeGeometry = null;
77725
77731
 
77726
77732
  /**
77727
77733
  * Geometry of a single instance
77728
- * @type {THREE.BufferGeometry|null}
77734
+ * @type {BufferGeometry|null}
77729
77735
  * @private
77730
77736
  */
77731
77737
  this.__threeInstanceGeometry = null;
@@ -77753,7 +77759,12 @@ class InstancedMeshGroup {
77753
77759
  */
77754
77760
  this.growConstant = 16;
77755
77761
 
77762
+ /**
77763
+ *
77764
+ * @type {number}
77765
+ */
77756
77766
  this.shrinkFactor = 0.5;
77767
+
77757
77768
  /**
77758
77769
  * Minimum capacity reduction for shrinkage to occur
77759
77770
  * @type {number}
@@ -77918,7 +77929,7 @@ class InstancedMeshGroup {
77918
77929
  /**
77919
77930
  *
77920
77931
  * @param {THREE.Material|THREE.ShaderMaterial} sourceMaterial
77921
- * @returns {{depth: Material, color: Material}}
77932
+ * @returns {CacheKey}
77922
77933
  */
77923
77934
  #buildMaterial(sourceMaterial) {
77924
77935
  //console.warn(`building material : {id:${sourceMaterial.id}, name: ${sourceMaterial.name}, type: ${sourceMaterial.type}`)
@@ -79615,7 +79626,7 @@ class ExplicitBinaryBoundingVolumeHierarchy {
79615
79626
 
79616
79627
  /**
79617
79628
  *
79618
- * @param {(node:number, tree:ExplicitBinaryBoundingVolumeHierarchy)=>void} callback
79629
+ * @param {function(node:number, tree:ExplicitBinaryBoundingVolumeHierarchy):void} callback
79619
79630
  * @param {*} [ctx]
79620
79631
  */
79621
79632
  traverse(callback, ctx) {
@@ -90391,7 +90402,7 @@ class CameraView {
90391
90402
 
90392
90403
  /**
90393
90404
  *
90394
- * @type {{transform:(Float32Array, Float32Array)=>void, context:*}[]}
90405
+ * @type {Array<{transform:function(Float32Array, Float32Array):void, context:*}>}
90395
90406
  */
90396
90407
  this.projection_modifiers = [];
90397
90408
  }
@@ -93760,7 +93771,7 @@ class EntityComponentDataset {
93760
93771
  * Performs traversal on a subset of entities which have specified components.
93761
93772
  * @example traverseEntities([Transform,Renderable,Tag],function(transform, renderable, tag, entity){ ... }, this);
93762
93773
  * @param {Array} classes
93763
- * @param {function:boolean?} visitor Visitor can return optional "false" to terminate traversal earlier
93774
+ * @param {function(...args):boolean} visitor Visitor can return optional "false" to terminate traversal earlier
93764
93775
  * @param {object} [thisArg] specifies context object on which callbacks are to be called, optional
93765
93776
  */
93766
93777
  traverseEntities(classes, visitor, thisArg) {
@@ -94385,7 +94396,7 @@ class EntityComponentDataset {
94385
94396
  /**
94386
94397
  * Main utility of this method is to facilitate serialization.
94387
94398
  * @param {Array} componentClasses
94388
- * @param {function(componentIndex:number,components:[], componentCount:number)} visitor
94399
+ * @param {function(componentIndex:number,components:Array, componentCount:number)} visitor
94389
94400
  */
94390
94401
  traverseEntitiesCompactedFiltered(componentClasses, visitor) {
94391
94402
 
@@ -105511,7 +105522,7 @@ class Localization {
105511
105522
  this.debug = true;
105512
105523
 
105513
105524
  /**
105514
- * @type {Cache<string[], string>}
105525
+ * @type {Cache<Array<string>, string>}
105515
105526
  * @private
105516
105527
  */
105517
105528
  this.__failure_cache = new Cache({
@@ -105631,7 +105642,7 @@ class Localization {
105631
105642
  * @param {number} value
105632
105643
  */
105633
105644
  formatIntegerByThousands(value) {
105634
- const formatter = new Intl.NumberFormat(this.locale.getValue(), { useGrouping: true });
105645
+ const formatter = new Intl.NumberFormat(this.locale.getValue(), {useGrouping: true});
105635
105646
 
105636
105647
  return formatter.format(value);
105637
105648
  }
@@ -105716,7 +105727,7 @@ class ModuleRegistry {
105716
105727
  #modules = new Map();
105717
105728
  /**
105718
105729
  *
105719
- * @type {Map<*,string[]>}
105730
+ * @type {Map<*,Array<string>>}
105720
105731
  */
105721
105732
  #reverse_lookup = new Map();
105722
105733
 
@@ -105744,7 +105755,7 @@ class ModuleRegistry {
105744
105755
 
105745
105756
  /**
105746
105757
  *
105747
- * @param {(name:string, module:*)=>void} visitor
105758
+ * @param {function(name:string,module:*):void} visitor
105748
105759
  */
105749
105760
  traverse(visitor) {
105750
105761
  this.#modules.forEach((klass, name) => visitor(name, klass));
@@ -105762,7 +105773,7 @@ class ModuleRegistry {
105762
105773
 
105763
105774
  /**
105764
105775
  *
105765
- * @param {String} name
105776
+ * @param {string} name
105766
105777
  * @returns {boolean}
105767
105778
  */
105768
105779
  has(name) {
@@ -105771,7 +105782,7 @@ class ModuleRegistry {
105771
105782
 
105772
105783
  /**
105773
105784
  * @template T
105774
- * @param {String} name
105785
+ * @param {string} name
105775
105786
  * @param {T} module
105776
105787
  * @returns {boolean}
105777
105788
  */
@@ -112571,7 +112582,7 @@ class QuadTreeNode extends AABB2 {
112571
112582
 
112572
112583
  /**
112573
112584
  *
112574
- * @param {QuadTreeDatum<D>[]} result
112585
+ * @param {Array<QuadTreeDatum<D>>} result
112575
112586
  * @param {number} x
112576
112587
  * @param {number} y
112577
112588
  * @returns {number} number of intersecting objects added to the result
@@ -112590,7 +112601,7 @@ class QuadTreeNode extends AABB2 {
112590
112601
 
112591
112602
  /**
112592
112603
  *
112593
- * @param {QuadTreeDatum<D>[]} result
112604
+ * @param {Array<QuadTreeDatum<D>>} result
112594
112605
  * @param {number} x0
112595
112606
  * @param {number} y0
112596
112607
  * @param {number} x1
@@ -120169,7 +120180,6 @@ class EngineConfiguration {
120169
120180
  }
120170
120181
 
120171
120182
  /**
120172
- *
120173
120183
  * @param {System} systems
120174
120184
  */
120175
120185
  addManySystems(...systems) {
@@ -121035,7 +121045,7 @@ class EngineHarness {
121035
121045
  em.addSystem(new TopDownCameraControllerSystem());
121036
121046
  }
121037
121047
  if (em.getSystem(CameraSystem) === null) {
121038
- em.addSystem(new CameraSystem(engine.graphics.scene, engine.graphics));
121048
+ em.addSystem(new CameraSystem(engine.graphics));
121039
121049
  }
121040
121050
 
121041
121051
  if (em.getSystem(SoundListenerSystem) === null) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.59.6",
8
+ "version": "2.60.1",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -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:*, writeBox:function):*} visitor
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)=>void} callback
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 { isLeaf, serializeLeafNode } from "../LeafNode.js";
2
- import { serializeAABB3 } from "../../geom/3d/aabb/serializeAABB3.js";
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, value:*):void} leafValueSerializer
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 { serializeBinaryNode };
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[])=>void}
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;