-
Notifications
You must be signed in to change notification settings - Fork 0
3.7 Text
Jonas de Luna Skulberg edited this page Oct 14, 2023
·
1 revision
-
text?: stringText string to display.
-
position?: InputPositionPosition of the text. -
color?: stringColor of the text. -
fontSize?: numberText font-size. -
anchorY?: "top" | "middle" | "bottom"Text y-anchor point. -
anchorX?: "left" | "center" | "right"Text x-anchor point. -
weight?: fontWeightText font-weight.
position: [0, 0] as [number, number],
color: "black",
fontSize: 30,
anchorX: "left",
anchorY: "bottom",
weight: "regular" as fontWeight,
collidesWith(other: Object3D): booleandistanceTo(other: Object3D<Event>): number
-
setPosition(position: InputPosition): voidSet the component position. -
setText(text: string): voidSet the text content.