@vworlds/vecs 1.0.10 → 1.0.11

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.
Files changed (43) hide show
  1. package/README.md +218 -229
  2. package/dist/command.d.ts +1 -46
  3. package/dist/component.d.ts +51 -59
  4. package/dist/component.js +31 -25
  5. package/dist/component.js.map +1 -1
  6. package/dist/dsl.d.ts +34 -26
  7. package/dist/dsl.js +46 -20
  8. package/dist/dsl.js.map +1 -1
  9. package/dist/entity.d.ts +96 -106
  10. package/dist/entity.js +261 -190
  11. package/dist/entity.js.map +1 -1
  12. package/dist/filter.d.ts +31 -23
  13. package/dist/filter.js +24 -17
  14. package/dist/filter.js.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/package.json +3 -1
  17. package/dist/phase.d.ts +5 -28
  18. package/dist/phase.js +11 -10
  19. package/dist/phase.js.map +1 -1
  20. package/dist/query.d.ts +107 -144
  21. package/dist/query.js +200 -169
  22. package/dist/query.js.map +1 -1
  23. package/dist/system.d.ts +59 -87
  24. package/dist/system.js +114 -114
  25. package/dist/system.js.map +1 -1
  26. package/dist/util/array_map.d.ts +4 -55
  27. package/dist/util/array_map.js +35 -37
  28. package/dist/util/array_map.js.map +1 -1
  29. package/dist/util/bitset.d.ts +40 -50
  30. package/dist/util/bitset.js +76 -62
  31. package/dist/util/bitset.js.map +1 -1
  32. package/dist/util/events.d.ts +14 -18
  33. package/dist/util/events.js +24 -3
  34. package/dist/util/events.js.map +1 -1
  35. package/dist/util/ordered_set.d.ts +1 -17
  36. package/dist/util/ordered_set.js +74 -25
  37. package/dist/util/ordered_set.js.map +1 -1
  38. package/dist/world.d.ts +212 -224
  39. package/dist/world.js +368 -330
  40. package/dist/world.js.map +1 -1
  41. package/eslint-rules/internal-underscore.js +60 -0
  42. package/eslint.config.js +5 -0
  43. package/package.json +3 -1
package/dist/entity.js CHANGED
@@ -2,73 +2,127 @@ import { ArrayMap } from "./util/array_map.js";
2
2
  import { Events } from "./util/events.js";
3
3
  import { Bitset } from "./util/bitset.js";
4
4
  /**
5
- * A game object a unique identifier with an arbitrary set of
6
- * {@link Component | components} attached to it.
5
+ * A game object: a unique numeric id with an arbitrary set of
6
+ * {@link Component | components} attached.
7
7
  *
8
- * You never construct an `Entity` directly. Use {@link World.entity} to create
9
- * one, or {@link World.getOrCreateEntity} when the id is assigned by an
10
- * external authority (e.g. the server):
8
+ * Never instantiate `Entity` directly. Use {@link World.entity} for an
9
+ * auto-assigned id, or {@link World.getOrCreateEntity} when the id comes from
10
+ * an external authority such as a game server:
11
11
  *
12
12
  * ```ts
13
13
  * const e = world.entity();
14
14
  * e.set(Position, { x: 100 });
15
15
  * ```
16
16
  *
17
- * Entities support a parent–child hierarchy. When a parent is destroyed its
18
- * children are destroyed recursively. The `children` set is created lazily.
17
+ * Entities support a parent–child hierarchy. `parent` and `children` form a
18
+ * bidirectional link maintained by {@link setParent}; the children set is
19
+ * created lazily. Destroying a parent recursively destroys its children.
19
20
  *
20
21
  * ## Deferred semantics
21
22
  *
22
23
  * Inside a system body or `forEach` iteration the world is in **deferred
23
- * mode**: `add` / `set` / `remove` / `destroy` only enqueue commands; the
24
- * data layer (`components` map, `componentBitmask`) is not mutated until the
25
- * world processes the queue. Concretely, inside deferred mode:
24
+ * mode**: `add` / `set` / `modified` / `remove` / `destroy` / `setParent` only
25
+ * enqueue commands. The data layer (the components map and `componentBitmask`)
26
+ * is mutated when the world drains its queue. Concretely, while deferred:
26
27
  *
27
28
  * - `entity.get(C)` returns `undefined` after `entity.add(C)` (no instance yet).
28
29
  * - `entity.get(C)` returns the previous value after `entity.set(C, props)`.
29
30
  * - `entity.get(C)` still returns the component after `entity.remove(C)`.
30
31
  *
31
- * Outside deferred mode (top-level user code) the same calls execute inline
32
- * mutations are visible immediately.
32
+ * Outside deferred mode the same calls execute inline and mutations are
33
+ * visible immediately.
33
34
  */
