Phaser API Documentation

  Version: 
getWrappedText(text)

Description:

Runs the given text through this Text objects word wrapping and returns the results as an array, where each element of the array corresponds to a wrapped line of text.

Parameters:

name type description
text string

The text for which the wrapping will be calculated. If unspecified, the Text objects current text will be used.

Returns:
Description:

An array of strings with the pieces of wrapped text.

Type:
  • Array.<string>
Since: 3.0.0