Skip to content

FieldMeta

Defined in: component.ts:51

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.

optional advanced?: boolean

Defined in: component.ts:91


optional bitmask?: object

Defined in: component.ts:76

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.

optional bits?: number

optional source?: string


optional category?: string

Defined in: component.ts:90

Group under a category header; advanced tucks the field behind a fold.


optional curve?: boolean

Defined in: component.ts:65

Render as a scalar over-life curve editor (the field value is { keys: [...] }).


optional enum?: readonly object[]

Defined in: component.ts:53

Render as a dropdown of these options; the stored value is the option’s int.


optional enumSource?: string

Defined in: component.ts:59

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.


optional flags?: readonly object[]

Defined in: component.ts:61

Render as a bitmask multi-select; each option is a single bit.


optional gradient?: boolean

Defined in: component.ts:63

Render as a color-gradient editor (the field value is { stops: [...] }).


optional label?: string

Defined in: component.ts:87

Human label / tooltip overriding the key-derived ones.


optional map?: boolean

Defined in: component.ts:70

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.


optional max?: number

Defined in: component.ts:79


optional min?: number

Defined in: component.ts:78

Hard numeric range — clamps both typed entry and drag-scrub.


optional slider?: boolean

Defined in: component.ts:83

Render the number as a slider; requires a finite min/max.


optional step?: number

Defined in: component.ts:81

Scrub/step granularity (per pixel for drag, per arrow for the input).


optional tooltip?: string

Defined in: component.ts:88


optional unit?: string

Defined in: component.ts:85

Unit shown after the resting value (e.g. ‘°’, ‘px’, ‘%’).