@vworlds/vecs 1.0.2 → 1.0.4
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 +135 -14
- package/dist/dsl.d.ts +71 -0
- package/dist/dsl.js +58 -0
- package/dist/dsl.js.map +1 -0
- package/dist/entity.d.ts +28 -10
- package/dist/entity.js +34 -23
- package/dist/entity.js.map +1 -1
- package/dist/filter.d.ts +59 -0
- package/dist/filter.js +53 -0
- package/dist/filter.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/query.d.ts +217 -0
- package/dist/query.js +238 -0
- package/dist/query.js.map +1 -0
- package/dist/system.d.ts +16 -169
- package/dist/system.js +49 -198
- package/dist/system.js.map +1 -1
- package/dist/world.d.ts +73 -28
- package/dist/world.js +67 -46
- package/dist/world.js.map +1 -1
- package/package.json +1 -1
package/dist/world.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { Component, ComponentClassOrType, ComponentMeta, Hook } from "./component.js";
|
|
2
2
|
import { Entity } from "./entity.js";
|
|
3
|
+
import { Query } from "./query.js";
|
|
3
4
|
import { System } from "./system.js";
|
|
5
|
+
import { Filter } from "./filter.js";
|
|
6
|
+
import { type QueryDSL, type ExtractRequired } from "./dsl.js";
|
|
4
7
|
import { IPhase } from "./phase.js";
|
|
5
8
|
/**
|
|
6
9
|
* The central ECS container.
|
|
7
10
|
*
|
|
8
|
-
* A `World` owns all entities, components, systems, and the update
|
|
9
|
-
* Typical lifecycle:
|
|
11
|
+
* A `World` owns all entities, components, systems, queries, and the update
|
|
12
|
+
* pipeline. Typical lifecycle:
|
|
10
13
|
*
|
|
11
14
|
* 1. **Register components** — call {@link registerComponent} (and optionally
|
|
12
15
|
* {@link registerComponentType}) for every component class.
|
|
13
|
-
* 2. **Register systems** — call {@link system}
|
|
14
|
-
* create and configure
|
|
15
|
-
* 3. **Start** — call {@link start} to freeze registration and
|
|
16
|
-
* into their phases.
|
|
16
|
+
* 2. **Register systems and queries** — call {@link system} and {@link query}
|
|
17
|
+
* to create and configure them.
|
|
18
|
+
* 3. **Start** — call {@link start} to freeze component registration and
|
|
19
|
+
* distribute systems into their phases.
|
|
17
20
|
* 4. **Run loop** — call {@link runPhase} once per frame for each phase.
|
|
18
21
|
*
|
|
19
22
|
* ```ts
|
|
@@ -37,14 +40,12 @@ export declare class World {
|
|
|
37
40
|
private componentNameTypeMap;
|
|
38
41
|
private archChangeQueue;
|
|
39
42
|
private destroyedEntities;
|
|
40
|
-
private
|
|
41
|
-
private allSystems;
|
|
43
|
+
private allQueries;
|
|
42
44
|
private Class2Meta;
|
|
43
45
|
private Type2Meta;
|
|
44
46
|
private updatedComponents;
|
|
45
47
|
private localComponentCounter;
|
|
46
48
|
private componentRegistrationDisabled;
|
|
47
|
-
private systemRegistrationDisabled;
|
|
48
49
|
private pipeline;
|
|
49
50
|
private eidCounter;
|
|
50
51
|
constructor();
|
|
@@ -167,22 +168,15 @@ export declare class World {
|
|
|
167
168
|
* @param type - The numeric type id assigned by the server.
|
|
168
169
|
*/
|
|
169
170
|
registerComponentType(componentName: string, type: number): void;
|
|
170
|
-
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*
|
|
177
|
-
* @param s - The system to add.
|
|
178
|
-
* @throws If system registration is disabled (after {@link start}).
|
|
179
|
-
*/
|
|
180
|
-
addSystem(s: System): void;
|
|
171
|
+
/** @internal Called by the {@link Query} constructor to register itself. */
|
|
172
|
+
_addQuery(q: Query): void;
|
|
173
|
+
/** @internal Called by {@link Query.destroy} to unregister a query and remove it from all entities. */
|
|
174
|
+
_removeQuery(q: Query): void;
|
|
175
|
+
/** @internal Iterate over all entities currently in the world. */
|
|
176
|
+
_forEachEntity(callback: (e: Entity) => void): void;
|
|
181
177
|
/**
|
|
182
178
|
* Create a new {@link System}, register it, and return it for configuration.
|
|
183
179
|
*
|
|
184
|
-
* This is the primary way to define systems:
|
|
185
|
-
*
|
|
186
180
|
* ```ts
|
|
187
181
|
* world.system("Render")
|
|
188
182
|
* .phase("update")
|
|
@@ -195,6 +189,57 @@ export declare class World {
|
|
|
195
189
|
* @returns The new `System` instance.
|
|
196
190
|
*/
|
|
197
191
|
system(name: string): System<[]>;
|
|
192
|
+
/**
|
|
193
|
+
* Create a standalone {@link Query}, register it, and return it for
|
|
194
|
+
* configuration.
|
|
195
|
+
*
|
|
196
|
+
* Unlike a {@link System}, a standalone query has no phase and no per-tick
|
|
197
|
+
* callbacks — it is a reactive, always-updated entity set that can be read
|
|
198
|
+
* at any time after {@link start}. Standalone queries can also be created
|
|
199
|
+
* after {@link start}; existing matched entities are backfilled immediately.
|
|
200
|
+
*
|
|
201
|
+
* ```ts
|
|
202
|
+
* const enemies = world.query("Enemies")
|
|
203
|
+
* .requires(Enemy, Health)
|
|
204
|
+
* .enter((e) => console.log("enemy spawned", e.eid));
|
|
205
|
+
*
|
|
206
|
+
* world.start();
|
|
207
|
+
* // enemies.entities is kept up-to-date automatically
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* @param name - A unique display name for the query.
|
|
211
|
+
* @returns The new `Query` instance.
|
|
212
|
+
*/
|
|
213
|
+
query(name: string): Query<[]>;
|
|
214
|
+
/**
|
|
215
|
+
* Create a non-reactive {@link Filter} that matches entities satisfying `q`.
|
|
216
|
+
*
|
|
217
|
+
* Unlike {@link query}, the returned filter holds no tracked entity set and
|
|
218
|
+
* registers nothing with the world. Each call to {@link Filter.forEach} walks
|
|
219
|
+
* all current world entities and invokes the callback for matching ones.
|
|
220
|
+
*
|
|
221
|
+
* Component classes guaranteed present on every matched entity are inferred
|
|
222
|
+
* automatically from the DSL where possible (plain arrays, `HAS`, `HAS_ONLY`,
|
|
223
|
+
* and `AND` of those forms). For cases the type extractor cannot see through
|
|
224
|
+
* (`OR`, `NOT`, `PARENT`, custom `EntityTestFunc`), pass a `_guaranteed`
|
|
225
|
+
* tuple as a type-level override:
|
|
226
|
+
*
|
|
227
|
+
* ```ts
|
|
228
|
+
* // Auto-deduced — pos and vel are non-nullable
|
|
229
|
+
* world.filter([Position, Velocity])
|
|
230
|
+
* .forEach([Position, Velocity], (e, [pos, vel]) => { ... });
|
|
231
|
+
*
|
|
232
|
+
* // Manual override for an opaque query
|
|
233
|
+
* world.filter(myTestFunc, [Position])
|
|
234
|
+
* .forEach([Position], (e, [pos]) => pos.x);
|
|
235
|
+
* ```
|
|
236
|
+
*
|
|
237
|
+
* @param q - A {@link QueryDSL} expression.
|
|
238
|
+
* @param _guaranteed - Optional type hint declaring which components are
|
|
239
|
+
* guaranteed present (not validated at runtime).
|
|
240
|
+
*/
|
|
241
|
+
filter<Q extends QueryDSL>(q: Q): Filter<ExtractRequired<Q>>;
|
|
242
|
+
filter<T extends (typeof Component)[]>(q: QueryDSL, _guaranteed: readonly [...T]): Filter<T>;
|
|
198
243
|
/**
|
|
199
244
|
* Prevent any further calls to {@link registerComponent}.
|
|
200
245
|
*
|
|
@@ -203,14 +248,14 @@ export declare class World {
|
|
|
203
248
|
*/
|
|
204
249
|
disableComponentRegistration(): void;
|
|
205
250
|
/**
|
|
206
|
-
* Freeze registration and prepare the world for running.
|
|
251
|
+
* Freeze component registration and prepare the world for running.
|
|
207
252
|
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
253
|
+
* Distributes all systems registered so far into their pipeline phases
|
|
254
|
+
* (defaulting to `"update"`) and logs the phase → system order to the
|
|
255
|
+
* console. Systems and queries can still be created after this call —
|
|
256
|
+
* standalone queries will immediately backfill existing matched entities.
|
|
211
257
|
*
|
|
212
|
-
* Call this once
|
|
213
|
-
* the first {@link runPhase} call.
|
|
258
|
+
* Call this once before the first {@link runPhase} call.
|
|
214
259
|
*/
|
|
215
260
|
start(): void;
|
|
216
261
|
private reindexSystems;
|
package/dist/world.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { ComponentMeta, } from "./component.js";
|
|
2
2
|
import { Entity } from "./entity.js";
|
|
3
|
+
import { Query } from "./query.js";
|
|
3
4
|
import { System } from "./system.js";
|
|
5
|
+
import { Filter } from "./filter.js";
|
|
4
6
|
import { ArrayMap } from "./util/array_map.js";
|
|
5
7
|
import { Phase } from "./phase.js";
|
|
6
8
|
const LOCAL_COMPONENT_MIN = 256;
|
|
7
9
|
/**
|
|
8
10
|
* The central ECS container.
|
|
9
11
|
*
|
|
10
|
-
* A `World` owns all entities, components, systems, and the update
|
|
11
|
-
* Typical lifecycle:
|
|
12
|
+
* A `World` owns all entities, components, systems, queries, and the update
|
|
13
|
+
* pipeline. Typical lifecycle:
|
|
12
14
|
*
|
|
13
15
|
* 1. **Register components** — call {@link registerComponent} (and optionally
|
|
14
16
|
* {@link registerComponentType}) for every component class.
|
|
15
|
-
* 2. **Register systems** — call {@link system}
|
|
16
|
-
* create and configure
|
|
17
|
-
* 3. **Start** — call {@link start} to freeze registration and
|
|
18
|
-
* into their phases.
|
|
17
|
+
* 2. **Register systems and queries** — call {@link system} and {@link query}
|
|
18
|
+
* to create and configure them.
|
|
19
|
+
* 3. **Start** — call {@link start} to freeze component registration and
|
|
20
|
+
* distribute systems into their phases.
|
|
19
21
|
* 4. **Run loop** — call {@link runPhase} once per frame for each phase.
|
|
20
22
|
*
|
|
21
23
|
* ```ts
|
|
@@ -40,14 +42,12 @@ export class World {
|
|
|
40
42
|
this.componentNameTypeMap = new Map();
|
|
41
43
|
this.archChangeQueue = [];
|
|
42
44
|
this.destroyedEntities = [];
|
|
43
|
-
this.
|
|
44
|
-
this.allSystems = [];
|
|
45
|
+
this.allQueries = [];
|
|
45
46
|
this.Class2Meta = new Map();
|
|
46
47
|
this.Type2Meta = new ArrayMap();
|
|
47
48
|
this.updatedComponents = [];
|
|
48
49
|
this.localComponentCounter = LOCAL_COMPONENT_MIN;
|
|
49
50
|
this.componentRegistrationDisabled = false;
|
|
50
|
-
this.systemRegistrationDisabled = false;
|
|
51
51
|
this.pipeline = new Map();
|
|
52
52
|
this.eidCounter = 0;
|
|
53
53
|
}
|
|
@@ -197,13 +197,13 @@ export class World {
|
|
|
197
197
|
}
|
|
198
198
|
updateArchetypes() {
|
|
199
199
|
if (this.archChangeQueue.length > 0) {
|
|
200
|
-
this.
|
|
200
|
+
this.allQueries.forEach((q) => {
|
|
201
201
|
this.archChangeQueue.forEach((e) => {
|
|
202
|
-
if (
|
|
203
|
-
e.
|
|
202
|
+
if (q.belongs(e)) {
|
|
203
|
+
e._addQuery(q);
|
|
204
204
|
}
|
|
205
205
|
else {
|
|
206
|
-
e.
|
|
206
|
+
e._removeQuery(q);
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
});
|
|
@@ -223,7 +223,7 @@ export class World {
|
|
|
223
223
|
c["dirty"] = false;
|
|
224
224
|
});
|
|
225
225
|
this.archChangeQueue.forEach((e) => {
|
|
226
|
-
e.
|
|
226
|
+
e._updateQueries();
|
|
227
227
|
e._archetypeChanged = false;
|
|
228
228
|
});
|
|
229
229
|
this.archChangeQueue.length = 0;
|
|
@@ -285,26 +285,24 @@ export class World {
|
|
|
285
285
|
registerComponentType(componentName, type) {
|
|
286
286
|
this.componentNameTypeMap.set(componentName, type);
|
|
287
287
|
}
|
|
288
|
-
/**
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
this.
|
|
288
|
+
/** @internal Called by the {@link Query} constructor to register itself. */
|
|
289
|
+
_addQuery(q) {
|
|
290
|
+
this.allQueries.push(q);
|
|
291
|
+
}
|
|
292
|
+
/** @internal Called by {@link Query.destroy} to unregister a query and remove it from all entities. */
|
|
293
|
+
_removeQuery(q) {
|
|
294
|
+
const idx = this.allQueries.indexOf(q);
|
|
295
|
+
if (idx !== -1)
|
|
296
|
+
this.allQueries.splice(idx, 1);
|
|
297
|
+
this.entities.forEach((e) => e._purgeQuery(q));
|
|
298
|
+
}
|
|
299
|
+
/** @internal Iterate over all entities currently in the world. */
|
|
300
|
+
_forEachEntity(callback) {
|
|
301
|
+
this.entities.forEach(callback);
|
|
302
302
|
}
|
|
303
303
|
/**
|
|
304
304
|
* Create a new {@link System}, register it, and return it for configuration.
|
|
305
305
|
*
|
|
306
|
-
* This is the primary way to define systems:
|
|
307
|
-
*
|
|
308
306
|
* ```ts
|
|
309
307
|
* world.system("Render")
|
|
310
308
|
* .phase("update")
|
|
@@ -317,9 +315,34 @@ export class World {
|
|
|
317
315
|
* @returns The new `System` instance.
|
|
318
316
|
*/
|
|
319
317
|
system(name) {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
318
|
+
return new System(name, this);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Create a standalone {@link Query}, register it, and return it for
|
|
322
|
+
* configuration.
|
|
323
|
+
*
|
|
324
|
+
* Unlike a {@link System}, a standalone query has no phase and no per-tick
|
|
325
|
+
* callbacks — it is a reactive, always-updated entity set that can be read
|
|
326
|
+
* at any time after {@link start}. Standalone queries can also be created
|
|
327
|
+
* after {@link start}; existing matched entities are backfilled immediately.
|
|
328
|
+
*
|
|
329
|
+
* ```ts
|
|
330
|
+
* const enemies = world.query("Enemies")
|
|
331
|
+
* .requires(Enemy, Health)
|
|
332
|
+
* .enter((e) => console.log("enemy spawned", e.eid));
|
|
333
|
+
*
|
|
334
|
+
* world.start();
|
|
335
|
+
* // enemies.entities is kept up-to-date automatically
|
|
336
|
+
* ```
|
|
337
|
+
*
|
|
338
|
+
* @param name - A unique display name for the query.
|
|
339
|
+
* @returns The new `Query` instance.
|
|
340
|
+
*/
|
|
341
|
+
query(name) {
|
|
342
|
+
return new Query(name, this);
|
|
343
|
+
}
|
|
344
|
+
filter(q, _guaranteed) {
|
|
345
|
+
return new Filter(this, q);
|
|
323
346
|
}
|
|
324
347
|
/**
|
|
325
348
|
* Prevent any further calls to {@link registerComponent}.
|
|
@@ -331,18 +354,17 @@ export class World {
|
|
|
331
354
|
this.componentRegistrationDisabled = true;
|
|
332
355
|
}
|
|
333
356
|
/**
|
|
334
|
-
* Freeze registration and prepare the world for running.
|
|
357
|
+
* Freeze component registration and prepare the world for running.
|
|
335
358
|
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
359
|
+
* Distributes all systems registered so far into their pipeline phases
|
|
360
|
+
* (defaulting to `"update"`) and logs the phase → system order to the
|
|
361
|
+
* console. Systems and queries can still be created after this call —
|
|
362
|
+
* standalone queries will immediately backfill existing matched entities.
|
|
339
363
|
*
|
|
340
|
-
* Call this once
|
|
341
|
-
* the first {@link runPhase} call.
|
|
364
|
+
* Call this once before the first {@link runPhase} call.
|
|
342
365
|
*/
|
|
343
366
|
start() {
|
|
344
367
|
this.componentRegistrationDisabled = true;
|
|
345
|
-
this.systemRegistrationDisabled = true;
|
|
346
368
|
this.reindexSystems();
|
|
347
369
|
}
|
|
348
370
|
reindexSystems() {
|
|
@@ -352,18 +374,17 @@ export class World {
|
|
|
352
374
|
this.pipeline.set(_defaultPhase.name, _defaultPhase);
|
|
353
375
|
}
|
|
354
376
|
const defaultPhase = _defaultPhase;
|
|
355
|
-
this.
|
|
356
|
-
|
|
377
|
+
this.allQueries.forEach((q) => {
|
|
378
|
+
if (!(q instanceof System))
|
|
379
|
+
return;
|
|
380
|
+
let phase = q._phase;
|
|
357
381
|
if (typeof phase === "string") {
|
|
358
382
|
phase = this.pipeline.get(phase);
|
|
359
383
|
}
|
|
360
384
|
phase = phase || defaultPhase;
|
|
361
|
-
phase.systems.push(
|
|
385
|
+
phase.systems.push(q);
|
|
362
386
|
});
|
|
363
|
-
this.pendingSystems.length = 0;
|
|
364
|
-
this.allSystems.length = 0;
|
|
365
387
|
this.pipeline.forEach((phase) => {
|
|
366
|
-
this.allSystems.push(...phase.systems);
|
|
367
388
|
console.log("Phase %s : %s", phase.name, phase.systems.map((s) => s.name).join(" -> "));
|
|
368
389
|
});
|
|
369
390
|
}
|
package/dist/world.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world.js","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,GAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAU,KAAK,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,KAAK;
|
|
1
|
+
{"version":3,"file":"world.js","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,GAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAU,KAAK,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,KAAK;IAchB;QAbQ,aAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC,CAAC,2BAA2B;QACjE,yBAAoB,GAAG,IAAI,GAAG,EAAkB,CAAC;QACjD,oBAAe,GAAa,EAAE,CAAC;QAC/B,sBAAiB,GAAa,EAAE,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