@woosh/meep-engine 2.46.22 → 2.46.24
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 +763 -0
- package/build/meep.min.js +1 -0
- package/build/meep.module.js +756 -1
- package/package.json +5 -3
- package/src/core/__module.js +1 -0
- package/src/engine/__module.js +2 -0
- package/src/engine/intelligence/__module.js +6 -0
- package/src/engine/intelligence/behavior/SelectorBehavior.js +4 -1
package/package.json
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
"description": "Fully featured ECS game engine written in JavaScript",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.46.
|
|
8
|
+
"version": "2.46.24",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"import": "./build/meep.module.js",
|
|
14
14
|
"require": "./build/meep.cjs"
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"./src/*": "./src/*"
|
|
16
17
|
},
|
|
17
18
|
"scripts": {
|
|
18
19
|
"build-module": "rollup -c rollup.config.js",
|
|
@@ -43,7 +44,8 @@
|
|
|
43
44
|
"@babel/preset-env": "7.20.2",
|
|
44
45
|
"@rollup/plugin-commonjs": "24.0.1",
|
|
45
46
|
"@rollup/plugin-node-resolve": "15.0.1",
|
|
46
|
-
"@rollup/plugin-
|
|
47
|
+
"@rollup/plugin-terser": "0.4.0",
|
|
48
|
+
"@rollup/plugin-strip": "3.0.2",
|
|
47
49
|
"@types/three": "^0.135.0",
|
|
48
50
|
"babel-jest": "26.6.3",
|
|
49
51
|
"rollup": "3.16.0"
|
package/src/core/__module.js
CHANGED
package/src/engine/__module.js
CHANGED
|
@@ -15,3 +15,5 @@ export { Light } from "./graphics/ecs/light/Light.js";
|
|
|
15
15
|
export * from "./graphics/ecs/light/LightSystem.js";
|
|
16
16
|
export { ForwardPlusRenderingPlugin } from "./graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.js";
|
|
17
17
|
export * from "./ecs/EntityBuilder.js";
|
|
18
|
+
|
|
19
|
+
export * from './intelligence/__module.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './behavior/Behavior.js'
|
|
2
|
+
export * from './behavior/SelectorBehavior.js'
|
|
3
|
+
export * from './behavior/BehaviorStatus.js'
|
|
4
|
+
export * from './behavior/composite/ParallelBehavior.js'
|
|
5
|
+
export * from './behavior/composite/SequenceBehavior.js'
|
|
6
|
+
export * from './blackboard/Blackboard.js'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CompositeBehavior } from "./composite/CompositeBehavior.js";
|
|
2
2
|
import { BehaviorStatus } from "./BehaviorStatus.js";
|
|
3
|
+
import { assert } from "../../../core/assert.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Will try every child behaviour in order until one succeeds or if all fail - the selector behavior will fail too
|
|
@@ -29,9 +30,11 @@ export class SelectorBehavior extends CompositeBehavior {
|
|
|
29
30
|
* @returns {SelectorBehavior}
|
|
30
31
|
*/
|
|
31
32
|
static from(children) {
|
|
33
|
+
assert.isArray(children, 'children');
|
|
34
|
+
|
|
32
35
|
const r = new SelectorBehavior();
|
|
33
36
|
|
|
34
|
-
children.forEach(
|
|
37
|
+
children.forEach(r.addChild, r);
|
|
35
38
|
|
|
36
39
|
return r;
|
|
37
40
|
}
|