Preparing search index...

    Configures fill properties for text rendering.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    const obj = scene.createSceneObject('TextFillObj');
    const text = obj.addComponent('Text') as Editor.Components.Text;

    text.text = 'Filled Text';
    const fill = text.textFill;
    fill.mode = Editor.Components.TextFillMode.Solid;
    fill.color = new vec4(0, 0.5, 1, 1);
    console.log(`TextFill: mode=${fill.mode}, color=${fill.color}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    color: vec4

    RGBA color applied to the text.

    id: Uuid

    The unique id of the entity.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    Determines whether to use solid color or texture fill.

    texture: Texture

    Texture used when mode is set to texture fill.

    textureStretch: StretchMode

    Controls how the texture scales to fit the text bounds.

    tileCount: number

    Number of times the texture tiles across the text.

    Defines the region of the texture to use for tiling.

    type: string

    The entity's type.

    Methods

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean