TextComponent class
Text component, used to display text in the game.
See TextComponentData for the data schema used to create a text component
Signature:
export declare class TextComponent extends Component3D<TextComponentData> Extends: Component3D<TextComponentData>
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
TextAlignment |
How text should be aligned. Defaults to "left" | ||
|
FontFamily |
Font to use | ||
|
number |
Line height of the text. Defaults to 60 | ||
|
number |
Opacity of the text. Defaults to 1 | ||
|
string |
Text to display | ||
|
string |
Color of the text. Defaults to "#ffffff" | ||
|
string |
Optional transform to apply to the text. Defaults to "none" | ||
|
number |
Width of the text box. Defaults to 500. Use this to avoid breaking a long into multiple lines |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
| ||
|
|