@awesome-ecs/abstract 0.25.0 → 0.26.0
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 +3 -4
- package/dist/entities/index.cjs +16 -0
- package/dist/entities/index.cjs.map +1 -1
- package/dist/entities/index.d.cts +2 -2
- package/dist/entities/index.d.mts +2 -2
- package/dist/entities/index.mjs +16 -1
- package/dist/entities/index.mjs.map +1 -1
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +1 -1
- package/dist/factories/index.d.mts +1 -1
- package/dist/factories/index.mjs.map +1 -1
- package/dist/{index-CR3yK5HE.d.cts → index-BoBx4MQT.d.cts} +2 -2
- package/dist/{index-ei6_lV4I.d.mts → index-CBIhhk81.d.mts} +2 -2
- package/dist/{index-CY3I0Xdn.d.cts → index-D_z9RbVT.d.cts} +66 -6
- package/dist/{index-CT8ci9Cn.d.mts → index-ke1H7wmC.d.mts} +66 -6
- package/dist/systems/index.d.cts +1 -1
- package/dist/systems/index.d.mts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -71,8 +71,8 @@ Pipelines execute **middleware chains** with two phases:
|
|
|
71
71
|
```typescript
|
|
72
72
|
export interface IPipeline<TContext extends IPipelineContext> {
|
|
73
73
|
use(middleware: IMiddleware<TContext>): this;
|
|
74
|
-
dispatch(context: Partial<TContext>):
|
|
75
|
-
cleanup(context: Partial<TContext>):
|
|
74
|
+
dispatch(context: Partial<TContext>): void | Promise<void>;
|
|
75
|
+
cleanup(context: Partial<TContext>): void | Promise<void>;
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -82,7 +82,6 @@ export interface IPipeline<TContext extends IPipelineContext> {
|
|
|
82
82
|
- `middleware-runner.ts`: Middleware execution engine
|
|
83
83
|
- `pipeline-context.ts`: Context passed to middleware
|
|
84
84
|
- `pipeline-runner.ts`: Pipeline execution orchestration
|
|
85
|
-
- `pipeline-result.ts`: Result type for success/failure
|
|
86
85
|
|
|
87
86
|
### Systems (`src/systems/`)
|
|
88
87
|
|
|
@@ -94,7 +93,7 @@ Systems are **modular logic units** that operate on entities. They implement the
|
|
|
94
93
|
|
|
95
94
|
**Module-based organization:**
|
|
96
95
|
- `systems-module.ts`: `ISystemsModule<TEntity>` - groups related systems targeting an entity type
|
|
97
|
-
- `systems-module-
|
|
96
|
+
- `systems-module-builder.ts`: `ISystemsModuleBuilder<TEntity>` - fluent builder for pipeline registration
|
|
98
97
|
- `systems-module-repository.ts`: Module lifecycle and registration
|
|
99
98
|
|
|
100
99
|
**Runtime execution:**
|
package/dist/entities/index.cjs
CHANGED
|
@@ -16,6 +16,22 @@ let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType) {
|
|
|
16
16
|
return EntityUpdateType;
|
|
17
17
|
}({});
|
|
18
18
|
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/entities/entity-scheduler.ts
|
|
21
|
+
/**
|
|
22
|
+
* Controls which scheduling modes are paused.
|
|
23
|
+
*/
|
|
24
|
+
let SchedulerPauseType = /* @__PURE__ */ function(SchedulerPauseType) {
|
|
25
|
+
/** Pause both interval timers and frame subscriptions. */
|
|
26
|
+
SchedulerPauseType["full"] = "full";
|
|
27
|
+
/** Pause only frame subscriptions. Interval timers continue firing. */
|
|
28
|
+
SchedulerPauseType["perFrame"] = "perFrame";
|
|
29
|
+
/** Pause only interval timers. Frame subscriptions continue. */
|
|
30
|
+
SchedulerPauseType["intervals"] = "intervals";
|
|
31
|
+
return SchedulerPauseType;
|
|
32
|
+
}({});
|
|
33
|
+
|
|
19
34
|
//#endregion
|
|
20
35
|
exports.EntityUpdateType = EntityUpdateType;
|
|
36
|
+
exports.SchedulerPauseType = SchedulerPauseType;
|
|
21
37
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n"],"mappings":";;;;;;AAQA,IAAY,8DAAL;;;;AAIL;;;;AAIA"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/entities/entity-queue.ts","../../src/entities/entity-scheduler.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n","import { EntityTypeUid } from './entity';\nimport { IEntityProxy } from './entity-proxies';\n\n/**\n * Describes a scheduled entity update, including the target entity and optional interval.\n */\nexport type EntitySchedule = {\n readonly proxy: IEntityProxy;\n readonly intervalMs?: number;\n};\n\n/**\n * Controls which scheduling modes are paused.\n */\nexport enum SchedulerPauseType {\n /** Pause both interval timers and frame subscriptions. */\n full = 'full',\n /** Pause only frame subscriptions. Interval timers continue firing. */\n perFrame = 'perFrame',\n /** Pause only interval timers. Frame subscriptions continue. */\n intervals = 'intervals'\n}\n\n/**\n * Manages time-based scheduling of entity updates.\n *\n * Entities can be scheduled with an interval (timer-driven) or without one (per-frame).\n * The runtime pulls pending entities each tick via the {@link pending} iterator,\n * which yields both per-frame subscriptions and interval entities whose timer has fired.\n */\nexport interface IEntityScheduler {\n /**\n * Returns all currently scheduled entities with their configuration.\n * Useful for inspection and debugging.\n */\n readonly schedules: ReadonlyArray<EntitySchedule>;\n\n /**\n * Yields entities pending processing this tick: per-frame subscriptions\n * followed by interval entities whose timer has fired since the last drain.\n * Iterating drains the due interval buckets; a second iteration without\n * timer advancement yields only per-frame subscriptions.\n */\n readonly pending: IterableIterator<IEntityProxy>;\n\n /**\n * The set of entities scheduled for per-frame updates (no interval).\n */\n readonly frameSubscriptions: ReadonlySet<IEntityProxy>;\n\n /**\n * The number of entities currently awaiting processing:\n * per-frame subscriptions (if not paused) plus interval entities whose timer has fired.\n */\n readonly pendingCount: number;\n\n /**\n * Whether the scheduler is currently paused in any mode.\n */\n readonly isPaused: boolean;\n\n /**\n * Registers an entity for updates.\n * @param entityProxy - The entity to schedule.\n * @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.\n */\n schedule(entityProxy: IEntityProxy, intervalMs?: number): void;\n\n /**\n * Unregisters an entity from the scheduler.\n * @param entityProxy - The entity to unschedule.\n */\n remove(entityProxy: IEntityProxy): void;\n\n /**\n * Checks if an entity is currently scheduled for updates.\n * @param entityProxy - The entity to check.\n * @returns True if the entity is scheduled, false otherwise.\n */\n has(entityProxy: IEntityProxy): boolean;\n\n /**\n * Removes all schedules and clears all timers.\n */\n clear(): void;\n\n /**\n * Entity types currently excluded from {@link pending} iteration.\n */\n readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;\n\n /**\n * Excludes an entity type from {@link pending} iteration.\n * Entities remain registered; only yielding is suppressed.\n */\n skipEntityType(entityType: EntityTypeUid): void;\n\n /**\n * Re-includes a previously skipped entity type in {@link pending} iteration.\n */\n unskipEntityType(entityType: EntityTypeUid): void;\n\n /**\n * Pauses the scheduler.\n * @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.\n */\n pause(type?: SchedulerPauseType): void;\n\n /**\n * Resumes the scheduler from any paused state.\n */\n resume(): void;\n}\n"],"mappings":";;;;;;AAQA,IAAY,8DAAL;;;;AAIL;;;;AAIA;;;;;;;;;ACFF,IAAY,kEAAL;;AAEL;;AAEA;;AAEA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as IEntity, c as IEntityProxy, d as TypedEntityProxy, i as EntityUid, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy, u as RequiredProxies } from "../identity-component-uU0yDR-y.cjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { EntityEventSubscriptionFilter, EntityEventSubscriptionOptions, EntityEventUid, EntityProxy, EntitySchedule, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, TypedEntityProxy };
|
|
2
|
+
import { a as EntityUpdateType, c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, h as IEntityEventsManager, i as IEntityRepository, l as IEntitySnapshotProvider, m as IEntityEventsDispatcher, n as IEntityScheduler, o as IEntityUpdate, p as IEntityEvent, r as SchedulerPauseType, s as IEntityUpdateQueue, t as EntitySchedule, u as EntityEventSubscriptionFilter } from "../index-D_z9RbVT.cjs";
|
|
3
|
+
export { EntityEventSubscriptionFilter, EntityEventSubscriptionOptions, EntityEventUid, EntityProxy, EntitySchedule, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, SchedulerPauseType, TypedEntityProxy };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as IEntity, c as IEntityProxy, d as TypedEntityProxy, i as EntityUid, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy, u as RequiredProxies } from "../identity-component-CgzvgBVh.mjs";
|
|
2
|
-
import { a as
|
|
3
|
-
export { EntityEventSubscriptionFilter, EntityEventSubscriptionOptions, EntityEventUid, EntityProxy, EntitySchedule, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, TypedEntityProxy };
|
|
2
|
+
import { a as EntityUpdateType, c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, h as IEntityEventsManager, i as IEntityRepository, l as IEntitySnapshotProvider, m as IEntityEventsDispatcher, n as IEntityScheduler, o as IEntityUpdate, p as IEntityEvent, r as SchedulerPauseType, s as IEntityUpdateQueue, t as EntitySchedule, u as EntityEventSubscriptionFilter } from "../index-ke1H7wmC.mjs";
|
|
3
|
+
export { EntityEventSubscriptionFilter, EntityEventSubscriptionOptions, EntityEventUid, EntityProxy, EntitySchedule, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, SchedulerPauseType, TypedEntityProxy };
|
package/dist/entities/index.mjs
CHANGED
|
@@ -16,5 +16,20 @@ let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType) {
|
|
|
16
16
|
}({});
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
|
-
|
|
19
|
+
//#region src/entities/entity-scheduler.ts
|
|
20
|
+
/**
|
|
21
|
+
* Controls which scheduling modes are paused.
|
|
22
|
+
*/
|
|
23
|
+
let SchedulerPauseType = /* @__PURE__ */ function(SchedulerPauseType) {
|
|
24
|
+
/** Pause both interval timers and frame subscriptions. */
|
|
25
|
+
SchedulerPauseType["full"] = "full";
|
|
26
|
+
/** Pause only frame subscriptions. Interval timers continue firing. */
|
|
27
|
+
SchedulerPauseType["perFrame"] = "perFrame";
|
|
28
|
+
/** Pause only interval timers. Frame subscriptions continue. */
|
|
29
|
+
SchedulerPauseType["intervals"] = "intervals";
|
|
30
|
+
return SchedulerPauseType;
|
|
31
|
+
}({});
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { EntityUpdateType, SchedulerPauseType };
|
|
20
35
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n"],"mappings":";;;;;AAQA,IAAY,8DAAL;;;;AAIL;;;;AAIA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/entities/entity-queue.ts","../../src/entities/entity-scheduler.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n","import { EntityTypeUid } from './entity';\nimport { IEntityProxy } from './entity-proxies';\n\n/**\n * Describes a scheduled entity update, including the target entity and optional interval.\n */\nexport type EntitySchedule = {\n readonly proxy: IEntityProxy;\n readonly intervalMs?: number;\n};\n\n/**\n * Controls which scheduling modes are paused.\n */\nexport enum SchedulerPauseType {\n /** Pause both interval timers and frame subscriptions. */\n full = 'full',\n /** Pause only frame subscriptions. Interval timers continue firing. */\n perFrame = 'perFrame',\n /** Pause only interval timers. Frame subscriptions continue. */\n intervals = 'intervals'\n}\n\n/**\n * Manages time-based scheduling of entity updates.\n *\n * Entities can be scheduled with an interval (timer-driven) or without one (per-frame).\n * The runtime pulls pending entities each tick via the {@link pending} iterator,\n * which yields both per-frame subscriptions and interval entities whose timer has fired.\n */\nexport interface IEntityScheduler {\n /**\n * Returns all currently scheduled entities with their configuration.\n * Useful for inspection and debugging.\n */\n readonly schedules: ReadonlyArray<EntitySchedule>;\n\n /**\n * Yields entities pending processing this tick: per-frame subscriptions\n * followed by interval entities whose timer has fired since the last drain.\n * Iterating drains the due interval buckets; a second iteration without\n * timer advancement yields only per-frame subscriptions.\n */\n readonly pending: IterableIterator<IEntityProxy>;\n\n /**\n * The set of entities scheduled for per-frame updates (no interval).\n */\n readonly frameSubscriptions: ReadonlySet<IEntityProxy>;\n\n /**\n * The number of entities currently awaiting processing:\n * per-frame subscriptions (if not paused) plus interval entities whose timer has fired.\n */\n readonly pendingCount: number;\n\n /**\n * Whether the scheduler is currently paused in any mode.\n */\n readonly isPaused: boolean;\n\n /**\n * Registers an entity for updates.\n * @param entityProxy - The entity to schedule.\n * @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.\n */\n schedule(entityProxy: IEntityProxy, intervalMs?: number): void;\n\n /**\n * Unregisters an entity from the scheduler.\n * @param entityProxy - The entity to unschedule.\n */\n remove(entityProxy: IEntityProxy): void;\n\n /**\n * Checks if an entity is currently scheduled for updates.\n * @param entityProxy - The entity to check.\n * @returns True if the entity is scheduled, false otherwise.\n */\n has(entityProxy: IEntityProxy): boolean;\n\n /**\n * Removes all schedules and clears all timers.\n */\n clear(): void;\n\n /**\n * Entity types currently excluded from {@link pending} iteration.\n */\n readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;\n\n /**\n * Excludes an entity type from {@link pending} iteration.\n * Entities remain registered; only yielding is suppressed.\n */\n skipEntityType(entityType: EntityTypeUid): void;\n\n /**\n * Re-includes a previously skipped entity type in {@link pending} iteration.\n */\n unskipEntityType(entityType: EntityTypeUid): void;\n\n /**\n * Pauses the scheduler.\n * @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.\n */\n pause(type?: SchedulerPauseType): void;\n\n /**\n * Resumes the scheduler from any paused state.\n */\n resume(): void;\n}\n"],"mappings":";;;;;AAQA,IAAY,8DAAL;;;;AAIL;;;;AAIA;;;;;;;;;ACFF,IAAY,kEAAL;;AAEL;;AAEA;;AAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\nimport { IPipeline } from '../pipelines/pipeline';\n\n/**\n * Category identifier for grouping performance metrics.\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\n */\nexport type PipelineCategoryName = string;\n\n/**\n * Built-in metric categories for classifying pipeline and middleware performance entries.\n *\n * - `module` — System module pipelines (initialize, update, render, sync phases).\n * - `runtime` — Runtime orchestration pipeline and its middleware.\n * - `system` — Individual system middleware within a module pipeline.\n */\nexport enum PipelineCategory {\n module = 'module',\n runtime = 'runtime',\n system = 'system'\n}\n\n/**\n * Options for identifying and categorizing performance metrics on pipelines.\n */\nexport type PipelineMetricOptions = {\n /** Display name for the pipeline in performance metrics. */\n pipelineName: string;\n /** Category assigned to pipeline-level metric entries. */\n pipelineCategory: PipelineCategoryName;\n /** Category assigned to per-middleware metric entries within this pipeline. */\n middlewareCategory: PipelineCategoryName;\n};\n\n/**\n * Creates pipeline instances for various contexts.\n * Abstracts pipeline creation to support different implementations.\n * Used by the system to instantiate pipelines without coupling to specific implementations.\n */\nexport interface IPipelineFactory {\n /**\n * Creates a new pipeline for the specified context type.\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\n * @param options - Optional performance metric options (name, category) for the pipeline.\n * @returns A new pipeline instance ready for middleware registration.\n */\n createPipeline<TContext extends IPipelineContext>(\n options?: PipelineMetricOptions\n ): IPipeline<TContext>;\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAY,8DAAL;AACL;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\r\nimport { IPipeline } from '../pipelines/pipeline';\r\n\r\n/**\r\n * Category identifier for grouping performance metrics.\r\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\r\n */\r\nexport type PipelineCategoryName = string;\r\n\r\n/**\r\n * Built-in metric categories for classifying pipeline and middleware performance entries.\r\n *\r\n * - `module` — System module pipelines (initialize, update, render, sync phases).\r\n * - `runtime` — Runtime orchestration pipeline and its middleware.\r\n * - `system` — Individual system middleware within a module pipeline.\r\n */\r\nexport enum PipelineCategory {\r\n module = 'module',\r\n runtime = 'runtime',\r\n system = 'system'\r\n}\r\n\r\n/**\r\n * Options for identifying and categorizing performance metrics on pipelines.\r\n */\r\nexport type PipelineMetricOptions = {\r\n /** Display name for the pipeline in performance metrics. */\r\n pipelineName: string;\r\n /** Category assigned to pipeline-level metric entries. */\r\n pipelineCategory: PipelineCategoryName;\r\n /** Category assigned to per-middleware metric entries within this pipeline. */\r\n middlewareCategory: PipelineCategoryName;\r\n};\r\n\r\n/**\r\n * Creates pipeline instances for various contexts.\r\n * Abstracts pipeline creation to support different implementations.\r\n * Used by the system to instantiate pipelines without coupling to specific implementations.\r\n */\r\nexport interface IPipelineFactory {\r\n /**\r\n * Creates a new pipeline for the specified context type.\r\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\r\n * @param options - Optional performance metric options (name, category) for the pipeline.\r\n * @returns A new pipeline instance ready for middleware registration.\r\n */\r\n createPipeline<TContext extends IPipelineContext>(\r\n options?: PipelineMetricOptions\r\n ): IPipeline<TContext>;\r\n}\r\n"],"mappings":";;;;;;;;;AAgBA,IAAY,8DAAL;AACL;AACA;AACA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as IEntity } from "../identity-component-uU0yDR-y.cjs";
|
|
2
2
|
import { l as IPipelineContext, o as IPipeline } from "../index-cF9FviwN.cjs";
|
|
3
|
-
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-
|
|
3
|
+
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-BoBx4MQT.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/factories/context-factory.d.ts
|
|
6
6
|
interface IContextFactory {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as IEntity } from "../identity-component-CgzvgBVh.mjs";
|
|
2
2
|
import { l as IPipelineContext, o as IPipeline } from "../index-CyoGuBNw.mjs";
|
|
3
|
-
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-
|
|
3
|
+
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-CBIhhk81.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/factories/context-factory.d.ts
|
|
6
6
|
interface IContextFactory {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\nimport { IPipeline } from '../pipelines/pipeline';\n\n/**\n * Category identifier for grouping performance metrics.\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\n */\nexport type PipelineCategoryName = string;\n\n/**\n * Built-in metric categories for classifying pipeline and middleware performance entries.\n *\n * - `module` — System module pipelines (initialize, update, render, sync phases).\n * - `runtime` — Runtime orchestration pipeline and its middleware.\n * - `system` — Individual system middleware within a module pipeline.\n */\nexport enum PipelineCategory {\n module = 'module',\n runtime = 'runtime',\n system = 'system'\n}\n\n/**\n * Options for identifying and categorizing performance metrics on pipelines.\n */\nexport type PipelineMetricOptions = {\n /** Display name for the pipeline in performance metrics. */\n pipelineName: string;\n /** Category assigned to pipeline-level metric entries. */\n pipelineCategory: PipelineCategoryName;\n /** Category assigned to per-middleware metric entries within this pipeline. */\n middlewareCategory: PipelineCategoryName;\n};\n\n/**\n * Creates pipeline instances for various contexts.\n * Abstracts pipeline creation to support different implementations.\n * Used by the system to instantiate pipelines without coupling to specific implementations.\n */\nexport interface IPipelineFactory {\n /**\n * Creates a new pipeline for the specified context type.\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\n * @param options - Optional performance metric options (name, category) for the pipeline.\n * @returns A new pipeline instance ready for middleware registration.\n */\n createPipeline<TContext extends IPipelineContext>(\n options?: PipelineMetricOptions\n ): IPipeline<TContext>;\n}\n"],"mappings":";;;;;;;;AAgBA,IAAY,8DAAL;AACL;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\r\nimport { IPipeline } from '../pipelines/pipeline';\r\n\r\n/**\r\n * Category identifier for grouping performance metrics.\r\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\r\n */\r\nexport type PipelineCategoryName = string;\r\n\r\n/**\r\n * Built-in metric categories for classifying pipeline and middleware performance entries.\r\n *\r\n * - `module` — System module pipelines (initialize, update, render, sync phases).\r\n * - `runtime` — Runtime orchestration pipeline and its middleware.\r\n * - `system` — Individual system middleware within a module pipeline.\r\n */\r\nexport enum PipelineCategory {\r\n module = 'module',\r\n runtime = 'runtime',\r\n system = 'system'\r\n}\r\n\r\n/**\r\n * Options for identifying and categorizing performance metrics on pipelines.\r\n */\r\nexport type PipelineMetricOptions = {\r\n /** Display name for the pipeline in performance metrics. */\r\n pipelineName: string;\r\n /** Category assigned to pipeline-level metric entries. */\r\n pipelineCategory: PipelineCategoryName;\r\n /** Category assigned to per-middleware metric entries within this pipeline. */\r\n middlewareCategory: PipelineCategoryName;\r\n};\r\n\r\n/**\r\n * Creates pipeline instances for various contexts.\r\n * Abstracts pipeline creation to support different implementations.\r\n * Used by the system to instantiate pipelines without coupling to specific implementations.\r\n */\r\nexport interface IPipelineFactory {\r\n /**\r\n * Creates a new pipeline for the specified context type.\r\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\r\n * @param options - Optional performance metric options (name, category) for the pipeline.\r\n * @returns A new pipeline instance ready for middleware registration.\r\n */\r\n createPipeline<TContext extends IPipelineContext>(\r\n options?: PipelineMetricOptions\r\n ): IPipeline<TContext>;\r\n}\r\n"],"mappings":";;;;;;;;AAgBA,IAAY,8DAAL;AACL;AACA;AACA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as IEntity, c as IEntityProxy, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy } from "./identity-component-uU0yDR-y.cjs";
|
|
2
2
|
import { n as Immutable } from "./types-DLOd2zXO.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, o as IEntityUpdate, p as IEntityEvent } from "./index-D_z9RbVT.cjs";
|
|
4
4
|
import { a as ILogger, c as IJsonSerializer, r as PerformanceTimeEntry } from "./index-CmTRwW4W.cjs";
|
|
5
5
|
import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index-cF9FviwN.cjs";
|
|
6
6
|
|
|
@@ -516,4 +516,4 @@ interface ISystemsRuntimeContext<TEntity extends IEntity> extends IPipelineConte
|
|
|
516
516
|
type ISystemsRuntimeMiddleware<TEntity extends IEntity> = IMiddleware<ISystemsRuntimeContext<TEntity>>;
|
|
517
517
|
//#endregion
|
|
518
518
|
export { ISystemsModuleRepository as a, ISystemsModule as c, ISystemContextSnapshot as d, ISystemContextScheduler as f, ISystemContextEvents as h, ISystemContextEntity as i, SystemType as l, ISystemContextProxies as m, ISystemsRuntimeContext as n, ISystemsModuleBuilder as o, ISystemContextRepository as p, ISystemsRuntime as r, ISystemMiddleware as s, ISystemsRuntimeMiddleware as t, ISystemContext as u };
|
|
519
|
-
//# sourceMappingURL=index-
|
|
519
|
+
//# sourceMappingURL=index-BoBx4MQT.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as IEntity, c as IEntityProxy, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy } from "./identity-component-CgzvgBVh.mjs";
|
|
2
2
|
import { n as Immutable } from "./types-CnDtpKsY.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, o as IEntityUpdate, p as IEntityEvent } from "./index-ke1H7wmC.mjs";
|
|
4
4
|
import { a as ILogger, c as IJsonSerializer, r as PerformanceTimeEntry } from "./index-Iqc9jR5E.mjs";
|
|
5
5
|
import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index-CyoGuBNw.mjs";
|
|
6
6
|
|
|
@@ -516,4 +516,4 @@ interface ISystemsRuntimeContext<TEntity extends IEntity> extends IPipelineConte
|
|
|
516
516
|
type ISystemsRuntimeMiddleware<TEntity extends IEntity> = IMiddleware<ISystemsRuntimeContext<TEntity>>;
|
|
517
517
|
//#endregion
|
|
518
518
|
export { ISystemsModuleRepository as a, ISystemsModule as c, ISystemContextSnapshot as d, ISystemContextScheduler as f, ISystemContextEvents as h, ISystemContextEntity as i, SystemType as l, ISystemContextProxies as m, ISystemsRuntimeContext as n, ISystemsModuleBuilder as o, ISystemContextRepository as p, ISystemsRuntime as r, ISystemMiddleware as s, ISystemsRuntimeMiddleware as t, ISystemContext as u };
|
|
519
|
-
//# sourceMappingURL=index-
|
|
519
|
+
//# sourceMappingURL=index-CBIhhk81.d.mts.map
|
|
@@ -306,24 +306,58 @@ type EntitySchedule = {
|
|
|
306
306
|
readonly proxy: IEntityProxy;
|
|
307
307
|
readonly intervalMs?: number;
|
|
308
308
|
};
|
|
309
|
+
/**
|
|
310
|
+
* Controls which scheduling modes are paused.
|
|
311
|
+
*/
|
|
312
|
+
declare enum SchedulerPauseType {
|
|
313
|
+
/** Pause both interval timers and frame subscriptions. */
|
|
314
|
+
full = "full",
|
|
315
|
+
/** Pause only frame subscriptions. Interval timers continue firing. */
|
|
316
|
+
perFrame = "perFrame",
|
|
317
|
+
/** Pause only interval timers. Frame subscriptions continue. */
|
|
318
|
+
intervals = "intervals"
|
|
319
|
+
}
|
|
309
320
|
/**
|
|
310
321
|
* Manages time-based scheduling of entity updates.
|
|
311
|
-
*
|
|
322
|
+
*
|
|
323
|
+
* Entities can be scheduled with an interval (timer-driven) or without one (per-frame).
|
|
324
|
+
* The runtime pulls pending entities each tick via the {@link pending} iterator,
|
|
325
|
+
* which yields both per-frame subscriptions and interval entities whose timer has fired.
|
|
312
326
|
*/
|
|
313
327
|
interface IEntityScheduler {
|
|
314
328
|
/**
|
|
315
329
|
* Returns all currently scheduled entities with their configuration.
|
|
330
|
+
* Useful for inspection and debugging.
|
|
316
331
|
*/
|
|
317
332
|
readonly schedules: ReadonlyArray<EntitySchedule>;
|
|
318
333
|
/**
|
|
319
|
-
*
|
|
334
|
+
* Yields entities pending processing this tick: per-frame subscriptions
|
|
335
|
+
* followed by interval entities whose timer has fired since the last drain.
|
|
336
|
+
* Iterating drains the due interval buckets; a second iteration without
|
|
337
|
+
* timer advancement yields only per-frame subscriptions.
|
|
338
|
+
*/
|
|
339
|
+
readonly pending: IterableIterator<IEntityProxy>;
|
|
340
|
+
/**
|
|
341
|
+
* The set of entities scheduled for per-frame updates (no interval).
|
|
342
|
+
*/
|
|
343
|
+
readonly frameSubscriptions: ReadonlySet<IEntityProxy>;
|
|
344
|
+
/**
|
|
345
|
+
* The number of entities currently awaiting processing:
|
|
346
|
+
* per-frame subscriptions (if not paused) plus interval entities whose timer has fired.
|
|
347
|
+
*/
|
|
348
|
+
readonly pendingCount: number;
|
|
349
|
+
/**
|
|
350
|
+
* Whether the scheduler is currently paused in any mode.
|
|
351
|
+
*/
|
|
352
|
+
readonly isPaused: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Registers an entity for updates.
|
|
320
355
|
* @param entityProxy - The entity to schedule.
|
|
321
|
-
* @param intervalMs - Update frequency in milliseconds. If omitted,
|
|
356
|
+
* @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.
|
|
322
357
|
*/
|
|
323
358
|
schedule(entityProxy: IEntityProxy, intervalMs?: number): void;
|
|
324
359
|
/**
|
|
325
360
|
* Unregisters an entity from the scheduler.
|
|
326
|
-
* The entity will no longer receive periodic updates.
|
|
327
361
|
* @param entityProxy - The entity to unschedule.
|
|
328
362
|
*/
|
|
329
363
|
remove(entityProxy: IEntityProxy): void;
|
|
@@ -333,7 +367,33 @@ interface IEntityScheduler {
|
|
|
333
367
|
* @returns True if the entity is scheduled, false otherwise.
|
|
334
368
|
*/
|
|
335
369
|
has(entityProxy: IEntityProxy): boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Removes all schedules and clears all timers.
|
|
372
|
+
*/
|
|
373
|
+
clear(): void;
|
|
374
|
+
/**
|
|
375
|
+
* Entity types currently excluded from {@link pending} iteration.
|
|
376
|
+
*/
|
|
377
|
+
readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;
|
|
378
|
+
/**
|
|
379
|
+
* Excludes an entity type from {@link pending} iteration.
|
|
380
|
+
* Entities remain registered; only yielding is suppressed.
|
|
381
|
+
*/
|
|
382
|
+
skipEntityType(entityType: EntityTypeUid): void;
|
|
383
|
+
/**
|
|
384
|
+
* Re-includes a previously skipped entity type in {@link pending} iteration.
|
|
385
|
+
*/
|
|
386
|
+
unskipEntityType(entityType: EntityTypeUid): void;
|
|
387
|
+
/**
|
|
388
|
+
* Pauses the scheduler.
|
|
389
|
+
* @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.
|
|
390
|
+
*/
|
|
391
|
+
pause(type?: SchedulerPauseType): void;
|
|
392
|
+
/**
|
|
393
|
+
* Resumes the scheduler from any paused state.
|
|
394
|
+
*/
|
|
395
|
+
resume(): void;
|
|
336
396
|
}
|
|
337
397
|
//#endregion
|
|
338
|
-
export {
|
|
339
|
-
//# sourceMappingURL=index-
|
|
398
|
+
export { EntityUpdateType as a, IEntitySnapshot as c, EntityEventSubscriptionOptions as d, EntityEventUid as f, IEventData as g, IEntityEventsManager as h, IEntityRepository as i, IEntitySnapshotProvider as l, IEntityEventsDispatcher as m, IEntityScheduler as n, IEntityUpdate as o, IEntityEvent as p, SchedulerPauseType as r, IEntityUpdateQueue as s, EntitySchedule as t, EntityEventSubscriptionFilter as u };
|
|
399
|
+
//# sourceMappingURL=index-D_z9RbVT.d.cts.map
|
|
@@ -306,24 +306,58 @@ type EntitySchedule = {
|
|
|
306
306
|
readonly proxy: IEntityProxy;
|
|
307
307
|
readonly intervalMs?: number;
|
|
308
308
|
};
|
|
309
|
+
/**
|
|
310
|
+
* Controls which scheduling modes are paused.
|
|
311
|
+
*/
|
|
312
|
+
declare enum SchedulerPauseType {
|
|
313
|
+
/** Pause both interval timers and frame subscriptions. */
|
|
314
|
+
full = "full",
|
|
315
|
+
/** Pause only frame subscriptions. Interval timers continue firing. */
|
|
316
|
+
perFrame = "perFrame",
|
|
317
|
+
/** Pause only interval timers. Frame subscriptions continue. */
|
|
318
|
+
intervals = "intervals"
|
|
319
|
+
}
|
|
309
320
|
/**
|
|
310
321
|
* Manages time-based scheduling of entity updates.
|
|
311
|
-
*
|
|
322
|
+
*
|
|
323
|
+
* Entities can be scheduled with an interval (timer-driven) or without one (per-frame).
|
|
324
|
+
* The runtime pulls pending entities each tick via the {@link pending} iterator,
|
|
325
|
+
* which yields both per-frame subscriptions and interval entities whose timer has fired.
|
|
312
326
|
*/
|
|
313
327
|
interface IEntityScheduler {
|
|
314
328
|
/**
|
|
315
329
|
* Returns all currently scheduled entities with their configuration.
|
|
330
|
+
* Useful for inspection and debugging.
|
|
316
331
|
*/
|
|
317
332
|
readonly schedules: ReadonlyArray<EntitySchedule>;
|
|
318
333
|
/**
|
|
319
|
-
*
|
|
334
|
+
* Yields entities pending processing this tick: per-frame subscriptions
|
|
335
|
+
* followed by interval entities whose timer has fired since the last drain.
|
|
336
|
+
* Iterating drains the due interval buckets; a second iteration without
|
|
337
|
+
* timer advancement yields only per-frame subscriptions.
|
|
338
|
+
*/
|
|
339
|
+
readonly pending: IterableIterator<IEntityProxy>;
|
|
340
|
+
/**
|
|
341
|
+
* The set of entities scheduled for per-frame updates (no interval).
|
|
342
|
+
*/
|
|
343
|
+
readonly frameSubscriptions: ReadonlySet<IEntityProxy>;
|
|
344
|
+
/**
|
|
345
|
+
* The number of entities currently awaiting processing:
|
|
346
|
+
* per-frame subscriptions (if not paused) plus interval entities whose timer has fired.
|
|
347
|
+
*/
|
|
348
|
+
readonly pendingCount: number;
|
|
349
|
+
/**
|
|
350
|
+
* Whether the scheduler is currently paused in any mode.
|
|
351
|
+
*/
|
|
352
|
+
readonly isPaused: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Registers an entity for updates.
|
|
320
355
|
* @param entityProxy - The entity to schedule.
|
|
321
|
-
* @param intervalMs - Update frequency in milliseconds. If omitted,
|
|
356
|
+
* @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.
|
|
322
357
|
*/
|
|
323
358
|
schedule(entityProxy: IEntityProxy, intervalMs?: number): void;
|
|
324
359
|
/**
|
|
325
360
|
* Unregisters an entity from the scheduler.
|
|
326
|
-
* The entity will no longer receive periodic updates.
|
|
327
361
|
* @param entityProxy - The entity to unschedule.
|
|
328
362
|
*/
|
|
329
363
|
remove(entityProxy: IEntityProxy): void;
|
|
@@ -333,7 +367,33 @@ interface IEntityScheduler {
|
|
|
333
367
|
* @returns True if the entity is scheduled, false otherwise.
|
|
334
368
|
*/
|
|
335
369
|
has(entityProxy: IEntityProxy): boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Removes all schedules and clears all timers.
|
|
372
|
+
*/
|
|
373
|
+
clear(): void;
|
|
374
|
+
/**
|
|
375
|
+
* Entity types currently excluded from {@link pending} iteration.
|
|
376
|
+
*/
|
|
377
|
+
readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;
|
|
378
|
+
/**
|
|
379
|
+
* Excludes an entity type from {@link pending} iteration.
|
|
380
|
+
* Entities remain registered; only yielding is suppressed.
|
|
381
|
+
*/
|
|
382
|
+
skipEntityType(entityType: EntityTypeUid): void;
|
|
383
|
+
/**
|
|
384
|
+
* Re-includes a previously skipped entity type in {@link pending} iteration.
|
|
385
|
+
*/
|
|
386
|
+
unskipEntityType(entityType: EntityTypeUid): void;
|
|
387
|
+
/**
|
|
388
|
+
* Pauses the scheduler.
|
|
389
|
+
* @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.
|
|
390
|
+
*/
|
|
391
|
+
pause(type?: SchedulerPauseType): void;
|
|
392
|
+
/**
|
|
393
|
+
* Resumes the scheduler from any paused state.
|
|
394
|
+
*/
|
|
395
|
+
resume(): void;
|
|
336
396
|
}
|
|
337
397
|
//#endregion
|
|
338
|
-
export {
|
|
339
|
-
//# sourceMappingURL=index-
|
|
398
|
+
export { EntityUpdateType as a, IEntitySnapshot as c, EntityEventSubscriptionOptions as d, EntityEventUid as f, IEventData as g, IEntityEventsManager as h, IEntityRepository as i, IEntitySnapshotProvider as l, IEntityEventsDispatcher as m, IEntityScheduler as n, IEntityUpdate as o, IEntityEvent as p, SchedulerPauseType as r, IEntityUpdateQueue as s, EntitySchedule as t, EntityEventSubscriptionFilter as u };
|
|
399
|
+
//# sourceMappingURL=index-ke1H7wmC.d.mts.map
|
package/dist/systems/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-
|
|
1
|
+
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-BoBx4MQT.cjs";
|
|
2
2
|
export { ISystemContext, ISystemContextEntity, ISystemContextEvents, ISystemContextProxies, ISystemContextRepository, ISystemContextScheduler, ISystemContextSnapshot, ISystemMiddleware, ISystemsModule, ISystemsModuleBuilder, ISystemsModuleRepository, ISystemsRuntime, ISystemsRuntimeContext, ISystemsRuntimeMiddleware, SystemType };
|
package/dist/systems/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-
|
|
1
|
+
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-CBIhhk81.mjs";
|
|
2
2
|
export { ISystemContext, ISystemContextEntity, ISystemContextEvents, ISystemContextProxies, ISystemContextRepository, ISystemContextScheduler, ISystemContextSnapshot, ISystemMiddleware, ISystemsModule, ISystemsModuleBuilder, ISystemsModuleRepository, ISystemsRuntime, ISystemsRuntimeContext, ISystemsRuntimeMiddleware, SystemType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesome-ecs/abstract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "A comprehensive Entity-Component-System (ECS) Architecture implementation. Abstract components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"url": "https://github.com/privatebytes/awesome-ecs/issues"
|
|
98
98
|
},
|
|
99
99
|
"homepage": "https://github.com/privatebytes/awesome-ecs#readme",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "455478d411536325b36f39780c59941b14e633c4"
|
|
101
101
|
}
|