Type alias SettingsTreeFieldValue

SettingsTreeFieldValue: {
    input: "autocomplete";
    items: string[];
    placeholder?: string;
    value?: string;
} | {
    input: "boolean";
    value?: boolean;
} | {
    hideClearButton?: boolean;
    input: "rgb";
    placeholder?: string;
    value?: string;
} | {
    hideClearButton?: boolean;
    input: "rgba";
    placeholder?: string;
    value?: string;
} | {
    input: "gradient";
    value?: [string, string];
} | {
    input: "messagepath";
    supportsMathModifiers?: boolean;
    validTypes?: string[];
    value?: string;
} | {
    input: "number";
    max?: number;
    min?: number;
    placeholder?: string;
    precision?: number;
    step?: number;
    value?: number;
} | {
    input: "select";
    options: {
        disabled?: boolean;
        label: string;
        value: undefined | number;
    }[];
    value?: number | number[];
} | {
    input: "select";
    options: {
        disabled?: boolean;
        label: string;
        value: undefined | string;
    }[];
    value?: string | string[];
} | {
    input: "string";
    placeholder?: string;
    value?: string;
} | {
    input: "toggle";
    options: string[] | {
        label: string;
        value: undefined | string;
    }[];
    value?: string;
} | {
    input: "toggle";
    options: number[] | {
        label: string;
        value: undefined | number;
    }[];
    value?: number;
} | {
    input: "vec3";
    labels?: [string, string, string];
    max?: number;
    min?: number;
    placeholder?: [undefined | string, undefined | string, undefined | string];
    precision?: number;
    step?: number;
    value?: [undefined | number, undefined | number, undefined | number];
} | {
    input: "vec2";
    labels?: [string, string];
    max?: number;
    min?: number;
    placeholder?: [undefined | string, undefined | string];
    precision?: number;
    step?: number;
    value?: [undefined | number, undefined | number];
}

A settings tree field specifies the input type and the value of a field in the settings editor.

Type declaration

  • input: "autocomplete"
  • items: string[]
  • Optional placeholder?: string

    Optional placeholder text displayed in the field input when value is undefined

  • Optional value?: string

Type declaration

  • input: "boolean"
  • Optional value?: boolean

Type declaration

  • Optional hideClearButton?: boolean

    Optional field that's true if the clear button should be hidden.

  • input: "rgb"
  • Optional placeholder?: string

    Optional placeholder text displayed in the field input when value is undefined

  • Optional value?: string

Type declaration

  • Optional hideClearButton?: boolean

    Optional field that's true if the clear button should be hidden.

  • input: "rgba"
  • Optional placeholder?: string

    Optional placeholder text displayed in the field input when value is undefined

  • Optional value?: string

Type declaration

  • input: "gradient"
  • Optional value?: [string, string]

Type declaration

  • input: "messagepath"
  • Optional supportsMathModifiers?: boolean

    True if the input should allow math modifiers like @abs.

  • Optional validTypes?: string[]
  • Optional value?: string

Type declaration

  • input: "number"
  • Optional max?: number
  • Optional min?: number
  • Optional placeholder?: string

    Optional placeholder text displayed in the field input when value is undefined

  • Optional precision?: number
  • Optional step?: number
  • Optional value?: number

Type declaration

  • input: "select"
  • options: {
        disabled?: boolean;
        label: string;
        value: undefined | number;
    }[]
  • Optional value?: number | number[]

Type declaration

  • input: "select"
  • options: {
        disabled?: boolean;
        label: string;
        value: undefined | string;
    }[]
  • Optional value?: string | string[]

Type declaration

  • input: "string"
  • Optional placeholder?: string

    Optional placeholder text displayed in the field input when value is undefined

  • Optional value?: string

Type declaration

  • input: "toggle"
  • options: string[] | {
        label: string;
        value: undefined | string;
    }[]
  • Optional value?: string

Type declaration

  • input: "toggle"
  • options: number[] | {
        label: string;
        value: undefined | number;
    }[]
  • Optional value?: number

Type declaration

  • input: "vec3"
  • Optional labels?: [string, string, string]
  • Optional max?: number
  • Optional min?: number
  • Optional placeholder?: [undefined | string, undefined | string, undefined | string]
  • Optional precision?: number
  • Optional step?: number
  • Optional value?: [undefined | number, undefined | number, undefined | number]

Type declaration

  • input: "vec2"
  • Optional labels?: [string, string]
  • Optional max?: number
  • Optional min?: number
  • Optional placeholder?: [undefined | string, undefined | string]
  • Optional precision?: number
  • Optional step?: number
  • Optional value?: [undefined | number, undefined | number]