34
35
  export class Entity {
35
36
  constructor(
36
- /** The {@link World} that owns this entity. */
37
+ /** World that owns this entity. */
37
38
  world,
38
- /** Unique numeric entity id assigned at creation time. */
39
+ /** Unique numeric entity id assigned at creation. */
39
40
  eid) {
40
41
  this.world = world;
41
42
  this.eid = eid;
42
- this.components = new ArrayMap(); //maps component types to Components
43
+ /** @internal Maps numeric component type id to component instance. */
44
+ this._components = new ArrayMap();
45
+ /** @internal Set of queries this entity currently belongs to. */
46
+ this._queries = new Set();
43
47
  /**
44
- * Bitmask representing the set of component types currently attached to this
45
- * entity. Used by the world to efficiently match entities against query
46
- * predicates.
48
+ * Bitmask of component type ids currently attached to this entity. Used by
49
+ * the world for fast archetype matching against query predicates.
47
50
  */
48
51
  this.componentBitmask = new Bitset();
49
- this.queries = new Set();
50
52
  /**
51
- * A free-form property bag that modules can use to associate arbitrary data
52
- * with an entity without registering a component.
53
+ * Free-form property bag. Modules can use it to associate arbitrary data with
54
+ * an entity without registering a dedicated component.
53
55
  */
54
56
  this.properties = new Map();
55
- /** @internal True once the world has fully processed this entity's destruction. */
57
+ /** @internal Set to `true` after the world has fully torn down this entity. */
56
58
  this._destroyed = false;
57
59
  }
58
- /** Parent entity in the scene hierarchy, or `undefined` if this is a root entity. */
59
- get parent() {
60
- return this._parent;
60
+ /**
61
+ * Re-evaluate every world query for this entity, firing `_enter` / `_exit`
62
+ * routing whenever membership flipped.
63
+ */
64
+ _updateQueries() {
65
+ this.world.queries.forEach((q) => {
66
+ const belongs = q.belongs(this);
67
+ const isIn = this._isInQuery(q);
68
+ if (belongs !== isIn) {
69
+ belongs ? q._enter(this) : q._exit(this);
70
+ }
71
+ });
61
72
  }
62
- /** Read-only view of direct child entities. */
63
- get children() {
64
- return this._children ?? Entity._emptyChildren;
73
+ /**
74
+ * Construct a fresh component of `type`, apply `props`, store it on this
75
+ * entity, fire the `onAdd` hook, and route query updates.
76
+ *
77
+ * If the component type belongs to an exclusivity group, any conflicting
78
+ * component already on this entity is removed first.
79
+ */
80
+ _new(type, props) {
81
+ const meta = this.world.getComponentMeta(type);
82
+ if (meta.exclusive) {
83
+ for (const exclusiveType of meta.exclusive) {
84
+ if (this._components.has(exclusiveType)) {
85
+ this._remove(exclusiveType);
86
+ }
87
+ }
88
+ }
89
+ const c = new meta.Class(this, meta);
90
+ if (props !== undefined) {
91
+ Object.assign(c, props);
92
+ }
93
+ this._components.set(type, c);
94
+ this.componentBitmask.add(type);
95
+ if (meta._onAddHandlers) {
96
+ meta._onAddHandlers.forEach((handler) => handler(c));
97
+ }
98
+ this._updateQueries();
99
+ return c;
65
100
  }
66
101
  /**
67
- * Immediately reparent this entity. Maintains the bidirectional link,
68
- * removes it from the old parent's children, and adds it to the new
69
- * parent's children. Throws if the operation would create a cycle.
102
+ * @internal Return `true` when this entity is currently tracked by `q`.
103
+ */
104
+ _isInQuery(q) {
105
+ return this._queries.has(q);
106
+ }
107
+ /**
108
+ * @internal Look up a component instance by numeric type id.
109
+ *
110
+ * Faster than {@link get} because no class → type id resolution is needed.
111
+ */
112
+ _get(type) {
113
+ return this._components.get(type);
114
+ }
115
+ /**
116
+ * @internal Reparent this entity in place, maintaining the bidirectional
117
+ * link. Throws if `newParent` is a descendant of this entity.
118
+ *
119
+ * Called by the world either inline (outside deferred mode) or while
120
+ * routing a queued `SetParent` command.
70
121
  */
71
122
  _setParent(newParent) {
123
+ if (this._destroyed) {
124
+ return;
125
+ }
72
126
  if (newParent !== undefined) {
73
127
  let ancestor = newParent;
74
128
  while (ancestor !== undefined) {
@@ -86,9 +140,171 @@ export class Entity {
86
140
  (newParent._children ?? (newParent._children = new Set())).add(this);
87
141
  }
88
142
  }
143
+ /**
144
+ * @internal Apply a `Set` command: create the component if missing, assign
145
+ * `props` if provided, fire `onSet`, and route modified events to every
146
+ * query that watches the component type.
147
+ */
148
+ _set(type, props) {
149
+ if (this._destroyed) {
150
+ return;
151
+ }
152
+ const existing = this._components.get(type);
153
+ const c = existing ?? this._new(type, props);
154
+ if (props !== undefined) {
155
+ if (existing) {
156
+ Object.assign(c, props);
157
+ }
158
+ const setHandlers = c.meta._onSetHandlers;
159
+ if (setHandlers) {
160
+ setHandlers.forEach((handler) => handler(c));
161
+ }
162
+ c._dirty = false;
163
+ if (existing) {
164
+ this._queries.forEach((q) => q._notifyModified(c));
165
+ }
166
+ }
167
+ }
168
+ /**
169
+ * @internal Apply a `Modified` command: fire `onSet` and route modified
170
+ * events to every query that watches the component type.
171
+ */
172
+ _modified(type) {
173
+ if (this._destroyed) {
174
+ return;
175
+ }
176
+ const c = this._components.get(type);
177
+ if (!c) {
178
+ return;
179
+ }
180
+ const setHandlers = c.meta._onSetHandlers;
181
+ if (setHandlers) {
182
+ setHandlers.forEach((handler) => handler(c));
183
+ }
184
+ c._dirty = false;
185
+ this._queries.forEach((q) => q._notifyModified(c));
186
+ }
187
+ /**
188
+ * @internal Apply a `Remove` command: clear the type bit, route exits,
189
+ * detach the component, and fire `onRemove`.
190
+ */
191
+ _remove(type) {
192
+ if (this._destroyed) {
193
+ return;
194
+ }
195
+ const c = this._components.get(type);
196
+ if (!c) {
197
+ return;
198
+ }
199
+ this.componentBitmask.delete(type);
200
+ this._updateQueries();
201
+ this._components.delete(type);
202
+ const removeHandlers = c.meta._onRemoveHandlers;
203
+ if (removeHandlers) {
204
+ removeHandlers.forEach((handler) => handler(c));
205
+ }
206
+ }
207
+ /**
208
+ * @internal Apply a `Destroy` command: fire `_exit` on every query, then
209
+ * `onRemove` on every component, emit the `destroy` event, and unlink from
210
+ * the world and any parent.
211
+ */
212
+ _destroy() {
213
+ if (this._destroyed) {
214
+ return;
215
+ }
216
+ this._destroyed = true;
217
+ const toExit = [];
218
+ this._queries.forEach((q) => {
219
+ if (q.world) {
220
+ toExit.push(q);
221
+ }
222
+ });
223
+ toExit.forEach((q) => q._exit(this));
224
+ this._components.forEach((c) => {
225
+ const removeHandlers = c.meta._onRemoveHandlers;
226
+ if (removeHandlers) {
227
+ removeHandlers.forEach((handler) => handler(c));
228
+ }
229
+ });
230
+ if (this._events) {
231
+ this._events.emit("destroy");
232
+ this._events.removeAllListeners("destroy");
233
+ }
234
+ this.world._unregisterEntity(this);
235
+ if (this._parent) {
236
+ this._parent._children?.delete(this);
237
+ this._parent = undefined;
238
+ }
239
+ }
240
+ /**
241
+ * @internal Forget query `q` without firing exit callbacks. Called by
242
+ * {@link World} when a {@link Query.destroy} sweeps every entity.
243
+ */
244
+ _purgeQuery(q) {
245
+ this._queries.delete(q);
246
+ }
247
+ /**
248
+ * @internal Record that this entity is now tracked by `q`. Called by
249
+ * `Query._enter`.
250
+ */
251
+ _addQueryMembership(q) {
252
+ this._queries.add(q);
253
+ }
254
+ /**
255
+ * @internal Record that this entity is no longer tracked by `q`. Called by
256
+ * `Query._exit`.
257
+ */
258
+ _removeQueryMembership(q) {
259
+ this._queries.delete(q);
260
+ }
261
+ /** Parent entity in the scene hierarchy, or `undefined` for a root entity. */
262
+ get parent() {
263
+ return this._parent;
264
+ }
265
+ /**
266
+ * Read-only view of direct child entities. The backing set is created lazily
267
+ * on the first child link; before that this getter returns a shared empty set.
268
+ */
269
+ get children() {
270
+ return this._children ?? Entity._emptyChildren;
271
+ }
272
+ /**
273
+ * Typed event emitter for entity-level lifecycle events. Currently only the
274
+ * `"destroy"` event is emitted, just before the entity is fully torn down.
275
+ *
276
+ * The emitter is created lazily on first access.
277
+ */
278
+ get events() {
279
+ if (!this._events) {
280
+ this._events = new Events();
281
+ }
282
+ return this._events;
283
+ }
284
+ /** `true` when no components are currently attached to this entity. */
285
+ get empty() {
286
+ return this._components.size == 0;
287
+ }
288
+ /**
289
+ * Read-only view of all components currently attached to this entity, keyed
290
+ * by numeric component type id.
291
+ *
292
+ * The mutating methods (`set`, `delete`, `clear`) are not exposed. Use
293
+ * `entity.add`, `entity.set`, and `entity.remove` to change the component
294
+ * set.
295
+ *
296
+ * ```ts
297
+ * entity.components.forEach((c) => console.log(c.constructor.name));
298
+ * ```
299
+ */
300
+ get components() {
301
+ return this._components;
302
+ }
89
303
  /**
90
304
  * Reparent this entity. In deferred mode the change is queued; outside
91
- * deferred mode it executes immediately.
305
+ * deferred mode it executes inline.
306
+ *
307
+ * @param newParent - New parent, or `undefined` to make this a root entity.
92
308
  */
93
309
  setParent(newParent) {
94
310
  if (this.world.deferred) {
@@ -99,13 +315,14 @@ export class Entity {
99
315
  }
100
316
  }
101
317
  /**
102
- * Queue an `onSet` / `update` notification for the given component and
103
- * return the entity for chaining.
318
+ * Mark `c` as having changed, queueing the corresponding `onSet` / `update`
319
+ * notifications.
104
320
  *
105
- * Equivalent to `component.modified()`, but usable inside an entity method
106
- * chain (e.g. after `add` or `set`).
321
+ * Equivalent to `c.modified()` but returns the entity for chaining. Repeated
322
+ * calls before the world routes the modified command are coalesced via the
323
+ * component's dirty flag.
107
324
  *
108
- * @param c - The component instance whose data changed.
325
+ * @param c - Component instance whose data changed.
109
326
  * @returns This entity, for chaining.
110
327
  */
111
328
  modified(c) {
@@ -150,160 +367,22 @@ export class Entity {
150
367
  this._remove(type);
151
368
  }
152
369
  }
153
- /** @internal Look up a component instance by type id. */
154
- _get(type) {
155
- return this.components.get(type);
156
- }
157
370
  /**
158
- * Retrieve the component of type `Class`, or `undefined` if not present.
371
+ * Look up a component on this entity.
159
372
  *
160
373
  * @param typeOrClass - Component class or numeric type id.
161
- * @returns The component instance or `undefined`.
374
+ * @returns The component instance, or `undefined` when it is not attached.
162
375
  */
163
376
  get(typeOrClass) {
164
377
  const type = this.world.getComponentType(typeOrClass);
165
378
  return this._get(type);
166
379
  }
167
380
  /**
168
- * Typed event emitter for entity-level lifecycle events.
169
- *
170
- * Currently emits one event:
171
- * - `"destroy"` — fired just before the entity is fully torn down.
172
- *
173
- * The emitter is created lazily on first access.
174
- */
175
- get events() {
176
- if (!this._events) {
177
- this._events = new Events();
178
- }
179
- return this._events;
180
- }
181
- isInQuery(q) {
182
- return this.queries.has(q);
183
- }
184
- /** @internal Removes a query from this entity's tracking sets without firing any callbacks. */
185
- _purgeQuery(q) {
186
- this.queries.delete(q);
187
- }
188
- /** @internal Add a query to the entity's tracked-query set. Called by Query._enter. */
189
- _addQueryMembership(q) {
190
- this.queries.add(q);
191
- }
192
- /** @internal Remove a query from the entity's tracked-query set. Called by Query._exit. */
193
- _removeQueryMembership(q) {
194
- this.queries.delete(q);
195
- }
196
- _updateQueries() {
197
- this.world.queries.forEach((q) => {
198
- const belongs = q.belongs(this);
199
- const isIn = this.isInQuery(q);
200
- if (belongs !== isIn) {
201
- belongs ? q._enter(this) : q._exit(this);
202
- }
203
- });
204
- }
205
- _new(type, props) {
206
- const meta = this.world.getComponentMeta(type);
207
- if (meta.exclusive) {
208
- for (const exclusiveType of meta.exclusive) {
209
- if (this.components.has(exclusiveType)) {
210
- this._remove(exclusiveType);
211
- }
212
- }
213
- }
214
- const c = new meta.Class(this, meta);
215
- if (props !== undefined) {
216
- Object.assign(c, props);
217
- }
218
- this.components.set(type, c);
219
- this.componentBitmask.add(type);
220
- meta._onAddHandler?.(c);
221
- this._updateQueries();
222
- return c;
223
- }
224
- /** @internal Execute a Set command — create if absent, apply props, fire hooks, route events. */
225
- _set(type, props) {
226
- if (this._destroyed) {
227
- return;
228
- }
229
- const existing = this.components.get(type);
230
- const c = existing ?? this._new(type, props);
231
- if (props !== undefined) {
232
- if (existing) {
233
- Object.assign(c, props);
234
- }
235
- c.meta._onSetHandler?.(c);
236
- c._dirty = false;
237
- if (existing) {
238
- this.queries.forEach((q) => q.notifyModified(c));
239
- }
240
- }
241
- }
242
- /** @internal Execute a Modified command — fire onSet and route update events. */
243
- _modified(type) {
244
- if (this._destroyed) {
245
- return;
246
- }
247
- const c = this.components.get(type);
248
- if (!c) {
249
- return;
250
- }
251
- c.meta._onSetHandler?.(c);
252
- c._dirty = false;
253
- this.queries.forEach((q) => q.notifyModified(c));
254
- }
255
- /** @internal Execute a Remove command — clear bitmask, route exits, remove component, fire onRemove. */
256
- _remove(type) {
257
- if (this._destroyed) {
258
- return;
259
- }
260
- const c = this.components.get(type);
261
- if (!c) {
262
- return;
263
- }
264
- this.componentBitmask.delete(type);
265
- this._updateQueries();
266
- this.components.delete(type);
267
- c.meta._onRemoveHandler?.(c);
268
- }
269
- /** @internal Execute a Destroy command — exit queries, fire onRemove, emit event, unregister. */
270
- _destroy() {
271
- if (this._destroyed) {
272
- return;
273
- }
274
- // 1. Fire exit on every query the entity belongs to.
275
- const toExit = [];
276
- this.queries.forEach((q) => {
277
- if (q.world) {
278
- toExit.push(q);
279
- }
280
- });
281
- toExit.forEach((q) => q._exit(this));
282
- // 2. Fire onRemove on every still-attached component.
283
- this.components.forEach((c) => c.meta._onRemoveHandler?.(c));
284
- // 3. Emit the destroy event.
285
- if (this._events) {
286
- this._events.emit("destroy");
287
- this._events.removeAllListeners("destroy");
288
- }
289
- // 4. Mark destroyed and unhook from world / parent.
290
- this._destroyed = true;
291
- this.world._unregisterEntity(this);
292
- if (this._parent) {
293
- this._parent._children?.delete(this);
294
- this._parent = undefined;
295
- }
296
- }
297
- /** `true` when the entity has no components attached. */
298
- get empty() {
299
- return this.components.size == 0;
300
- }
301
- /**
302
- * Destroy this entity and recursively destroy all of its children.
381
+ * Destroy this entity and recursively destroy its children.
303
382
  *
304
- * All components have their `onRemove` hooks fired, the entity is
305
- * unregistered from the world, and the `"destroy"` event is emitted. The
306
- * entity must not be used after the destroy completes.
383
+ * Each component fires its `onRemove` hook, the `"destroy"` event is emitted
384
+ * just before teardown, and the entity is unregistered from the world.
385
+ * After destruction the entity must not be used.
307
386
  */
308
387
  destroy() {
309
388
  if (this.world.deferred) {
@@ -319,19 +398,11 @@ export class Entity {
319
398
  this._children.clear();
320
399
  }
321
400
  }
322
- /**
323
- * Iterate over every component currently attached to this entity.
324
- *
325
- * @param callback - Called with each component instance. Iteration order is
326
- * not guaranteed.
327
- */
328
- forEachComponent(callback) {
329
- this.components.forEach(callback);
330
- }
331
401
  /** Returns `"EntityN"` where N is the entity id. */
332
402
  toString() {
333
403
  return `Entity${this.eid}`;
334
404
  }
335
405
  }
406
+ /** @internal Empty children set used as the default `children` value. */
336
407
  Entity._emptyChildren = new Set();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