@esengine/ecs-framework 2.5.0 → 2.5.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @esengine/ecs-framework v2.5.0
2
+ * @esengine/ecs-framework v2.5.1
3
3
  * TypeScript definitions
4
4
  */
5
5
  /**
@@ -832,10 +832,16 @@ type ISceneDebugData = {
832
832
  * @en Components in ECS architecture should be pure data containers.
833
833
  * All game logic should be implemented in EntitySystem, not inside components.
834
834
  *
835
+ * @zh **重要:所有 Component 子类都必须使用 @ECSComponent 装饰器!**
836
+ * @zh 该装饰器用于注册组件类型名称,是序列化、网络同步等功能正常工作的前提。
837
+ * @en **IMPORTANT: All Component subclasses MUST use the @ECSComponent decorator!**
838
+ * @en This decorator registers the component type name, which is required for serialization, network sync, etc.
839
+ *
835
840
  * @example
836
- * @zh 推荐做法:纯数据组件
837
- * @en Recommended: Pure data component
841
+ * @zh 正确做法:使用 @ECSComponent 装饰器
842
+ * @en Correct: Use @ECSComponent decorator
838
843
  * ```typescript
844
+ * @ECSComponent('HealthComponent')
839
845
  * class HealthComponent extends Component {
840
846
  * public health: number = 100;
841
847
  * public maxHealth: number = 100;
@@ -13718,21 +13724,6 @@ declare function encodeDespawnBatch(entityIds: number[]): Uint8Array;
13718
13724
  * @en Decodes binary format and applies to ECS Components
13719
13725
  */
13720
13726
 
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
13727
  /**
13737
13728
  * @zh 解码并应用组件数据
13738
13729
  * @en Decode and apply component data
@@ -17121,5 +17112,5 @@ declare function getFullPlatformConfig(): Promise<any>;
17121
17112
  declare function supportsFeature(feature: 'worker' | 'shared-array-buffer' | 'transferable-objects' | 'module-worker'): boolean;
17122
17113
  declare function hasAdapter(): boolean;
17123
17114
 
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 };
17115
+ 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, 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, removeEntityTag, requireComponent, resetLoggerColors, setGlobalLogLevel, setLoggerColors, setLoggerFactory, supportsFeature, sync, tryGetComponent, updateComponent, varintSize, zigzagDecode, zigzagEncode };
17125
17116
  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 };