Skip to content

Commit cb0f3e0

Browse files
committed
add doc for the static method. BTW: have to admit that Phaser is absolutely well considered, even for such case that user probably make all BMFont atlas combined into one.
1 parent cff904d commit cb0f3e0

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/gameobjects/bitmaptext/static/BitmapText.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,24 @@ BitmapText.ALIGN_CENTER = 1;
639639
*/
640640
BitmapText.ALIGN_RIGHT = 2;
641641

642+
/**
643+
* Parse an XML Bitmap Font from an Atlas.
644+
*
645+
* Adds the parsed Bitmap Font data to the cache with the `fontName` key.
646+
*
647+
* @name Phaser.GameObjects.BitmapText.ParseFromAtlas
648+
* @since 3.0.0
649+
*
650+
* @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.
651+
* @param {string} fontName - The key of the font to add to the Bitmap Font cache.
652+
* @param {string} textureKey - The key of the BitmapFont's texture.
653+
* @param {string} frameKey - The key of the BitmapFont texture's frame.
654+
* @param {string} xmlKey - The key of the XML data of the font to parse.
655+
* @param {integer} [xSpacing] - The x-axis spacing to add between each letter.
656+
* @param {integer} [ySpacing] - The y-axis spacing to add to the line height.
657+
*
658+
* @return {boolean} Whether the parsing was successful or not.
659+
*/
642660
BitmapText.ParseFromAtlas = ParseFromAtlas;
643661

644662
module.exports = BitmapText;

0 commit comments

Comments
 (0)