LogoPixi’VN
indexFunctions

Function: showText()

> showText(alias, text, options?): Text

Defined in: src/canvas/functions/text-utility.ts:14

Add and show a text in the canvas.

Parameters

alias

string

The unique alias of the text. You can use this alias to refer to this text.

text

string

options?

Omit<TextOptions, "text">

The options of the text.

Returns

Text

A promise that is resolved when the text is loaded.

Example

let text = showText("text", "Hello World", { fontSize: 24, fill: "white" })