An array of 2 numbers controlling the horizontal and vertical alignment of the text relative to its element transform.
An array of 4 numbers controlling the left, bottom, right and top anchors of the element.
If true then the font size of the element will scale automatically so that it fits the element's height.
If true then the font size and the line height of the element will scale automatically so that it fits the element's width.
Make the height of the element match the height of the text content automatically.
Make the width of the element match the width of the text content automatically.
The batch group id that this element belongs to.
An array of 3 numbers controlling the color of the element.
Whether the component is enabled.
Flag for enabling markup processing. Only works for text types.
The id
of the font asset used by the element.
The size of the font used by the element.
The height of the element.
The localization key of the element.
An array of layer id's that this element belongs to.
The height of each line of text.
An array of 4 numbers controlling the spacing between each edge of the element and the respective anchor.
Switch image element into a mask.
The id
of the material asset used by this element.
The maximum size of the font that the element can scale to when using autoFitWidth
or autoFitHeight
.
The maximum number of lines that this element can display.
The minimum size of the font that the element can scale to when using autoFitWidth
or autoFitHeight
.
The opacity of the element.
An array of 4 numbers controlling the text outline effect color and opacity.
The text outline effect width. Ranges from 0 to 1. To disable outline effect set to 0.
An array of 2 numbers controlling the origin of the element.
The number of pixels that correspond to one PlayCanvas unit.
An array of 4 numbers controlling the u, v, width and height of the rectangle that represents the portion of the texture that this image maps to.
An array of 4 numbers controlling the text shadow cast effect color and opacity.
An array of 2 numbers controlling the horizontal and vertical shift of the text shadow cast effect.
The spacing between each letter of the text.
The id
of the sprite asset to be used by the element.
The frame from the sprite asset to render.
The text content of the element.
The id
of the texture asset to be used by the element.
The type of the element. Can be: pc.ELEMENTTYPE_GROUP
, pc.ELEMENTTYPE_IMAGE
, pc.ELEMENTTYPE_TEXT
.
Enable this if you want the element to receive input events.
The width of the element.
Whether to automatically wrap lines based on the element width.
Element Component Properties.