@thi.ng/ecs 0.7.192 → 0.7.193

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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 210 standalone projects, maintained as part
10
+ > This is one of 211 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/ecs.js CHANGED
@@ -42,13 +42,13 @@ let ECS = class {
42
42
  if (comps) {
43
43
  if (isArray(comps)) {
44
44
  if (!comps.length) return id;
45
- for (let cid of comps) {
45
+ for (const cid of comps) {
46
46
  const comp = isString(cid) ? this.components.get(cid) : cid;
47
47
  assert(!!comp, `unknown component ID: ${cid}`);
48
48
  comp.add(id);
49
49
  }
50
50
  } else {
51
- for (let cid in comps) {
51
+ for (const cid in comps) {
52
52
  const comp = this.components.get(cid);
53
53
  assert(!!comp, `unknown component ID: ${cid}`);
54
54
  comp.add(id, comps[cid]);
@@ -91,7 +91,7 @@ let ECS = class {
91
91
  deleteID(id) {
92
92
  if (this.idgen.free(id)) {
93
93
  this.notify({ id: EVENT_PRE_DELETE, target: this, value: id });
94
- for (let c of this.componentsForID(id)) {
94
+ for (const c of this.componentsForID(id)) {
95
95
  c.delete(id);
96
96
  }
97
97
  return true;
@@ -107,7 +107,7 @@ let ECS = class {
107
107
  setCapacity(newCap) {
108
108
  this.idgen.capacity = newCap;
109
109
  const pool = this.pool;
110
- for (let comp of this.components.values()) {
110
+ for (const comp of this.components.values()) {
111
111
  comp.resize(pool, newCap);
112
112
  }
113
113
  }
package/groups/group.js CHANGED
@@ -89,7 +89,7 @@ class Group {
89
89
  }
90
90
  forEach(fn, ...args) {
91
91
  let i = 0;
92
- for (let id of this.ids) {
92
+ for (const id of this.ids) {
93
93
  fn(this.getEntityUnsafe(id), i++, ...args);
94
94
  }
95
95
  }
@@ -97,7 +97,7 @@ class Group {
97
97
  return this.owned.length === this.components.length;
98
98
  }
99
99
  isValidID(id) {
100
- for (let comp of this.components) {
100
+ for (const comp of this.components) {
101
101
  if (!comp.has(id)) return false;
102
102
  }
103
103
  return true;
@@ -122,7 +122,7 @@ class Group {
122
122
  intersectionR(),
123
123
  this.components
124
124
  );
125
- for (let id of existing) {
125
+ for (const id of existing) {
126
126
  this.addID(id, false);
127
127
  }
128
128
  }
@@ -158,7 +158,7 @@ class Group {
158
158
  }
159
159
  }
160
160
  *nonOwnedValues() {
161
- for (let id of this.ids) {
161
+ for (const id of this.ids) {
162
162
  yield this.getEntityUnsafe(id);
163
163
  }
164
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/ecs",
3
- "version": "0.7.192",
3
+ "version": "0.7.193",
4
4
  "description": "Entity Component System based around typed arrays & sparse sets",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,19 +39,19 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.12.9",
43
- "@thi.ng/associative": "^7.1.20",
44
- "@thi.ng/binary": "^3.4.67",
45
- "@thi.ng/checks": "^3.7.25",
46
- "@thi.ng/dcons": "^3.2.177",
47
- "@thi.ng/errors": "^2.5.49",
48
- "@thi.ng/idgen": "^2.2.83",
49
- "@thi.ng/logger": "^3.2.8",
50
- "@thi.ng/malloc": "^6.1.130",
51
- "@thi.ng/transducers": "^9.6.18"
42
+ "@thi.ng/api": "^8.12.10",
43
+ "@thi.ng/associative": "^7.1.21",
44
+ "@thi.ng/binary": "^3.4.68",
45
+ "@thi.ng/checks": "^3.8.0",
46
+ "@thi.ng/dcons": "^3.2.178",
47
+ "@thi.ng/errors": "^2.5.50",
48
+ "@thi.ng/idgen": "^2.2.84",
49
+ "@thi.ng/logger": "^3.2.9",
50
+ "@thi.ng/malloc": "^6.1.131",
51
+ "@thi.ng/transducers": "^9.6.19"
52
52
  },
53
53
  "devDependencies": {
54
- "@thi.ng/equiv": "^2.1.99",
54
+ "@thi.ng/equiv": "^2.1.100",
55
55
  "esbuild": "^0.27.0",
56
56
  "typedoc": "^0.28.14",
57
57
  "typescript": "^5.9.3"
@@ -124,5 +124,5 @@
124
124
  "status": "alpha",
125
125
  "year": 2019
126
126
  },
127
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
127
+ "gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
128
128
  }