Skip to content

Commit

Permalink
Republished docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed Jul 10, 2014
1 parent 43c8a25 commit 4259a9a
Show file tree
Hide file tree
Showing 223 changed files with 16,171 additions and 3,942 deletions.
29 changes: 27 additions & 2 deletions docs/AABB.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1525,8 +1525,33 @@ <h1 class="page-title">Source: physics/ninja/AABB.js</h1>
destroy: function() {
this.body = null;
this.system = null;
}
},

/**
* Render this AABB for debugging purposes.
*
* @method Phaser.Physics.Ninja.AABB#render
* @param {object} context - The context to render to.
* @param {number} xOffset - X offset from AABB's position to render at.
* @param {number} yOffset - Y offset from AABB's position to render at.
* @param {string} color - color of the debug shape to be rendered. (format is css color string).
* @param {boolean} filled - Render the shape as solid (true) or hollow (false).
*/
render: function(context, xOffset, yOffset, color, filled) {
var left = this.pos.x - this.xw - xOffset;
var top = this.pos.y - this.yw - yOffset;

if (filled)
{
context.fillStyle = color;
context.fillRect(left, top, this.width, this.height);
}
else
{
context.strokeStyle = color;
context.strokeRect(left, top, this.width, this.height);
}
}
};
</pre>
</article>
Expand All @@ -1549,7 +1574,7 @@ <h1 class="page-title">Source: physics/ninja/AABB.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Thu Jul 10 2014 20:18:55 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
133 changes: 106 additions & 27 deletions docs/Animation.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
this._frameIndex = 0;

this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);

this._parent.setFrame(this.currentFrame);

// TODO: Double check if required
if (this._parent.__tilePattern)
Expand All @@ -716,6 +717,7 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
}

this._parent.events.onAnimationStart.dispatch(this._parent, this);

this.onStart.dispatch(this._parent, this);

return this;
Expand All @@ -741,6 +743,8 @@ <h1 class="page-title">Source: animation/Animation.js</h1>

this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);

this._parent.setFrame(this.currentFrame);

this.onStart.dispatch(this._parent, this);

},
Expand Down Expand Up @@ -823,6 +827,7 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
if (resetFrame)
{
this.currentFrame = this._frameData.getFrame(this._frames[0]);
this._parent.setFrame(this.currentFrame);
}

if (dispatchComplete)
Expand Down Expand Up @@ -873,7 +878,7 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
return false;
}

if (this.isPlaying === true && this.game.time.now >= this._timeNextFrame)
if (this.isPlaying && this.game.time.now >= this._timeNextFrame)
{
this._frameSkip = 1;

Expand All @@ -886,7 +891,6 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
{
// We need to skip a frame, work out how many
this._frameSkip = Math.floor(this._frameDiff / this.delay);

this._frameDiff -= (this._frameSkip * this.delay);
}

Expand All @@ -901,18 +905,6 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
{
this._frameIndex %= this._frames.length;
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);

if (this.currentFrame)
{
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);

if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
}

this.loopCount++;
this._parent.events.onAnimationLoop.dispatch(this._parent, this);
this.onLoop.dispatch(this._parent, this);
Expand All @@ -922,19 +914,17 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
this.complete();
}
}
else

this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);

if (this.currentFrame)
{
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
this._parent.setFrame(this.currentFrame);

if (this.currentFrame)
if (this._parent.__tilePattern)
{
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);

if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
}

Expand All @@ -945,12 +935,101 @@ <h1 class="page-title">Source: animation/Animation.js</h1>

},

/**
* Advances by the given number of frames in the Animation, taking the loop value into consideration.
*
* @method Phaser.Animation#next
* @param {number} [quantity=1] - The number of frames to advance.
*/
next: function (quantity) {

if (typeof quantity === 'undefined') { quantity = 1; }

var frame = this._frameIndex + quantity;

if (frame >= this._frames.length)
{
if (this.loop)
{
frame %= this._frames.length;
}
else
{
frame = this._frames.length - 1;
}
}

if (frame !== this._frameIndex)
{
this._frameIndex = frame;

this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);

if (this.currentFrame)
{
this._parent.setFrame(this.currentFrame);

if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
}
}

},

/**
* Moves backwards the given number of frames in the Animation, taking the loop value into consideration.
*
* @method Phaser.Animation#previous
* @param {number} [quantity=1] - The number of frames to move back.
*/
previous: function (quantity) {

if (typeof quantity === 'undefined') { quantity = 1; }

var frame = this._frameIndex - quantity;

if (frame &lt; 0)
{
if (this.loop)
{
frame = this._frames.length + frame;
}
else
{
frame++;
}
}

if (frame !== this._frameIndex)
{
this._frameIndex = frame;

this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);

if (this.currentFrame)
{
this._parent.setFrame(this.currentFrame);

if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
}
}

},

/**
* Cleans up this animation ready for deletion. Nulls all values and references.
*
* @method Phaser.Animation#destroy
*/
destroy: function () {

this.game.onPause.remove(this.onPause, this);
this.game.onResume.remove(this.onResume, this);

Expand Down Expand Up @@ -1067,7 +1146,7 @@ <h1 class="page-title">Source: animation/Animation.js</h1>
if (this.currentFrame !== null)
{
this._frameIndex = value;
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
this._parent.setFrame(this.currentFrame);
}

}
Expand Down Expand Up @@ -1180,7 +1259,7 @@ <h1 class="page-title">Source: animation/Animation.js</h1>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Tue May 20 2014 10:05:49 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Thu Jul 10 2014 20:18:55 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
Loading

5 comments on commit 4259a9a

@Clockers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, i find an error executing the following istruction :
this.ship2 = this.add.sprite(this.game.width - marginLeft, heighySet, 'ship2');
this.ship3 = this.add.sprite(this.ship1.body.x + padding, heighySet, 'ship3');
the error is caused the error is caused by this.ship1.body because it is null.
In the last version it ran perfectly.
Thanks to all.

@photonstorm
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd be better off posting this as an Issue, because it will get lost as a comment buried away down on this commit.

@Clockers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how i can post an issue?

@photonstorm
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Clockers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

Please sign in to comment.