SettingsTreeFieldValue
type SettingsTreeFieldValue =
| {
input: "autocomplete";
value: string;
items: string[];
placeholder: string;
}
| {
input: "boolean";
value: boolean;
}
| {
input: "rgb";
value: string;
placeholder: string;
hideClearButton: boolean;
}
| {
input: "rgba";
value: string;
placeholder: string;
hideClearButton: boolean;
}
| {
input: "gradient";
value: [string, string];
}
| {
input: "messagepath";
value: string;
validTypes: string[];
supportsMathModifiers: boolean;
}
| {
input: "number";
value: number;
step: number;
max: number;
min: number;
precision: number;
placeholder: string;
}
| {
input: "select";
value: number | number[];
options: object[];
}
| {
input: "select";
value: string | string[];
options: object[];
}
| {
input: "string";
value: string;
placeholder: string;
}
| {
input: "toggle";
value: string;
options: string[] | object[];
}
| {
input: "toggle";
value: number;
options: number[] | object[];
}
| {
input: "vec3";
value: [undefined | number, undefined | number, undefined | number];
placeholder: [undefined | string, undefined | string, undefined | string];
step: number;
precision: number;
labels: [string, string, string];
max: number;
min: number;
}
| {
input: "vec2";
value: [undefined | number, undefined | number];
placeholder: [undefined | string, undefined | string];
step: number;
precision: number;
labels: [string, string];
max: number;
min: number;
};
A settings tree field specifies the input type and the value of a field in the settings editor.
Type declaration
{
input
: "autocomplete"
;
value
: string
;
items
: string
[];
placeholder
: string
;
}
input
input: "autocomplete";
value?
optional value: string;
items
items: string[];
placeholder?
optional placeholder: string;
Optional placeholder text displayed in the field input when value is undefined
{
input
: "boolean"
;
value
: boolean
;
}
input
input: "boolean";
value?
optional value: boolean;
{
input
: "rgb"
;
value
: string
;
placeholder
: string
;
hideClearButton
: boolean
;
}
input
input: "rgb";
value?
optional value: string;
placeholder?
optional placeholder: string;
Optional placeholder text displayed in the field input when value is undefined
hideClearButton?
optional hideClearButton: boolean;
Optional field that's true if the clear button should be hidden.
{
input
: "rgba"
;
value
: string
;
placeholder
: string
;
hideClearButton
: boolean
;
}
input
input: "rgba";
value?
optional value: string;
placeholder?
optional placeholder: string;
Optional placeholder text displayed in the field input when value is undefined
hideClearButton?
optional hideClearButton: boolean;
Optional field that's true if the clear button should be hidden.
{
input
: "gradient"
;
value
: [string
, string
];
}
input
input: "gradient";
value?
optional value: [string, string];
{
input
: "messagepath"
;
value
: string
;
validTypes
: string
[];
supportsMathModifiers
: boolean
;
}
input
input: "messagepath";
value?
optional value: string;
validTypes?
optional validTypes: string[];
supportsMathModifiers?
optional supportsMathModifiers: boolean;
True if the input should allow math modifiers like @abs.
{
input
: "number"
;
value
: number
;
step
: number
;
max
: number
;
min
: number
;
precision
: number
;
placeholder
: string
;
}
input
input: "number";
value?
optional value: number;
step?
optional step: number;
max?
optional max: number;
min?
optional min: number;
precision?
optional precision: number;
placeholder?
optional placeholder: string;
Optional placeholder text displayed in the field input when value is undefined
{
input
: "select"
;
value
: number
| number
[];
options
: object
[];
}
input
input: "select";
value?
optional value: number | number[];
options
options: object[];
{
input
: "select"
;
value
: string
| string
[];
options
: object
[];
}
input
input: "select";
value?
optional value: string | string[];
options
options: object[];
{
input
: "string"
;
value
: string
;
placeholder
: string
;
}
input
input: "string";
value?
optional value: string;
placeholder?
optional placeholder: string;
Optional placeholder text displayed in the field input when value is undefined
{
input
: "toggle"
;
value
: string
;
options
: string
[] | object
[];
}
input
input: "toggle";
value?
optional value: string;
options
options: string[] | object[];
{
input
: "toggle"
;
value
: number
;
options
: number
[] | object
[];
}
input
input: "toggle";
value?
optional value: number;
options
options: number[] | object[];
{
input
: "vec3"
;
value
: [undefined
| number
, undefined
| number
, undefined
| number
];
placeholder
: [undefined
| string
, undefined
| string
, undefined
| string
];
step
: number
;
precision
: number
;
labels
: [string
, string
, string
];
max
: number
;
min
: number
;
}
input
input: "vec3";
value?
optional value: [undefined | number, undefined | number, undefined | number];
placeholder?
optional placeholder: [undefined | string, undefined | string, undefined | string];
step?
optional step: number;
precision?
optional precision: number;
labels?
optional labels: [string, string, string];
max?
optional max: number;
min?
optional min: number;
{
input
: "vec2"
;
value
: [undefined
| number
, undefined
| number
];
placeholder
: [undefined
| string
, undefined
| string
];
step
: number
;
precision
: number
;
labels
: [string
, string
];
max
: number
;
min
: number
;
}
input
input: "vec2";
value?
optional value: [undefined | number, undefined | number];
placeholder?
optional placeholder: [undefined | string, undefined | string];
step?
optional step: number;
precision?
optional precision: number;
labels?
optional labels: [string, string];
max?
optional max: number;
min?
optional min: number;