Class: CanvasTextSystem

CanvasTextSystem

System plugin to the renderer to manage canvas text.

new CanvasTextSystem ()

Implements

Methods

renderTextToCanvas (text, style, resolution, canvasAndContext) void

Renders text to its canvas, and updates its texture.

By default this is used internally to ensure the texture is correct before rendering, but it can be used called externally, for example from this class to 'pre-generate' the texture from a piece of text, and then shared across multiple Sprites.

Name Type Description
text string
style TextStyle
resolution number
canvasAndContext CanvasAndContext