iris-ecs 0.0.1
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/LICENSE +21 -0
- package/README.md +721 -0
- package/dist/actions.d.ts +43 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +35 -0
- package/dist/actions.js.map +1 -0
- package/dist/archetype.d.ts +194 -0
- package/dist/archetype.d.ts.map +1 -0
- package/dist/archetype.js +412 -0
- package/dist/archetype.js.map +1 -0
- package/dist/component.d.ts +89 -0
- package/dist/component.d.ts.map +1 -0
- package/dist/component.js +237 -0
- package/dist/component.js.map +1 -0
- package/dist/encoding.d.ts +204 -0
- package/dist/encoding.d.ts.map +1 -0
- package/dist/encoding.js +215 -0
- package/dist/encoding.js.map +1 -0
- package/dist/entity.d.ts +129 -0
- package/dist/entity.d.ts.map +1 -0
- package/dist/entity.js +243 -0
- package/dist/entity.js.map +1 -0
- package/dist/event.d.ts +237 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +293 -0
- package/dist/event.js.map +1 -0
- package/dist/filters.d.ts +121 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +202 -0
- package/dist/filters.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/name.d.ts +70 -0
- package/dist/name.d.ts.map +1 -0
- package/dist/name.js +172 -0
- package/dist/name.js.map +1 -0
- package/dist/observer.d.ts +83 -0
- package/dist/observer.d.ts.map +1 -0
- package/dist/observer.js +62 -0
- package/dist/observer.js.map +1 -0
- package/dist/query.d.ts +198 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +299 -0
- package/dist/query.js.map +1 -0
- package/dist/registry.d.ts +118 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +112 -0
- package/dist/registry.js.map +1 -0
- package/dist/relation.d.ts +60 -0
- package/dist/relation.d.ts.map +1 -0
- package/dist/relation.js +171 -0
- package/dist/relation.js.map +1 -0
- package/dist/removal.d.ts +27 -0
- package/dist/removal.d.ts.map +1 -0
- package/dist/removal.js +66 -0
- package/dist/removal.js.map +1 -0
- package/dist/resource.d.ts +78 -0
- package/dist/resource.d.ts.map +1 -0
- package/dist/resource.js +86 -0
- package/dist/resource.js.map +1 -0
- package/dist/scheduler.d.ts +106 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +204 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/schema.d.ts +117 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +113 -0
- package/dist/schema.js.map +1 -0
- package/dist/world.d.ts +172 -0
- package/dist/world.d.ts.map +1 -0
- package/dist/world.js +127 -0
- package/dist/world.js.map +1 -0
- package/package.json +52 -0
package/dist/world.d.ts
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { ActionInitializer, Actions } from "./actions.js";
|
|
2
|
+
import type { Archetype } from "./archetype.js";
|
|
3
|
+
import type { Component, EntityId, Relation, Tag } from "./encoding.js";
|
|
4
|
+
import type { EntityMeta } from "./entity.js";
|
|
5
|
+
import type { EventId, EventQueueMeta } from "./event.js";
|
|
6
|
+
import type { FilterMeta } from "./filters.js";
|
|
7
|
+
import type { EventType, ObserverMeta } from "./observer.js";
|
|
8
|
+
import type { QueryMeta } from "./query.js";
|
|
9
|
+
import type { ComponentMeta } from "./registry.js";
|
|
10
|
+
import type { ScheduleId, SystemMeta } from "./scheduler.js";
|
|
11
|
+
/**
|
|
12
|
+
* World instance.
|
|
13
|
+
*
|
|
14
|
+
* Contains entity registry, archetype index, filter registry, query registry,
|
|
15
|
+
* observer system, system registry, schedule registry, and execution state.
|
|
16
|
+
*/
|
|
17
|
+
export type World = {
|
|
18
|
+
/**
|
|
19
|
+
* Entity registry (direct Map-based tracking).
|
|
20
|
+
*/
|
|
21
|
+
entities: {
|
|
22
|
+
/**
|
|
23
|
+
* Entity metadata lookup (entity ID -> metadata).
|
|
24
|
+
*/
|
|
25
|
+
byId: Map<EntityId, EntityMeta>;
|
|
26
|
+
/**
|
|
27
|
+
* Freelist of dead entity raw IDs for recycling.
|
|
28
|
+
*/
|
|
29
|
+
freeIds: number[];
|
|
30
|
+
/**
|
|
31
|
+
* Next raw ID to allocate.
|
|
32
|
+
*/
|
|
33
|
+
nextId: number;
|
|
34
|
+
/**
|
|
35
|
+
* Generation lookup for pair target reconstruction (rawId -> generation).
|
|
36
|
+
*/
|
|
37
|
+
generations: Map<number, number>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Component registry
|
|
41
|
+
*/
|
|
42
|
+
components: {
|
|
43
|
+
/**
|
|
44
|
+
* Component metadata lookup (component ID -> metadata).
|
|
45
|
+
*/
|
|
46
|
+
byId: Map<Tag | Component | Relation, ComponentMeta>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Archetype registry and transition graph.
|
|
50
|
+
*/
|
|
51
|
+
archetypes: {
|
|
52
|
+
/**
|
|
53
|
+
* Root archetype (empty - no components).
|
|
54
|
+
*/
|
|
55
|
+
root: Archetype;
|
|
56
|
+
/**
|
|
57
|
+
* Archetype lookup by hash key (hash -> archetype).
|
|
58
|
+
*/
|
|
59
|
+
byId: Map<string, Archetype>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Filter registry for query caching.
|
|
63
|
+
*/
|
|
64
|
+
filters: {
|
|
65
|
+
/**
|
|
66
|
+
* Filter metadata lookup (filter hash -> metadata).
|
|
67
|
+
*/
|
|
68
|
+
byId: Map<string, FilterMeta>;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Query registry for metadata caching.
|
|
72
|
+
*/
|
|
73
|
+
queries: {
|
|
74
|
+
/**
|
|
75
|
+
* Query metadata lookup (query hash -> metadata).
|
|
76
|
+
*/
|
|
77
|
+
byId: Map<string, QueryMeta>;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Observer system for lifecycle events.
|
|
81
|
+
*/
|
|
82
|
+
observers: {
|
|
83
|
+
[K in EventType]: ObserverMeta<K>;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* System registry.
|
|
87
|
+
*/
|
|
88
|
+
systems: {
|
|
89
|
+
/**
|
|
90
|
+
* System metadata by name.
|
|
91
|
+
*/
|
|
92
|
+
byId: Map<string, SystemMeta>;
|
|
93
|
+
/**
|
|
94
|
+
* Next registration index for stable ordering.
|
|
95
|
+
*/
|
|
96
|
+
nextIndex: number;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Schedule registry.
|
|
100
|
+
*/
|
|
101
|
+
schedules: {
|
|
102
|
+
/**
|
|
103
|
+
* Built schedules (schedule ID -> sorted system IDs).
|
|
104
|
+
*/
|
|
105
|
+
byId: Map<ScheduleId, string[]>;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Current execution state.
|
|
109
|
+
*/
|
|
110
|
+
execution: {
|
|
111
|
+
/**
|
|
112
|
+
* Active schedule ID (null if not executing).
|
|
113
|
+
*/
|
|
114
|
+
scheduleId: ScheduleId | null;
|
|
115
|
+
/**
|
|
116
|
+
* Currently executing system ID.
|
|
117
|
+
*/
|
|
118
|
+
systemId: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* Execution tick counter.
|
|
121
|
+
*/
|
|
122
|
+
tick: number;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Event queue registry.
|
|
126
|
+
*/
|
|
127
|
+
events: {
|
|
128
|
+
/**
|
|
129
|
+
* Event queue metadata lookup (event ID -> queue metadata).
|
|
130
|
+
*/
|
|
131
|
+
byId: Map<EventId, EventQueueMeta>;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Actions registry for cached world-bound action getters.
|
|
135
|
+
*/
|
|
136
|
+
actions: {
|
|
137
|
+
/**
|
|
138
|
+
* Actions lookup by initializer function.
|
|
139
|
+
*/
|
|
140
|
+
byInitializer: Map<ActionInitializer<Actions>, Actions>;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Creates a new ECS world with empty entity registry and root archetype.
|
|
145
|
+
*
|
|
146
|
+
* @returns Initialized world instance ready for use
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* const world = createWorld();
|
|
151
|
+
* const entity = spawnEntity(world);
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
export declare function createWorld(): World;
|
|
155
|
+
/**
|
|
156
|
+
* Resets world to initial state, clearing all entities and caches.
|
|
157
|
+
*
|
|
158
|
+
* Does NOT fire per-entity lifecycle events (entityDestroyed, componentRemoved).
|
|
159
|
+
* For per-entity cleanup, run a "shutdown" schedule before calling resetWorld().
|
|
160
|
+
* Fires the "worldReset" observer event after reset completes.
|
|
161
|
+
*
|
|
162
|
+
* @param world - World instance to reset
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* // Run cleanup systems first, then reset
|
|
167
|
+
* executeSchedule(world, "shutdown");
|
|
168
|
+
* resetWorld(world);
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
export declare function resetWorld(world: World): void;
|
|
172
|
+
//# sourceMappingURL=world.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAA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,YAAY,CAAC,CAAC,CAAC;KAClC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE;QACP;;WAEG;QACH,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAE9B;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,IAAI,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;KACjC,CAAC;IAEF;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;QAE9B;;WAEG;QACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAExB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF;;OAEG;IACH,MAAM,EAAE;QACN;;WAEG;QACH,IAAI,EAAE,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KACpC,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE;QACP;;WAEG;QACH,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;KACzD,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,IAAI,KAAK,CA6DnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CA0C7C"}
|
package/dist/world.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { createArchetype, registerArchetype } from "./archetype.js";
|
|
2
|
+
import { initNameSystem } from "./name.js";
|
|
3
|
+
import { fireObserverEvent, unregisterObserverCallback } from "./observer.js";
|
|
4
|
+
import { COMPONENT_REGISTRY } from "./registry.js";
|
|
5
|
+
import { initRemovalSystem } from "./removal.js";
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new ECS world with empty entity registry and root archetype.
|
|
8
|
+
*
|
|
9
|
+
* @returns Initialized world instance ready for use
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const world = createWorld();
|
|
14
|
+
* const entity = spawnEntity(world);
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export function createWorld() {
|
|
18
|
+
const root = createArchetype([], new Map());
|
|
19
|
+
const world = {
|
|
20
|
+
entities: {
|
|
21
|
+
byId: new Map(),
|
|
22
|
+
freeIds: [],
|
|
23
|
+
nextId: 1,
|
|
24
|
+
generations: new Map(),
|
|
25
|
+
},
|
|
26
|
+
components: {
|
|
27
|
+
byId: COMPONENT_REGISTRY.byId,
|
|
28
|
+
},
|
|
29
|
+
archetypes: {
|
|
30
|
+
root,
|
|
31
|
+
byId: new Map(),
|
|
32
|
+
},
|
|
33
|
+
filters: {
|
|
34
|
+
byId: new Map(),
|
|
35
|
+
},
|
|
36
|
+
queries: {
|
|
37
|
+
byId: new Map(),
|
|
38
|
+
},
|
|
39
|
+
systems: {
|
|
40
|
+
byId: new Map(),
|
|
41
|
+
nextIndex: 0,
|
|
42
|
+
},
|
|
43
|
+
schedules: {
|
|
44
|
+
byId: new Map(),
|
|
45
|
+
},
|
|
46
|
+
execution: {
|
|
47
|
+
scheduleId: null,
|
|
48
|
+
systemId: null,
|
|
49
|
+
tick: 1,
|
|
50
|
+
},
|
|
51
|
+
events: {
|
|
52
|
+
byId: new Map(),
|
|
53
|
+
},
|
|
54
|
+
actions: {
|
|
55
|
+
byInitializer: new Map(),
|
|
56
|
+
},
|
|
57
|
+
observers: {
|
|
58
|
+
archetypeCreated: { callbacks: [] },
|
|
59
|
+
archetypeDestroyed: { callbacks: [] },
|
|
60
|
+
filterCreated: { callbacks: [] },
|
|
61
|
+
filterDestroyed: { callbacks: [] },
|
|
62
|
+
entityCreated: { callbacks: [] },
|
|
63
|
+
entityDestroyed: { callbacks: [] },
|
|
64
|
+
componentAdded: { callbacks: [] },
|
|
65
|
+
componentRemoved: { callbacks: [] },
|
|
66
|
+
componentChanged: { callbacks: [] },
|
|
67
|
+
worldReset: { callbacks: [] },
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
registerArchetype(world, root);
|
|
71
|
+
initNameSystem(world);
|
|
72
|
+
initRemovalSystem(world);
|
|
73
|
+
return world;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resets world to initial state, clearing all entities and caches.
|
|
77
|
+
*
|
|
78
|
+
* Does NOT fire per-entity lifecycle events (entityDestroyed, componentRemoved).
|
|
79
|
+
* For per-entity cleanup, run a "shutdown" schedule before calling resetWorld().
|
|
80
|
+
* Fires the "worldReset" observer event after reset completes.
|
|
81
|
+
*
|
|
82
|
+
* @param world - World instance to reset
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* // Run cleanup systems first, then reset
|
|
87
|
+
* executeSchedule(world, "shutdown");
|
|
88
|
+
* resetWorld(world);
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export function resetWorld(world) {
|
|
92
|
+
// 1. Clear filters (unregister observer callbacks)
|
|
93
|
+
for (const filter of world.filters.byId.values()) {
|
|
94
|
+
unregisterObserverCallback(world, "archetypeCreated", filter.onArchetypeCreate);
|
|
95
|
+
unregisterObserverCallback(world, "archetypeDestroyed", filter.onArchetypeDelete);
|
|
96
|
+
}
|
|
97
|
+
world.filters.byId.clear();
|
|
98
|
+
// 2. Clear queries (unregister observer callbacks)
|
|
99
|
+
for (const query of world.queries.byId.values()) {
|
|
100
|
+
unregisterObserverCallback(world, "filterDestroyed", query.onFilterDestroy);
|
|
101
|
+
}
|
|
102
|
+
world.queries.byId.clear();
|
|
103
|
+
// 3. Clear archetypes (break circular refs via edges)
|
|
104
|
+
for (const archetype of world.archetypes.byId.values()) {
|
|
105
|
+
archetype.edges.clear();
|
|
106
|
+
}
|
|
107
|
+
world.archetypes.byId.clear();
|
|
108
|
+
// 4. Reinitialize entity registry
|
|
109
|
+
world.entities.byId.clear();
|
|
110
|
+
world.entities.freeIds.length = 0;
|
|
111
|
+
world.entities.nextId = 1;
|
|
112
|
+
world.entities.generations.clear();
|
|
113
|
+
// 5. Create new root archetype
|
|
114
|
+
const newRoot = createArchetype([], new Map());
|
|
115
|
+
world.archetypes.root = newRoot;
|
|
116
|
+
registerArchetype(world, newRoot);
|
|
117
|
+
// 6. Reset execution state
|
|
118
|
+
world.execution.tick = 1;
|
|
119
|
+
world.execution.scheduleId = null;
|
|
120
|
+
world.execution.systemId = null;
|
|
121
|
+
// 7. Clear caches
|
|
122
|
+
world.events.byId.clear();
|
|
123
|
+
world.actions.byInitializer.clear();
|
|
124
|
+
// 8. Fire worldReset event (subsystems handle their own reset via this observer)
|
|
125
|
+
fireObserverEvent(world, "worldReset", world);
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=world.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world.js","sourceRoot":"","sources":["../src/world.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA6JjD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,IAAI,GAAG,eAAe,CAAC,EAAE,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAE5C,MAAM,KAAK,GAAU;QACnB,QAAQ,EAAE;YACR,IAAI,EAAE,IAAI,GAAG,EAAE;YACf,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,IAAI,GAAG,EAAE;SACvB;QACD,UAAU,EAAE;YACV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,IAAI,GAAG,EAAE,CAAC,CAAC;IAC/C,KAAK,CAAC,UAAU,CAAC,IAAI,GAAG,OAAO,CAAC;IAChC,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAElC,2BAA2B;IAC3B,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,CAAC;IACzB,KAAK,CAAC,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;IAClC,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEhC,kBAAkB;IAClB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1B,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAEpC,iFAAiF;IACjF,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iris-ecs",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "High-performance TypeScript Entity Component System",
|
|
6
|
+
"author": "Yury Tomilin (https://github.com/r04423)",
|
|
7
|
+
"homepage": "https://github.com/r04423/iris#readme",
|
|
8
|
+
"bugs": "https://github.com/r04423/iris/issues",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"ecs",
|
|
23
|
+
"entity-component-system",
|
|
24
|
+
"game",
|
|
25
|
+
"typescript"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=24"
|
|
30
|
+
},
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/r04423/iris.git",
|
|
35
|
+
"directory": "packages/ecs"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^24.0.0",
|
|
42
|
+
"c8": "^10.1.3",
|
|
43
|
+
"tsx": "^4.19.4",
|
|
44
|
+
"typescript": "^5.9.0-beta"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -p tsconfig.build.json",
|
|
48
|
+
"test": "tsx --test 'src/**/*.test.ts'",
|
|
49
|
+
"test:coverage": "c8 tsx --test 'src/**/*.test.ts'",
|
|
50
|
+
"typecheck": "tsc --noEmit"
|
|
51
|
+
}
|
|
52
|
+
}
|