Improved JSDocs and types. Fix #5217

This commit is contained in:
Richard Davey 2020-08-24 15:04:00 +01:00
parent 1766f66984
commit 2af65b2a1d
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@
* @since 3.0.0
*
* @property {string} [key] - The key that the animation will be associated with. i.e. sprite.animations.play(key)
* @property {Phaser.Types.Animations.AnimationFrame[]} [frames] - An object containing data used to generate the frames for the animation
* @property {Phaser.Types.Animations.AnimationFrame[]} [frames] - An object containing data used to generate the frames for the animation.
* @property {string} [defaultTextureKey=null] - The key of the texture all frames of the animation will use. Can be overridden on a per frame basis.
* @property {integer} [frameRate] - The frame rate of playback in frames per second (default 24 if duration is null)
* @property {integer} [duration] - How long the animation should play for in milliseconds. If not given its derived from frameRate.

View file

@ -2,8 +2,8 @@
* @typedef {object} Phaser.Types.Animations.AnimationFrame
* @since 3.0.0
*
* @property {string} key - The key that the animation will be associated with. i.e. sprite.animations.play(key)
* @property {(string|number)} frame - The key, or index number, of the frame within the animation.
* @property {string} key - The key of the texture within the Texture Manager to use for this Animation Frame.
* @property {(string|number)} [frame] - The key, or index number, of the frame within the texture to use for this Animation Frame.
* @property {number} [duration=0] - The duration, in ms, of this frame of the animation.
* @property {boolean} [visible] - Should the parent Game Object be visible during this frame of the animation?
*/