/** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ declare var Class: any; declare var Components: any; declare var GameObject: any; declare var GetBitmapTextSize: (src: any, round: any, out: any) => any; declare var ParseFromAtlas: (scene: any, fontName: any, textureKey: any, frameKey: any, xmlKey: any, xSpacing: any, ySpacing: any) => boolean; declare var Render: any; /** * The font data for an individual character of a Bitmap Font. * * Describes the character's position, size, offset and kerning. * * @typedef {object} BitmapFontCharacterData * * @property {number} x - The x position of the character. * @property {number} y - The y position of the character. * @property {number} width - The width of the character. * @property {number} height - The height of the character. * @property {number} centerX - The center x position of the character. * @property {number} centerY - The center y position of the character. * @property {number} xOffset - The x offset of the character. * @property {number} yOffset - The y offset of the character. * @property {object} data - Extra data for the character. * @property {Object.} kerning - Kerning values, keyed by character code. */ /** * Bitmap Font data that can be used by a BitmapText Game Object. * * @typedef {object} BitmapFontData * * @property {string} font - The name of the font. * @property {number} size - The size of the font. * @property {number} lineHeight - The line height of the font. * @property {boolean} retroFont - Whether this font is a retro font (monospace). * @property {Object.} chars - The character data of the font, keyed by character code. Each character datum includes a position, size, offset and more. */ /** * @typedef {object} JSONBitmapText * @extends {JSONGameObject} * * @property {string} font - The name of the font. * @property {string} text - The text that this Bitmap Text displays. * @property {number} fontSize - The size of the font. * @property {number} letterSpacing - Adds / Removes spacing between characters. * @property {integer} align - The alignment of the text in a multi-line BitmapText object. */ /** * @classdesc * [description] * * @class BitmapText * @extends Phaser.GameObjects.GameObject * @memberOf Phaser.GameObjects * @constructor * @since 3.0.0 * * @extends Phaser.GameObjects.Components.Alpha * @extends Phaser.GameObjects.Components.BlendMode * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.Mask * @extends Phaser.GameObjects.Components.Origin * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.ScaleMode * @extends Phaser.GameObjects.Components.ScrollFactor * @extends Phaser.GameObjects.Components.Texture * @extends Phaser.GameObjects.Components.Tint * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time. * @param {number} x - The x coordinate of this Game Object in world space. * @param {number} y - The y coordinate of this Game Object in world space. * @param {string} font - The key of the font to use from the Bitmap Font cache. * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text. * @param {number} [size] - The font size of this Bitmap Text. * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object. */ declare var BitmapText: any;