FieldMeta
Defined in: ecs/component.ts:63
Per-field editor presentation metadata — the engine’s UPROPERTY analog. A component declares it once at its definition site; the editor’s inspector reads it via getComponentFieldMeta and renders the matching control, falling back to value-shape inference for any field without metadata. None of this is read by the runtime (which stores raw values); it is purely authoring policy co-located with the component so the inspector and the data never diverge.
Properties
Section titled “Properties”advanced?
Section titled “advanced?”
optionaladvanced?:boolean
Defined in: ecs/component.ts:127
bitmask?
Section titled “bitmask?”
optionalbitmask?:object
Defined in: ecs/component.ts:99
Render as a bitmask whose bit LABELS are resolved by the editor (e.g. named
collision layers from project settings) rather than fixed here. bits is the
count (default 32); source names the editor’s label provider.
optionalbits?:number
source?
Section titled “source?”
optionalsource?:string
category?
Section titled “category?”
optionalcategory?:string
Defined in: ecs/component.ts:126
Group under a category header; advanced tucks the field behind a fold.
curve?
Section titled “curve?”
optionalcurve?:boolean
Defined in: ecs/component.ts:84
Render as a scalar over-life curve editor (the field value is { keys: [...] }).
effectStack?
Section titled “effectStack?”
optionaleffectStack?:boolean
Defined in: ecs/component.ts:93
Render as a post-process effect stack (the field value is the effects array).
The rows, their parameters and their ranges come from the effect registry, so an
effect the engine gains is authorable without touching the editor.
optionalenum?: readonlyobject[]
Defined in: ecs/component.ts:65
Render as a dropdown of these options; the stored value is the option’s int.
enumSource?
Section titled “enumSource?”
optionalenumSource?:string
Defined in: ecs/component.ts:71
Render as a dropdown whose options are resolved by the editor from a named source (e.g. project sorting layers) — falls back to a plain number when the source yields none, so free-int editing survives a project with no named set.
flags?
Section titled “flags?”
optionalflags?: readonlyobject[]
Defined in: ecs/component.ts:80
Render as a bitmask multi-select; each option is a single bit.
gradient?
Section titled “gradient?”
optionalgradient?:boolean
Defined in: ecs/component.ts:82
Render as a color-gradient editor (the field value is { stops: [...] }).
label?
Section titled “label?”
optionallabel?:string
Defined in: ecs/component.ts:123
Human label / tooltip overriding the key-derived ones.
labelSource?
Section titled “labelSource?”
optionallabelSource?:string
Defined in: ecs/component.ts:78
Names a registered source of LABELS for the entries of a LIST field: the inspector shows a row per entry under the name that source gives it (a morph weight under its shape’s name). The labels come from elsewhere — a mesh’s own targets — which is why the field cannot state them itself.
optionalmap?:boolean
Defined in: ecs/component.ts:89
Render as a key→value string map editor (the field value is Record<string,string>)
— arbitrary user properties (e.g. a Marker’s gameplay data), like Tiled’s custom
properties. Value-shape inference can’t tell a property map from any other object,
so a field must opt in here.
optionalmax?:number
Defined in: ecs/component.ts:102
optionalmin?:number
Defined in: ecs/component.ts:101
Hard numeric range — clamps both typed entry and drag-scrub.
normalizedOf?
Section titled “normalizedOf?”
optionalnormalizedOf?:string
Defined in: ecs/component.ts:114
This field is a fraction of the named sibling, axis-wise (Sprite.pivot of
Sprite.size), so the editor can offer a pixel view of it. The stored value
stays the fraction. Authored normalized_of= at the C++ ES_PROPERTY site.
shownWhen?
Section titled “shownWhen?”
optionalshownWhen?:object
Defined in: ecs/component.ts:121
The states of a sibling discriminator this field means anything in — a Spot’s
cone angles to type: Spot. The inspector hides it elsewhere and leaves the
stored value alone. Authored shown_when=<field>:<State> by NAME at the C++
ES_PROPERTY site; the names resolve to stored numbers when this is generated.
field:
string
values
Section titled “values”values: readonly
number[]
slider?
Section titled “slider?”
optionalslider?:boolean
Defined in: ecs/component.ts:106
Render the number as a slider; requires a finite min/max.
optionalstep?:number
Defined in: ecs/component.ts:104
Scrub/step granularity (per pixel for drag, per arrow for the input).
tooltip?
Section titled “tooltip?”
optionaltooltip?:string
Defined in: ecs/component.ts:124
optionalunit?:string
Defined in: ecs/component.ts:108
Unit shown after the resting value (e.g. ‘°’, ‘px’, ‘%’).