@esengine/ecs-framework 2.3.0 → 2.3.1
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/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +13451 -0
- package/dist/index.es5.js +4 -0
- package/dist/index.es5.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +4 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/package.json +47 -0
- package/package.json +87 -84
- package/bin/Core/DI/Decorators.d.ts +0 -206
- package/bin/Core/DI/Decorators.d.ts.map +0 -1
- package/bin/Core/DI/Decorators.js +0 -253
- package/bin/Core/DI/Decorators.js.map +0 -1
- package/bin/Core/DI/index.d.ts +0 -8
- package/bin/Core/DI/index.d.ts.map +0 -1
- package/bin/Core/DI/index.js +0 -7
- package/bin/Core/DI/index.js.map +0 -1
- package/bin/Core/Plugin.d.ts +0 -112
- package/bin/Core/Plugin.d.ts.map +0 -1
- package/bin/Core/Plugin.js +0 -19
- package/bin/Core/Plugin.js.map +0 -1
- package/bin/Core/PluginManager.d.ts +0 -118
- package/bin/Core/PluginManager.d.ts.map +0 -1
- package/bin/Core/PluginManager.js +0 -229
- package/bin/Core/PluginManager.js.map +0 -1
- package/bin/Core/ServiceContainer.d.ts +0 -221
- package/bin/Core/ServiceContainer.d.ts.map +0 -1
- package/bin/Core/ServiceContainer.js +0 -352
- package/bin/Core/ServiceContainer.js.map +0 -1
- package/bin/Core.d.ts +0 -379
- package/bin/Core.d.ts.map +0 -1
- package/bin/Core.js +0 -553
- package/bin/Core.js.map +0 -1
- package/bin/ECS/Component.d.ts +0 -104
- package/bin/ECS/Component.d.ts.map +0 -1
- package/bin/ECS/Component.js +0 -105
- package/bin/ECS/Component.js.map +0 -1
- package/bin/ECS/Components/HierarchyComponent.d.ts +0 -46
- package/bin/ECS/Components/HierarchyComponent.d.ts.map +0 -1
- package/bin/ECS/Components/HierarchyComponent.js +0 -65
- package/bin/ECS/Components/HierarchyComponent.js.map +0 -1
- package/bin/ECS/Components/index.d.ts +0 -2
- package/bin/ECS/Components/index.d.ts.map +0 -1
- package/bin/ECS/Components/index.js +0 -2
- package/bin/ECS/Components/index.js.map +0 -1
- package/bin/ECS/Core/ArchetypeSystem.d.ts +0 -103
- package/bin/ECS/Core/ArchetypeSystem.d.ts.map +0 -1
- package/bin/ECS/Core/ArchetypeSystem.js +0 -244
- package/bin/ECS/Core/ArchetypeSystem.js.map +0 -1
- package/bin/ECS/Core/CommandBuffer.d.ts +0 -154
- package/bin/ECS/Core/CommandBuffer.d.ts.map +0 -1
- package/bin/ECS/Core/CommandBuffer.js +0 -244
- package/bin/ECS/Core/CommandBuffer.js.map +0 -1
- package/bin/ECS/Core/ComponentPool.d.ts +0 -139
- package/bin/ECS/Core/ComponentPool.d.ts.map +0 -1
- package/bin/ECS/Core/ComponentPool.js +0 -276
- package/bin/ECS/Core/ComponentPool.js.map +0 -1
- package/bin/ECS/Core/ComponentStorage/ComponentRegistry.d.ts +0 -127
- package/bin/ECS/Core/ComponentStorage/ComponentRegistry.d.ts.map +0 -1
- package/bin/ECS/Core/ComponentStorage/ComponentRegistry.js +0 -235
- package/bin/ECS/Core/ComponentStorage/ComponentRegistry.js.map +0 -1
- package/bin/ECS/Core/ComponentStorage.d.ts +0 -185
- package/bin/ECS/Core/ComponentStorage.d.ts.map +0 -1
- package/bin/ECS/Core/ComponentStorage.js +0 -321
- package/bin/ECS/Core/ComponentStorage.js.map +0 -1
- package/bin/ECS/Core/EntityLifecyclePolicy.d.ts +0 -26
- package/bin/ECS/Core/EntityLifecyclePolicy.d.ts.map +0 -1
- package/bin/ECS/Core/EntityLifecyclePolicy.js +0 -2
- package/bin/ECS/Core/EntityLifecyclePolicy.js.map +0 -1
- package/bin/ECS/Core/EventBus.d.ts +0 -210
- package/bin/ECS/Core/EventBus.d.ts.map +0 -1
- package/bin/ECS/Core/EventBus.js +0 -370
- package/bin/ECS/Core/EventBus.js.map +0 -1
- package/bin/ECS/Core/EventSystem.d.ts +0 -225
- package/bin/ECS/Core/EventSystem.d.ts.map +0 -1
- package/bin/ECS/Core/EventSystem.js +0 -448
- package/bin/ECS/Core/EventSystem.js.map +0 -1
- package/bin/ECS/Core/Events/index.d.ts +0 -3
- package/bin/ECS/Core/Events/index.d.ts.map +0 -1
- package/bin/ECS/Core/Events/index.js +0 -3
- package/bin/ECS/Core/Events/index.js.map +0 -1
- package/bin/ECS/Core/FluentAPI/ComponentBuilder.d.ts +0 -35
- package/bin/ECS/Core/FluentAPI/ComponentBuilder.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI/ComponentBuilder.js +0 -48
- package/bin/ECS/Core/FluentAPI/ComponentBuilder.js.map +0 -1
- package/bin/ECS/Core/FluentAPI/ECSFluentAPI.d.ts +0 -135
- package/bin/ECS/Core/FluentAPI/ECSFluentAPI.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI/ECSFluentAPI.js +0 -166
- package/bin/ECS/Core/FluentAPI/ECSFluentAPI.js.map +0 -1
- package/bin/ECS/Core/FluentAPI/EntityBatchOperator.d.ts +0 -58
- package/bin/ECS/Core/FluentAPI/EntityBatchOperator.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI/EntityBatchOperator.js +0 -85
- package/bin/ECS/Core/FluentAPI/EntityBatchOperator.js.map +0 -1
- package/bin/ECS/Core/FluentAPI/EntityBuilder.d.ts +0 -110
- package/bin/ECS/Core/FluentAPI/EntityBuilder.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI/EntityBuilder.js +0 -181
- package/bin/ECS/Core/FluentAPI/EntityBuilder.js.map +0 -1
- package/bin/ECS/Core/FluentAPI/SceneBuilder.d.ts +0 -53
- package/bin/ECS/Core/FluentAPI/SceneBuilder.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI/SceneBuilder.js +0 -79
- package/bin/ECS/Core/FluentAPI/SceneBuilder.js.map +0 -1
- package/bin/ECS/Core/FluentAPI/index.d.ts +0 -6
- package/bin/ECS/Core/FluentAPI/index.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI/index.js +0 -6
- package/bin/ECS/Core/FluentAPI/index.js.map +0 -1
- package/bin/ECS/Core/FluentAPI.d.ts +0 -2
- package/bin/ECS/Core/FluentAPI.d.ts.map +0 -1
- package/bin/ECS/Core/FluentAPI.js +0 -3
- package/bin/ECS/Core/FluentAPI.js.map +0 -1
- package/bin/ECS/Core/Query/TypedQuery.d.ts +0 -214
- package/bin/ECS/Core/Query/TypedQuery.d.ts.map +0 -1
- package/bin/ECS/Core/Query/TypedQuery.js +0 -294
- package/bin/ECS/Core/Query/TypedQuery.js.map +0 -1
- package/bin/ECS/Core/Query/index.d.ts +0 -3
- package/bin/ECS/Core/Query/index.d.ts.map +0 -1
- package/bin/ECS/Core/Query/index.js +0 -3
- package/bin/ECS/Core/Query/index.js.map +0 -1
- package/bin/ECS/Core/QuerySystem.d.ts +0 -458
- package/bin/ECS/Core/QuerySystem.d.ts.map +0 -1
- package/bin/ECS/Core/QuerySystem.js +0 -1069
- package/bin/ECS/Core/QuerySystem.js.map +0 -1
- package/bin/ECS/Core/QueryTypes.d.ts +0 -34
- package/bin/ECS/Core/QueryTypes.d.ts.map +0 -1
- package/bin/ECS/Core/QueryTypes.js +0 -13
- package/bin/ECS/Core/QueryTypes.js.map +0 -1
- package/bin/ECS/Core/ReactiveQuery.d.ts +0 -211
- package/bin/ECS/Core/ReactiveQuery.d.ts.map +0 -1
- package/bin/ECS/Core/ReactiveQuery.js +0 -401
- package/bin/ECS/Core/ReactiveQuery.js.map +0 -1
- package/bin/ECS/Core/ReferenceTracker.d.ts +0 -111
- package/bin/ECS/Core/ReferenceTracker.d.ts.map +0 -1
- package/bin/ECS/Core/ReferenceTracker.js +0 -254
- package/bin/ECS/Core/ReferenceTracker.js.map +0 -1
- package/bin/ECS/Core/SoASerializer.d.ts +0 -28
- package/bin/ECS/Core/SoASerializer.d.ts.map +0 -1
- package/bin/ECS/Core/SoASerializer.js +0 -85
- package/bin/ECS/Core/SoASerializer.js.map +0 -1
- package/bin/ECS/Core/SoAStorage.d.ts +0 -129
- package/bin/ECS/Core/SoAStorage.d.ts.map +0 -1
- package/bin/ECS/Core/SoAStorage.js +0 -685
- package/bin/ECS/Core/SoAStorage.js.map +0 -1
- package/bin/ECS/Core/SoATypeRegistry.d.ts +0 -50
- package/bin/ECS/Core/SoATypeRegistry.d.ts.map +0 -1
- package/bin/ECS/Core/SoATypeRegistry.js +0 -135
- package/bin/ECS/Core/SoATypeRegistry.js.map +0 -1
- package/bin/ECS/Core/Storage/index.d.ts +0 -4
- package/bin/ECS/Core/Storage/index.d.ts.map +0 -1
- package/bin/ECS/Core/Storage/index.js +0 -4
- package/bin/ECS/Core/Storage/index.js.map +0 -1
- package/bin/ECS/Core/StorageDecorators.d.ts +0 -20
- package/bin/ECS/Core/StorageDecorators.d.ts.map +0 -1
- package/bin/ECS/Core/StorageDecorators.js +0 -27
- package/bin/ECS/Core/StorageDecorators.js.map +0 -1
- package/bin/ECS/CoreEvents.d.ts +0 -131
- package/bin/ECS/CoreEvents.d.ts.map +0 -1
- package/bin/ECS/CoreEvents.js +0 -163
- package/bin/ECS/CoreEvents.js.map +0 -1
- package/bin/ECS/Decorators/EntityRefDecorator.d.ts +0 -46
- package/bin/ECS/Decorators/EntityRefDecorator.d.ts.map +0 -1
- package/bin/ECS/Decorators/EntityRefDecorator.js +0 -118
- package/bin/ECS/Decorators/EntityRefDecorator.js.map +0 -1
- package/bin/ECS/Decorators/PropertyDecorator.d.ts +0 -168
- package/bin/ECS/Decorators/PropertyDecorator.d.ts.map +0 -1
- package/bin/ECS/Decorators/PropertyDecorator.js +0 -40
- package/bin/ECS/Decorators/PropertyDecorator.js.map +0 -1
- package/bin/ECS/Decorators/TypeDecorators.d.ts +0 -124
- package/bin/ECS/Decorators/TypeDecorators.d.ts.map +0 -1
- package/bin/ECS/Decorators/TypeDecorators.js +0 -151
- package/bin/ECS/Decorators/TypeDecorators.js.map +0 -1
- package/bin/ECS/Decorators/index.d.ts +0 -7
- package/bin/ECS/Decorators/index.d.ts.map +0 -1
- package/bin/ECS/Decorators/index.js +0 -4
- package/bin/ECS/Decorators/index.js.map +0 -1
- package/bin/ECS/Entity.d.ts +0 -415
- package/bin/ECS/Entity.d.ts.map +0 -1
- package/bin/ECS/Entity.js +0 -683
- package/bin/ECS/Entity.js.map +0 -1
- package/bin/ECS/EntityTags.d.ts +0 -71
- package/bin/ECS/EntityTags.d.ts.map +0 -1
- package/bin/ECS/EntityTags.js +0 -82
- package/bin/ECS/EntityTags.js.map +0 -1
- package/bin/ECS/IScene.d.ts +0 -308
- package/bin/ECS/IScene.d.ts.map +0 -1
- package/bin/ECS/IScene.js +0 -2
- package/bin/ECS/IScene.js.map +0 -1
- package/bin/ECS/Scene.d.ts +0 -799
- package/bin/ECS/Scene.d.ts.map +0 -1
- package/bin/ECS/Scene.js +0 -1203
- package/bin/ECS/Scene.js.map +0 -1
- package/bin/ECS/SceneManager.d.ts +0 -197
- package/bin/ECS/SceneManager.d.ts.map +0 -1
- package/bin/ECS/SceneManager.js +0 -264
- package/bin/ECS/SceneManager.js.map +0 -1
- package/bin/ECS/Serialization/ComponentSerializer.d.ts +0 -106
- package/bin/ECS/Serialization/ComponentSerializer.d.ts.map +0 -1
- package/bin/ECS/Serialization/ComponentSerializer.js +0 -251
- package/bin/ECS/Serialization/ComponentSerializer.js.map +0 -1
- package/bin/ECS/Serialization/EntitySerializer.d.ts +0 -111
- package/bin/ECS/Serialization/EntitySerializer.d.ts.map +0 -1
- package/bin/ECS/Serialization/EntitySerializer.js +0 -155
- package/bin/ECS/Serialization/EntitySerializer.js.map +0 -1
- package/bin/ECS/Serialization/IncrementalSerializer.d.ts +0 -259
- package/bin/ECS/Serialization/IncrementalSerializer.d.ts.map +0 -1
- package/bin/ECS/Serialization/IncrementalSerializer.js +0 -500
- package/bin/ECS/Serialization/IncrementalSerializer.js.map +0 -1
- package/bin/ECS/Serialization/SceneSerializer.d.ts +0 -213
- package/bin/ECS/Serialization/SceneSerializer.d.ts.map +0 -1
- package/bin/ECS/Serialization/SceneSerializer.js +0 -387
- package/bin/ECS/Serialization/SceneSerializer.js.map +0 -1
- package/bin/ECS/Serialization/SerializationDecorators.d.ts +0 -136
- package/bin/ECS/Serialization/SerializationDecorators.d.ts.map +0 -1
- package/bin/ECS/Serialization/SerializationDecorators.js +0 -216
- package/bin/ECS/Serialization/SerializationDecorators.js.map +0 -1
- package/bin/ECS/Serialization/VersionMigration.d.ts +0 -156
- package/bin/ECS/Serialization/VersionMigration.d.ts.map +0 -1
- package/bin/ECS/Serialization/VersionMigration.js +0 -279
- package/bin/ECS/Serialization/VersionMigration.js.map +0 -1
- package/bin/ECS/Serialization/index.d.ts +0 -18
- package/bin/ECS/Serialization/index.d.ts.map +0 -1
- package/bin/ECS/Serialization/index.js +0 -18
- package/bin/ECS/Serialization/index.js.map +0 -1
- package/bin/ECS/Systems/EntityCache.d.ts +0 -114
- package/bin/ECS/Systems/EntityCache.d.ts.map +0 -1
- package/bin/ECS/Systems/EntityCache.js +0 -145
- package/bin/ECS/Systems/EntityCache.js.map +0 -1
- package/bin/ECS/Systems/EntitySystem.d.ts +0 -591
- package/bin/ECS/Systems/EntitySystem.d.ts.map +0 -1
- package/bin/ECS/Systems/EntitySystem.js +0 -1102
- package/bin/ECS/Systems/EntitySystem.js.map +0 -1
- package/bin/ECS/Systems/HierarchySystem.d.ts +0 -155
- package/bin/ECS/Systems/HierarchySystem.d.ts.map +0 -1
- package/bin/ECS/Systems/HierarchySystem.js +0 -498
- package/bin/ECS/Systems/HierarchySystem.js.map +0 -1
- package/bin/ECS/Systems/IntervalSystem.d.ts +0 -33
- package/bin/ECS/Systems/IntervalSystem.d.ts.map +0 -1
- package/bin/ECS/Systems/IntervalSystem.js +0 -50
- package/bin/ECS/Systems/IntervalSystem.js.map +0 -1
- package/bin/ECS/Systems/PassiveSystem.d.ts +0 -17
- package/bin/ECS/Systems/PassiveSystem.d.ts.map +0 -1
- package/bin/ECS/Systems/PassiveSystem.js +0 -19
- package/bin/ECS/Systems/PassiveSystem.js.map +0 -1
- package/bin/ECS/Systems/ProcessingSystem.d.ts +0 -21
- package/bin/ECS/Systems/ProcessingSystem.d.ts.map +0 -1
- package/bin/ECS/Systems/ProcessingSystem.js +0 -20
- package/bin/ECS/Systems/ProcessingSystem.js.map +0 -1
- package/bin/ECS/Systems/WorkerEntitySystem.d.ts +0 -313
- package/bin/ECS/Systems/WorkerEntitySystem.d.ts.map +0 -1
- package/bin/ECS/Systems/WorkerEntitySystem.js +0 -792
- package/bin/ECS/Systems/WorkerEntitySystem.js.map +0 -1
- package/bin/ECS/Systems/index.d.ts +0 -8
- package/bin/ECS/Systems/index.d.ts.map +0 -1
- package/bin/ECS/Systems/index.js +0 -8
- package/bin/ECS/Systems/index.js.map +0 -1
- package/bin/ECS/TypedEntity.d.ts +0 -192
- package/bin/ECS/TypedEntity.d.ts.map +0 -1
- package/bin/ECS/TypedEntity.js +0 -254
- package/bin/ECS/TypedEntity.js.map +0 -1
- package/bin/ECS/Utils/BigIntCompatibility.d.ts +0 -151
- package/bin/ECS/Utils/BigIntCompatibility.d.ts.map +0 -1
- package/bin/ECS/Utils/BigIntCompatibility.js +0 -476
- package/bin/ECS/Utils/BigIntCompatibility.js.map +0 -1
- package/bin/ECS/Utils/BitMaskHashMap.d.ts +0 -28
- package/bin/ECS/Utils/BitMaskHashMap.d.ts.map +0 -1
- package/bin/ECS/Utils/BitMaskHashMap.js +0 -127
- package/bin/ECS/Utils/BitMaskHashMap.js.map +0 -1
- package/bin/ECS/Utils/Bits.d.ts +0 -154
- package/bin/ECS/Utils/Bits.d.ts.map +0 -1
- package/bin/ECS/Utils/Bits.js +0 -331
- package/bin/ECS/Utils/Bits.js.map +0 -1
- package/bin/ECS/Utils/ComponentSparseSet.d.ts +0 -143
- package/bin/ECS/Utils/ComponentSparseSet.d.ts.map +0 -1
- package/bin/ECS/Utils/ComponentSparseSet.js +0 -347
- package/bin/ECS/Utils/ComponentSparseSet.js.map +0 -1
- package/bin/ECS/Utils/EntityList.d.ts +0 -115
- package/bin/ECS/Utils/EntityList.d.ts.map +0 -1
- package/bin/ECS/Utils/EntityList.js +0 -258
- package/bin/ECS/Utils/EntityList.js.map +0 -1
- package/bin/ECS/Utils/EntityProcessorList.d.ts +0 -56
- package/bin/ECS/Utils/EntityProcessorList.d.ts.map +0 -1
- package/bin/ECS/Utils/EntityProcessorList.js +0 -113
- package/bin/ECS/Utils/EntityProcessorList.js.map +0 -1
- package/bin/ECS/Utils/IdentifierPool.d.ts +0 -203
- package/bin/ECS/Utils/IdentifierPool.d.ts.map +0 -1
- package/bin/ECS/Utils/IdentifierPool.js +0 -325
- package/bin/ECS/Utils/IdentifierPool.js.map +0 -1
- package/bin/ECS/Utils/Matcher.d.ts +0 -171
- package/bin/ECS/Utils/Matcher.d.ts.map +0 -1
- package/bin/ECS/Utils/Matcher.js +0 -293
- package/bin/ECS/Utils/Matcher.js.map +0 -1
- package/bin/ECS/Utils/SparseSet.d.ts +0 -170
- package/bin/ECS/Utils/SparseSet.d.ts.map +0 -1
- package/bin/ECS/Utils/SparseSet.js +0 -280
- package/bin/ECS/Utils/SparseSet.js.map +0 -1
- package/bin/ECS/Utils/index.d.ts +0 -9
- package/bin/ECS/Utils/index.d.ts.map +0 -1
- package/bin/ECS/Utils/index.js +0 -10
- package/bin/ECS/Utils/index.js.map +0 -1
- package/bin/ECS/World.d.ts +0 -238
- package/bin/ECS/World.d.ts.map +0 -1
- package/bin/ECS/World.js +0 -416
- package/bin/ECS/World.js.map +0 -1
- package/bin/ECS/WorldManager.d.ts +0 -224
- package/bin/ECS/WorldManager.d.ts.map +0 -1
- package/bin/ECS/WorldManager.js +0 -365
- package/bin/ECS/WorldManager.js.map +0 -1
- package/bin/ECS/index.d.ts +0 -26
- package/bin/ECS/index.d.ts.map +0 -1
- package/bin/ECS/index.js +0 -21
- package/bin/ECS/index.js.map +0 -1
- package/bin/Platform/IPlatformAdapter.d.ts +0 -169
- package/bin/Platform/IPlatformAdapter.d.ts.map +0 -1
- package/bin/Platform/IPlatformAdapter.js +0 -2
- package/bin/Platform/IPlatformAdapter.js.map +0 -1
- package/bin/Platform/PlatformDetector.d.ts +0 -56
- package/bin/Platform/PlatformDetector.d.ts.map +0 -1
- package/bin/Platform/PlatformDetector.js +0 -247
- package/bin/Platform/PlatformDetector.js.map +0 -1
- package/bin/Platform/PlatformManager.d.ts +0 -50
- package/bin/Platform/PlatformManager.d.ts.map +0 -1
- package/bin/Platform/PlatformManager.js +0 -114
- package/bin/Platform/PlatformManager.js.map +0 -1
- package/bin/Platform/index.d.ts +0 -19
- package/bin/Platform/index.d.ts.map +0 -1
- package/bin/Platform/index.js +0 -29
- package/bin/Platform/index.js.map +0 -1
- package/bin/Plugins/DebugPlugin.d.ts +0 -156
- package/bin/Plugins/DebugPlugin.d.ts.map +0 -1
- package/bin/Plugins/DebugPlugin.js +0 -248
- package/bin/Plugins/DebugPlugin.js.map +0 -1
- package/bin/Plugins/index.d.ts +0 -2
- package/bin/Plugins/index.d.ts.map +0 -1
- package/bin/Plugins/index.js +0 -2
- package/bin/Plugins/index.js.map +0 -1
- package/bin/Types/IUpdatable.d.ts +0 -18
- package/bin/Types/IUpdatable.d.ts.map +0 -1
- package/bin/Types/IUpdatable.js +0 -7
- package/bin/Types/IUpdatable.js.map +0 -1
- package/bin/Types/TypeHelpers.d.ts +0 -238
- package/bin/Types/TypeHelpers.d.ts.map +0 -1
- package/bin/Types/TypeHelpers.js +0 -19
- package/bin/Types/TypeHelpers.js.map +0 -1
- package/bin/Types/index.d.ts +0 -466
- package/bin/Types/index.d.ts.map +0 -1
- package/bin/Types/index.js +0 -7
- package/bin/Types/index.js.map +0 -1
- package/bin/Utils/BinarySerializer.d.ts +0 -23
- package/bin/Utils/BinarySerializer.d.ts.map +0 -1
- package/bin/Utils/BinarySerializer.js +0 -100
- package/bin/Utils/BinarySerializer.js.map +0 -1
- package/bin/Utils/Debug/AdvancedProfilerCollector.d.ts +0 -153
- package/bin/Utils/Debug/AdvancedProfilerCollector.d.ts.map +0 -1
- package/bin/Utils/Debug/AdvancedProfilerCollector.js +0 -406
- package/bin/Utils/Debug/AdvancedProfilerCollector.js.map +0 -1
- package/bin/Utils/Debug/ComponentDataCollector.d.ts +0 -32
- package/bin/Utils/Debug/ComponentDataCollector.d.ts.map +0 -1
- package/bin/Utils/Debug/ComponentDataCollector.js +0 -250
- package/bin/Utils/Debug/ComponentDataCollector.js.map +0 -1
- package/bin/Utils/Debug/DebugConfigService.d.ts +0 -16
- package/bin/Utils/Debug/DebugConfigService.d.ts.map +0 -1
- package/bin/Utils/Debug/DebugConfigService.js +0 -42
- package/bin/Utils/Debug/DebugConfigService.js.map +0 -1
- package/bin/Utils/Debug/DebugManager.d.ts +0 -131
- package/bin/Utils/Debug/DebugManager.d.ts.map +0 -1
- package/bin/Utils/Debug/DebugManager.js +0 -848
- package/bin/Utils/Debug/DebugManager.js.map +0 -1
- package/bin/Utils/Debug/EntityDataCollector.d.ts +0 -115
- package/bin/Utils/Debug/EntityDataCollector.d.ts.map +0 -1
- package/bin/Utils/Debug/EntityDataCollector.js +0 -870
- package/bin/Utils/Debug/EntityDataCollector.js.map +0 -1
- package/bin/Utils/Debug/PerformanceDataCollector.d.ts +0 -31
- package/bin/Utils/Debug/PerformanceDataCollector.d.ts.map +0 -1
- package/bin/Utils/Debug/PerformanceDataCollector.js +0 -203
- package/bin/Utils/Debug/PerformanceDataCollector.js.map +0 -1
- package/bin/Utils/Debug/SceneDataCollector.d.ts +0 -18
- package/bin/Utils/Debug/SceneDataCollector.d.ts.map +0 -1
- package/bin/Utils/Debug/SceneDataCollector.js +0 -43
- package/bin/Utils/Debug/SceneDataCollector.js.map +0 -1
- package/bin/Utils/Debug/SystemDataCollector.d.ts +0 -14
- package/bin/Utils/Debug/SystemDataCollector.d.ts.map +0 -1
- package/bin/Utils/Debug/SystemDataCollector.js +0 -60
- package/bin/Utils/Debug/SystemDataCollector.js.map +0 -1
- package/bin/Utils/Debug/WebSocketManager.d.ts +0 -54
- package/bin/Utils/Debug/WebSocketManager.d.ts.map +0 -1
- package/bin/Utils/Debug/WebSocketManager.js +0 -141
- package/bin/Utils/Debug/WebSocketManager.js.map +0 -1
- package/bin/Utils/Debug/index.d.ts +0 -11
- package/bin/Utils/Debug/index.d.ts.map +0 -1
- package/bin/Utils/Debug/index.js +0 -10
- package/bin/Utils/Debug/index.js.map +0 -1
- package/bin/Utils/Emitter.d.ts +0 -61
- package/bin/Utils/Emitter.d.ts.map +0 -1
- package/bin/Utils/Emitter.js +0 -101
- package/bin/Utils/Emitter.js.map +0 -1
- package/bin/Utils/Extensions/NumberExtension.d.ts +0 -13
- package/bin/Utils/Extensions/NumberExtension.d.ts.map +0 -1
- package/bin/Utils/Extensions/NumberExtension.js +0 -17
- package/bin/Utils/Extensions/NumberExtension.js.map +0 -1
- package/bin/Utils/Extensions/TypeUtils.d.ts +0 -13
- package/bin/Utils/Extensions/TypeUtils.d.ts.map +0 -1
- package/bin/Utils/Extensions/TypeUtils.js +0 -15
- package/bin/Utils/Extensions/TypeUtils.js.map +0 -1
- package/bin/Utils/Extensions/index.d.ts +0 -3
- package/bin/Utils/Extensions/index.d.ts.map +0 -1
- package/bin/Utils/Extensions/index.js +0 -4
- package/bin/Utils/Extensions/index.js.map +0 -1
- package/bin/Utils/GlobalManager.d.ts +0 -29
- package/bin/Utils/GlobalManager.d.ts.map +0 -1
- package/bin/Utils/GlobalManager.js +0 -50
- package/bin/Utils/GlobalManager.js.map +0 -1
- package/bin/Utils/Logger/ConsoleLogger.d.ts +0 -74
- package/bin/Utils/Logger/ConsoleLogger.d.ts.map +0 -1
- package/bin/Utils/Logger/ConsoleLogger.js +0 -187
- package/bin/Utils/Logger/ConsoleLogger.js.map +0 -1
- package/bin/Utils/Logger/Constants.d.ts +0 -36
- package/bin/Utils/Logger/Constants.d.ts.map +0 -1
- package/bin/Utils/Logger/Constants.js +0 -40
- package/bin/Utils/Logger/Constants.js.map +0 -1
- package/bin/Utils/Logger/LoggerManager.d.ts +0 -91
- package/bin/Utils/Logger/LoggerManager.d.ts.map +0 -1
- package/bin/Utils/Logger/LoggerManager.js +0 -167
- package/bin/Utils/Logger/LoggerManager.js.map +0 -1
- package/bin/Utils/Logger/Types.d.ts +0 -40
- package/bin/Utils/Logger/Types.d.ts.map +0 -1
- package/bin/Utils/Logger/Types.js +0 -2
- package/bin/Utils/Logger/Types.js.map +0 -1
- package/bin/Utils/Logger/index.d.ts +0 -5
- package/bin/Utils/Logger/index.d.ts.map +0 -1
- package/bin/Utils/Logger/index.js +0 -5
- package/bin/Utils/Logger/index.js.map +0 -1
- package/bin/Utils/PerformanceMonitor.d.ts +0 -196
- package/bin/Utils/PerformanceMonitor.d.ts.map +0 -1
- package/bin/Utils/PerformanceMonitor.js +0 -244
- package/bin/Utils/PerformanceMonitor.js.map +0 -1
- package/bin/Utils/Pool/IPoolable.d.ts +0 -29
- package/bin/Utils/Pool/IPoolable.d.ts.map +0 -1
- package/bin/Utils/Pool/IPoolable.js +0 -2
- package/bin/Utils/Pool/IPoolable.js.map +0 -1
- package/bin/Utils/Pool/Pool.d.ts +0 -109
- package/bin/Utils/Pool/Pool.d.ts.map +0 -1
- package/bin/Utils/Pool/Pool.js +0 -238
- package/bin/Utils/Pool/Pool.js.map +0 -1
- package/bin/Utils/Pool/PoolManager.d.ts +0 -96
- package/bin/Utils/Pool/PoolManager.d.ts.map +0 -1
- package/bin/Utils/Pool/PoolManager.js +0 -199
- package/bin/Utils/Pool/PoolManager.js.map +0 -1
- package/bin/Utils/Pool/index.d.ts +0 -4
- package/bin/Utils/Pool/index.d.ts.map +0 -1
- package/bin/Utils/Pool/index.js +0 -4
- package/bin/Utils/Pool/index.js.map +0 -1
- package/bin/Utils/Profiler/AutoProfiler.d.ts +0 -160
- package/bin/Utils/Profiler/AutoProfiler.d.ts.map +0 -1
- package/bin/Utils/Profiler/AutoProfiler.js +0 -503
- package/bin/Utils/Profiler/AutoProfiler.js.map +0 -1
- package/bin/Utils/Profiler/ProfilerSDK.d.ts +0 -175
- package/bin/Utils/Profiler/ProfilerSDK.d.ts.map +0 -1
- package/bin/Utils/Profiler/ProfilerSDK.js +0 -727
- package/bin/Utils/Profiler/ProfilerSDK.js.map +0 -1
- package/bin/Utils/Profiler/ProfilerTypes.d.ts +0 -218
- package/bin/Utils/Profiler/ProfilerTypes.d.ts.map +0 -1
- package/bin/Utils/Profiler/ProfilerTypes.js +0 -47
- package/bin/Utils/Profiler/ProfilerTypes.js.map +0 -1
- package/bin/Utils/Profiler/index.d.ts +0 -8
- package/bin/Utils/Profiler/index.d.ts.map +0 -1
- package/bin/Utils/Profiler/index.js +0 -7
- package/bin/Utils/Profiler/index.js.map +0 -1
- package/bin/Utils/Time.d.ts +0 -47
- package/bin/Utils/Time.d.ts.map +0 -1
- package/bin/Utils/Time.js +0 -64
- package/bin/Utils/Time.js.map +0 -1
- package/bin/Utils/Timers/ITimer.d.ts +0 -16
- package/bin/Utils/Timers/ITimer.d.ts.map +0 -1
- package/bin/Utils/Timers/ITimer.js +0 -2
- package/bin/Utils/Timers/ITimer.js.map +0 -1
- package/bin/Utils/Timers/Timer.d.ts +0 -30
- package/bin/Utils/Timers/Timer.d.ts.map +0 -1
- package/bin/Utils/Timers/Timer.js +0 -58
- package/bin/Utils/Timers/Timer.js.map +0 -1
- package/bin/Utils/Timers/TimerManager.d.ts +0 -26
- package/bin/Utils/Timers/TimerManager.d.ts.map +0 -1
- package/bin/Utils/Timers/TimerManager.js +0 -48
- package/bin/Utils/Timers/TimerManager.js.map +0 -1
- package/bin/Utils/index.d.ts +0 -11
- package/bin/Utils/index.d.ts.map +0 -1
- package/bin/Utils/index.js +0 -11
- package/bin/Utils/index.js.map +0 -1
- package/bin/index.d.ts +0 -29
- package/bin/index.d.ts.map +0 -1
- package/bin/index.js +0 -36
- package/bin/index.js.map +0 -1
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { createLogger } from '../Utils/Logger';
|
|
3
|
-
import { WorldManager } from '../ECS/WorldManager';
|
|
4
|
-
import { Injectable } from '../Core/DI/Decorators';
|
|
5
|
-
const logger = createLogger('DebugPlugin');
|
|
6
|
-
/**
|
|
7
|
-
* ECS 调试插件
|
|
8
|
-
*
|
|
9
|
-
* 提供运行时调试功能:
|
|
10
|
-
* - 实时查看实体和组件信息
|
|
11
|
-
* - System 执行统计
|
|
12
|
-
* - 性能监控
|
|
13
|
-
* - 实体查询
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* const core = Core.create();
|
|
18
|
-
* const debugPlugin = new DebugPlugin({ autoStart: true, updateInterval: 1000 });
|
|
19
|
-
* await core.pluginManager.install(debugPlugin);
|
|
20
|
-
*
|
|
21
|
-
* // 获取调试信息
|
|
22
|
-
* const stats = debugPlugin.getStats();
|
|
23
|
-
* console.log('Total entities:', stats.totalEntities);
|
|
24
|
-
*
|
|
25
|
-
* // 查询实体
|
|
26
|
-
* const entities = debugPlugin.queryEntities({ tag: 1 });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
let DebugPlugin = class DebugPlugin {
|
|
30
|
-
/**
|
|
31
|
-
* 创建调试插件实例
|
|
32
|
-
*
|
|
33
|
-
* @param options - 配置选项
|
|
34
|
-
*/
|
|
35
|
-
constructor(options) {
|
|
36
|
-
this.name = '@esengine/debug-plugin';
|
|
37
|
-
this.version = '1.0.0';
|
|
38
|
-
this.worldManager = null;
|
|
39
|
-
this.updateTimer = null;
|
|
40
|
-
this.autoStart = options?.autoStart ?? false;
|
|
41
|
-
this.updateInterval = options?.updateInterval ?? 1000;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* 安装插件
|
|
45
|
-
*/
|
|
46
|
-
async install(_core, services) {
|
|
47
|
-
this.worldManager = services.resolve(WorldManager);
|
|
48
|
-
logger.info('ECS Debug Plugin installed');
|
|
49
|
-
if (this.autoStart) {
|
|
50
|
-
this.start();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* 卸载插件
|
|
55
|
-
*/
|
|
56
|
-
async uninstall() {
|
|
57
|
-
this.stop();
|
|
58
|
-
this.worldManager = null;
|
|
59
|
-
logger.info('ECS Debug Plugin uninstalled');
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* 实现 IService 接口
|
|
63
|
-
*/
|
|
64
|
-
dispose() {
|
|
65
|
-
this.stop();
|
|
66
|
-
this.worldManager = null;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* 启动调试监控
|
|
70
|
-
*/
|
|
71
|
-
start() {
|
|
72
|
-
if (this.updateTimer) {
|
|
73
|
-
logger.warn('Debug monitoring already started');
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
logger.info('Starting debug monitoring');
|
|
77
|
-
this.updateTimer = setInterval(() => {
|
|
78
|
-
this.logStats();
|
|
79
|
-
}, this.updateInterval);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* 停止调试监控
|
|
83
|
-
*/
|
|
84
|
-
stop() {
|
|
85
|
-
if (this.updateTimer) {
|
|
86
|
-
clearInterval(this.updateTimer);
|
|
87
|
-
this.updateTimer = null;
|
|
88
|
-
logger.info('Debug monitoring stopped');
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* 获取当前 ECS 统计信息
|
|
93
|
-
*/
|
|
94
|
-
getStats() {
|
|
95
|
-
if (!this.worldManager) {
|
|
96
|
-
throw new Error('Plugin not installed');
|
|
97
|
-
}
|
|
98
|
-
const scenes = [];
|
|
99
|
-
let totalEntities = 0;
|
|
100
|
-
let totalSystems = 0;
|
|
101
|
-
const worlds = this.worldManager.getAllWorlds();
|
|
102
|
-
for (const world of worlds) {
|
|
103
|
-
for (const scene of world.getAllScenes()) {
|
|
104
|
-
const sceneInfo = this.getSceneInfo(scene);
|
|
105
|
-
scenes.push(sceneInfo);
|
|
106
|
-
totalEntities += sceneInfo.entityCount;
|
|
107
|
-
totalSystems += sceneInfo.systems.length;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
scenes,
|
|
112
|
-
totalEntities,
|
|
113
|
-
totalSystems,
|
|
114
|
-
timestamp: Date.now()
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* 获取场景调试信息
|
|
119
|
-
*/
|
|
120
|
-
getSceneInfo(scene) {
|
|
121
|
-
const entities = scene.entities.buffer;
|
|
122
|
-
const systems = scene.systems;
|
|
123
|
-
return {
|
|
124
|
-
name: scene.name,
|
|
125
|
-
entityCount: entities.length,
|
|
126
|
-
systems: systems.map((sys) => this.getSystemInfo(sys)),
|
|
127
|
-
entities: entities.map((entity) => this.getEntityInfo(entity))
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* 获取系统调试信息
|
|
132
|
-
*/
|
|
133
|
-
getSystemInfo(system) {
|
|
134
|
-
const perfStats = system.getPerformanceStats();
|
|
135
|
-
const performance = perfStats ? {
|
|
136
|
-
avgExecutionTime: perfStats.averageTime,
|
|
137
|
-
maxExecutionTime: perfStats.maxTime,
|
|
138
|
-
totalCalls: perfStats.executionCount
|
|
139
|
-
} : undefined;
|
|
140
|
-
return {
|
|
141
|
-
name: system.constructor.name,
|
|
142
|
-
enabled: system.enabled,
|
|
143
|
-
updateOrder: system.updateOrder,
|
|
144
|
-
entityCount: system.entities.length,
|
|
145
|
-
...(performance !== undefined && { performance })
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* 获取实体调试信息
|
|
150
|
-
*/
|
|
151
|
-
getEntityInfo(entity) {
|
|
152
|
-
const components = entity.components;
|
|
153
|
-
return {
|
|
154
|
-
id: entity.id,
|
|
155
|
-
name: entity.name,
|
|
156
|
-
enabled: entity.enabled,
|
|
157
|
-
tag: entity.tag,
|
|
158
|
-
componentCount: components.length,
|
|
159
|
-
components: components.map((comp) => this.getComponentInfo(comp))
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* 获取组件调试信息
|
|
164
|
-
*/
|
|
165
|
-
getComponentInfo(component) {
|
|
166
|
-
const type = component.constructor.name;
|
|
167
|
-
const data = {};
|
|
168
|
-
for (const key of Object.keys(component)) {
|
|
169
|
-
if (!key.startsWith('_')) {
|
|
170
|
-
const value = component[key];
|
|
171
|
-
if (typeof value !== 'function') {
|
|
172
|
-
data[key] = value;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
return { type, data };
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* 查询实体
|
|
180
|
-
*
|
|
181
|
-
* @param filter - 查询过滤器
|
|
182
|
-
*/
|
|
183
|
-
queryEntities(filter) {
|
|
184
|
-
if (!this.worldManager) {
|
|
185
|
-
throw new Error('Plugin not installed');
|
|
186
|
-
}
|
|
187
|
-
const results = [];
|
|
188
|
-
const worlds = this.worldManager.getAllWorlds();
|
|
189
|
-
for (const world of worlds) {
|
|
190
|
-
for (const scene of world.getAllScenes()) {
|
|
191
|
-
if (filter.sceneName && scene.name !== filter.sceneName) {
|
|
192
|
-
continue;
|
|
193
|
-
}
|
|
194
|
-
for (const entity of scene.entities.buffer) {
|
|
195
|
-
if (filter.tag !== undefined && entity.tag !== filter.tag) {
|
|
196
|
-
continue;
|
|
197
|
-
}
|
|
198
|
-
if (filter.name && !entity.name.includes(filter.name)) {
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
if (filter.hasComponent) {
|
|
202
|
-
const hasComp = entity.components.some((c) => c.constructor.name === filter.hasComponent);
|
|
203
|
-
if (!hasComp) {
|
|
204
|
-
continue;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
results.push(this.getEntityInfo(entity));
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return results;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* 打印统计信息到日志
|
|
215
|
-
*/
|
|
216
|
-
logStats() {
|
|
217
|
-
const stats = this.getStats();
|
|
218
|
-
logger.info('=== ECS Debug Stats ===');
|
|
219
|
-
logger.info(`Total Entities: ${stats.totalEntities}`);
|
|
220
|
-
logger.info(`Total Systems: ${stats.totalSystems}`);
|
|
221
|
-
logger.info(`Scenes: ${stats.scenes.length}`);
|
|
222
|
-
for (const scene of stats.scenes) {
|
|
223
|
-
logger.info(`\n[Scene: ${scene.name}]`);
|
|
224
|
-
logger.info(` Entities: ${scene.entityCount}`);
|
|
225
|
-
logger.info(` Systems: ${scene.systems.length}`);
|
|
226
|
-
for (const system of scene.systems) {
|
|
227
|
-
const perfStr = system.performance
|
|
228
|
-
? ` | Avg: ${system.performance.avgExecutionTime.toFixed(2)}ms, Max: ${system.performance.maxExecutionTime.toFixed(2)}ms`
|
|
229
|
-
: '';
|
|
230
|
-
logger.info(` - ${system.name} (${system.enabled ? 'enabled' : 'disabled'}) | Entities: ${system.entityCount}${perfStr}`);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
logger.info('========================\n');
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* 导出调试数据为 JSON
|
|
237
|
-
*/
|
|
238
|
-
exportJSON() {
|
|
239
|
-
const stats = this.getStats();
|
|
240
|
-
return JSON.stringify(stats, null, 2);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
DebugPlugin = __decorate([
|
|
244
|
-
Injectable(),
|
|
245
|
-
__metadata("design:paramtypes", [Object])
|
|
246
|
-
], DebugPlugin);
|
|
247
|
-
export { DebugPlugin };
|
|
248
|
-
//# sourceMappingURL=DebugPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DebugPlugin.js","sourceRoot":"","sources":["../../src/Plugins/DebugPl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}
|
package/bin/Plugins/index.js
DELETED
package/bin/Plugins/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 可更新接口
|
|
3
|
-
*
|
|
4
|
-
* 实现此接口的服务将在每帧被Core自动调用update方法
|
|
5
|
-
*/
|
|
6
|
-
export interface IUpdatable {
|
|
7
|
-
/**
|
|
8
|
-
* 每帧更新方法
|
|
9
|
-
*
|
|
10
|
-
* @param deltaTime - 帧时间间隔(秒),可选参数
|
|
11
|
-
*/
|
|
12
|
-
update(deltaTime?: number): void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* 检查对象是否实现了IUpdatable接口
|
|
16
|
-
*/
|
|
17
|
-
export declare function isUpdatable(obj: any): obj is IUpdatable;
|
|
18
|
-
//# sourceMappingURL=IUpdatable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUpdatable.d.ts","sourceRoot":"","sources":["../../src/Types/IUpdatable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,UAAU,CAEvD"}
|
package/bin/Types/IUpdatable.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUpdatable.js","sourceRoot":"","sources":["../../src/Types/IUpdatable.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,GAAQ;IAChC,OAAO,GAAG,IAAI,OAAO,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC;AACnD,CAAC"}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript类型工具集
|
|
3
|
-
*
|
|
4
|
-
* 提供高级类型推断和类型安全的工具类型
|
|
5
|
-
*/
|
|
6
|
-
import type { IComponent } from './index';
|
|
7
|
-
import { Component } from '../ECS/Component';
|
|
8
|
-
/**
|
|
9
|
-
* 组件类型提取器
|
|
10
|
-
* 从组件构造函数中提取实例类型
|
|
11
|
-
*/
|
|
12
|
-
export type ComponentInstance<T> = T extends new (...args: any[]) => infer R ? R : never;
|
|
13
|
-
/**
|
|
14
|
-
* 组件构造函数类型
|
|
15
|
-
*
|
|
16
|
-
* 与 ComponentType 保持一致,避免类型转换
|
|
17
|
-
*/
|
|
18
|
-
export type ComponentConstructor<T extends IComponent = IComponent> = new (...args: any[]) => T;
|
|
19
|
-
/**
|
|
20
|
-
* 组件类型的通用约束
|
|
21
|
-
*
|
|
22
|
-
* 用于确保类型参数是有效的组件构造函数
|
|
23
|
-
*/
|
|
24
|
-
export type AnyComponentConstructor = ComponentConstructor<any>;
|
|
25
|
-
/**
|
|
26
|
-
* 多组件类型提取
|
|
27
|
-
* 从组件构造函数数组中提取所有实例类型的联合
|
|
28
|
-
*/
|
|
29
|
-
export type ExtractComponents<T extends readonly ComponentConstructor[]> = {
|
|
30
|
-
[K in keyof T]: ComponentInstance<T[K]>;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* 组件类型映射
|
|
34
|
-
* 将组件构造函数数组转换为实例类型的元组
|
|
35
|
-
*/
|
|
36
|
-
export type ComponentTypeMap<T extends readonly ComponentConstructor[]> = {
|
|
37
|
-
[K in keyof T]: T[K] extends ComponentConstructor<infer C> ? C : never;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* 实体with组件的类型
|
|
41
|
-
* 表示一个实体确定拥有某些组件
|
|
42
|
-
*/
|
|
43
|
-
export interface EntityWithComponents<T extends readonly ComponentConstructor[]> {
|
|
44
|
-
readonly id: number;
|
|
45
|
-
readonly name: string;
|
|
46
|
-
/**
|
|
47
|
-
* 类型安全的组件获取
|
|
48
|
-
* 确保返回非空的组件实例
|
|
49
|
-
*/
|
|
50
|
-
getComponent<C extends ComponentConstructor>(componentType: C): ComponentInstance<C>;
|
|
51
|
-
/**
|
|
52
|
-
* 检查是否拥有组件
|
|
53
|
-
*/
|
|
54
|
-
hasComponent<C extends ComponentConstructor>(componentType: C): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* 获取所有组件
|
|
57
|
-
*/
|
|
58
|
-
readonly components: ComponentTypeMap<T>;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* 查询结果类型
|
|
62
|
-
* 根据查询条件推断实体必定拥有的组件
|
|
63
|
-
*/
|
|
64
|
-
export type QueryResult<All extends readonly ComponentConstructor[] = [], Any extends readonly ComponentConstructor[] = [], None extends readonly ComponentConstructor[] = []> = {
|
|
65
|
-
/**
|
|
66
|
-
* 实体列表,确保拥有All中的所有组件
|
|
67
|
-
*/
|
|
68
|
-
readonly entities: ReadonlyArray<EntityWithComponents<All>>;
|
|
69
|
-
/**
|
|
70
|
-
* 实体数量
|
|
71
|
-
*/
|
|
72
|
-
readonly length: number;
|
|
73
|
-
/**
|
|
74
|
-
* 遍历实体
|
|
75
|
-
*/
|
|
76
|
-
forEach(callback: (entity: EntityWithComponents<All>, index: number) => void): void;
|
|
77
|
-
/**
|
|
78
|
-
* 映射转换
|
|
79
|
-
*/
|
|
80
|
-
map<R>(callback: (entity: EntityWithComponents<All>, index: number) => R): R[];
|
|
81
|
-
/**
|
|
82
|
-
* 过滤实体
|
|
83
|
-
*/
|
|
84
|
-
filter(predicate: (entity: EntityWithComponents<All>, index: number) => boolean): QueryResult<All, Any, None>;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* System处理的实体类型
|
|
88
|
-
* 根据Matcher推断System处理的实体类型
|
|
89
|
-
*/
|
|
90
|
-
export type SystemEntityType<M> = M extends {
|
|
91
|
-
getCondition(): {
|
|
92
|
-
all: infer All extends readonly ComponentConstructor[];
|
|
93
|
-
};
|
|
94
|
-
} ? EntityWithComponents<All> : never;
|
|
95
|
-
/**
|
|
96
|
-
* 组件字段类型提取
|
|
97
|
-
* 提取组件中所有可序列化的字段
|
|
98
|
-
*/
|
|
99
|
-
export type SerializableFields<T> = {
|
|
100
|
-
[K in keyof T]: T[K] extends Function ? never : K;
|
|
101
|
-
}[keyof T];
|
|
102
|
-
/**
|
|
103
|
-
* 只读组件类型
|
|
104
|
-
* 将组件的所有字段转为只读
|
|
105
|
-
*/
|
|
106
|
-
export type ReadonlyComponent<T extends IComponent> = {
|
|
107
|
-
readonly [K in keyof T]: T[K];
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* 部分组件类型
|
|
111
|
-
* 用于组件更新操作
|
|
112
|
-
*/
|
|
113
|
-
export type PartialComponent<T extends IComponent> = {
|
|
114
|
-
[K in SerializableFields<T>]?: T[K];
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* 组件类型约束
|
|
118
|
-
* 确保类型参数是有效的组件
|
|
119
|
-
*/
|
|
120
|
-
export type ValidComponent<T> = T extends Component ? T : never;
|
|
121
|
-
/**
|
|
122
|
-
* 组件数组约束
|
|
123
|
-
* 确保数组中的所有元素都是组件构造函数
|
|
124
|
-
*/
|
|
125
|
-
export type ValidComponentArray<T extends readonly any[]> = T extends readonly ComponentConstructor[] ? T : never;
|
|
126
|
-
/**
|
|
127
|
-
* 事件处理器类型
|
|
128
|
-
* 提供类型安全的事件处理
|
|
129
|
-
*/
|
|
130
|
-
export type TypedEventHandler<T> = (data: T) => void | Promise<void>;
|
|
131
|
-
/**
|
|
132
|
-
* 系统生命周期钩子类型
|
|
133
|
-
*/
|
|
134
|
-
export interface SystemLifecycleHooks<T extends readonly ComponentConstructor[]> {
|
|
135
|
-
/**
|
|
136
|
-
* 实体添加到系统时调用
|
|
137
|
-
*/
|
|
138
|
-
onAdded?: (entity: EntityWithComponents<T>) => void;
|
|
139
|
-
/**
|
|
140
|
-
* 实体从系统移除时调用
|
|
141
|
-
*/
|
|
142
|
-
onRemoved?: (entity: EntityWithComponents<T>) => void;
|
|
143
|
-
/**
|
|
144
|
-
* 系统初始化时调用
|
|
145
|
-
*/
|
|
146
|
-
onInitialize?: () => void;
|
|
147
|
-
/**
|
|
148
|
-
* 系统销毁时调用
|
|
149
|
-
*/
|
|
150
|
-
onDestroy?: () => void;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Fluent API构建器类型
|
|
154
|
-
*/
|
|
155
|
-
export interface TypeSafeBuilder<T> {
|
|
156
|
-
/**
|
|
157
|
-
* 完成构建
|
|
158
|
-
*/
|
|
159
|
-
build(): T;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* 组件池类型
|
|
163
|
-
*/
|
|
164
|
-
export interface ComponentPool<T extends IComponent> {
|
|
165
|
-
/**
|
|
166
|
-
* 从池中获取组件实例
|
|
167
|
-
*/
|
|
168
|
-
obtain(): T;
|
|
169
|
-
/**
|
|
170
|
-
* 归还组件到池中
|
|
171
|
-
*/
|
|
172
|
-
free(component: T): void;
|
|
173
|
-
/**
|
|
174
|
-
* 清空池
|
|
175
|
-
*/
|
|
176
|
-
clear(): void;
|
|
177
|
-
/**
|
|
178
|
-
* 池中可用对象数量
|
|
179
|
-
*/
|
|
180
|
-
readonly available: number;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* 实体查询条件类型
|
|
184
|
-
*/
|
|
185
|
-
export interface TypedQueryCondition<All extends readonly ComponentConstructor[] = [], Any extends readonly ComponentConstructor[] = [], None extends readonly ComponentConstructor[] = []> {
|
|
186
|
-
all: All;
|
|
187
|
-
any: Any;
|
|
188
|
-
none: None;
|
|
189
|
-
tag?: number;
|
|
190
|
-
name?: string;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* 组件类型守卫
|
|
194
|
-
*/
|
|
195
|
-
export declare function isComponentType<T extends IComponent>(value: any): value is ComponentConstructor<T>;
|
|
196
|
-
/**
|
|
197
|
-
* 类型安全的组件数组守卫
|
|
198
|
-
*/
|
|
199
|
-
export declare function isComponentArray(value: any[]): value is ComponentConstructor[];
|
|
200
|
-
/**
|
|
201
|
-
* 提取组件类型名称(编译时)
|
|
202
|
-
*/
|
|
203
|
-
export type ComponentTypeName<T extends ComponentConstructor> = T extends {
|
|
204
|
-
prototype: {
|
|
205
|
-
constructor: {
|
|
206
|
-
name: infer N;
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
} ? N : string;
|
|
210
|
-
/**
|
|
211
|
-
* 多组件类型名称联合
|
|
212
|
-
*/
|
|
213
|
-
export type ComponentTypeNames<T extends readonly ComponentConstructor[]> = {
|
|
214
|
-
[K in keyof T]: ComponentTypeName<T[K]>;
|
|
215
|
-
}[number];
|
|
216
|
-
/**
|
|
217
|
-
* 深度只读类型
|
|
218
|
-
*/
|
|
219
|
-
export type DeepReadonly<T> = {
|
|
220
|
-
readonly [K in keyof T]: T[K] extends object ? DeepReadonly<T[K]> : T[K];
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* 深度可选类型
|
|
224
|
-
*/
|
|
225
|
-
export type DeepPartial<T> = {
|
|
226
|
-
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* 排除方法的类型
|
|
230
|
-
*/
|
|
231
|
-
export type DataOnly<T> = {
|
|
232
|
-
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* 可序列化的组件数据
|
|
236
|
-
*/
|
|
237
|
-
export type SerializableComponent<T extends IComponent> = DeepPartial<DataOnly<T>>;
|
|
238
|
-
//# sourceMappingURL=TypeHelpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeHelpers.d.ts","sourceRoot":"","sources":["../../src/Types/Type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BAAkB,CAAC,CAAC,SAAS,SAAS,oBAAoB,EAAE,IAAI;KACvE,CAAC,IAAI,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1C,CAAC,MAAM,CAAC,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC1B,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC3E,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACrB,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,UAAU,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/bin/Types/TypeHelpers.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript类型工具集
|
|
3
|
-
*
|
|
4
|
-
* 提供高级类型推断和类型安全的工具类型
|
|
5
|
-
*/
|
|
6
|
-
import { Component } from '../ECS/Component';
|
|
7
|
-
/**
|
|
8
|
-
* 组件类型守卫
|
|
9
|
-
*/
|
|
10
|
-
export function isComponentType(value) {
|
|
11
|
-
return typeof value === 'function' && value.prototype instanceof Component;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 类型安全的组件数组守卫
|
|
15
|
-
*/
|
|
16
|
-
export function isComponentArray(value) {
|
|
17
|
-
return value.every(isComponentType);
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=TypeHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeHelpers.js","sourceRoot":"","sources":["../../src/Types/TypeHelpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqO7C;;GAEG;AACH,MAAM,UAAU,eAAe,CAC3B,KAAU;IAEV,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,SAAS,YAAY,SAAS,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC5B,KAAY;IAEZ,OAAO,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AACxC,CAAC"}
|