@esengine/ecs-framework 2.4.4 → 2.5.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @esengine/ecs-framework v2.4.4
2
+ * @esengine/ecs-framework v2.5.0
3
3
  * TypeScript definitions
4
4
  */
5
5
  /**
@@ -6367,7 +6367,9 @@ declare class Scene implements IScene {
6367
6367
  */
6368
6368
  end(): void;
6369
6369
  /**
6370
- * 更新场景
6370
+ * @zh 更新场景
6371
+ * @en Update scene
6372
+ * @internal 由 SceneManager 或 World 调用,用户不应直接调用
6371
6373
  */
6372
6374
  update(): void;
6373
6375
  /**
@@ -11498,18 +11500,9 @@ declare class SceneManager implements IService {
11498
11500
  */
11499
11501
  get api(): ECSFluentAPI | null;
11500
11502
  /**
11501
- * 更新场景
11502
- *
11503
- * 应该在每帧的游戏循环中调用。
11504
- * 会自动处理延迟场景切换。
11505
- *
11506
- * @example
11507
- * ```typescript
11508
- * function gameLoop(deltaTime: number) {
11509
- * Core.update(deltaTime);
11510
- * sceneManager.update(); // 每帧调用
11511
- * }
11512
- * ```
11503
+ * @zh 更新场景
11504
+ * @en Update scene
11505
+ * @internal 由 Core.update() 调用,用户不应直接调用
11513
11506
  */
11514
11507
  update(): void;
11515
11508
  /**
@@ -11993,9 +11986,7 @@ declare class WorldManager implements IService {
11993
11986
  /**
11994
11987
  * @zh 更新所有活跃的World
11995
11988
  * @en Update all active Worlds
11996
- *
11997
- * @zh 应该在每帧的游戏循环中调用
11998
- * @en Should be called in each frame of game loop
11989
+ * @internal 由 Core.update() 调用,用户不应直接调用
11999
11990
  */
12000
11991
  updateAll(): void;
12001
11992
  /**
@@ -13000,6 +12991,875 @@ declare function isHidden(entityTag: number): boolean;
13000
12991
  */
13001
12992
  declare function isLocked(entityTag: number): boolean;
13002
12993
 
