diff --git a/README.md b/README.md index 1681df1..0d81c81 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ There is also a gulp task to generate them if you want to: ``` -$> gulp docs +$> gulp jsdoc ``` The documentation uses [DocStrap](https://github.com/terryweiss/docstrap) and the jsdoc format, the configuration diff --git a/README.md b/README.md index 1681df1..0d81c81 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ There is also a gulp task to generate them if you want to: ``` -$> gulp docs +$> gulp jsdoc ``` The documentation uses [DocStrap](https://github.com/terryweiss/docstrap) and the jsdoc format, the configuration diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 359200c..40f5212 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,11 +1,22 @@ var core = require('../core'), utils = require('../core/utils'); - - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * + * ```js + * var alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"]; + * var textureArray = []; + * + * for (var i=0; i < 4; i++) + * { + * var texture = PIXI.Texture.fromImage(alienImages[i]); + * textureArray.push(texture); + * }; + * + * var mc = new PIXI.MovieClip(textureArray); + * ``` + * * @class * @extends Sprite * @memberof PIXI.extras @@ -214,7 +225,10 @@ } }; - +/* + * Stops the MovieClip and destroys it + * + */ MovieClip.prototype.destroy = function ( ) { this.stop(); diff --git a/README.md b/README.md index 1681df1..0d81c81 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ There is also a gulp task to generate them if you want to: ``` -$> gulp docs +$> gulp jsdoc ``` The documentation uses [DocStrap](https://github.com/terryweiss/docstrap) and the jsdoc format, the configuration diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 359200c..40f5212 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,11 +1,22 @@ var core = require('../core'), utils = require('../core/utils'); - - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * + * ```js + * var alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"]; + * var textureArray = []; + * + * for (var i=0; i < 4; i++) + * { + * var texture = PIXI.Texture.fromImage(alienImages[i]); + * textureArray.push(texture); + * }; + * + * var mc = new PIXI.MovieClip(textureArray); + * ``` + * * @class * @extends Sprite * @memberof PIXI.extras @@ -214,7 +225,10 @@ } }; - +/* + * Stops the MovieClip and destroys it + * + */ MovieClip.prototype.destroy = function ( ) { this.stop(); diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 49ae91c..d022f1e 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -3,8 +3,25 @@ spritesheetParser = require('./spritesheetParser'), spineAtlasParser = require('./spineAtlasParser'), bitmapFontParser = require('./bitmapFontParser'); - // loader = new Loader(); +/** + * + * The new loader, extends Resource Loader by Chad Engler : https://github.com/englercj/resource-loader + * + * ```js + * var loader = new PIXI.loader(); + * + * loader.add('spineboy',"data/spineboy.json"); + * + * loader.once('complete',onAssetsLoaded); + * + * loader.load(); + * ``` + * + * @class + * @extends ResourceLoader + * @memberof PIXI.loaders + */ var Loader = function() { ResourceLoader.call(this); diff --git a/README.md b/README.md index 1681df1..0d81c81 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ There is also a gulp task to generate them if you want to: ``` -$> gulp docs +$> gulp jsdoc ``` The documentation uses [DocStrap](https://github.com/terryweiss/docstrap) and the jsdoc format, the configuration diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 359200c..40f5212 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,11 +1,22 @@ var core = require('../core'), utils = require('../core/utils'); - - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * + * ```js + * var alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"]; + * var textureArray = []; + * + * for (var i=0; i < 4; i++) + * { + * var texture = PIXI.Texture.fromImage(alienImages[i]); + * textureArray.push(texture); + * }; + * + * var mc = new PIXI.MovieClip(textureArray); + * ``` + * * @class * @extends Sprite * @memberof PIXI.extras @@ -214,7 +225,10 @@ } }; - +/* + * Stops the MovieClip and destroys it + * + */ MovieClip.prototype.destroy = function ( ) { this.stop(); diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 49ae91c..d022f1e 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -3,8 +3,25 @@ spritesheetParser = require('./spritesheetParser'), spineAtlasParser = require('./spineAtlasParser'), bitmapFontParser = require('./bitmapFontParser'); - // loader = new Loader(); +/** + * + * The new loader, extends Resource Loader by Chad Engler : https://github.com/englercj/resource-loader + * + * ```js + * var loader = new PIXI.loader(); + * + * loader.add('spineboy',"data/spineboy.json"); + * + * loader.once('complete',onAssetsLoaded); + * + * loader.load(); + * ``` + * + * @class + * @extends ResourceLoader + * @memberof PIXI.loaders + */ var Loader = function() { ResourceLoader.call(this); diff --git a/src/spine/Spine.js b/src/spine/Spine.js index 22e799d..58645ae 100644 --- a/src/spine/Spine.js +++ b/src/spine/Spine.js @@ -7,9 +7,13 @@ /** * A class that enables the you to import and run your spine animations in pixi. - * Spine animation data needs to be loaded using the AssetLoader or SpineLoader before it can be used by this class + * The Spine animation data needs to be loaded using either the Loader or a SpineLoader before it can be used by this class * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * + * ```js + * var spineAnimation = new PIXI.Spine(spineData); + * ``` + * * @class * @extends Container * @memberof PIXI.spine