fix(sync): use GlobalComponentRegistry for network sync decoding (#392)
- Decoder.ts now uses GlobalComponentRegistry.getComponentType() instead of local registry - @sync decorator uses getComponentTypeName() to get @ECSComponent decorator name - @ECSComponent decorator updates SYNC_METADATA.typeId when defined - Removed deprecated registerSyncComponent/autoRegisterSyncComponent functions - Updated ComponentSync.ts in network package to use GlobalComponentRegistry - Updated tests to use correct @ECSComponent type names This ensures that components decorated with @ECSComponent are automatically available for network sync decoding without any manual registration.
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
export { ECSRoom } from './ECSRoom.js';
|
||||
export type { ECSRoomConfig } from './ECSRoom.js';
|
||||
|
||||
// Re-export Player for convenience
|
||||
export { Player, type IPlayer } from '../room/Player.js';
|
||||
|
||||
// Re-export commonly used ECS types for convenience
|
||||
export type {
|
||||
Entity,
|
||||
|
||||
Reference in New Issue
Block a user