TextComponentData interface
Data specification for TextComponent, see ComponentManager.create() on how to create a component
Signature:
export interface TextComponentData extends Component3DData Extends: Component3DData
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
TextAlignment |
(Optional) How text should be aligned. Defaults to "left" | ||
|
FontFamily |
(Optional) Font to use | ||
|
string |
(Optional) if not provided, an auto id will be generated | ||
|
boolean |
(Optional) Whether the text should use instancing. Defaults to false | ||
|
boolean |
(Optional) Whether the text should use billboardind when instanced. Defaults to true | ||
|
number |
(Optional) Line height of the text. Defaults to 60 | ||
|
string |
(Optional) name for the component. Defaults to "" | ||
|
number |
(Optional) Opacity of the text. Defaults to 1 | ||
|
(Optional) Position of the component in the space. Defaults to {x: 0, y: 0, z: 0} | |||
|
(Optional) Rotation of the component in the space. Defaults to {x: 0, y: 0, z: 0} | |||
|
(Optional) Scale of the component in the space. Defaults to {x: 1, y: 1, z: 1} | |||
|
string |
Text to display | ||
|
string |
(Optional) Color of the text. Defaults to "#ffffff" | ||
|
TextTransform |
(Optional) Optional transform to apply to the text. Defaults to "none" | ||
|
"text" | |||
|
number |
(Optional) Width of the text box. Defaults to 500. Use this to avoid breaking a long into multiple lines |