diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 0c2a35f..1afce6b 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -359,10 +359,11 @@ * This function is provides a neat way of crawling through the scene graph and running a specified function on all interactive objects it finds. * It will also take care of hit testing the interactive objects and passes the hit across in the function. * - * @param {PIXI.Point} point the point that is tested for collision - * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject the displayObject that will be hit test (recurcsivly crawls its children) - * @param {Function} func the function that will be called on each interactive object. The displayObject and hit will be passed to the function - * @param {boolean} hitTest this indicates if the objects inside should be hit test against the point + * @param point {PIXI.Point} the point that is tested for collision + * @param displayObject {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the displayObject that will be hit test (recurcsivly crawls its children) + * @param [func] {Function} the function that will be called on each interactive object. The displayObject and hit will be passed to the function + * @param [hitTest] {boolean} this indicates if the objects inside should be hit test against the point + * @param [interactive] {boolean} Whether the displayObject is interactive * @return {boolean} returns true if the displayObject hit the point */ InteractionManager.prototype.processInteractive = function (point, displayObject, func, hitTest, interactive) @@ -850,7 +851,7 @@ /** * Grabs an interaction data object from the internal pool * - * @param touchEvent {EventData} The touch event we need to pair with an interactionData object + * @param touchEvent {object} The touch event we need to pair with an interactionData object * * @private */ diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 0c2a35f..1afce6b 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -359,10 +359,11 @@ * This function is provides a neat way of crawling through the scene graph and running a specified function on all interactive objects it finds. * It will also take care of hit testing the interactive objects and passes the hit across in the function. * - * @param {PIXI.Point} point the point that is tested for collision - * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject the displayObject that will be hit test (recurcsivly crawls its children) - * @param {Function} func the function that will be called on each interactive object. The displayObject and hit will be passed to the function - * @param {boolean} hitTest this indicates if the objects inside should be hit test against the point + * @param point {PIXI.Point} the point that is tested for collision + * @param displayObject {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the displayObject that will be hit test (recurcsivly crawls its children) + * @param [func] {Function} the function that will be called on each interactive object. The displayObject and hit will be passed to the function + * @param [hitTest] {boolean} this indicates if the objects inside should be hit test against the point + * @param [interactive] {boolean} Whether the displayObject is interactive * @return {boolean} returns true if the displayObject hit the point */ InteractionManager.prototype.processInteractive = function (point, displayObject, func, hitTest, interactive) @@ -850,7 +851,7 @@ /** * Grabs an interaction data object from the internal pool * - * @param touchEvent {EventData} The touch event we need to pair with an interactionData object + * @param touchEvent {object} The touch event we need to pair with an interactionData object * * @private */ diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 8842e3a..07ca093 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -20,7 +20,7 @@ * ``` * * @class - * @extends PIXI.ResourceLoader + * @extends module:resource-loader.ResourceLoader * @memberof PIXI.loaders * @param [baseUrl=''] {string} The base url for all resources loaded by this loader. * @param [concurrency=10] {number} The number of resources to load concurrently. diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 0c2a35f..1afce6b 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -359,10 +359,11 @@ * This function is provides a neat way of crawling through the scene graph and running a specified function on all interactive objects it finds. * It will also take care of hit testing the interactive objects and passes the hit across in the function. * - * @param {PIXI.Point} point the point that is tested for collision - * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject the displayObject that will be hit test (recurcsivly crawls its children) - * @param {Function} func the function that will be called on each interactive object. The displayObject and hit will be passed to the function - * @param {boolean} hitTest this indicates if the objects inside should be hit test against the point + * @param point {PIXI.Point} the point that is tested for collision + * @param displayObject {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the displayObject that will be hit test (recurcsivly crawls its children) + * @param [func] {Function} the function that will be called on each interactive object. The displayObject and hit will be passed to the function + * @param [hitTest] {boolean} this indicates if the objects inside should be hit test against the point + * @param [interactive] {boolean} Whether the displayObject is interactive * @return {boolean} returns true if the displayObject hit the point */ InteractionManager.prototype.processInteractive = function (point, displayObject, func, hitTest, interactive) @@ -850,7 +851,7 @@ /** * Grabs an interaction data object from the internal pool * - * @param touchEvent {EventData} The touch event we need to pair with an interactionData object + * @param touchEvent {object} The touch event we need to pair with an interactionData object * * @private */ diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 8842e3a..07ca093 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -20,7 +20,7 @@ * ``` * * @class - * @extends PIXI.ResourceLoader + * @extends module:resource-loader.ResourceLoader * @memberof PIXI.loaders * @param [baseUrl=''] {string} The base url for all resources loaded by this loader. * @param [concurrency=10] {number} The number of resources to load concurrently. diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 645bc84..fd60ae2 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -408,7 +408,6 @@ /** * When the texture is updated, this event will fire to update the scale and frame * - * @param event * @private */ Mesh.prototype._onTextureUpdate = function () @@ -419,7 +418,7 @@ /** * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. * - * @param matrix {PIXI.Matrix} the transformation matrix of the sprite + * @param [matrix=this.worldTransform] {PIXI.Matrix} the transformation matrix of the sprite * @return {PIXI.Rectangle} the framing rectangle */ Mesh.prototype.getBounds = function (matrix) diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 0c2a35f..1afce6b 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -359,10 +359,11 @@ * This function is provides a neat way of crawling through the scene graph and running a specified function on all interactive objects it finds. * It will also take care of hit testing the interactive objects and passes the hit across in the function. * - * @param {PIXI.Point} point the point that is tested for collision - * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject the displayObject that will be hit test (recurcsivly crawls its children) - * @param {Function} func the function that will be called on each interactive object. The displayObject and hit will be passed to the function - * @param {boolean} hitTest this indicates if the objects inside should be hit test against the point + * @param point {PIXI.Point} the point that is tested for collision + * @param displayObject {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the displayObject that will be hit test (recurcsivly crawls its children) + * @param [func] {Function} the function that will be called on each interactive object. The displayObject and hit will be passed to the function + * @param [hitTest] {boolean} this indicates if the objects inside should be hit test against the point + * @param [interactive] {boolean} Whether the displayObject is interactive * @return {boolean} returns true if the displayObject hit the point */ InteractionManager.prototype.processInteractive = function (point, displayObject, func, hitTest, interactive) @@ -850,7 +851,7 @@ /** * Grabs an interaction data object from the internal pool * - * @param touchEvent {EventData} The touch event we need to pair with an interactionData object + * @param touchEvent {object} The touch event we need to pair with an interactionData object * * @private */ diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 8842e3a..07ca093 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -20,7 +20,7 @@ * ``` * * @class - * @extends PIXI.ResourceLoader + * @extends module:resource-loader.ResourceLoader * @memberof PIXI.loaders * @param [baseUrl=''] {string} The base url for all resources loaded by this loader. * @param [concurrency=10] {number} The number of resources to load concurrently. diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 645bc84..fd60ae2 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -408,7 +408,6 @@ /** * When the texture is updated, this event will fire to update the scale and frame * - * @param event * @private */ Mesh.prototype._onTextureUpdate = function () @@ -419,7 +418,7 @@ /** * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. * - * @param matrix {PIXI.Matrix} the transformation matrix of the sprite + * @param [matrix=this.worldTransform] {PIXI.Matrix} the transformation matrix of the sprite * @return {PIXI.Rectangle} the framing rectangle */ Mesh.prototype.getBounds = function (matrix) diff --git a/src/mesh/webgl/MeshShader.js b/src/mesh/webgl/MeshShader.js index 29d2862..065300c 100644 --- a/src/mesh/webgl/MeshShader.js +++ b/src/mesh/webgl/MeshShader.js @@ -4,7 +4,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {Shader} TODO: Find a good explanation for this. */ function MeshShader(gl) { diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 0c2a35f..1afce6b 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -359,10 +359,11 @@ * This function is provides a neat way of crawling through the scene graph and running a specified function on all interactive objects it finds. * It will also take care of hit testing the interactive objects and passes the hit across in the function. * - * @param {PIXI.Point} point the point that is tested for collision - * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject the displayObject that will be hit test (recurcsivly crawls its children) - * @param {Function} func the function that will be called on each interactive object. The displayObject and hit will be passed to the function - * @param {boolean} hitTest this indicates if the objects inside should be hit test against the point + * @param point {PIXI.Point} the point that is tested for collision + * @param displayObject {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the displayObject that will be hit test (recurcsivly crawls its children) + * @param [func] {Function} the function that will be called on each interactive object. The displayObject and hit will be passed to the function + * @param [hitTest] {boolean} this indicates if the objects inside should be hit test against the point + * @param [interactive] {boolean} Whether the displayObject is interactive * @return {boolean} returns true if the displayObject hit the point */ InteractionManager.prototype.processInteractive = function (point, displayObject, func, hitTest, interactive) @@ -850,7 +851,7 @@ /** * Grabs an interaction data object from the internal pool * - * @param touchEvent {EventData} The touch event we need to pair with an interactionData object + * @param touchEvent {object} The touch event we need to pair with an interactionData object * * @private */ diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 8842e3a..07ca093 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -20,7 +20,7 @@ * ``` * * @class - * @extends PIXI.ResourceLoader + * @extends module:resource-loader.ResourceLoader * @memberof PIXI.loaders * @param [baseUrl=''] {string} The base url for all resources loaded by this loader. * @param [concurrency=10] {number} The number of resources to load concurrently. diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 645bc84..fd60ae2 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -408,7 +408,6 @@ /** * When the texture is updated, this event will fire to update the scale and frame * - * @param event * @private */ Mesh.prototype._onTextureUpdate = function () @@ -419,7 +418,7 @@ /** * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. * - * @param matrix {PIXI.Matrix} the transformation matrix of the sprite + * @param [matrix=this.worldTransform] {PIXI.Matrix} the transformation matrix of the sprite * @return {PIXI.Rectangle} the framing rectangle */ Mesh.prototype.getBounds = function (matrix) diff --git a/src/mesh/webgl/MeshShader.js b/src/mesh/webgl/MeshShader.js index 29d2862..065300c 100644 --- a/src/mesh/webgl/MeshShader.js +++ b/src/mesh/webgl/MeshShader.js @@ -4,7 +4,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {Shader} TODO: Find a good explanation for this. */ function MeshShader(gl) { diff --git a/src/particles/ParticleContainer.js b/src/particles/ParticleContainer.js index ab7752a..6dad8cb 100644 --- a/src/particles/ParticleContainer.js +++ b/src/particles/ParticleContainer.js @@ -315,7 +315,6 @@ /** * Destroys the container * - * @param [destroyChildren=false] {boolean} if set to true, all the children will have their destroy method called as well */ ParticleContainer.prototype.destroy = function () { core.Container.prototype.destroy.apply(this, arguments); diff --git a/src/accessibility/AccessibilityManager.js b/src/accessibility/AccessibilityManager.js index 3420574..a8e2ae4 100644 --- a/src/accessibility/AccessibilityManager.js +++ b/src/accessibility/AccessibilityManager.js @@ -39,7 +39,7 @@ /** * A simple pool for storing divs. * - * @type {Array} + * @type {*} * @private */ this.pool = []; @@ -55,7 +55,7 @@ /** * Setting this to true will visually show the divs * - * @type {Boolean} + * @type {boolean} */ this.debug = false; @@ -69,7 +69,7 @@ /** * The array of currently active accessible items. * - * @member {Array} + * @member {*[]} * @private */ this.children = []; @@ -83,7 +83,7 @@ /** * stores the state of the manager. If there are no accessible objects or the mouse is moving the will be false. * - * @member {Array} + * @member {*[]} * @private */ this.isActive = false; @@ -142,7 +142,7 @@ /** * This recursive function will run throught he scene graph and add any new accessible objects to the DOM layer. - * @param element {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the DisplayObject to check. + * @param displayObject {PIXI.Container} the DisplayObject to check. * @private */ AccessibilityManager.prototype.updateAccessibleObjects = function(displayObject) @@ -305,20 +305,20 @@ } - if(displayObject.accessibleTitle) + if(displayObject.accessibleTitle) { div.title = displayObject.accessibleTitle; - } - else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) + } + else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { div.title = 'displayObject ' + this.tabIndex; } - if(displayObject.accessibleHint) + if(displayObject.accessibleHint) { - div.setAttribute('aria-label', displayObject.accessibleHint); + div.setAttribute('aria-label', displayObject.accessibleHint); } - + // diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 67b79b9..8f22145 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -316,8 +316,8 @@ /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex {number} The beginning position. Default value is 0. - * @param endIndex {number} The ending position. Default value is size of the container. + * @param [beginIndex=0] {number} The beginning position. + * @param [endIndex=this.children.length] {number} The ending position. Default value is size of the container. */ Container.prototype.removeChildren = function (beginIndex, endIndex) { @@ -478,7 +478,7 @@ this._currentBounds = null; - return this.getBounds( math.Matrix.IDENTITY ); + return this.getBounds(); }; /** @@ -589,7 +589,7 @@ if (this._mask) { - renderer.maskManager.pushMask(this._mask, renderer); + renderer.maskManager.pushMask(this._mask); } this._renderCanvas(renderer); diff --git a/src/core/display/DisplayObject.js b/src/core/display/DisplayObject.js index def3434..782994b 100644 --- a/src/core/display/DisplayObject.js +++ b/src/core/display/DisplayObject.js @@ -335,10 +335,9 @@ * * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix {PIXI.Matrix} * @return {PIXI.Rectangle} the rectangular bounding area */ -DisplayObject.prototype.getBounds = function (matrix) // jshint unused:false +DisplayObject.prototype.getBounds = function () // jshint unused:false { return math.Rectangle.EMPTY; }; diff --git a/src/core/display/ObservablePoint.js b/src/core/display/ObservablePoint.js index dbc2edb..4d65964 100644 --- a/src/core/display/ObservablePoint.js +++ b/src/core/display/ObservablePoint.js @@ -1,10 +1,11 @@ /** - * The Point object represents a location in a two-dimensional coordinate system, where x represents - * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. * * @class * @memberof PIXI - * @param transform {PIXI.Transform} the transform object @mat + * + * @param cb {function} The function to be called when the point changes + * @param scope {*} The scope to be applied to the cb * @param [x=0] {number} position of the point on the x axis * @param [y=0] {number} position of the point on the y axis */ @@ -71,5 +72,5 @@ this._x = x || 0; this._y = y || ( (y !== 0) ? this._x : 0 ); - this.transform._versionLocal++; + this.transform._versionLocal++; // TODO: Pretty sure this doesn't exist. }; diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 764056d..aea7c7b 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -8,8 +8,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function Transform() { diff --git a/src/core/display/TransformStatic.js b/src/core/display/TransformStatic.js index bdfdfdc..fcab61b 100644 --- a/src/core/display/TransformStatic.js +++ b/src/core/display/TransformStatic.js @@ -7,8 +7,6 @@ * * @class * @memberof PIXI - * @param [x=0] {number} position of the point on the x axis - * @param [y=0] {number} position of the point on the y axis */ function TransformStatic() { diff --git a/src/core/graphics/Graphics.js b/src/core/graphics/Graphics.js index 5bdecf4..5e3afa2 100644 --- a/src/core/graphics/Graphics.js +++ b/src/core/graphics/Graphics.js @@ -981,7 +981,7 @@ /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Ellipse|PIXI.math.Polygon|PIXI.math.Rectangle|PIXI.math.RoundedRectangle} The shape object to draw. * @return {PIXI.GraphicsData} The generated GraphicsData object. */ Graphics.prototype.drawShape = function (shape) diff --git a/src/core/graphics/GraphicsData.js b/src/core/graphics/GraphicsData.js index 7fe1176..43a47b2 100644 --- a/src/core/graphics/GraphicsData.js +++ b/src/core/graphics/GraphicsData.js @@ -9,7 +9,7 @@ * @param fillColor {number} the color of the fill * @param fillAlpha {number} the alpha of the fill * @param fill {boolean} whether or not the shape is filled with a colour - * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw. + * @param shape {PIXI.math.Circle|PIXI.math.Rectangle|PIXI.math.Ellipse|PIXI.math.Polygon} The shape object to draw. */ function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape) { diff --git a/src/core/graphics/utils/bezierCurveTo.js b/src/core/graphics/utils/bezierCurveTo.js index 20a31f7..05e27c4 100644 --- a/src/core/graphics/utils/bezierCurveTo.js +++ b/src/core/graphics/utils/bezierCurveTo.js @@ -2,12 +2,15 @@ /** * Calculate the points for a bezier curve and then draws it. * + * @param fromX {number} Starting point x + * @param fromY {number} Starting point y * @param cpX {number} Control point x * @param cpY {number} Control point y * @param cpX2 {number} Second Control point x * @param cpY2 {number} Second Control point y * @param toX {number} Destination point x * @param toY {number} Destination point y + * @param [path=number[]] Path array to push points into * @return {PIXI.Graphics} */ var bezierCurveTo = function (fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, path) // jshint ignore:line diff --git a/src/core/graphics/webgl/WebGLGraphicsData.js b/src/core/graphics/webgl/WebGLGraphicsData.js index d4649b3..0461934 100644 --- a/src/core/graphics/webgl/WebGLGraphicsData.js +++ b/src/core/graphics/webgl/WebGLGraphicsData.js @@ -6,7 +6,9 @@ * * @class * @memberof PIXI - * @param gl {WebGLRenderingContext} the current WebGL drawing context + * @param gl {WebGLRenderingContext} The current WebGL drawing context + * @param shader {PIXI.Shader} The shader + * @param attribsState {object} The state for the VAO * @private */ function WebGLGraphicsData(gl, shader, attribsState) @@ -68,7 +70,7 @@ .addIndex(this.indexBuffer) .addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0) .addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); - + } diff --git a/src/core/graphics/webgl/shaders/PrimitiveShader.js b/src/core/graphics/webgl/shaders/PrimitiveShader.js index 9a1a043..81c1893 100644 --- a/src/core/graphics/webgl/shaders/PrimitiveShader.js +++ b/src/core/graphics/webgl/shaders/PrimitiveShader.js @@ -6,7 +6,7 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {WebGLRenderingContext} The webgl shader manager this shader works for. */ function PrimitiveShader(gl) { diff --git a/src/core/graphics/webgl/utils/buildCircle.js b/src/core/graphics/webgl/utils/buildCircle.js index 238f1ea..22daa8f 100644 --- a/src/core/graphics/webgl/utils/buildCircle.js +++ b/src/core/graphics/webgl/utils/buildCircle.js @@ -6,7 +6,7 @@ * Builds a circle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object to draw + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object to draw * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildCircle = function (graphicsData, webGLData) diff --git a/src/core/graphics/webgl/utils/buildLine.js b/src/core/graphics/webgl/utils/buildLine.js index 5e2b985..d2b9e5b 100644 --- a/src/core/graphics/webgl/utils/buildLine.js +++ b/src/core/graphics/webgl/utils/buildLine.js @@ -5,7 +5,7 @@ * Builds a line to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildLine = function (graphicsData, webGLData) @@ -216,4 +216,4 @@ indices.push(indexStart-1); }; -module.exports = buildLine; \ No newline at end of file +module.exports = buildLine; diff --git a/src/core/graphics/webgl/utils/buildRectangle.js b/src/core/graphics/webgl/utils/buildRectangle.js index 5b3f32b..965e421 100644 --- a/src/core/graphics/webgl/utils/buildRectangle.js +++ b/src/core/graphics/webgl/utils/buildRectangle.js @@ -5,7 +5,7 @@ * Builds a rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRectangle = function (graphicsData, webGLData) @@ -67,4 +67,4 @@ } }; -module.exports = buildRectangle; \ No newline at end of file +module.exports = buildRectangle; diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js index 5d9ff67..c7ac216 100644 --- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js +++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js @@ -6,7 +6,7 @@ * Builds a rounded rectangle to draw * * @private - * @param graphicsData {PIXI.Graphics} The graphics object containing all the necessary properties + * @param graphicsData {PIXI.WebGLGraphicsData} The graphics object containing all the necessary properties * @param webGLData {object} an object containing all the webGL-specific information to create this shape */ var buildRoundedRectangle = function (graphicsData, webGLData) diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index 2313ae3..5d591ee 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -109,7 +109,7 @@ * Creates an array from the current Matrix object. * * @param transpose {boolean} Whether we need to transpose the matrix or not - * @param [out] {Array} If provided the array will be assigned to out + * @param [out=Float32Array[]} If provided the array will be assigned to out * @return {number[]} the newly created array which contains the matrix */ Matrix.prototype.toArray = function (transpose, out) diff --git a/src/core/math/shapes/Polygon.js b/src/core/math/shapes/Polygon.js index 47b2d4e..ab0f950 100644 --- a/src/core/math/shapes/Polygon.js +++ b/src/core/math/shapes/Polygon.js @@ -4,7 +4,7 @@ /** * @class * @memberof PIXI - * @param points {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, + * @param points_ {PIXI.Point[]|number[]|...PIXI.Point|...number} This can be an array of Points that form the polygon, * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the * arguments passed can be flat x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 7c23dce..d7f5731 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -94,7 +94,7 @@ // constructor CanvasRenderer.prototype = Object.create(SystemRenderer.prototype); -CanvasRenderer.prototype.constructor = CanvasRenderer; +CanvasRenderer.prototype.constructor = CanvasRenderer; module.exports = CanvasRenderer; utils.pluginTarget.mixin(CanvasRenderer); @@ -102,7 +102,11 @@ /** * Renders the object to this canvas view * - * @param object {PIXI.DisplayObject} the object to be rendered + * @param displayObject {PIXI.DisplayObject} The object to be rendered + * @param [renderTexture] {PIXI.RenderTexture} A render texture to be rendered to. If unset, it will render to the root context. + * @param [clear=false] {boolean} Whether to clear the canvas before drawing + * @param [transform] {PIXI.Transform} A transformation to be applied + * @param [skipUpdateTransform=false] {boolean} Whether to skip the update transform */ CanvasRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { diff --git a/src/core/renderers/canvas/utils/CanvasMaskManager.js b/src/core/renderers/canvas/utils/CanvasMaskManager.js index 6b5dc23..27ab912 100644 --- a/src/core/renderers/canvas/utils/CanvasMaskManager.js +++ b/src/core/renderers/canvas/utils/CanvasMaskManager.js @@ -17,7 +17,6 @@ * This method adds it to the current stack of masks. * * @param maskData {object} the maskData that will be pushed - * @param renderer {PIXI.WebGLRenderer|PIXI.CanvasRenderer} The renderer context to use. */ CanvasMaskManager.prototype.pushMask = function (maskData) { diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index a30c35b..84aae27 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,6 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas + * @param [resolution=CONST.RESOLUTION] The resolution of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/TextureManager.js b/src/core/renderers/webgl/TextureManager.js index 50bcc6b..a9cbe77 100644 --- a/src/core/renderers/webgl/TextureManager.js +++ b/src/core/renderers/webgl/TextureManager.js @@ -29,7 +29,7 @@ /** * Track textures in the renderer so we can no longer listen to them on destruction. * - * @member {array} + * @member {*[]} * @private */ this._managedTextures = []; @@ -139,6 +139,7 @@ * Deletes the texture from WebGL * * @param texture {PIXI.BaseTexture|PIXI.Texture} the texture to destroy + * @param [_skipRemove=false] {boolean} Whether to skip removing the texture from the TextureManager. */ TextureManager.prototype.destroyTexture = function(texture, _skipRemove) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 4073017..41db39a 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -84,7 +84,7 @@ /** * Manages the stencil buffer. * - * @member {PIXI.StencilManager} + * @member {StencilManager} */ this.stencilManager = new StencilManager(this); @@ -117,7 +117,7 @@ /** * The currently active ObjectRenderer. * - * @member {PIXI.WebGLState} + * @member {WebGLState} */ this.state = new WebGLState(this.gl); @@ -194,11 +194,11 @@ /** * Renders the object to its webGL view * - * @param object {PIXI.DisplayObject} the object to be rendered - * @param renderTexture {PIXI.renderTexture} - * @param clear {Boolean} + * @param displayObject {PIXI.DisplayObject} the object to be rendered + * @param renderTexture {PIXI.RenderTexture} + * @param clear {boolean} * @param transform {PIXI.Transform} - * @param skipUpdateTransform {Boolean} + * @param skipUpdateTransform {boolean} */ WebGLRenderer.prototype.render = function (displayObject, renderTexture, clear, transform, skipUpdateTransform) { @@ -314,7 +314,7 @@ /** * Erases the active render target and fills the drawing area with a colour * - * @param clearColor {number} The colour + * @param [clearColor] {number} The colour */ WebGLRenderer.prototype.clear = function (clearColor) { diff --git a/src/core/renderers/webgl/WebGLState.js b/src/core/renderers/webgl/WebGLState.js index cc76ad0..003efc1 100755 --- a/src/core/renderers/webgl/WebGLState.js +++ b/src/core/renderers/webgl/WebGLState.js @@ -35,7 +35,7 @@ /** * The stack holding all the different states * - * @member {array} + * @member {*[]} * @private */ this.stack = []; diff --git a/src/core/renderers/webgl/filters/Filter.js b/src/core/renderers/webgl/filters/Filter.js index 16b2cec..755ea02 100644 --- a/src/core/renderers/webgl/filters/Filter.js +++ b/src/core/renderers/webgl/filters/Filter.js @@ -7,10 +7,8 @@ * @class * @memberof PIXI * @extends PIXI.Shader - * @param shaderManager {PIXI.ShaderManager} The webgl shader manager this shader works for. * @param [vertexSrc] {string} The source of the vertex shader. - * @param [fragmentSrc] {string} The source of the fragment shader. - * @param [customUniforms] {object} Custom uniforms to use to augment the built-in ones. + * @param [uniforms] {object} Custom uniforms to use to augment the built-in ones. * @param [fragmentSrc] {string} The source of the fragment shader. */ function Filter(vertexSrc, fragmentSrc, uniforms) diff --git a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js index 6666aa1..cd1edfc 100644 --- a/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js +++ b/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js @@ -21,7 +21,7 @@ ); sprite.renderable = false; - + this.maskSprite = sprite; this.maskMatrix = maskMatrix; } @@ -33,14 +33,14 @@ /** * Applies the filter * - * @param renderer {PIXI.WebGLRenderer} The renderer to retrieve the filter from + * @param filterManager {PIXI.FilterManager} The renderer to retrieve the filter from * @param input {PIXI.RenderTarget} * @param output {PIXI.RenderTarget} */ SpriteMaskFilter.prototype.apply = function (filterManager, input, output) { var maskSprite = this.maskSprite; - + this.uniforms.mask = maskSprite._texture; this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite ); this.uniforms.alpha = maskSprite.worldAlpha; diff --git a/src/core/renderers/webgl/managers/BlendModeManager.js b/src/core/renderers/webgl/managers/BlendModeManager.js index 0112a9d..5c9eca9 100644 --- a/src/core/renderers/webgl/managers/BlendModeManager.js +++ b/src/core/renderers/webgl/managers/BlendModeManager.js @@ -3,7 +3,7 @@ /** * @class * @memberof PIXI - * @extends PIXI.WebGlManager + * @extends PIXI.WebGLManager * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function BlendModeManager(renderer) diff --git a/src/core/renderers/webgl/managers/MaskManager.js b/src/core/renderers/webgl/managers/MaskManager.js index d586cdc..b979ff6 100644 --- a/src/core/renderers/webgl/managers/MaskManager.js +++ b/src/core/renderers/webgl/managers/MaskManager.js @@ -25,8 +25,8 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.pushMask = function (target, maskData) { @@ -65,8 +65,8 @@ /** * Removes the last mask from the mask stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param target {PIXI.DisplayObject} + * @param maskData {*[]} */ MaskManager.prototype.popMask = function (target, maskData) { @@ -92,7 +92,7 @@ * Applies the Mask and adds it to the current filter stack. * * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {PIXI.Sprite} */ MaskManager.prototype.pushSpriteMask = function (target, maskData) { @@ -127,8 +127,7 @@ /** * Applies the Mask and adds it to the current filter stack. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} + * @param maskData {*[]} */ MaskManager.prototype.pushStencilMask = function (maskData) { @@ -139,8 +138,6 @@ /** * Removes the last filter from the filter stack and doesn't return it. * - * @param target {PIXI.RenderTarget} - * @param maskData {any[]} */ MaskManager.prototype.popStencilMask = function () { diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 815cbc8..0067f78 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -18,7 +18,7 @@ /** * Changes the mask stack that is used by this manager. * - * @param stencilMaskStack {PIXI.StencilMaskStack} The mask stack + * @param stencilMaskStack {PIXI.Graphics[]} The mask stack */ StencilMaskManager.prototype.setMaskStack = function ( stencilMaskStack ) { @@ -40,7 +40,6 @@ * Applies the Mask and adds it to the current filter stack. @alvin * * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.pushStencil = function (graphics) { @@ -72,8 +71,6 @@ /** * TODO @alvin - * @param graphics {PIXI.Graphics} - * @param webGLData {any[]} */ StencilMaskManager.prototype.popStencil = function () { diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index 32c138c..678261f 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -7,6 +7,7 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} The gl context for this quad to use. + * @param state {object} TODO: Description */ function Quad(gl, state) { @@ -88,8 +89,8 @@ /** * Maps two Rectangle to the quad - * @param rect {PIXI.Rectangle} the first rectangle - * @param rect2 {PIXI.Rectangle} the second rectangle + * @param targetTextureFrame {PIXI.Rectangle} the first rectangle + * @param destinationFrame {PIXI.Rectangle} the second rectangle */ Quad.prototype.map = function(targetTextureFrame, destinationFrame) { diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index 1fe56fe..d8349cf 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -10,11 +10,11 @@ * @class * @memberof PIXI * @param gl {WebGLRenderingContext} the current WebGL drawing context - * @param width {number} the horizontal range of the filter - * @param height {number} the vertical range of the filter - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the current resolution - * @param root {boolean} Whether this object is the root element or not + * @param [width=0] {number} the horizontal range of the filter + * @param [height=0] {number} the vertical range of the filter + * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) { @@ -32,7 +32,7 @@ /** * A frame buffer * - * @member {WebGLFrameBuffer} + * @member {glCore.GLFramebuffer} */ this.frameBuffer = null; @@ -46,7 +46,7 @@ /** * The background colour of this render target, as an array of [r,g,b,a] values * - * @member {array} + * @member {number[]} */ this.clearColor = [0, 0, 0, 0]; @@ -88,7 +88,7 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.defaultFrame = new math.Rectangle(); this.destinationFrame = null; @@ -97,14 +97,14 @@ /** * The stencil buffer stores masking data for the render target * - * @member {WebGLRenderBuffer} + * @member {glCore.GLBuffer} */ this.stencilBuffer = null; /** * The data structure for the stencil masks * - * @member {PIXI.StencilMaskStack} + * @member {PIXI.Graphics[]} */ this.stencilMaskStack = []; @@ -179,7 +179,7 @@ /** * Clears the filter texture. * - * @param [bind=false] {boolean} Should we bind our framebuffer before clearing? + * @param [clearColor=this.clearColor] {number[]} Array of [r,g,b,a] to clear the framebuffer */ RenderTarget.prototype.clear = function(clearColor) { diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index b8df3ae..c2890f3 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -448,8 +448,6 @@ * * @static * @param frameId {string} The frame Id of the texture in the cache - * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter - * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId */ Sprite.fromFrame = function (frameId) @@ -470,6 +468,8 @@ * * @static * @param imageId {string} The image url of the texture + * @param [crossorigin=(auto)] {boolean} if you want to specify the cross-origin parameter + * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} if you want to specify the scale mode, see {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id */ Sprite.fromImage = function (imageId, crossorigin, scaleMode) diff --git a/src/core/sprites/canvas/CanvasTinter.js b/src/core/sprites/canvas/CanvasTinter.js index 009567d..9642499 100644 --- a/src/core/sprites/canvas/CanvasTinter.js +++ b/src/core/sprites/canvas/CanvasTinter.js @@ -206,21 +206,21 @@ /** * Number of steps which will be used as a cap when rounding colors. * - * @member + * @member CanvasTinter */ CanvasTinter.cacheStepsPerColorChannel = 8; /** * Tint cache boolean flag. * - * @member + * @member CanvasTinter */ CanvasTinter.convertTintToImage = false; /** * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. * - * @member + * @member CanvasTinter */ CanvasTinter.canUseMultiply = canUseNewCanvasBlendModes(); diff --git a/src/core/sprites/webgl/SpriteRenderer.js b/src/core/sprites/webgl/SpriteRenderer.js index f8e7bca..854f5f1 100644 --- a/src/core/sprites/webgl/SpriteRenderer.js +++ b/src/core/sprites/webgl/SpriteRenderer.js @@ -99,7 +99,6 @@ * Sets up the renderer context and necessary buffers. * * @private - * @param gl {WebGLRenderingContext} the current WebGL drawing context */ SpriteRenderer.prototype.onContextChange = function () { diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ca9d118..27d1fa9 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -410,7 +410,7 @@ while (index < text.length) { current = characters[index++]; - if (isStroke) + if (isStroke) { this.context.strokeText(current, currentPosition, y); } @@ -612,21 +612,21 @@ for (var j = 0; j < words.length; j++) { var wordWidth = this.context.measureText(words[j]).width; - if (this._style.breakWords && wordWidth > wordWrapWidth) + if (this._style.breakWords && wordWidth > wordWrapWidth) { // Word should be split in the middle var characters = words[j].split(''); - for (var c = 0; c < characters.length; c++) + for (var c = 0; c < characters.length; c++) { var characterWidth = this.context.measureText(characters[c]).width; - if (characterWidth > spaceLeft) + if (characterWidth > spaceLeft) { result += '\n' + characters[c]; spaceLeft = wordWrapWidth - characterWidth; - } - else + } + else { - if (c === 0) + if (c === 0) { result += ' '; } @@ -635,7 +635,7 @@ } } } - else + else { var wordWidthWithSpace = wordWidth + this.context.measureText(' ').width; if (j === 0 || wordWidthWithSpace > spaceLeft) diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index 50fff25..fb5ce06 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -87,7 +87,6 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? */ BaseRenderTexture.prototype.resize = function (width, height) { @@ -119,7 +118,6 @@ /** * Destroys this texture * - * @param destroyBase {boolean} Whether to destroy the base texture as well */ BaseRenderTexture.prototype.destroy = function () { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index b45189b..5c6006e 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -9,9 +9,9 @@ * * @class * @memberof PIXI - * @param source {Image|Canvas} the source object of the texture. + * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param resolution {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios */ function BaseTexture(source, scaleMode, resolution) { @@ -26,7 +26,7 @@ * * @member {number} */ - this.resolution = resolution || 1; + this.resolution = resolution || CONST.RESOLUTION; /** * The width of the base texture set when the image has loaded @@ -97,7 +97,7 @@ * * TODO: Make this a setter that calls loadSource(); * - * @member {Image|Canvas} + * @member {Image|HTMLCanvasElement} * @readonly */ this.source = null; // set in loadSource, if at all @@ -220,7 +220,7 @@ * } * * @protected - * @param source {Image|Canvas} the source object of the texture. + * @param source {Image|HTMLCanvasElement} the source object of the texture. */ BaseTexture.prototype.loadSource = function (source) { @@ -424,7 +424,7 @@ * Helper function that creates a base texture from the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture + * @param canvas {HTMLCanvasElement} The canvas element source of the texture * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values * @return PIXI.BaseTexture */ diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 094a3c6..72675f7 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -38,6 +38,7 @@ * @extends PIXI.Texture * @memberof PIXI * @param baseRenderTexture {PIXI.BaseRenderTexture} The renderer used for this RenderTexture + * @param [frame] {PIXI.Rectangle} The rectangle frame of the texture to show */ function RenderTexture(baseRenderTexture, frame) { @@ -87,7 +88,7 @@ * * @param width {number} The width to resize to. * @param height {number} The height to resize to. - * @param updateBase {boolean} Should the baseTexture.width and height values be resized as well? + * @param doNotResizeBaseTexture {boolean} Should the baseTexture.width and height values be resized as well? */ RenderTexture.prototype.resize = function (width, height, doNotResizeBaseTexture) { diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 1990cf9..6800089 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -309,7 +309,7 @@ /** * Updates the internal WebGL UV cache. * - * @private + * @protected */ Texture.prototype._updateUvs = function () { @@ -327,8 +327,8 @@ * * @static * @param imageUrl {string} The image url of the texture - * @param crossorigin {boolean} Whether requests should be treated as crossorigin - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [crossorigin] {boolean} Whether requests should be treated as crossorigin + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} The newly created texture */ Texture.fromImage = function (imageUrl, crossorigin, scaleMode) @@ -368,8 +368,8 @@ * Helper function that creates a new Texture based on the given canvas element. * * @static - * @param canvas {Canvas} The canvas element source of the texture - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param canvas {HTMLCanvasElement} The canvas element source of the texture + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} */ Texture.fromCanvas = function (canvas, scaleMode) @@ -381,8 +381,8 @@ * Helper function that creates a new Texture based on the given video element. * * @static - * @param video {HTMLVideoElement} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param video {HTMLVideoElement|string} The URL or actual element of the video + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideo = function (video, scaleMode) @@ -402,7 +402,7 @@ * * @static * @param videoUrl {string} - * @param scaleMode {number} See {@link PIXI.SCALE_MODES} for possible values + * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values * @return {PIXI.Texture} A Texture */ Texture.fromVideoUrl = function (videoUrl, scaleMode) diff --git a/src/core/ticker/Ticker.js b/src/core/ticker/Ticker.js index ffc4ea3..0285734 100644 --- a/src/core/ticker/Ticker.js +++ b/src/core/ticker/Ticker.js @@ -141,7 +141,6 @@ * {@link PIXI.ticker.Ticker#speed}, which is specific * to scaling {@link PIXI.ticker.Ticker#deltaTime}. * - * @member * @memberof PIXI.ticker.Ticker# * @readonly */ @@ -160,7 +159,6 @@ * When setting this property it is clamped to a value between * `0` and `PIXI.TARGET_FPMS * 1000`. * - * @member * @memberof PIXI.ticker.Ticker# * @default 10 */ diff --git a/src/core/utils/determineCrossOrigin.js b/src/core/utils/determineCrossOrigin.js index e80c9bd..0761753 100644 --- a/src/core/utils/determineCrossOrigin.js +++ b/src/core/utils/determineCrossOrigin.js @@ -8,7 +8,7 @@ * Nipped from the resource loader! * @private * @param url {string} The url to test. - * @param [location=window.location] {object} The location object to test against. + * @param loc [location=window.location] {object} The location object to test against. * @return {string} The crossOrigin value to use (or empty string for none). */ var determineCrossOrigin = function (url, loc) { @@ -40,4 +40,4 @@ return ''; }; -module.exports = determineCrossOrigin; \ No newline at end of file +module.exports = determineCrossOrigin; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index ed6e552..2fd81ef 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -172,7 +172,7 @@ /** * removeItems * - * @param {array} arr The target array + * @param {*[]} arr The target array * @param {number} startIdx The index to begin removing from (inclusive) * @param {number} removeCount How many items to remove */ diff --git a/src/core/utils/pluginTarget.js b/src/core/utils/pluginTarget.js index 77fe44b..f68740c 100644 --- a/src/core/utils/pluginTarget.js +++ b/src/core/utils/pluginTarget.js @@ -59,7 +59,7 @@ /** * Mixes in the properties of the pluginTarget into another object * - * @param object {object} The obj to mix into + * @param obj {object} The obj to mix into */ mixin: function mixin(obj) { diff --git a/src/extract/canvas/CanvasExtract.js b/src/extract/canvas/CanvasExtract.js index d8a37f4..cf80d97 100644 --- a/src/extract/canvas/CanvasExtract.js +++ b/src/extract/canvas/CanvasExtract.js @@ -95,7 +95,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ WebGLExtract.prototype.pixels = function ( renderTexture ) diff --git a/src/extract/webgl/WebGLExtract.js b/src/extract/webgl/WebGLExtract.js index e3d041f..bc39486 100644 --- a/src/extract/webgl/WebGLExtract.js +++ b/src/extract/webgl/WebGLExtract.js @@ -125,7 +125,7 @@ /** * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included). - * @param target {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer + * @param renderTexture {PIXI.DisplayObject|PIXI.RenderTexture} A displayObject or renderTexture to convert. If left empty will use use the main renderer * @return {Uint8ClampedArray} */ Extract.prototype.pixels = function ( renderTexture ) diff --git a/src/extras/BitmapText.js b/src/extras/BitmapText.js index 42ae05c..041e39c 100644 --- a/src/extras/BitmapText.js +++ b/src/extras/BitmapText.js @@ -162,7 +162,7 @@ /** * The font descriptor of the BitmapText object * - * @member {Font} + * @member {string|object} * @memberof PIXI.extras.BitmapText# */ font: { diff --git a/src/extras/MovieClip.js b/src/extras/MovieClip.js index 4c5369f..b7ae916 100644 --- a/src/extras/MovieClip.js +++ b/src/extras/MovieClip.js @@ -1,5 +1,4 @@ var core = require('../core'); - /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * @@ -16,12 +15,15 @@ * var mc = new PIXI.MovieClip(textureArray); * ``` * + * @typedef FrameObject + * @type {object} + * @property texture {PIXI.Texture} The {@link PIXI.Texture} of the frame + * @property time {number} the duration of the frame in ms + * * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param textures {PIXI.Texture[]|Object[]} an array of {@link PIXI.Texture} or frame objects that make up the animation - * @param textures[].texture {PIXI.Texture} the {@link PIXI.Texture} of the frame - * @param textures[].time {number} the duration of the frame in ms + * @param textures {PIXI.Texture[]|FrameObject[]} an array of {@link PIXI.Texture} or frame objects that make up the animation */ function MovieClip(textures) { @@ -316,4 +318,4 @@ } return new MovieClip(textures); -}; \ No newline at end of file +}; diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 5cf17d0..bd7ea14 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -9,7 +9,7 @@ * @class * @extends PIXI.Sprite * @memberof PIXI.extras - * @param texture {Texture} the texture of the tiling sprite + * @param texture {PIXI.Texture} the texture of the tiling sprite * @param width {number} the width of the tiling sprite * @param height {number} the height of the tiling sprite */ diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index eb33116..a6cf681 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -133,7 +133,7 @@ // this renderTexture will be used to store the cached DisplayObject - var renderTexture = new core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); // need to set // var m = _tempMatrix; diff --git a/src/extras/webgl/TilingShader.js b/src/extras/webgl/TilingShader.js index 4be2d40..19b33b6 100644 --- a/src/extras/webgl/TilingShader.js +++ b/src/extras/webgl/TilingShader.js @@ -5,7 +5,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {PIXI.Shader} The WebGL shader manager this shader works for. */ function TilingShader(gl) { diff --git a/src/filters/colormatrix/ColorMatrixFilter.js b/src/filters/colormatrix/ColorMatrixFilter.js index fd6639c..1518690 100644 --- a/src/filters/colormatrix/ColorMatrixFilter.js +++ b/src/filters/colormatrix/ColorMatrixFilter.js @@ -233,8 +233,8 @@ * Set the saturation matrix, increase the separation between colors * Increase saturation : increase contrast, brightness, and sharpness * - * @param amount {number} - * @param multiply {boolean} refer to ._loadMatrix() method + * @param [amount=0] {number} + * @param [multiply] {boolean} refer to ._loadMatrix() method */ ColorMatrixFilter.prototype.saturate = function (amount, multiply) { @@ -256,9 +256,8 @@ * * Call the saturate function * - * @param multiply {boolean} refer to ._loadMatrix() method */ -ColorMatrixFilter.prototype.desaturate = function (multiply) // jshint unused:false +ColorMatrixFilter.prototype.desaturate = function () // jshint unused:false { this.saturate(-1); }; diff --git a/src/filters/displacement/DisplacementFilter.js b/src/filters/displacement/DisplacementFilter.js index 079077c..aa18fda 100644 --- a/src/filters/displacement/DisplacementFilter.js +++ b/src/filters/displacement/DisplacementFilter.js @@ -9,7 +9,8 @@ * @class * @extends PIXI.Filter * @memberof PIXI.filters - * @param sprite {PIXI.Sprite} the sprite used for the displacement map. (make sure its added to the scene!) + * @param sprite {PIXI.Sprite} The sprite used for the displacement map. (make sure its added to the scene!) + * @param scale {number} The scale of the displacement */ function DisplacementFilter(sprite, scale) { diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 0c2a35f..1afce6b 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -359,10 +359,11 @@ * This function is provides a neat way of crawling through the scene graph and running a specified function on all interactive objects it finds. * It will also take care of hit testing the interactive objects and passes the hit across in the function. * - * @param {PIXI.Point} point the point that is tested for collision - * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject the displayObject that will be hit test (recurcsivly crawls its children) - * @param {Function} func the function that will be called on each interactive object. The displayObject and hit will be passed to the function - * @param {boolean} hitTest this indicates if the objects inside should be hit test against the point + * @param point {PIXI.Point} the point that is tested for collision + * @param displayObject {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} the displayObject that will be hit test (recurcsivly crawls its children) + * @param [func] {Function} the function that will be called on each interactive object. The displayObject and hit will be passed to the function + * @param [hitTest] {boolean} this indicates if the objects inside should be hit test against the point + * @param [interactive] {boolean} Whether the displayObject is interactive * @return {boolean} returns true if the displayObject hit the point */ InteractionManager.prototype.processInteractive = function (point, displayObject, func, hitTest, interactive) @@ -850,7 +851,7 @@ /** * Grabs an interaction data object from the internal pool * - * @param touchEvent {EventData} The touch event we need to pair with an interactionData object + * @param touchEvent {object} The touch event we need to pair with an interactionData object * * @private */ diff --git a/src/loaders/loader.js b/src/loaders/loader.js index 8842e3a..07ca093 100644 --- a/src/loaders/loader.js +++ b/src/loaders/loader.js @@ -20,7 +20,7 @@ * ``` * * @class - * @extends PIXI.ResourceLoader + * @extends module:resource-loader.ResourceLoader * @memberof PIXI.loaders * @param [baseUrl=''] {string} The base url for all resources loaded by this loader. * @param [concurrency=10] {number} The number of resources to load concurrently. diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 645bc84..fd60ae2 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -408,7 +408,6 @@ /** * When the texture is updated, this event will fire to update the scale and frame * - * @param event * @private */ Mesh.prototype._onTextureUpdate = function () @@ -419,7 +418,7 @@ /** * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. * - * @param matrix {PIXI.Matrix} the transformation matrix of the sprite + * @param [matrix=this.worldTransform] {PIXI.Matrix} the transformation matrix of the sprite * @return {PIXI.Rectangle} the framing rectangle */ Mesh.prototype.getBounds = function (matrix) diff --git a/src/mesh/webgl/MeshShader.js b/src/mesh/webgl/MeshShader.js index 29d2862..065300c 100644 --- a/src/mesh/webgl/MeshShader.js +++ b/src/mesh/webgl/MeshShader.js @@ -4,7 +4,7 @@ * @class * @extends PIXI.Shader * @memberof PIXI.mesh - * @param shaderManager {PIXI.ShaderManager} The WebGL shader manager this shader works for. + * @param gl {Shader} TODO: Find a good explanation for this. */ function MeshShader(gl) { diff --git a/src/particles/ParticleContainer.js b/src/particles/ParticleContainer.js index ab7752a..6dad8cb 100644 --- a/src/particles/ParticleContainer.js +++ b/src/particles/ParticleContainer.js @@ -315,7 +315,6 @@ /** * Destroys the container * - * @param [destroyChildren=false] {boolean} if set to true, all the children will have their destroy method called as well */ ParticleContainer.prototype.destroy = function () { core.Container.prototype.destroy.apply(this, arguments); diff --git a/src/particles/webgl/ParticleShader.js b/src/particles/webgl/ParticleShader.js index 950e612..59814ca 100644 --- a/src/particles/webgl/ParticleShader.js +++ b/src/particles/webgl/ParticleShader.js @@ -2,9 +2,9 @@ /** * @class - * @extends PIXI.TextureShader + * @extends PIXI.Shader * @memberof PIXI - * @param shaderManager {ShaderManager} The webgl shader manager this shader works for. + * @param gl {PIXI.Shader} The webgl shader manager this shader works for. */ function ParticleShader(gl) {