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.
Properties
Section titled “Properties”advanced?
Section titled “advanced?”
optionaladvanced?:boolean
Defined in: component.ts:91
bitmask?
Section titled “bitmask?”
optionalbitmask?: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.
optionalbits?:number
source?
Section titled “source?”
optionalsource?:string
category?
Section titled “category?”
optionalcategory?:string
Defined in: component.ts:90
Group under a category header; advanced tucks the field behind a fold.
curve?
Section titled “curve?”
optionalcurve?:boolean
Defined in: component.ts:65
Render as a scalar over-life curve editor (the field value is { keys: [...] }).
optionalenum?: readonlyobject[]
Defined in: component.ts:53
Render as a dropdown of these options; the stored value is the option’s int.
enumSource?
Section titled “enumSource?”
optionalenumSource?: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.
flags?
Section titled “flags?”
optionalflags?: readonlyobject[]
Defined in: component.ts:61
Render as a bitmask multi-select; each option is a single bit.
gradient?
Section titled “gradient?”
optionalgradient?:boolean
Defined in: component.ts:63
Render as a color-gradient editor (the field value is { stops: [...] }).
label?
Section titled “label?”
optionallabel?:string
Defined in: component.ts:87
Human label / tooltip overriding the key-derived ones.
optionalmap?: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.
optionalmax?:number
Defined in: component.ts:79
optionalmin?:number
Defined in: component.ts:78
Hard numeric range — clamps both typed entry and drag-scrub.
slider?
Section titled “slider?”
optionalslider?:boolean
Defined in: component.ts:83
Render the number as a slider; requires a finite min/max.
optionalstep?:number
Defined in: component.ts:81
Scrub/step granularity (per pixel for drag, per arrow for the input).
tooltip?
Section titled “tooltip?”
optionaltooltip?:string
Defined in: component.ts:88
optionalunit?:string
Defined in: component.ts:85
Unit shown after the resting value (e.g. ‘°’, ‘px’, ‘%’).