Gets the id of the pc-asset to use for the font.
The asset ID.
Sets the id of the pc-asset to use for the font (text elements).
The asset ID.
Gets whether a text element automatically reduces its font size to fit its height.
Whether the height is auto-fit.
Sets whether a text element should automatically reduce its font size (down to min-font-size)
so the text fits within the element's height. Requires auto-height to be false.
Whether to auto-fit the height.
Gets whether a text element automatically reduces its font size to fit its width.
Whether the width is auto-fit.
Sets whether a text element should automatically reduce its font size (down to min-font-size)
so the text fits within the element's width. Requires auto-width to be false.
Whether to auto-fit the width.
Gets whether the element component should automatically adjust its height.
Whether to automatically adjust the height.
Sets whether the element component should automatically adjust its height to the text content (text elements only).
Whether to automatically adjust the height.
Gets whether the element component should automatically adjust its width.
Whether to automatically adjust the width.
Sets whether the element component should automatically adjust its width to the text content (text elements only).
Whether to automatically adjust the width.
Gets the underlying PlayCanvas element component.
The element component.
Gets the enabled state of the component.
The enabled state of the component.
Sets the enabled state of the component.
The enabled state of the component.
Gets whether the element component should use markup.
Whether markup is enabled.
Sets whether the element component should use markup.
Whether to enable markup.
Gets the font size of the element component.
The font size.
Sets the font size of the element component.
The font size.
Gets the height of the element component.
The height.
Sets the height of the element component.
The height.
Gets the line height of the element component.
The line height.
Sets the line height of the element component.
The line height.
Sets the margin of the element component (used to inset the element from stretched anchors).
The margin as a Vec4 (left, bottom, right, top).
Gets whether the element component is a mask.
Whether the element is a mask.
Sets whether the element component is a mask, clipping its descendants to its bounds (image elements only).
Whether the element is a mask.
Gets the largest font size a text element may use when auto-fitting.
The maximum font size.
Sets the largest font size a text element may use when auto-fitting.
The maximum font size.
Gets the smallest font size a text element may use when auto-fitting.
The minimum font size.
Sets the smallest font size a text element may use when auto-fitting.
The minimum font size.
Gets the opacity of the element component.
The opacity.
Sets the opacity of the element component.
The opacity (0 to 1).
Gets the number of pixels per unit used when rendering a sprite.
The pixels per unit.
Sets the number of pixels per unit to use when rendering a sprite (image elements only).
The pixels per unit.
Gets the id of the pc-asset to use for the sprite.
The sprite asset ID.
Sets the id of the pc-asset to use for the sprite (image elements only).
The sprite asset ID.
Gets the frame of the sprite to render.
The sprite frame index.
Sets the frame of the sprite to render (image elements only).
The sprite frame index.
Gets the text of the element component.
The text.
Sets the text of the element component.
The text.
Gets the id of the pc-asset to use for the texture.
The texture asset ID.
Sets the id of the pc-asset to use for the texture (image elements only).
The texture asset ID.
Gets the type of the element component.
The type.
Sets the type of the element component.
The type.
Gets whether the element component accepts input events.
Whether the element accepts input.
Sets whether the element component accepts input events (required for buttons and scrolling).
Whether the element accepts input.
Gets the width of the element component.
The width.
Sets the width of the element component.
The width.
Gets whether the element component should wrap lines.
Whether to wrap lines.
Sets whether the element component should wrap lines.
Whether to wrap lines.
Protected_Called when the element is fully initialized and ready. Subclasses should call this when they're ready.
Returns a promise that resolves with this element when it's ready.
A promise that resolves with this element when it's ready.
The ElementComponentElement interface provides properties and methods for manipulating
<pc-element>elements. The ElementComponentElement interface also inherits the properties and methods of the HTMLElement interface.