Textcomponentdata

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

align?

TextAlignment

(Optional) How text should be aligned. Defaults to "left"

font?

FontFamily

(Optional) Font to use

id?

string

(Optional) if not provided, an auto id will be generated

instanced?

boolean

(Optional) Whether the text should use instancing. Defaults to false

instancedBillBoard?

boolean

(Optional) Whether the text should use billboardind when instanced. Defaults to true

lineHeight?

number

(Optional) Line height of the text. Defaults to 60

name?

string

(Optional) name for the component. Defaults to ""

opacity?

number

(Optional) Opacity of the text. Defaults to 1

position?

XYZ

(Optional) Position of the component in the space. Defaults to {x: 0, y: 0, z: 0}

rotation?

XYZ

(Optional) Rotation of the component in the space. Defaults to {x: 0, y: 0, z: 0}

scale?

XYZ

(Optional) Scale of the component in the space. Defaults to {x: 1, y: 1, z: 1}

text

string

Text to display

textColor?

string

(Optional) Color of the text. Defaults to "#ffffff"

textTransform?

TextTransform

(Optional) Optional transform to apply to the text. Defaults to "none"

type

"text"

width?

number

(Optional) Width of the text box. Defaults to 500. Use this to avoid breaking a long into multiple lines