iris-ecs 0.0.9 → 0.0.10
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 +250 -61
- package/dist/archetype.d.ts +18 -1
- package/dist/archetype.d.ts.map +1 -1
- package/dist/archetype.js +60 -15
- package/dist/archetype.js.map +1 -1
- package/dist/component.d.ts +106 -7
- package/dist/component.d.ts.map +1 -1
- package/dist/component.js +86 -4
- package/dist/component.js.map +1 -1
- package/dist/directed-acyclic-graph.d.ts +123 -0
- package/dist/directed-acyclic-graph.d.ts.map +1 -0
- package/dist/directed-acyclic-graph.js +235 -0
- package/dist/directed-acyclic-graph.js.map +1 -0
- package/dist/entity.d.ts +18 -0
- package/dist/entity.d.ts.map +1 -1
- package/dist/entity.js +5 -15
- package/dist/entity.js.map +1 -1
- package/dist/error.d.ts +2 -2
- package/dist/error.js +2 -2
- package/dist/index.d.ts +8 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/name.d.ts +2 -2
- package/dist/name.d.ts.map +1 -1
- package/dist/name.js +3 -3
- package/dist/name.js.map +1 -1
- package/dist/query.d.ts +65 -5
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +34 -3
- package/dist/query.js.map +1 -1
- package/dist/resource.d.ts +62 -4
- package/dist/resource.d.ts.map +1 -1
- package/dist/resource.js +10 -1
- package/dist/resource.js.map +1 -1
- package/dist/scheduler.d.ts +119 -11
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +168 -68
- package/dist/scheduler.js.map +1 -1
- package/dist/schema.d.ts +97 -40
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +31 -69
- package/dist/schema.js.map +1 -1
- package/dist/world.d.ts +10 -1
- package/dist/world.d.ts.map +1 -1
- package/dist/world.js +3 -0
- package/dist/world.js.map +1 -1
- package/package.json +1 -1
package/dist/query.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FieldColumnsOf } from "./archetype.js";
|
|
2
|
+
import type { Component, EntityId, EntityWith, Pair, Relation } from "./encoding.js";
|
|
2
3
|
import type { FilterMeta } from "./filters.js";
|
|
3
4
|
import type { World } from "./world.js";
|
|
4
5
|
/**
|
|
5
6
|
* Phantom brand for carrying guaranteed-present component types on QueryMeta.
|
|
6
7
|
*/
|
|
7
8
|
declare const QUERY_COMPONENTS_BRAND: unique symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Phantom brand for carrying original query terms tuple on QueryMeta (covariant).
|
|
11
|
+
*/
|
|
12
|
+
declare const QUERY_TERMS_BRAND: unique symbol;
|
|
8
13
|
/**
|
|
9
14
|
* Query metadata for registry caching.
|
|
10
15
|
*
|
|
11
16
|
* Stores required and excluded components with reference to underlying filter.
|
|
12
17
|
*/
|
|
13
|
-
export type QueryMeta<C extends EntityId = EntityId> = {
|
|
18
|
+
export type QueryMeta<C extends EntityId = EntityId, T extends unknown[] = (EntityId | QueryModifier)[]> = {
|
|
14
19
|
/**
|
|
15
20
|
* Required components.
|
|
16
21
|
*/
|
|
@@ -39,6 +44,10 @@ export type QueryMeta<C extends EntityId = EntityId> = {
|
|
|
39
44
|
* Phantom field carrying guaranteed-present component types via contravariance.
|
|
40
45
|
*/
|
|
41
46
|
readonly [QUERY_COMPONENTS_BRAND]: (c: C) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Phantom field carrying original query terms tuple (covariant).
|
|
49
|
+
*/
|
|
50
|
+
readonly [QUERY_TERMS_BRAND]?: T;
|
|
42
51
|
};
|
|
43
52
|
export type ModifierType = "not" | "added" | "changed";
|
|
44
53
|
export type NotModifier<C extends EntityId = EntityId> = {
|
|
@@ -94,6 +103,13 @@ export declare function changed<C extends EntityId>(componentId: C): ChangedModi
|
|
|
94
103
|
* Extract union of guaranteed-present component IDs from query terms tuple.
|
|
95
104
|
*/
|
|
96
105
|
export type ExtractIncluded<T extends unknown[]> = T extends [infer Head, ...infer Tail] ? Head extends NotModifier ? ExtractIncluded<Tail> : Head extends AddedModifier<infer C> ? C | ExtractIncluded<Tail> : Head extends ChangedModifier<infer C> ? C | ExtractIncluded<Tail> : Head extends EntityId ? Head | ExtractIncluded<Tail> : ExtractIncluded<Tail> : never;
|
|
106
|
+
/**
|
|
107
|
+
* Map a query terms tuple to a tuple of field column types.
|
|
108
|
+
*
|
|
109
|
+
* Data-bearing terms (Components, Pairs with schema) produce a `FieldColumnsOf` entry.
|
|
110
|
+
* Non-data terms (Tags, data-less Pairs, NotModifiers) are skipped.
|
|
111
|
+
*/
|
|
112
|
+
export type ColumnsTuple<T extends unknown[]> = T extends [infer Head, ...infer Tail] ? Head extends NotModifier ? ColumnsTuple<Tail> : Head extends Component<infer S> ? [FieldColumnsOf<S>, ...ColumnsTuple<Tail>] : Head extends Pair<infer R> ? R extends Relation<infer S> ? keyof S extends never ? ColumnsTuple<Tail> : [FieldColumnsOf<S>, ...ColumnsTuple<Tail>] : ColumnsTuple<Tail> : ColumnsTuple<Tail> : [];
|
|
97
113
|
/**
|
|
98
114
|
* Hash query terms to unique string ID for cache lookup.
|
|
99
115
|
*
|
|
@@ -118,9 +134,9 @@ export declare function hashQuery(include: EntityId[], exclude: EntityId[], adde
|
|
|
118
134
|
* @throws {InvalidArgument} If no included components (query must match something)
|
|
119
135
|
*
|
|
120
136
|
* @example
|
|
121
|
-
* const query = cacheQuery(world, Position, Velocity, not(Dead));
|
|
137
|
+
* const query = cacheQuery(world, [Position, Velocity, not(Dead)]);
|
|
122
138
|
*/
|
|
123
|
-
export declare function ensureQuery<T extends (EntityId | QueryModifier)[]>(world: World,
|
|
139
|
+
export declare function ensureQuery<T extends (EntityId | QueryModifier)[]>(world: World, terms: [...T]): QueryMeta<ExtractIncluded<T>, T>;
|
|
124
140
|
/**
|
|
125
141
|
* Iterate entities matching components and modifiers via callback.
|
|
126
142
|
*
|
|
@@ -139,7 +155,7 @@ export declare function ensureQuery<T extends (EntityId | QueryModifier)[]>(worl
|
|
|
139
155
|
* });
|
|
140
156
|
*
|
|
141
157
|
* // With pre-built query
|
|
142
|
-
* const q = cacheQuery(world, Position, Velocity);
|
|
158
|
+
* const q = cacheQuery(world, [Position, Velocity]);
|
|
143
159
|
* queryEntities(world, q, (entity) => { ... });
|
|
144
160
|
*
|
|
145
161
|
* // Early exit
|
|
@@ -187,5 +203,49 @@ export declare function queryFirstEntity<C extends EntityId>(world: World, query
|
|
|
187
203
|
*/
|
|
188
204
|
export declare function collectEntities<T extends (EntityId | QueryModifier)[]>(world: World, terms: [...T]): EntityWith<ExtractIncluded<T>>[];
|
|
189
205
|
export declare function collectEntities<C extends EntityId>(world: World, query: QueryMeta<C>): EntityWith<C>[];
|
|
206
|
+
/**
|
|
207
|
+
* Iterate matching archetypes with direct column access.
|
|
208
|
+
*
|
|
209
|
+
* Low-level query API that exposes raw storage arrays for high-performance iteration.
|
|
210
|
+
* The callback fires once per matching archetype with the archetype's live entities
|
|
211
|
+
* array and column parameters for each data-bearing term.
|
|
212
|
+
*
|
|
213
|
+
* Only `not()` modifiers are supported. `added()` and `changed()` are rejected —
|
|
214
|
+
* use `queryEntities` for change detection.
|
|
215
|
+
*
|
|
216
|
+
* The `entities` array is the archetype's live backing store. If mutating
|
|
217
|
+
* (destroying entities, adding/removing components) during iteration,
|
|
218
|
+
* iterate backward to avoid skipping entities due to swap-and-pop.
|
|
219
|
+
*
|
|
220
|
+
* @param world - World instance
|
|
221
|
+
* @param termsOrQuery - Array of component IDs and not() modifiers, or pre-built QueryMeta
|
|
222
|
+
* @param callback - Called for each matching archetype. Return `false` to stop iteration
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* // Direct column access for high-performance iteration
|
|
227
|
+
* queryColumns(world, [Position, Velocity, not(Dead)], (entities, [pos, vel]) => {
|
|
228
|
+
* for (let i = 0; i < entities.length; i++) {
|
|
229
|
+
* pos.x[i] += vel.x[i]!;
|
|
230
|
+
* pos.y[i] += vel.y[i]!;
|
|
231
|
+
* }
|
|
232
|
+
* });
|
|
233
|
+
*
|
|
234
|
+
* // Pre-cached query
|
|
235
|
+
* const q = cacheQuery(world, [Position, Velocity, not(Dead)]);
|
|
236
|
+
* queryColumns(world, q, (entities, [pos, vel]) => { ... });
|
|
237
|
+
*
|
|
238
|
+
* // Mutation-safe backward iteration
|
|
239
|
+
* queryColumns(world, [Position, Health], (entities, [pos, health]) => {
|
|
240
|
+
* for (let i = entities.length - 1; i >= 0; i--) {
|
|
241
|
+
* if (health.hp[i]! <= 0) {
|
|
242
|
+
* destroyEntity(world, entities[i]!);
|
|
243
|
+
* }
|
|
244
|
+
* }
|
|
245
|
+
* });
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
export declare function queryColumns<T extends (EntityId | NotModifier)[]>(world: World, terms: [...T], callback: (entities: EntityId[], columns: ColumnsTuple<T>) => unknown): void;
|
|
249
|
+
export declare function queryColumns<C extends EntityId, T extends unknown[]>(world: World, query: QueryMeta<C, T>, callback: (entities: EntityId[], columns: ColumnsTuple<T>) => unknown): void;
|
|
190
250
|
export {};
|
|
191
251
|
//# sourceMappingURL=query.d.ts.map
|
package/dist/query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,KAAK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;AAER,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,OAAO,EAAE,EAClE,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EACtB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,OAAO,GACpE,IAAI,CAAC"}
|
package/dist/query.js
CHANGED
|
@@ -82,9 +82,9 @@ export function hashQuery(include, exclude, added, changed) {
|
|
|
82
82
|
* @throws {InvalidArgument} If no included components (query must match something)
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
|
-
* const query = cacheQuery(world, Position, Velocity, not(Dead));
|
|
85
|
+
* const query = cacheQuery(world, [Position, Velocity, not(Dead)]);
|
|
86
86
|
*/
|
|
87
|
-
export function ensureQuery(world,
|
|
87
|
+
export function ensureQuery(world, terms) {
|
|
88
88
|
const include = [];
|
|
89
89
|
const exclude = [];
|
|
90
90
|
const added = [];
|
|
@@ -212,7 +212,7 @@ function resolveQuery(world, termsOrQuery) {
|
|
|
212
212
|
if (!Array.isArray(termsOrQuery)) {
|
|
213
213
|
return termsOrQuery;
|
|
214
214
|
}
|
|
215
|
-
return ensureQuery(world,
|
|
215
|
+
return ensureQuery(world, termsOrQuery);
|
|
216
216
|
}
|
|
217
217
|
export function queryEntities(world, termsOrQuery,
|
|
218
218
|
// biome-ignore lint/suspicious/noExplicitAny: implementation overload must be wider than public overloads
|
|
@@ -234,4 +234,35 @@ export function collectEntities(world, termsOrQuery) {
|
|
|
234
234
|
});
|
|
235
235
|
return result;
|
|
236
236
|
}
|
|
237
|
+
export function queryColumns(world, termsOrQuery,
|
|
238
|
+
// biome-ignore lint/suspicious/noExplicitAny: implementation overload must be wider than public overloads
|
|
239
|
+
callback) {
|
|
240
|
+
const queryMeta = resolveQuery(world, termsOrQuery);
|
|
241
|
+
assert(queryMeta.added.length === 0 && queryMeta.changed.length === 0, InvalidArgument, {
|
|
242
|
+
expected: "queryColumns does not support added() or changed() modifiers",
|
|
243
|
+
});
|
|
244
|
+
const archetypes = queryMeta.filter.archetypes;
|
|
245
|
+
const include = queryMeta.include;
|
|
246
|
+
// Single allocation reused across all archetype iterations
|
|
247
|
+
const columns = [];
|
|
248
|
+
for (let a = 0; a < archetypes.length; a++) {
|
|
249
|
+
const archetype = archetypes[a];
|
|
250
|
+
if (archetype.entities.length === 0) {
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
// Resolve columns for each included term. Tags and data-less pairs have
|
|
254
|
+
// no entry in archetype.columns, so they are naturally skipped, and only
|
|
255
|
+
// data-bearing components and pairs produce callback parameters
|
|
256
|
+
columns.length = 0;
|
|
257
|
+
for (let t = 0; t < include.length; t++) {
|
|
258
|
+
const cols = archetype.columns.get(include[t]);
|
|
259
|
+
if (cols) {
|
|
260
|
+
columns.push(cols);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (callback(archetype.entities, columns) === false) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
237
268
|
//# sourceMappingURL=query.js.map
|
package/dist/query.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA0E5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,CAAqB,WAAc;IACpD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,KAAK,CAAqB,WAAc;IACtD,OAAO,EAAE,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Q,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpC,SAAS;QACX,CAAC;QAED,wEAAwE;QACxE,yEAAyE;QACzE,gEAAgE;QAChE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,CAAC;YAEhD,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,KAAK,EAAE,CAAC;YACpD,OAAO;QACT,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/resource.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Component, EntityId, EntityWith } from "./encoding.js";
|
|
2
|
-
import type { InferSchema, InferSchemaRecord, SchemaRecord } from "./schema.js";
|
|
2
|
+
import type { InferSchema, InferSchemaRecord, ScalarFields, SchemaRecord, TypedArrayInstance, VectorFields } from "./schema.js";
|
|
3
3
|
import type { World } from "./world.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds a global resource (singleton) to the world using the component-on-self pattern.
|
|
@@ -64,8 +64,8 @@ export declare function hasResource(world: World, component: EntityId): boolean;
|
|
|
64
64
|
* const current = getResourceValue(world, Time, "current"); // number | undefined
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
export declare function getResourceValue<S extends SchemaRecord, N extends string, K extends
|
|
68
|
-
export declare function getResourceValue<S extends SchemaRecord, K extends
|
|
67
|
+
export declare function getResourceValue<S extends SchemaRecord, N extends string, K extends ScalarFields<S>>(world: World, component: Component<S, N> & EntityWith<Component<S, N>>, key: K): InferSchema<S[K]>;
|
|
68
|
+
export declare function getResourceValue<S extends SchemaRecord, K extends ScalarFields<S>>(world: World, component: Component<S>, key: K): InferSchema<S[K]> | undefined;
|
|
69
69
|
/**
|
|
70
70
|
* Sets the value of a specific field on a global resource.
|
|
71
71
|
*
|
|
@@ -80,5 +80,63 @@ export declare function getResourceValue<S extends SchemaRecord, K extends keyof
|
|
|
80
80
|
* setResourceValue(world, Time, "delta", 0.033);
|
|
81
81
|
* ```
|
|
82
82
|
*/
|
|
83
|
-
export declare function setResourceValue<S extends SchemaRecord, K extends
|
|
83
|
+
export declare function setResourceValue<S extends SchemaRecord, K extends ScalarFields<S>>(world: World, component: Component<S>, key: K, value: InferSchema<S[K]>): void;
|
|
84
|
+
/**
|
|
85
|
+
* Gets the value of a vector field on a global resource as a tuple copy.
|
|
86
|
+
*
|
|
87
|
+
* Returns a new array containing the vector elements. Mutations to the
|
|
88
|
+
* returned array do not affect the stored data.
|
|
89
|
+
*
|
|
90
|
+
* @param world - World instance
|
|
91
|
+
* @param component - Component definition (narrowed via hasResource for non-null access)
|
|
92
|
+
* @param key - Vector field name
|
|
93
|
+
* @returns Tuple copy of vector value, or undefined if not present
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const Gravity = defineComponent("Gravity", { value: Type.f32(3) });
|
|
98
|
+
* addResource(world, Gravity, { value: [0, -9.81, 0] });
|
|
99
|
+
* const g = getResourceVectorValue(world, Gravity, "value"); // [number, number, number]
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function getResourceVectorValue<S extends SchemaRecord, N extends string, K extends VectorFields<S>>(world: World, component: Component<S, N> & EntityWith<Component<S, N>>, key: K): InferSchema<S[K]>;
|
|
103
|
+
export declare function getResourceVectorValue<S extends SchemaRecord, K extends VectorFields<S>>(world: World, component: Component<S>, key: K): InferSchema<S[K]> | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Sets the value of a vector field on a global resource from a tuple.
|
|
106
|
+
*
|
|
107
|
+
* Copies the tuple elements into the interleaved column. Updates change
|
|
108
|
+
* detection tick and fires componentChanged observer.
|
|
109
|
+
*
|
|
110
|
+
* @param world - World instance
|
|
111
|
+
* @param component - Component definition
|
|
112
|
+
* @param key - Vector field name
|
|
113
|
+
* @param value - Tuple of values to set
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* setResourceVectorValue(world, Gravity, "value", [0, -20, 0]);
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare function setResourceVectorValue<S extends SchemaRecord, N extends string, K extends VectorFields<S>>(world: World, component: Component<S, N> & EntityWith<Component<S, N>>, key: K, value: InferSchema<S[K]>): void;
|
|
121
|
+
export declare function setResourceVectorValue<S extends SchemaRecord, K extends VectorFields<S>>(world: World, component: Component<S>, key: K, value: InferSchema<S[K]>): void;
|
|
122
|
+
/**
|
|
123
|
+
* Gets a zero-copy typed array view into a vector field on a global resource.
|
|
124
|
+
*
|
|
125
|
+
* Returns a `subarray` view that shares the underlying buffer. Mutations
|
|
126
|
+
* to the view directly modify the stored data.
|
|
127
|
+
*
|
|
128
|
+
* @param world - World instance
|
|
129
|
+
* @param component - Component definition (narrowed via hasResource for non-null access)
|
|
130
|
+
* @param key - Vector field name
|
|
131
|
+
* @returns Typed array view into the vector, or undefined if not present
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const Gravity = defineComponent("Gravity", { value: Type.f32(3) });
|
|
136
|
+
* const view = getResourceVectorView(world, Gravity, "value"); // Float32Array
|
|
137
|
+
* view[1] = -20; // direct mutation, no copy
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export declare function getResourceVectorView<S extends SchemaRecord, N extends string, K extends VectorFields<S>>(world: World, component: Component<S, N> & EntityWith<Component<S, N>>, key: K): TypedArrayInstance;
|
|
141
|
+
export declare function getResourceVectorView<S extends SchemaRecord, K extends VectorFields<S>>(world: World, component: Component<S>, key: K): TypedArrayInstance | undefined;
|
|
84
142
|
//# sourceMappingURL=resource.d.ts.map
|
package/dist/resource.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMxC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,YAAY,EAChD,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,GACzB,IAAI,CAEN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,GAAG,IAAI,CAEtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,MAAM,EAClE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,SAAS,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9D,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,GAAG,OAAO,CAAC;AAMxE;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qB,CAAC,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EACrF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EACvB,GAAG,EAAE,CAAC,GACL,kBAAkB,GAAG,SAAS,CAAC"}
|
package/dist/resource.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addComponent, getComponentValue, hasComponent, removeComponent, setComponentValue } from "./component.js";
|
|
1
|
+
import { addComponent, getComponentValue, getComponentVectorValue, getComponentVectorView, hasComponent, removeComponent, setComponentValue, setComponentVectorValue, } from "./component.js";
|
|
2
2
|
// ============================================================================
|
|
3
3
|
// Resource Operations
|
|
4
4
|
// ============================================================================
|
|
@@ -59,4 +59,13 @@ export function getResourceValue(world, component, key) {
|
|
|
59
59
|
export function setResourceValue(world, component, key, value) {
|
|
60
60
|
setComponentValue(world, component, component, key, value);
|
|
61
61
|
}
|
|
62
|
+
export function getResourceVectorValue(world, component, key) {
|
|
63
|
+
return getComponentVectorValue(world, component, component, key);
|
|
64
|
+
}
|
|
65
|
+
export function setResourceVectorValue(world, component, key, value) {
|
|
66
|
+
setComponentVectorValue(world, component, component, key, value);
|
|
67
|
+
}
|
|
68
|
+
export function getResourceVectorView(world, component, key) {
|
|
69
|
+
return getComponentVectorView(world, component, component, key);
|
|
70
|
+
}
|
|
62
71
|
//# sourceMappingURL=resource.js.map
|
package/dist/resource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;A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ACZ,SAAuB,EACvB,GAAM;IAEN,OAAO,sBAAsB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/scheduler.d.ts
CHANGED
|
@@ -64,6 +64,60 @@ export declare const PostUpdate: ScheduleLabel;
|
|
|
64
64
|
* Last schedule in the main loop. Runs every frame after PostUpdate.
|
|
65
65
|
*/
|
|
66
66
|
export declare const Last: ScheduleLabel;
|
|
67
|
+
/**
|
|
68
|
+
* System set label brand for nominal typing.
|
|
69
|
+
*/
|
|
70
|
+
declare const SYSTEM_SET_LABEL_BRAND: unique symbol;
|
|
71
|
+
/**
|
|
72
|
+
* System set label (branded string).
|
|
73
|
+
*
|
|
74
|
+
* Identifies a system set for group-level ordering.
|
|
75
|
+
*/
|
|
76
|
+
export type SystemSetLabel = string & {
|
|
77
|
+
[SYSTEM_SET_LABEL_BRAND]: true;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Reference to a system or system set in ordering constraints.
|
|
81
|
+
*/
|
|
82
|
+
export type SystemReference = SystemFactory | SystemSetLabel | string;
|
|
83
|
+
/**
|
|
84
|
+
* Options for system set registration.
|
|
85
|
+
*/
|
|
86
|
+
export type SystemSetOptions = {
|
|
87
|
+
/**
|
|
88
|
+
* Schedule this set belongs to. Defaults to Update.
|
|
89
|
+
*/
|
|
90
|
+
schedule?: ScheduleLabel;
|
|
91
|
+
/**
|
|
92
|
+
* All systems in this set run before these systems or sets.
|
|
93
|
+
*/
|
|
94
|
+
before?: SystemReference | SystemReference[];
|
|
95
|
+
/**
|
|
96
|
+
* All systems in this set run after these systems or sets.
|
|
97
|
+
*/
|
|
98
|
+
after?: SystemReference | SystemReference[];
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* System set metadata stored in registry.
|
|
102
|
+
*/
|
|
103
|
+
export type SystemSetMeta = {
|
|
104
|
+
/**
|
|
105
|
+
* Schedule this set belongs to.
|
|
106
|
+
*/
|
|
107
|
+
schedule: ScheduleLabel;
|
|
108
|
+
/**
|
|
109
|
+
* Systems or sets this set must execute before.
|
|
110
|
+
*/
|
|
111
|
+
before: string[];
|
|
112
|
+
/**
|
|
113
|
+
* Systems or sets this set must execute after.
|
|
114
|
+
*/
|
|
115
|
+
after: string[];
|
|
116
|
+
/**
|
|
117
|
+
* System names that belong to this set (populated by addSystem calls).
|
|
118
|
+
*/
|
|
119
|
+
systems: string[];
|
|
120
|
+
};
|
|
67
121
|
/**
|
|
68
122
|
* System function signature.
|
|
69
123
|
*
|
|
@@ -92,26 +146,41 @@ export type SystemFactory = {
|
|
|
92
146
|
readonly init: (world: World) => SystemTick;
|
|
93
147
|
};
|
|
94
148
|
/**
|
|
95
|
-
*
|
|
149
|
+
* Shared options for system registration.
|
|
96
150
|
*/
|
|
97
|
-
|
|
151
|
+
type SystemOptionsBase = {
|
|
98
152
|
/**
|
|
99
153
|
* Custom name (overrides function.name). Required for anonymous functions.
|
|
100
154
|
*/
|
|
101
155
|
name?: string;
|
|
102
156
|
/**
|
|
103
|
-
*
|
|
157
|
+
* Run before these systems or sets (within same schedule).
|
|
104
158
|
*/
|
|
105
|
-
|
|
159
|
+
before?: SystemReference | SystemReference[];
|
|
106
160
|
/**
|
|
107
|
-
* Run
|
|
161
|
+
* Run after these systems or sets (within same schedule).
|
|
108
162
|
*/
|
|
109
|
-
|
|
163
|
+
after?: SystemReference | SystemReference[];
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Options for system registration.
|
|
167
|
+
*
|
|
168
|
+
* Exactly one of `schedule` or `set` may be provided. When `set` is given,
|
|
169
|
+
* the system inherits the set's schedule. When neither is given, the system
|
|
170
|
+
* defaults to the Update schedule.
|
|
171
|
+
*/
|
|
172
|
+
export type SystemOptions = SystemOptionsBase & ({
|
|
173
|
+
/** Schedule this system belongs to. Defaults to Update. */
|
|
174
|
+
schedule?: ScheduleLabel;
|
|
175
|
+
set?: never;
|
|
176
|
+
} | {
|
|
177
|
+
schedule?: never;
|
|
110
178
|
/**
|
|
111
|
-
*
|
|
179
|
+
* System set this system belongs to. The set must be registered first
|
|
180
|
+
* via `addSystemSet()`. The set's schedule applies to this system.
|
|
112
181
|
*/
|
|
113
|
-
|
|
114
|
-
};
|
|
182
|
+
set?: SystemSetLabel;
|
|
183
|
+
});
|
|
115
184
|
/**
|
|
116
185
|
* System metadata stored in registry.
|
|
117
186
|
*/
|
|
@@ -136,7 +205,46 @@ export type SystemMeta = {
|
|
|
136
205
|
* Systems this one must execute after (these run before this system).
|
|
137
206
|
*/
|
|
138
207
|
after: string[];
|
|
208
|
+
/**
|
|
209
|
+
* System set this system belongs to, if any.
|
|
210
|
+
*/
|
|
211
|
+
set?: SystemSetLabel;
|
|
139
212
|
};
|
|
213
|
+
/**
|
|
214
|
+
* Define a system set label.
|
|
215
|
+
*
|
|
216
|
+
* System sets are named groups for group-level ordering. Define the label
|
|
217
|
+
* first, then register it in a world via `addSystemSet()`.
|
|
218
|
+
*
|
|
219
|
+
* @param name - Set name (must be unique when registered)
|
|
220
|
+
* @returns System set label
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* const PhysicsSystems = defineSystemSet("PhysicsSystems");
|
|
225
|
+
* addSystemSet(world, PhysicsSystems, { before: RenderSystems });
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
export declare function defineSystemSet(name: string): SystemSetLabel;
|
|
229
|
+
/**
|
|
230
|
+
* Register a system set in the world with optional ordering constraints.
|
|
231
|
+
*
|
|
232
|
+
* Must be called before any `addSystem()` call that references this set
|
|
233
|
+
* via the `set` option.
|
|
234
|
+
*
|
|
235
|
+
* @param world - World instance
|
|
236
|
+
* @param set - System set label from `defineSystemSet()`
|
|
237
|
+
* @param options - Registration options (schedule, before, after)
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* const PhysicsSystems = defineSystemSet("PhysicsSystems");
|
|
242
|
+
* const RenderSystems = defineSystemSet("RenderSystems");
|
|
243
|
+
* addSystemSet(world, PhysicsSystems, { schedule: Update, before: RenderSystems });
|
|
244
|
+
* addSystemSet(world, RenderSystems, { schedule: Update });
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
export declare function addSystemSet(world: World, set: SystemSetLabel, options?: SystemSetOptions): void;
|
|
140
248
|
/**
|
|
141
249
|
* Registers a system in the world for later scheduling.
|
|
142
250
|
*
|
|
@@ -151,7 +259,7 @@ export type SystemMeta = {
|
|
|
151
259
|
* @example
|
|
152
260
|
* ```typescript
|
|
153
261
|
* addSystem(world, physicsSystem);
|
|
154
|
-
* addSystem(world, renderSystem, { schedule: PostUpdate, after:
|
|
262
|
+
* addSystem(world, renderSystem, { schedule: PostUpdate, after: physicsSystem });
|
|
155
263
|
* addSystem(world, movementFactory); // SystemFactory from defineSystem()
|
|
156
264
|
* ```
|
|
157
265
|
*/
|
|
@@ -175,7 +283,7 @@ export declare function addSystem(world: World, system: SystemRunner | SystemFac
|
|
|
175
283
|
* ```typescript
|
|
176
284
|
* const movementSystem = defineSystem("movementSystem", (world) => {
|
|
177
285
|
* // Init: runs once at addSystem() time
|
|
178
|
-
* const movers = cacheQuery(world, Position, Velocity);
|
|
286
|
+
* const movers = cacheQuery(world, [Position, Velocity]);
|
|
179
287
|
*
|
|
180
288
|
* // Tick: runs every frame
|
|
181
289
|
* return () => {
|
package/dist/scheduler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../src/scheduler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../src/scheduler.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAMxC;;GAEG;AACH,OAAO,CAAC,MAAM,oBAAoB,EAAE,OAAO,MAAM,CAAC;AAElD;;;;;GAKG;AACH,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