Class: GLXFComponentRegistry
Defined in: packages/core/src/ecs/component-registry.ts:40
Registry that maps GLXF component names to ECS component classes.
Remarks
- Separate from
elics
' built-in registry to avoid naming conflicts. - Supports custom field mappers to translate GLXF metadata to component props.
Constructors
Constructor
new GLXFComponentRegistry():
GLXFComponentRegistry
Returns
GLXFComponentRegistry
Methods
applyComponents()
static
applyComponents(entity
,world
,glxfComponents
):void
Defined in: packages/core/src/ecs/component-registry.ts:72
Apply mapped components from GLXF metadata to an entity.
Parameters
entity
Entity
world
glxfComponents
Record
<string
, GLXFComponentData
>
Returns
void
clear()
static
clear():void
Defined in: packages/core/src/ecs/component-registry.ts:124
Clear the registry (useful for tests).
Returns
void
getComponent()
static
getComponent(glxfComponentName
):ComponentRegistryEntry
Defined in: packages/core/src/ecs/component-registry.ts:65
Lookup a registered mapping entry by GLXF name.
Parameters
glxfComponentName
string
Returns
getComponentName()
static
getComponentName(component
):string
Defined in: packages/core/src/ecs/component-registry.ts:60
Return the GLXF name for a given component class.
Parameters
component
Component
<any
>
Returns
string
getRegisteredComponents()
static
getRegisteredComponents():string
[]
Defined in: packages/core/src/ecs/component-registry.ts:119
List all registered GLXF component names.
Returns
string
[]
register()
static
register(glxfComponentName
,componentClass
,description?
,mapper?
):void
Defined in: packages/core/src/ecs/component-registry.ts:45
Register an ECS component class under a GLXF component name.
Parameters
glxfComponentName
string
componentClass
Component
<any
>
description?
string
mapper?
(glxfData
) => Record
<string
, any
>
Returns
void
setupBuiltinComponents()
static
setupBuiltinComponents():void
Defined in: packages/core/src/ecs/component-registry.ts:130
Placeholder to wire built‑in mappings from generated metadata.
Returns
void