@woosh/meep-engine 2.43.39 → 2.43.42
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/core/binary/BitSet.js +4 -18
- package/core/color/Color.js +1 -1
- package/core/geom/ConicRay.js +1 -1
- package/core/geom/Quaternion.js +1 -1
- package/core/geom/Vector1.js +1 -1
- package/core/geom/Vector3.js +1 -1
- package/core/geom/Vector4.js +1 -1
- package/core/math/hash/computeHashFloatArray.js +1 -1
- package/core/math/hash/computeObjectHash.js +1 -1
- package/core/math/interval/NumericInterval.js +1 -1
- package/core/model/BoundedValue.js +1 -1
- package/core/model/node-graph/Connection.js +47 -6
- package/core/model/node-graph/Connection.spec.js +21 -0
- package/core/model/node-graph/DataType.js +36 -13
- package/core/model/node-graph/DataType.spec.js +28 -0
- package/core/model/node-graph/NodeGraph.js +46 -12
- package/core/model/node-graph/node/NodeDescription.js +26 -16
- package/core/model/node-graph/node/NodeDescription.spec.js +14 -0
- package/core/model/node-graph/node/NodeInstance.js +10 -4
- package/core/model/node-graph/node/NodeInstancePortReference.js +18 -0
- package/core/model/node-graph/node/NodeRegistry.js +36 -10
- package/core/model/node-graph/node/NodeRegistry.spec.js +25 -0
- package/core/model/node-graph/node/Port.js +12 -1
- package/core/model/node-graph/node/PortDirection.js +1 -1
- package/core/model/node-graph/node/parameter/NodeParameterDescription.js +1 -1
- package/core/model/reactive/model/terminal/ReactiveLiteralNumber.js +1 -1
- package/core/model/stat/LinearModifier.js +1 -1
- package/core/{math/hash → primitives/numbers}/computeHashFloat.js +0 -0
- package/core/{math/hash → primitives/numbers}/computeHashFloat.spec.js +0 -0
- package/engine/asset/loaders/material/computeMaterialHash.js +1 -1
- package/engine/asset/loaders/material/computeTextureHash.js +1 -1
- package/engine/ecs/animation/Animation.js +1 -1
- package/engine/ecs/animation/InverseKinematics.js +1 -1
- package/engine/ecs/dynamic_actions/actions/definition/WeightedRandomActionDescription.js +1 -1
- package/engine/ecs/gui/position/ViewportPosition.js +1 -1
- package/engine/graphics/ecs/animation/animator/AnimationClip.js +1 -1
- package/engine/graphics/ecs/animation/animator/AnimationNotification.js +1 -1
- package/engine/graphics/ecs/animation/animator/graph/AnimationGraph.js +1 -1
- package/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +1 -1
- package/engine/graphics/ecs/highlight/HighlightDefinition.js +1 -1
- package/engine/graphics/ecs/mesh/Mesh.js +1 -1
- package/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +1 -1
- package/engine/graphics/micron/render/PatchCacheKey.js +1 -1
- package/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +1 -1
- package/engine/graphics/render/buffer/slot/parameter/ProgramValueSlotParameter.js +1 -1
- package/engine/graphics/render/frame_graph/RenderGraph.js +5 -1
- package/engine/intelligence/behavior/SelectorBehavior.js +3 -1
- package/engine/intelligence/behavior/behavior_to_dot.js +251 -0
- package/engine/intelligence/behavior/behavior_to_dot.prototype.js +55 -0
- package/engine/intelligence/behavior/composite/CompositeBehavior.js +6 -0
- package/engine/intelligence/behavior/composite/ParallelBehavior.js +10 -0
- package/engine/intelligence/behavior/composite/SequenceBehavior.js +6 -50
- package/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.js +52 -0
- package/engine/intelligence/behavior/selector/WeightedElement.js +1 -1
- package/engine/intelligence/blackboard/Blackboard.js +26 -14
- package/engine/intelligence/blackboard/Blackboard.spec.js +62 -0
- package/engine/intelligence/blackboard/{Blacboard.spec.js → BlackboardSerializationAdapter.spec.js} +1 -1
- package/engine/intelligence/mcts/README.md +7 -0
- package/engine/intelligence/optimization/RandomOptimizer.js +2 -1
- package/engine/intelligence/resource/ResourceAllocationBid.js +3 -3
- package/engine/intelligence/resource/ResourceAllocationSolver.js +1 -1
- package/engine/intelligence/resource/StrategicResourceAllocator.js +6 -4
- package/engine/intelligence/resource/TacticalModule.js +7 -0
- package/engine/knowledge/database/StaticKnowledgeDataTableDescriptor.js +5 -5
- package/engine/navigation/grid/GridField.js +1 -0
- package/engine/notify/NotificationLog.js +2 -2
- package/engine/sound/ecs/emitter/SoundEmitter.js +1 -1
- package/engine/sound/ecs/emitter/SoundTrack.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { SequenceBehavior } from "./composite/SequenceBehavior.js";
|
|
2
|
+
import { SucceedingBehavior } from "./primitive/SucceedingBehavior.js";
|
|
3
|
+
import { Behavior } from "./Behavior.js";
|
|
4
|
+
import { ParallelBehavior } from "./composite/ParallelBehavior.js";
|
|
5
|
+
import { behavior_to_dot } from "./behavior_to_dot.js";
|
|
6
|
+
import { DelayBehavior } from "./util/DelayBehavior.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CenterCameraOnObject extends Behavior{
|
|
10
|
+
object = "whiteboard"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class UserControlsDisable extends Behavior{
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class PlayVideoInPopup extends Behavior{
|
|
18
|
+
url = "url/how_to_use_whiteboard.mp4"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
class DrawCurvesOnWhiteBoard extends Behavior{
|
|
22
|
+
curve = "hello"
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
class UserControlsEnable extends Behavior{
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const complex = SequenceBehavior.from([
|
|
31
|
+
new SucceedingBehavior(),
|
|
32
|
+
SequenceBehavior.from([
|
|
33
|
+
new Behavior()
|
|
34
|
+
]),
|
|
35
|
+
ParallelBehavior.from([
|
|
36
|
+
new SucceedingBehavior(),
|
|
37
|
+
DelayBehavior.from(17)
|
|
38
|
+
])
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
const tutorial = SequenceBehavior.from([ // will execute all members one after another
|
|
42
|
+
|
|
43
|
+
ParallelBehavior.from([ // will execute all members at the same time, completes when last member completes
|
|
44
|
+
|
|
45
|
+
new CenterCameraOnObject( ), // center camera on whiteboard
|
|
46
|
+
new UserControlsDisable(),
|
|
47
|
+
new PlayVideoInPopup() // plays a video in a popup, behavior finishes when video does
|
|
48
|
+
|
|
49
|
+
]),
|
|
50
|
+
new DrawCurvesOnWhiteBoard(),
|
|
51
|
+
new UserControlsEnable()
|
|
52
|
+
|
|
53
|
+
])
|
|
54
|
+
|
|
55
|
+
console.log(behavior_to_dot(tutorial));
|
|
@@ -226,5 +226,15 @@ export class ParallelBehavior extends CompositeBehavior {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
/**
|
|
230
|
+
* @readonly
|
|
231
|
+
* @type {boolean}
|
|
232
|
+
*/
|
|
233
|
+
ParallelBehavior.prototype.isParallelBehavior = true;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @readonly
|
|
237
|
+
* @type {string}
|
|
238
|
+
*/
|
|
229
239
|
ParallelBehavior.typeName = "ParallelBehavior";
|
|
230
240
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Behavior } from "../Behavior.js";
|
|
2
2
|
import { CompositeBehavior } from "./CompositeBehavior.js";
|
|
3
3
|
import { BehaviorStatus } from "../BehaviorStatus.js";
|
|
4
|
-
import {
|
|
5
|
-
ObjectBasedClassSerializationAdapter
|
|
6
|
-
} from "../../../ecs/storage/binary/object/ObjectBasedClassSerializationAdapter.js";
|
|
7
4
|
import { assert } from "../../../../core/assert.js";
|
|
8
5
|
|
|
9
6
|
export class SequenceBehavior extends CompositeBehavior {
|
|
@@ -115,52 +112,11 @@ export class SequenceBehavior extends CompositeBehavior {
|
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
this.klass = SequenceBehavior;
|
|
125
|
-
this.version = 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
* @param {BinaryBuffer} buffer
|
|
131
|
-
* @param {SequenceBehavior} value
|
|
132
|
-
*/
|
|
133
|
-
serialize(buffer, value) {
|
|
134
|
-
const children = value.getChildren();
|
|
135
|
-
|
|
136
|
-
const n = children.length;
|
|
137
|
-
buffer.writeUintVar(n);
|
|
138
|
-
|
|
139
|
-
for (let i = 0; i < n; i++) {
|
|
140
|
-
const behavior = children[i];
|
|
115
|
+
/**
|
|
116
|
+
* @readonly
|
|
117
|
+
* @type {boolean}
|
|
118
|
+
*/
|
|
119
|
+
SequenceBehavior.prototype.isSequenceBehavior = true;
|
|
141
120
|
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
* @param {BinaryBuffer} buffer
|
|
149
|
-
* @param {SequenceBehavior} value
|
|
150
|
-
*/
|
|
151
|
-
deserialize(buffer, value) {
|
|
152
|
-
const n = buffer.readUintVar();
|
|
153
|
-
|
|
154
|
-
value.clearChildren();
|
|
155
|
-
|
|
156
|
-
for (let i = 0; i < n; i++) {
|
|
157
|
-
/**
|
|
158
|
-
*
|
|
159
|
-
* @type {Behavior}
|
|
160
|
-
*/
|
|
161
|
-
const behavior = this.objectAdapter.deserialize(buffer);
|
|
121
|
+
SequenceBehavior.typeName = "SequenceBehavior";
|
|
162
122
|
|
|
163
|
-
value.addChild(behavior);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ObjectBasedClassSerializationAdapter
|
|
3
|
+
} from "../../../ecs/storage/binary/object/ObjectBasedClassSerializationAdapter.js";
|
|
4
|
+
import { SequenceBehavior } from "./SequenceBehavior.js";
|
|
5
|
+
|
|
6
|
+
export class SequenceBehaviorSerializationAdapter extends ObjectBasedClassSerializationAdapter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
|
|
10
|
+
this.klass = SequenceBehavior;
|
|
11
|
+
this.version = 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {BinaryBuffer} buffer
|
|
17
|
+
* @param {SequenceBehavior} value
|
|
18
|
+
*/
|
|
19
|
+
serialize(buffer, value) {
|
|
20
|
+
const children = value.getChildren();
|
|
21
|
+
|
|
22
|
+
const n = children.length;
|
|
23
|
+
buffer.writeUintVar(n);
|
|
24
|
+
|
|
25
|
+
for (let i = 0; i < n; i++) {
|
|
26
|
+
const behavior = children[i];
|
|
27
|
+
|
|
28
|
+
this.objectAdapter.serialize(buffer, behavior);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param {BinaryBuffer} buffer
|
|
35
|
+
* @param {SequenceBehavior} value
|
|
36
|
+
*/
|
|
37
|
+
deserialize(buffer, value) {
|
|
38
|
+
const n = buffer.readUintVar();
|
|
39
|
+
|
|
40
|
+
value.clearChildren();
|
|
41
|
+
|
|
42
|
+
for (let i = 0; i < n; i++) {
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Behavior}
|
|
46
|
+
*/
|
|
47
|
+
const behavior = this.objectAdapter.deserialize(buffer);
|
|
48
|
+
|
|
49
|
+
value.addChild(behavior);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -2,7 +2,7 @@ import { assert } from "../../../../core/assert.js";
|
|
|
2
2
|
import { invokeObjectEquals } from "../../../../core/model/object/invokeObjectEquals.js";
|
|
3
3
|
import { invokeObjectHash } from "../../../../core/model/object/invokeObjectHash.js";
|
|
4
4
|
import { computeHashIntegerArray } from "../../../../core/collection/array/computeHashIntegerArray.js";
|
|
5
|
-
import { computeHashFloat } from "../../../../core/
|
|
5
|
+
import { computeHashFloat } from "../../../../core/primitives/numbers/computeHashFloat.js";
|
|
6
6
|
|
|
7
7
|
export class WeightedElement {
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ export class Blackboard extends AbstractBlackboard {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {Object<
|
|
21
|
+
* @type {Object<BlackboardValue>}
|
|
22
22
|
*/
|
|
23
23
|
this.data = {};
|
|
24
24
|
|
|
@@ -76,7 +76,16 @@ export class Blackboard extends AbstractBlackboard {
|
|
|
76
76
|
return this.proxy;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param {string} name
|
|
82
|
+
* @param {DataType} type
|
|
83
|
+
* @return {boolean} true only if entry exists and matches type, or if supplied parameter type is set to "Any"
|
|
84
|
+
*/
|
|
79
85
|
contains(name, type) {
|
|
86
|
+
assert.isString(name, 'name');
|
|
87
|
+
assert.enum(type, DataType, 'type');
|
|
88
|
+
|
|
80
89
|
const datum = this.data[name];
|
|
81
90
|
|
|
82
91
|
if (datum === undefined) {
|
|
@@ -115,7 +124,7 @@ export class Blackboard extends AbstractBlackboard {
|
|
|
115
124
|
* @param {RegExp} pattern
|
|
116
125
|
*/
|
|
117
126
|
traverseWithPattern(pattern, visitor) {
|
|
118
|
-
assert.
|
|
127
|
+
assert.defined(pattern, 'pattern');
|
|
119
128
|
assert.ok(pattern instanceof RegExp, 'pattern is not a RegExp');
|
|
120
129
|
|
|
121
130
|
this.traverse(function (name, value, type) {
|
|
@@ -133,33 +142,36 @@ export class Blackboard extends AbstractBlackboard {
|
|
|
133
142
|
* @returns {T}
|
|
134
143
|
*/
|
|
135
144
|
acquire(name, type, initialValue) {
|
|
136
|
-
assert.
|
|
145
|
+
assert.isString(name, 'name');
|
|
146
|
+
|
|
147
|
+
let datum;
|
|
137
148
|
|
|
138
149
|
if (this.data.hasOwnProperty(name)) {
|
|
139
150
|
// property exists
|
|
140
|
-
|
|
151
|
+
datum = this.data[name];
|
|
141
152
|
|
|
142
153
|
if (type !== DataType.Any && datum.type !== type) {
|
|
143
154
|
throw new TypeError(`Value '${name}' exists, but is type(='${datum.type}'), expected type '${type}'`);
|
|
144
155
|
}
|
|
145
156
|
|
|
146
|
-
datum.referenceCount++;
|
|
147
|
-
|
|
148
|
-
return datum.value;
|
|
149
157
|
} else {
|
|
150
158
|
//doesn't exist - create it
|
|
151
|
-
|
|
159
|
+
datum = new BlackboardValue(type);
|
|
160
|
+
|
|
161
|
+
const concrete_value = datum.value;
|
|
152
162
|
|
|
153
163
|
if (initialValue !== undefined) {
|
|
154
|
-
|
|
164
|
+
concrete_value.set(initialValue);
|
|
155
165
|
}
|
|
156
166
|
|
|
157
|
-
this.data[name] =
|
|
158
|
-
|
|
159
|
-
this.on.added.send4(name, blackboardValue.value.getValue(), type, this);
|
|
167
|
+
this.data[name] = datum;
|
|
160
168
|
|
|
161
|
-
|
|
169
|
+
this.on.added.send4(name, concrete_value.getValue(), type, this);
|
|
162
170
|
}
|
|
171
|
+
|
|
172
|
+
datum.referenceCount++;
|
|
173
|
+
|
|
174
|
+
return datum.value;
|
|
163
175
|
}
|
|
164
176
|
|
|
165
177
|
/**
|
|
@@ -230,7 +242,7 @@ export class Blackboard extends AbstractBlackboard {
|
|
|
230
242
|
if (value_type === 'number') {
|
|
231
243
|
this.acquireNumber(propName, value).set(value);
|
|
232
244
|
} else if (value_type === 'boolean') {
|
|
233
|
-
this.
|
|
245
|
+
this.acquireBoolean(propName, value).set(value);
|
|
234
246
|
} else if (value_type === 'string') {
|
|
235
247
|
this.acquireString(propName, value).set(value);
|
|
236
248
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Blackboard } from "./Blackboard.js";
|
|
2
|
+
import { DataType } from "../../../core/parser/simple/DataType.js";
|
|
3
|
+
|
|
4
|
+
test('"contains" method', () => {
|
|
5
|
+
const bb = new Blackboard();
|
|
6
|
+
|
|
7
|
+
expect(bb.contains('a', DataType.Any)).toBe(false);
|
|
8
|
+
|
|
9
|
+
bb.acquireNumber('a', 0);
|
|
10
|
+
|
|
11
|
+
expect(bb.contains('a', DataType.Number)).toBe(true);
|
|
12
|
+
expect(bb.contains('a', DataType.Any)).toBe(true);
|
|
13
|
+
expect(bb.contains('a', DataType.Boolean)).toBe(false);
|
|
14
|
+
|
|
15
|
+
expect(bb.contains('b', DataType.Number)).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
test("entry is deleted after reset", () => {
|
|
20
|
+
const bb = new Blackboard();
|
|
21
|
+
|
|
22
|
+
bb.acquireNumber('a');
|
|
23
|
+
|
|
24
|
+
bb.reset();
|
|
25
|
+
|
|
26
|
+
expect(bb.contains('a', DataType.Number)).toBe(false);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("entry is copied across when blackboard is copied", () => {
|
|
30
|
+
const a = new Blackboard();
|
|
31
|
+
|
|
32
|
+
a.acquireNumber('test', 7);
|
|
33
|
+
|
|
34
|
+
const b = new Blackboard();
|
|
35
|
+
|
|
36
|
+
b.copy(a);
|
|
37
|
+
|
|
38
|
+
expect(b.contains('test', DataType.Number)).toBe(true);
|
|
39
|
+
expect(b.acquireNumber('test').getValue()).toBe(7);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("to/from JSON serialization consistency", () => {
|
|
43
|
+
|
|
44
|
+
const source = new Blackboard();
|
|
45
|
+
|
|
46
|
+
source.acquireNumber('count', 7.1);
|
|
47
|
+
source.acquireBoolean('flag', true);
|
|
48
|
+
source.acquireString('label', 'hello');
|
|
49
|
+
|
|
50
|
+
const target = new Blackboard();
|
|
51
|
+
|
|
52
|
+
target.fromJSON(source.toJSON());
|
|
53
|
+
|
|
54
|
+
expect(target.contains('count', DataType.Number)).toBe(true);
|
|
55
|
+
expect(target.acquireNumber('count').getValue()).toBe(7.1);
|
|
56
|
+
|
|
57
|
+
expect(target.contains('flag', DataType.Boolean)).toBe(true);
|
|
58
|
+
expect(target.acquireBoolean('flag').getValue()).toBe(true);
|
|
59
|
+
|
|
60
|
+
expect(target.contains('label', DataType.String)).toBe(true);
|
|
61
|
+
expect(target.acquireString('label').getValue()).toBe('hello');
|
|
62
|
+
});
|
|
@@ -2,7 +2,8 @@ import { seededRandom } from "../../../core/math/random/seededRandom.js";
|
|
|
2
2
|
import { randomFromArray } from "../../../core/math/random/randomFromArray.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Hill climbing optimizer based on random moves
|
|
5
|
+
* Hill climbing optimizer based on testing random moves one move at a time, if overall fitness improves - that move is committed, otherwise it's rejected
|
|
6
|
+
* Very dumb, but quite effective. Requires very little code to write a competent optimizer, especially when state space is relatively small
|
|
6
7
|
* @template S
|
|
7
8
|
* @class
|
|
8
9
|
*/
|
|
@@ -12,10 +12,10 @@ export class ResourceAllocationBid {
|
|
|
12
12
|
* @param {number} value
|
|
13
13
|
*/
|
|
14
14
|
constructor(allocation, value) {
|
|
15
|
-
assert.
|
|
16
|
-
assert.
|
|
15
|
+
assert.defined(allocation, 'allocation');
|
|
16
|
+
assert.notNull(allocation, 'allocation');
|
|
17
17
|
|
|
18
|
-
assert.
|
|
18
|
+
assert.isNumber(value, 'value');
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
@@ -31,6 +31,8 @@ export class StrategicResourceAllocator {
|
|
|
31
31
|
*/
|
|
32
32
|
addTacticalModule(module) {
|
|
33
33
|
assert.defined(module, 'module');
|
|
34
|
+
assert.notNull(module, 'module');
|
|
35
|
+
assert.equal(module.isTacticalModule, true, 'module.TacticalModule !== true');
|
|
34
36
|
|
|
35
37
|
this.modules.push(module);
|
|
36
38
|
}
|
|
@@ -53,13 +55,13 @@ export class StrategicResourceAllocator {
|
|
|
53
55
|
const moduleResults = this.modules.map(m => {
|
|
54
56
|
const promise = m.collectBids(resources);
|
|
55
57
|
|
|
56
|
-
assert.
|
|
57
|
-
assert.
|
|
58
|
-
assert.
|
|
58
|
+
assert.defined(promise, 'promise');
|
|
59
|
+
assert.notNull(promise, 'promise');
|
|
60
|
+
assert.isFunction(promise.then, "promise.then");
|
|
59
61
|
|
|
60
62
|
promise.then(moduleBids => {
|
|
61
63
|
|
|
62
|
-
assert.
|
|
64
|
+
assert.isArray(moduleBids, 'moduleBids');
|
|
63
65
|
|
|
64
66
|
moduleBids.forEach(b => bids.set(b, m));
|
|
65
67
|
|
|
@@ -31,12 +31,12 @@ export class StaticKnowledgeDataTableDescriptor {
|
|
|
31
31
|
*/
|
|
32
32
|
static from(id, source, table) {
|
|
33
33
|
|
|
34
|
-
assert.
|
|
35
|
-
assert.
|
|
34
|
+
assert.isString(id, 'id');
|
|
35
|
+
assert.isString(source, 'source');
|
|
36
36
|
|
|
37
|
-
assert.defined(table,'table');
|
|
38
|
-
assert.notNull(table,'table');
|
|
39
|
-
assert.equal(table.isStaticKnowledgeDataTable, true,'table.isStaticKnowledgeDataTable !== true');
|
|
37
|
+
assert.defined(table, 'table');
|
|
38
|
+
assert.notNull(table, 'table');
|
|
39
|
+
assert.equal(table.isStaticKnowledgeDataTable, true, 'table.isStaticKnowledgeDataTable !== true');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
const r = new StaticKnowledgeDataTableDescriptor();
|
|
@@ -9,13 +9,13 @@ import { assert } from "../../core/assert.js";
|
|
|
9
9
|
|
|
10
10
|
function NotificationLog() {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* @readonly
|
|
13
13
|
* @type {List<Notification>}
|
|
14
14
|
*/
|
|
15
15
|
this.elements = new List();
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Once number of entries in the log reaches this amount, the earliest entries will be removed to make space for new ones
|
|
19
19
|
* @type {number}
|
|
20
20
|
*/
|
|
21
21
|
this.maxLength = 1000;
|
|
@@ -19,7 +19,7 @@ import { interpolate_irradiance_smith } from "../../../../core/math/physics/irra
|
|
|
19
19
|
import { objectKeyByValue } from "../../../../core/model/object/objectKeyByValue.js";
|
|
20
20
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
21
21
|
import { computeHashIntegerArray } from "../../../../core/collection/array/computeHashIntegerArray.js";
|
|
22
|
-
import { computeHashFloat } from "../../../../core/
|
|
22
|
+
import { computeHashFloat } from "../../../../core/primitives/numbers/computeHashFloat.js";
|
|
23
23
|
import { compareStrings } from "../../../../core/primitives/strings/compareStrings.js";
|
|
24
24
|
import { compareNumbers } from "../../../../core/primitives/numbers/compareNumbers.js";
|
|
25
25
|
|
|
@@ -3,7 +3,7 @@ import { SoundTrackFlags } from "./SoundTrackFlags.js";
|
|
|
3
3
|
import { assert } from "../../../../core/assert.js";
|
|
4
4
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
5
5
|
import { computeHashIntegerArray } from "../../../../core/collection/array/computeHashIntegerArray.js";
|
|
6
|
-
import { computeHashFloat } from "../../../../core/
|
|
6
|
+
import { computeHashFloat } from "../../../../core/primitives/numbers/computeHashFloat.js";
|
|
7
7
|
import { compareStrings } from "../../../../core/primitives/strings/compareStrings.js";
|
|
8
8
|
import { compareNumbers } from "../../../../core/primitives/numbers/compareNumbers.js";
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.43.
|
|
8
|
+
"version": "2.43.42",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|