@esengine/ecs-framework 2.1.23 → 2.1.24
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 +79 -56
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/index.umd.js +1 -1
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @esengine/ecs-framework v2.1.
|
|
2
|
+
* @esengine/ecs-framework v2.1.24
|
|
3
3
|
* TypeScript definitions
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -4000,37 +4000,38 @@ declare function createECSAPI(scene: Scene, querySystem: QuerySystem, eventSyste
|
|
|
4000
4000
|
* 实体数据收集器
|
|
4001
4001
|
*/
|
|
4002
4002
|
declare class EntityDataCollector {
|
|
4003
|
-
/**
|
|
4004
|
-
* 收集实体数据
|
|
4005
|
-
*/
|
|
4006
4003
|
collectEntityData(): IEntityDebugData;
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4004
|
+
getRawEntityList(): Array<{
|
|
4005
|
+
id: number;
|
|
4006
|
+
name: string;
|
|
4007
|
+
active: boolean;
|
|
4008
|
+
enabled: boolean;
|
|
4009
|
+
activeInHierarchy: boolean;
|
|
4010
|
+
componentCount: number;
|
|
4011
|
+
componentTypes: string[];
|
|
4012
|
+
parentId: number | null;
|
|
4013
|
+
childIds: number[];
|
|
4014
|
+
depth: number;
|
|
4015
|
+
tag: number;
|
|
4016
|
+
updateOrder: number;
|
|
4017
|
+
}>;
|
|
4018
|
+
getEntityDetails(entityId: number): any;
|
|
4019
|
+
private getSceneInfo;
|
|
4020
|
+
collectEntityDataWithMemory(): IEntityDebugData;
|
|
4018
4021
|
private collectArchetypeData;
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
+
private getArchetypeDistributionFast;
|
|
4023
|
+
private getTopEntitiesByComponentsFast;
|
|
4024
|
+
private collectArchetypeDataWithMemory;
|
|
4022
4025
|
private extractArchetypeStatistics;
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
+
private extractArchetypeStatisticsWithMemory;
|
|
4027
|
+
private getArchetypeDistribution;
|
|
4028
|
+
private getArchetypeDistributionWithMemory;
|
|
4029
|
+
private getTopEntitiesByComponents;
|
|
4030
|
+
private getTopEntitiesByComponentsWithMemory;
|
|
4031
|
+
private getEmptyEntityDebugData;
|
|
4032
|
+
private calculateFallbackEntityStats;
|
|
4026
4033
|
estimateEntityMemoryUsage(entity: any): number;
|
|
4027
|
-
/**
|
|
4028
|
-
* 计算对象大小
|
|
4029
|
-
*/
|
|
4030
4034
|
calculateObjectSize(obj: any, excludeKeys?: string[]): number;
|
|
4031
|
-
/**
|
|
4032
|
-
* 构建实体层次结构树
|
|
4033
|
-
*/
|
|
4034
4035
|
private buildEntityHierarchyTree;
|
|
4035
4036
|
/**
|
|
4036
4037
|
* 构建实体层次结构节点
|
|
@@ -4047,39 +4048,42 @@ declare class EntityDataCollector {
|
|
|
4047
4048
|
/**
|
|
4048
4049
|
* 提取组件详细信息
|
|
4049
4050
|
*/
|
|
4050
|
-
|
|
4051
|
+
extractComponentDetails(components: Component[]): Array<{
|
|
4052
|
+
typeName: string;
|
|
4053
|
+
properties: Record<string, any>;
|
|
4054
|
+
}>;
|
|
4055
|
+
/**
|
|
4056
|
+
* 获取组件的完整属性信息(仅在需要时调用)
|
|
4057
|
+
*/
|
|
4058
|
+
getComponentProperties(entityId: number, componentIndex: number): Record<string, any>;
|
|
4051
4059
|
/**
|
|
4052
4060
|
* 格式化属性值
|
|
4053
4061
|
*/
|
|
4054
4062
|
private formatPropertyValue;
|
|
4055
4063
|
/**
|
|
4056
|
-
*
|
|
4064
|
+
* 格式化对象第一层
|
|
4057
4065
|
*/
|
|
4058
|
-
private
|
|
4059
|
-
/**
|
|
4060
|
-
* 获取组件数量最多的实体
|
|
4061
|
-
*/
|
|
4062
|
-
private getTopEntitiesByComponents;
|
|
4066
|
+
private formatObjectFirstLevel;
|
|
4063
4067
|
/**
|
|
4064
|
-
*
|
|
4068
|
+
* 创建懒加载占位符
|
|
4065
4069
|
*/
|
|
4066
|
-
private
|
|
4070
|
+
private createLazyLoadPlaceholder;
|
|
4067
4071
|
/**
|
|
4068
|
-
*
|
|
4072
|
+
* 获取对象摘要信息
|
|
4069
4073
|
*/
|
|
4070
|
-
private
|
|
4074
|
+
private getObjectSummary;
|
|
4071
4075
|
/**
|
|
4072
|
-
*
|
|
4076
|
+
* 生成对象ID
|
|
4073
4077
|
*/
|
|
4074
|
-
private
|
|
4078
|
+
private generateObjectId;
|
|
4075
4079
|
/**
|
|
4076
|
-
*
|
|
4080
|
+
* 展开懒加载对象(供调试面板调用)
|
|
4077
4081
|
*/
|
|
4078
|
-
|
|
4082
|
+
expandLazyObject(entityId: number, componentIndex: number, propertyPath: string): any;
|
|
4079
4083
|
/**
|
|
4080
|
-
*
|
|
4084
|
+
* 根据路径获取对象
|
|
4081
4085
|
*/
|
|
4082
|
-
private
|
|
4086
|
+
private getObjectByPath;
|
|
4083
4087
|
}
|
|
4084
4088
|
|
|
4085
4089
|
/**
|
|
@@ -4127,18 +4131,27 @@ declare class PerformanceDataCollector {
|
|
|
4127
4131
|
* 组件数据收集器
|
|
4128
4132
|
*/
|
|
4129
4133
|
declare class ComponentDataCollector {
|
|
4134
|
+
private static componentSizeCache;
|
|
4130
4135
|
/**
|
|
4131
|
-
*
|
|
4136
|
+
* 收集组件数据(轻量版,不计算实际内存大小)
|
|
4132
4137
|
*/
|
|
4133
4138
|
collectComponentData(): IComponentDebugData;
|
|
4134
4139
|
/**
|
|
4135
|
-
*
|
|
4140
|
+
* 获取组件类型的估算内存大小(基于预设值,不进行实际计算)
|
|
4136
4141
|
*/
|
|
4137
|
-
private
|
|
4142
|
+
private getEstimatedComponentSize;
|
|
4143
|
+
private calculateQuickObjectSize;
|
|
4138
4144
|
/**
|
|
4139
|
-
*
|
|
4145
|
+
* 为内存快照功能提供的详细内存计算
|
|
4146
|
+
* 只在用户主动请求内存快照时调用
|
|
4147
|
+
*/
|
|
4148
|
+
calculateDetailedComponentMemory(typeName: string): number;
|
|
4149
|
+
/**
|
|
4150
|
+
* 估算对象内存大小(仅用于内存快照)
|
|
4151
|
+
* 优化版本:减少递归深度,提高性能
|
|
4140
4152
|
*/
|
|
4141
4153
|
private estimateObjectSize;
|
|
4154
|
+
static clearCache(): void;
|
|
4142
4155
|
}
|
|
4143
4156
|
|
|
4144
4157
|
/**
|
|
@@ -4257,6 +4270,22 @@ declare class DebugManager {
|
|
|
4257
4270
|
* 处理来自调试面板的消息
|
|
4258
4271
|
*/
|
|
4259
4272
|
private handleMessage;
|
|
4273
|
+
/**
|
|
4274
|
+
* 处理展开懒加载对象请求
|
|
4275
|
+
*/
|
|
4276
|
+
private handleExpandLazyObjectRequest;
|
|
4277
|
+
/**
|
|
4278
|
+
* 处理获取组件属性请求
|
|
4279
|
+
*/
|
|
4280
|
+
private handleGetComponentPropertiesRequest;
|
|
4281
|
+
/**
|
|
4282
|
+
* 处理获取原始实体列表请求
|
|
4283
|
+
*/
|
|
4284
|
+
private handleGetRawEntityListRequest;
|
|
4285
|
+
/**
|
|
4286
|
+
* 处理获取实体详情请求
|
|
4287
|
+
*/
|
|
4288
|
+
private handleGetEntityDetailsRequest;
|
|
4260
4289
|
/**
|
|
4261
4290
|
* 处理内存快照请求
|
|
4262
4291
|
*/
|
|
@@ -4270,17 +4299,11 @@ declare class DebugManager {
|
|
|
4270
4299
|
*/
|
|
4271
4300
|
private collectBaseMemoryInfo;
|
|
4272
4301
|
/**
|
|
4273
|
-
*
|
|
4274
|
-
*/
|
|
4275
|
-
private collectEntityMemoryStats;
|
|
4276
|
-
/**
|
|
4277
|
-
* 收集组件内存统计
|
|
4302
|
+
* 收集组件内存统计(仅用于内存快照)
|
|
4278
4303
|
*/
|
|
4279
4304
|
private collectComponentMemoryStats;
|
|
4280
|
-
/**
|
|
4281
|
-
* 收集系统内存统计
|
|
4282
|
-
*/
|
|
4283
4305
|
private collectSystemMemoryStats;
|
|
4306
|
+
private calculateQuickSystemSize;
|
|
4284
4307
|
/**
|
|
4285
4308
|
* 收集对象池内存统计
|
|
4286
4309
|
*/
|