diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js index e3ceb18..7dd5b26 100644 --- a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js +++ b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js @@ -188,7 +188,7 @@ verticies[index++] = alpha; verticies[index++] = tint; - // increment the batchs + // increment the batchsize this.currentBatchSize++; @@ -211,7 +211,7 @@ } // set the textures uvs temporarily - // TODO create a seperate texture so that we can tile part of a texture + // TODO create a separate texture so that we can tile part of a texture if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js index e3ceb18..7dd5b26 100644 --- a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js +++ b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js @@ -188,7 +188,7 @@ verticies[index++] = alpha; verticies[index++] = tint; - // increment the batchs + // increment the batchsize this.currentBatchSize++; @@ -211,7 +211,7 @@ } // set the textures uvs temporarily - // TODO create a seperate texture so that we can tile part of a texture + // TODO create a separate texture so that we can tile part of a texture if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); diff --git a/src/pixi/text/BitmapText.js b/src/pixi/text/BitmapText.js index fb5fb8c..ca1aaa2 100644 --- a/src/pixi/text/BitmapText.js +++ b/src/pixi/text/BitmapText.js @@ -14,7 +14,7 @@ * @param text {String} The copy that you would like the text to display * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText = function(text, style) { @@ -48,7 +48,7 @@ * @method setStyle * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText.prototype.setStyle = function(style) { @@ -139,7 +139,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js index e3ceb18..7dd5b26 100644 --- a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js +++ b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js @@ -188,7 +188,7 @@ verticies[index++] = alpha; verticies[index++] = tint; - // increment the batchs + // increment the batchsize this.currentBatchSize++; @@ -211,7 +211,7 @@ } // set the textures uvs temporarily - // TODO create a seperate texture so that we can tile part of a texture + // TODO create a separate texture so that we can tile part of a texture if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); diff --git a/src/pixi/text/BitmapText.js b/src/pixi/text/BitmapText.js index fb5fb8c..ca1aaa2 100644 --- a/src/pixi/text/BitmapText.js +++ b/src/pixi/text/BitmapText.js @@ -14,7 +14,7 @@ * @param text {String} The copy that you would like the text to display * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText = function(text, style) { @@ -48,7 +48,7 @@ * @method setStyle * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText.prototype.setStyle = function(style) { @@ -139,7 +139,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 48e81d4..7393942 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -3,7 +3,7 @@ */ /** - * A Text Object will create a line(s) of text to split a line you can use '\n' + * A Text Object will create a line(s) of text. To split a line you can use '\n' * * @class Text * @extends Sprite @@ -12,7 +12,7 @@ * @param [style] {Object} The style parameters * @param [style.font] {String} default 'bold 20pt Arial' The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -42,7 +42,7 @@ * @param [style] {Object} The style parameters * @param [style.font='bold 20pt Arial'] {String} The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke='black'] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -179,7 +179,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js index e3ceb18..7dd5b26 100644 --- a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js +++ b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js @@ -188,7 +188,7 @@ verticies[index++] = alpha; verticies[index++] = tint; - // increment the batchs + // increment the batchsize this.currentBatchSize++; @@ -211,7 +211,7 @@ } // set the textures uvs temporarily - // TODO create a seperate texture so that we can tile part of a texture + // TODO create a separate texture so that we can tile part of a texture if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); diff --git a/src/pixi/text/BitmapText.js b/src/pixi/text/BitmapText.js index fb5fb8c..ca1aaa2 100644 --- a/src/pixi/text/BitmapText.js +++ b/src/pixi/text/BitmapText.js @@ -14,7 +14,7 @@ * @param text {String} The copy that you would like the text to display * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText = function(text, style) { @@ -48,7 +48,7 @@ * @method setStyle * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText.prototype.setStyle = function(style) { @@ -139,7 +139,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 48e81d4..7393942 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -3,7 +3,7 @@ */ /** - * A Text Object will create a line(s) of text to split a line you can use '\n' + * A Text Object will create a line(s) of text. To split a line you can use '\n' * * @class Text * @extends Sprite @@ -12,7 +12,7 @@ * @param [style] {Object} The style parameters * @param [style.font] {String} default 'bold 20pt Arial' The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -42,7 +42,7 @@ * @param [style] {Object} The style parameters * @param [style.font='bold 20pt Arial'] {String} The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke='black'] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -179,7 +179,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index a4922e6..039dd36 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -143,7 +143,7 @@ /** * Helper function that returns a base texture based on an image url - * If the image is not in the base texture cache it will be created and loaded + * If the image is not in the base texture cache it will be created and loaded * * @static * @method fromImage diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js index e3ceb18..7dd5b26 100644 --- a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js +++ b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js @@ -188,7 +188,7 @@ verticies[index++] = alpha; verticies[index++] = tint; - // increment the batchs + // increment the batchsize this.currentBatchSize++; @@ -211,7 +211,7 @@ } // set the textures uvs temporarily - // TODO create a seperate texture so that we can tile part of a texture + // TODO create a separate texture so that we can tile part of a texture if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); diff --git a/src/pixi/text/BitmapText.js b/src/pixi/text/BitmapText.js index fb5fb8c..ca1aaa2 100644 --- a/src/pixi/text/BitmapText.js +++ b/src/pixi/text/BitmapText.js @@ -14,7 +14,7 @@ * @param text {String} The copy that you would like the text to display * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText = function(text, style) { @@ -48,7 +48,7 @@ * @method setStyle * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText.prototype.setStyle = function(style) { @@ -139,7 +139,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 48e81d4..7393942 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -3,7 +3,7 @@ */ /** - * A Text Object will create a line(s) of text to split a line you can use '\n' + * A Text Object will create a line(s) of text. To split a line you can use '\n' * * @class Text * @extends Sprite @@ -12,7 +12,7 @@ * @param [style] {Object} The style parameters * @param [style.font] {String} default 'bold 20pt Arial' The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -42,7 +42,7 @@ * @param [style] {Object} The style parameters * @param [style.font='bold 20pt Arial'] {String} The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke='black'] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -179,7 +179,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index a4922e6..039dd36 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -143,7 +143,7 @@ /** * Helper function that returns a base texture based on an image url - * If the image is not in the base texture cache it will be created and loaded + * If the image is not in the base texture cache it will be created and loaded * * @static * @method fromImage diff --git a/src/pixi/textures/RenderTexture.js b/src/pixi/textures/RenderTexture.js index 620d198..d32a8be 100644 --- a/src/pixi/textures/RenderTexture.js +++ b/src/pixi/textures/RenderTexture.js @@ -5,7 +5,7 @@ /** A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it. - __Hint__: All DisplayObjects (exmpl. Sprites) that renders on RenderTexture should be preloaded. + __Hint__: All DisplayObjects (exmpl. Sprites) that render on RenderTexture should be preloaded. Otherwise black rectangles will be drawn instead. RenderTexture takes snapshot of DisplayObject passed to render method. If DisplayObject is passed to render method, position and rotation of it will be ignored. For example: diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index a6a22f0..899aff8 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -13,7 +13,7 @@ PIXI.InteractionManager = function(stage) { /** - * a refference to the stage + * a reference to the stage * * @property stage * @type Stage @@ -199,7 +199,7 @@ // ok.. so mouse events?? // yes for now :) - // OPTIMSE - how often to check?? + // OPTIMISE - how often to check?? if(this.dirty) { this.dirty = false; @@ -240,7 +240,7 @@ item.__hit = this.hitTest(item, this.mouse); this.mouse.target = item; // ok so deal with interactions.. - // loks like there was a hit! + // looks like there was a hit! if(item.__hit) { if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; @@ -267,7 +267,7 @@ }; /** - * Is called when the mouse moves accross the renderer element + * Is called when the mouse moves across the renderer element * * @method onMouseMove * @param event {Event} The DOM event of the mouse moving @@ -307,7 +307,7 @@ { this.mouse.originalEvent = event || window.event; //IE uses window.event - // loop through inteaction tree... + // loop through interaction tree... // hit test each item! -> // get interactive items under point?? //stage.__i @@ -411,7 +411,7 @@ * * @method hitTest * @param item {DisplayObject} The displayObject to test for a hit - * @param interactionData {InteractionData} The interactiondata object to update in the case of a hit + * @param interactionData {InteractionData} The interactionData object to update in the case of a hit * @private */ PIXI.InteractionManager.prototype.hitTest = function(item, interactionData) @@ -482,10 +482,10 @@ }; /** - * Is called when a touch is moved accross the renderer element + * Is called when a touch is moved across the renderer element * * @method onTouchMove - * @param event {Event} The DOM event of a touch moving accross the renderer view + * @param event {Event} The DOM event of a touch moving across the renderer view * @private */ PIXI.InteractionManager.prototype.onTouchMove = function(event) diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index d172461..43ec63b 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -3,7 +3,7 @@ */ /** - * The Circle object can be used to specify a hit area for displayobjects + * The Circle object can be used to specify a hit area for displayObjects * * @class Circle * @constructor diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index 7a9c2f6..4a4cf86 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -3,7 +3,7 @@ */ /** - * The Ellipse object can be used to specify a hit area for displayobjects + * The Ellipse object can be used to specify a hit area for displayObjects * * @class Ellipse * @constructor @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this ellipse + * Checks if the x and y coords passed to this function are contained within this ellipse * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 4887f6c..fe37d45 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -49,7 +49,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this polygon + * Checks if the x and y coords passed to this function are contained within this polygon * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 70390a1..56047e8 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -55,7 +55,7 @@ }; /** - * Checks if the x, and y coords passed to this function are contained within this Rectangle + * Checks if the x and y coords passed to this function are contained within this Rectangle * * @method contains * @param x {Number} The X coord of the point to test diff --git a/src/pixi/display/DisplayObject.js b/src/pixi/display/DisplayObject.js index f9b343a..20808d2 100644 --- a/src/pixi/display/DisplayObject.js +++ b/src/pixi/display/DisplayObject.js @@ -104,7 +104,7 @@ this.stage = null; /** - * [read-only] The multiplied alpha of the displayobject + * [read-only] The multiplied alpha of the displayObject * * @property worldAlpha * @type Number @@ -123,7 +123,7 @@ this._interactive = false; /** - * This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true + * This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true * * @property defaultCursor * @type String @@ -152,7 +152,7 @@ this.localTransform = PIXI.mat3.create(); //mat3.identity(); /** - * [NYI] Unkown + * [NYI] Unknown * * @property color * @type Array<> @@ -169,7 +169,7 @@ */ this.dynamic = true; - // chach that puppy! + // cached sin rotation and cos rotation this._sr = 0; this._cr = 1; @@ -177,11 +177,6 @@ this.filterArea = new PIXI.Rectangle(0,0,1,1); - /** - * - * - * - */ this._bounds = new PIXI.Rectangle(0, 0, 1, 1); this._currentBounds = null; this._mask = null; @@ -241,7 +236,7 @@ */ /** - * A callback that is used when the user touch's over the displayObject + * A callback that is used when the user touches over the displayObject * @method touchstart * @param interactionData {InteractionData} */ @@ -319,7 +314,7 @@ /** * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. - * In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping. + * In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. * To remove a mask, set this property to null. * * @property mask diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 31a1826..45a8b55 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -30,7 +30,7 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer; /** - * The width of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -49,7 +49,7 @@ */ /** - * The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set + * The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -86,7 +86,7 @@ this.children.push(child); - // update the stage refference.. + // update the stage reference.. if(this.stage)child.setStageReference(this.stage); @@ -147,7 +147,7 @@ }; /** - * Returns the Child at the specified index + * Returns the child at the specified index * * @method getChildAt * @param index {Number} The index to get the child from @@ -188,7 +188,7 @@ }; /* - * Updates the container's children's transform for rendering + * Updates the container's childrens transform for rendering * * @method updateTransform * @private @@ -249,7 +249,7 @@ bounds.width = maxX - minX; bounds.height = maxY - minY; - // TODO: store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // TODO: store a reference so that if this function gets called again in the render cycle we do not have to recalculate //this._currentBounds = bounds; return bounds; diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 5bb523a..56e6f6e 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -49,7 +49,7 @@ this.onComplete = null; /** - * [read-only] The index MovieClips current frame (this may not have to be a whole number) + * [read-only] The MovieClips current frame index (this may not have to be a whole number) * * @property currentFrame * @type Number diff --git a/src/pixi/display/Sprite.js b/src/pixi/display/Sprite.js index 6c8ff58..0457f9d 100644 --- a/src/pixi/display/Sprite.js +++ b/src/pixi/display/Sprite.js @@ -9,7 +9,7 @@ PIXI.blendModes.SCREEN = 3; /** - * The SPrite object is the base for all textured objects that are rendered to the screen + * The Sprite object is the base for all textured objects that are rendered to the screen * * @class Sprite * @extends DisplayObjectContainer @@ -95,7 +95,7 @@ PIXI.Sprite.prototype.constructor = PIXI.Sprite; /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -111,7 +111,7 @@ }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set + * The height of the sprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -233,7 +233,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; @@ -318,7 +318,7 @@ var transform = this.worldTransform; - // alow for trimming + // allow for trimming context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); @@ -347,7 +347,7 @@ this.cachedTint = this.tint; - //TODO clean up cacheing - how to clean up the caches? + //TODO clean up caching - how to clean up the caches? this.tintedTexture = PIXI.CanvasTinter.getTintedTexture(this, this.tint); } diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index d0e107f..0e63015 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -50,7 +50,7 @@ */ this.dirty = true; - //the stage is it's own stage + //the stage is its own stage this.stage = this; //optimize hit detection a bit @@ -65,7 +65,7 @@ /** * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. - * This is useful for when you have other DOM elements ontop of the Canvas element. + * This is useful for when you have other DOM elements on top of the Canvas element. * * @method setInteractionDelegate * @param domElement {DOMElement} This new domElement which will receive mouse/touch events diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 7a1e179..a3a86ca 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -50,7 +50,7 @@ /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set + * The width of the sprite, setting this will actually modify the scale to achieve the value set * * @property width * @type Number @@ -66,7 +66,7 @@ }); /** - * The height of the TilingSprite, setting this will actually modify the scale to acheive the value set + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set * * @property height * @type Number @@ -157,10 +157,10 @@ var transform = this.worldTransform; - // alow for trimming - + // allow for trimming + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); - + if(!this.__tilePattern) { @@ -270,7 +270,7 @@ bounds.y = minY; bounds.height = maxY - minY; - // store a refferance so that if this function gets called again in the render cycle we do not have to recacalculate + // store a reference so that if this function gets called again in the render cycle we do not have to recalculate this._currentBounds = bounds; return bounds; diff --git a/src/pixi/filters/AbstractFilter.js b/src/pixi/filters/AbstractFilter.js index c16f79c..94b895b 100644 --- a/src/pixi/filters/AbstractFilter.js +++ b/src/pixi/filters/AbstractFilter.js @@ -3,7 +3,7 @@ */ /** - * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. + * This is the base class for creating a pixi.js filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * @class AbstractFilter * @constructor diff --git a/src/pixi/filters/BlurFilter.js b/src/pixi/filters/BlurFilter.js index 5f89bff..1b5cddb 100644 --- a/src/pixi/filters/BlurFilter.js +++ b/src/pixi/filters/BlurFilter.js @@ -35,7 +35,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurX * @type Number the strength of the blurX @@ -51,7 +51,7 @@ }); /** - * Sets the strength of the blurX property simultaneously + * Sets the strength of the blurX property * * @property blurY * @type Number the strength of the blurY diff --git a/src/pixi/filters/ColorStepFilter.js b/src/pixi/filters/ColorStepFilter.js index 1bb3901..e8f7650 100644 --- a/src/pixi/filters/ColorStepFilter.js +++ b/src/pixi/filters/ColorStepFilter.js @@ -4,7 +4,7 @@ /** * - * This turns your displayObjects to black and white. + * This lowers the color depth of your image by the given amount, producing an image with a smaller palette. * @class ColorStepFilter * @contructor */ diff --git a/src/pixi/filters/DotScreenFilter.js b/src/pixi/filters/DotScreenFilter.js index d898f26..8c9a49f 100644 --- a/src/pixi/filters/DotScreenFilter.js +++ b/src/pixi/filters/DotScreenFilter.js @@ -5,8 +5,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a dotscreen effect making display objects appear to be made out of black and white halftone dots like an old printer + * @class DotScreenFilter * @contructor */ PIXI.DotScreenFilter = function() diff --git a/src/pixi/filters/PixelateFilter.js b/src/pixi/filters/PixelateFilter.js index 4d4adb1..89a146b 100644 --- a/src/pixi/filters/PixelateFilter.js +++ b/src/pixi/filters/PixelateFilter.js @@ -4,7 +4,7 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' + * This filter applies a pixelate effect making display objects appear 'blocky' * @class PixelateFilter * @contructor */ diff --git a/src/pixi/filters/TwistFilter.js b/src/pixi/filters/TwistFilter.js index 39270b2..01c5169 100644 --- a/src/pixi/filters/TwistFilter.js +++ b/src/pixi/filters/TwistFilter.js @@ -4,8 +4,8 @@ /** * - * This filter applies a pixlate effect making display objects appear 'blocky' - * @class PixelateFilter + * This filter applies a twist effect making display objects appear twisted in the given direction + * @class TwistFilter * @contructor */ PIXI.TwistFilter = function() diff --git a/src/pixi/loaders/AtlasLoader.js b/src/pixi/loaders/AtlasLoader.js index 68300eb..2288e81 100644 --- a/src/pixi/loaders/AtlasLoader.js +++ b/src/pixi/loaders/AtlasLoader.js @@ -3,9 +3,9 @@ */ /** - * The atlas file loader is used to load in Atlas data and parsing it + * The atlas file loader is used to load in Atlas data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * @class AtlasLoader * @extends EventTarget * @constructor diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index c73893f..9e998b0 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -4,7 +4,7 @@ /** * The image loader class is responsible for loading images file formats ('jpeg', 'jpg', 'png' and 'gif') - * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() + * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * When loaded this class will dispatch a 'loaded' event * * @class ImageLoader @@ -73,7 +73,7 @@ * * * @method loadFramedSpriteSheet - * @param frameWidth {Number} with of each frame + * @param frameWidth {Number} width of each frame * @param frameHeight {Number} height of each frame * @param textureName {String} if given, the frames will be cached in - format */ diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index ac9d3dd..0a0d8f8 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -3,9 +3,9 @@ */ /** - * The json file loader is used to load in JSON data and parsing it + * The json file loader is used to load in JSON data and parse it * When loaded this class will dispatch a 'loaded' event - * If load failed this class will dispatch a 'error' event + * If loading fails this class will dispatch an 'error' event * * @class JsonLoader * @uses EventTarget diff --git a/src/pixi/loaders/SpineLoader.js b/src/pixi/loaders/SpineLoader.js index 0f1f3c9..23072f1 100644 --- a/src/pixi/loaders/SpineLoader.js +++ b/src/pixi/loaders/SpineLoader.js @@ -9,7 +9,7 @@ /** * The Spine loader is used to load in JSON spine data - * To generate the data you need to use http://esotericsoftware.com/ and export the "JSON" format + * To generate the data you need to use http://esotericsoftware.com/ and export in the "JSON" format * Due to a clash of names You will need to change the extension of the spine file from *.json to *.anim for it to load * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * You will need to generate a sprite sheet to accompany the spine data diff --git a/src/pixi/loaders/SpriteSheetLoader.js b/src/pixi/loaders/SpriteSheetLoader.js index 4f4c802..bfb827a 100644 --- a/src/pixi/loaders/SpriteSheetLoader.js +++ b/src/pixi/loaders/SpriteSheetLoader.js @@ -4,11 +4,11 @@ /** * The sprite sheet loader is used to load in JSON sprite sheet data - * To generate the data you can use http://www.codeandweb.com/texturepacker and publish the 'JSON' format + * To generate the data you can use http://www.codeandweb.com/texturepacker and publish in the 'JSON' format * There is a free version so thats nice, although the paid version is great value for money. - * It is highly recommended to use Sprite sheets (also know as texture atlas') as it means sprite's can be batched and drawn together for highly increased rendering speed. - * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFromeId() - * This loader will also load the image file that the Spritesheet points to as well as the data. + * It is highly recommended to use Sprite sheets (also know as a 'texture atlas') as it means sprites can be batched and drawn together for highly increased rendering speed. + * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() + * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * * @class SpriteSheetLoader diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index f78f49b..3a18769 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -80,8 +80,8 @@ /** * If cacheAsBitmap is true the graphics object will then be rendered as if it was a sprite. * This is useful if your graphics element does not change often as it will speed up the rendering of the object - * It is also usful as the graphics object will always be aliased because it will be rendered using canvas - * Not recommended if you are conastanly redrawing the graphics element. + * It is also usful as the graphics object will always be antialiased because it will be rendered using canvas + * Not recommended if you are constanly redrawing the graphics element. * * @property cacheAsBitmap * @default false @@ -331,7 +331,7 @@ PIXI.WebGLGraphics.renderGraphics(this, renderSession); - // only rende rif it has children! + // only render if it has children! if(this.children.length) { renderSession.spriteBatch.start(); @@ -529,7 +529,7 @@ this._cachedSprite.buffer.resize(bounds.width, bounds.height); } - // leverage the anchor to account for the offest of the element + // leverage the anchor to account for the offset of the element this._cachedSprite.anchor.x = -( bounds.x / bounds.width ); this._cachedSprite.anchor.y = -( bounds.y / bounds.height ); diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 58dc3f1..028275e 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -132,7 +132,6 @@ this.context.setTransform(1,0,0,1,0,0); this.context.clearRect(0, 0, this.width, this.height); this.renderDisplayObject(stage); - //as // run interaction! if(stage.interactive) @@ -177,7 +176,7 @@ */ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject, context) { - // no loger recurrsive! + // no longer recurrsive! //var transform; //var context = this.context; @@ -283,7 +282,6 @@ this.canvas = document.createElement( "canvas" ); this.context = this.canvas.getContext( "2d" ); -// this.context.f this.canvas.width = width; this.canvas.height = height; }; diff --git a/src/pixi/renderers/canvas/utils/CanvasTinter.js b/src/pixi/renderers/canvas/utils/CanvasTinter.js index 44d66e1..fd3a957 100644 --- a/src/pixi/renderers/canvas/utils/CanvasTinter.js +++ b/src/pixi/renderers/canvas/utils/CanvasTinter.js @@ -16,8 +16,8 @@ PIXI.CanvasTinter.getTintedTexture = function(sprite, color) { // - // cach on sprite - // cach on texture + // cache on sprite + // cache on texture // no cache var texture = sprite.texture; @@ -50,7 +50,7 @@ { texture.tintCache[stringColor] = canvas; - // if we are not converting the texture to an image then we need to lose the refferance to the canvas + // if we are not converting the texture to an image then we need to lose the reference to the canvas PIXI.CanvasTinter.canvas = null; } diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index 3d6f0ae..405b1ea 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -5,8 +5,8 @@ PIXI.glContexts = []; // this is where we store the webGL contexts for easy access. /** - * the WebGLRenderer is draws the stage and all its content onto a webGL enabled canvas. This renderer - * should be used for browsers support webGL. This Render works by automatically managing webGLBatchs. + * the WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatch's. * So no need for Sprite Batch's or Sprite Cloud's * Dont forget to add the view to your DOM or you will not see anything :) * @@ -15,7 +15,7 @@ * @param width=0 {Number} the width of the canvas view * @param height=0 {Number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional - * @param transparent=false {Boolean} the transparency of the render view, default false + * @param transparent=false {Boolean} If the render view is transparent, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) * */ @@ -126,7 +126,7 @@ if(this.contextLost)return; - // if rendering a new stage clear the batchs.. + // if rendering a new stage clear the batches.. if(this.__stage !== stage) { // TODO make this work diff --git a/src/pixi/renderers/webgl/shaders/PixiShader.js b/src/pixi/renderers/webgl/shaders/PixiShader.js index 616510f..cae7ae6 100644 --- a/src/pixi/renderers/webgl/shaders/PixiShader.js +++ b/src/pixi/renderers/webgl/shaders/PixiShader.js @@ -67,7 +67,7 @@ // Begin worst hack eva // // WHY??? ONLY on my chrome pixel the line above returns -1 when using filters? - // maybe its somthing to do with the current state of the gl context. + // maybe its something to do with the current state of the gl context. // Im convinced this is a bug in the chrome browser as there is NO reason why this should be returning -1 especially as it only manifests on my chrome pixel // If theres any webGL people that know why could happen please help :) if(this.colorAttribute === -1) @@ -165,7 +165,7 @@ }; /** -* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture is has loaded) +* Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded) * * @method PIXI.PixiShader#initSampler2D */ diff --git a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js index 5eaa189..7ea44f5 100644 --- a/src/pixi/renderers/webgl/utils/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/utils/WebGLFilterManager.js @@ -148,7 +148,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.vertexArray); gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer); - // nnow set the uvs.. + // now set the uvs.. this.uvArray[2] = filterArea.width/this.width; this.uvArray[5] = filterArea.height/this.height; this.uvArray[6] = filterArea.width/this.width; @@ -160,7 +160,7 @@ var outputTexture = this.texturePool.pop(); if(!outputTexture)outputTexture = new PIXI.FilterTexture(this.gl, this.width, this.height); - // need to clear this FBO as it may have some left over elements from a prvious filter. + // need to clear this FBO as it may have some left over elements from a previous filter. gl.bindFramebuffer(gl.FRAMEBUFFER, outputTexture.frameBuffer ); gl.clear(gl.COLOR_BUFFER_BIT); @@ -355,7 +355,7 @@ // bind and upload the vertexs.. - // keep a refferance to the vertexFloatData.. + // keep a reference to the vertexFloatData.. this.vertexArray = new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, diff --git a/src/pixi/renderers/webgl/utils/WebGLGraphics.js b/src/pixi/renderers/webgl/utils/WebGLGraphics.js index d868c59..4956802 100644 --- a/src/pixi/renderers/webgl/utils/WebGLGraphics.js +++ b/src/pixi/renderers/webgl/utils/WebGLGraphics.js @@ -53,12 +53,12 @@ renderSession.shaderManager.activatePrimitiveShader(); - // This could be speeded up fo sure! + // This could be speeded up for sure! // var m = PIXI.mat3.clone(graphics.worldTransform); PIXI.mat3.transpose(graphics.worldTransform, PIXI.tempMatrix); - // set the matrix transform for the + // set the matrix transform gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); gl.uniformMatrix3fv(shader.translationMatrix, false, PIXI.tempMatrix); @@ -310,7 +310,7 @@ var firstPoint = new PIXI.Point( points[0], points[1] ); var lastPoint = new PIXI.Point( points[points.length - 2], points[points.length - 1] ); - // if the first point is the last point - goona have issues :) + // if the first point is the last point - gonna have issues :) if(firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { points.pop(); diff --git a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js index e3ceb18..7dd5b26 100644 --- a/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js +++ b/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js @@ -188,7 +188,7 @@ verticies[index++] = alpha; verticies[index++] = tint; - // increment the batchs + // increment the batchsize this.currentBatchSize++; @@ -211,7 +211,7 @@ } // set the textures uvs temporarily - // TODO create a seperate texture so that we can tile part of a texture + // TODO create a separate texture so that we can tile part of a texture if(!tilingSprite._uvs)tilingSprite._uvs = new Float32Array(8); diff --git a/src/pixi/text/BitmapText.js b/src/pixi/text/BitmapText.js index fb5fb8c..ca1aaa2 100644 --- a/src/pixi/text/BitmapText.js +++ b/src/pixi/text/BitmapText.js @@ -14,7 +14,7 @@ * @param text {String} The copy that you would like the text to display * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText = function(text, style) { @@ -48,7 +48,7 @@ * @method setStyle * @param style {Object} The style parameters * @param style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text */ PIXI.BitmapText.prototype.setStyle = function(style) { @@ -139,7 +139,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 48e81d4..7393942 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -3,7 +3,7 @@ */ /** - * A Text Object will create a line(s) of text to split a line you can use '\n' + * A Text Object will create a line(s) of text. To split a line you can use '\n' * * @class Text * @extends Sprite @@ -12,7 +12,7 @@ * @param [style] {Object} The style parameters * @param [style.font] {String} default 'bold 20pt Arial' The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -42,7 +42,7 @@ * @param [style] {Object} The style parameters * @param [style.font='bold 20pt Arial'] {String} The style and size of the font * @param [style.fill='black'] {Object} A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - * @param [style.align='left'] {String} An alignment of the multiline text ('left', 'center' or 'right') + * @param [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text * @param [style.stroke='black'] {String} A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used @@ -179,7 +179,7 @@ }; /** - * Updates the transfor of this object + * Updates the transform of this object * * @method updateTransform * @private diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index a4922e6..039dd36 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -143,7 +143,7 @@ /** * Helper function that returns a base texture based on an image url - * If the image is not in the base texture cache it will be created and loaded + * If the image is not in the base texture cache it will be created and loaded * * @static * @method fromImage diff --git a/src/pixi/textures/RenderTexture.js b/src/pixi/textures/RenderTexture.js index 620d198..d32a8be 100644 --- a/src/pixi/textures/RenderTexture.js +++ b/src/pixi/textures/RenderTexture.js @@ -5,7 +5,7 @@ /** A RenderTexture is a special texture that allows any pixi displayObject to be rendered to it. - __Hint__: All DisplayObjects (exmpl. Sprites) that renders on RenderTexture should be preloaded. + __Hint__: All DisplayObjects (exmpl. Sprites) that render on RenderTexture should be preloaded. Otherwise black rectangles will be drawn instead. RenderTexture takes snapshot of DisplayObject passed to render method. If DisplayObject is passed to render method, position and rotation of it will be ignored. For example: diff --git a/src/pixi/utils/Detector.js b/src/pixi/utils/Detector.js index 6fad22f..afe931e 100644 --- a/src/pixi/utils/Detector.js +++ b/src/pixi/utils/Detector.js @@ -4,7 +4,7 @@ /** * This helper function will automatically detect which renderer you should be using. - * WebGL is the preferred renderer as it is a lot fastest. If webGL is not supported by + * WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by * the browser then this function will return a canvas renderer * * @method autoDetectRenderer