Skip to content

spawnText

spawnText(game, font, value, options?): Text

Spawns a line (or lines, with \n) of text as one sprite per character, so text batches, sorts and fades like any other sprite. Put it on a renderer.screen layer for HUDs. Characters missing from the font draw as ? and log a warning once.

Game

Font

string

TextOptions

Text