@esengine/ecs-framework 2.1.18 → 2.1.20
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 +439 -28
- 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.20
|
|
3
3
|
* TypeScript definitions
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -759,6 +759,207 @@ interface IPerformanceEventData extends IEventData {
|
|
|
759
759
|
/** 额外数据 */
|
|
760
760
|
metadata?: Record<string, any>;
|
|
761
761
|
}
|
|
762
|
+
/**
|
|
763
|
+
* ECS调试配置接口
|
|
764
|
+
*/
|
|
765
|
+
interface IECSDebugConfig {
|
|
766
|
+
/** 是否启用调试 */
|
|
767
|
+
enabled: boolean;
|
|
768
|
+
/** WebSocket服务器URL */
|
|
769
|
+
websocketUrl: string;
|
|
770
|
+
/** 是否自动重连 */
|
|
771
|
+
autoReconnect?: boolean;
|
|
772
|
+
/** 数据更新间隔(毫秒) */
|
|
773
|
+
updateInterval?: number;
|
|
774
|
+
/** 数据通道配置 */
|
|
775
|
+
channels: {
|
|
776
|
+
entities: boolean;
|
|
777
|
+
systems: boolean;
|
|
778
|
+
performance: boolean;
|
|
779
|
+
components: boolean;
|
|
780
|
+
scenes: boolean;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Core配置接口
|
|
785
|
+
*/
|
|
786
|
+
interface ICoreConfig {
|
|
787
|
+
/** 是否启用调试模式 */
|
|
788
|
+
debug?: boolean;
|
|
789
|
+
/** 是否启用实体系统 */
|
|
790
|
+
enableEntitySystems?: boolean;
|
|
791
|
+
/** 调试配置 */
|
|
792
|
+
debugConfig?: IECSDebugConfig;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* ECS调试数据接口
|
|
796
|
+
*/
|
|
797
|
+
interface IECSDebugData {
|
|
798
|
+
/** 时间戳 */
|
|
799
|
+
timestamp: number;
|
|
800
|
+
/** 框架版本 */
|
|
801
|
+
frameworkVersion?: string;
|
|
802
|
+
/** 是否正在运行 */
|
|
803
|
+
isRunning: boolean;
|
|
804
|
+
/** 框架是否已加载 */
|
|
805
|
+
frameworkLoaded: boolean;
|
|
806
|
+
/** 当前场景名称 */
|
|
807
|
+
currentScene: string;
|
|
808
|
+
/** 实体数据 */
|
|
809
|
+
entities?: IEntityDebugData;
|
|
810
|
+
/** 系统数据 */
|
|
811
|
+
systems?: ISystemDebugData;
|
|
812
|
+
/** 性能数据 */
|
|
813
|
+
performance?: IPerformanceDebugData;
|
|
814
|
+
/** 组件数据 */
|
|
815
|
+
components?: IComponentDebugData;
|
|
816
|
+
/** 场景数据 */
|
|
817
|
+
scenes?: ISceneDebugData;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* 实体调试数据接口
|
|
821
|
+
*/
|
|
822
|
+
interface IEntityDebugData {
|
|
823
|
+
/** 总实体数 */
|
|
824
|
+
totalEntities: number;
|
|
825
|
+
/** 激活实体数 */
|
|
826
|
+
activeEntities: number;
|
|
827
|
+
/** 待添加实体数 */
|
|
828
|
+
pendingAdd: number;
|
|
829
|
+
/** 待移除实体数 */
|
|
830
|
+
pendingRemove: number;
|
|
831
|
+
/** 按Archetype分组的实体分布 */
|
|
832
|
+
entitiesPerArchetype: Array<{
|
|
833
|
+
signature: string;
|
|
834
|
+
count: number;
|
|
835
|
+
memory: number;
|
|
836
|
+
}>;
|
|
837
|
+
/** 组件数量最多的前几个实体 */
|
|
838
|
+
topEntitiesByComponents: Array<{
|
|
839
|
+
id: string;
|
|
840
|
+
name: string;
|
|
841
|
+
componentCount: number;
|
|
842
|
+
memory: number;
|
|
843
|
+
}>;
|
|
844
|
+
/** 实体详情列表 */
|
|
845
|
+
entityDetails?: Array<{
|
|
846
|
+
id: string | number;
|
|
847
|
+
name?: string;
|
|
848
|
+
tag?: string;
|
|
849
|
+
enabled: boolean;
|
|
850
|
+
componentCount: number;
|
|
851
|
+
components: string[];
|
|
852
|
+
}>;
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* 系统调试数据接口
|
|
856
|
+
*/
|
|
857
|
+
interface ISystemDebugData {
|
|
858
|
+
/** 总系统数 */
|
|
859
|
+
totalSystems: number;
|
|
860
|
+
/** 系统信息列表 */
|
|
861
|
+
systemsInfo: Array<{
|
|
862
|
+
name: string;
|
|
863
|
+
type: string;
|
|
864
|
+
entityCount: number;
|
|
865
|
+
executionTime?: number;
|
|
866
|
+
averageExecutionTime?: number;
|
|
867
|
+
minExecutionTime?: number;
|
|
868
|
+
maxExecutionTime?: number;
|
|
869
|
+
executionTimeHistory?: number[];
|
|
870
|
+
memoryUsage?: number;
|
|
871
|
+
updateOrder: number;
|
|
872
|
+
enabled: boolean;
|
|
873
|
+
lastUpdateTime?: number;
|
|
874
|
+
}>;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* 性能调试数据接口
|
|
878
|
+
*/
|
|
879
|
+
interface IPerformanceDebugData {
|
|
880
|
+
/** ECS框架执行时间(毫秒) */
|
|
881
|
+
frameTime: number;
|
|
882
|
+
/** 引擎总帧时间(毫秒) */
|
|
883
|
+
engineFrameTime?: number;
|
|
884
|
+
/** ECS占总帧时间百分比 */
|
|
885
|
+
ecsPercentage?: number;
|
|
886
|
+
/** 内存使用量(MB) */
|
|
887
|
+
memoryUsage: number;
|
|
888
|
+
/** FPS */
|
|
889
|
+
fps: number;
|
|
890
|
+
/** 平均ECS执行时间(毫秒) */
|
|
891
|
+
averageFrameTime: number;
|
|
892
|
+
/** 最小ECS执行时间(毫秒) */
|
|
893
|
+
minFrameTime: number;
|
|
894
|
+
/** 最大ECS执行时间(毫秒) */
|
|
895
|
+
maxFrameTime: number;
|
|
896
|
+
/** ECS执行时间历史记录 */
|
|
897
|
+
frameTimeHistory: number[];
|
|
898
|
+
/** 系统性能详情 */
|
|
899
|
+
systemPerformance: Array<{
|
|
900
|
+
systemName: string;
|
|
901
|
+
averageTime: number;
|
|
902
|
+
maxTime: number;
|
|
903
|
+
minTime: number;
|
|
904
|
+
samples: number;
|
|
905
|
+
percentage?: number;
|
|
906
|
+
}>;
|
|
907
|
+
/** 系统占比分析数据 */
|
|
908
|
+
systemBreakdown?: Array<{
|
|
909
|
+
systemName: string;
|
|
910
|
+
executionTime: number;
|
|
911
|
+
percentage: number;
|
|
912
|
+
}>;
|
|
913
|
+
/** 内存分配详情 */
|
|
914
|
+
memoryDetails?: {
|
|
915
|
+
entities: number;
|
|
916
|
+
components: number;
|
|
917
|
+
systems: number;
|
|
918
|
+
pooled: number;
|
|
919
|
+
totalMemory: number;
|
|
920
|
+
usedMemory: number;
|
|
921
|
+
freeMemory: number;
|
|
922
|
+
gcCollections: number;
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* 组件调试数据接口
|
|
927
|
+
*/
|
|
928
|
+
interface IComponentDebugData {
|
|
929
|
+
/** 组件类型数 */
|
|
930
|
+
componentTypes: number;
|
|
931
|
+
/** 组件实例总数 */
|
|
932
|
+
componentInstances: number;
|
|
933
|
+
/** 组件分布统计 */
|
|
934
|
+
componentStats: Array<{
|
|
935
|
+
typeName: string;
|
|
936
|
+
instanceCount: number;
|
|
937
|
+
memoryPerInstance: number;
|
|
938
|
+
totalMemory: number;
|
|
939
|
+
poolSize: number;
|
|
940
|
+
poolUtilization: number;
|
|
941
|
+
averagePerEntity?: number;
|
|
942
|
+
}>;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* 场景调试数据接口
|
|
946
|
+
*/
|
|
947
|
+
interface ISceneDebugData {
|
|
948
|
+
/** 当前场景名称 */
|
|
949
|
+
currentSceneName: string;
|
|
950
|
+
/** 场景是否已初始化 */
|
|
951
|
+
isInitialized: boolean;
|
|
952
|
+
/** 场景运行时间(秒) */
|
|
953
|
+
sceneRunTime: number;
|
|
954
|
+
/** 场景实体数 */
|
|
955
|
+
sceneEntityCount: number;
|
|
956
|
+
/** 场景系统数 */
|
|
957
|
+
sceneSystemCount: number;
|
|
958
|
+
/** 场景内存使用量 */
|
|
959
|
+
sceneMemory: number;
|
|
960
|
+
/** 场景启动时间 */
|
|
961
|
+
sceneUptime: number;
|
|
962
|
+
}
|
|
762
963
|
|
|
763
964
|
/**
|
|
764
965
|
* 游戏组件基类
|
|
@@ -1885,44 +2086,33 @@ declare class EntityList {
|
|
|
1885
2086
|
|
|
1886
2087
|
/**
|
|
1887
2088
|
* 高性能位操作类
|
|
1888
|
-
*
|
|
2089
|
+
* 基于BigInt实现,支持任意数量的位操作
|
|
1889
2090
|
*/
|
|
1890
2091
|
declare class Bits {
|
|
1891
|
-
private
|
|
1892
|
-
|
|
1893
|
-
constructor();
|
|
2092
|
+
private _value;
|
|
2093
|
+
constructor(initialValue?: bigint);
|
|
1894
2094
|
/**
|
|
1895
2095
|
* 设置指定位置的位为1
|
|
1896
|
-
* @param index 位置索引
|
|
1897
2096
|
*/
|
|
1898
2097
|
set(index: number): void;
|
|
1899
2098
|
/**
|
|
1900
2099
|
* 清除指定位置的位(设为0)
|
|
1901
|
-
* @param index 位置索引
|
|
1902
2100
|
*/
|
|
1903
2101
|
clear(index: number): void;
|
|
1904
2102
|
/**
|
|
1905
2103
|
* 获取指定位置的位值
|
|
1906
|
-
* @param index 位置索引
|
|
1907
|
-
* @returns 位值(true或false)
|
|
1908
2104
|
*/
|
|
1909
2105
|
get(index: number): boolean;
|
|
1910
2106
|
/**
|
|
1911
2107
|
* 检查是否包含所有指定的位
|
|
1912
|
-
* @param other 另一个Bits对象
|
|
1913
|
-
* @returns 如果包含所有位则返回true
|
|
1914
2108
|
*/
|
|
1915
2109
|
containsAll(other: Bits): boolean;
|
|
1916
2110
|
/**
|
|
1917
2111
|
* 检查是否包含任意一个指定的位
|
|
1918
|
-
* @param other 另一个Bits对象
|
|
1919
|
-
* @returns 如果包含任意位则返回true
|
|
1920
2112
|
*/
|
|
1921
2113
|
intersects(other: Bits): boolean;
|
|
1922
2114
|
/**
|
|
1923
2115
|
* 检查是否不包含任何指定的位
|
|
1924
|
-
* @param other 另一个Bits对象
|
|
1925
|
-
* @returns 如果不包含任何位则返回true
|
|
1926
2116
|
*/
|
|
1927
2117
|
excludes(other: Bits): boolean;
|
|
1928
2118
|
/**
|
|
@@ -1931,30 +2121,76 @@ declare class Bits {
|
|
|
1931
2121
|
clearAll(): void;
|
|
1932
2122
|
/**
|
|
1933
2123
|
* 检查是否为空(没有设置任何位)
|
|
1934
|
-
* @returns 如果为空则返回true
|
|
1935
2124
|
*/
|
|
1936
2125
|
isEmpty(): boolean;
|
|
1937
2126
|
/**
|
|
1938
2127
|
* 获取设置的位数量
|
|
1939
|
-
* @returns 设置的位数量
|
|
1940
2128
|
*/
|
|
1941
2129
|
cardinality(): number;
|
|
1942
2130
|
/**
|
|
1943
|
-
*
|
|
1944
|
-
|
|
1945
|
-
|
|
2131
|
+
* 位运算:与
|
|
2132
|
+
*/
|
|
2133
|
+
and(other: Bits): Bits;
|
|
2134
|
+
/**
|
|
2135
|
+
* 位运算:或
|
|
2136
|
+
*/
|
|
2137
|
+
or(other: Bits): Bits;
|
|
2138
|
+
/**
|
|
2139
|
+
* 位运算:异或
|
|
1946
2140
|
*/
|
|
1947
|
-
|
|
2141
|
+
xor(other: Bits): Bits;
|
|
2142
|
+
/**
|
|
2143
|
+
* 位运算:非
|
|
2144
|
+
*/
|
|
2145
|
+
not(maxBits?: number): Bits;
|
|
1948
2146
|
/**
|
|
1949
2147
|
* 复制另一个Bits对象
|
|
1950
|
-
* @param other 要复制的Bits对象
|
|
1951
2148
|
*/
|
|
1952
2149
|
copyFrom(other: Bits): void;
|
|
1953
2150
|
/**
|
|
1954
2151
|
* 创建当前Bits的副本
|
|
1955
|
-
* @returns 新的Bits对象
|
|
1956
2152
|
*/
|
|
1957
2153
|
clone(): Bits;
|
|
2154
|
+
/**
|
|
2155
|
+
* 获取原始BigInt值
|
|
2156
|
+
*/
|
|
2157
|
+
getValue(): bigint;
|
|
2158
|
+
/**
|
|
2159
|
+
* 设置原始BigInt值
|
|
2160
|
+
*/
|
|
2161
|
+
setValue(value: bigint): void;
|
|
2162
|
+
/**
|
|
2163
|
+
* 获取调试信息
|
|
2164
|
+
*/
|
|
2165
|
+
toString(): string;
|
|
2166
|
+
/**
|
|
2167
|
+
* 获取二进制表示
|
|
2168
|
+
*/
|
|
2169
|
+
toBinaryString(maxBits?: number): string;
|
|
2170
|
+
/**
|
|
2171
|
+
* 获取十六进制表示
|
|
2172
|
+
*/
|
|
2173
|
+
toHexString(): string;
|
|
2174
|
+
/**
|
|
2175
|
+
* 从二进制字符串创建Bits
|
|
2176
|
+
*/
|
|
2177
|
+
static fromBinaryString(binaryString: string): Bits;
|
|
2178
|
+
/**
|
|
2179
|
+
* 从十六进制字符串创建Bits
|
|
2180
|
+
*/
|
|
2181
|
+
static fromHexString(hexString: string): Bits;
|
|
2182
|
+
/**
|
|
2183
|
+
* 比较两个Bits对象是否相等
|
|
2184
|
+
*/
|
|
2185
|
+
equals(other: Bits): boolean;
|
|
2186
|
+
/**
|
|
2187
|
+
* 获取最高位的索引
|
|
2188
|
+
*/
|
|
2189
|
+
getHighestBitIndex(): number;
|
|
2190
|
+
/**
|
|
2191
|
+
* 获取最低位的索引
|
|
2192
|
+
*/
|
|
2193
|
+
getLowestBitIndex(): number;
|
|
1958
2194
|
}
|
|
1959
2195
|
|
|
1960
2196
|
/**
|
|
@@ -3719,6 +3955,150 @@ declare class EntityBatchOperator {
|
|
|
3719
3955
|
*/
|
|
3720
3956
|
declare function createECSAPI(scene: Scene, querySystem: QuerySystem, eventSystem: TypeSafeEventSystem): ECSFluentAPI;
|
|
3721
3957
|
|
|
3958
|
+
/**
|
|
3959
|
+
* ECS调试报告器 - WebSocket模式
|
|
3960
|
+
*
|
|
3961
|
+
* 负责收集ECS框架的运行时调试数据并通过WebSocket发送到调试服务器
|
|
3962
|
+
*/
|
|
3963
|
+
declare class DebugReporter {
|
|
3964
|
+
private config;
|
|
3965
|
+
private core;
|
|
3966
|
+
private timer?;
|
|
3967
|
+
private ws?;
|
|
3968
|
+
private lastFrameTime;
|
|
3969
|
+
private frameCount;
|
|
3970
|
+
private lastFpsTime;
|
|
3971
|
+
private fps;
|
|
3972
|
+
private sceneStartTime;
|
|
3973
|
+
private isConnected;
|
|
3974
|
+
private reconnectAttempts;
|
|
3975
|
+
private maxReconnectAttempts;
|
|
3976
|
+
private frameTimeHistory;
|
|
3977
|
+
private maxHistoryLength;
|
|
3978
|
+
/**
|
|
3979
|
+
* 构造函数
|
|
3980
|
+
* @param core Core实例
|
|
3981
|
+
* @param config 调试配置
|
|
3982
|
+
*/
|
|
3983
|
+
constructor(core: Core, config: IECSDebugConfig);
|
|
3984
|
+
/**
|
|
3985
|
+
* 启动调试报告器
|
|
3986
|
+
*/
|
|
3987
|
+
private start;
|
|
3988
|
+
/**
|
|
3989
|
+
* 停止调试报告器
|
|
3990
|
+
*/
|
|
3991
|
+
stop(): void;
|
|
3992
|
+
/**
|
|
3993
|
+
* 更新配置
|
|
3994
|
+
* @param newConfig 新配置
|
|
3995
|
+
*/
|
|
3996
|
+
updateConfig(newConfig: IECSDebugConfig): void;
|
|
3997
|
+
/**
|
|
3998
|
+
* 连接WebSocket
|
|
3999
|
+
*/
|
|
4000
|
+
private connectWebSocket;
|
|
4001
|
+
/**
|
|
4002
|
+
* 启动数据流
|
|
4003
|
+
*/
|
|
4004
|
+
private startDataStream;
|
|
4005
|
+
/**
|
|
4006
|
+
* 发送消息
|
|
4007
|
+
*/
|
|
4008
|
+
private send;
|
|
4009
|
+
/**
|
|
4010
|
+
* 处理接收到的消息
|
|
4011
|
+
* @param message 消息内容
|
|
4012
|
+
*/
|
|
4013
|
+
private handleMessage;
|
|
4014
|
+
/**
|
|
4015
|
+
* 收集调试数据
|
|
4016
|
+
* @returns 调试数据对象
|
|
4017
|
+
*/
|
|
4018
|
+
private collectDebugData;
|
|
4019
|
+
/**
|
|
4020
|
+
* 更新FPS计算
|
|
4021
|
+
*/
|
|
4022
|
+
private updateFPS;
|
|
4023
|
+
/**
|
|
4024
|
+
* 获取框架版本
|
|
4025
|
+
*/
|
|
4026
|
+
private getFrameworkVersion;
|
|
4027
|
+
/**
|
|
4028
|
+
* 获取当前场景名称
|
|
4029
|
+
*/
|
|
4030
|
+
private getCurrentSceneName;
|
|
4031
|
+
/**
|
|
4032
|
+
* 收集实体数据
|
|
4033
|
+
*/
|
|
4034
|
+
private collectEntityData;
|
|
4035
|
+
/**
|
|
4036
|
+
* 获取实体详情
|
|
4037
|
+
*/
|
|
4038
|
+
private getEntityDetails;
|
|
4039
|
+
/**
|
|
4040
|
+
* 收集系统数据
|
|
4041
|
+
*/
|
|
4042
|
+
private collectSystemData;
|
|
4043
|
+
/**
|
|
4044
|
+
* 收集性能数据
|
|
4045
|
+
*/
|
|
4046
|
+
private collectPerformanceData;
|
|
4047
|
+
/**
|
|
4048
|
+
* 获取ECS框架整体性能数据
|
|
4049
|
+
*/
|
|
4050
|
+
private getECSPerformanceData;
|
|
4051
|
+
/**
|
|
4052
|
+
* 获取系统性能数据
|
|
4053
|
+
*/
|
|
4054
|
+
private getSystemPerformance;
|
|
4055
|
+
/**
|
|
4056
|
+
* 获取内存详情
|
|
4057
|
+
*/
|
|
4058
|
+
private getMemoryDetails;
|
|
4059
|
+
/**
|
|
4060
|
+
* 收集组件数据
|
|
4061
|
+
*/
|
|
4062
|
+
private collectComponentData;
|
|
4063
|
+
/**
|
|
4064
|
+
* 计算组件实际内存大小
|
|
4065
|
+
*/
|
|
4066
|
+
private calculateComponentMemorySize;
|
|
4067
|
+
/**
|
|
4068
|
+
* 估算对象内存大小(字节)
|
|
4069
|
+
*/
|
|
4070
|
+
private estimateObjectSize;
|
|
4071
|
+
/**
|
|
4072
|
+
* 收集场景数据
|
|
4073
|
+
*/
|
|
4074
|
+
private collectSceneData;
|
|
4075
|
+
/**
|
|
4076
|
+
* 手动触发数据收集
|
|
4077
|
+
* @returns 当前调试数据
|
|
4078
|
+
*/
|
|
4079
|
+
getDebugData(): IECSDebugData;
|
|
4080
|
+
/**
|
|
4081
|
+
* 重置场景时间
|
|
4082
|
+
*/
|
|
4083
|
+
onSceneChanged(): void;
|
|
4084
|
+
/**
|
|
4085
|
+
* 获取连接状态
|
|
4086
|
+
*/
|
|
4087
|
+
get connected(): boolean;
|
|
4088
|
+
/**
|
|
4089
|
+
* 手动重连
|
|
4090
|
+
*/
|
|
4091
|
+
reconnect(): void;
|
|
4092
|
+
/**
|
|
4093
|
+
* 获取Archetype分布
|
|
4094
|
+
*/
|
|
4095
|
+
private getArchetypeDistribution;
|
|
4096
|
+
/**
|
|
4097
|
+
* 获取组件数量最多的实体
|
|
4098
|
+
*/
|
|
4099
|
+
private getTopEntitiesByComponents;
|
|
4100
|
+
}
|
|
4101
|
+
|
|
3722
4102
|
/**
|
|
3723
4103
|
* 游戏引擎核心类
|
|
3724
4104
|
*
|
|
@@ -3808,11 +4188,20 @@ declare class Core {
|
|
|
3808
4188
|
* 当前活动场景
|
|
3809
4189
|
*/
|
|
3810
4190
|
_scene?: Scene;
|
|
4191
|
+
/**
|
|
4192
|
+
* 调试报告器
|
|
4193
|
+
*
|
|
4194
|
+
* 负责收集和发送调试数据。
|
|
4195
|
+
*/
|
|
4196
|
+
_debugReporter?: DebugReporter;
|
|
4197
|
+
/**
|
|
4198
|
+
* Core配置
|
|
4199
|
+
*/
|
|
4200
|
+
private _config;
|
|
3811
4201
|
/**
|
|
3812
4202
|
* 创建核心实例
|
|
3813
4203
|
*
|
|
3814
|
-
* @param
|
|
3815
|
-
* @param enableEntitySystems - 是否启用实体系统,默认为true
|
|
4204
|
+
* @param config - Core配置对象
|
|
3816
4205
|
*/
|
|
3817
4206
|
private constructor();
|
|
3818
4207
|
/**
|
|
@@ -3841,10 +4230,10 @@ declare class Core {
|
|
|
3841
4230
|
*
|
|
3842
4231
|
* 如果实例已存在,则返回现有实例。
|
|
3843
4232
|
*
|
|
3844
|
-
* @param
|
|
4233
|
+
* @param config - Core配置,也可以直接传入boolean表示debug模式(向后兼容)
|
|
3845
4234
|
* @returns Core实例
|
|
3846
4235
|
*/
|
|
3847
|
-
static create(
|
|
4236
|
+
static create(config?: ICoreConfig | boolean): Core;
|
|
3848
4237
|
/**
|
|
3849
4238
|
* 更新游戏逻辑
|
|
3850
4239
|
*
|
|
@@ -3910,6 +4299,28 @@ declare class Core {
|
|
|
3910
4299
|
* @returns ECS API实例,如果未初始化则返回null
|
|
3911
4300
|
*/
|
|
3912
4301
|
static get ecsAPI(): ECSFluentAPI | null;
|
|
4302
|
+
/**
|
|
4303
|
+
* 启用调试功能
|
|
4304
|
+
*
|
|
4305
|
+
* @param config 调试配置
|
|
4306
|
+
*/
|
|
4307
|
+
static enableDebug(config: IECSDebugConfig): void;
|
|
4308
|
+
/**
|
|
4309
|
+
* 禁用调试功能
|
|
4310
|
+
*/
|
|
4311
|
+
static disableDebug(): void;
|
|
4312
|
+
/**
|
|
4313
|
+
* 获取调试数据
|
|
4314
|
+
*
|
|
4315
|
+
* @returns 当前调试数据,如果调试未启用则返回null
|
|
4316
|
+
*/
|
|
4317
|
+
static getDebugData(): any;
|
|
4318
|
+
/**
|
|
4319
|
+
* 检查调试是否启用
|
|
4320
|
+
*
|
|
4321
|
+
* @returns 调试状态
|
|
4322
|
+
*/
|
|
4323
|
+
static get isDebugEnabled(): boolean;
|
|
3913
4324
|
/**
|
|
3914
4325
|
* 场景切换回调
|
|
3915
4326
|
*
|
|
@@ -5059,4 +5470,4 @@ declare class Time {
|
|
|
5059
5470
|
}
|
|
5060
5471
|
|
|
5061
5472
|
export { ArchetypeSystem, AsyncEventHandler$1 as AsyncEventHandler, BitMaskOptimizer, BitmapComponentIndex, Bits, Component, ComponentIndexManager, ComponentPool, ComponentStorage, ComponentTypeManager, Core, DirtyFlag, DirtyTrackingSystem, ECSEventType, ECSFluentAPI, EVENT_TYPES, Emitter, Entity, EntityList, EntityManager, EntityProcessorList, EntityQueryBuilder, EntitySystem, EventBus, EventHandler$1 as EventHandler, EventPriority, EventTypeValidator, FuncPack, GlobalEventBus, GlobalManager, HashComponentIndex, IdentifierPool, IndexType, IndexUpdateBatcher, IntervalSystem, Matcher, NumberExtension, PassiveSystem, PerformanceMonitor, PerformanceWarningType, Pool, PoolManager, ProcessingSystem, QuerySystem, Scene, TieredObjectPool, Time, Timer, TimerManager, TypeSafeEventSystem, TypeUtils, createECSAPI };
|
|
5062
|
-
export type { Archetype, ArchetypeQueryResult, ComponentType$1 as ComponentType, DirtyData, DirtyListener, EventListenerConfig, EventStats, IComponent, IComponentEventData, IEntityEventData, IEventBus, IEventData, IEventListenerConfig, IEventStats, IPerformanceEventData, IPoolable, ISceneEventData, ISystemBase, ISystemEventData, ITimer, PerformanceData, PerformanceStats, PerformanceThresholds, PerformanceWarning, PoolStats };
|
|
5473
|
+
export type { Archetype, ArchetypeQueryResult, ComponentType$1 as ComponentType, DirtyData, DirtyListener, EventListenerConfig, EventStats, IComponent, IComponentDebugData, IComponentEventData, ICoreConfig, IECSDebugConfig, IECSDebugData, IEntityDebugData, IEntityEventData, IEventBus, IEventData, IEventListenerConfig, IEventStats, IPerformanceDebugData, IPerformanceEventData, IPoolable, ISceneDebugData, ISceneEventData, ISystemBase, ISystemDebugData, ISystemEventData, ITimer, PerformanceData, PerformanceStats, PerformanceThresholds, PerformanceWarning, PoolStats };
|