@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.
- package/build/meep.cjs +12 -12
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +12 -12
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +1 -1
- package/package.json +1 -1
- package/src/core/collection/list/List.js +2 -2
- 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/primitives/strings/prefixTree/PrefixTree.js +2 -2
- package/src/core/process/buildPromiseChain.js +1 -1
- 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/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 +2 -2
- package/src/engine/ecs/System.js +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +4 -4
- package/src/engine/graphics/ecs/mesh-v2/sample/prototypeShadedGeometry.js +3 -3
- 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/input/ecs/components/InputController.js +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +1 -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
|
*/
|
|
@@ -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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
77114
|
-
* @param {
|
|
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 {
|
|
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 {
|
|
110347
|
+
* @param {Array} bindings
|
|
110348
110348
|
*/
|
|
110349
110349
|
static from(bindings) {
|
|
110350
110350
|
const ic = new InputController();
|
package/package.json
CHANGED
|
@@ -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
|
*/
|
|
@@ -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 {
|
|
8
|
+
* @param {Array} [parameters] parameters are passed into each factory
|
|
9
9
|
* @returns {Promise}
|
|
10
10
|
*/
|
|
11
11
|
export function buildPromiseChain(
|
package/src/engine/ecs/Entity.js
CHANGED
|
@@ -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
|
|
|
@@ -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 {
|
|
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`);
|
package/src/engine/ecs/System.js
CHANGED
|
@@ -8,10 +8,10 @@ import { AnimationGraphDefinition } from "../AnimationGraphDefinition.js";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {
|
|
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
|
-
|
|
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;
|