BitmapText#cleanText()

cleanText(text, replace) → {string}

Given a text string this will scan each character in the string to ensure it exists
in the BitmapText font data. If it doesn't the character is removed, or replaced with the replace argument.

If no font data has been loaded at all this returns an empty string, as nothing can be rendered.

Parameters
Name Type Argument Default Description
text string

The text to parse.

replace string <optional>
''

The replacement string for any missing characters.

Returns
string -

The cleaned text string.

Source code: gameobjects/BitmapText.js (Line 312)
doc_phaser
2017-02-14 10:37:30
Comments
Leave a Comment

Please login to continue.