@woosh/meep-engine 2.59.5 → 2.59.6

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 (26) hide show
  1. package/build/meep.cjs +12 -12
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +12 -12
  4. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +1 -1
  5. package/package.json +1 -1
  6. package/src/core/collection/list/List.js +2 -2
  7. package/src/core/debug/matchers/DescribeAs.js +2 -2
  8. package/src/core/debug/matchers/IsIn.js +4 -1
  9. package/src/core/debug/matchers/matchers.js +1 -1
  10. package/src/core/events/signal/Signal.js +1 -1
  11. package/src/core/primitives/strings/prefixTree/PrefixTree.js +2 -2
  12. package/src/core/process/buildPromiseChain.js +1 -1
  13. package/src/core/process/worker/OnDemandWorkerManager.js +1 -1
  14. package/src/core/process/worker/WorkerProxy.js +1 -1
  15. package/src/core/process/worker/extractTransferables.js +1 -1
  16. package/src/engine/asset/loaders/material/computeTextureEquality.js +2 -2
  17. package/src/engine/ecs/Entity.js +1 -1
  18. package/src/engine/ecs/EntityBlueprint.js +1 -1
  19. package/src/engine/ecs/EntityComponentDataset.js +2 -2
  20. package/src/engine/ecs/System.js +1 -1
  21. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +4 -4
  22. package/src/engine/graphics/ecs/mesh-v2/sample/prototypeShadedGeometry.js +3 -3
  23. package/src/engine/graphics/particles/node-based/simulation/GLSLSimulationShader.js +1 -1
  24. package/src/engine/graphics/particles/node-based/simulation/TransformFeedback.js +1 -1
  25. package/src/engine/input/ecs/components/InputController.js +1 -1
  26. package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +1 -1
@@ -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) method and dispatch using sendN method where N is the number of arguments you wish to pass
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
  */
@@ -62751,8 +62751,8 @@ class List {
62751
62751
  }
62752
62752
 
62753
62753
  /**
62754
- *
62755
- * @param {[]} json
62754
+ * @template J
62755
+ * @param {J[]} json
62756
62756
  * @param {function} constructor
62757
62757
  */
