mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
jsdoc fixes
This commit is contained in:
parent
625394a24c
commit
05a4385cd7
12 changed files with 43 additions and 14 deletions
|
@ -8,7 +8,7 @@
|
|||
* [description]
|
||||
*
|
||||
* @function GetBitmapTextSize
|
||||
* @since 3.0.0
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*
|
||||
* @param {Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText} src - [description]
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
|
||||
var ParseXMLBitmapFont = require('./ParseXMLBitmapFont');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @function ParseFromAtlas
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*/
|
||||
var ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing)
|
||||
{
|
||||
var frame = scene.sys.textures.getFrame(textureKey, frameKey);
|
||||
|
|
|
@ -26,6 +26,13 @@ var GetValue = require('../../utils/object/GetValue');
|
|||
// offset: { x: 0, y: 0 }
|
||||
// }
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
* @function ParseRetroFont
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*/
|
||||
var ParseRetroFont = function (scene, config)
|
||||
{
|
||||
var w = config.width;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
/**
|
||||
* @function getValue
|
||||
* @since 3.0.0
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*/
|
||||
function getValue (node, attribute)
|
||||
|
@ -16,7 +16,7 @@ function getValue (node, attribute)
|
|||
|
||||
/**
|
||||
* @function ParseXMLBitmapFont
|
||||
* @since 3.0.0
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*
|
||||
* @param {[type]} xml - [description]
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
/**
|
||||
* @function GetColor
|
||||
* @since 3.0.0
|
||||
* @since 3.0.0
|
||||
* @private
|
||||
*/
|
||||
var GetColor = function (value)
|
||||
|
|
|
@ -6,8 +6,16 @@
|
|||
|
||||
/**
|
||||
* Returns an object containing dimensions of the Text object.
|
||||
*
|
||||
* @function Phaser.GameObjects.Text.GetTextSize
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.GameObjects.Text} text - The Text object to get the size from.
|
||||
* @param {number} size - [description]
|
||||
* @param {array} lines - [description]
|
||||
*
|
||||
* @return {object} An object containing dimensions of the Text object.
|
||||
*/
|
||||
|
||||
var GetTextSize = function (text, size, lines)
|
||||
{
|
||||
var canvas = text.canvas;
|
||||
|
|
|
@ -8,8 +8,14 @@ var CanvasPool = require('../../display/canvas/CanvasPool');
|
|||
|
||||
/**
|
||||
* Calculates the ascent, descent and fontSize of a given font style.
|
||||
*
|
||||
* @function Phaser.GameObjects.Text.MeasureText
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.GameObjects.Text.TextStyle} textStyle - The TextStyle object to measure.
|
||||
*
|
||||
* @return {object} An object containing the ascent, descent and fontSize of the TextStyle.
|
||||
*/
|
||||
|
||||
var MeasureText = function (textStyle)
|
||||
{
|
||||
// @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered.
|
||||
|
|
|
@ -44,7 +44,7 @@ var propertyMap = {
|
|||
* [description]
|
||||
*
|
||||
* @class TextStyle
|
||||
* @memberOf Phaser.GameObjects.Components
|
||||
* @memberOf Phaser.GameObjects.Text
|
||||
* @constructor
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@ var Vertices = require('./lib/geometry/Vertices');
|
|||
* Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.
|
||||
*
|
||||
* @class MatterTileBody
|
||||
* @memberOf Phaser.Physics.Matter.TileBody
|
||||
* @memberOf Phaser.Physics.Matter
|
||||
* @constructor
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
|
|
@ -22,7 +22,7 @@ var Extend = require('../../utils/object/Extend');
|
|||
* @memberOf Phaser.Sound
|
||||
* @constructor
|
||||
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
|
||||
* @since 3.0.0
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance.
|
||||
* @param {string} key - Asset key for the sound.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
module.exports = {
|
||||
|
||||
Parsers: require('./parsers/'),
|
||||
Parsers: require('./parsers'),
|
||||
|
||||
FilterMode: require('./FilterMode'),
|
||||
Frame: require('./Frame'),
|
||||
|
|
|
@ -6,18 +6,19 @@
|
|||
|
||||
var imageHeight = 0;
|
||||
|
||||
/**
|
||||
* @function addFrame
|
||||
* @private
|
||||
* @since 3.0.0
|
||||
*/
|
||||
var addFrame = function (texture, sourceIndex, name, frame)
|
||||
{
|
||||
// The frame values are the exact coordinates to cut the frame out of the atlas from
|
||||
|
||||
var y = imageHeight - frame.y - frame.height;
|
||||
|
||||
// var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height);
|
||||
|
||||
texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height);
|
||||
|
||||
// console.log('name', name, 'rect', frame.x, y, frame.width, frame.height);
|
||||
|
||||
// These are the original (non-trimmed) sprite values
|
||||
/*
|
||||
if (src.trimmed)
|
||||
|
|
Loading…
Add table
Reference in a new issue