Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1 KB

File metadata and controls

34 lines (22 loc) · 1 KB

Text

A string of text that can be rendered on screen.


Constructor

new Text(scene, config);

Arguments

  • sceneScene The scene this Object is a part of.
  • configObject The Text's config object.
    • config.xnumber This Text object's x-coordinate.
    • config.ynumber This Text object's y-coordinate.
    • config.maxWidthnumber The maximum width of the Text. Defaults to Renderer.width.
    • config.valuestring The text to display. (use "\n" for newlines)
    • config.wrapboolean Whether to wrap the text if it overflows the screen.
    • config.colorstring Optional text color.
    • config.backgroundColorstring Optional background color.
    • config.fontWeightstring Optional font weight.

Properties

value

The string value of the text object.

renderable

Get the PixelMesh renderable representation of the text.