62758
62758
  fromJSON(json, constructor) {
@@ -65110,7 +65110,7 @@ class WorkerProxy {
65110
65110
  /**
65111
65111
  * @template T
65112
65112
  * @param {number} name
65113
- * @param {[]} args
65113
+ * @param {Array} args
65114
65114
  * @return {Promise<T>}
65115
65115
  */
65116
65116
  $submitRequest(name, args) {
@@ -69418,7 +69418,7 @@ class System {
69418
69418
 
69419
69419
 
69420
69420
  /**
69421
- * @returns {[]} Component classes
69421
+ * @returns {Array} Component classes
69422
69422
  */
69423
69423
  get referenced_components() {
69424
69424
  const result = [];
@@ -71583,7 +71583,7 @@ class OnDemandWorkerManager {
71583
71583
  /**
71584
71584
  * @template T
71585
71585
  * @param {string} name
71586
- * @param {[]} [parameters]
71586
+ * @param {Array} [parameters]
71587
71587
  * @return {Promise<T>}
71588
71588
  */
71589
71589
  request(name, parameters) {
@@ -74821,7 +74821,7 @@ class Entity {
74821
74821
  * @returns {Entity}
74822
74822
  */
74823
74823
  add(componentInstance) {
74824
- if (componentInstance === undefined) {
74824
+ if (componentInstance === undefined || componentInstance === null) {
74825
74825
  throw new Error(`Can not add ${componentInstance} to Entity`);
74826
74826
  }
74827
74827
 
@@ -77110,8 +77110,8 @@ function textureImagesEqual(a, b) {
77110
77110
 
77111
77111
  /**
77112
77112
  *
77113
- * @param {[]} a
77114
- * @param {[]} b
77113
+ * @param {Array} a
77114
+ * @param {Array} b
77115
77115
  * @returns {boolean}
77116
77116
  */
77117
77117
  function textureMipChainEqual(a, b) {
@@ -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 {[]} componentClasses Classes of components to extract
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`);
@@ -110344,7 +110344,7 @@ class InputController {
110344
110344
 
110345
110345
  /**
110346
110346
  *
110347
- * @param {[]} bindings
110347
+ * @param {Array} bindings
110348
110348
  */
110349
110349
  static from(bindings) {
110350
110350
  const ic = new InputController();
@@ -120,7 +120,7 @@ export class ParameterLookupTableEditor extends TypeEditor {
120
120
 
121
121
  /**
122
122
  * converts lut color sample to RGB
123
- * @param {[]} sample
123
+ * @param {number[]} sample
124
124
  */
125
125
  convertRGB(sample){
126
126
  sample[0] = Math.floor(sample[0] * 255);
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.5",
8
+ "version": "2.59.6",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -747,8 +747,8 @@ class List {
747
747
  }
748
748
 
749
749
  /**
750
- *
751
- * @param {[]} json
750
+ * @template J
751
+ * @param {J[]} json
752
752
  * @param {function} constructor
753
753
  */
754
754
  fromJSON(json, constructor) {
@@ -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 {[]} values
24
+ * @param {Array} values
25
25
  */
26
26
  constructor(template, matcher, values) {
27
27
  super();
@@ -1,8 +1,11 @@
1
1
  import { BaseMatcher } from "../BaseMatcher.js";
2
2
 
3
+ /**
4
+ * @template T
5
+ */
3
6
  export class IsIn extends BaseMatcher {
4
7
  /**
5
- * @type {[]}
8
+ * @type {T[]}
6
9
  */
7
10
  #collection = []
8
11
 
@@ -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) method and dispatch using sendN method where N is the number of arguments you wish to pass
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
  */
@@ -74,7 +74,7 @@ export class PrefixTree extends PrefixTreeNode {
74
74
 
75
75
  /**
76
76
  *
77
- * @param {[]} result
77
+ * @param {string[]} result
78
78
  */
79
79
  collectValues(result) {
80
80
  const children = this.children;
@@ -100,7 +100,7 @@ export class PrefixTree extends PrefixTreeNode {
100
100
 
101
101
  /**
102
102
  *
103
- * @param {[]} result
103
+ * @param {string[]} result
104
104
  * @param {string} prefix
105
105
  */
106
106
  findValuesByPrefix(result, prefix) {
@@ -5,7 +5,7 @@ import { assert } from "../assert.js";
5
5
  *
6
6
  * @param {Array<function(*):Promise>} factories
7
7
  * @param {Promise} [head] chain head, promise to be resolved before rest of the links
8
- * @param {[]} [parameters] parameters are passed into each factory
8
+ * @param {Array} [parameters] parameters are passed into each factory
9
9
  * @returns {Promise}
10
10
  */
11
11
  export function buildPromiseChain(
@@ -109,7 +109,7 @@ export class OnDemandWorkerManager {
109
109
  /**
110
110
  * @template T
111
111
  * @param {string} name
112
- * @param {[]} [parameters]
112
+ * @param {Array} [parameters]
113
113
  * @return {Promise<T>}
114
114
  */
115
115
  request(name, parameters) {
@@ -68,7 +68,7 @@ class WorkerProxy {
68
68
  /**
69
69
  * @template T
70
70
  * @param {number} name
71
- * @param {[]} args
71
+ * @param {Array} args
72
72
  * @return {Promise<T>}
73
73
  */
74
74
  $submitRequest(name, args) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  * @param {*} obj
4
- * @param {[]} result
4
+ * @param {Array} result
5
5
  * @preserve
6
6
  */
7
7
  export function extractTransferables(obj, result) {
@@ -126,8 +126,8 @@ export function textureImagesEqual(a, b) {
126
126
 
127
127
  /**
128
128
  *
129
- * @param {[]} a
130
- * @param {[]} b
129
+ * @param {Array} a
130
+ * @param {Array} b
131
131
  * @returns {boolean}
132
132
  */
133
133
  function textureMipChainEqual(a, b) {
@@ -140,7 +140,7 @@ class Entity {
140
140
  * @returns {Entity}
141
141
  */
142
142
  add(componentInstance) {
143
- if (componentInstance === undefined) {
143
+ if (componentInstance === undefined || componentInstance === null) {
144
144
  throw new Error(`Can not add ${componentInstance} to Entity`);
145
145
  }
146
146
 
@@ -67,7 +67,7 @@ export class EntityBlueprint {
67
67
 
68
68
  /**
69
69
  *
70
- * @param {[]} components
70
+ * @param {Array} components
71
71
  * @returns {EntityBlueprint}
72
72
  */
73
73
  static from(components = []) {
@@ -381,8 +381,8 @@ export class EntityComponentDataset {
381
381
  /**
382
382
  * Convenience method for retrieving a collection of components for a given entity
383
383
  * @param {number} entity ID of the entity
384
- * @param {[]} componentClasses Classes of components to extract
385
- * @returns {[]}
384
+ * @param {Array} componentClasses Classes of components to extract
385
+ * @returns {Array}
386
386
  */
387
387
  getComponents(entity, componentClasses) {
388
388
  assert.ok(this.entityExists(entity), `Entity ${entity} doesn't exist`);
@@ -46,7 +46,7 @@ class System {
46
46
 
47
47
 
48
48
  /**
49
- * @returns {[]} Component classes
49
+ * @returns {Array} Component classes
50
50
  */
51
51
  get referenced_components() {
52
52
  const result = [];
@@ -8,10 +8,10 @@ import { AnimationGraphDefinition } from "../AnimationGraphDefinition.js";
8
8
 
9
9
  /**
10
10
  *
11
- * @param {[]} states
12
- * @param {[]} transitions
13
- * @param {[]} clips
14
- * @param {[]} notifications
11
+ * @param {Array} states
12
+ * @param {Array} transitions
13
+ * @param {Array} clips
14
+ * @param {Array} notifications
15
15
  * @param {number} startingState
16
16
  *
17
17
  * @returns {AnimationGraphDefinition}
@@ -100,9 +100,9 @@ async function main(engine) {
100
100
  const geometry = randomFromArray(random, geometries);
101
101
  const sg = ShadedGeometry.from(geometry, material);
102
102
 
103
- sg.draw_method = DRAW_METHOD_PLAIN;
104
- sg.setFlag(ShadedGeometryFlags.DrawMethodLocked);
105
- // sg.draw_method = DRAW_METHOD_INSTANCED;
103
+ // sg.draw_method = DRAW_METHOD_PLAIN;
104
+ // sg.setFlag(ShadedGeometryFlags.DrawMethodLocked);
105
+ sg.draw_method = DRAW_METHOD_INSTANCED;
106
106
  // sg.draw_method = 2;
107
107
  // sg.draw_method = DRAW_METHOD_INSTANCED;
108
108
  // sg.draw_method = random() > 0.5 ? DRAW_METHOD_INSTANCED : 2;
@@ -160,7 +160,7 @@ export class GLSLSimulationShader {
160
160
 
161
161
  /**
162
162
  *
163
- * @param {[]} uniform_values
163
+ * @param {Array} uniform_values
164
164
  * @param {EmitterAttributeData} attributeSource
165
165
  */
166
166
  execute(uniform_values, attributeSource) {
@@ -160,7 +160,7 @@ export class TransformFeedback {
160
160
 
161
161
  /**
162
162
  *
163
- * @param {[]} uniform_values
163
+ * @param {Array} uniform_values
164
164
  * @param {EmitterAttributeData} attributeSource
165
165
  */
166
166
  execute(uniform_values, attributeSource) {
@@ -30,7 +30,7 @@ class InputController {
30
30
 
31
31
  /**
32
32
  *
33
- * @param {[]} bindings
33
+ * @param {Array} bindings
34
34
  */
35
35
  static from(bindings) {
36
36
  const ic = new InputController();
@@ -231,7 +231,7 @@ export class StaticKnowledgeDataTable {
231
231
 
232
232
  /**
233
233
  *
234
- * @param {[]} data
234
+ * @param {Array} data
235
235
  * @param {ConcurrentExecutor} executor
236
236
  * @returns {Promise}
237
237
  */