JSDoc blocks added.

This commit is contained in:
Richard Davey 2017-10-13 12:12:59 +01:00
parent 60d9133d05
commit c22668d53d
16 changed files with 118 additions and 3 deletions

View file

@ -1,3 +1,12 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#getFirstTick
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
* @param {boolean} [includeDelay=true] - [description]
*/
var GetFirstTick = function (component, includeDelay)
{
if (includeDelay === undefined) { includeDelay = true; }

View file

@ -1,3 +1,13 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#getFrameAt
* @since 3.0.0
*
* @param {integer} index - [description]
*
* @return {Phaser.Animations.AnimationFrame} [description]
*/
var GetFrameAt = function (index)
{
return this.frames[index];

View file

@ -1,6 +1,17 @@
var Frame = require('../AnimationFrame');
var GetValue = require('../../../utils/object/GetValue');
/**
* [description]
*
* @method Phaser.Animations.Animation#getFrames
* @since 3.0.0
*
* @param {[type]} textureManager - [description]
* @param {[type]} frames - [description]
*
* @return {Phaser.Animations.AnimationFrame[]} [description]
*/
var GetFrames = function (textureManager, frames)
{
// frames: [

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#getNextTick
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
*/
var GetNextTick = function (component)
{
// accumulator += delta * _timeScale

View file

@ -1,3 +1,12 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#load
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
* @param {integer} startFrame - [description]
*/
var Load = function (component, startFrame)
{
if (startFrame >= this.frames.length)

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#nextFrame
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
*/
var NextFrame = function (component)
{
var frame = component.currentFrame;

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#previousFrame
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
*/
var PreviousFrame = function (component)
{
var frame = component.currentFrame;

View file

@ -1,4 +1,14 @@
// Remove frame if it matches the given frame
/**
* [description]
*
* @method Phaser.Animations.Animation#removeFrame
* @since 3.0.0
*
* @param {Phaser.Animations.AnimationFrame} frame - [description]
*
* @return {Phaser.Animations.Animation} [description]
*/
var RemoveFrame = function (frame)
{
var index = this.frames.indexOf(frame);

View file

@ -1,3 +1,13 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#removeFrameAt
* @since 3.0.0
*
* @param {integer} index - [description]
*
* @return {Phaser.Animations.Animation} [description]
*/
var RemoveFrameAt = function (index)
{
this.frames.splice(index, 1);

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#repeatAnimation
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
*/
var RepeatAnimation = function (component)
{
if (component._repeatDelay > 0 && component.pendingRepeat === false)

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#setFrame
* @since 3.0.0
*
* @param {Phaser.GameObjects.Components.Animation} component - [description]
*/
var SetFrame = function (component)
{
// Work out which frame should be set next on the child, and set it

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#toJSON
* @since 3.0.0
*
* @return {object} [description]
*/
var ToJSON = function ()
{
var output = {

View file

@ -1,3 +1,11 @@
/**
* [description]
*
* @method Phaser.Animations.Animation#updateFrameSequence
* @since 3.0.0
*
* @return {Phaser.Animations.Animation} [description]
*/
var UpdateFrameSequence = function ()
{
var len = this.frames.length;

View file

@ -7,7 +7,7 @@
* @param {string|object} data - [description]
* @param {boolean} [clearCurrentAnimations=false] - [description]
*
* @return {array} An array containing all of the Animation objects that were created as a result of this call.
* @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.
*/
var FromJSON = function (data, clearCurrentAnimations)
{

View file

@ -17,7 +17,7 @@ var Pad = require('../../../utils/string/Pad');
* @param {array} [config.outputArray=[]] - [description]
* @param {boolean} [config.frames=false] - [description]
*
* @return {array} [description]
* @return {object[]} [description]
*/
var GenerateFrameNames = function (key, config)
{

View file

@ -14,7 +14,7 @@ var GetValue = require('../../../utils/object/GetValue');
* @param {array} [config.outputArray=[]] - [description]
* @param {boolean} [config.frames=false] - [description]
*
* @return {array} [description]
* @return {object[]} [description]
*/
var GenerateFrameNumbers = function (key, config)
{