@@ -9,6 +9,32 @@ var GameObjectFactory = require('../../GameObjectFactory');
99
1010/**
1111 * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene.
12+ *
13+ * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.
14+ *
15+ * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to
16+ * match the font structure.
17+ *
18+ * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each
19+ * letter being rendered during the render pass. This callback allows you to manipulate the properties of
20+ * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects
21+ * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing
22+ * time, so only use them if you require the callback ability they have.
23+ *
24+ * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability
25+ * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by
26+ * processing the font texture in an image editor, applying fills and any other effects required.
27+ *
28+ * To create multi-line text insert \r, \n or \r\n escape codes into the text string.
29+ *
30+ * To create a BitmapText data files you need a 3rd party app such as:
31+ *
32+ * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/
33+ * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner
34+ * Littera (Web-based, free): http://kvazars.com/littera/
35+ *
36+ * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of
37+ * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson
1238 *
1339 * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.
1440 *
0 commit comments