@esengine/ecs-framework 2.2.3 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @esengine/ecs-framework v2.2.3
2
+ * @esengine/ecs-framework v2.2.4
3
3
  * TypeScript definitions
4
4
  */
5
5
  /**
@@ -2517,7 +2517,7 @@ declare class PerformanceMonitor implements IService {
2517
2517
  /**
2518
2518
  * 查询条件类型
2519
2519
  */
2520
- interface QueryCondition {
2520
+ interface QueryCondition$1 {
2521
2521
  all: ComponentType[];
2522
2522
  any: ComponentType[];
2523
2523
  none: ComponentType[];
@@ -2636,7 +2636,7 @@ declare class Matcher {
2636
2636
  /**
2637
2637
  * 获取查询条件(只读)
2638
2638
  */
2639
- getCondition(): Readonly<QueryCondition>;
2639
+ getCondition(): Readonly<QueryCondition$1>;
2640
2640
  /**
2641
2641
  * 检查是否为空条件
2642
2642
  */
@@ -2863,55 +2863,6 @@ declare class Bits {
2863
2863
  getLowestBitIndex(): number;
2864
2864
  }
2865
2865
 
2866
- /**
2867
- * 组件类型管理器
2868
- * 负责管理组件类型的注册和ID分配
2869
- * 支持无限数量的组件类型(通过自动扩展 BitMask)
2870
- */
2871
- declare class ComponentTypeManager {
2872
- private static _instance;
2873
- private _componentTypes;
2874
- private _typeNames;
2875
- private _nextTypeId;
2876
- /**
2877
- * 获取单例实例
2878
- */
2879
- static get instance(): ComponentTypeManager;
2880
- private constructor();
2881
- /**
2882
- * 获取组件类型的ID
2883
- * @param componentType 组件类型构造函数
2884
- * @returns 组件类型ID
2885
- */
2886
- getTypeId(componentType: ComponentType$1): number;
2887
- /**
2888
- * 获取组件类型名称
2889
- * @param typeId 组件类型ID
2890
- * @returns 组件类型名称
2891
- */
2892
- getTypeName(typeId: number): string;
2893
- /**
2894
- * 创建包含指定组件类型的Bits对象
2895
- * @param componentTypes 组件类型构造函数数组
2896
- * @returns Bits对象
2897
- */
2898
- createBits(...componentTypes: ComponentType$1[]): Bits;
2899
- /**
2900
- * 获取实体的组件位掩码
2901
- * @param components 组件数组
2902
- * @returns Bits对象
2903
- */
2904
- getEntityBits(components: ComponentType$1[]): Bits;
2905
- /**
2906
- * 重置管理器(主要用于测试)
2907
- */
2908
- reset(): void;
2909
- /**
2910
- * 获取已注册的组件类型数量
2911
- */
2912
- get registeredTypeCount(): number;
2913
- }
2914
-
2915
2866
  /**
2916
2867
  * 稀疏集合实现
2917
2868
  *
@@ -3238,6 +3189,25 @@ interface Archetype {
3238
3189
  entities: Set<Entity>;
3239
3190
  }
3240
3191
 
3192
+ /**
3193
+ * 查询条件类型
3194
+ */
3195
+ declare enum QueryConditionType {
3196
+ /** 必须包含所有指定组件 */
3197
+ ALL = "all",
3198
+ /** 必须包含任意一个指定组件 */
3199
+ ANY = "any",
3200
+ /** 不能包含任何指定组件 */
3201
+ NONE = "none"
3202
+ }
3203
+ /**
3204
+ * 查询条件接口
3205
+ */
3206
+ interface QueryCondition {
3207
+ type: QueryConditionType;
3208
+ componentTypes: ComponentType[];
3209
+ mask: BitMask64Data;
3210
+ }
3241
3211
  /**
3242
3212
  * 实体查询结果接口
3243
3213
  */
@@ -3249,6 +3219,202 @@ interface QueryResult {
3249
3219
  /** 是否来自缓存 */
3250
3220
  fromCache: boolean;
3251
3221
  }
3222
+
3223
+ /**
3224
+ * 响应式查询变化类型
3225
+ */
3226
+ declare enum ReactiveQueryChangeType {
3227
+ /** 实体添加到查询结果 */
3228
+ ADDED = "added",
3229
+ /** 实体从查询结果移除 */
3230
+ REMOVED = "removed",
3231
+ /** 查询结果批量更新 */
3232
+ BATCH_UPDATE = "batch_update"
3233
+ }
3234
+ /**
3235
+ * 响应式查询变化事件
3236
+ */
3237
+ interface ReactiveQueryChange {
3238
+ /** 变化类型 */
3239
+ type: ReactiveQueryChangeType;
3240
+ /** 变化的实体 */
3241
+ entity?: Entity;
3242
+ /** 批量变化的实体 */
3243
+ entities?: readonly Entity[];
3244
+ /** 新增的实体列表(仅batch_update时有效) */
3245
+ added?: readonly Entity[];
3246
+ /** 移除的实体列表(仅batch_update时有效) */
3247
+ removed?: readonly Entity[];
3248
+ }
3249
+ /**
3250
+ * 响应式查询监听器
3251
+ */
3252
+ type ReactiveQueryListener = (change: ReactiveQueryChange) => void;
3253
+ /**
3254
+ * 响应式查询配置
3255
+ */
3256
+ interface ReactiveQueryConfig {
3257
+ /** 是否启用批量模式(减少通知频率) */
3258
+ enableBatchMode?: boolean;
3259
+ /** 批量模式的延迟时间(毫秒) */
3260
+ batchDelay?: number;
3261
+ /** 调试模式 */
3262
+ debug?: boolean;
3263
+ }
3264
+ /**
3265
+ * 响应式查询类
3266
+ *
3267
+ * 提供基于事件驱动的实体查询机制,只在实体/组件真正变化时触发通知。
3268
+ *
3269
+ * 核心特性:
3270
+ * - Event-driven: 基于事件的增量更新
3271
+ * - 精确通知: 只通知真正匹配的变化
3272
+ * - 性能优化: 避免每帧重复查询
3273
+ *
3274
+ * @example
3275
+ * ```typescript
3276
+ * // 创建响应式查询
3277
+ * const query = new ReactiveQuery(querySystem, {
3278
+ * type: QueryConditionType.ALL,
3279
+ * componentTypes: [Position, Velocity],
3280
+ * mask: createMask([Position, Velocity])
3281
+ * });
3282
+ *
3283
+ * // 订阅变化
3284
+ * query.subscribe((change) => {
3285
+ * if (change.type === ReactiveQueryChangeType.ADDED) {
3286
+ * console.log('新实体:', change.entity);
3287
+ * }
3288
+ * });
3289
+ *
3290
+ * // 获取当前结果
3291
+ * const entities = query.getEntities();
3292
+ * ```
3293
+ */
3294
+ declare class ReactiveQuery {
3295
+ /** 当前查询结果 */
3296
+ private _entities;
3297
+ /** 实体ID集合,用于快速查找 */
3298
+ private _entityIdSet;
3299
+ /** 查询条件 */
3300
+ private readonly _condition;
3301
+ /** 监听器列表 */
3302
+ private _listeners;
3303
+ /** 配置 */
3304
+ private readonly _config;
3305
+ /** 批量变化缓存 */
3306
+ private _batchChanges;
3307
+ /** 查询ID(用于调试) */
3308
+ private readonly _id;
3309
+ /** 是否已激活 */
3310
+ private _active;
3311
+ constructor(condition: QueryCondition, config?: ReactiveQueryConfig);
3312
+ /**
3313
+ * 生成查询ID
3314
+ */
3315
+ private generateQueryId;
3316
+ /**
3317
+ * 订阅查询变化
3318
+ *
3319
+ * @param listener 监听器函数
3320
+ * @returns 取消订阅的函数
3321
+ */
3322
+ subscribe(listener: ReactiveQueryListener): () => void;
3323
+ /**
3324
+ * 取消所有订阅
3325
+ */
3326
+ unsubscribeAll(): void;
3327
+ /**
3328
+ * 获取当前查询结果
3329
+ */
3330
+ getEntities(): readonly Entity[];
3331
+ /**
3332
+ * 获取查询结果数量
3333
+ */
3334
+ get count(): number;
3335
+ /**
3336
+ * 检查实体是否匹配查询条件
3337
+ *
3338
+ * @param entity 要检查的实体
3339
+ * @returns 是否匹配
3340
+ */
3341
+ matches(entity: Entity): boolean;
3342
+ /**
3343
+ * 通知实体添加
3344
+ *
3345
+ * 当Scene中添加实体时调用
3346
+ *
3347
+ * @param entity 添加的实体
3348
+ */
3349
+ notifyEntityAdded(entity: Entity): void;
3350
+ /**
3351
+ * 通知实体移除
3352
+ *
3353
+ * 当Scene中移除实体时调用
3354
+ *
3355
+ * @param entity 移除的实体
3356
+ */
3357
+ notifyEntityRemoved(entity: Entity): void;
3358
+ /**
3359
+ * 通知实体组件变化
3360
+ *
3361
+ * 当实体的组件发生变化时调用
3362
+ *
3363
+ * @param entity 变化的实体
3364
+ */
3365
+ notifyEntityChanged(entity: Entity): void;
3366
+ /**
3367
+ * 批量初始化查询结果
3368
+ *
3369
+ * @param entities 初始实体列表
3370
+ */
3371
+ initializeWith(entities: readonly Entity[]): void;
3372
+ /**
3373
+ * 添加到批量变化缓存
3374
+ */
3375
+ private addToBatch;
3376
+ /**
3377
+ * 刷新批量变化
3378
+ */
3379
+ private flushBatchChanges;
3380
+ /**
3381
+ * 通知所有监听器
3382
+ */
3383
+ private notifyListeners;
3384
+ /**
3385
+ * 暂停响应式查询
3386
+ *
3387
+ * 暂停后不再响应实体变化,但可以继续获取当前结果
3388
+ */
3389
+ pause(): void;
3390
+ /**
3391
+ * 恢复响应式查询
3392
+ */
3393
+ resume(): void;
3394
+ /**
3395
+ * 销毁响应式查询
3396
+ *
3397
+ * 释放所有资源,清空监听器和结果集
3398
+ */
3399
+ dispose(): void;
3400
+ /**
3401
+ * 获取查询条件
3402
+ */
3403
+ get condition(): QueryCondition;
3404
+ /**
3405
+ * 获取查询ID
3406
+ */
3407
+ get id(): string;
3408
+ /**
3409
+ * 检查是否激活
3410
+ */
3411
+ get active(): boolean;
3412
+ /**
3413
+ * 获取监听器数量
3414
+ */
3415
+ get listenerCount(): number;
3416
+ }
3417
+
3252
3418
  /**
3253
3419
  * 高性能实体查询系统
3254
3420
  *
@@ -3353,7 +3519,7 @@ declare class QuerySystem {
3353
3519
  * 查询包含所有指定组件的实体
3354
3520
  *
3355
3521
  * 返回同时包含所有指定组件类型的实体列表。
3356
- * 系统会自动选择最高效的查询策略,包括索引查找和缓存机制。
3522
+ * 内部使用响应式查询作为智能缓存,自动跟踪实体变化,性能更优。
3357
3523
  *
3358
3524
  * @param componentTypes 要查询的组件类型列表
3359
3525
  * @returns 查询结果,包含匹配的实体和性能信息
@@ -3380,7 +3546,7 @@ declare class QuerySystem {
3380
3546
  * 查询包含任意指定组件的实体
3381
3547
  *
3382
3548
  * 返回包含任意一个指定组件类型的实体列表。
3383
- * 使用集合合并算法确保高效的查询性能。
3549
+ * 内部使用响应式查询作为智能缓存,自动跟踪实体变化,性能更优。
3384
3550
  *
3385
3551
  * @param componentTypes 要查询的组件类型列表
3386
3552
  * @returns 查询结果,包含匹配的实体和性能信息
@@ -3397,7 +3563,7 @@ declare class QuerySystem {
3397
3563
  * 查询不包含任何指定组件的实体
3398
3564
  *
3399
3565
  * 返回不包含任何指定组件类型的实体列表。
3400
- * 适用于排除特定类型实体的查询场景。
3566
+ * 内部使用响应式查询作为智能缓存,自动跟踪实体变化,性能更优。
3401
3567
  *
3402
3568
  * @param componentTypes 要排除的组件类型列表
3403
3569
  * @returns 查询结果,包含匹配的实体和性能信息
@@ -3474,6 +3640,13 @@ declare class QuerySystem {
3474
3640
  * 清除所有查询缓存
3475
3641
  */
3476
3642
  private clearQueryCache;
3643
+ /**
3644
+ * 清除所有响应式查询
3645
+ *
3646
+ * 销毁所有响应式查询实例并清理索引
3647
+ * 通常在setEntities时调用以确保缓存一致性
3648
+ */
3649
+ private clearReactiveQueries;
3477
3650
  /**
3478
3651
  * 高效的缓存键生成
3479
3652
  */
@@ -3482,13 +3655,56 @@ declare class QuerySystem {
3482
3655
  * 清理查询缓存
3483
3656
  *
3484
3657
  * 用于外部调用清理缓存,通常在批量操作后使用。
3658
+ * 注意:此方法也会清理响应式查询缓存
3485
3659
  */
3486
3660
  clearCache(): void;
3661
+ /**
3662
+ * 创建响应式查询
3663
+ *
3664
+ * 响应式查询会自动跟踪实体/组件的变化,并通过事件通知订阅者。
3665
+ * 适合需要实时响应实体变化的场景(如UI更新、AI系统等)。
3666
+ *
3667
+ * @param componentTypes 查询的组件类型列表
3668
+ * @param config 可选的查询配置
3669
+ * @returns 响应式查询实例
3670
+ *
3671
+ * @example
3672
+ * ```typescript
3673
+ * const query = querySystem.createReactiveQuery([Position, Velocity], {
3674
+ * enableBatchMode: true,
3675
+ * batchDelay: 16
3676
+ * });
3677
+ *
3678
+ * query.subscribe((change) => {
3679
+ * if (change.type === ReactiveQueryChangeType.ADDED) {
3680
+ * console.log('新实体:', change.entity);
3681
+ * }
3682
+ * });
3683
+ * ```
3684
+ */
3685
+ createReactiveQuery(componentTypes: ComponentType[], config?: ReactiveQueryConfig): ReactiveQuery;
3686
+ /**
3687
+ * 销毁响应式查询
3688
+ *
3689
+ * 清理查询占用的资源,包括监听器和实体引用。
3690
+ * 销毁后的查询不应再被使用。
3691
+ *
3692
+ * @param query 要销毁的响应式查询
3693
+ *
3694
+ * @example
3695
+ * ```typescript
3696
+ * const query = querySystem.createReactiveQuery([Position, Velocity]);
3697
+ * // ... 使用查询
3698
+ * querySystem.destroyReactiveQuery(query);
3699
+ * ```
3700
+ */
3701
+ destroyReactiveQuery(query: ReactiveQuery): void;
3487
3702
  /**
3488
3703
  * 创建组件掩码
3489
3704
  *
3490
3705
  * 根据组件类型列表生成对应的位掩码。
3491
3706
  * 使用缓存避免重复计算。
3707
+ * 注意:必须使用ComponentRegistry来确保与Entity.componentMask使用相同的bitIndex
3492
3708
  *
3493
3709
  * @param componentTypes 组件类型列表
3494
3710
  * @returns 生成的位掩码
@@ -3540,6 +3756,67 @@ declare class QuerySystem {
3540
3756
  * @param entity 要查询的实体
3541
3757
  */
3542
3758
  getEntityArchetype(entity: Entity): Archetype | undefined;
3759
+ /**
3760
+ * 响应式查询集合(内部使用,作为智能缓存)
3761
+ * 传统查询API(queryAll/queryAny/queryNone)内部自动使用响应式查询优化性能
3762
+ */
3763
+ private _reactiveQueries;
3764
+ /**
3765
+ * 按组件类型索引的响应式查询
3766
+ * 用于快速定位哪些查询关心某个组件类型
3767
+ */
3768
+ private _reactiveQueriesByComponent;
3769
+ /**
3770
+ * 获取或创建内部响应式查询(作为智能缓存)
3771
+ *
3772
+ * @param queryType 查询类型
3773
+ * @param componentTypes 组件类型列表
3774
+ * @returns 响应式查询实例
3775
+ */
3776
+ private getOrCreateReactiveQuery;
3777
+ /**
3778
+ * 执行传统查询(内部使用,用于响应式查询初始化)
3779
+ *
3780
+ * @param queryType 查询类型
3781
+ * @param componentTypes 组件类型列表
3782
+ * @returns 匹配的实体列表
3783
+ */
3784
+ private executeTraditionalQuery;
3785
+ /**
3786
+ * 通知所有响应式查询实体已添加
3787
+ *
3788
+ * 使用组件类型索引,只通知关心该实体组件的查询
3789
+ *
3790
+ * @param entity 添加的实体
3791
+ */
3792
+ private notifyReactiveQueriesEntityAdded;
3793
+ /**
3794
+ * 通知响应式查询实体已移除
3795
+ *
3796
+ * 使用组件类型索引,只通知关心该实体组件的查询
3797
+ *
3798
+ * @param entity 移除的实体
3799
+ * @param componentTypes 实体移除前的组件类型列表
3800
+ */
3801
+ private notifyReactiveQueriesEntityRemoved;
3802
+ /**
3803
+ * 通知响应式查询实体已移除(后备方案)
3804
+ *
3805
+ * 当实体已经清空组件时使用,通知所有查询
3806
+ *
3807
+ * @param entity 移除的实体
3808
+ */
3809
+ private notifyReactiveQueriesEntityRemovedFallback;
3810
+ /**
3811
+ * 通知响应式查询实体已变化
3812
+ *
3813
+ * 使用混合策略:
3814
+ * 1. 首先通知关心实体当前组件的查询
3815
+ * 2. 然后通知所有其他查询(包括那些可能因为组件移除而不再匹配的查询)
3816
+ *
3817
+ * @param entity 变化的实体
3818
+ */
3819
+ private notifyReactiveQueriesEntityChanged;
3543
3820
  }
3544
3821
  /**
3545
3822
  * 查询构建器
@@ -4100,7 +4377,7 @@ declare class TypedQueryBuilder<TAll extends readonly ComponentConstructor[] = [
4100
4377
  *
4101
4378
  * @returns 查询条件对象
4102
4379
  */
4103
- getCondition(): QueryCondition;
4380
+ getCondition(): QueryCondition$1;
4104
4381
  /**
4105
4382
  * 获取required组件类型(用于类型推断)
4106
4383
  */
@@ -5082,7 +5359,7 @@ declare class Scene implements IScene {
5082
5359
  * @Injectable()
5083
5360
  * class PhysicsSystem extends EntitySystem {
5084
5361
  * constructor(@Inject(CollisionSystem) private collision: CollisionSystem) {
5085
- * super(Matcher.of(Transform));
5362
+ * super(Matcher.empty().all(Transform));
5086
5363
  * }
5087
5364
  * }
5088
5365
  * scene.addEntityProcessor(PhysicsSystem);
@@ -5107,7 +5384,7 @@ declare class Scene implements IScene {
5107
5384
  * @Injectable()
5108
5385
  * @ECSSystem('Collision', { updateOrder: 5 })
5109
5386
  * class CollisionSystem extends EntitySystem implements IService {
5110
- * constructor() { super(Matcher.of(Collider)); }
5387
+ * constructor() { super(Matcher.empty().all(Collider)); }
5111
5388
  * dispose() {}
5112
5389
  * }
5113
5390
  *
@@ -5115,7 +5392,7 @@ declare class Scene implements IScene {
5115
5392
  * @ECSSystem('Physics', { updateOrder: 10 })
5116
5393
  * class PhysicsSystem extends EntitySystem implements IService {
5117
5394
  * constructor(@Inject(CollisionSystem) private collision: CollisionSystem) {
5118
- * super(Matcher.of(Transform, RigidBody));
5395
+ * super(Matcher.empty().all(Transform, RigidBody));
5119
5396
  * }
5120
5397
  * dispose() {}
5121
5398
  * }
@@ -5358,7 +5635,7 @@ declare class Scene implements IScene {
5358
5635
  * // 传统方式
5359
5636
  * class MovementSystem extends EntitySystem {
5360
5637
  * constructor() {
5361
- * super(Matcher.of(Transform, Velocity));
5638
+ * super(Matcher.empty().all(Transform, Velocity));
5362
5639
  * }
5363
5640
  *
5364
5641
  * protected process(entities: readonly Entity[]): void {
@@ -5373,7 +5650,7 @@ declare class Scene implements IScene {
5373
5650
  * // 类型安全方式
5374
5651
  * class MovementSystem extends EntitySystem<[typeof Transform, typeof Velocity]> {
5375
5652
  * constructor() {
5376
- * super(Matcher.of(Transform, Velocity));
5653
+ * super(Matcher.empty().all(Transform, Velocity));
5377
5654
  * }
5378
5655
  *
5379
5656
  * protected process(entities: readonly Entity[]): void {
@@ -6974,7 +7251,7 @@ interface SystemMetadata {
6974
7251
  * @ECSSystem('Physics', { updateOrder: 10 })
6975
7252
  * class PhysicsSystem extends EntitySystem {
6976
7253
  * constructor(@Inject(CollisionSystem) private collision: CollisionSystem) {
6977
- * super(Matcher.of(Transform, RigidBody));
7254
+ * super(Matcher.empty().all(Transform, RigidBody));
6978
7255
  * }
6979
7256
  * }
6980
7257
  * ```
@@ -9039,14 +9316,26 @@ declare class WebSocketManager {
9039
9316
  private handleConnectionFailure;
9040
9317
  }
9041
9318
 
9319
+ /**
9320
+ * 调试配置服务
9321
+ *
9322
+ * 管理调试系统的配置信息
9323
+ */
9324
+ declare class DebugConfigService implements IService {
9325
+ private _config;
9326
+ constructor();
9327
+ setConfig(config: IECSDebugConfig): void;
9328
+ getConfig(): IECSDebugConfig;
9329
+ isEnabled(): boolean;
9330
+ dispose(): void;
9331
+ }
9332
+
9042
9333
  /**
9043
9334
  * 调试管理器
9044
9335
  *
9045
9336
  * 整合所有调试数据收集器,负责收集和发送调试数据
9046
- *
9047
- * 通过构造函数接收SceneManager和PerformanceMonitor,避免直接依赖Core实例
9048
9337
  */
9049
- declare class DebugManager implements IService {
9338
+ declare class DebugManager implements IService, IUpdatable {
9050
9339
  private config;
9051
9340
  private webSocketManager;
9052
9341
  private entityCollector;
@@ -9060,13 +9349,7 @@ declare class DebugManager implements IService {
9060
9349
  private lastSendTime;
9061
9350
  private sendInterval;
9062
9351
  private isRunning;
9063
- /**
9064
- * 构造调试管理器
9065
- * @param sceneManager 场景管理器
9066
- * @param performanceMonitor 性能监控器
9067
- * @param config 调试配置
9068
- */
9069
- constructor(sceneManager: SceneManager, performanceMonitor: PerformanceMonitor, config: IECSDebugConfig);
9352
+ constructor(sceneManager: SceneManager, performanceMonitor: PerformanceMonitor, configService: DebugConfigService);
9070
9353
  /**
9071
9354
  * 启动调试管理器
9072
9355
  */
@@ -9079,10 +9362,7 @@ declare class DebugManager implements IService {
9079
9362
  * 更新配置
9080
9363
  */
9081
9364
  updateConfig(config: IECSDebugConfig): void;
9082
- /**
9083
- * 帧更新回调
9084
- */
9085
- onFrameUpdate(deltaTime: number): void;
9365
+ update(deltaTime?: number): void;
9086
9366
  /**
9087
9367
  * 场景变更回调
9088
9368
  */
@@ -9785,6 +10065,11 @@ interface InjectableMetadata {
9785
10065
  * 依赖列表
9786
10066
  */
9787
10067
  dependencies: Array<ServiceType<any> | string | symbol>;
10068
+ /**
10069
+ * 属性注入映射
10070
+ * key: 属性名, value: 服务类型
10071
+ */
10072
+ properties?: Map<string | symbol, ServiceType<any>>;
9788
10073
  }
9789
10074
  /**
9790
10075
  * 可更新元数据接口
@@ -9858,20 +10143,7 @@ declare function Updatable(priority?: number): ClassDecorator;
9858
10143
  *
9859
10144
  * 标记构造函数参数需要注入的服务类型
9860
10145
  *
9861
- * @param serviceType 服务类型标识符(类、字符串或Symbol)
9862
- *
9863
- * @example
9864
- * ```typescript
9865
- * @Injectable()
9866
- * class MySystem extends EntitySystem {
9867
- * constructor(
9868
- * @Inject(TimeService) private timeService: TimeService,
9869
- * @Inject(PhysicsService) private physics: PhysicsService
9870
- * ) {
9871
- * super();
9872
- * }
9873
- * }
9874
- * ```
10146
+ * @param serviceType 服务类型标识符
9875
10147
  */
9876
10148
  declare function Inject(serviceType: ServiceType<any> | string | symbol): ParameterDecorator;
9877
10149
  /**
@@ -10552,5 +10824,5 @@ declare function getFullPlatformConfig(): Promise<any>;
10552
10824
  declare function supportsFeature(feature: 'worker' | 'shared-array-buffer' | 'transferable-objects' | 'module-worker'): boolean;
10553
10825
  declare function hasAdapter(): boolean;
10554
10826
 
10555
- export { AutoTyped, BitMask64Utils, Bits, COMPONENT_TYPE_NAME, ChangeOperation, Colors, Component, ComponentDataCollector, ComponentPool, ComponentPoolManager, ComponentRegistry, ComponentSerializer, ComponentSparseSet, ComponentStorage, ComponentTypeManager, ConsoleLogger, Core, DebugManager, DeepCopy, ECSComponent, ECSEventType, ECSFluentAPI, ECSSystem, ENTITY_REF_METADATA, EVENT_TYPES, Emitter, EnableSoA, Entity, EntityDataCollector, EntityList, EntityProcessorList, EntityRef, EntitySerializer, EntitySystem, EventBus, EventPriority, EventTypeValidator, Float32, Float64, FuncPack, GlobalEventBus, GlobalManager, HighPrecision, IdentifierPool, IgnoreSerialization, IncrementalSerializer, Inject, Injectable, Int16, Int32, Int8, IntervalSystem, LogLevel, Logger, LoggerManager, Matcher, MigrationBuilder, NumberExtension, PassiveSystem, PerformanceDataCollector, PerformanceMonitor, PerformanceWarningType, PlatformDetector, PlatformManager, PluginManager, PluginState, Pool, PoolManager, ProcessingSystem, QuerySystem, ReferenceTracker, SERIALIZABLE_METADATA, SERIALIZE_FIELD, SERIALIZE_OPTIONS, SYSTEM_TYPE_NAME, Scene, SceneDataCollector, SceneManager, SceneSerializer, Serializable, Serialize, SerializeArray, SerializeAsMap, SerializeAsSet, SerializeMap, SerializeSet, ServiceContainer, ServiceLifetime, SoAStorage, SparseSet, SystemDataCollector, Time, Timer, TimerManager, TypeInference, TypeSafeEventSystem, TypeUtils, TypedEntityBuilder, TypedQueryBuilder, TypedQueryResult, Uint16, Uint32, Uint8, Uint8Clamped, Updatable, VersionMigrationManager, WebSocketManager, WorkerEntitySystem, World, WorldManager, addAndConfigure, buildEntity, createECSAPI, createInstance, createLogger, createQuery, getBasicWorkerConfig, getComponentInstanceTypeName, getComponentTypeName, getComponents, getCurrentAdapter, getEntityRefMetadata, getFullPlatformConfig, getOrAddComponent, getSceneByEntityId, getSerializationMetadata, getSystemInstanceTypeName, getSystemMetadata, getSystemTypeName, getUpdatableMetadata, hasAdapter, hasAnyComponent, hasComponents, hasEntityRef, isComponentArray, isComponentType, isSerializable, isUpdatable, queryFor, queryForAll, registerInjectable, registerPlatformAdapter, requireComponent, resetLoggerColors, setGlobalLogLevel, setLoggerColors, supportsFeature, tryGetComponent, updateComponent };
10556
- export type { AnyComponentConstructor, BitMask64Data, ComponentChange, ComponentConstructor, ComponentInstance, ComponentMigrationFunction, ComponentType$1 as ComponentType, ComponentTypeMap, ComponentTypeName, ComponentTypeNames, DataOnly, DeepPartial, DeepReadonly, DeserializationStrategy, EntityChange, EntityRefMetadata, EntityRefRecord, EntityWithComponents, EventListenerConfig, EventStats, ExtractComponents, FieldSerializeOptions, IComponent, IComponentDebugData, IComponentEventData, ICoreConfig, IECSDebugConfig, IECSDebugData, IEntityDebugData, IEntityEventData, IEntityHierarchyNode, IEventBus, IEventData, IEventListenerConfig, IEventStats, ILogger, IPerformanceDebugData, IPerformanceEventData, IPlatformAdapter, IPlugin, IPluginMetadata, IPoolable, IScene, ISceneConfig, ISceneDebugData, ISceneEventData, ISceneFactory, IService, ISystemBase, ISystemDebugData, ISystemEventData, ITimer, IUpdatable, IWorldConfig, IWorldManagerConfig, IncrementalSerializationFormat, IncrementalSerializationOptions, IncrementalSnapshot, InjectableMetadata, LoggerColorConfig, LoggerConfig, MigrationFunction, PartialComponent, PerformanceData, PerformanceStats, PerformanceThresholds, PerformanceWarning, PlatformConfig, PlatformDetectionResult, PlatformWorker, PoolStats, QueryResult$1 as QueryResult, ReadonlyComponent, SceneDataChange, SceneDeserializationOptions, SceneMigrationFunction, SceneSerializationOptions, SerializableComponent, SerializableFields, SerializableOptions, SerializationFormat, SerializationMetadata, SerializedComponent, SerializedEntity, SerializedScene, ServiceType, SharedArrayBufferProcessFunction, SupportedTypedArray, SystemEntityType, SystemLifecycleHooks, SystemMetadata, TypeSafeBuilder, TypedEventHandler, TypedQueryCondition, UpdatableMetadata, ValidComponent, ValidComponentArray, WorkerCreationOptions, WorkerProcessFunction, WorkerSystemConfig };
10827
+ export { AutoTyped, BitMask64Utils, Bits, COMPONENT_TYPE_NAME, ChangeOperation, Colors, Component, ComponentDataCollector, ComponentPool, ComponentPoolManager, ComponentRegistry, ComponentSerializer, ComponentSparseSet, ComponentStorage, ConsoleLogger, Core, DebugConfigService, DebugManager, DeepCopy, ECSComponent, ECSEventType, ECSFluentAPI, ECSSystem, ENTITY_REF_METADATA, EVENT_TYPES, Emitter, EnableSoA, Entity, EntityDataCollector, EntityList, EntityProcessorList, EntityRef, EntitySerializer, EntitySystem, EventBus, EventPriority, EventTypeValidator, Float32, Float64, FuncPack, GlobalEventBus, GlobalManager, HighPrecision, IdentifierPool, IgnoreSerialization, IncrementalSerializer, Inject, Injectable, Int16, Int32, Int8, IntervalSystem, LogLevel, Logger, LoggerManager, Matcher, MigrationBuilder, NumberExtension, PassiveSystem, PerformanceDataCollector, PerformanceMonitor, PerformanceWarningType, PlatformDetector, PlatformManager, PluginManager, PluginState, Pool, PoolManager, ProcessingSystem, QuerySystem, ReactiveQuery, ReactiveQueryChangeType, ReferenceTracker, SERIALIZABLE_METADATA, SERIALIZE_FIELD, SERIALIZE_OPTIONS, SYSTEM_TYPE_NAME, Scene, SceneDataCollector, SceneManager, SceneSerializer, Serializable, Serialize, SerializeArray, SerializeAsMap, SerializeAsSet, SerializeMap, SerializeSet, ServiceContainer, ServiceLifetime, SoAStorage, SparseSet, SystemDataCollector, Time, Timer, TimerManager, TypeInference, TypeSafeEventSystem, TypeUtils, TypedEntityBuilder, TypedQueryBuilder, TypedQueryResult, Uint16, Uint32, Uint8, Uint8Clamped, Updatable, VersionMigrationManager, WebSocketManager, WorkerEntitySystem, World, WorldManager, addAndConfigure, buildEntity, createECSAPI, createInstance, createLogger, createQuery, getBasicWorkerConfig, getComponentInstanceTypeName, getComponentTypeName, getComponents, getCurrentAdapter, getEntityRefMetadata, getFullPlatformConfig, getOrAddComponent, getSceneByEntityId, getSerializationMetadata, getSystemInstanceTypeName, getSystemMetadata, getSystemTypeName, getUpdatableMetadata, hasAdapter, hasAnyComponent, hasComponents, hasEntityRef, isComponentArray, isComponentType, isSerializable, isUpdatable, queryFor, queryForAll, registerInjectable, registerPlatformAdapter, requireComponent, resetLoggerColors, setGlobalLogLevel, setLoggerColors, supportsFeature, tryGetComponent, updateComponent };
10828
+ export type { AnyComponentConstructor, BitMask64Data, ComponentChange, ComponentConstructor, ComponentInstance, ComponentMigrationFunction, ComponentType$1 as ComponentType, ComponentTypeMap, ComponentTypeName, ComponentTypeNames, DataOnly, DeepPartial, DeepReadonly, DeserializationStrategy, EntityChange, EntityRefMetadata, EntityRefRecord, EntityWithComponents, EventListenerConfig, EventStats, ExtractComponents, FieldSerializeOptions, IComponent, IComponentDebugData, IComponentEventData, ICoreConfig, IECSDebugConfig, IECSDebugData, IEntityDebugData, IEntityEventData, IEntityHierarchyNode, IEventBus, IEventData, IEventListenerConfig, IEventStats, ILogger, IPerformanceDebugData, IPerformanceEventData, IPlatformAdapter, IPlugin, IPluginMetadata, IPoolable, IScene, ISceneConfig, ISceneDebugData, ISceneEventData, ISceneFactory, IService, ISystemBase, ISystemDebugData, ISystemEventData, ITimer, IUpdatable, IWorldConfig, IWorldManagerConfig, IncrementalSerializationFormat, IncrementalSerializationOptions, IncrementalSnapshot, InjectableMetadata, LoggerColorConfig, LoggerConfig, MigrationFunction, PartialComponent, PerformanceData, PerformanceStats, PerformanceThresholds, PerformanceWarning, PlatformConfig, PlatformDetectionResult, PlatformWorker, PoolStats, QueryResult$1 as QueryResult, ReactiveQueryChange, ReactiveQueryConfig, ReactiveQueryListener, ReadonlyComponent, SceneDataChange, SceneDeserializationOptions, SceneMigrationFunction, SceneSerializationOptions, SerializableComponent, SerializableFields, SerializableOptions, SerializationFormat, SerializationMetadata, SerializedComponent, SerializedEntity, SerializedScene, ServiceType, SharedArrayBufferProcessFunction, SupportedTypedArray, SystemEntityType, SystemLifecycleHooks, SystemMetadata, TypeSafeBuilder, TypedEventHandler, TypedQueryCondition, UpdatableMetadata, ValidComponent, ValidComponentArray, WorkerCreationOptions, WorkerProcessFunction, WorkerSystemConfig };