dacha
    Preparing search index...

    Function DefineField

    • Makes a member editable in the inspector, and fills a field from the configuration.

      On a plain field, the engine sets the value before the constructor body runs. It takes the configuration value under the field's name. When that is missing or null, it takes the field's initializer, and then a copy of initialValue. Without either, the field is undefined. Getters, setters and accessors are not filled.

      The widget comes from type. Without it, it comes from the type of initialValue: a number, a string, a boolean, or a point for a vector. Without either, the field is a text input, and the member must be a string.

      Type Parameters

      • This
      • V

      Parameters

      • options: Omit<DataField, "name"> & { name?: string }

        How the editor draws the field.

      Returns FieldDecorator<This, V>

      The member decorator.

    • Makes a member editable in the inspector, and fills a field from the configuration.

      On a plain field, the engine sets the value before the constructor body runs. It takes the configuration value under the field's name. When that is missing or null, it takes the field's initializer, and then a copy of initialValue. Without either, the field is undefined. Getters, setters and accessors are not filled.

      The widget comes from type. Without it, it comes from the type of initialValue: a number, a string, a boolean, or a point for a vector. Without either, the field is a text input, and the member must be a string.

      Type Parameters

      • This
      • V extends string | undefined

      Parameters

      Returns FieldDecorator<This, V>

      The member decorator.

    • Makes a member editable in the inspector, and fills a field from the configuration.

      On a plain field, the engine sets the value before the constructor body runs. It takes the configuration value under the field's name. When that is missing or null, it takes the field's initializer, and then a copy of initialValue. Without either, the field is undefined. Getters, setters and accessors are not filled.

      The widget comes from type. Without it, it comes from the type of initialValue: a number, a string, a boolean, or a point for a vector. Without either, the field is a text input, and the member must be a string.

      Type Parameters

      • This
      • V
      • T extends
            | "string"
            | "number"
            | "boolean"
            | "select"
            | "multiselect"
            | "multitext"
            | "color"
            | "file"
            | "range"
            | "textarea"
            | "vector"
            | "asset"
            | "script"

      Parameters

      • options: FieldOptions<T> & {
            initialValue?: T extends "script"
                ? never
                : ConfigValue<NoInfer<NonNullable<V>>>;
            type: T;
        }

        How the editor draws the field.

      Returns FieldDecorator<This, V>

      The member decorator.

    • Makes a member editable in the inspector, and fills a field from the configuration.

      On a plain field, the engine sets the value before the constructor body runs. It takes the configuration value under the field's name. When that is missing or null, it takes the field's initializer, and then a copy of initialValue. Without either, the field is undefined. Getters, setters and accessors are not filled.

      The widget comes from type. Without it, it comes from the type of initialValue: a number, a string, a boolean, or a point for a vector. Without either, the field is a text input, and the member must be a string.

      Type Parameters

      • This
      • V extends string | number | false | true | Point | undefined

      Parameters

      • options: FieldBaseOptions & { initialValue: ConfigValue<NoInfer<NonNullable<V>>> }

        How the editor draws the field.

      Returns FieldDecorator<This, V>

      The member decorator.