Skip to content

ComponentMetadata

Defined in: ecs/component.ts:123

What a component declares about its fields beyond their default values: which are assets, which the editor may keyframe, which replicate. Optional throughout — a component that says nothing gets the derived defaults.

optional animatableFields?: string[]

Defined in: ecs/component.ts:130

Keyframeable fields (Sequencer tracks); auto-derived from numeric fields if omitted.


optional assetFields?: AssetFieldMeta[]

Defined in: ecs/component.ts:124


optional discoverAssets?: (data) => AssetRef[]

Defined in: ecs/component.ts:149

Custom asset discovery for scene preload. Authoritative when present: assetFields are NOT walked for discovery (they still drive editor pickers/ref rewrites), so the callback can exclude values that are not asset refs (e.g. code-registered FSM/BT names).

Record<string, unknown>

AssetRef[]


optional entityFields?: string[]

Defined in: ecs/component.ts:126


optional fields?: Record<string, FieldMeta>

Defined in: ecs/component.ts:128

Per-field editor presentation policy, keyed by field name.


optional readonlyFields?: string[]

Defined in: ecs/component.ts:142

Engine-COMPUTED output fields (Transform’s world-space fields), authored readonly at the C++ ES_PROPERTY site. Never authoring inputs — the editor must not project them into the World (it clobbers the composed value).


optional renderableField?: string

Defined in: ecs/component.ts:166

The name of the bool field that gates this component’s part in an entity’s visibility — set it and setEntityVisible, the editor’s eye and scene sleep/wake all reach this component. Omitted = the component draws nothing. Builtins author it at the C++ ES_COMPONENT(renderable=<field>) site.


optional replicatedFields?: string[]

Defined in: ecs/component.ts:136

Fields the network replication layer syncs (RC11). Whole-field granularity; omitted = the component never replicates. Builtins author this at the C++ ES_PROPERTY site (replicated) instead — same single-source rule as fieldMeta.


optional skeletalFields?: SkeletalFieldMeta

Defined in: ecs/component.ts:125


optional transient?: boolean

Defined in: ecs/component.ts:159

Runtime-only state that must never persist: a transient component is skipped by serializeScene (e.g. per-frame pointer/drag/hover state that its driving system rebuilds each frame). Systems still read/write it normally; only scene save omits it.

Builtins author this at the C++ ES_COMPONENT(transient) site — same single-source rule as fieldMeta.