12994
+ /**
12995
+ * @zh 网络同步类型定义
12996
+ * @en Network synchronization type definitions
12997
+ */
12998
+ /**
12999
+ * @zh 支持的同步数据类型
13000
+ * @en Supported sync data types
13001
+ */
13002
+ type SyncType = 'boolean' | 'int8' | 'uint8' | 'int16' | 'uint16' | 'int32' | 'uint32' | 'float32' | 'float64' | 'string';
13003
+ /**
13004
+ * @zh 同步字段元数据
13005
+ * @en Sync field metadata
13006
+ */
13007
+ interface SyncFieldMetadata {
13008
+ /**
13009
+ * @zh 字段索引(用于二进制编码)
13010
+ * @en Field index (for binary encoding)
13011
+ */
13012
+ index: number;
13013
+ /**
13014
+ * @zh 字段名称
13015
+ * @en Field name
13016
+ */
13017
+ name: string;
13018
+ /**
13019
+ * @zh 字段类型
13020
+ * @en Field type
13021
+ */
13022
+ type: SyncType;
13023
+ }
13024
+ /**
13025
+ * @zh 组件同步元数据
13026
+ * @en Component sync metadata
13027
+ */
13028
+ interface SyncMetadata {
13029
+ /**
13030
+ * @zh 组件类型 ID
13031
+ * @en Component type ID
13032
+ */
13033
+ typeId: string;
13034
+ /**
13035
+ * @zh 同步字段列表(按索引排序)
13036
+ * @en Sync fields list (sorted by index)
13037
+ */
13038
+ fields: SyncFieldMetadata[];
13039
+ /**
13040
+ * @zh 字段名到索引的映射
13041
+ * @en Field name to index mapping
13042
+ */
13043
+ fieldIndexMap: Map<string, number>;
13044
+ }
13045
+ /**
13046
+ * @zh 同步操作类型
13047
+ * @en Sync operation type
13048
+ */
13049
+ declare enum SyncOperation {
13050
+ /**
13051
+ * @zh 完整快照
13052
+ * @en Full snapshot
13053
+ */
13054
+ FULL = 0,
13055
+ /**
13056
+ * @zh 增量更新
13057
+ * @en Delta update
13058
+ */
13059
+ DELTA = 1,
13060
+ /**
13061
+ * @zh 实体生成
13062
+ * @en Entity spawn
13063
+ */
13064
+ SPAWN = 2,
13065
+ /**
13066
+ * @zh 实体销毁
13067
+ * @en Entity despawn
13068
+ */
13069
+ DESPAWN = 3
13070
+ }
13071
+ /**
13072
+ * @zh 各类型的字节大小
13073
+ * @en Byte size for each type
13074
+ */
13075
+ declare const TYPE_SIZES: Record<SyncType, number>;
13076
+ /**
13077
+ * @zh 同步元数据的 Symbol 键
13078
+ * @en Symbol key for sync metadata
13079
+ */
13080
+ declare const SYNC_METADATA: unique symbol;
13081
+ /**
13082
+ * @zh 变更追踪器的 Symbol 键
13083
+ * @en Symbol key for change tracker
13084
+ */
13085
+ declare const CHANGE_TRACKER: unique symbol;
13086
+
13087
+ /**
13088
+ * @zh 组件变更追踪器
13089
+ * @en Component change tracker
13090
+ *
13091
+ * @zh 用于追踪 @sync 标记字段的变更,支持增量同步
13092
+ * @en Tracks changes to @sync marked fields for delta synchronization
13093
+ */
13094
+ declare class ChangeTracker {
13095
+ /**
13096
+ * @zh 脏字段索引集合
13097
+ * @en Set of dirty field indices
13098
+ */
13099
+ private _dirtyFields;
13100
+ /**
13101
+ * @zh 是否有任何变更
13102
+ * @en Whether there are any changes
13103
+ */
13104
+ private _hasChanges;
13105
+ /**
13106
+ * @zh 上次同步的时间戳
13107
+ * @en Last sync timestamp
13108
+ */
13109
+ private _lastSyncTime;
13110
+ /**
13111
+ * @zh 标记字段为脏
13112
+ * @en Mark field as dirty
13113
+ *
13114
+ * @param fieldIndex - @zh 字段索引 @en Field index
13115
+ */
13116
+ setDirty(fieldIndex: number): void;
13117
+ /**
13118
+ * @zh 检查是否有变更
13119
+ * @en Check if there are any changes
13120
+ */
13121
+ hasChanges(): boolean;
13122
+ /**
13123
+ * @zh 检查特定字段是否脏
13124
+ * @en Check if a specific field is dirty
13125
+ *
13126
+ * @param fieldIndex - @zh 字段索引 @en Field index
13127
+ */
13128
+ isDirty(fieldIndex: number): boolean;
13129
+ /**
13130
+ * @zh 获取所有脏字段索引
13131
+ * @en Get all dirty field indices
13132
+ */
13133
+ getDirtyFields(): number[];
13134
+ /**
13135
+ * @zh 获取脏字段数量
13136
+ * @en Get number of dirty fields
13137
+ */
13138
+ getDirtyCount(): number;
13139
+ /**
13140
+ * @zh 清除所有变更标记
13141
+ * @en Clear all change marks
13142
+ */
13143
+ clear(): void;
13144
+ /**
13145
+ * @zh 清除特定字段的变更标记
13146
+ * @en Clear change mark for a specific field
13147
+ *
13148
+ * @param fieldIndex - @zh 字段索引 @en Field index
13149
+ */
13150
+ clearField(fieldIndex: number): void;
13151
+ /**
13152
+ * @zh 获取上次同步时间
13153
+ * @en Get last sync time
13154
+ */
13155
+ get lastSyncTime(): number;
13156
+ /**
13157
+ * @zh 标记所有字段为脏(用于首次同步)
13158
+ * @en Mark all fields as dirty (for initial sync)
13159
+ *
13160
+ * @param fieldCount - @zh 字段数量 @en Field count
13161
+ */
13162
+ markAllDirty(fieldCount: number): void;
13163
+ /**
13164
+ * @zh 重置追踪器
13165
+ * @en Reset tracker
13166
+ */
13167
+ reset(): void;
13168
+ }
13169
+
13170
+ /**
13171
+ * @zh 网络同步装饰器
13172
+ * @en Network synchronization decorators
13173
+ *
13174
+ * @zh 提供 @sync 装饰器,用于标记需要网络同步的 Component 字段
13175
+ * @en Provides @sync decorator to mark Component fields for network synchronization
13176
+ */
13177
+
13178
+ /**
13179
+ * @zh 同步字段装饰器
13180
+ * @en Sync field decorator
13181
+ *
13182
+ * @zh 标记 Component 字段为可网络同步。被标记的字段会自动追踪变更,
13183
+ * 并在值修改时触发变更追踪器。
13184
+ * @en Marks a Component field for network synchronization. Marked fields
13185
+ * automatically track changes and trigger the change tracker on modification.
13186
+ *
13187
+ * @param type - @zh 字段的同步类型 @en Sync type of the field
13188
+ *
13189
+ * @example
13190
+ * ```typescript
13191
+ * import { Component, ECSComponent } from '@esengine/ecs-framework';
13192
+ * import { sync } from '@esengine/ecs-framework';
13193
+ *
13194
+ * @ECSComponent('Player')
13195
+ * class PlayerComponent extends Component {
13196
+ * @sync("string") name: string = "";
13197
+ * @sync("uint16") score: number = 0;
13198
+ * @sync("float32") x: number = 0;
13199
+ * @sync("float32") y: number = 0;
13200
+ *
13201
+ * // 不带 @sync 的字段不会同步
13202
+ * // Fields without @sync will not be synchronized
13203
+ * localData: any;
13204
+ * }
13205
+ * ```
13206
+ */
13207
+ declare function sync(type: SyncType): (target: any, propertyKey: string) => void;
13208
+ /**
13209
+ * @zh 获取组件类的同步元数据
13210
+ * @en Get sync metadata for a component class
13211
+ *
13212
+ * @param componentClass - @zh 组件类或组件实例 @en Component class or instance
13213
+ * @returns @zh 同步元数据,如果不存在则返回 null @en Sync metadata, or null if not exists
13214
+ */
13215
+ declare function getSyncMetadata(componentClass: any): SyncMetadata | null;
13216
+ /**
13217
+ * @zh 检查组件是否有同步字段
13218
+ * @en Check if a component has sync fields
13219
+ *
13220
+ * @param component - @zh 组件类或组件实例 @en Component class or instance
13221
+ * @returns @zh 如果有同步字段返回 true @en Returns true if has sync fields
13222
+ */
13223
+ declare function hasSyncFields(component: any): boolean;
13224
+ /**
13225
+ * @zh 获取组件实例的变更追踪器
13226
+ * @en Get change tracker of a component instance
13227
+ *
13228
+ * @param component - @zh 组件实例 @en Component instance
13229
+ * @returns @zh 变更追踪器,如果不存在则返回 null @en Change tracker, or null if not exists
13230
+ */
13231
+ declare function getChangeTracker(component: any): ChangeTracker | null;
13232
+ /**
13233
+ * @zh 为组件实例初始化变更追踪器
13234
+ * @en Initialize change tracker for a component instance
13235
+ *
13236
+ * @zh 这个函数应该在组件首次添加到实体时调用。
13237
+ * 它会创建变更追踪器并标记所有字段为脏(用于首次同步)。
13238
+ * @en This function should be called when a component is first added to an entity.
13239
+ * It creates the change tracker and marks all fields as dirty (for initial sync).
13240
+ *
13241
+ * @param component - @zh 组件实例 @en Component instance
13242
+ * @returns @zh 变更追踪器 @en Change tracker
13243
+ */
13244
+ declare function initChangeTracker(component: any): ChangeTracker;
13245
+ /**
13246
+ * @zh 清除组件实例的变更标记
13247
+ * @en Clear change marks for a component instance
13248
+ *
13249
+ * @zh 通常在同步完成后调用,清除所有脏标记
13250
+ * @en Usually called after sync is complete, clears all dirty marks
13251
+ *
13252
+ * @param component - @zh 组件实例 @en Component instance
13253
+ */
13254
+ declare function clearChanges(component: any): void;
13255
+ /**
13256
+ * @zh 检查组件是否有变更
13257
+ * @en Check if a component has changes
13258
+ *
13259
+ * @param component - @zh 组件实例 @en Component instance
13260
+ * @returns @zh 如果有变更返回 true @en Returns true if has changes
13261
+ */
13262
+ declare function hasChanges(component: any): boolean;
13263
+
13264
+ /**
13265
+ * @zh 变长整数编解码
13266
+ * @en Variable-length integer encoding/decoding
13267
+ *
13268
+ * @zh 使用 LEB128 编码方式,可变长度编码正整数。
13269
+ * 小数值使用更少字节,大数值使用更多字节。
13270
+ * @en Uses LEB128 encoding for variable-length integer encoding.
13271
+ * Small values use fewer bytes, large values use more bytes.
13272
+ *
13273
+ * | 值范围 | 字节数 |
13274
+ * |--------|--------|
13275
+ * | 0-127 | 1 |
13276
+ * | 128-16383 | 2 |
13277
+ * | 16384-2097151 | 3 |
13278
+ * | 2097152-268435455 | 4 |
13279
+ * | 268435456+ | 5 |
13280
+ */
13281
+ /**
13282
+ * @zh 计算变长整数所需的字节数
13283
+ * @en Calculate bytes needed for a varint
13284
+ *
13285
+ * @param value - @zh 整数值 @en Integer value
13286
+ * @returns @zh 所需字节数 @en Bytes needed
13287
+ */
13288
+ declare function varintSize(value: number): number;
13289
+ /**
13290
+ * @zh 编码变长整数到字节数组
13291
+ * @en Encode varint to byte array
13292
+ *
13293
+ * @param value - @zh 要编码的整数 @en Integer to encode
13294
+ * @param buffer - @zh 目标缓冲区 @en Target buffer
13295
+ * @param offset - @zh 写入偏移 @en Write offset
13296
+ * @returns @zh 写入后的新偏移 @en New offset after writing
13297
+ */
13298
+ declare function encodeVarint(value: number, buffer: Uint8Array, offset: number): number;
13299
+ /**
13300
+ * @zh 从字节数组解码变长整数
13301
+ * @en Decode varint from byte array
13302
+ *
13303
+ * @param buffer - @zh 源缓冲区 @en Source buffer
13304
+ * @param offset - @zh 读取偏移 @en Read offset
13305
+ * @returns @zh [解码值, 新偏移] @en [decoded value, new offset]
13306
+ */
13307
+ declare function decodeVarint(buffer: Uint8Array, offset: number): [number, number];
13308
+ /**
13309
+ * @zh 编码有符号整数(ZigZag 编码)
13310
+ * @en Encode signed integer (ZigZag encoding)
13311
+ *
13312
+ * @zh ZigZag 编码将有符号整数映射到无符号整数:
13313
+ * 0 → 0, -1 → 1, 1 → 2, -2 → 3, 2 → 4, ...
13314
+ * 这样小的负数也能用较少字节表示。
13315
+ * @en ZigZag encoding maps signed integers to unsigned:
13316
+ * 0 → 0, -1 → 1, 1 → 2, -2 → 3, 2 → 4, ...
13317
+ * This allows small negative numbers to use fewer bytes.
13318
+ *
13319
+ * @param value - @zh 有符号整数 @en Signed integer
13320
+ * @returns @zh ZigZag 编码后的值 @en ZigZag encoded value
13321
+ */
13322
+ declare function zigzagEncode(value: number): number;
13323
+ /**
13324
+ * @zh 解码有符号整数(ZigZag 解码)
13325
+ * @en Decode signed integer (ZigZag decoding)
13326
+ *
13327
+ * @param value - @zh ZigZag 编码的值 @en ZigZag encoded value
13328
+ * @returns @zh 原始有符号整数 @en Original signed integer
13329
+ */
13330
+ declare function zigzagDecode(value: number): number;
13331
+ /**
13332
+ * @zh 编码有符号变长整数
13333
+ * @en Encode signed varint
13334
+ *
13335
+ * @param value - @zh 有符号整数 @en Signed integer
13336
+ * @param buffer - @zh 目标缓冲区 @en Target buffer
13337
+ * @param offset - @zh 写入偏移 @en Write offset
13338
+ * @returns @zh 写入后的新偏移 @en New offset after writing
13339
+ */
13340
+ declare function encodeSignedVarint(value: number, buffer: Uint8Array, offset: number): number;
13341
+ /**
13342
+ * @zh 解码有符号变长整数
13343
+ * @en Decode signed varint
13344
+ *
13345
+ * @param buffer - @zh 源缓冲区 @en Source buffer
13346
+ * @param offset - @zh 读取偏移 @en Read offset
13347
+ * @returns @zh [解码值, 新偏移] @en [decoded value, new offset]
13348
+ */
13349
+ declare function decodeSignedVarint(buffer: Uint8Array, offset: number): [number, number];
13350
+
13351
+ /**
13352
+ * @zh 二进制写入器
13353
+ * @en Binary Writer
13354
+ *
13355
+ * @zh 提供高效的二进制数据写入功能,支持自动扩容
13356
+ * @en Provides efficient binary data writing with auto-expansion
13357
+ */
13358
+ /**
13359
+ * @zh 二进制写入器
13360
+ * @en Binary writer for encoding data
13361
+ */
13362
+ declare class BinaryWriter {
13363
+ /**
13364
+ * @zh 内部缓冲区
13365
+ * @en Internal buffer
13366
+ */
13367
+ private _buffer;
13368
+ /**
13369
+ * @zh DataView 用于写入数值
13370
+ * @en DataView for writing numbers
13371
+ */
13372
+ private _view;
13373
+ /**
13374
+ * @zh 当前写入位置
13375
+ * @en Current write position
13376
+ */
13377
+ private _offset;
13378
+ /**
13379
+ * @zh 创建二进制写入器
13380
+ * @en Create binary writer
13381
+ *
13382
+ * @param initialCapacity - @zh 初始容量 @en Initial capacity
13383
+ */
13384
+ constructor(initialCapacity?: number);
13385
+ /**
13386
+ * @zh 获取当前写入位置
13387
+ * @en Get current write position
13388
+ */
13389
+ get offset(): number;
13390
+ /**
13391
+ * @zh 获取写入的数据
13392
+ * @en Get written data
13393
+ *
13394
+ * @returns @zh 包含写入数据的 Uint8Array @en Uint8Array containing written data
13395
+ */
13396
+ toUint8Array(): Uint8Array;
13397
+ /**
13398
+ * @zh 重置写入器(清空数据但保留缓冲区)
13399
+ * @en Reset writer (clear data but keep buffer)
13400
+ */
13401
+ reset(): void;
13402
+ /**
13403
+ * @zh 确保有足够空间
13404
+ * @en Ensure enough space
13405
+ *
13406
+ * @param size - @zh 需要的额外字节数 @en Extra bytes needed
13407
+ */
13408
+ private ensureCapacity;
13409
+ /**
13410
+ * @zh 写入单个字节
13411
+ * @en Write single byte
13412
+ */
13413
+ writeUint8(value: number): void;
13414
+ /**
13415
+ * @zh 写入有符号字节
13416
+ * @en Write signed byte
13417
+ */
13418
+ writeInt8(value: number): void;
13419
+ /**
13420
+ * @zh 写入布尔值
13421
+ * @en Write boolean
13422
+ */
13423
+ writeBoolean(value: boolean): void;
13424
+ /**
13425
+ * @zh 写入 16 位无符号整数(小端序)
13426
+ * @en Write 16-bit unsigned integer (little-endian)
13427
+ */
13428
+ writeUint16(value: number): void;
13429
+ /**
13430
+ * @zh 写入 16 位有符号整数(小端序)
13431
+ * @en Write 16-bit signed integer (little-endian)
13432
+ */
13433
+ writeInt16(value: number): void;
13434
+ /**
13435
+ * @zh 写入 32 位无符号整数(小端序)
13436
+ * @en Write 32-bit unsigned integer (little-endian)
13437
+ */
13438
+ writeUint32(value: number): void;
13439
+ /**
13440
+ * @zh 写入 32 位有符号整数(小端序)
13441
+ * @en Write 32-bit signed integer (little-endian)
13442
+ */
13443
+ writeInt32(value: number): void;
13444
+ /**
13445
+ * @zh 写入 32 位浮点数(小端序)
13446
+ * @en Write 32-bit float (little-endian)
13447
+ */
13448
+ writeFloat32(value: number): void;
13449
+ /**
13450
+ * @zh 写入 64 位浮点数(小端序)
13451
+ * @en Write 64-bit float (little-endian)
13452
+ */
13453
+ writeFloat64(value: number): void;
13454
+ /**
13455
+ * @zh 写入变长整数
13456
+ * @en Write variable-length integer
13457
+ */
13458
+ writeVarint(value: number): void;
13459
+ /**
13460
+ * @zh 写入字符串(UTF-8 编码,带长度前缀)
13461
+ * @en Write string (UTF-8 encoded with length prefix)
13462
+ */
13463
+ writeString(value: string): void;
13464
+ /**
13465
+ * @zh 写入原始字节
13466
+ * @en Write raw bytes
13467
+ */
13468
+ writeBytes(data: Uint8Array): void;
13469
+ /**
13470
+ * @zh 字符串转 UTF-8 字节(后备方案)
13471
+ * @en String to UTF-8 bytes (fallback)
13472
+ */
13473
+ private stringToUtf8Bytes;
13474
+ }
13475
+
13476
+ /**
13477
+ * @zh 二进制读取器
13478
+ * @en Binary Reader
13479
+ *
13480
+ * @zh 提供高效的二进制数据读取功能
13481
+ * @en Provides efficient binary data reading
13482
+ */
13483
+ /**
13484
+ * @zh 二进制读取器
13485
+ * @en Binary reader for decoding data
13486
+ */
13487
+ declare class BinaryReader {
13488
+ /**
13489
+ * @zh 数据缓冲区
13490
+ * @en Data buffer
13491
+ */
13492
+ private _buffer;
13493
+ /**
13494
+ * @zh DataView 用于读取数值
13495
+ * @en DataView for reading numbers
13496
+ */
13497
+ private _view;
13498
+ /**
13499
+ * @zh 当前读取位置
13500
+ * @en Current read position
13501
+ */
13502
+ private _offset;
13503
+ /**
13504
+ * @zh 创建二进制读取器
13505
+ * @en Create binary reader
13506
+ *
13507
+ * @param buffer - @zh 要读取的数据 @en Data to read
13508
+ */
13509
+ constructor(buffer: Uint8Array);
13510
+ /**
13511
+ * @zh 获取当前读取位置
13512
+ * @en Get current read position
13513
+ */
13514
+ get offset(): number;
13515
+ /**
13516
+ * @zh 设置读取位置
13517
+ * @en Set read position
13518
+ */
13519
+ set offset(value: number);
13520
+ /**
13521
+ * @zh 获取剩余可读字节数
13522
+ * @en Get remaining readable bytes
13523
+ */
13524
+ get remaining(): number;
13525
+ /**
13526
+ * @zh 检查是否有更多数据可读
13527
+ * @en Check if there's more data to read
13528
+ */
13529
+ hasMore(): boolean;
13530
+ /**
13531
+ * @zh 读取单个字节
13532
+ * @en Read single byte
13533
+ */
13534
+ readUint8(): number;
13535
+ /**
13536
+ * @zh 读取有符号字节
13537
+ * @en Read signed byte
13538
+ */
13539
+ readInt8(): number;
13540
+ /**
13541
+ * @zh 读取布尔值
13542
+ * @en Read boolean
13543
+ */
13544
+ readBoolean(): boolean;
13545
+ /**
13546
+ * @zh 读取 16 位无符号整数(小端序)
13547
+ * @en Read 16-bit unsigned integer (little-endian)
13548
+ */
13549
+ readUint16(): number;
13550
+ /**
13551
+ * @zh 读取 16 位有符号整数(小端序)
13552
+ * @en Read 16-bit signed integer (little-endian)
13553
+ */
13554
+ readInt16(): number;
13555
+ /**
13556
+ * @zh 读取 32 位无符号整数(小端序)
13557
+ * @en Read 32-bit unsigned integer (little-endian)
13558
+ */
13559
+ readUint32(): number;
13560
+ /**
13561
+ * @zh 读取 32 位有符号整数(小端序)
13562
+ * @en Read 32-bit signed integer (little-endian)
13563
+ */
13564
+ readInt32(): number;
13565
+ /**
13566
+ * @zh 读取 32 位浮点数(小端序)
13567
+ * @en Read 32-bit float (little-endian)
13568
+ */
13569
+ readFloat32(): number;
13570
+ /**
13571
+ * @zh 读取 64 位浮点数(小端序)
13572
+ * @en Read 64-bit float (little-endian)
13573
+ */
13574
+ readFloat64(): number;
13575
+ /**
13576
+ * @zh 读取变长整数
13577
+ * @en Read variable-length integer
13578
+ */
13579
+ readVarint(): number;
13580
+ /**
13581
+ * @zh 读取字符串(UTF-8 编码,带长度前缀)
13582
+ * @en Read string (UTF-8 encoded with length prefix)
13583
+ */
13584
+ readString(): string;
13585
+ /**
13586
+ * @zh 读取原始字节
13587
+ * @en Read raw bytes
13588
+ *
13589
+ * @param length - @zh 要读取的字节数 @en Number of bytes to read
13590
+ */
13591
+ readBytes(length: number): Uint8Array;
13592
+ /**
13593
+ * @zh 查看下一个字节但不移动读取位置
13594
+ * @en Peek next byte without advancing read position
13595
+ */
13596
+ peekUint8(): number;
13597
+ /**
13598
+ * @zh 跳过指定字节数
13599
+ * @en Skip specified number of bytes
13600
+ */
13601
+ skip(count: number): void;
13602
+ /**
13603
+ * @zh 检查边界
13604
+ * @en Check bounds
13605
+ */
13606
+ private checkBounds;
13607
+ /**
13608
+ * @zh UTF-8 字节转字符串(后备方案)
13609
+ * @en UTF-8 bytes to string (fallback)
13610
+ */
13611
+ private utf8BytesToString;
13612
+ }
13613
+
13614
+ /**
13615
+ * @zh 组件状态编码器
13616
+ * @en Component state encoder
13617
+ *
13618
+ * @zh 将 ECS Component 的 @sync 字段编码为二进制格式
13619
+ * @en Encodes @sync fields of ECS Components to binary format
13620
+ */
13621
+
13622
+ /**
13623
+ * @zh 编码组件的完整状态
13624
+ * @en Encode full state of a component
13625
+ *
13626
+ * @zh 格式: [fieldCount: varint] ([fieldIndex: uint8] [value])...
13627
+ * @en Format: [fieldCount: varint] ([fieldIndex: uint8] [value])...
13628
+ *
13629
+ * @param component - @zh 组件实例 @en Component instance
13630
+ * @param metadata - @zh 组件同步元数据 @en Component sync metadata
13631
+ * @param writer - @zh 二进制写入器 @en Binary writer
13632
+ */
13633
+ declare function encodeComponentFull(component: Component, metadata: SyncMetadata, writer: BinaryWriter): void;
13634
+ /**
13635
+ * @zh 编码组件的增量状态(只编码脏字段)
13636
+ * @en Encode delta state of a component (only dirty fields)
13637
+ *
13638
+ * @zh 格式: [dirtyCount: varint] ([fieldIndex: uint8] [value])...
13639
+ * @en Format: [dirtyCount: varint] ([fieldIndex: uint8] [value])...
13640
+ *
13641
+ * @param component - @zh 组件实例 @en Component instance
13642
+ * @param metadata - @zh 组件同步元数据 @en Component sync metadata
13643
+ * @param tracker - @zh 变更追踪器 @en Change tracker
13644
+ * @param writer - @zh 二进制写入器 @en Binary writer
13645
+ * @returns @zh 是否有数据编码 @en Whether any data was encoded
13646
+ */
13647
+ declare function encodeComponentDelta(component: Component, metadata: SyncMetadata, tracker: ChangeTracker, writer: BinaryWriter): boolean;
13648
+ /**
13649
+ * @zh 编码实体的所有同步组件
13650
+ * @en Encode all sync components of an entity
13651
+ *
13652
+ * @zh 格式:
13653
+ * [entityId: uint32]
13654
+ * [componentCount: varint]
13655
+ * ([typeIdLength: varint] [typeId: string] [componentData])...
13656
+ *
13657
+ * @en Format:
13658
+ * [entityId: uint32]
13659
+ * [componentCount: varint]
13660
+ * ([typeIdLength: varint] [typeId: string] [componentData])...
13661
+ *
13662
+ * @param entity - @zh 实体 @en Entity
13663
+ * @param writer - @zh 二进制写入器 @en Binary writer
13664
+ * @param deltaOnly - @zh 只编码增量 @en Only encode delta
13665
+ * @returns @zh 编码的组件数量 @en Number of components encoded
13666
+ */
13667
+ declare function encodeEntity(entity: Entity, writer: BinaryWriter, deltaOnly?: boolean): number;
13668
+ /**
13669
+ * @zh 编码状态快照(多个实体)
13670
+ * @en Encode state snapshot (multiple entities)
13671
+ *
13672
+ * @zh 格式:
13673
+ * [operation: uint8] (FULL=0, DELTA=1, SPAWN=2, DESPAWN=3)
13674
+ * [entityCount: varint]
13675
+ * (entityData)...
13676
+ *
13677
+ * @en Format:
13678
+ * [operation: uint8] (FULL=0, DELTA=1, SPAWN=2, DESPAWN=3)
13679
+ * [entityCount: varint]
13680
+ * (entityData)...
13681
+ *
13682
+ * @param entities - @zh 要编码的实体数组 @en Entities to encode
13683
+ * @param operation - @zh 同步操作类型 @en Sync operation type
13684
+ * @returns @zh 编码后的二进制数据 @en Encoded binary data
13685
+ */
13686
+ declare function encodeSnapshot(entities: Entity[], operation?: SyncOperation): Uint8Array;
13687
+ /**
13688
+ * @zh 编码实体生成消息
13689
+ * @en Encode entity spawn message
13690
+ *
13691
+ * @param entity - @zh 生成的实体 @en Spawned entity
13692
+ * @param prefabType - @zh 预制体类型(可选)@en Prefab type (optional)
13693
+ * @returns @zh 编码后的二进制数据 @en Encoded binary data
13694
+ */
13695
+ declare function encodeSpawn(entity: Entity, prefabType?: string): Uint8Array;
13696
+ /**
13697
+ * @zh 编码实体销毁消息
13698
+ * @en Encode entity despawn message
13699
+ *
13700
+ * @param entityId - @zh 销毁的实体 ID @en Despawned entity ID
13701
+ * @returns @zh 编码后的二进制数据 @en Encoded binary data
13702
+ */
13703
+ declare function encodeDespawn(entityId: number): Uint8Array;
13704
+ /**
13705
+ * @zh 编码批量实体销毁消息
13706
+ * @en Encode batch entity despawn message
13707
+ *
13708
+ * @param entityIds - @zh 销毁的实体 ID 数组 @en Despawned entity IDs
13709
+ * @returns @zh 编码后的二进制数据 @en Encoded binary data
13710
+ */
13711
+ declare function encodeDespawnBatch(entityIds: number[]): Uint8Array;
13712
+
13713
+ /**
13714
+ * @zh 组件状态解码器
13715
+ * @en Component state decoder
13716
+ *
13717
+ * @zh 从二进制格式解码并应用到 ECS Component
13718
+ * @en Decodes binary format and applies to ECS Components
13719
+ */
13720
+
13721
+ /**
13722
+ * @zh 注册组件类型
13723
+ * @en Register component type
13724
+ *
13725
+ * @param typeId - @zh 组件类型 ID @en Component type ID
13726
+ * @param componentClass - @zh 组件类 @en Component class
13727
+ */
13728
+ declare function registerSyncComponent<T extends Component>(typeId: string, componentClass: new () => T): void;
13729
+ /**
13730
+ * @zh 从 @ECSComponent 装饰器自动注册
13731
+ * @en Auto-register from @ECSComponent decorator
13732
+ *
13733
+ * @param componentClass - @zh 组件类 @en Component class
13734
+ */
13735
+ declare function autoRegisterSyncComponent(componentClass: new () => Component): void;
13736
+ /**
13737
+ * @zh 解码并应用组件数据
13738
+ * @en Decode and apply component data
13739
+ *
13740
+ * @param component - @zh 组件实例 @en Component instance
13741
+ * @param metadata - @zh 组件同步元数据 @en Component sync metadata
13742
+ * @param reader - @zh 二进制读取器 @en Binary reader
13743
+ */
13744
+ declare function decodeComponent(component: Component, metadata: SyncMetadata, reader: BinaryReader): void;
13745
+ /**
13746
+ * @zh 解码实体快照结果
13747
+ * @en Decode entity snapshot result
13748
+ */
13749
+ interface DecodeEntityResult {
13750
+ /**
13751
+ * @zh 实体 ID
13752
+ * @en Entity ID
13753
+ */
13754
+ entityId: number;
13755
+ /**
13756
+ * @zh 是否为新实体
13757
+ * @en Whether it's a new entity
13758
+ */
13759
+ isNew: boolean;
13760
+ /**
13761
+ * @zh 解码的组件类型列表
13762
+ * @en List of decoded component types
13763
+ */
13764
+ componentTypes: string[];
13765
+ }
13766
+ /**
13767
+ * @zh 解码并应用实体数据
13768
+ * @en Decode and apply entity data
13769
+ *
13770
+ * @param scene - @zh 场景 @en Scene
13771
+ * @param reader - @zh 二进制读取器 @en Binary reader
13772
+ * @param entityMap - @zh 实体 ID 映射(可选)@en Entity ID mapping (optional)
13773
+ * @returns @zh 解码结果 @en Decode result
13774
+ */
13775
+ declare function decodeEntity(scene: Scene, reader: BinaryReader, entityMap?: Map<number, Entity>): DecodeEntityResult;
13776
+ /**
13777
+ * @zh 解码快照结果
13778
+ * @en Decode snapshot result
13779
+ */
13780
+ interface DecodeSnapshotResult {
13781
+ /**
13782
+ * @zh 操作类型
13783
+ * @en Operation type
13784
+ */
13785
+ operation: SyncOperation;
13786
+ /**
13787
+ * @zh 解码的实体列表
13788
+ * @en List of decoded entities
13789
+ */
13790
+ entities: DecodeEntityResult[];
13791
+ }
13792
+ /**
13793
+ * @zh 解码状态快照
13794
+ * @en Decode state snapshot
13795
+ *
13796
+ * @param scene - @zh 场景 @en Scene
13797
+ * @param data - @zh 二进制数据 @en Binary data
13798
+ * @param entityMap - @zh 实体 ID 映射(可选)@en Entity ID mapping (optional)
13799
+ * @returns @zh 解码结果 @en Decode result
13800
+ */
13801
+ declare function decodeSnapshot(scene: Scene, data: Uint8Array, entityMap?: Map<number, Entity>): DecodeSnapshotResult;
13802
+ /**
13803
+ * @zh 解码生成消息结果
13804
+ * @en Decode spawn message result
13805
+ */
13806
+ interface DecodeSpawnResult {
13807
+ /**
13808
+ * @zh 实体
13809
+ * @en Entity
13810
+ */
13811
+ entity: Entity;
13812
+ /**
13813
+ * @zh 预制体类型
13814
+ * @en Prefab type
13815
+ */
13816
+ prefabType: string;
13817
+ /**
13818
+ * @zh 解码的组件类型列表
13819
+ * @en List of decoded component types
13820
+ */
13821
+ componentTypes: string[];
13822
+ }
13823
+ /**
13824
+ * @zh 解码实体生成消息
13825
+ * @en Decode entity spawn message
13826
+ *
13827
+ * @param scene - @zh 场景 @en Scene
13828
+ * @param data - @zh 二进制数据 @en Binary data
13829
+ * @param entityMap - @zh 实体 ID 映射(可选)@en Entity ID mapping (optional)
13830
+ * @returns @zh 解码结果,如果不是 SPAWN 消息则返回 null @en Decode result, or null if not a SPAWN message
13831
+ */
13832
+ declare function decodeSpawn(scene: Scene, data: Uint8Array, entityMap?: Map<number, Entity>): DecodeSpawnResult | null;
13833
+ /**
13834
+ * @zh 解码销毁消息结果
13835
+ * @en Decode despawn message result
13836
+ */
13837
+ interface DecodeDespawnResult {
13838
+ /**
13839
+ * @zh 销毁的实体 ID 列表
13840
+ * @en List of despawned entity IDs
13841
+ */
13842
+ entityIds: number[];
13843
+ }
13844
+ /**
13845
+ * @zh 解码实体销毁消息
13846
+ * @en Decode entity despawn message
13847
+ *
13848
+ * @param data - @zh 二进制数据 @en Binary data
13849
+ * @returns @zh 解码结果,如果不是 DESPAWN 消息则返回 null @en Decode result, or null if not a DESPAWN message
13850
+ */
13851
+ declare function decodeDespawn(data: Uint8Array): DecodeDespawnResult | null;
13852
+ /**
13853
+ * @zh 处理销毁消息(从场景中移除实体)
13854
+ * @en Process despawn message (remove entities from scene)
13855
+ *
13856
+ * @param scene - @zh 场景 @en Scene
13857
+ * @param data - @zh 二进制数据 @en Binary data
13858
+ * @param entityMap - @zh 实体 ID 映射(可选)@en Entity ID mapping (optional)
13859
+ * @returns @zh 移除的实体 ID 列表 @en List of removed entity IDs
13860
+ */
13861
+ declare function processDespawn(scene: Scene, data: Uint8Array, entityMap?: Map<number, Entity>): number[];
13862
+
13003
13863
  type ITimer<TContext = unknown> = {
13004
13864
  context: TContext;
13005
13865
  /**
@@ -16261,5 +17121,5 @@ declare function getFullPlatformConfig(): Promise<any>;
16261
17121
  declare function supportsFeature(feature: 'worker' | 'shared-array-buffer' | 'transferable-objects' | 'module-worker'): boolean;
16262
17122
  declare function hasAdapter(): boolean;
16263
17123
 
16264
- export { AdvancedProfilerCollector, After, AutoProfiler, Before, BinarySerializer, BitMask64Utils, Bits, COMPONENT_DEPENDENCIES, COMPONENT_EDITOR_OPTIONS, COMPONENT_TYPE_NAME, ChangeOperation, Colors, CommandBuffer, CommandType, CompiledQuery, Component, ComponentDataCollector, ComponentPool, ComponentPoolManager, ComponentRegistry, ComponentSerializer, ComponentSparseSet, ComponentStorage, ConsoleLogger, Core, CycleDependencyError, DEFAULT_PROFILER_CONFIG, DEFAULT_STAGE_ORDER, DebugConfigService, DebugManager, DebugPlugin, DeepCopy, ECSComponent, ECSEventType, ECSFluentAPI, ECSSystem, EEntityLifecyclePolicy, EMPTY_GUID, ENTITY_REF_METADATA, EVENT_TYPES, Emitter, EnableSoA, Entity, EntityDataCollector, EntityHandleManager, EntityList, EntityProcessorList, EntityRef, EntitySerializer, EntitySystem, EntityTags, EpochManager, EventBus, EventPriority, EventTypeValidator, Float32, Float64, FuncPack, GEN_BITS, GEN_MASK, GlobalComponentRegistry, GlobalEventBus, GlobalManager, HierarchyComponent, HierarchySystem, INDEX_BITS, INDEX_MASK, IdentifierPool, IgnoreSerialization, InSet, IncrementalSerializer, InjectProperty, Injectable, Int16, Int32, Int8, IntervalSystem, LogLevel, Logger, LoggerManager, MAX_ENTITIES, MAX_GENERATION, Matcher, MigrationBuilder, NULL_HANDLE, NumberExtension, PREFAB_FORMAT_VERSION, PROPERTY_METADATA, PassiveSystem, PerformanceDataCollector, PerformanceMonitor, PerformanceWarningType, PlatformDetector, PlatformManager, PlatformWorkerPool, PluginManager, PluginServiceRegistry, PluginState, Pool, PoolManager, PrefabInstanceComponent, PrefabSerializer, ProcessingSystem, Profile, ProfileCategory, ProfileClass, ProfilerSDK, Property, QuerySystem, ReactiveQuery, ReactiveQueryChangeType, ReferenceTracker, RuntimeModeService, RuntimeModeToken, SCHEDULING_METADATA, SERIALIZABLE_METADATA, SERIALIZE_FIELD, SERIALIZE_OPTIONS, SYSTEM_TYPE_NAME, Scene, SceneDataCollector, SceneManager, SceneSerializer, Serializable, SerializationContext, Serialize, SerializeArray, SerializeAsMap, SerializeAsSet, SerializeMap, SerializeSet, ServiceContainer, ServiceLifetime, SoAStorage, SparseSet, Stage, SystemDataCollector, SystemDependencyGraph, SystemScheduler, Time, Timer, TimerManager, TypeSafeEventSystem, TypeUtils, TypedEntityBuilder, TypedQueryBuilder, TypedQueryResult, Uint16, Uint32, Uint8, Uint8Clamped, Updatable, ValueSerializer, VersionMigrationManager, WebSocketManager, WorkerEntitySystem, World, WorldManager, addAndConfigure, addEntityTag, buildEntity, createECSAPI, createEditorModeService, createInstance, createLogger, createQuery, createServiceToken, createStandaloneModeService, genOf, generateGUID, getBasicWorkerConfig, getComponentDependencies, getComponentEditorOptions, getComponentInstanceEditorOptions, getComponentInstanceTypeName, getComponentTypeName, getComponents, getCurrentAdapter, getEntityRefMetadata, getEntityRefProperties, getFullPlatformConfig, getGlobalWithMiniGame, getOrAddComponent, getPerformanceWithMemory, getPropertyInjectMetadata, getPropertyMetadata, getSceneByEntityId, getSchedulingMetadata, getSerializationMetadata, getSystemInstanceMetadata, getSystemInstanceTypeName, getSystemMetadata, getSystemTypeName, getUpdatableMetadata, handleEquals, handleToString, hasAdapter, hasAnyComponent, hasComponents, hasECSComponentDecorator, hasEntityRef, hasEntityTag, hasPropertyMetadata, hasSchedulingMetadata, indexOf, injectProperties, isComponentArray, isComponentHiddenInInspector, isComponentInstanceHiddenInInspector, isComponentType, isEntityRefProperty, isFolder, isHidden, isLocked, isSerializable, isUpdatable, isValidGUID, isValidHandle, makeHandle, queryFor, queryForAll, registerInjectable, registerPlatformAdapter, removeEntityTag, requireComponent, resetLoggerColors, setGlobalLogLevel, setLoggerColors, setLoggerFactory, supportsFeature, tryGetComponent, updateComponent };
16265
- export type { AnyComponentConstructor, AutoProfilerConfig, BitMask64Data, CallGraphNode, ComponentChange, ComponentConstructor, ComponentDebugInfo, ComponentEditorOptions, ComponentInstance, ComponentMigrationFunction, ComponentOptions, ComponentType, ComponentTypeMap, ComponentTypeName, ComponentTypeNames, ComponentTypeWithMetadata, DataOnly, DeepPartial, DeepReadonly, DeferredCommand, DeserializationStrategy, ECSDebugStats, EntityChange, EntityDebugInfo, EntityHandle, EntityRefMetadata, EntityRefRecord, EntityTagValue, EntityWithComponents, EnumOption, EventListenerConfig, EventStats, ExtractComponents, FieldSerializeOptions, IAdvancedProfilerData, IAlipayMiniGameAPI, IBaiduMiniGameAPI, IByteDanceMiniGameAPI, IChromeMemoryInfo, IComponent, IComponentDebugData, IComponentEventData, IComponentRegistry, IComponentTypeMetadata, ICoreConfig, IECSDebugConfig, IECSDebugData, IEntityDebugData, IEntityEventData, IEntityHierarchyNode, IEventBus, IEventData, IEventListenerConfig, IEventStats, IGlobalThisWithMiniGame, ILogger, IMiniGamePlatformAPI, IPerformanceDebugData, IPerformanceEventData, IPerformanceWithMemory, IPlatformAdapter, IPlugin, IPluginMetadata, IPoolable, IRuntimeMode, IScene, ISceneConfig, ISceneDebugData, ISceneEventData, ISceneFactory, IService, ISystemBase, ISystemDebugData, ISystemEventData, ITimer, IUpdatable, IWeChatMiniGameAPI, IWorkerPoolStatus, IWorkerSystemConfig, IWorldConfig, IWorldManagerConfig, IncrementalSerializationFormat, IncrementalSerializationOptions, IncrementalSnapshot, InjectableMetadata, InstanceTypes, LoggerColorConfig, LoggerConfig, LongTaskInfo, MemorySnapshot, MigrationFunction, PartialComponent, PerformanceData, PerformanceStats, PerformanceThresholds, PerformanceWarning, PlatformConfig, PlatformDetectionResult, PlatformWorker, PoolStats, PrefabComponentTypeEntry, PrefabCreateOptions, PrefabData, PrefabInstantiateOptions, PrefabMetadata, ProcessingMode, ProfileCounter, ProfileFrame, ProfileReport, ProfileSample, ProfileSampleStats, ProfilerConfig, PropertyAction, PropertyAssetType, PropertyControl, PropertyOptions, PropertyType, QueryResult$1 as QueryResult, ReactiveQueryChange, ReactiveQueryConfig, ReactiveQueryListener, ReadonlyComponent, RuntimeModeConfig, SampleHandle, SceneDataChange, SceneDebugInfo, SceneDeserializationOptions, SceneMigrationFunction, SceneSerializationOptions, SerializableComponent, SerializableFields, SerializableOptions, SerializableValue, SerializationFormat, SerializationMetadata, SerializedComponent, SerializedEntity, SerializedEntityRef, SerializedPrefabEntity, SerializedScene, ServiceIdentifier, ServiceToken, ServiceType, SharedArrayBufferProcessFunction, SupportedTypedArray, SystemDebugInfo, SystemDependencyInfo, SystemEntityType, SystemLifecycleHooks, SystemMetadata, SystemSchedulingMetadata, SystemStage, TypeDef as TypeHandler, TypeSafeBuilder, TypedEventHandler, TypedQueryCondition, TypedValue, UpdatableMetadata, ValidComponent, ValidComponentArray, WorkerCreationOptions, WorkerProcessFunction, WorkerSystemConfig };
17124
+ export { AdvancedProfilerCollector, After, AutoProfiler, Before, BinaryReader, BinarySerializer, BinaryWriter, BitMask64Utils, Bits, CHANGE_TRACKER, COMPONENT_DEPENDENCIES, COMPONENT_EDITOR_OPTIONS, COMPONENT_TYPE_NAME, ChangeOperation, ChangeTracker, Colors, CommandBuffer, CommandType, CompiledQuery, Component, ComponentDataCollector, ComponentPool, ComponentPoolManager, ComponentRegistry, ComponentSerializer, ComponentSparseSet, ComponentStorage, ConsoleLogger, Core, CycleDependencyError, DEFAULT_PROFILER_CONFIG, DEFAULT_STAGE_ORDER, DebugConfigService, DebugManager, DebugPlugin, DeepCopy, ECSComponent, ECSEventType, ECSFluentAPI, ECSSystem, EEntityLifecyclePolicy, EMPTY_GUID, ENTITY_REF_METADATA, EVENT_TYPES, Emitter, EnableSoA, Entity, EntityDataCollector, EntityHandleManager, EntityList, EntityProcessorList, EntityRef, EntitySerializer, EntitySystem, EntityTags, EpochManager, EventBus, EventPriority, EventTypeValidator, Float32, Float64, FuncPack, GEN_BITS, GEN_MASK, GlobalComponentRegistry, GlobalEventBus, GlobalManager, HierarchyComponent, HierarchySystem, INDEX_BITS, INDEX_MASK, IdentifierPool, IgnoreSerialization, InSet, IncrementalSerializer, InjectProperty, Injectable, Int16, Int32, Int8, IntervalSystem, LogLevel, Logger, LoggerManager, MAX_ENTITIES, MAX_GENERATION, Matcher, MigrationBuilder, NULL_HANDLE, NumberExtension, PREFAB_FORMAT_VERSION, PROPERTY_METADATA, PassiveSystem, PerformanceDataCollector, PerformanceMonitor, PerformanceWarningType, PlatformDetector, PlatformManager, PlatformWorkerPool, PluginManager, PluginServiceRegistry, PluginState, Pool, PoolManager, PrefabInstanceComponent, PrefabSerializer, ProcessingSystem, Profile, ProfileCategory, ProfileClass, ProfilerSDK, Property, QuerySystem, ReactiveQuery, ReactiveQueryChangeType, ReferenceTracker, RuntimeModeService, RuntimeModeToken, SCHEDULING_METADATA, SERIALIZABLE_METADATA, SERIALIZE_FIELD, SERIALIZE_OPTIONS, SYNC_METADATA, SYSTEM_TYPE_NAME, Scene, SceneDataCollector, SceneManager, SceneSerializer, Serializable, SerializationContext, Serialize, SerializeArray, SerializeAsMap, SerializeAsSet, SerializeMap, SerializeSet, ServiceContainer, ServiceLifetime, SoAStorage, SparseSet, Stage, SyncOperation, SystemDataCollector, SystemDependencyGraph, SystemScheduler, TYPE_SIZES, Time, Timer, TimerManager, TypeSafeEventSystem, TypeUtils, TypedEntityBuilder, TypedQueryBuilder, TypedQueryResult, Uint16, Uint32, Uint8, Uint8Clamped, Updatable, ValueSerializer, VersionMigrationManager, WebSocketManager, WorkerEntitySystem, World, WorldManager, addAndConfigure, addEntityTag, autoRegisterSyncComponent, buildEntity, clearChanges, createECSAPI, createEditorModeService, createInstance, createLogger, createQuery, createServiceToken, createStandaloneModeService, decodeComponent, decodeDespawn, decodeEntity, decodeSignedVarint, decodeSnapshot, decodeSpawn, decodeVarint, encodeComponentDelta, encodeComponentFull, encodeDespawn, encodeDespawnBatch, encodeEntity, encodeSignedVarint, encodeSnapshot, encodeSpawn, encodeVarint, genOf, generateGUID, getBasicWorkerConfig, getChangeTracker, getComponentDependencies, getComponentEditorOptions, getComponentInstanceEditorOptions, getComponentInstanceTypeName, getComponentTypeName, getComponents, getCurrentAdapter, getEntityRefMetadata, getEntityRefProperties, getFullPlatformConfig, getGlobalWithMiniGame, getOrAddComponent, getPerformanceWithMemory, getPropertyInjectMetadata, getPropertyMetadata, getSceneByEntityId, getSchedulingMetadata, getSerializationMetadata, getSyncMetadata, getSystemInstanceMetadata, getSystemInstanceTypeName, getSystemMetadata, getSystemTypeName, getUpdatableMetadata, handleEquals, handleToString, hasAdapter, hasAnyComponent, hasChanges, hasComponents, hasECSComponentDecorator, hasEntityRef, hasEntityTag, hasPropertyMetadata, hasSchedulingMetadata, hasSyncFields, indexOf, initChangeTracker, injectProperties, isComponentArray, isComponentHiddenInInspector, isComponentInstanceHiddenInInspector, isComponentType, isEntityRefProperty, isFolder, isHidden, isLocked, isSerializable, isUpdatable, isValidGUID, isValidHandle, makeHandle, processDespawn, queryFor, queryForAll, registerInjectable, registerPlatformAdapter, registerSyncComponent, removeEntityTag, requireComponent, resetLoggerColors, setGlobalLogLevel, setLoggerColors, setLoggerFactory, supportsFeature, sync, tryGetComponent, updateComponent, varintSize, zigzagDecode, zigzagEncode };
17125
+ export type { AnyComponentConstructor, AutoProfilerConfig, BitMask64Data, CallGraphNode, ComponentChange, ComponentConstructor, ComponentDebugInfo, ComponentEditorOptions, ComponentInstance, ComponentMigrationFunction, ComponentOptions, ComponentType, ComponentTypeMap, ComponentTypeName, ComponentTypeNames, ComponentTypeWithMetadata, DataOnly, DecodeDespawnResult, DecodeEntityResult, DecodeSnapshotResult, DecodeSpawnResult, DeepPartial, DeepReadonly, DeferredCommand, DeserializationStrategy, ECSDebugStats, EntityChange, EntityDebugInfo, EntityHandle, EntityRefMetadata, EntityRefRecord, EntityTagValue, EntityWithComponents, EnumOption, EventListenerConfig, EventStats, ExtractComponents, FieldSerializeOptions, IAdvancedProfilerData, IAlipayMiniGameAPI, IBaiduMiniGameAPI, IByteDanceMiniGameAPI, IChromeMemoryInfo, IComponent, IComponentDebugData, IComponentEventData, IComponentRegistry, IComponentTypeMetadata, ICoreConfig, IECSDebugConfig, IECSDebugData, IEntityDebugData, IEntityEventData, IEntityHierarchyNode, IEventBus, IEventData, IEventListenerConfig, IEventStats, IGlobalThisWithMiniGame, ILogger, IMiniGamePlatformAPI, IPerformanceDebugData, IPerformanceEventData, IPerformanceWithMemory, IPlatformAdapter, IPlugin, IPluginMetadata, IPoolable, IRuntimeMode, IScene, ISceneConfig, ISceneDebugData, ISceneEventData, ISceneFactory, IService, ISystemBase, ISystemDebugData, ISystemEventData, ITimer, IUpdatable, IWeChatMiniGameAPI, IWorkerPoolStatus, IWorkerSystemConfig, IWorldConfig, IWorldManagerConfig, IncrementalSerializationFormat, IncrementalSerializationOptions, IncrementalSnapshot, InjectableMetadata, InstanceTypes, LoggerColorConfig, LoggerConfig, LongTaskInfo, MemorySnapshot, MigrationFunction, PartialComponent, PerformanceData, PerformanceStats, PerformanceThresholds, PerformanceWarning, PlatformConfig, PlatformDetectionResult, PlatformWorker, PoolStats, PrefabComponentTypeEntry, PrefabCreateOptions, PrefabData, PrefabInstantiateOptions, PrefabMetadata, ProcessingMode, ProfileCounter, ProfileFrame, ProfileReport, ProfileSample, ProfileSampleStats, ProfilerConfig, PropertyAction, PropertyAssetType, PropertyControl, PropertyOptions, PropertyType, QueryResult$1 as QueryResult, ReactiveQueryChange, ReactiveQueryConfig, ReactiveQueryListener, ReadonlyComponent, RuntimeModeConfig, SampleHandle, SceneDataChange, SceneDebugInfo, SceneDeserializationOptions, SceneMigrationFunction, SceneSerializationOptions, SerializableComponent, SerializableFields, SerializableOptions, SerializableValue, SerializationFormat, SerializationMetadata, SerializedComponent, SerializedEntity, SerializedEntityRef, SerializedPrefabEntity, SerializedScene, ServiceIdentifier, ServiceToken, ServiceType, SharedArrayBufferProcessFunction, SupportedTypedArray, SyncFieldMetadata, SyncMetadata, SyncType, SystemDebugInfo, SystemDependencyInfo, SystemEntityType, SystemLifecycleHooks, SystemMetadata, SystemSchedulingMetadata, SystemStage, TypeDef as TypeHandler, TypeSafeBuilder, TypedEventHandler, TypedQueryCondition, TypedValue, UpdatableMetadata, ValidComponent, ValidComponentArray, WorkerCreationOptions, WorkerProcessFunction, WorkerSystemConfig };