Skip to content

Commit

Permalink
fix animation jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
oberhamsi committed Jul 22, 2015
1 parent e3832cb commit 7bed8a2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/gamejs/animate.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
var gamejs = require('../gamejs');

/**
* @fileoverview `Animations` on top of `SpriteSheets`.
* @fileoverview Provides Animations and SpriteSheets.
*
* @example
* var spriteSheet = new SpriteSheet(sheetSurface, {width: 16, height: 16});
* var animation = new Animation(spriteSheet, {walk: [0,1,2,3], loop: true});
* animation.setState('walk');
* var animationSpec = {
* walk: {
* frames: [0,1,2,3],
* loop: true,
* rate: 20 // framerate per second
* }
* }
* var animation = new Animation(spriteSheet, 'walk', animationSpec);
* ....
* animation.update(msDuration)
* ....
* display.blit(animation.currentFrame);
* display.blit(animation.image);
*
*/

Expand Down Expand Up @@ -103,7 +109,7 @@ var Animation = exports.Animation = function(spriteSheet, initial, spec) {
/** @ignore **/
this.spec = spec;

/** The current tile surface of the animation. Draw this to the screen. **/
/** @ignore **/
this.currentFrame = null;
/** @ignore **/
this.currentFrameDuration = 0;
Expand All @@ -113,7 +119,7 @@ var Animation = exports.Animation = function(spriteSheet, initial, spec) {
this._isFinished = false;
/** @ignore **/
this.spriteSheet = spriteSheet;
/** @ignore **/
/** The current tile surface of the animation. Draw this to the screen. **/
this.image = spriteSheet.get(0);
this.start(initial);

Expand Down

0 comments on commit 7bed8a2

Please sign in to comment.