@woosh/meep-engine 2.46.23 → 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.
@@ -125834,9 +125834,11 @@ class SelectorBehavior extends CompositeBehavior {
125834
125834
  * @returns {SelectorBehavior}
125835
125835
  */
125836
125836
  static from(children) {
125837
+ assert.isArray(children, 'children');
125838
+
125837
125839
  const r = new SelectorBehavior();
125838
125840
 
125839
- children.forEach(this.addChild, this);
125841
+ children.forEach(r.addChild, r);
125840
125842
 
125841
125843
  return r;
125842
125844
  }
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.46.23",
8
+ "version": "2.46.24",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -44,7 +44,8 @@
44
44
  "@babel/preset-env": "7.20.2",
45
45
  "@rollup/plugin-commonjs": "24.0.1",
46
46
  "@rollup/plugin-node-resolve": "15.0.1",
47
- "@rollup/plugin-babel": "6.0.3",
47
+ "@rollup/plugin-terser": "0.4.0",
48
+ "@rollup/plugin-strip": "3.0.2",
48
49
  "@types/three": "^0.135.0",
49
50
  "babel-jest": "26.6.3",
50
51
  "rollup": "3.16.0"
@@ -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(this.addChild, this);
37
+ children.forEach(r.addChild, r);
35
38
 
36
39
  return r;
37
40
  }