From bc02a1a05e03cfe23e853fd5cca686b2ceaf3c12 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 23 Sep 2013 01:06:09 +0100 Subject: [PATCH 001/125] Fixing collision issues --- examples/assets/misc/feedback.png | Bin 0 -> 2370 bytes examples/collision/sprite vs group.php | 9 ++- examples/games/invaders.php | 22 +++---- examples/head.php | 9 ++- src/core/Game.js | 2 + src/core/World.js | 24 +++++++ src/gameobjects/Sprite.js | 36 +++-------- src/physics/arcade/ArcadePhysics.js | 10 +-- src/physics/arcade/Body.js | 84 ++++++++++++++++--------- src/sound/Sound.js | 2 + 10 files changed, 118 insertions(+), 80 deletions(-) create mode 100644 examples/assets/misc/feedback.png diff --git a/examples/assets/misc/feedback.png b/examples/assets/misc/feedback.png new file mode 100644 index 0000000000000000000000000000000000000000..92df51b74734535be2e2d2203448a4f3aa2143a1 GIT binary patch literal 2370 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i0*Z)=h^hlA$r9IylHmNblJdl&R0hYC z{G?O`&)mfH)S%SFl*+=BsWuD@98Wx5978H@y}7ZGm%)&SdE9AopXp4!a_dCkc9;R7J2b#SBCw zlaLg_0v_scf{Kts1Q=)7O(IzlQm_FXj^rj}laLf41shP5up*=gz?~>aRYdFfMhaU{ zv>;iBJ(e62W-@?t4m5O-^y3Ioq9PC}*hk|AmSK^?mdLmvA_9?O31mL@SVmHWobG87 zm4hO_kqmD*<@^CRcXofU6pdpH6CsI^niN%;~ZUcrnUA*fmrPBTb8$}GBu6{1-oD!M< Dg+^b; literal 0 HcmV?d00001 diff --git a/examples/collision/sprite vs group.php b/examples/collision/sprite vs group.php index 7ba31e37..e061c608 100644 --- a/examples/collision/sprite vs group.php +++ b/examples/collision/sprite vs group.php @@ -7,7 +7,7 @@ (function () { - var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); + var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render }); function preload() { @@ -88,6 +88,13 @@ } + function render () { + + game.debug.renderQuadTree(game.physics.quadTree); + + } + + })(); diff --git a/examples/games/invaders.php b/examples/games/invaders.php index 0499acff..89c913a3 100644 --- a/examples/games/invaders.php +++ b/examples/games/invaders.php @@ -23,8 +23,6 @@ var bullets; var bulletTime = 0; - var pickle; - function create() { player = game.add.sprite(400, 500, 'ship'); @@ -36,13 +34,12 @@ { for (var x = 0; x < 10; x++) { - aliens.create(170 + x * 48, 100 + y * 50, 'alien'); + aliens.create(x * 48, y * 50, 'alien'); } } - // Shows off a known bug: - // aliens.x = 100; - // aliens.y = 50; + aliens.x = 100; + aliens.y = 50; bullets = game.add.group(null, 'bullets'); @@ -52,18 +49,15 @@ b.name = 'bullet' + i; b.exists = false; b.visible = false; + b.anchor.setTo(0.5, 1); b.events.onOutOfBounds.add(resetBullet, this); } - // Shows off a known bug: - // var tween = game.add.tween(aliens).to({x: 200}, 3000, Phaser.Easing.Linear.None, true, 0, 1000, true); - // tween.onComplete.add(descend, this); + var tween = game.add.tween(aliens).to({x: 200}, 3000, Phaser.Easing.Linear.None, true, 0, 1000, true); + tween.onComplete.add(descend, this); } - function overAlien () { - console.log('over pickle'); - } function descend() { aliens.y += 10; @@ -100,7 +94,7 @@ if (bullet) { - bullet.reset(player.x + 6, player.y - 8); + bullet.reset(player.x, player.y - 8); bullet.velocity.y = -300; bulletTime = game.time.now + 250; } @@ -122,7 +116,7 @@ function render () { - aliens.forEach(renderBounds, this); + // aliens.forEach(renderBounds, this); game.debug.renderQuadTree(game.physics.quadTree); diff --git a/examples/head.php b/examples/head.php index fd873fd7..4121f0e6 100644 --- a/examples/head.php +++ b/examples/head.php @@ -9,9 +9,12 @@ if (isset($mobile)) { - ?> - - '; + } + + if (isset($css)) + { + echo " "; } ?> diff --git a/src/core/Game.js b/src/core/Game.js index 41c63da7..7f14380f 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -391,6 +391,8 @@ Phaser.Game.prototype = { this.state.update(); this.plugins.update(); + this.world.postUpdate(); + this.renderer.render(this.stage._stage); this.plugins.render(); this.state.render(); diff --git a/src/core/World.js b/src/core/World.js index 4fbbd8c6..5f100a6d 100644 --- a/src/core/World.js +++ b/src/core/World.js @@ -112,6 +112,30 @@ Phaser.World.prototype = { }, + /** + * This is called automatically every frame, and is where main logic happens. + * @method update + */ + postUpdate: function () { + + if (this.game.stage._stage.first._iNext) + { + var currentNode = this.game.stage._stage.first._iNext; + + do + { + if (currentNode['postUpdate']) + { + currentNode.postUpdate(); + } + + currentNode = currentNode._iNext; + } + while (currentNode != this.game.stage._stage.last._iNext) + } + + }, + /** * Updates the size of this world. * @method setSize diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index d3fdb6df..160fc8f1 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -210,17 +210,8 @@ Phaser.Sprite.prototype.preUpdate = function() { this._cache.dirty = true; } - this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); - this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); - - // If this sprite or the camera have moved then let's update everything - // Note: The actual position shouldn't be changed if this item is inside a Group? - if (this.position.x != this._cache.x || this.position.y != this._cache.y) - { - this.position.x = this._cache.x; - this.position.y = this._cache.y; - this._cache.dirty = true; - } + // this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + // this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); if (this.visible) { @@ -281,21 +272,6 @@ Phaser.Sprite.prototype.preUpdate = function() { this.updateBounds(); } - // } - // else - // { - // We still need to work out the bounds in case the camera has moved - // but we can't use the local or worldTransform to do it, as Pixi resets that if a Sprite is invisible. - // So we'll compare against the cached state + new position. - // if (this._cache.dirty && this.visible == false) - // { - // this.bounds.x -= this._cache.boundsX - this._cache.x; - // this._cache.boundsX = this._cache.x; - - // this.bounds.y -= this._cache.boundsY - this._cache.y; - // this._cache.boundsY = this._cache.y; - // } - // } // Re-run the camera visibility check if (this._cache.dirty) @@ -312,7 +288,7 @@ Phaser.Sprite.prototype.preUpdate = function() { this.body.updateBounds(this.center.x, this.center.y, this._cache.scaleX, this._cache.scaleY); } - this.body.update(); + this.body.preUpdate(); } @@ -320,7 +296,13 @@ Phaser.Sprite.prototype.postUpdate = function() { if (this.exists) { + // The sprite is positioned in this call, after taking into consideration motion updates and collision this.body.postUpdate(); + + this.position.x -= (this.game.world.camera.x * this.scrollFactor.x); + this.position.y -= (this.game.world.camera.y * this.scrollFactor.y); + this.x -= (this.game.world.camera.x * this.scrollFactor.x); + this.y -= (this.game.world.camera.y * this.scrollFactor.y); } } diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 7db7a380..6cba4a13 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -380,11 +380,11 @@ Phaser.Physics.Arcade.prototype = { this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); - if (this._result) - { - body1.postUpdate(); - body2.postUpdate(); - } + // if (this._result) + // { + // body1.postUpdate(); + // body2.postUpdate(); + // } }, diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index d961946e..d2aac936 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -7,6 +7,8 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.x = sprite.x; this.y = sprite.y; + this.preX = sprite.x; + this.preY = sprite.y; this.lastX = sprite.x; this.lastY = sprite.y; @@ -82,7 +84,7 @@ Phaser.Physics.Arcade.Body.prototype = { }, - update: function () { + preUpdate: function () { // Store and reset collision flags this.wasTouching.none = this.touching.none; @@ -97,13 +99,16 @@ Phaser.Physics.Arcade.Body.prototype = { this.touching.left = false; this.touching.right = false; - this.lastX = this.x; - this.lastY = this.y; + this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; + this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; this.rotation = this.sprite.angle; + this.x = this.preX; + this.y = this.preY; + // There is a bug here in that the worldTransform values are what should be used, otherwise the quadTree gets the wrong rect given to it - this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; - this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; + // this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; + // this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; // this.x = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; // this.y = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; @@ -124,20 +129,6 @@ Phaser.Physics.Arcade.Body.prototype = { this.game.physics.quadTree.insert(this); } - if (this.deltaX() != 0) - { - this.sprite.x -= this.deltaX(); - } - - if (this.deltaY() != 0) - { - this.sprite.y -= this.deltaY(); - } - - // Adjust the sprite based on all of the above, so the x/y coords will be correct going into the State update - this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); - this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); - if (this.allowRotation) { this.sprite.angle = this.rotation; @@ -147,14 +138,43 @@ Phaser.Physics.Arcade.Body.prototype = { postUpdate: function () { - this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); - this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); - - if (this.allowRotation) + if (this.deltaX() != 0) { - this.sprite.angle = this.rotation; + this.sprite.position.x += this.deltaX(); + this.sprite.x += this.deltaX(); } + if (this.deltaY() != 0) + { + this.sprite.position.y += this.deltaY(); + this.sprite.y += this.deltaY(); + } + + + // this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + // this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); + + + // if (this.position.x != this._cache.x || this.position.y != this._cache.y) + // { + // this.position.x = this._cache.x; + // this.position.y = this._cache.y; + // this._cache.dirty = true; + // } + + + // Adjust the sprite based on all of the above, so the x/y coords will be correct going into the State update + // this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); + // this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); + + // this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); + // this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); + + // if (this.allowRotation) + // { + // this.sprite.angle = this.rotation; + // } + }, checkWorldBounds: function () { @@ -206,27 +226,31 @@ Phaser.Physics.Arcade.Body.prototype = { this.angularVelocity = 0; this.angularAcceleration = 0; - this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; - this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; - this.lastX = this.x; - this.lastY = this.y; + // this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; + // this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; + // this.lastX = this.x; + // this.lastY = this.y; }, deltaAbsX: function () { + // return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); }, deltaAbsY: function () { + // return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); }, deltaX: function () { - return this.x - this.lastX; + // return this.x - this.lastX; + return this.x - this.preX; }, deltaY: function () { - return this.y - this.lastY; + // return this.y - this.lastY; + return this.y - this.preY; } }; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index a7bf61e0..c4cd3bea 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -170,6 +170,8 @@ Phaser.Sound.prototype = { }, + // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) + // volume is between 0 and 1 addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; From 257cbe3be8efe30fc334c68ecbd16d3ec5480357 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 23 Sep 2013 03:26:08 +0100 Subject: [PATCH 002/125] Much more stable collision, just need to refactor the Tilemap handling - see if I can optimise it a bit too. --- Docs/Screen Shots/phaser_sprite_bounds.png | Bin 0 -> 136875 bytes README.md | 5 + examples/camera/camera cull.php | 64 +++ examples/camera/moving the camera.php | 70 +++ examples/collision/vertical collision.php | 72 +++ examples/tweens/chained tweens.php | 18 +- src/gameobjects/Sprite.js | 15 +- src/geom/Rectangle.js | 2 +- src/physics/arcade/ArcadePhysics.js | 529 ++++++++++----------- src/physics/arcade/Body.js | 59 +-- src/tilemap/Tile.js | 41 +- src/tilemap/Tilemap.js | 2 + 12 files changed, 517 insertions(+), 360 deletions(-) create mode 100644 Docs/Screen Shots/phaser_sprite_bounds.png create mode 100644 examples/camera/camera cull.php create mode 100644 examples/camera/moving the camera.php create mode 100644 examples/collision/vertical collision.php diff --git a/Docs/Screen Shots/phaser_sprite_bounds.png b/Docs/Screen Shots/phaser_sprite_bounds.png new file mode 100644 index 0000000000000000000000000000000000000000..cda91f282cea575385291ea206275be35b880eb1 GIT binary patch literal 136875 zcmdSBcT`i`*Dg%&Na!FnfOP3nq$hMxs)C4g1w@*l^w2`@ML@QqTBTW!a=>Y2{_6321>K#=aoQg#93mZc0Yf^Wu2c9@M z*V?YWal71#>~U}~AGFm}O?)hO-Vys)bc`VOHVB@yLSE2Fn$&{Ato6@6C|MEGMNC&tD7{@rI>O(5 z_go(+Z99X@IV1qNit#Ag#D0HqRmO1vLD453oGJT6D%mMRa)-d08-GOW-p&DA&k5zDZkv(NM2jl=nJd@Tpg zvNf{@U6k*YV*-du;Rb`}7$gc_V(MI$46$^`QNG%ltez|}+{4wJ%V%hP`F&*21uf{99reMpsnd*!f~etqtJnvQ zrg}DEfI=!?1Zy9qPfuI$@FHrru`(_T|l( zMa}9LOamu;*EQD)$JN+IPGHTa&z13$2Lew{CJGCNwD7h|Q5?4)Q%-l~K&~-zoKjmT z2Cl4wiOx9YAYHt{ks#)MrA6_&UB2u8?Dgi=Ubpr&@9s4tR>%$WI&`9v&8L2c6_+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56iUxy#N3J literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 4a31cd0b..82e5eea7 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,11 @@ Version 1.0.6 (in progress) * New: When loading a Sprite Sheet you can now pass negative values for the frame sizes which specifies the number of rows/columns to load instead (thanks TheJare) * New: BitmapText now supports anchor and has fixed box dimensions (thanks TheJare) * Fixed bug where if a State contains an empty Preloader the Update will not be called (thanks TheJare) +* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. +* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. +* Updated ArcadePhysics.separateX/Y to use new body system - much better results now. +* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using worldTransform values. +* Several new examples added (cameras, tweens, etc) diff --git a/examples/camera/camera cull.php b/examples/camera/camera cull.php new file mode 100644 index 00000000..00b87050 --- /dev/null +++ b/examples/camera/camera cull.php @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/examples/camera/moving the camera.php b/examples/camera/moving the camera.php new file mode 100644 index 00000000..7fc2c508 --- /dev/null +++ b/examples/camera/moving the camera.php @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/examples/collision/vertical collision.php b/examples/collision/vertical collision.php new file mode 100644 index 00000000..a878458d --- /dev/null +++ b/examples/collision/vertical collision.php @@ -0,0 +1,72 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/chained tweens.php b/examples/tweens/chained tweens.php index cb77634f..1d01dd69 100644 --- a/examples/tweens/chained tweens.php +++ b/examples/tweens/chained tweens.php @@ -7,7 +7,7 @@ (function () { - var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update, render: render }); + var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create }); var p; @@ -19,23 +19,17 @@ function create() { - game.stage.backgroundColor = 0x337799; + game.stage.backgroundColor = 0x2d2d2d; - p = game.add.sprite(0, 0, 'diamond'); + p = game.add.sprite(100, 100, 'diamond'); - game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true) + game.add.tween(p).to({ x: 600 }, 2000, Phaser.Easing.Linear.None, true) .to({ y: 300 }, 1000, Phaser.Easing.Linear.None) - .to({ x: 0 }, 1000, Phaser.Easing.Linear.None) - .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) + .to({ x: 100 }, 2000, Phaser.Easing.Linear.None) + .to({ y: 100 }, 1000, Phaser.Easing.Linear.None) .loop(); } - function update() { - } - - function render() { - } - })(); diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 160fc8f1..be395d24 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -210,9 +210,6 @@ Phaser.Sprite.prototype.preUpdate = function() { this._cache.dirty = true; } - // this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); - // this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); - if (this.visible) { this.renderOrderID = this.game.world.currentRenderOrderID++; @@ -299,10 +296,14 @@ Phaser.Sprite.prototype.postUpdate = function() { // The sprite is positioned in this call, after taking into consideration motion updates and collision this.body.postUpdate(); - this.position.x -= (this.game.world.camera.x * this.scrollFactor.x); - this.position.y -= (this.game.world.camera.y * this.scrollFactor.y); - this.x -= (this.game.world.camera.x * this.scrollFactor.x); - this.y -= (this.game.world.camera.y * this.scrollFactor.y); + this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); + + if (this.position.x != this._cache.x || this.position.y != this._cache.y) + { + this.position.x = this._cache.x; + this.position.y = this._cache.y; + } } } diff --git a/src/geom/Rectangle.js b/src/geom/Rectangle.js index 54a279eb..ca7de4f6 100644 --- a/src/geom/Rectangle.js +++ b/src/geom/Rectangle.js @@ -648,7 +648,7 @@ Phaser.Rectangle.equals = function (a, b) { */ Phaser.Rectangle.intersection = function (a, b, out) { - out = out || new Phaser.Rectangle; + out = out || new Phaser.Rectangle; if (Phaser.Rectangle.intersects(a, b)) { diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 6cba4a13..094b6a15 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -380,12 +380,6 @@ Phaser.Physics.Arcade.prototype = { this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); - // if (this._result) - // { - // body1.postUpdate(); - // body2.postUpdate(); - // } - }, /** @@ -396,106 +390,103 @@ Phaser.Physics.Arcade.prototype = { */ separateX: function (body1, body2) { - // Can't separate two immovable or non-existing bodys + // Can't separate two immovable bodies if (body1.immovable && body2.immovable) { return false; } - // First, get the two body deltas this._overlap = 0; - if (body1.deltaX() != body2.deltaX()) + // Check if the hulls actually overlap + if (Phaser.Rectangle.intersects(body1, body2)) { - // Check if the X hulls actually overlap + this._maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + this.OVERLAP_BIAS; - this._bounds1.setTo(body1.x - ((body1.deltaX() > 0) ? body1.deltaX() : 0), body1.lastY, body1.width + ((body1.deltaX() > 0) ? body1.deltaX() : -body1.deltaX()), body1.height); - this._bounds2.setTo(body2.x - ((body2.deltaX() > 0) ? body2.deltaX() : 0), body2.lastY, body2.width + ((body2.deltaX() > 0) ? body2.deltaX() : -body2.deltaX()), body2.height); - - if ((this._bounds1.right > this._bounds2.x) && (this._bounds1.x < this._bounds2.right) && (this._bounds1.bottom > this._bounds2.y) && (this._bounds1.y < this._bounds2.bottom)) + if (body1.deltaX() == 0 && body2.deltaX() == 0) { - this._maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + this.OVERLAP_BIAS; + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaX() > body2.deltaX()) + { + // Body1 is moving right and/or Body2 is moving left + this._overlap = body1.x + body1.width - body2.x; - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (body1.deltaX() > body2.deltaX()) + if ((this._overlap > this._maxOverlap) || body1.allowCollision.right == false || body2.allowCollision.left == false) { - this._overlap = body1.x + body1.width - body2.x; - - if ((this._overlap > this._maxOverlap) || body1.allowCollision.right == false || body2.allowCollision.left == false) - { - this._overlap = 0; - } - else - { - body1.touching.right = true; - body2.touching.left = true; - } + this._overlap = 0; } - else if (body1.deltaX() < body2.deltaX()) + else { - this._overlap = body1.x - body2.width - body2.x; - - if ((-this._overlap > this._maxOverlap) || body1.allowCollision.left == false || body2.allowCollision.right == false) - { - this._overlap = 0; - } - else - { - body1.touching.left = true; - body2.touching.right = true; - } + body1.touching.right = true; + body2.touching.left = true; } } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - body1.overlapX = this._overlap; - body2.overlapX = this._overlap; - - if (body1.customSeparateX || body2.customSeparateX) + else if (body1.deltaX() < body2.deltaX()) { + // Body1 is moving left and/or Body2 is moving right + this._overlap = body1.x - body2.width - body2.x; + + if ((-this._overlap > this._maxOverlap) || body1.allowCollision.left == false || body2.allowCollision.right == false) + { + this._overlap = 0; + } + else + { + body1.touching.left = true; + body2.touching.right = true; + } + } + + // Then adjust their positions and velocities accordingly (if there was any overlap) + if (this._overlap != 0) + { + body1.overlapX = this._overlap; + body2.overlapX = this._overlap; + + if (body1.customSeparateX || body2.customSeparateX) + { + return true; + } + + this._velocity1 = body1.velocity.x; + this._velocity2 = body2.velocity.x; + + if (!body1.immovable && !body2.immovable) + { + this._overlap *= 0.5; + + body1.x = body1.x - this._overlap; + body2.x += this._overlap; + + this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); + this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); + this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; + this._newVelocity1 -= this._average; + this._newVelocity2 -= this._average; + + body1.velocity.x = this._average + this._newVelocity1 * body1.bounce.x; + body2.velocity.x = this._average + this._newVelocity2 * body2.bounce.x; + } + else if (!body1.immovable) + { + body1.x = body1.x - this._overlap; + body1.velocity.x = this._velocity2 - this._velocity1 * body1.bounce.x; + } + else if (!body2.immovable) + { + body2.x += this._overlap; + body2.velocity.x = this._velocity1 - this._velocity2 * body2.bounce.x; + } + return true; } - - this._velocity1 = body1.velocity.x; - this._velocity2 = body2.velocity.x; - - if (!body1.immovable && !body2.immovable) - { - this._overlap *= 0.5; - - body1.x = body1.x - this._overlap; - body2.x += this._overlap; - - this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); - this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); - this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; - this._newVelocity1 -= this._average; - this._newVelocity2 -= this._average; - - body1.velocity.x = this._average + this._newVelocity1 * body1.bounce.x; - body2.velocity.x = this._average + this._newVelocity2 * body2.bounce.x; - } - else if (!body1.immovable) - { - body1.x = body1.x - this._overlap; - body1.velocity.x = this._velocity2 - this._velocity1 * body1.bounce.x; - } - else if (!body2.immovable) - { - body2.x += this._overlap; - body2.velocity.x = this._velocity1 - this._velocity2 * body2.bounce.x; - } - - return true; - } - else - { - return false; } + return false; + }, /** @@ -512,110 +503,110 @@ Phaser.Physics.Arcade.prototype = { return false; } - // First, get the two body deltas this._overlap = 0; - if (body1.deltaY() != body2.deltaY()) + // Check if the hulls actually overlap + if (Phaser.Rectangle.intersects(body1, body2)) { - // Check if the Y hulls actually overlap - this._bounds1.setTo(body1.x, body1.y - ((body1.deltaY() > 0) ? body1.deltaY() : 0), body1.width, body1.height + body1.deltaAbsY()); - this._bounds2.setTo(body2.x, body2.y - ((body2.deltaY() > 0) ? body2.deltaY() : 0), body2.width, body2.height + body2.deltaAbsY()); + this._maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + this.OVERLAP_BIAS; - if ((this._bounds1.right > this._bounds2.x) && (this._bounds1.x < this._bounds2.right) && (this._bounds1.bottom > this._bounds2.y) && (this._bounds1.y < this._bounds2.bottom)) + if (body1.deltaY() == 0 && body2.deltaY() == 0) { - this._maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + this.OVERLAP_BIAS; + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaY() > body2.deltaY()) + { + // Body1 is moving down and/or Body2 is moving up + this._overlap = body1.y + body1.height - body2.y; - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (body1.deltaY() > body2.deltaY()) + if ((this._overlap > this._maxOverlap) || body1.allowCollision.down == false || body2.allowCollision.up == false) { - this._overlap = body1.y + body1.height - body2.y; - - if ((this._overlap > this._maxOverlap) || body1.allowCollision.down == false || body2.allowCollision.up == false) - { - this._overlap = 0; - } - else - { - body1.touching.down = true; - body2.touching.up = true; - } + this._overlap = 0; } - else if (body1.deltaY() < body2.deltaY()) + else { - this._overlap = body1.y - body2.height - body2.y; - - if ((-this._overlap > this._maxOverlap) || body1.allowCollision.up == false || body2.allowCollision.down == false) - { - this._overlap = 0; - } - else - { - body1.touching.up = true; - body2.touching.down = true; - } + body1.touching.down = true; + body2.touching.up = true; } } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - body1.overlapY = this._overlap; - body2.overlapY = this._overlap; - - if (body1.customSeparateY || body2.customSeparateY) + else if (body1.deltaY() < body2.deltaY()) { + // Body1 is moving up and/or Body2 is moving down + this._overlap = body1.y - body2.height - body2.y; + + if ((-this._overlap > this._maxOverlap) || body1.allowCollision.up == false || body2.allowCollision.down == false) + { + this._overlap = 0; + } + else + { + body1.touching.up = true; + body2.touching.down = true; + } + } + + // Then adjust their positions and velocities accordingly (if there was any overlap) + if (this._overlap != 0) + { + body1.overlapY = this._overlap; + body2.overlapY = this._overlap; + + if (body1.customSeparateY || body2.customSeparateY) + { + return true; + } + + this._velocity1 = body1.velocity.y; + this._velocity2 = body2.velocity.y; + + if (!body1.immovable && !body2.immovable) + { + this._overlap *= 0.5; + + body1.y = body1.y - this._overlap; + body2.y += this._overlap; + + this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); + this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); + this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; + this._newVelocity1 -= this._average; + this._newVelocity2 -= this._average; + + body1.velocity.y = this._average + this._newVelocity1 * body1.bounce.y; + body2.velocity.y = this._average + this._newVelocity2 * body2.bounce.y; + } + else if (!body1.immovable) + { + body1.y = body1.y - this._overlap; + body1.velocity.y = this._velocity2 - this._velocity1 * body1.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body2.active && body2.moves && (body1.deltaY() > body2.deltaY())) + { + body1.x += body2.x - body2.lastX; + } + } + else if (!body2.immovable) + { + body2.y += this._overlap; + body2.velocity.y = this._velocity1 - this._velocity2 * body2.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body1.sprite.active && body1.moves && (body1.deltaY() < body2.deltaY())) + { + body2.x += body1.x - body1.lastX; + } + } + return true; } - this._velocity1 = body1.velocity.y; - this._velocity2 = body2.velocity.y; - - if (!body1.immovable && !body2.immovable) - { - this._overlap *= 0.5; - - body1.y = body1.y - this._overlap; - body2.y += this._overlap; - - this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); - this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); - this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; - this._newVelocity1 -= this._average; - this._newVelocity2 -= this._average; - - body1.velocity.y = this._average + this._newVelocity1 * body1.bounce.y; - body2.velocity.y = this._average + this._newVelocity2 * body2.bounce.y; - } - else if (!body1.immovable) - { - body1.y = body1.y - this._overlap; - body1.velocity.y = this._velocity2 - this._velocity1 * body1.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body2.active && body2.moves && (body1.deltaY() > body2.deltaY())) - { - body1.x += body2.x - body2.lastX; - } - } - else if (!body2.immovable) - { - body2.y += this._overlap; - body2.velocity.y = this._velocity1 - this._velocity2 * body2.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body1.sprite.active && body1.moves && (body1.deltaY() < body2.deltaY())) - { - body2.x += body1.x - body1.lastX; - } - } - - return true; - } - else - { - return false; } + + return false; + }, /** @@ -626,12 +617,11 @@ Phaser.Physics.Arcade.prototype = { */ separateTile: function (object, x, y, width, height, mass, collideLeft, collideRight, collideUp, collideDown, separateX, separateY) { - var separatedY = this.separateTileY(object.body, x, y, width, height, mass, collideUp, collideDown, separateY); var separatedX = this.separateTileX(object.body, x, y, width, height, mass, collideLeft, collideRight, separateX); + var separatedY = this.separateTileY(object.body, x, y, width, height, mass, collideUp, collideDown, separateY); if (separatedX || separatedY) { - object.body.postUpdate(); return true; } @@ -653,77 +643,67 @@ Phaser.Physics.Arcade.prototype = { return false; } - // First, get the object delta this._overlap = 0; - // console.log('separatedX', x, y, object.deltaX()); - - if (object.deltaX() != 0) + if (Phaser.Rectangle.intersectsRaw(object, x, x + width, y, y + height)) { - this._bounds1.setTo(object.x, object.y, object.width, object.height); + this._maxOverlap = object.deltaAbsX() + this.OVERLAP_BIAS; - if ((this._bounds1.right > x) && (this._bounds1.x < x + width) && (this._bounds1.bottom > y) && (this._bounds1.y < y + height)) + if (object.deltaX() == 0) { - // The hulls overlap, let's process it - this._maxOverlap = object.deltaAbsX() + this.OVERLAP_BIAS; - - // TODO - We need to check if we're already inside of the tile, i.e. jumping through an n-way tile - // in which case we didn't ought to separate because it'll look like tunneling - - if (object.deltaX() > 0) - { - // Going right ... - this._overlap = object.x + object.width - x; - - if ((this._overlap > this._maxOverlap) || !object.allowCollision.right || !collideLeft) - { - this._overlap = 0; - } - else - { - object.touching.right = true; - } - } - else if (object.deltaX() < 0) - { - // Going left ... - this._overlap = object.x - width - x; - - if ((-this._overlap > this._maxOverlap) || !object.allowCollision.left || !collideRight) - { - this._overlap = 0; - } - else - { - object.touching.left = true; - } - } + // Object is stuck inside a tile and not moving } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - if (separate) + else if (object.deltaX() > 0) { - object.x = object.x - this._overlap; + // Going right ... + this._overlap = object.x + object.width - x; - if (object.bounce.x == 0) + if ((this._overlap > this._maxOverlap) || !object.allowCollision.right || !collideLeft) { - object.velocity.x = 0; + this._overlap = 0; } else { - object.velocity.x = -object.velocity.x * object.bounce.x; + object.touching.right = true; } } - return true; - } - else - { - return false; + else if (object.deltaX() < 0) + { + // Going left ... + this._overlap = object.x - width - x; + + if ((-this._overlap > this._maxOverlap) || !object.allowCollision.left || !collideRight) + { + this._overlap = 0; + } + else + { + object.touching.left = true; + } + } + + if (this._overlap != 0) + { + if (separate) + { + object.x = object.x - this._overlap; + + if (object.bounce.x == 0) + { + object.velocity.x = 0; + } + else + { + object.velocity.x = -object.velocity.x * object.bounce.x; + } + } + return true; + } + } + return false; + }, /** @@ -740,77 +720,66 @@ Phaser.Physics.Arcade.prototype = { return false; } - // First, get the object delta this._overlap = 0; - if (object.deltaY() != 0) + if (Phaser.Rectangle.intersectsRaw(object, x, x + width, y, y + height)) { - this._bounds1.setTo(object.x, object.y, object.width, object.height); + this._maxOverlap = object.deltaAbsY() + this.OVERLAP_BIAS; - if ((this._bounds1.right > x) && (this._bounds1.x < x + width) && (this._bounds1.bottom > y) && (this._bounds1.y < y + height)) + if (object.deltaY() == 0) { - // The hulls overlap, let's process it + // Object is stuck inside a tile and not moving + } + else if (object.deltaY() > 0) + { + // Going down ... + this._overlap = object.bottom - y; - // Not currently used, may need it so keep for now - this._maxOverlap = object.deltaAbsY() + this.OVERLAP_BIAS; - - // TODO - We need to check if we're already inside of the tile, i.e. jumping through an n-way tile - // in which case we didn't ought to separate because it'll look like tunneling - - if (object.deltaY() > 0) + // if (object.allowCollision.down && collideDown && this._overlap < this._maxOverlap) + if ((this._overlap > this._maxOverlap) || !object.allowCollision.down || !collideDown) { - // Going down ... - this._overlap = object.bottom - y; - - // if (object.allowCollision.down && collideDown && this._overlap < this._maxOverlap) - if ((this._overlap > this._maxOverlap) || !object.allowCollision.down || !collideDown) - { - this._overlap = 0; - } - else - { - object.touching.down = true; - } + this._overlap = 0; } else { - // Going up ... - this._overlap = object.y - height - y; - - if ((-this._overlap > this._maxOverlap) || !object.allowCollision.up || !collideUp) - { - this._overlap = 0; - } - else - { - object.touching.up = true; - } + object.touching.down = true; } } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - if (separate) + else if (object.deltaY() < 0) { - object.y = object.y - this._overlap; + // Going up ... + this._overlap = object.y - height - y; - if (object.bounce.y == 0) + if ((-this._overlap > this._maxOverlap) || !object.allowCollision.up || !collideUp) { - object.velocity.y = 0; + this._overlap = 0; } else { - object.velocity.y = -object.velocity.y * object.bounce.y; + object.touching.up = true; } } - return true; - } - else - { - return false; + + if (this._overlap != 0) + { + if (separate) + { + object.y = object.y - this._overlap; + + if (object.bounce.y == 0) + { + object.velocity.y = 0; + } + else + { + object.velocity.y = -object.velocity.y * object.bounce.y; + } + } + return true; + } } + + return false; }, diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index d2aac936..7f64ad5b 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -9,8 +9,6 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.y = sprite.y; this.preX = sprite.x; this.preY = sprite.y; - this.lastX = sprite.x; - this.lastY = sprite.y; // un-scaled original size this.sourceWidth = sprite.currentFrame.sourceSizeW; @@ -64,6 +62,9 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.overlapX = 0; this.overlapY = 0; + // If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true + this.embedded = false; + this.collideWorldBounds = false; }; @@ -99,6 +100,8 @@ Phaser.Physics.Arcade.Body.prototype = { this.touching.left = false; this.touching.right = false; + this.embedded = false; + this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; this.rotation = this.sprite.angle; @@ -106,12 +109,6 @@ Phaser.Physics.Arcade.Body.prototype = { this.x = this.preX; this.y = this.preY; - // There is a bug here in that the worldTransform values are what should be used, otherwise the quadTree gets the wrong rect given to it - // this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.x = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.y = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - if (this.moves) { this.game.physics.updateMotion(this); @@ -129,51 +126,24 @@ Phaser.Physics.Arcade.Body.prototype = { this.game.physics.quadTree.insert(this); } - if (this.allowRotation) - { - this.sprite.angle = this.rotation; - } - }, postUpdate: function () { if (this.deltaX() != 0) { - this.sprite.position.x += this.deltaX(); this.sprite.x += this.deltaX(); } if (this.deltaY() != 0) { - this.sprite.position.y += this.deltaY(); this.sprite.y += this.deltaY(); } - - // this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); - // this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); - - - // if (this.position.x != this._cache.x || this.position.y != this._cache.y) - // { - // this.position.x = this._cache.x; - // this.position.y = this._cache.y; - // this._cache.dirty = true; - // } - - - // Adjust the sprite based on all of the above, so the x/y coords will be correct going into the State update - // this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); - // this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); - - // this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); - // this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); - - // if (this.allowRotation) - // { - // this.sprite.angle = this.rotation; - // } + if (this.allowRotation) + { + this.sprite.angle = this.rotation; + } }, @@ -226,30 +196,25 @@ Phaser.Physics.Arcade.Body.prototype = { this.angularVelocity = 0; this.angularAcceleration = 0; - // this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.lastX = this.x; - // this.lastY = this.y; + this.x = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; + this.y = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; + this.rotation = this.sprite.angle; }, deltaAbsX: function () { - // return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); }, deltaAbsY: function () { - // return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); }, deltaX: function () { - // return this.x - this.lastX; return this.x - this.preX; }, deltaY: function () { - // return this.y - this.lastY; return this.y - this.preY; } diff --git a/src/tilemap/Tile.js b/src/tilemap/Tile.js index 94795789..e4500526 100644 --- a/src/tilemap/Tile.js +++ b/src/tilemap/Tile.js @@ -121,18 +121,33 @@ Phaser.Tile.prototype = { this.collideUp = false; this.collideDown = false; - }, - - /** - * Returns a string representation of this object. - * @method toString - * @return {string} a string representation of the object. - **/ - toString: function () { - - // return "[{Tile (index=" + this.index + " collisions=" + this.allowCollisions + " width=" + this.width + " height=" + this.height + ")}]"; - return ''; - } -}; \ No newline at end of file +}; + +Object.defineProperty(Phaser.Tile.prototype, "bottom", { + + /** + * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * @method bottom + * @return {Number} + **/ + get: function () { + return this.y + this.height; + } + +}); + +Object.defineProperty(Phaser.Tile.prototype, "right", { + + /** + * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. + * However it does affect the width property. + * @method right + * @return {Number} + **/ + get: function () { + return this.x + this.width; + } + +}); diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index cae0ff92..fa695266 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -183,6 +183,8 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { */ Phaser.Tilemap.prototype.generateTiles = function (qty) { + console.log('generating', qty, 'tiles'); + for (var i = 0; i < qty; i++) { this.tiles.push(new Phaser.Tile(this.game, this, i, this.currentLayer.tileWidth, this.currentLayer.tileHeight)); From 51049128f5fc8695aa6878d55efe22b2a8e1f56f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 23 Sep 2013 22:23:17 +0100 Subject: [PATCH 003/125] Collision fixes for testing --- Docs/jsdoc_work.txt | 74 ++++++++++++++++++++++++++++++++++++++ README.md | 3 +- src/Phaser.js | 8 ++++- src/core/StateManager.js | 6 +++- src/gameobjects/Sprite.js | 22 ++++++++++++ src/physics/arcade/Body.js | 29 +++++++++++++++ 6 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 Docs/jsdoc_work.txt diff --git a/Docs/jsdoc_work.txt b/Docs/jsdoc_work.txt new file mode 100644 index 00000000..03fb7337 --- /dev/null +++ b/Docs/jsdoc_work.txt @@ -0,0 +1,74 @@ +JSDOC3 Work: + +1) This should go at the top of every file (with the module name corrected) + +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @module Phaser.Animation +*/ + +2) This is the format a constructor should be: + +/** +* The constructor description goes here. If there isn't one for you to paste in, just put TODO. +* +* @class Phaser.Animation +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Phaser.Sprite} parent - A reference to the owner of this Animation. +* @param {string} name - The unique name for this animation, used in playback commands. +* @param {Phaser.Animation.FrameData} frameData - The FrameData object that contains all frames used by this Animation. +* @param {(Array.|Array.)} frames - An array of numbers or strings indicating which frames to play in which order. +* @param {number} delay - The time between each frame of the animation, given in ms. +* @param {boolean} looped - Should this animation loop or play through once. +*/ + +You must ensure the class is correct and it has the @constructor tag. +It is important you include the data-type. I don't expect you to know what the data type is, so just include: {todo} +It is important you include the hypen after the parameter name. You will always know what the parameter name is, so it should always be included. +You often won't know what the parameter description is, so just put "todo", like this: + +* @param {todo} name - todo. + +3) Functions are nearly exactly the same as the constructor: + +/** +* The function description goes here. If there isn't one for you to paste in, just put TODO. +* +* @method play +* @param {Number} [frameRate=null] The framerate to play the animation at. +* @return {Phaser.Animation} A reference to this Animation instance. +*/ + +You must ensure the @method tag is correct and present. +It is important you include the data-type. I don't expect you to know what the data type is, so just include: {todo} +It is important you include the hypen after the parameter name. You will always know what the parameter name is, so it should always be included. +You often won't know what the parameter description is, so just put "todo", like this: + +* @param {todo} name - todo. + +4) All properties must be marked-up: + +/** +* @property {boolean} isFinished - The finished state of the Animation. Set to true once playback completes, false during playback. +* @default +*/ +this.isFinished = false; + +It is important you include the data-type. I don't expect you to know what the data type is, so just include: {todo} +It is important you include the hypen after the parameter name. You will always know what the parameter name is, so it should always be included. +You often won't know what the parameter description is, so just put "todo", like this: + +* @property {todo} isFinished - todo. + +If the property has a base value assigned to it (i.e. a number or a string) then put @default. +If the property starts with an underscore it must include @private. Here is an example combining the two: + +/** +* @property {number} _frameIndex - The index of the current frame. +* @private +* @default +*/ +this._frameIndex = 0; diff --git a/README.md b/README.md index 82e5eea7..97b47c66 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,8 @@ Version 1.0.6 (in progress) * Updated ArcadePhysics.separateX/Y to use new body system - much better results now. * QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using worldTransform values. * Several new examples added (cameras, tweens, etc) - +* TODO: addMarker hh:mm:ss:ms +* TODO: Direction constants Version 1.0.5 (September 20th 2013) diff --git a/src/Phaser.js b/src/Phaser.js index fce79be0..a3265766 100644 --- a/src/Phaser.js +++ b/src/Phaser.js @@ -20,7 +20,13 @@ var Phaser = Phaser || { RENDERTEXTURE: 8, TILEMAP: 9, TILEMAPLAYER: 10, - EMITTER: 11 + EMITTER: 11, + + NONE: 0, + LEFT: 1, + RIGHT: 2, + UP: 3, + DOWN: 4 }; diff --git a/src/core/StateManager.js b/src/core/StateManager.js index 04406442..86a2b8c6 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -368,9 +368,13 @@ Phaser.StateManager.prototype = { if (this._created == false && this.onCreateCallback) { // console.log('Create callback found'); + this._created = true; this.onCreateCallback.call(this.callbackContext); } - this._created = true; + else + { + this._created = true; + } }, diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index be395d24..39b499fb 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -99,6 +99,9 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.x = x; this.y = y; + this.prevX = x; + this.prevY = y; + this.position.x = x; this.position.y = y; @@ -215,6 +218,9 @@ Phaser.Sprite.prototype.preUpdate = function() { this.renderOrderID = this.game.world.currentRenderOrderID++; } + this.prevX = this.x; + this.prevY = this.y; + // |a c tx| // |b d ty| // |0 0 1| @@ -308,6 +314,22 @@ Phaser.Sprite.prototype.postUpdate = function() { } +Phaser.Sprite.prototype.deltaAbsX = function () { + return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); +} + +Phaser.Sprite.prototype.deltaAbsY = function () { + return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); +} + +Phaser.Sprite.prototype.deltaX = function () { + return this.x - this.prevX; +} + +Phaser.Sprite.prototype.deltaY = function () { + return this.y - this.prevY; +} + /** * Moves the sprite so its center is located on the given x and y coordinates. * Doesn't change the origin of the sprite. diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 7f64ad5b..4e061e51 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -44,6 +44,7 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.allowCollision = { none: false, any: true, up: true, down: true, left: true, right: true }; this.touching = { none: true, up: false, down: false, left: false, right: false }; this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; + this.facing = Phaser.NONE; this.immovable = false; this.moves = true; @@ -130,6 +131,34 @@ Phaser.Physics.Arcade.Body.prototype = { postUpdate: function () { + // Calculate forward-facing edge + if (this.deltaX() == 0 && this.deltaY() == 0) + { + // Can't work it out from the Body, how about from x position? + if (this.sprite.deltaX() == 0 && this.sprite.deltaY() == 0) + { + // still as a statue + } + } + + if (this.deltaX() < 0) + { + this.facing = Phaser.LEFT; + } + else if (this.deltaX() > 0) + { + this.facing = Phaser.RIGHT; + } + + if (this.deltaY() < 0) + { + this.facing = Phaser.UP; + } + else if (this.deltaY() > 0) + { + this.facing = Phaser.DOWN; + } + if (this.deltaX() != 0) { this.sprite.x += this.deltaX(); From 891369b197586ba81e2f3bad22a66dc3446ba01a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 24 Sep 2013 15:28:29 +0100 Subject: [PATCH 004/125] Preparing for 1.0.6 release, but moving physics changes to dev. --- README.md | 24 +- build/phaser.js | 802 ++++++++++++++++++---------- examples/games/starstruck.php | 38 +- src/animation/Animation.js | 48 +- src/physics/arcade/ArcadePhysics.js | 199 ++++++- src/physics/arcade/Body.js | 1 + src/tilemap/Tilemap.js | 4 +- src/tilemap/TilemapLayer.js | 8 + src/tilemap/TilemapRenderer.js | 7 + src/utils/Debug.js | 6 +- 10 files changed, 824 insertions(+), 313 deletions(-) diff --git a/README.md b/README.md index 97b47c66..52a419c9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Phaser 1.0 Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) internally for fast 2D Canvas and WebGL rendering. -Version: 1.0.5 - Released: September 20th 2013 +Version: 1.0.6 - Released: September 24th 2013 By Richard Davey, [Photon Storm](http://www.photonstorm.com) @@ -35,7 +35,16 @@ Phaser is everything we ever wanted from an HTML5 game framework. It will power Change Log ---------- -Version 1.0.6 (in progress) +Version 1.0.7 (in progress in the dev branch) + +* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. +* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. +* Updated ArcadePhysics.separateX/Y to use new body system - much better results now. +* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using worldTransform values. +* TODO: addMarker hh:mm:ss:ms +* TODO: Direction constants + +Version 1.0.6 (September 24th 2013) * Added check into Pointer.move to always consider a Sprite that has pixelPerfect enabled, regardless of render ID. * BUG: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet. @@ -46,14 +55,10 @@ Version 1.0.6 (in progress) * New: When loading a Sprite Sheet you can now pass negative values for the frame sizes which specifies the number of rows/columns to load instead (thanks TheJare) * New: BitmapText now supports anchor and has fixed box dimensions (thanks TheJare) * Fixed bug where if a State contains an empty Preloader the Update will not be called (thanks TheJare) -* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. -* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. -* Updated ArcadePhysics.separateX/Y to use new body system - much better results now. -* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using worldTransform values. * Several new examples added (cameras, tweens, etc) -* TODO: addMarker hh:mm:ss:ms -* TODO: Direction constants - +* Added in extra checks to halt collision if it involves an empty Group (thanks cang) +* Added time smoothing to Animation update to help frames hopefully not get too out of sync during long animations with high frame rates. +* Added frame skip to Animation.update. If it gets too far behind it will now skip frames to try and catch up. Version 1.0.5 (September 20th 2013) @@ -213,6 +218,7 @@ The following list is not exhaustive and is subject to change: * Joypad support. * Gestures input class. * Flash CC html output support. +* Game parameters read from Google Docs. Right now however our main focus is on documentation and examples, we won't be touching any of the above features until the docs are finished. diff --git a/build/phaser.js b/build/phaser.js index c090eb28..feaf453e 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -1,7 +1,7 @@ /** * Phaser - http://www.phaser.io * -* v1.0.6 - Built at: Sun, 22 Sep 2013 22:05:45 +0000 +* v1.0.6 - Built at: Tue, 24 Sep 2013 12:29:16 +0000 * * @author Richard Davey http://www.photonstorm.com @photonstorm * @@ -51,7 +51,13 @@ var Phaser = Phaser || { RENDERTEXTURE: 8, TILEMAP: 9, TILEMAPLAYER: 10, - EMITTER: 11 + EMITTER: 11, + + NONE: 0, + LEFT: 1, + RIGHT: 2, + UP: 3, + DOWN: 4 }; @@ -7966,9 +7972,13 @@ Phaser.StateManager.prototype = { if (this._created == false && this.onCreateCallback) { // console.log('Create callback found'); + this._created = true; this.onCreateCallback.call(this.callbackContext); } - this._created = true; + else + { + this._created = true; + } }, @@ -10008,6 +10018,30 @@ Phaser.World.prototype = { }, + /** + * This is called automatically every frame, and is where main logic happens. + * @method update + */ + postUpdate: function () { + + if (this.game.stage._stage.first._iNext) + { + var currentNode = this.game.stage._stage.first._iNext; + + do + { + if (currentNode['postUpdate']) + { + currentNode.postUpdate(); + } + + currentNode = currentNode._iNext; + } + while (currentNode != this.game.stage._stage.last._iNext) + } + + }, + /** * Updates the size of this world. * @method setSize @@ -10528,6 +10562,8 @@ Phaser.Game.prototype = { this.state.update(); this.plugins.update(); + this.world.postUpdate(); + this.renderer.render(this.stage._stage); this.plugins.render(); this.state.render(); @@ -13958,6 +13994,9 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.x = x; this.y = y; + this.prevX = x; + this.prevY = y; + this.position.x = x; this.position.y = y; @@ -14069,23 +14108,14 @@ Phaser.Sprite.prototype.preUpdate = function() { this._cache.dirty = true; } - this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); - this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); - - // If this sprite or the camera have moved then let's update everything - // Note: The actual position shouldn't be changed if this item is inside a Group? - if (this.position.x != this._cache.x || this.position.y != this._cache.y) - { - this.position.x = this._cache.x; - this.position.y = this._cache.y; - this._cache.dirty = true; - } - if (this.visible) { this.renderOrderID = this.game.world.currentRenderOrderID++; } + this.prevX = this.x; + this.prevY = this.y; + // |a c tx| // |b d ty| // |0 0 1| @@ -14140,21 +14170,6 @@ Phaser.Sprite.prototype.preUpdate = function() { this.updateBounds(); } - // } - // else - // { - // We still need to work out the bounds in case the camera has moved - // but we can't use the local or worldTransform to do it, as Pixi resets that if a Sprite is invisible. - // So we'll compare against the cached state + new position. - // if (this._cache.dirty && this.visible == false) - // { - // this.bounds.x -= this._cache.boundsX - this._cache.x; - // this._cache.boundsX = this._cache.x; - - // this.bounds.y -= this._cache.boundsY - this._cache.y; - // this._cache.boundsY = this._cache.y; - // } - // } // Re-run the camera visibility check if (this._cache.dirty) @@ -14171,7 +14186,7 @@ Phaser.Sprite.prototype.preUpdate = function() { this.body.updateBounds(this.center.x, this.center.y, this._cache.scaleX, this._cache.scaleY); } - this.body.update(); + this.body.preUpdate(); } @@ -14179,11 +14194,37 @@ Phaser.Sprite.prototype.postUpdate = function() { if (this.exists) { + // The sprite is positioned in this call, after taking into consideration motion updates and collision this.body.postUpdate(); + + this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); + + if (this.position.x != this._cache.x || this.position.y != this._cache.y) + { + this.position.x = this._cache.x; + this.position.y = this._cache.y; + } } } +Phaser.Sprite.prototype.deltaAbsX = function () { + return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); +} + +Phaser.Sprite.prototype.deltaAbsY = function () { + return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); +} + +Phaser.Sprite.prototype.deltaX = function () { + return this.x - this.prevX; +} + +Phaser.Sprite.prototype.deltaY = function () { + return this.y - this.prevY; +} + /** * Moves the sprite so its center is located on the given x and y coordinates. * Doesn't change the origin of the sprite. @@ -19244,7 +19285,7 @@ Phaser.Rectangle.equals = function (a, b) { */ Phaser.Rectangle.intersection = function (a, b, out) { - out = out || new Phaser.Rectangle; + out = out || new Phaser.Rectangle; if (Phaser.Rectangle.intersects(a, b)) { @@ -20989,6 +21030,9 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope */ this._frameIndex = 0; + this._frameDiff = 0; + this._frameSkip = 1; + /** * @property {Phaser.Animation.Frame} currentFrame - The currently displayed frame of the Animation. */ @@ -21091,13 +21135,31 @@ Phaser.Animation.prototype = { if (this.isPlaying == true && this.game.time.now >= this._timeNextFrame) { - this._frameIndex++; + this._frameSkip = 1; - if (this._frameIndex == this._frames.length) + // Lagging? + this._frameDiff = this.game.time.now - this._timeNextFrame; + + this._timeLastFrame = this.game.time.now; + + if (this._frameDiff > this.delay) + { + // We need to skip a frame, work out how many + this._frameSkip = Math.floor(this._frameDiff / this.delay); + + this._frameDiff -= (this._frameSkip * this.delay); + } + + // And what's left now? + this._timeNextFrame = this.game.time.now + (this.delay - this._frameDiff); + + this._frameIndex += this._frameSkip; + + if (this._frameIndex >= this._frames.length) { if (this.looped) { - this._frameIndex = 0; + this._frameIndex = this._frameIndex - this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); this._parent.events.onAnimationLoop.dispatch(this._parent, this); @@ -21113,9 +21175,6 @@ Phaser.Animation.prototype = { this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); } - this._timeLastFrame = this.game.time.now; - this._timeNextFrame = this.game.time.now + this.delay; - return true; } @@ -21170,12 +21229,18 @@ Object.defineProperty(Phaser.Animation.prototype, "frameTotal", { }); +/** + * Sets the current frame to the given frame index and updates the texture cache. + * @param {number} value - The frame to display + * + *//** + * + * Returns the current frame, or if not set the index of the most recent frame. + * @returns {Animation.Frame} + * + */ Object.defineProperty(Phaser.Animation.prototype, "frame", { - /** - * @method frame - * @return {Animation.Frame} Returns the current frame, or if not set the index of the most recent frame. - */ get: function () { if (this.currentFrame !== null) @@ -21189,10 +21254,6 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { }, - /** - * @method frame - * @return {Number} Sets the current frame to the given frame index and updates the texture cache. - */ set: function (value) { this.currentFrame = this._frameData.getFrame(value); @@ -23768,6 +23829,8 @@ Phaser.Sound.prototype = { }, + // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) + // volume is between 0 and 1 addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; @@ -25060,8 +25123,10 @@ Phaser.Utils.Debug.prototype = { // this.line('ty: ' + sprite.worldTransform[5]); // this.line('skew x: ' + sprite.worldTransform[3]); // this.line('skew y: ' + sprite.worldTransform[1]); - // this.line('dx: ' + sprite.body.deltaX()); - // this.line('dy: ' + sprite.body.deltaY()); + this.line('dx: ' + sprite.body.deltaX()); + this.line('dy: ' + sprite.body.deltaY()); + this.line('sdx: ' + sprite.deltaX()); + this.line('sdy: ' + sprite.deltaY()); // this.line('inCamera: ' + this.game.renderer.spriteRenderer.inCamera(this.game.camera, sprite)); @@ -25827,6 +25892,11 @@ Phaser.Physics.Arcade.prototype = { collideGroupVsTilemap: function (group, tilemap, collideCallback, processCallback, callbackContext) { + if (group.length == 0) + { + return; + } + if (group._container.first._iNext) { var currentNode = group._container.first._iNext; @@ -25881,6 +25951,11 @@ Phaser.Physics.Arcade.prototype = { collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext) { + if (group.length == 0) + { + return; + } + // What is the sprite colliding with in the quadtree? this._potentials = this.quadTree.retrieve(sprite); @@ -25912,6 +25987,11 @@ Phaser.Physics.Arcade.prototype = { collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext) { + if (group1.length == 0 || group2.length == 0) + { + return; + } + if (group1._container.first._iNext) { var currentNode = group1._container.first._iNext; @@ -25939,12 +26019,6 @@ Phaser.Physics.Arcade.prototype = { this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); - if (this._result) - { - body1.postUpdate(); - body2.postUpdate(); - } - }, /** @@ -25955,106 +26029,103 @@ Phaser.Physics.Arcade.prototype = { */ separateX: function (body1, body2) { - // Can't separate two immovable or non-existing bodys + // Can't separate two immovable bodies if (body1.immovable && body2.immovable) { return false; } - // First, get the two body deltas this._overlap = 0; - if (body1.deltaX() != body2.deltaX()) + // Check if the hulls actually overlap + if (Phaser.Rectangle.intersects(body1, body2)) { - // Check if the X hulls actually overlap + this._maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + this.OVERLAP_BIAS; - this._bounds1.setTo(body1.x - ((body1.deltaX() > 0) ? body1.deltaX() : 0), body1.lastY, body1.width + ((body1.deltaX() > 0) ? body1.deltaX() : -body1.deltaX()), body1.height); - this._bounds2.setTo(body2.x - ((body2.deltaX() > 0) ? body2.deltaX() : 0), body2.lastY, body2.width + ((body2.deltaX() > 0) ? body2.deltaX() : -body2.deltaX()), body2.height); - - if ((this._bounds1.right > this._bounds2.x) && (this._bounds1.x < this._bounds2.right) && (this._bounds1.bottom > this._bounds2.y) && (this._bounds1.y < this._bounds2.bottom)) + if (body1.deltaX() == 0 && body2.deltaX() == 0) { - this._maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + this.OVERLAP_BIAS; + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaX() > body2.deltaX()) + { + // Body1 is moving right and/or Body2 is moving left + this._overlap = body1.x + body1.width - body2.x; - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (body1.deltaX() > body2.deltaX()) + if ((this._overlap > this._maxOverlap) || body1.allowCollision.right == false || body2.allowCollision.left == false) { - this._overlap = body1.x + body1.width - body2.x; - - if ((this._overlap > this._maxOverlap) || body1.allowCollision.right == false || body2.allowCollision.left == false) - { - this._overlap = 0; - } - else - { - body1.touching.right = true; - body2.touching.left = true; - } + this._overlap = 0; } - else if (body1.deltaX() < body2.deltaX()) + else { - this._overlap = body1.x - body2.width - body2.x; - - if ((-this._overlap > this._maxOverlap) || body1.allowCollision.left == false || body2.allowCollision.right == false) - { - this._overlap = 0; - } - else - { - body1.touching.left = true; - body2.touching.right = true; - } + body1.touching.right = true; + body2.touching.left = true; } } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - body1.overlapX = this._overlap; - body2.overlapX = this._overlap; - - if (body1.customSeparateX || body2.customSeparateX) + else if (body1.deltaX() < body2.deltaX()) { + // Body1 is moving left and/or Body2 is moving right + this._overlap = body1.x - body2.width - body2.x; + + if ((-this._overlap > this._maxOverlap) || body1.allowCollision.left == false || body2.allowCollision.right == false) + { + this._overlap = 0; + } + else + { + body1.touching.left = true; + body2.touching.right = true; + } + } + + // Then adjust their positions and velocities accordingly (if there was any overlap) + if (this._overlap != 0) + { + body1.overlapX = this._overlap; + body2.overlapX = this._overlap; + + if (body1.customSeparateX || body2.customSeparateX) + { + return true; + } + + this._velocity1 = body1.velocity.x; + this._velocity2 = body2.velocity.x; + + if (!body1.immovable && !body2.immovable) + { + this._overlap *= 0.5; + + body1.x = body1.x - this._overlap; + body2.x += this._overlap; + + this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); + this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); + this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; + this._newVelocity1 -= this._average; + this._newVelocity2 -= this._average; + + body1.velocity.x = this._average + this._newVelocity1 * body1.bounce.x; + body2.velocity.x = this._average + this._newVelocity2 * body2.bounce.x; + } + else if (!body1.immovable) + { + body1.x = body1.x - this._overlap; + body1.velocity.x = this._velocity2 - this._velocity1 * body1.bounce.x; + } + else if (!body2.immovable) + { + body2.x += this._overlap; + body2.velocity.x = this._velocity1 - this._velocity2 * body2.bounce.x; + } + return true; } - - this._velocity1 = body1.velocity.x; - this._velocity2 = body2.velocity.x; - - if (!body1.immovable && !body2.immovable) - { - this._overlap *= 0.5; - - body1.x = body1.x - this._overlap; - body2.x += this._overlap; - - this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); - this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); - this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; - this._newVelocity1 -= this._average; - this._newVelocity2 -= this._average; - - body1.velocity.x = this._average + this._newVelocity1 * body1.bounce.x; - body2.velocity.x = this._average + this._newVelocity2 * body2.bounce.x; - } - else if (!body1.immovable) - { - body1.x = body1.x - this._overlap; - body1.velocity.x = this._velocity2 - this._velocity1 * body1.bounce.x; - } - else if (!body2.immovable) - { - body2.x += this._overlap; - body2.velocity.x = this._velocity1 - this._velocity2 * body2.bounce.x; - } - - return true; - } - else - { - return false; } + return false; + }, /** @@ -26071,110 +26142,110 @@ Phaser.Physics.Arcade.prototype = { return false; } - // First, get the two body deltas this._overlap = 0; - if (body1.deltaY() != body2.deltaY()) + // Check if the hulls actually overlap + if (Phaser.Rectangle.intersects(body1, body2)) { - // Check if the Y hulls actually overlap - this._bounds1.setTo(body1.x, body1.y - ((body1.deltaY() > 0) ? body1.deltaY() : 0), body1.width, body1.height + body1.deltaAbsY()); - this._bounds2.setTo(body2.x, body2.y - ((body2.deltaY() > 0) ? body2.deltaY() : 0), body2.width, body2.height + body2.deltaAbsY()); + this._maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + this.OVERLAP_BIAS; - if ((this._bounds1.right > this._bounds2.x) && (this._bounds1.x < this._bounds2.right) && (this._bounds1.bottom > this._bounds2.y) && (this._bounds1.y < this._bounds2.bottom)) + if (body1.deltaY() == 0 && body2.deltaY() == 0) { - this._maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + this.OVERLAP_BIAS; + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaY() > body2.deltaY()) + { + // Body1 is moving down and/or Body2 is moving up + this._overlap = body1.y + body1.height - body2.y; - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (body1.deltaY() > body2.deltaY()) + if ((this._overlap > this._maxOverlap) || body1.allowCollision.down == false || body2.allowCollision.up == false) { - this._overlap = body1.y + body1.height - body2.y; - - if ((this._overlap > this._maxOverlap) || body1.allowCollision.down == false || body2.allowCollision.up == false) - { - this._overlap = 0; - } - else - { - body1.touching.down = true; - body2.touching.up = true; - } + this._overlap = 0; } - else if (body1.deltaY() < body2.deltaY()) + else { - this._overlap = body1.y - body2.height - body2.y; - - if ((-this._overlap > this._maxOverlap) || body1.allowCollision.up == false || body2.allowCollision.down == false) - { - this._overlap = 0; - } - else - { - body1.touching.up = true; - body2.touching.down = true; - } + body1.touching.down = true; + body2.touching.up = true; } } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - body1.overlapY = this._overlap; - body2.overlapY = this._overlap; - - if (body1.customSeparateY || body2.customSeparateY) + else if (body1.deltaY() < body2.deltaY()) { + // Body1 is moving up and/or Body2 is moving down + this._overlap = body1.y - body2.height - body2.y; + + if ((-this._overlap > this._maxOverlap) || body1.allowCollision.up == false || body2.allowCollision.down == false) + { + this._overlap = 0; + } + else + { + body1.touching.up = true; + body2.touching.down = true; + } + } + + // Then adjust their positions and velocities accordingly (if there was any overlap) + if (this._overlap != 0) + { + body1.overlapY = this._overlap; + body2.overlapY = this._overlap; + + if (body1.customSeparateY || body2.customSeparateY) + { + return true; + } + + this._velocity1 = body1.velocity.y; + this._velocity2 = body2.velocity.y; + + if (!body1.immovable && !body2.immovable) + { + this._overlap *= 0.5; + + body1.y = body1.y - this._overlap; + body2.y += this._overlap; + + this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); + this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); + this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; + this._newVelocity1 -= this._average; + this._newVelocity2 -= this._average; + + body1.velocity.y = this._average + this._newVelocity1 * body1.bounce.y; + body2.velocity.y = this._average + this._newVelocity2 * body2.bounce.y; + } + else if (!body1.immovable) + { + body1.y = body1.y - this._overlap; + body1.velocity.y = this._velocity2 - this._velocity1 * body1.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body2.active && body2.moves && (body1.deltaY() > body2.deltaY())) + { + body1.x += body2.x - body2.lastX; + } + } + else if (!body2.immovable) + { + body2.y += this._overlap; + body2.velocity.y = this._velocity1 - this._velocity2 * body2.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body1.sprite.active && body1.moves && (body1.deltaY() < body2.deltaY())) + { + body2.x += body1.x - body1.lastX; + } + } + return true; } - this._velocity1 = body1.velocity.y; - this._velocity2 = body2.velocity.y; - - if (!body1.immovable && !body2.immovable) - { - this._overlap *= 0.5; - - body1.y = body1.y - this._overlap; - body2.y += this._overlap; - - this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1); - this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1); - this._average = (this._newVelocity1 + this._newVelocity2) * 0.5; - this._newVelocity1 -= this._average; - this._newVelocity2 -= this._average; - - body1.velocity.y = this._average + this._newVelocity1 * body1.bounce.y; - body2.velocity.y = this._average + this._newVelocity2 * body2.bounce.y; - } - else if (!body1.immovable) - { - body1.y = body1.y - this._overlap; - body1.velocity.y = this._velocity2 - this._velocity1 * body1.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body2.active && body2.moves && (body1.deltaY() > body2.deltaY())) - { - body1.x += body2.x - body2.lastX; - } - } - else if (!body2.immovable) - { - body2.y += this._overlap; - body2.velocity.y = this._velocity1 - this._velocity2 * body2.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body1.sprite.active && body1.moves && (body1.deltaY() < body2.deltaY())) - { - body2.x += body1.x - body1.lastX; - } - } - - return true; - } - else - { - return false; } + + return false; + }, /** @@ -26190,7 +26261,6 @@ Phaser.Physics.Arcade.prototype = { if (separatedX || separatedY) { - object.body.postUpdate(); return true; } @@ -26371,6 +26441,160 @@ Phaser.Physics.Arcade.prototype = { return false; } + }, + + /** + * Separates the two objects on their x axis + * @param object The GameObject to separate + * @param tile The Tile to separate + * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. + */ + NEWseparateTileX: function (object, x, y, width, height, mass, collideLeft, collideRight, separate) { + + // Can't separate two immovable objects (tiles are always immovable) + if (object.immovable) + { + return false; + } + + this._overlap = 0; + + if (Phaser.Rectangle.intersectsRaw(object, x, x + width, y, y + height)) + { + this._maxOverlap = object.deltaAbsX() + this.OVERLAP_BIAS; + + if (object.deltaX() == 0) + { + // Object is stuck inside a tile and not moving + } + else if (object.deltaX() > 0) + { + // Going right ... + this._overlap = object.x + object.width - x; + + if ((this._overlap > this._maxOverlap) || !object.allowCollision.right || !collideLeft) + { + this._overlap = 0; + } + else + { + object.touching.right = true; + } + } + else if (object.deltaX() < 0) + { + // Going left ... + this._overlap = object.x - width - x; + + if ((-this._overlap > this._maxOverlap) || !object.allowCollision.left || !collideRight) + { + this._overlap = 0; + } + else + { + object.touching.left = true; + } + } + + if (this._overlap != 0) + { + if (separate) + { + object.x = object.x - this._overlap; + + if (object.bounce.x == 0) + { + object.velocity.x = 0; + } + else + { + object.velocity.x = -object.velocity.x * object.bounce.x; + } + } + return true; + } + + } + + return false; + + }, + + /** + * Separates the two objects on their x axis + * @param object The GameObject to separate + * @param tile The Tile to separate + * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. + */ + NEWseparateTileY: function (object, x, y, width, height, mass, collideUp, collideDown, separate) { + + // Can't separate two immovable objects (tiles are always immovable) + if (object.immovable) + { + return false; + } + + this._overlap = 0; + + if (Phaser.Rectangle.intersectsRaw(object, x, x + width, y, y + height)) + { + this._maxOverlap = object.deltaAbsY() + this.OVERLAP_BIAS; + + if (object.deltaY() == 0) + { + // Object is stuck inside a tile and not moving + } + else if (object.deltaY() > 0) + { + // Going down ... + this._overlap = object.bottom - y; + + // if (object.allowCollision.down && collideDown && this._overlap < this._maxOverlap) + if ((this._overlap > this._maxOverlap) || !object.allowCollision.down || !collideDown) + { + this._overlap = 0; + } + else + { + object.touching.down = true; + } + } + else if (object.deltaY() < 0) + { + // Going up ... + this._overlap = object.y - height - y; + + if ((-this._overlap > this._maxOverlap) || !object.allowCollision.up || !collideUp) + { + this._overlap = 0; + } + else + { + object.touching.up = true; + } + } + + if (this._overlap != 0) + { + if (separate) + { + object.y = object.y - this._overlap; + + if (object.bounce.y == 0) + { + object.velocity.y = 0; + } + else + { + object.velocity.y = -object.velocity.y * object.bounce.y; + } + } + return true; + } + } + + return false; + }, /** @@ -26747,8 +26971,8 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.x = sprite.x; this.y = sprite.y; - this.lastX = sprite.x; - this.lastY = sprite.y; + this.preX = sprite.x; + this.preY = sprite.y; // un-scaled original size this.sourceWidth = sprite.currentFrame.sourceSizeW; @@ -26784,6 +27008,7 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.allowCollision = { none: false, any: true, up: true, down: true, left: true, right: true }; this.touching = { none: true, up: false, down: false, left: false, right: false }; this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; + this.facing = Phaser.NONE; this.immovable = false; this.moves = true; @@ -26802,6 +27027,9 @@ Phaser.Physics.Arcade.Body = function (sprite) { this.overlapX = 0; this.overlapY = 0; + // If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true + this.embedded = false; + this.collideWorldBounds = false; }; @@ -26822,7 +27050,7 @@ Phaser.Physics.Arcade.Body.prototype = { }, - update: function () { + preUpdate: function () { // Store and reset collision flags this.wasTouching.none = this.touching.none; @@ -26837,15 +27065,14 @@ Phaser.Physics.Arcade.Body.prototype = { this.touching.left = false; this.touching.right = false; - this.lastX = this.x; - this.lastY = this.y; + this.embedded = false; + + this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; + this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; this.rotation = this.sprite.angle; - // There is a bug here in that the worldTransform values are what should be used, otherwise the quadTree gets the wrong rect given to it - this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; - this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.x = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.y = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; + this.x = this.preX; + this.y = this.preY; if (this.moves) { @@ -26864,31 +27091,47 @@ Phaser.Physics.Arcade.Body.prototype = { this.game.physics.quadTree.insert(this); } - if (this.deltaX() != 0) - { - this.sprite.x -= this.deltaX(); - } - - if (this.deltaY() != 0) - { - this.sprite.y -= this.deltaY(); - } - - // Adjust the sprite based on all of the above, so the x/y coords will be correct going into the State update - this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); - this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); - - if (this.allowRotation) - { - this.sprite.angle = this.rotation; - } - }, postUpdate: function () { - this.sprite.x = this.x - this.offset.x + (this.sprite.anchor.x * this.width); - this.sprite.y = this.y - this.offset.y + (this.sprite.anchor.y * this.height); + // Calculate forward-facing edge + if (this.deltaX() == 0 && this.deltaY() == 0) + { + // Can't work it out from the Body, how about from x position? + if (this.sprite.deltaX() == 0 && this.sprite.deltaY() == 0) + { + // still as a statue + } + } + + if (this.deltaX() < 0) + { + this.facing = Phaser.LEFT; + } + else if (this.deltaX() > 0) + { + this.facing = Phaser.RIGHT; + } + + if (this.deltaY() < 0) + { + this.facing = Phaser.UP; + } + else if (this.deltaY() > 0) + { + this.facing = Phaser.DOWN; + } + + if (this.deltaX() != 0) + { + this.sprite.x += this.deltaX(); + } + + if (this.deltaY() != 0) + { + this.sprite.y += this.deltaY(); + } if (this.allowRotation) { @@ -26946,10 +27189,9 @@ Phaser.Physics.Arcade.Body.prototype = { this.angularVelocity = 0; this.angularAcceleration = 0; - this.x = (this.sprite.x - (this.sprite.anchor.x * this.width)) + this.offset.x; - this.y = (this.sprite.y - (this.sprite.anchor.y * this.height)) + this.offset.y; - this.lastX = this.x; - this.lastY = this.y; + this.x = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; + this.y = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; + this.rotation = this.sprite.angle; }, @@ -26962,11 +27204,11 @@ Phaser.Physics.Arcade.Body.prototype = { }, deltaX: function () { - return this.x - this.lastX; + return this.x - this.preX; }, deltaY: function () { - return this.y - this.lastY; + return this.y - this.preY; } }; @@ -27837,6 +28079,8 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { */ Phaser.Tilemap.prototype.generateTiles = function (qty) { + console.log('generating', qty, 'tiles'); + for (var i = 0; i < qty; i++) { this.tiles.push(new Phaser.Tile(this.game, this, i, this.currentLayer.tileWidth, this.currentLayer.tileHeight)); @@ -28744,21 +28988,37 @@ Phaser.Tile.prototype = { this.collideUp = false; this.collideDown = false; - }, - - /** - * Returns a string representation of this object. - * @method toString - * @return {string} a string representation of the object. - **/ - toString: function () { - - // return "[{Tile (index=" + this.index + " collisions=" + this.allowCollisions + " width=" + this.width + " height=" + this.height + ")}]"; - return ''; - } }; + +Object.defineProperty(Phaser.Tile.prototype, "bottom", { + + /** + * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * @method bottom + * @return {Number} + **/ + get: function () { + return this.y + this.height; + } + +}); + +Object.defineProperty(Phaser.Tile.prototype, "right", { + + /** + * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. + * However it does affect the width property. + * @method right + * @return {Number} + **/ + get: function () { + return this.x + this.width; + } + +}); + Phaser.TilemapRenderer = function (game) { this.game = game; diff --git a/examples/games/starstruck.php b/examples/games/starstruck.php index 42bfb566..dc824516 100644 --- a/examples/games/starstruck.php +++ b/examples/games/starstruck.php @@ -38,10 +38,11 @@ map.setCollisionRange(18, 47, true, true, true, true); map.setCollisionRange(53, 69, true, true, true, true); - player = game.add.sprite(32, 32, 'dude'); + // player = game.add.sprite(32, 32, 'dude'); + player = game.add.sprite(250, 220, 'dude'); player.body.bounce.y = 0.2; player.body.collideWorldBounds = true; - player.body.gravity.y = 10; + // player.body.gravity.y = 10; player.animations.add('left', [0, 1, 2, 3], 10, true); player.animations.add('turn', [4], 20, true); @@ -56,6 +57,7 @@ game.physics.collide(player, map); player.body.velocity.x = 0; + player.body.velocity.y = 0; // player.body.acceleration.y = 500; if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) @@ -96,25 +98,33 @@ facing = 'idle'; } } - - if (game.input.keyboard.isDown(Phaser.Keyboard.UP) || game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR)) + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) { - if (player.body.touching.down && game.time.now > jumpTimer) - { - player.body.velocity.y = -200; - jumpTimer = game.time.now + 500; - } + player.body.velocity.y = -150; } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + player.body.velocity.y = 150; + } + + + // if (game.input.keyboard.isDown(Phaser.Keyboard.UP) || game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR)) + // { + // if (player.body.touching.down && game.time.now > jumpTimer) + // { + // player.body.velocity.y = -200; + // jumpTimer = game.time.now + 500; + // } + // } } function render() { - // game.debug.renderSpriteCorners(p); - // game.debug.renderSpriteCollision(p, 32, 320); - // game.debug.renderText(player.body.velocity.y, 32, 32, 'rgb(255,255,255)'); - // game.debug.renderText('left: ' + player.body.touching.left, 32, 32, 'rgb(255,255,255)'); - // game.debug.renderText('right: ' + player.body.touching.right, 32, 64, 'rgb(255,255,255)'); + game.debug.renderSpriteInfo(player, 32, 32); + game.debug.renderSpriteCorners(player, false, true); + game.debug.renderSpriteCollision(player, 32, 320); } diff --git a/src/animation/Animation.js b/src/animation/Animation.js index 64c72b9b..a5e8d271 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -79,6 +79,9 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope */ this._frameIndex = 0; + this._frameDiff = 0; + this._frameSkip = 1; + /** * @property {Phaser.Animation.Frame} currentFrame - The currently displayed frame of the Animation. */ @@ -181,13 +184,31 @@ Phaser.Animation.prototype = { if (this.isPlaying == true && this.game.time.now >= this._timeNextFrame) { - this._frameIndex++; + this._frameSkip = 1; - if (this._frameIndex == this._frames.length) + // Lagging? + this._frameDiff = this.game.time.now - this._timeNextFrame; + + this._timeLastFrame = this.game.time.now; + + if (this._frameDiff > this.delay) + { + // We need to skip a frame, work out how many + this._frameSkip = Math.floor(this._frameDiff / this.delay); + + this._frameDiff -= (this._frameSkip * this.delay); + } + + // And what's left now? + this._timeNextFrame = this.game.time.now + (this.delay - this._frameDiff); + + this._frameIndex += this._frameSkip; + + if (this._frameIndex >= this._frames.length) { if (this.looped) { - this._frameIndex = 0; + this._frameIndex = this._frameIndex - this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); this._parent.events.onAnimationLoop.dispatch(this._parent, this); @@ -203,9 +224,6 @@ Phaser.Animation.prototype = { this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); } - this._timeLastFrame = this.game.time.now; - this._timeNextFrame = this.game.time.now + this.delay; - return true; } @@ -260,12 +278,18 @@ Object.defineProperty(Phaser.Animation.prototype, "frameTotal", { }); +/** + * Sets the current frame to the given frame index and updates the texture cache. + * @param {number} value - The frame to display + * + *//** + * + * Returns the current frame, or if not set the index of the most recent frame. + * @returns {Animation.Frame} + * + */ Object.defineProperty(Phaser.Animation.prototype, "frame", { - /** - * @method frame - * @return {Animation.Frame} Returns the current frame, or if not set the index of the most recent frame. - */ get: function () { if (this.currentFrame !== null) @@ -279,10 +303,6 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { }, - /** - * @method frame - * @return {Number} Sets the current frame to the given frame index and updates the texture cache. - */ set: function (value) { this.currentFrame = this._frameData.getFrame(value); diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 094b6a15..57eb4b63 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -268,6 +268,11 @@ Phaser.Physics.Arcade.prototype = { collideGroupVsTilemap: function (group, tilemap, collideCallback, processCallback, callbackContext) { + if (group.length == 0) + { + return; + } + if (group._container.first._iNext) { var currentNode = group._container.first._iNext; @@ -322,6 +327,11 @@ Phaser.Physics.Arcade.prototype = { collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext) { + if (group.length == 0) + { + return; + } + // What is the sprite colliding with in the quadtree? this._potentials = this.quadTree.retrieve(sprite); @@ -353,6 +363,11 @@ Phaser.Physics.Arcade.prototype = { collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext) { + if (group1.length == 0 || group2.length == 0) + { + return; + } + if (group1._container.first._iNext) { var currentNode = group1._container.first._iNext; @@ -629,6 +644,181 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * Separates the two objects on their x axis + * @param object The GameObject to separate + * @param tile The Tile to separate + * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. + */ + OLDseparateTileX: function (object, x, y, width, height, mass, collideLeft, collideRight, separate) { + + // Can't separate two immovable objects (tiles are always immovable) + if (object.immovable) + { + return false; + } + + // First, get the object delta + this._overlap = 0; + + // console.log('separatedX', x, y, object.deltaX()); + + if (object.deltaX() != 0) + { + this._bounds1.setTo(object.x, object.y, object.width, object.height); + + if ((this._bounds1.right > x) && (this._bounds1.x < x + width) && (this._bounds1.bottom > y) && (this._bounds1.y < y + height)) + { + // The hulls overlap, let's process it + this._maxOverlap = object.deltaAbsX() + this.OVERLAP_BIAS; + + // TODO - We need to check if we're already inside of the tile, i.e. jumping through an n-way tile + // in which case we didn't ought to separate because it'll look like tunneling + + if (object.deltaX() > 0) + { + // Going right ... + this._overlap = object.x + object.width - x; + + if ((this._overlap > this._maxOverlap) || !object.allowCollision.right || !collideLeft) + { + this._overlap = 0; + } + else + { + object.touching.right = true; + } + } + else if (object.deltaX() < 0) + { + // Going left ... + this._overlap = object.x - width - x; + + if ((-this._overlap > this._maxOverlap) || !object.allowCollision.left || !collideRight) + { + this._overlap = 0; + } + else + { + object.touching.left = true; + } + } + } + } + + // Then adjust their positions and velocities accordingly (if there was any overlap) + if (this._overlap != 0) + { + if (separate) + { + object.x = object.x - this._overlap; + + if (object.bounce.x == 0) + { + object.velocity.x = 0; + } + else + { + object.velocity.x = -object.velocity.x * object.bounce.x; + } + } + return true; + } + else + { + return false; + } + + }, + + /** + * Separates the two objects on their x axis + * @param object The GameObject to separate + * @param tile The Tile to separate + * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. + */ + OLDseparateTileY: function (object, x, y, width, height, mass, collideUp, collideDown, separate) { + + // Can't separate two immovable objects (tiles are always immovable) + if (object.immovable) + { + return false; + } + + // First, get the object delta + this._overlap = 0; + + if (object.deltaY() != 0) + { + this._bounds1.setTo(object.x, object.y, object.width, object.height); + + if ((this._bounds1.right > x) && (this._bounds1.x < x + width) && (this._bounds1.bottom > y) && (this._bounds1.y < y + height)) + { + // The hulls overlap, let's process it + + // Not currently used, may need it so keep for now + this._maxOverlap = object.deltaAbsY() + this.OVERLAP_BIAS; + + // TODO - We need to check if we're already inside of the tile, i.e. jumping through an n-way tile + // in which case we didn't ought to separate because it'll look like tunneling + + if (object.deltaY() > 0) + { + // Going down ... + this._overlap = object.bottom - y; + + // if (object.allowCollision.down && collideDown && this._overlap < this._maxOverlap) + if ((this._overlap > this._maxOverlap) || !object.allowCollision.down || !collideDown) + { + this._overlap = 0; + } + else + { + object.touching.down = true; + } + } + else + { + // Going up ... + this._overlap = object.y - height - y; + + if ((-this._overlap > this._maxOverlap) || !object.allowCollision.up || !collideUp) + { + this._overlap = 0; + } + else + { + object.touching.up = true; + } + } + } + } + + // Then adjust their positions and velocities accordingly (if there was any overlap) + if (this._overlap != 0) + { + if (separate) + { + object.y = object.y - this._overlap; + + if (object.bounce.y == 0) + { + object.velocity.y = 0; + } + else + { + object.velocity.y = -object.velocity.y * object.bounce.y; + } + } + return true; + } + else + { + return false; + } + + }, + /** * Separates the two objects on their x axis * @param object The GameObject to separate @@ -645,17 +835,21 @@ Phaser.Physics.Arcade.prototype = { this._overlap = 0; + // Do we have any overlap at all? if (Phaser.Rectangle.intersectsRaw(object, x, x + width, y, y + height)) { this._maxOverlap = object.deltaAbsX() + this.OVERLAP_BIAS; if (object.deltaX() == 0) { - // Object is stuck inside a tile and not moving + // Object is either stuck inside the tile or only overlapping on the Y axis } else if (object.deltaX() > 0) { // Going right ... + + + this._overlap = object.x + object.width - x; if ((this._overlap > this._maxOverlap) || !object.allowCollision.right || !collideLeft) @@ -686,6 +880,7 @@ Phaser.Physics.Arcade.prototype = { { if (separate) { + console.log('x over', this._overlap); object.x = object.x - this._overlap; if (object.bounce.x == 0) @@ -762,6 +957,8 @@ Phaser.Physics.Arcade.prototype = { if (this._overlap != 0) { + console.log('y over', this._overlap); + if (separate) { object.y = object.y - this._overlap; diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 4e061e51..06ae389e 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -231,6 +231,7 @@ Phaser.Physics.Arcade.Body.prototype = { }, + // Basically Math.abs deltaAbsX: function () { return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); }, diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index fa695266..40eec6c8 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -138,6 +138,8 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { continue; } + // layer.createQuadTree(json.tilewidth * json.layers[i].width, json.tileheight * json.layers[i].height); + layer.alpha = json.layers[i].opacity; layer.visible = json.layers[i].visible; layer.tileMargin = json.tilesets[0].margin; @@ -183,8 +185,6 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { */ Phaser.Tilemap.prototype.generateTiles = function (qty) { - console.log('generating', qty, 'tiles'); - for (var i = 0; i < qty; i++) { this.tiles.push(new Phaser.Tile(this.game, this, i, this.currentLayer.tileWidth, this.currentLayer.tileHeight)); diff --git a/src/tilemap/TilemapLayer.js b/src/tilemap/TilemapLayer.js index 28f4a710..8e5487ee 100644 --- a/src/tilemap/TilemapLayer.js +++ b/src/tilemap/TilemapLayer.js @@ -87,6 +87,8 @@ Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, til this._alpha = 1; + this.quadTree = null; + this.canvas = null; this.context = null; this.baseTexture = null; @@ -472,6 +474,12 @@ Phaser.TilemapLayer.prototype = { this.parent.addChild(this.sprite); + }, + + createQuadTree: function (width, height) { + + this.quadTree = new Phaser.QuadTree(this, 0, 0, width, height, 20, 4); + }, /** diff --git a/src/tilemap/TilemapRenderer.js b/src/tilemap/TilemapRenderer.js index dc7a4752..bd881058 100644 --- a/src/tilemap/TilemapRenderer.js +++ b/src/tilemap/TilemapRenderer.js @@ -112,8 +112,15 @@ Phaser.TilemapRenderer.prototype = { layer.tileWidth, layer.tileHeight ); + + if (tilemap.tiles[this._columnData[tile]].collideNone == false) + { + layer.context.fillStyle = 'rgba(255,255,0,0.5)'; + layer.context.fillRect(this._tx, this._ty, layer.tileWidth, layer.tileHeight); + } } + this._tx += layer.tileWidth; } diff --git a/src/utils/Debug.js b/src/utils/Debug.js index b197927e..6516684e 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -398,8 +398,10 @@ Phaser.Utils.Debug.prototype = { // this.line('ty: ' + sprite.worldTransform[5]); // this.line('skew x: ' + sprite.worldTransform[3]); // this.line('skew y: ' + sprite.worldTransform[1]); - // this.line('dx: ' + sprite.body.deltaX()); - // this.line('dy: ' + sprite.body.deltaY()); + this.line('dx: ' + sprite.body.deltaX()); + this.line('dy: ' + sprite.body.deltaY()); + this.line('sdx: ' + sprite.deltaX()); + this.line('sdy: ' + sprite.deltaY()); // this.line('inCamera: ' + this.game.renderer.spriteRenderer.inCamera(this.game.camera, sprite)); From e77dba402c4e7206e8f07f2a82642f890c83fe92 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 24 Sep 2013 15:59:10 +0100 Subject: [PATCH 005/125] Beta warning added. --- src/Phaser.js | 2 +- src/core/Game.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Phaser.js b/src/Phaser.js index a3265766..662b1a94 100644 --- a/src/Phaser.js +++ b/src/Phaser.js @@ -3,7 +3,7 @@ */ var Phaser = Phaser || { - VERSION: '1.0.6', + VERSION: '1.0.7-beta', GAMES: [], AUTO: 0, CANVAS: 1, diff --git a/src/core/Game.js b/src/core/Game.js index 7f14380f..c24dbb40 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -322,6 +322,11 @@ Phaser.Game.prototype = { console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000'); } + if (Phaser.VERSION.substr(-5) == '-beta') + { + console.warn('You are using a beta version of Phaser. Some things may not work.'); + } + this.isRunning = true; this._loadComplete = false; From 3a369d548521cf6bd2fe0759962f181b876ac4d9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 26 Sep 2013 11:25:36 +0100 Subject: [PATCH 006/125] Added zwoptex Phaser template. --- Docs/API/api.js | 16 - Docs/API/assets/css/external-small.png | Bin 491 -> 0 bytes Docs/API/assets/css/logo.png | Bin 6308 -> 0 bytes Docs/API/assets/css/main.css | 783 -------- Docs/API/assets/favicon.png | Bin 740 -> 0 bytes Docs/API/assets/img/spinner.gif | Bin 2685 -> 0 bytes Docs/API/assets/index.html | 10 - Docs/API/assets/js/api-filter.js | 52 - Docs/API/assets/js/api-list.js | 251 --- Docs/API/assets/js/api-search.js | 98 - Docs/API/assets/js/apidocs.js | 370 ---- Docs/API/assets/js/yui-prettify.js | 17 - Docs/API/assets/vendor/prettify/CHANGES.html | 130 -- Docs/API/assets/vendor/prettify/COPYING | 202 -- Docs/API/assets/vendor/prettify/README.html | 203 -- .../assets/vendor/prettify/prettify-min.css | 1 - .../assets/vendor/prettify/prettify-min.js | 1 - Docs/API/classes/TimeManager.html | 1744 ----------------- Docs/API/data.json | 364 ---- .../files/.._Phaser_time_TimeManager.ts.html | 372 ---- Docs/API/index.html | 124 -- Docs/API/modules/Phaser.html | 147 -- Docs/docs_build.bat | 1 - Docs/docs_server.bat | 1 - Docs/yuidoc-theme-dana | 1 - Docs/zwoptex-phaser.template | 40 + examples/input/multi touch.php | 43 + 27 files changed, 83 insertions(+), 4888 deletions(-) delete mode 100644 Docs/API/api.js delete mode 100644 Docs/API/assets/css/external-small.png delete mode 100644 Docs/API/assets/css/logo.png delete mode 100644 Docs/API/assets/css/main.css delete mode 100644 Docs/API/assets/favicon.png delete mode 100644 Docs/API/assets/img/spinner.gif delete mode 100644 Docs/API/assets/index.html delete mode 100644 Docs/API/assets/js/api-filter.js delete mode 100644 Docs/API/assets/js/api-list.js delete mode 100644 Docs/API/assets/js/api-search.js delete mode 100644 Docs/API/assets/js/apidocs.js delete mode 100644 Docs/API/assets/js/yui-prettify.js delete mode 100644 Docs/API/assets/vendor/prettify/CHANGES.html delete mode 100644 Docs/API/assets/vendor/prettify/COPYING delete mode 100644 Docs/API/assets/vendor/prettify/README.html delete mode 100644 Docs/API/assets/vendor/prettify/prettify-min.css delete mode 100644 Docs/API/assets/vendor/prettify/prettify-min.js delete mode 100644 Docs/API/classes/TimeManager.html delete mode 100644 Docs/API/data.json delete mode 100644 Docs/API/files/.._Phaser_time_TimeManager.ts.html delete mode 100644 Docs/API/index.html delete mode 100644 Docs/API/modules/Phaser.html delete mode 100644 Docs/docs_build.bat delete mode 100644 Docs/docs_server.bat delete mode 160000 Docs/yuidoc-theme-dana create mode 100644 Docs/zwoptex-phaser.template create mode 100644 examples/input/multi touch.php diff --git a/Docs/API/api.js b/Docs/API/api.js deleted file mode 100644 index 12711933..00000000 --- a/Docs/API/api.js +++ /dev/null @@ -1,16 +0,0 @@ -YUI.add("yuidoc-meta", function(Y) { - Y.YUIDoc = { meta: { - "classes": [ - "TimeManager" - ], - "modules": [ - "Phaser" - ], - "allModules": [ - { - "displayName": "Phaser", - "name": "Phaser" - } - ] -} }; -}); \ No newline at end of file diff --git a/Docs/API/assets/css/external-small.png b/Docs/API/assets/css/external-small.png deleted file mode 100644 index 759a1cdcb5b1697e5be290d98b830e279cd71f3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 491 zcmVDs{zR1^XE?tfB*h@ASKHAa7wwn{MEbP z7_^nS7{V*>+A}bS;P%45fB%Ai|Neasi2rl3{=EO;!w318%8Ovl7jArHc=P5Brfr~D z0AYimtss2w$hlYlfd>7*aO3TNzw875LBK0xAD9Np|A(oEVYnB*eE9~V6wP%78SXuL z&#-X)Er#`zY#Ce)^8hM>B_8 diff --git a/Docs/API/assets/css/logo.png b/Docs/API/assets/css/logo.png deleted file mode 100644 index 609b336c7cc5ef0c787a0068d221d9b8d69b1241..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6308 zcmV;V7+dFwP)EI3}K zJAc0RviDlMYT7$`hje!Kj@LB3B$v~Qd;9X^3|$AqFu>69Z0KMbrezvAWa@n&$tpT| zTCH{cyjdVi(gp+w@V^dOksB0A>WW6xhIlO6Tv?HM0X_i}I#y60{PpGwx9vPMtFtRN zzNw#+=Tj2u`-uL(#+a*U!Mhu zc*G(+@nj+A1708rA$uKO;<-VVr3MVYxhNW0pGl{-r;6j7{t5L6rgfY5PJ8CL9kUwu zbudgU8eg2Ex&np2&cRTd`wY)J^i1Ra5;fuU*mdm4tUfgDMK5-q{|m=*>K zmt0VX&YeBdQ=)fa$R^1smi%+SgBQrVaGN@ES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bHOc-B&*w6MTiu`molOp4j)*Q{iGik72{Q6bry!7Iq=Fd89#@Nf_ zMao|#?58}SLgmQ4Ps$b-OrglYsfhqUZ?FFTsznFe`>qTh&7g-A9D>CL+Z1DeI;kQMSlA}X2`)^_Q>|!@#k7am zF$>th3Ouvk+S*AT?r_d!Ispk2j4>k%+4F!CpxH1aH(=$W@nBGA@go`N`TRRS^tVe= zVhj$J+ZnXK6*pY;Nz!2VR4E-ivgI_5N(FkF)X8|G&RN_)V4 z^8;SC9PEJBHiKUA@M>%sOoNFuc_40YuzXX%6a!2re+-FUo#?{itQUI++@fKWgrp{% za{YYL_>p&i5RY9P5!9DAHBZqrV*+2Ww}R=5DXNn#;@bh!n9&(Vp>AI0r#8qjscvIi zZq7Hzw8yf02CRO5Grn5;WgpY0)X-qZZFN6|KwjX($e)3WJd5BxpydTYY~YI6z{mS- zy+bVDweuVGUc&3TN%pbtIi&fOe4g(2(6d5JH*?bg`^pZNrCl)NzP zqd?lzy!RkHvSbY$?2u?(m{ydWi1Xhsp9wRkW$hFT|3LIL$0hB+3% zlAJISiP2|l=xwp1s6vIAV;uN&MpR{4CR4J!Zp`rG?p;d9!FTw&p&s> z6`4$o1K1x}=DlUX*WZX`JA{s+ycjgcc-a|IlvVLWY}H98j(Z4>k}&_nY<%rV8byJt0*nyoo@3wI~{SwW6$a{pgX^&%sA5cF)n9#9&GxwgR z{Zs0xV^FE`UP%o^P=X8QK;aQ!TAjwSMDZdq=Skc3kWr9qOVj$|TMUy@2RjU7Gg zIrtb)=y-bFI+?cA|6}%{w$5tu%FgzVo|%5E5)Kw8`kl#Syxx^LPA%$(R%SQBCwTgQ a0R{k+kX}`<%LV)Z0000
-   blocks. */
-pre code, pre kbd, pre samp { font-size: 100%; }
-
-/* Used to denote text that shouldn't be selectable, such as line numbers or
-   shell prompts. Guess which browser this doesn't work in. */
-.noselect {
-    -moz-user-select: -moz-none;
-    -khtml-user-select: none;
-    -webkit-user-select: none;
-    -o-user-select: none;
-    user-select: none;
-}
-
-/* -- Lists ----------------------------------------------------------------- */
-dd { margin: 0.2em 0 0.7em 1em; }
-dl { margin: 1em 0; }
-dt { font-weight: bold; }
-
-/* -- Tables ---------------------------------------------------------------- */
-caption, th { text-align: left; }
-
-table {
-    border-collapse: collapse;
-    width: 100%;
-}
-
-td, th {
-    border: 1px solid #fff;
-    padding: 5px 12px;
-    vertical-align: top;
-}
-
-td { background: #E6E9F5; }
-td dl { margin: 0; }
-td dl dl { margin: 1em 0; }
-td pre:first-child { margin-top: 0; }
-
-th {
-    background: #D2D7E6;/*#97A0BF*/
-    border-bottom: none;
-    border-top: none;
-    color: #000;/*#FFF1D5*/
-    font-family: 'Trebuchet MS', sans-serif;
-    font-weight: bold;
-    line-height: 1.3;
-    white-space: nowrap;
-}
-
-
-/* -- Layout and Content ---------------------------------------------------- */
-#doc {
-    margin: auto;
-    min-width: 1024px;
-}
-
-.content { padding: 0 20px 0 25px; }
-
-.sidebar {
-    padding: 0 15px 0 10px;
-}
-#bd {
-    padding: 7px 0 130px;
-    position: relative;
-    width: 99%;
-}
-
-/* -- Table of Contents ----------------------------------------------------- */
-
-/* The #toc id refers to the single global table of contents, while the .toc
-   class refers to generic TOC lists that could be used throughout the page. */
-
-.toc code, .toc kbd, .toc samp { font-size: 100%; }
-.toc li { font-weight: bold; }
-.toc li li { font-weight: normal; }
-
-/* -- Intro and Example Boxes ----------------------------------------------- */
-/*
-.intro, .example { margin-bottom: 2em; }
-.example {
-    -moz-border-radius: 4px;
-    -webkit-border-radius: 4px;
-    border-radius: 4px;
-    -moz-box-shadow: 0 0 5px #bfbfbf;
-    -webkit-box-shadow: 0 0 5px #bfbfbf;
-    box-shadow: 0 0 5px #bfbfbf;
-    padding: 1em;
-}
-.intro {
-    background: none repeat scroll 0 0 #F0F1F8; border: 1px solid #D4D8EB; padding: 0 1em;
-}
-*/
-
-/* -- Other Styles ---------------------------------------------------------- */
-
-/* These are probably YUI-specific, and should be moved out of Selleck's default
-   theme. */
-
-.button {
-    border: 1px solid #dadada;
-    -moz-border-radius: 3px;
-    -webkit-border-radius: 3px;
-    border-radius: 3px;
-    color: #444;
-    display: inline-block;
-    font-family: Helvetica, Arial, sans-serif;
-    font-size: 92.308%;
-    font-weight: bold;
-    padding: 4px 13px 3px;
-    -moz-text-shadow: 1px 1px 0 #fff;
-    -webkit-text-shadow: 1px 1px 0 #fff;
-    text-shadow: 1px 1px 0 #fff;
-    white-space: nowrap;
-
-    background: #EFEFEF; /* old browsers */
-    background: -moz-linear-gradient(top, #f5f5f5 0%, #efefef 50%, #e5e5e5 51%, #dfdfdf 100%); /* firefox */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(50%,#efefef), color-stop(51%,#e5e5e5), color-stop(100%,#dfdfdf)); /* webkit */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */
-}
-
-.button:hover {
-    border-color: #466899;
-    color: #fff;
-    text-decoration: none;
-    -moz-text-shadow: 1px 1px 0 #222;
-    -webkit-text-shadow: 1px 1px 0 #222;
-    text-shadow: 1px 1px 0 #222;
-
-    background: #6396D8; /* old browsers */
-    background: -moz-linear-gradient(top, #6396D8 0%, #5A83BC 50%, #547AB7 51%, #466899 100%); /* firefox */
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6396D8), color-stop(50%,#5A83BC), color-stop(51%,#547AB7), color-stop(100%,#466899)); /* webkit */
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */
-}
-
-.newwindow { text-align: center; }
-
-.header .version em {
-    display: block;
-    text-align: right;
-}
-
-
-#classdocs .item {
-    border-bottom: 1px solid #466899;
-    margin: 1em 0;
-    padding: 1.5em;
-}
-
-#classdocs .item .params p,
-    #classdocs .item .returns p,{
-    display: inline;
-}
-
-#classdocs .item em code, #classdocs .item em.comment {
-    color: green;
-}
-
-#classdocs .item em.comment a {
-    color: green;
-    text-decoration: underline;
-}
-
-#classdocs .foundat {
-    font-size: 11px;
-    font-style: normal;
-}
-
-.attrs .emits {
-    margin-left: 2em;
-    padding: .5em;
-    border-left: 1px dashed #ccc;
-}
-
-abbr {
-    border-bottom: 1px dashed #ccc;
-    font-size: 80%;
-    cursor: help;
-}
-
-.prettyprint li.L0, 
-.prettyprint li.L1, 
-.prettyprint li.L2, 
-.prettyprint li.L3, 
-.prettyprint li.L5, 
-.prettyprint li.L6, 
-.prettyprint li.L7, 
-.prettyprint li.L8 {
-    list-style: decimal;
-}
-
-ul li p {
-    margin-top: 0;
-}
-
-.method .name {
-    font-size: 110%;
-}
-
-.apidocs .methods .extends .method,
-.apidocs .properties .extends .property,
-.apidocs .attrs .extends .attr,
-.apidocs .events .extends .event {
-    font-weight: bold;
-}
-
-.apidocs .methods .extends .inherited,
-.apidocs .properties .extends .inherited,
-.apidocs .attrs .extends .inherited,
-.apidocs .events .extends .inherited {
-    font-weight: normal;
-}
-
-#hd {
-    background: whiteSmoke;
-    background: -moz-linear-gradient(top,#DCDBD9 0,#F6F5F3 100%);
-    background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#DCDBD9),color-stop(100%,#F6F5F3));
-    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0);
-    border-bottom: 1px solid #DFDFDF;
-    padding: 0 15px 1px 20px;
-    margin-bottom: 15px;
-}
-
-#hd img {
-    margin-right: 10px;
-    vertical-align: middle;
-}
-
-
-/* -- API Docs CSS ---------------------------------------------------------- */
-
-/*
-This file is organized so that more generic styles are nearer the top, and more
-specific styles are nearer the bottom of the file. This allows us to take full
-advantage of the cascade to avoid redundant style rules. Please respect this
-convention when making changes.
-*/
-
-/* -- Generic TabView styles ------------------------------------------------ */
-
-/*
-These styles apply to all API doc tabviews. To change styles only for a
-specific tabview, see the other sections below.
-*/
-
-.yui3-js-enabled .apidocs .tabview {
-    visibility: hidden; /* Hide until the TabView finishes rendering. */
-    _visibility: visible;
-}
-
-.apidocs .tabview.yui3-tabview-content { visibility: visible; }
-.apidocs .tabview .yui3-tabview-panel { background: #fff; }
-
-/* -- Generic Content Styles ------------------------------------------------ */
-
-/* Headings */
-h2, h3, h4, h5, h6 {
-    border: none;
-    color: #30418C;
-    font-weight: bold;
-    text-decoration: none;
-}
-
-.link-docs {
-    float: right;
-    font-size: 15px;
-    margin: 4px 4px 6px;
-    padding: 6px 30px 5px;
-}
-
-.apidocs { zoom: 1; }
-
-/* Generic box styles. */
-.apidocs .box {
-    border: 1px solid;
-    border-radius: 3px;
-    margin: 1em 0;
-    padding: 0 1em;
-}
-
-/* A flag is a compact, capsule-like indicator of some kind. It's used to
-   indicate private and protected items, item return types, etc. in an
-   attractive and unobtrusive way. */
-.apidocs .flag {
-    background: #bababa;
-    border-radius: 3px;
-    color: #fff;
-    font-size: 11px;
-    margin: 0 0.5em;
-    padding: 2px 4px 1px;
-}
-
-/* Class/module metadata such as "Uses", "Extends", "Defined in", etc. */
-.apidocs .meta {
-    background: #f9f9f9;
-    border-color: #efefef;
-    color: #555;
-    font-size: 11px;
-    padding: 3px 6px;
-}
-
-.apidocs .meta p { margin: 0; }
-
-/* Deprecation warning. */
-.apidocs .box.deprecated,
-.apidocs .flag.deprecated {
-    background: #fdac9f;
-    border: 1px solid #fd7775;
-}
-
-.apidocs .box.deprecated p { margin: 0.5em 0; }
-.apidocs .flag.deprecated { color: #333; }
-
-/* Module/Class intro description. */
-.apidocs .intro {
-    background: #f0f1f8;
-    border-color: #d4d8eb;
-}
-
-/* Loading spinners. */
-#bd.loading .apidocs,
-#api-list.loading .yui3-tabview-panel {
-    background: #fff url(../img/spinner.gif) no-repeat center 70px;
-    min-height: 150px;
-}
-
-#bd.loading .apidocs .content,
-#api-list.loading .yui3-tabview-panel .apis {
-    display: none;
-}
-
-.apidocs .no-visible-items { color: #666; }
-
-/* Generic inline list. */
-.apidocs ul.inline {
-    display: inline;
-    list-style: none;
-    margin: 0;
-    padding: 0;
-}
-
-.apidocs ul.inline li { display: inline; }
-
-/* Comma-separated list. */
-.apidocs ul.commas li:after { content: ','; }
-.apidocs ul.commas li:last-child:after { content: ''; }
-
-/* Keyboard shortcuts. */
-kbd .cmd { font-family: Monaco, Helvetica; }
-
-/* -- Generic Access Level styles ------------------------------------------- */
-.apidocs .item.protected,
-.apidocs .item.private,
-.apidocs .index-item.protected,
-.apidocs .index-item.deprecated,
-.apidocs .index-item.private {
-    display: none;
-}
-
-.show-deprecated .item.deprecated,
-.show-deprecated .index-item.deprecated,
-.show-protected .item.protected,
-.show-protected .index-item.protected,
-.show-private .item.private,
-.show-private .index-item.private {
-    display: block;
-}
-
-.hide-inherited .item.inherited,
-.hide-inherited .index-item.inherited {
-    display: none;
-}
-
-/* -- Generic Item Index styles --------------------------------------------- */
-.apidocs .index { margin: 1.5em 0 3em; }
-
-.apidocs .index h3 {
-    border-bottom: 1px solid #efefef;
-    color: #333;
-    font-size: 13px;
-    margin: 2em 0 0.6em;
-    padding-bottom: 2px;
-}
-
-.apidocs .index .no-visible-items { margin-top: 2em; }
-
-.apidocs .index-list {
-    border-color: #efefef;
-    font-size: 12px;
-    list-style: none;
-    margin: 0;
-    padding: 0;
-    -moz-column-count: 4;
-    -moz-column-gap: 10px;
-    -moz-column-width: 170px;
-    -ms-column-count: 4;
-    -ms-column-gap: 10px;
-    -ms-column-width: 170px;
-    -o-column-count: 4;
-    -o-column-gap: 10px;
-    -o-column-width: 170px;
-    -webkit-column-count: 4;
-    -webkit-column-gap: 10px;
-    -webkit-column-width: 170px;
-    column-count: 4;
-    column-gap: 10px;
-    column-width: 170px;
-}
-
-.apidocs .no-columns .index-list {
-    -moz-column-count: 1;
-    -ms-column-count: 1;
-    -o-column-count: 1;
-    -webkit-column-count: 1;
-    column-count: 1;
-}
-
-.apidocs .index-item { white-space: nowrap; }
-
-.apidocs .index-item .flag {
-    background: none;
-    border: none;
-    color: #afafaf;
-    display: inline;
-    margin: 0 0 0 0.2em;
-    padding: 0;
-}
-
-/* -- Generic API item styles ----------------------------------------------- */
-.apidocs .args {
-    display: inline;
-    margin: 0 0.5em;
-}
-
-.apidocs .flag.chainable { background: #46ca3b; }
-.apidocs .flag.protected { background: #9b86fc; }
-.apidocs .flag.private { background: #fd6b1b; }
-.apidocs .flag.async { background: #356de4; }
-.apidocs .flag.required { background: #e60923; }
-
-.apidocs .item {
-    border-bottom: 1px solid #efefef;
-    margin: 1.5em 0 2em;
-    padding-bottom: 2em;
-}
-
-.apidocs .item h4,
-.apidocs .item h5,
-.apidocs .item h6 {
-    color: #333;
-    font-family: inherit;
-    font-size: 100%;
-}
-
-.apidocs .item .description p,
-.apidocs .item pre.code {
-    margin: 1em 0 0;
-}
-
-.apidocs .item .meta {
-    background: none;
-    border: none;
-    padding: 0;
-}
-
-.apidocs .item .name {
-    display: inline;
-    font-size: 14px;
-}
-
-.apidocs .item .type,
-.apidocs .item .type a,
-.apidocs .returns-inline {
-    color: #555;
-}
-
-.apidocs .item .type,
-.apidocs .returns-inline {
-    font-size: 11px;
-    margin: 0 0 0 0;
-}
-
-.apidocs .item .type a { border-bottom: 1px dotted #afafaf; }
-.apidocs .item .type a:hover { border: none; }
-
-/* -- Item Parameter List --------------------------------------------------- */
-.apidocs .params-list {
-    list-style: square;
-    margin: 1em 0 0 2em;
-    padding: 0;
-}
-
-.apidocs .param { margin-bottom: 1em; }
-
-.apidocs .param .type,
-.apidocs .param .type a {
-    color: #666;
-}
-
-.apidocs .param .type {
-    margin: 0 0 0 0.5em;
-    *margin-left: 0.5em;
-}
-
-.apidocs .param-name { font-weight: bold; }
-
-/* -- Item "Emits" block ---------------------------------------------------- */
-.apidocs .item .emits {
-    background: #f9f9f9;
-    border-color: #eaeaea;
-}
-
-/* -- Item "Returns" block -------------------------------------------------- */
-.apidocs .item .returns .type,
-.apidocs .item .returns .type a {
-    font-size: 100%;
-    margin: 0;
-}
-
-/* -- Class Constructor block ----------------------------------------------- */
-.apidocs .constructor .item {
-    border: none;
-    padding-bottom: 0;
-}
-
-/* -- File Source View ------------------------------------------------------ */
-.apidocs .file pre.code,
-#doc .apidocs .file pre.prettyprint {
-    background: inherit;
-    border: none;
-    overflow: visible;
-    padding: 0;
-}
-
-.apidocs .L0,
-.apidocs .L1,
-.apidocs .L2,
-.apidocs .L3,
-.apidocs .L4,
-.apidocs .L5,
-.apidocs .L6,
-.apidocs .L7,
-.apidocs .L8,
-.apidocs .L9 {
-    background: inherit;
-}
-
-/* -- Submodule List -------------------------------------------------------- */
-.apidocs .module-submodule-description {
-    font-size: 12px;
-    margin: 0.3em 0 1em;
-}
-
-.apidocs .module-submodule-description p:first-child { margin-top: 0; }
-
-/* -- Sidebar TabView ------------------------------------------------------- */
-#api-tabview { margin-top: 0.6em; }
-
-#api-tabview-filter,
-#api-tabview-panel {
-    border: 1px solid #dfdfdf;
-}
-
-#api-tabview-filter {
-    border-bottom: none;
-    border-top: none;
-    padding: 0.6em 10px 0 10px;
-}
-
-#api-tabview-panel { border-top: none; }
-#api-filter { width: 97%; }
-
-/* -- Content TabView ------------------------------------------------------- */
-#classdocs .yui3-tabview-panel { border: none; }
-
-/* -- Source File Contents -------------------------------------------------- */
-.prettyprint li.L0,
-.prettyprint li.L1,
-.prettyprint li.L2,
-.prettyprint li.L3,
-.prettyprint li.L5,
-.prettyprint li.L6,
-.prettyprint li.L7,
-.prettyprint li.L8 {
-    list-style: decimal;
-}
-
-/* -- API options ----------------------------------------------------------- */
-#api-options {
-    font-size: 11px;
-    margin-top: 2.2em;
-    position: absolute;
-    right: 1.5em;
-}
-
-/*#api-options label { margin-right: 0.6em; }*/
-
-/* -- API list -------------------------------------------------------------- */
-#api-list {
-    margin-top: 1.5em;
-    *zoom: 1;
-}
-
-.apis {
-    font-size: 12px;
-    line-height: 1.4;
-    list-style: none;
-    margin: 0;
-    padding: 0.5em 0 0.5em 0.4em;
-}
-
-.apis a {
-    border: 1px solid transparent;
-    display: block;
-    margin: 0 0 0 -4px;
-    padding: 1px 4px 0;
-    text-decoration: none;
-    _border: none;
-    _display: inline;
-}
-
-.apis a:hover,
-.apis a:focus {
-    background: #E8EDFC;
-    background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%);
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E8EDFC), color-stop(100%,#BECEF7));
-    border-color: #AAC0FA;
-    border-radius: 3px;
-    color: #333;
-    outline: none;
-}
-
-.api-list-item a:hover,
-.api-list-item a:focus {
-    font-weight: bold;
-    text-shadow: 1px 1px 1px #fff;
-}
-
-.apis .message { color: #888; }
-.apis .result a { padding: 3px 5px 2px; }
-
-.apis .result .type {
-    right: 4px;
-    top: 7px;
-}
-
-.api-list-item .yui3-highlight {
-    font-weight: bold;
-}
-
diff --git a/Docs/API/assets/favicon.png b/Docs/API/assets/favicon.png
deleted file mode 100644
index 5a95ddab6ff6735b52596ecea54f2b68298cae91..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 740
zcmV~sYqK3Gcus4xPHVF@NRlx_jU+UHO>DGCVWd%Mvj6}8PiwO?MUOK>
zh#e_-OJS-kK8Z|Xt0XgkGe(eqj=e%xpEO30J581!Eqg~?q%T2?Ek21)YqKpribYwO
zO>DFvE_`l(vNA-DP-?S5PK0`q!bDh@Mq8vgOqNb&rhJXTL|2zvaI{oyv}%RBafiZK
zXPjk$xItE*Ls+3FH-t7xlT2l%b%(okjlX(}z(iM=T5+{UVWUxLu~2HVQ*5(wfwpIY
zx^suTO<$u_Wt}fTi)DPfVSTqxX0Jh2pF>!pWqY$FG=V!yh%`o#I!lpBUZ_i9sy$Mh
zbd0`wjKM-wmsoDGM_{8+Xt7mktWRsRQE9SmezIwQzG;8GYk{~+U!725o-93xU~{x&
zdA3hxu0U0uNL!jG$nRJA=b%wh=O^H2C
zi#SY{S8At7V4_fHuux~PPinJicdKW6vS@y|OI(^NI)+?xw@qZNU~r`!DtSIqoCqvd
zm;e9(D|Av$Qve|DfN(%S$B)~`AYc$64eo$|fIvW?+s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b0a>)OpldGRYLW-}Rgrhi;mT3&%e
zb^^cg9z2rK8N!u+qrAU$JXq=Q$F%*?-T?FD#nCSJ%RJ
zM8EzX-KiKhdEPdX+W9(2!>6Tj7tGHG(@GXIHcI#ZvuG)z`cvk-VdBK*c|$UxeEHgt
zh|eHoo#Hc@pK-so^azG|S%hK;SFlf#7sO=2{OEwvn5bYJuJ)RU!t37+vAHhjqeCDD7^hxtbsYzs?)RgAac-&SQ9q*ejs5N9;>zmK
zPUNUo2`H82%N0r`1gQ%0iFCS%U#Nn#S`7$YER~j(tMN9rtZI;7tOElDR#vuErF^v%
z*JNdL`G(A{(F)h2u*1gkN>^r%0ek*
zgATbqYlGa_bGv|KZA}7qZy-^>7P2IOH6RK_p0{{FP*Z?`0Sgup2zfAw7b+2os*;)q
z+5#lPY#aSu@*Qn1b)Pw6htWZ`zgMBUpw<*kdk!
zI2X()g6*)r9wu>OjUHjg4XG}it7AJ{SYC~${GkN#!Sq}P9oXlOJoAHCyhZJk<7)Dy2%T-Q`9NtoT?
zY$ef_KCTe&F^x^D+|KF=eiSu@+>KzjBXCcw!o>=<#ex+Z!{Kbw1y5|(6?AL-F>Q@`
zuo>r&XN^`QxOtZJWT7R`yM{vkjX0hzY5o_L9GG#?(B^5qQxb*`lhBZP;sO;+aia2c
zCaZudbVWYTsS0qtA`?@uVQ$EHXcr9BK!#y*gOuzZfplYa;d_x0w1J4;p)O;uTj$;O
zv99g_E?%o3GlPCna4l!>3Kn6$TmgB^SaLxzk9U(vpJzOlL7uAtVwlUNiF4YB+lX<^
pE|2Kr%d?-r>ImN9F0EXz^8E;tU2&^Zb%igPc${)^%gY+r_aA#xUsC`8

diff --git a/Docs/API/assets/index.html b/Docs/API/assets/index.html
deleted file mode 100644
index 487fe15b..00000000
--- a/Docs/API/assets/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-    
-        Redirector
-        
-    
-    
-        Click here to redirect
-    
-
diff --git a/Docs/API/assets/js/api-filter.js b/Docs/API/assets/js/api-filter.js
deleted file mode 100644
index 37aefbab..00000000
--- a/Docs/API/assets/js/api-filter.js
+++ /dev/null
@@ -1,52 +0,0 @@
-YUI.add('api-filter', function (Y) {
-
-Y.APIFilter = Y.Base.create('apiFilter', Y.Base, [Y.AutoCompleteBase], {
-    // -- Initializer ----------------------------------------------------------
-    initializer: function () {
-        this._bindUIACBase();
-        this._syncUIACBase();
-    },
-    getDisplayName: function(name) {
-
-        Y.each(Y.YUIDoc.meta.allModules, function(i) {
-            if (i.name === name && i.displayName) {
-                name = i.displayName;
-            }
-        });
-
-        return name;
-    }
-
-}, {
-    // -- Attributes -----------------------------------------------------------
-    ATTRS: {
-        resultHighlighter: {
-            value: 'phraseMatch'
-        },
-
-        // May be set to "classes" or "modules".
-        queryType: {
-            value: 'classes'
-        },
-
-        source: {
-            valueFn: function() {
-                var self = this;
-                return function(q) {
-                    var data = Y.YUIDoc.meta[self.get('queryType')],
-                        out = [];
-                    Y.each(data, function(v) {
-                        if (v.toLowerCase().indexOf(q.toLowerCase()) > -1) {
-                            out.push(v);
-                        }
-                    });
-                    return out;
-                };
-            }
-        }
-    }
-});
-
-}, '3.4.0', {requires: [
-    'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources'
-]});
diff --git a/Docs/API/assets/js/api-list.js b/Docs/API/assets/js/api-list.js
deleted file mode 100644
index 88905b52..00000000
--- a/Docs/API/assets/js/api-list.js
+++ /dev/null
@@ -1,251 +0,0 @@
-YUI.add('api-list', function (Y) {
-
-var Lang   = Y.Lang,
-    YArray = Y.Array,
-
-    APIList = Y.namespace('APIList'),
-
-    classesNode    = Y.one('#api-classes'),
-    inputNode      = Y.one('#api-filter'),
-    modulesNode    = Y.one('#api-modules'),
-    tabviewNode    = Y.one('#api-tabview'),
-
-    tabs = APIList.tabs = {},
-
-    filter = APIList.filter = new Y.APIFilter({
-        inputNode : inputNode,
-        maxResults: 1000,
-
-        on: {
-            results: onFilterResults
-        }
-    }),
-
-    search = APIList.search = new Y.APISearch({
-        inputNode : inputNode,
-        maxResults: 100,
-
-        on: {
-            clear  : onSearchClear,
-            results: onSearchResults
-        }
-    }),
-
-    tabview = APIList.tabview = new Y.TabView({
-        srcNode  : tabviewNode,
-        panelNode: '#api-tabview-panel',
-        render   : true,
-
-        on: {
-            selectionChange: onTabSelectionChange
-        }
-    }),
-
-    focusManager = APIList.focusManager = tabviewNode.plug(Y.Plugin.NodeFocusManager, {
-        circular   : true,
-        descendants: '#api-filter, .yui3-tab-panel-selected .api-list-item a, .yui3-tab-panel-selected .result a',
-        keys       : {next: 'down:40', previous: 'down:38'}
-    }).focusManager,
-
-    LIST_ITEM_TEMPLATE =
-        '
  • ' + - '{displayName}' + - '
  • '; - -// -- Init --------------------------------------------------------------------- - -// Duckpunch FocusManager's key event handling to prevent it from handling key -// events when a modifier is pressed. -Y.before(function (e, activeDescendant) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { - return new Y.Do.Prevent(); - } -}, focusManager, '_focusPrevious', focusManager); - -Y.before(function (e, activeDescendant) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { - return new Y.Do.Prevent(); - } -}, focusManager, '_focusNext', focusManager); - -// Create a mapping of tabs in the tabview so we can refer to them easily later. -tabview.each(function (tab, index) { - var name = tab.get('label').toLowerCase(); - - tabs[name] = { - index: index, - name : name, - tab : tab - }; -}); - -// Switch tabs on Ctrl/Cmd-Left/Right arrows. -tabviewNode.on('key', onTabSwitchKey, 'down:37,39'); - -// Focus the filter input when the `/` key is pressed. -Y.one(Y.config.doc).on('key', onSearchKey, 'down:83'); - -// Keep the Focus Manager up to date. -inputNode.on('focus', function () { - focusManager.set('activeDescendant', inputNode); -}); - -// Update all tabview links to resolved URLs. -tabview.get('panelNode').all('a').each(function (link) { - link.setAttribute('href', link.get('href')); -}); - -// -- Private Functions -------------------------------------------------------- -function getFilterResultNode() { - return filter.get('queryType') === 'classes' ? classesNode : modulesNode; -} - -// -- Event Handlers ----------------------------------------------------------- -function onFilterResults(e) { - var frag = Y.one(Y.config.doc.createDocumentFragment()), - resultNode = getFilterResultNode(), - typePlural = filter.get('queryType'), - typeSingular = typePlural === 'classes' ? 'class' : 'module'; - - if (e.results.length) { - YArray.each(e.results, function (result) { - frag.append(Lang.sub(LIST_ITEM_TEMPLATE, { - rootPath : APIList.rootPath, - displayName : filter.getDisplayName(result.highlighted), - name : result.text, - typePlural : typePlural, - typeSingular: typeSingular - })); - }); - } else { - frag.append( - '
  • ' + - 'No ' + typePlural + ' found.' + - '
  • ' - ); - } - - resultNode.empty(true); - resultNode.append(frag); - - focusManager.refresh(); -} - -function onSearchClear(e) { - - focusManager.refresh(); -} - -function onSearchKey(e) { - var target = e.target; - - if (target.test('input,select,textarea') - || target.get('isContentEditable')) { - return; - } - - e.preventDefault(); - - inputNode.focus(); - focusManager.refresh(); -} - -function onSearchResults(e) { - var frag = Y.one(Y.config.doc.createDocumentFragment()); - - if (e.results.length) { - YArray.each(e.results, function (result) { - frag.append(result.display); - }); - } else { - frag.append( - '
  • ' + - 'No results found. Maybe you\'ll have better luck with a ' + - 'different query?' + - '
  • ' - ); - } - - - focusManager.refresh(); -} - -function onTabSelectionChange(e) { - var tab = e.newVal, - name = tab.get('label').toLowerCase(); - - tabs.selected = { - index: tab.get('index'), - name : name, - tab : tab - }; - - switch (name) { - case 'classes': // fallthru - case 'modules': - filter.setAttrs({ - minQueryLength: 0, - queryType : name - }); - - search.set('minQueryLength', -1); - - // Only send a request if this isn't the initially-selected tab. - if (e.prevVal) { - filter.sendRequest(filter.get('value')); - } - break; - - case 'everything': - filter.set('minQueryLength', -1); - search.set('minQueryLength', 1); - - if (search.get('value')) { - search.sendRequest(search.get('value')); - } else { - inputNode.focus(); - } - break; - - default: - // WTF? We shouldn't be here! - filter.set('minQueryLength', -1); - search.set('minQueryLength', -1); - } - - if (focusManager) { - setTimeout(function () { - focusManager.refresh(); - }, 1); - } -} - -function onTabSwitchKey(e) { - var currentTabIndex = tabs.selected.index; - - if (!(e.ctrlKey || e.metaKey)) { - return; - } - - e.preventDefault(); - - switch (e.keyCode) { - case 37: // left arrow - if (currentTabIndex > 0) { - tabview.selectChild(currentTabIndex - 1); - inputNode.focus(); - } - break; - - case 39: // right arrow - if (currentTabIndex < (Y.Object.size(tabs) - 2)) { - tabview.selectChild(currentTabIndex + 1); - inputNode.focus(); - } - break; - } -} - -}, '3.4.0', {requires: [ - 'api-filter', 'api-search', 'event-key', 'node-focusmanager', 'tabview' -]}); diff --git a/Docs/API/assets/js/api-search.js b/Docs/API/assets/js/api-search.js deleted file mode 100644 index 175f6a61..00000000 --- a/Docs/API/assets/js/api-search.js +++ /dev/null @@ -1,98 +0,0 @@ -YUI.add('api-search', function (Y) { - -var Lang = Y.Lang, - Node = Y.Node, - YArray = Y.Array; - -Y.APISearch = Y.Base.create('apiSearch', Y.Base, [Y.AutoCompleteBase], { - // -- Public Properties ---------------------------------------------------- - RESULT_TEMPLATE: - '
  • ' + - '' + - '

    {name}

    ' + - '{resultType}' + - '
    {description}
    ' + - '{class}' + - '
    ' + - '
  • ', - - // -- Initializer ---------------------------------------------------------- - initializer: function () { - this._bindUIACBase(); - this._syncUIACBase(); - }, - - // -- Protected Methods ---------------------------------------------------- - _apiResultFilter: function (query, results) { - // Filter components out of the results. - return YArray.filter(results, function (result) { - return result.raw.resultType === 'component' ? false : result; - }); - }, - - _apiResultFormatter: function (query, results) { - return YArray.map(results, function (result) { - var raw = Y.merge(result.raw), // create a copy - desc = raw.description || ''; - - // Convert description to text and truncate it if necessary. - desc = Node.create('
    ' + desc + '
    ').get('text'); - - if (desc.length > 65) { - desc = Y.Escape.html(desc.substr(0, 65)) + ' …'; - } else { - desc = Y.Escape.html(desc); - } - - raw['class'] || (raw['class'] = ''); - raw.description = desc; - - // Use the highlighted result name. - raw.name = result.highlighted; - - return Lang.sub(this.RESULT_TEMPLATE, raw); - }, this); - }, - - _apiTextLocator: function (result) { - return result.displayName || result.name; - } -}, { - // -- Attributes ----------------------------------------------------------- - ATTRS: { - resultFormatter: { - valueFn: function () { - return this._apiResultFormatter; - } - }, - - resultFilters: { - valueFn: function () { - return this._apiResultFilter; - } - }, - - resultHighlighter: { - value: 'phraseMatch' - }, - - resultListLocator: { - value: 'data.results' - }, - - resultTextLocator: { - valueFn: function () { - return this._apiTextLocator; - } - }, - - source: { - value: '/api/v1/search?q={query}&count={maxResults}' - } - } -}); - -}, '3.4.0', {requires: [ - 'autocomplete-base', 'autocomplete-highlighters', 'autocomplete-sources', - 'escape' -]}); diff --git a/Docs/API/assets/js/apidocs.js b/Docs/API/assets/js/apidocs.js deleted file mode 100644 index c64bb463..00000000 --- a/Docs/API/assets/js/apidocs.js +++ /dev/null @@ -1,370 +0,0 @@ -YUI().use( - 'yuidoc-meta', - 'api-list', 'history-hash', 'node-screen', 'node-style', 'pjax', -function (Y) { - -var win = Y.config.win, - localStorage = win.localStorage, - - bdNode = Y.one('#bd'), - - pjax, - defaultRoute, - - classTabView, - selectedTab; - -// Kill pjax functionality unless serving over HTTP. -if (!Y.getLocation().protocol.match(/^https?\:/)) { - Y.Router.html5 = false; -} - -// Create the default route with middleware which enables syntax highlighting -// on the loaded content. -defaultRoute = Y.Pjax.defaultRoute.concat(function (req, res, next) { - prettyPrint(); - bdNode.removeClass('loading'); - - next(); -}); - -pjax = new Y.Pjax({ - container : '#docs-main', - contentSelector: '#docs-main > .content', - linkSelector : '#bd a', - titleSelector : '#xhr-title', - - navigateOnHash: true, - root : '/', - routes : [ - // -- / ---------------------------------------------------------------- - { - path : '/(index.html)?', - callbacks: defaultRoute - }, - - // -- /classes/* ------------------------------------------------------- - { - path : '/classes/:class.html*', - callbacks: [defaultRoute, 'handleClasses'] - }, - - // -- /files/* --------------------------------------------------------- - { - path : '/files/*file', - callbacks: [defaultRoute, 'handleFiles'] - }, - - // -- /modules/* ------------------------------------------------------- - { - path : '/modules/:module.html*', - callbacks: defaultRoute - } - ] -}); - -// -- Utility Functions -------------------------------------------------------- - -pjax.checkVisibility = function (tab) { - tab || (tab = selectedTab); - - if (!tab) { return; } - - var panelNode = tab.get('panelNode'), - visibleItems; - - // If no items are visible in the tab panel due to the current visibility - // settings, display a message to that effect. - visibleItems = panelNode.all('.item,.index-item').some(function (itemNode) { - if (itemNode.getComputedStyle('display') !== 'none') { - return true; - } - }); - - panelNode.all('.no-visible-items').remove(); - - if (!visibleItems) { - if (Y.one('#index .index-item')) { - panelNode.append( - '
    ' + - '

    ' + - 'Some items are not shown due to the current visibility ' + - 'settings. Use the checkboxes at the upper right of this ' + - 'page to change the visibility settings.' + - '

    ' + - '
    ' - ); - } else { - panelNode.append( - '
    ' + - '

    ' + - 'This class doesn\'t provide any methods, properties, ' + - 'attributes, or events.' + - '

    ' + - '
    ' - ); - } - } - - // Hide index sections without any visible items. - Y.all('.index-section').each(function (section) { - var items = 0, - visibleItems = 0; - - section.all('.index-item').each(function (itemNode) { - items += 1; - - if (itemNode.getComputedStyle('display') !== 'none') { - visibleItems += 1; - } - }); - - section.toggleClass('hidden', !visibleItems); - section.toggleClass('no-columns', visibleItems < 4); - }); -}; - -pjax.initClassTabView = function () { - if (!Y.all('#classdocs .api-class-tab').size()) { - return; - } - - if (classTabView) { - classTabView.destroy(); - selectedTab = null; - } - - classTabView = new Y.TabView({ - srcNode: '#classdocs', - - on: { - selectionChange: pjax.onTabSelectionChange - } - }); - - pjax.updateTabState(); - classTabView.render(); -}; - -pjax.initLineNumbers = function () { - var hash = win.location.hash.substring(1), - container = pjax.get('container'), - hasLines, node; - - // Add ids for each line number in the file source view. - container.all('.linenums>li').each(function (lineNode, index) { - lineNode.set('id', 'l' + (index + 1)); - lineNode.addClass('file-line'); - hasLines = true; - }); - - // Scroll to the desired line. - if (hasLines && /^l\d+$/.test(hash)) { - if ((node = container.getById(hash))) { - win.scroll(0, node.getY()); - } - } -}; - -pjax.initRoot = function () { - var terminators = /^(?:classes|files|modules)$/, - parts = pjax._getPathRoot().split('/'), - root = [], - i, len, part; - - for (i = 0, len = parts.length; i < len; i += 1) { - part = parts[i]; - - if (part.match(terminators)) { - // Makes sure the path will end with a "/". - root.push(''); - break; - } - - root.push(part); - } - - pjax.set('root', root.join('/')); -}; - -pjax.updateTabState = function (src) { - var hash = win.location.hash.substring(1), - defaultTab, node, tab, tabPanel; - - function scrollToNode() { - if (node.hasClass('protected')) { - Y.one('#api-show-protected').set('checked', true); - pjax.updateVisibility(); - } - - if (node.hasClass('private')) { - Y.one('#api-show-private').set('checked', true); - pjax.updateVisibility(); - } - - setTimeout(function () { - // For some reason, unless we re-get the node instance here, - // getY() always returns 0. - var node = Y.one('#classdocs').getById(hash); - win.scrollTo(0, node.getY() - 70); - }, 1); - } - - if (!classTabView) { - return; - } - - if (src === 'hashchange' && !hash) { - defaultTab = 'index'; - } else { - if (localStorage) { - defaultTab = localStorage.getItem('tab_' + pjax.getPath()) || - 'index'; - } else { - defaultTab = 'index'; - } - } - - if (hash && (node = Y.one('#classdocs').getById(hash))) { - if ((tabPanel = node.ancestor('.api-class-tabpanel', true))) { - if ((tab = Y.one('#classdocs .api-class-tab.' + tabPanel.get('id')))) { - if (classTabView.get('rendered')) { - Y.Widget.getByNode(tab).set('selected', 1); - } else { - tab.addClass('yui3-tab-selected'); - } - } - } - - // Scroll to the desired element if this is a hash URL. - if (node) { - if (classTabView.get('rendered')) { - scrollToNode(); - } else { - classTabView.once('renderedChange', scrollToNode); - } - } - } else { - tab = Y.one('#classdocs .api-class-tab.' + defaultTab); - - // When the `defaultTab` node isn't found, `localStorage` is stale. - if (!tab && defaultTab !== 'index') { - tab = Y.one('#classdocs .api-class-tab.index'); - } - - if (classTabView.get('rendered')) { - Y.Widget.getByNode(tab).set('selected', 1); - } else { - tab.addClass('yui3-tab-selected'); - } - } -}; - -pjax.updateVisibility = function () { - var container = pjax.get('container'); - - container.toggleClass('hide-inherited', - !Y.one('#api-show-inherited').get('checked')); - - container.toggleClass('show-deprecated', - Y.one('#api-show-deprecated').get('checked')); - - container.toggleClass('show-protected', - Y.one('#api-show-protected').get('checked')); - - container.toggleClass('show-private', - Y.one('#api-show-private').get('checked')); - - pjax.checkVisibility(); -}; - -// -- Route Handlers ----------------------------------------------------------- - -pjax.handleClasses = function (req, res, next) { - var status = res.ioResponse.status; - - // Handles success and local filesystem XHRs. - if (!status || (status >= 200 && status < 300)) { - pjax.initClassTabView(); - } - - next(); -}; - -pjax.handleFiles = function (req, res, next) { - var status = res.ioResponse.status; - - // Handles success and local filesystem XHRs. - if (!status || (status >= 200 && status < 300)) { - pjax.initLineNumbers(); - } - - next(); -}; - -// -- Event Handlers ----------------------------------------------------------- - -pjax.onNavigate = function (e) { - var hash = e.hash, - originTarget = e.originEvent && e.originEvent.target, - tab; - - if (hash) { - tab = originTarget && originTarget.ancestor('.yui3-tab', true); - - if (hash === win.location.hash) { - pjax.updateTabState('hashchange'); - } else if (!tab) { - win.location.hash = hash; - } - - e.preventDefault(); - return; - } - - // Only scroll to the top of the page when the URL doesn't have a hash. - this.set('scrollToTop', !e.url.match(/#.+$/)); - - bdNode.addClass('loading'); -}; - -pjax.onOptionClick = function (e) { - pjax.updateVisibility(); -}; - -pjax.onTabSelectionChange = function (e) { - var tab = e.newVal, - tabId = tab.get('contentBox').getAttribute('href').substring(1); - - selectedTab = tab; - - // If switching from a previous tab (i.e., this is not the default tab), - // replace the history entry with a hash URL that will cause this tab to - // be selected if the user navigates away and then returns using the back - // or forward buttons. - if (e.prevVal && localStorage) { - localStorage.setItem('tab_' + pjax.getPath(), tabId); - } - - pjax.checkVisibility(tab); -}; - -// -- Init --------------------------------------------------------------------- - -pjax.on('navigate', pjax.onNavigate); - -pjax.initRoot(); -pjax.upgrade(); -pjax.initClassTabView(); -pjax.initLineNumbers(); -pjax.updateVisibility(); - -Y.APIList.rootPath = pjax.get('root'); - -Y.one('#api-options').delegate('click', pjax.onOptionClick, 'input'); - -Y.on('hashchange', function (e) { - pjax.updateTabState('hashchange'); -}, win); - -}); diff --git a/Docs/API/assets/js/yui-prettify.js b/Docs/API/assets/js/yui-prettify.js deleted file mode 100644 index 18de8649..00000000 --- a/Docs/API/assets/js/yui-prettify.js +++ /dev/null @@ -1,17 +0,0 @@ -YUI().use('node', function(Y) { - var code = Y.all('.prettyprint.linenums'); - if (code.size()) { - code.each(function(c) { - var lis = c.all('ol li'), - l = 1; - lis.each(function(n) { - n.prepend(''); - l++; - }); - }); - var h = location.hash; - location.hash = ''; - h = h.replace('LINE_', 'LINENUM_'); - location.hash = h; - } -}); diff --git a/Docs/API/assets/vendor/prettify/CHANGES.html b/Docs/API/assets/vendor/prettify/CHANGES.html deleted file mode 100644 index b50b8414..00000000 --- a/Docs/API/assets/vendor/prettify/CHANGES.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - Change Log - - - README - -

    Known Issues

    -
      -
    • Perl formatting is really crappy. Partly because the author is lazy and - partly because Perl is - hard to parse. -
    • On some browsers, <code> elements with newlines in the text - which use CSS to specify white-space:pre will have the newlines - improperly stripped if the element is not attached to the document at the time - the stripping is done. Also, on IE 6, all newlines will be stripped from - <code> elements because of the way IE6 produces - innerHTML. Workaround: use <pre> for code with - newlines. -
    - -

    Change Log

    -

    29 March 2007

    -
      -
    • Added tests for PHP support - to address - issue 3. -
    • Fixed - bug: prettyPrintOne was not halting. This was not - reachable through the normal entry point. -
    • Fixed - bug: recursing into a script block or PHP tag that was not properly - closed would not silently drop the content. - (test) -
    • Fixed - bug: was eating tabs - (test) -
    • Fixed entity handling so that the caveat -
      -

      Caveats: please properly escape less-thans. x&lt;y - instead of x<y, and use " instead of - &quot; for string delimiters.

      -
      - is no longer applicable. -
    • Added noisefree's C# - patch -
    • Added a distribution that has comments and - whitespace removed to reduce download size from 45.5kB to 12.8kB. -
    -

    4 Jul 2008

    -
      -
    • Added language specific formatters that are triggered by the presence - of a lang-<language-file-extension>
    • -
    • Fixed bug: python handling of '''string''' -
    • Fixed bug: / in regex [charsets] should not end regex -
    -

    5 Jul 2008

    -
      -
    • Defined language extensions for Lisp and Lua -
    -

    14 Jul 2008

    -
      -
    • Language handlers for F#, OCAML, SQL -
    • Support for nocode spans to allow embedding of line - numbers and code annotations which should not be styled or otherwise - affect the tokenization of prettified code. - See the issue 22 - testcase. -
    -

    6 Jan 2009

    -
      -
    • Language handlers for Visual Basic, Haskell, CSS, and WikiText
    • -
    • Added .mxml extension to the markup style handler for - Flex MXML files. See - issue 37. -
    • Added .m extension to the C style handler so that Objective - C source files properly highlight. See - issue 58. -
    • Changed HTML lexer to use the same embedded source mechanism as the - wiki language handler, and changed to use the registered - CSS handler for STYLE element content. -
    -

    21 May 2009

    -
      -
    • Rewrote to improve performance on large files. - See benchmarks.
    • -
    • Fixed bugs with highlighting of Haskell line comments, Lisp - number literals, Lua strings, C preprocessor directives, - newlines in Wiki code on Windows, and newlines in IE6.
    • -
    -

    14 August 2009

    -
      -
    • Fixed prettifying of <code> blocks with embedded newlines. -
    -

    3 October 2009

    -
      -
    • Fixed prettifying of XML/HTML tags that contain uppercase letters. -
    -

    19 July 2010

    -
      -
    • Added support for line numbers. Bug - 22
    • -
    • Added YAML support. Bug - 123
    • -
    • Added VHDL support courtesy Le Poussin.
    • -
    • IE performance improvements. Bug - 102 courtesy jacobly.
    • -
    • A variety of markup formatting fixes courtesy smain and thezbyg.
    • -
    • Fixed copy and paste in IE[678]. -
    • Changed output to use &#160; instead of - &nbsp; so that the output works when embedded in XML. - Bug - 108.
    • -
    - - diff --git a/Docs/API/assets/vendor/prettify/COPYING b/Docs/API/assets/vendor/prettify/COPYING deleted file mode 100644 index d6456956..00000000 --- a/Docs/API/assets/vendor/prettify/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Docs/API/assets/vendor/prettify/README.html b/Docs/API/assets/vendor/prettify/README.html deleted file mode 100644 index c6fe1a32..00000000 --- a/Docs/API/assets/vendor/prettify/README.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - Javascript code prettifier - - - - - - - - - - Languages : CH -

    Javascript code prettifier

    - -

    Setup

    -
      -
    1. Download a distribution -
    2. Include the script and stylesheets in your document - (you will need to make sure the css and js file are on your server, and - adjust the paths in the script and link tag) -
      -<link href="prettify.css" type="text/css" rel="stylesheet" />
      -<script type="text/javascript" src="prettify.js"></script>
      -
    3. Add onload="prettyPrint()" to your - document's body tag. -
    4. Modify the stylesheet to get the coloring you prefer
    5. -
    - -

    Usage

    -

    Put code snippets in - <pre class="prettyprint">...</pre> - or <code class="prettyprint">...</code> - and it will automatically be pretty printed. - - - - -
    The original - Prettier -
    class Voila {
    -public:
    -  // Voila
    -  static const string VOILA = "Voila";
    -
    -  // will not interfere with embedded tags.
    -}
    - -
    class Voila {
    -public:
    -  // Voila
    -  static const string VOILA = "Voila";
    -
    -  // will not interfere with embedded tags.
    -}
    -
    - -

    FAQ

    -

    Which languages does it work for?

    -

    The comments in prettify.js are authoritative but the lexer - should work on a number of languages including C and friends, - Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. - It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl - and Ruby, but, because of commenting conventions, doesn't work on - Smalltalk, or CAML-like languages.

    - -

    LISPy languages are supported via an extension: - lang-lisp.js.

    -

    And similarly for - CSS, - Haskell, - Lua, - OCAML, SML, F#, - Visual Basic, - SQL, - Protocol Buffers, and - WikiText.. - -

    If you'd like to add an extension for your favorite language, please - look at src/lang-lisp.js and file an - issue including your language extension, and a testcase.

    - -

    How do I specify which language my code is in?

    -

    You don't need to specify the language since prettyprint() - will guess. You can specify a language by specifying the language extension - along with the prettyprint class like so:

    -
    <pre class="prettyprint lang-html">
    -  The lang-* class specifies the language file extensions.
    -  File extensions supported by default include
    -    "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
    -    "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
    -    "xhtml", "xml", "xsl".
    -</pre>
    - -

    It doesn't work on <obfuscated code sample>?

    -

    Yes. Prettifying obfuscated code is like putting lipstick on a pig - — i.e. outside the scope of this tool.

    - -

    Which browsers does it work with?

    -

    It's been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4. - Look at the test page to see if it - works in your browser.

    - -

    What's changed?

    -

    See the change log

    - -

    Why doesn't Prettyprinting of strings work on WordPress?

    -

    Apparently wordpress does "smart quoting" which changes close quotes. - This causes end quotes to not match up with open quotes. -

    This breaks prettifying as well as copying and pasting of code samples. - See - WordPress's help center for info on how to stop smart quoting of code - snippets.

    - -

    How do I put line numbers in my code?

    -

    You can use the linenums class to turn on line - numbering. If your code doesn't start at line number 1, you can - add a colon and a line number to the end of that class as in - linenums:52. - -

    For example -

    <pre class="prettyprint linenums:4"
    ->// This is line 4.
    -foo();
    -bar();
    -baz();
    -boo();
    -far();
    -faz();
    -<pre>
    - produces -
    // This is line 4.
    -foo();
    -bar();
    -baz();
    -boo();
    -far();
    -faz();
    -
    - -

    How do I prevent a portion of markup from being marked as code?

    -

    You can use the nocode class to identify a span of markup - that is not code. -

    <pre class=prettyprint>
    -int x = foo();  /* This is a comment  <span class="nocode">This is not code</span>
    -  Continuation of comment */
    -int y = bar();
    -</pre>
    -produces -
    -int x = foo();  /* This is a comment  This is not code
    -  Continuation of comment */
    -int y = bar();
    -
    - -

    For a more complete example see the issue22 - testcase.

    - -

    I get an error message "a is not a function" or "opt_whenDone is not a function"

    -

    If you are calling prettyPrint via an event handler, wrap it in a function. - Instead of doing -

    - addEventListener('load', prettyPrint, false); -
    - wrap it in a closure like -
    - addEventListener('load', function (event) { prettyPrint() }, false); -
    - so that the browser does not pass an event object to prettyPrint which - will confuse it. - -


    - - - - diff --git a/Docs/API/assets/vendor/prettify/prettify-min.css b/Docs/API/assets/vendor/prettify/prettify-min.css deleted file mode 100644 index d44b3a22..00000000 --- a/Docs/API/assets/vendor/prettify/prettify-min.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file diff --git a/Docs/API/assets/vendor/prettify/prettify-min.js b/Docs/API/assets/vendor/prettify/prettify-min.js deleted file mode 100644 index 4845d05d..00000000 --- a/Docs/API/assets/vendor/prettify/prettify-min.js +++ /dev/null @@ -1 +0,0 @@ -window.PR_SHOULD_USE_CONTINUATION=true;var prettyPrintOne;var prettyPrint;(function(){var O=window;var j=["break,continue,do,else,for,if,return,while"];var v=[j,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var q=[v,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var m=[q,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var y=[q,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var T=[y,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"];var s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes";var x=[q,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var t="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var J=[j,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var g=[j,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var I=[j,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var B=[m,T,x,t+J,g,I];var f=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;var D="str";var A="kwd";var k="com";var Q="typ";var H="lit";var M="pun";var G="pln";var n="tag";var F="dec";var K="src";var R="atn";var o="atv";var P="nocode";var N="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function l(ab){var af=0;var U=false;var ae=false;for(var X=0,W=ab.length;X122)){if(!(am<65||ai>90)){ah.push([Math.max(65,ai)|32,Math.min(am,90)|32])}if(!(am<97||ai>122)){ah.push([Math.max(97,ai)&~32,Math.min(am,122)&~32])}}}}ah.sort(function(aw,av){return(aw[0]-av[0])||(av[1]-aw[1])});var ak=[];var aq=[];for(var at=0;atau[0]){if(au[1]+1>au[0]){ao.push("-")}ao.push(V(au[1]))}}ao.push("]");return ao.join("")}function Y(an){var al=an.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var aj=al.length;var ap=[];for(var am=0,ao=0;am=2&&ak==="["){al[am]=Z(ai)}else{if(ak!=="\\"){al[am]=ai.replace(/[a-zA-Z]/g,function(aq){var ar=aq.charCodeAt(0);return"["+String.fromCharCode(ar&~32,ar|32)+"]"})}}}}return al.join("")}var ac=[];for(var X=0,W=ab.length;X=0;){U[ae.charAt(ag)]=aa}}var ah=aa[1];var ac=""+ah;if(!ai.hasOwnProperty(ac)){aj.push(ah);ai[ac]=null}}aj.push(/[\0-\uffff]/);X=l(aj)})();var Z=V.length;var Y=function(aj){var ab=aj.sourceCode,aa=aj.basePos;var af=[aa,G];var ah=0;var ap=ab.match(X)||[];var al={};for(var ag=0,at=ap.length;ag=5&&"lang-"===ar.substring(0,5);if(ao&&!(ak&&typeof ak[1]==="string")){ao=false;ar=K}if(!ao){al[ai]=ar}}var ad=ah;ah+=ai.length;if(!ao){af.push(aa+ad,ar)}else{var an=ak[1];var am=ai.indexOf(an);var ae=am+an.length;if(ak[2]){ae=ai.length-ak[2].length;am=ae-an.length}var au=ar.substring(5);C(aa+ad,ai.substring(0,am),Y,af);C(aa+ad+am,an,r(au,an),af);C(aa+ad+ae,ai.substring(ae),Y,af)}}aj.decorations=af};return Y}function i(V){var Y=[],U=[];if(V.tripleQuotedStrings){Y.push([D,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(V.multiLineStrings){Y.push([D,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{Y.push([D,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(V.verbatimStrings){U.push([D,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var ab=V.hashComments;if(ab){if(V.cStyleComments){if(ab>1){Y.push([k,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{Y.push([k,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}U.push([D,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])}else{Y.push([k,/^#[^\r\n]*/,null,"#"])}}if(V.cStyleComments){U.push([k,/^\/\/[^\r\n]*/,null]);U.push([k,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(V.regexLiterals){var aa=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");U.push(["lang-regex",new RegExp("^"+N+"("+aa+")")])}var X=V.types;if(X){U.push([Q,X])}var W=(""+V.keywords).replace(/^ | $/g,"");if(W.length){U.push([A,new RegExp("^(?:"+W.replace(/[\s,]+/g,"|")+")\\b"),null])}Y.push([G,/^\s+/,null," \r\n\t\xA0"]);var Z=/^.[^\s\w\.$@\'\"\`\/\\]*/;U.push([H,/^@[a-z_$][a-z_$@0-9]*/i,null],[Q,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[G,/^[a-z_$][a-z_$@0-9]*/i,null],[H,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[G,/^\\[\s\S]?/,null],[M,Z,null]);return h(Y,U)}var L=i({keywords:B,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function S(W,ah,aa){var V=/(?:^|\s)nocode(?:\s|$)/;var ac=/\r\n?|\n/;var ad=W.ownerDocument;var ag=ad.createElement("li");while(W.firstChild){ag.appendChild(W.firstChild)}var X=[ag];function af(am){switch(am.nodeType){case 1:if(V.test(am.className)){break}if("br"===am.nodeName){ae(am);if(am.parentNode){am.parentNode.removeChild(am)}}else{for(var ao=am.firstChild;ao;ao=ao.nextSibling){af(ao)}}break;case 3:case 4:if(aa){var an=am.nodeValue;var ak=an.match(ac);if(ak){var aj=an.substring(0,ak.index);am.nodeValue=aj;var ai=an.substring(ak.index+ak[0].length);if(ai){var al=am.parentNode;al.insertBefore(ad.createTextNode(ai),am.nextSibling)}ae(am);if(!aj){am.parentNode.removeChild(am)}}}break}}function ae(al){while(!al.nextSibling){al=al.parentNode;if(!al){return}}function aj(am,at){var ar=at?am.cloneNode(false):am;var ap=am.parentNode;if(ap){var aq=aj(ap,1);var ao=am.nextSibling;aq.appendChild(ar);for(var an=ao;an;an=ao){ao=an.nextSibling;aq.appendChild(an)}}return ar}var ai=aj(al.nextSibling,0);for(var ak;(ak=ai.parentNode)&&ak.nodeType===1;){ai=ak}X.push(ai)}for(var Z=0;Z=U){aj+=2}if(Y>=ar){ac+=2}}}finally{if(au){au.style.display=ak}}}var u={};function d(W,X){for(var U=X.length;--U>=0;){var V=X[U];if(!u.hasOwnProperty(V)){u[V]=W}else{if(O.console){console.warn("cannot override language handler %s",V)}}}}function r(V,U){if(!(V&&u.hasOwnProperty(V))){V=/^\s*]*(?:>|$)/],[k,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[M,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);d(h([[G,/^[\s]+/,null," \t\r\n"],[o,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[n,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[R,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[M,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);d(h([],[[o,/^[\s\S]+/]]),["uq.val"]);d(i({keywords:m,hashComments:true,cStyleComments:true,types:f}),["c","cc","cpp","cxx","cyc","m"]);d(i({keywords:"null,true,false"}),["json"]);d(i({keywords:T,hashComments:true,cStyleComments:true,verbatimStrings:true,types:f}),["cs"]);d(i({keywords:y,cStyleComments:true}),["java"]);d(i({keywords:I,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);d(i({keywords:J,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);d(i({keywords:t,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);d(i({keywords:g,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);d(i({keywords:x,cStyleComments:true,regexLiterals:true}),["js"]);d(i({keywords:s,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);d(h([],[[D,/^[\s\S]+/]]),["regex"]);function e(X){var W=X.langExtension;try{var U=b(X.sourceNode,X.pre);var V=U.sourceCode;X.sourceCode=V;X.spans=U.spans;X.basePos=0;r(W,V)(X);E(X)}catch(Y){if(O.console){console.log(Y&&Y.stack?Y.stack:Y)}}}function z(Y,X,W){var U=document.createElement("pre");U.innerHTML=Y;if(W){S(U,W,true)}var V={langExtension:X,numberLines:W,sourceNode:U,pre:1};e(V);return U.innerHTML}function c(aj){function ab(al){return document.getElementsByTagName(al)}var ah=[ab("pre"),ab("code"),ab("xmp")];var V=[];for(var ae=0;ae]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); \ No newline at end of file diff --git a/Docs/API/classes/TimeManager.html b/Docs/API/classes/TimeManager.html deleted file mode 100644 index 07505d5b..00000000 --- a/Docs/API/classes/TimeManager.html +++ /dev/null @@ -1,1744 +0,0 @@ - - - - - TimeManager - Phaser - - - - - - - - -
    -
    -
    - -

    - -
    -
    - API Docs for: 1.0.0 -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    TimeManager Class

    -
    - - - - - - - - - - - Module: Phaser - - - - -
    - - - -
    -

    This is the core internal game clock. It manages the elapsed time and calculation of delta values, -used for game object motion and tweens.

    - -
    - - -
    -

    Constructor

    -
    -

    TimeManager

    - - -
    - (
      - -
    • - - game - -
    • - -
    ) -
    - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:13 - -

    - - - - - -
    - -
    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - game - Phaser.Game - - - - -
      -

      A reference to the currently running game.

      - -
      - - -
    • - -
    -
    - - - - - -
    - -
    - - -
    - - -
    -
    -

    Item Index

    - - -
    -

    Methods

    - - -
    - - - -
    -

    Properties

    - - -
    - - - - - -
    - - -
    -

    Methods

    - - -
    -

    elapsedSecondsSince

    - - -
    - (
      - -
    • - - since - -
    • - -
    ) -
    - - - - - Number - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:239 - -

    - - - - - -
    - -
    -

    How long has passed since the given time (in seconds).

    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - since - Number - - - - -
      -

      The time you want to measure (in seconds).

      - -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Number: - -

    Duration between given time and now (in seconds).

    - - -
    -
    - - - -
    - - -
    -

    elapsedSince

    - - -
    - (
      - -
    • - - since - -
    • - -
    ) -
    - - - - - Number - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:227 - -

    - - - - - -
    - -
    -

    How long has passed since the given time.

    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - since - Number - - - - -
      -

      The time you want to measure against.

      - -
      - - -
    • - -
    -
    - - - -
    -

    Returns:

    - -
    - - - Number: - -

    The difference between the given time and now.

    - - -
    -
    - - - -
    - - -
    -

    gamePaused

    - - - () - - - - - - - - private - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:192 - -

    - - - - - -
    - -
    -

    Called when the game enters a paused state.

    - -
    - - - - - - -
    - - -
    -

    gameResumed

    - - - () - - - - - - - - private - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:201 - -

    - - - - - -
    - -
    -

    Called when the game resumes from a paused state.

    - -
    - - - - - - -
    - - -
    -

    reset

    - - - () - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:251 - -

    - - - - - -
    - -
    -

    Resets the private _started value to now.

    - -
    - - - - - - -
    - - -
    -

    totalElapsedSeconds

    - - - () - - - - - Number - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:89 - -

    - - - - - -
    - -
    -

    The number of seconds that have elapsed since the game was started.

    - -
    - - - - -
    -

    Returns:

    - -
    - - - Number: - - -
    -
    - - - -
    - - -
    -

    update

    - - -
    - (
      - -
    • - - raf - -
    • - -
    ) -
    - - - - - - - - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:156 - -

    - - - - - -
    - -
    -

    Update clock and calculate the fps. -This is called automatically by Game._raf

    - -
    - - -
    -

    Parameters:

    - -
      - -
    • - - raf - Number - - - - -
      -

      The current timestamp, either performance.now or Date.now

      - -
      - - -
    • - -
    -
    - - - - - -
    - - -
    - - - -
    -

    Properties

    - - -
    -

    _pauseStarted

    - Number - - - - - private - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:219 - -

    - - - - -
    - -
    -

    The time the game started being paused.

    - -
    - - - - - - -
    - - -
    -

    _started

    - Number - - - - - private - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:41 - -

    - - - - -
    - -
    -

    The time at which the Game instance started.

    - -
    - - - - - - -
    - - -
    -

    _timeLastSecond

    - Number - - - - - private - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:148 - -

    - - - - -
    - -
    -

    The time (in ms) that the last second counter ticked over.

    - -
    - - - - - - -
    - - -
    -

    delta

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:81 - -

    - - - - -
    - -
    -

    Elapsed time since the last frame.

    - -
    - - - - - - -
    - - -
    -

    elapsed

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:49 - -

    - - - - -
    - -
    -

    Number of milliseconds elapsed since the last frame update.

    - -
    - - - - - - -
    - - -
    -

    fps

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:100 - -

    - - - - -
    - -
    -

    Frames per second.

    - -
    - - - - - - -
    - - -
    -

    fpsMax

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:116 - -

    - - - - -
    - -
    -

    The highest rate the fps has reached (usually no higher than 60fps).

    - -
    - - - - - - -
    - - -
    -

    fpsMin

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:108 - -

    - - - - -
    - -
    -

    The lowest rate the fps has dropped to.

    - -
    - - - - - - -
    - - -
    -

    frames

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:140 - -

    - - - - -
    - -
    -

    The number of frames record in the last second.

    - -
    - - - - - - -
    - - -
    -

    game

    - Phaser.Game - - - - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:34 - -

    - - - - -
    - -
    -

    A reference to the currently running Game.

    - -
    - - - - - - -
    - - -
    -

    msMax

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:132 - -

    - - - - -
    - -
    -

    The maximum amount of time the game has taken between two frames.

    - -
    - - - - - - -
    - - -
    -

    msMin

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:124 - -

    - - - - -
    - -
    -

    The minimum amount of time the game has taken between two frames.

    - -
    - - - - - - -
    - - -
    -

    now

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:73 - -

    - - - - -
    - -
    -

    The time right now.

    - -
    - - - - - - -
    - - -
    -

    pausedTime

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:65 - -

    - - - - -
    - -
    -

    Records how long the game has been paused for. Is reset each time the game pauses.

    - -
    - - - - - - -
    - - -
    -

    pauseDuration

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:211 - -

    - - - - -
    - -
    -

    Records how long the game was paused for in miliseconds.

    - -
    - - - - - - -
    - - -
    -

    time

    - Number - - - - - public - - - - - - -
    - - - -

    - - Defined in - - - - - ..\Phaser\time\TimeManager.ts:57 - -

    - - - - -
    - -
    -

    Game time counter.

    - -
    - - - - - - -
    - - -
    - - - - - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/Docs/API/data.json b/Docs/API/data.json deleted file mode 100644 index 3e65bc60..00000000 --- a/Docs/API/data.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "project": { - "name": "Phaser", - "description": "HTML5 Game Framework", - "version": "1.0.0", - "url": "http://www.phaser.io/" - }, - "files": { - "..\\Phaser\\time\\TimeManager.ts": { - "name": "..\\Phaser\\time\\TimeManager.ts", - "modules": { - "Phaser": 1 - }, - "classes": { - "TimeManager": 1 - }, - "fors": {}, - "namespaces": {} - } - }, - "modules": { - "Phaser": { - "name": "Phaser", - "submodules": {}, - "classes": { - "TimeManager": 1 - }, - "fors": {}, - "namespaces": {}, - "tag": "module", - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 13, - "author": "Richard Davey ", - "copyright": "2013 Photon Storm Ltd.", - "license": "https://github.com/photonstorm/phaser/blob/master/license.txt MIT License" - } - }, - "classes": { - "TimeManager": { - "name": "TimeManager", - "shortname": "TimeManager", - "classitems": [], - "plugins": [], - "extensions": [], - "plugin_for": [], - "extension_for": [], - "module": "Phaser", - "namespace": "", - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 13, - "description": "This is the core internal game clock. It manages the elapsed time and calculation of delta values,\nused for game object motion and tweens.", - "is_constructor": 1, - "params": [ - { - "name": "game", - "description": "A reference to the currently running game.", - "type": "Phaser.Game" - } - ] - } - }, - "classitems": [ - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 34, - "description": "A reference to the currently running Game.", - "itemtype": "property", - "name": "game", - "type": "{Phaser.Game}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 41, - "description": "The time at which the Game instance started.", - "itemtype": "property", - "name": "_started", - "access": "private", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 49, - "description": "Number of milliseconds elapsed since the last frame update.", - "itemtype": "property", - "name": "elapsed", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 57, - "description": "Game time counter.", - "itemtype": "property", - "name": "time", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 65, - "description": "Records how long the game has been paused for. Is reset each time the game pauses.", - "itemtype": "property", - "name": "pausedTime", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 73, - "description": "The time right now.", - "itemtype": "property", - "name": "now", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 81, - "description": "Elapsed time since the last frame.", - "itemtype": "property", - "name": "delta", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 89, - "description": "The number of seconds that have elapsed since the game was started.", - "itemtype": "method", - "name": "totalElapsedSeconds", - "return": { - "description": "", - "type": "Number" - }, - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 100, - "description": "Frames per second.", - "itemtype": "property", - "name": "fps", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 108, - "description": "The lowest rate the fps has dropped to.", - "itemtype": "property", - "name": "fpsMin", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 116, - "description": "The highest rate the fps has reached (usually no higher than 60fps).", - "itemtype": "property", - "name": "fpsMax", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 124, - "description": "The minimum amount of time the game has taken between two frames.", - "itemtype": "property", - "name": "msMin", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 132, - "description": "The maximum amount of time the game has taken between two frames.", - "itemtype": "property", - "name": "msMax", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 140, - "description": "The number of frames record in the last second.", - "itemtype": "property", - "name": "frames", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 148, - "description": "The time (in ms) that the last second counter ticked over.", - "itemtype": "property", - "name": "_timeLastSecond", - "access": "private", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 156, - "description": "Update clock and calculate the fps.\nThis is called automatically by Game._raf", - "itemtype": "method", - "name": "update", - "params": [ - { - "name": "raf", - "description": "The current timestamp, either performance.now or Date.now", - "type": "Number" - } - ], - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 192, - "description": "Called when the game enters a paused state.", - "itemtype": "method", - "name": "gamePaused", - "access": "private", - "tagname": "", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 201, - "description": "Called when the game resumes from a paused state.", - "itemtype": "method", - "name": "gameResumed", - "access": "private", - "tagname": "", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 211, - "description": "Records how long the game was paused for in miliseconds.", - "itemtype": "property", - "name": "pauseDuration", - "access": "public", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 219, - "description": "The time the game started being paused.", - "itemtype": "property", - "name": "_pauseStarted", - "access": "private", - "tagname": "", - "type": "{Number}", - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 227, - "description": "How long has passed since the given time.", - "itemtype": "method", - "name": "elapsedSince", - "params": [ - { - "name": "since", - "description": "The time you want to measure against.", - "type": "Number" - } - ], - "return": { - "description": "The difference between the given time and now.", - "type": "Number" - }, - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 239, - "description": "How long has passed since the given time (in seconds).", - "itemtype": "method", - "name": "elapsedSecondsSince", - "params": [ - { - "name": "since", - "description": "The time you want to measure (in seconds).", - "type": "Number" - } - ], - "return": { - "description": "Duration between given time and now (in seconds).", - "type": "Number" - }, - "class": "TimeManager", - "module": "Phaser" - }, - { - "file": "..\\Phaser\\time\\TimeManager.ts", - "line": 251, - "description": "Resets the private _started value to now.", - "itemtype": "method", - "name": "reset", - "class": "TimeManager", - "module": "Phaser" - } - ], - "warnings": [ - { - "message": "unknown tag: copyright", - "line": " ..\\Phaser\\time\\TimeManager.ts:3" - }, - { - "message": "unknown tag: license", - "line": " ..\\Phaser\\time\\TimeManager.ts:3" - } - ] -} \ No newline at end of file diff --git a/Docs/API/files/.._Phaser_time_TimeManager.ts.html b/Docs/API/files/.._Phaser_time_TimeManager.ts.html deleted file mode 100644 index f38ce3ec..00000000 --- a/Docs/API/files/.._Phaser_time_TimeManager.ts.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - ..\Phaser\time\TimeManager.ts - Phaser - - - - - - - - -
    -
    -
    - -

    - -
    -
    - API Docs for: 1.0.0 -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    File: ..\Phaser\time\TimeManager.ts

    - -
    -
    -/// <reference path="../_definitions.ts" />
    -
    -/**
    -* @author       Richard Davey <rich@photonstorm.com>
    -* @copyright    2013 Photon Storm Ltd.
    -* @license      https://github.com/photonstorm/phaser/blob/master/license.txt  MIT License
    -* @module       Phaser
    -*/
    -module Phaser {
    -
    -    export class TimeManager {
    -
    -        /**
    -        * This is the core internal game clock. It manages the elapsed time and calculation of delta values,
    -        * used for game object motion and tweens.
    -        *
    -        * @class TimeManager
    -        * @constructor
    -        * @param {Phaser.Game} game A reference to the currently running game.
    -        */
    -        constructor(game: Phaser.Game) {
    -
    -            this.game = game;
    -
    -            this._started = 0;
    -            this._timeLastSecond = this._started;
    -            this.time = this._started;
    -
    -            this.game.onPause.add(this.gamePaused, this);
    -            this.game.onResume.add(this.gameResumed, this);
    -
    -        }
    -
    -        /**
    -        * A reference to the currently running Game.
    -        * @property game
    -        * @type {Phaser.Game}
    -        */
    -        public game: Phaser.Game;
    -
    -        /**
    -        * The time at which the Game instance started.
    -        * @property _started
    -        * @private
    -        * @type {Number}
    -        */
    -        private _started: number;
    -
    -        /**
    -        * Number of milliseconds elapsed since the last frame update.
    -        * @property elapsed
    -        * @public
    -        * @type {Number}
    -        */
    -        public elapsed: number = 0;
    -
    -        /**
    -        * Game time counter.
    -        * @property time
    -        * @public
    -        * @type {Number}
    -        */
    -        public time: number = 0;
    -
    -        /**
    -        * Records how long the game has been paused for. Is reset each time the game pauses.
    -        * @property pausedTime
    -        * @public
    -        * @type {Number}
    -        */
    -        public pausedTime: number = 0;
    -
    -        /**
    -        * The time right now.
    -        * @property now
    -        * @public
    -        * @type {Number}
    -        */
    -        public now: number = 0;
    -
    -        /**
    -        * Elapsed time since the last frame.
    -        * @property delta
    -        * @public
    -        * @type {Number}
    -        */
    -        public delta: number = 0;
    -
    -        /**
    -        * The number of seconds that have elapsed since the game was started.
    -        * @method totalElapsedSeconds
    -        * @return {Number}
    -        */
    -        public get totalElapsedSeconds(): number {
    -
    -            return (this.now - this._started) * 0.001;
    -
    -        }
    -
    -        /**
    -        * Frames per second.
    -        * @property fps
    -        * @public
    -        * @type {Number}
    -        */
    -        public fps: number = 0;
    -
    -        /**
    -        * The lowest rate the fps has dropped to.
    -        * @property fpsMin
    -        * @public
    -        * @type {Number}
    -        */
    -        public fpsMin: number = 1000;
    -
    -        /**
    -        * The highest rate the fps has reached (usually no higher than 60fps).
    -        * @property fpsMax
    -        * @public
    -        * @type {Number}
    -        */
    -        public fpsMax: number = 0;
    -
    -        /**
    -        * The minimum amount of time the game has taken between two frames.
    -        * @property msMin
    -        * @public
    -        * @type {Number}
    -        */
    -        public msMin: number = 1000;
    -
    -        /**
    -        * The maximum amount of time the game has taken between two frames.
    -        * @property msMax
    -        * @public
    -        * @type {Number}
    -        */
    -        public msMax: number = 0;
    -
    -        /**
    -        * The number of frames record in the last second.
    -        * @property frames
    -        * @public
    -        * @type {Number}
    -        */
    -        public frames: number = 0;
    -
    -        /**
    -        * The time (in ms) that the last second counter ticked over.
    -        * @property _timeLastSecond
    -        * @private
    -        * @type {Number}
    -        */
    -        private _timeLastSecond: number = 0;
    -
    -        /**
    -         * Update clock and calculate the fps.
    -         * This is called automatically by Game._raf
    -         * @method update
    -         * @param {Number} raf The current timestamp, either performance.now or Date.now
    -         */
    -        public update(raf: number) {
    -
    -            this.now = raf; // mark
    -            this.delta = this.now - this.time; // elapsedMS
    -
    -            this.msMin = Math.min(this.msMin, this.delta);
    -            this.msMax = Math.max(this.msMax, this.delta);
    -
    -            this.frames++;
    -
    -            if (this.now > this._timeLastSecond + 1000)
    -            {
    -                this.fps = Math.round((this.frames * 1000) / (this.now - this._timeLastSecond));
    -                this.fpsMin = Math.min(this.fpsMin, this.fps);
    -                this.fpsMax = Math.max(this.fpsMax, this.fps);
    -
    -                this._timeLastSecond = this.now;
    -                this.frames = 0;
    -            }
    -
    -            this.time = this.now; // _total
    -
    -            //  Paused?
    -            if (this.game.paused)
    -            {
    -                this.pausedTime = this.now - this._pauseStarted;
    -            }
    -
    -        }
    -
    -        /**
    -        * Called when the game enters a paused state.
    -        * @method gamePaused
    -        * @private
    -        */
    -        private gamePaused() {
    -            this._pauseStarted = this.now;
    -        }
    -
    -        /**
    -        * Called when the game resumes from a paused state.
    -        * @method gameResumed
    -        * @private
    -        */
    -        private gameResumed() {
    -            //  Level out the delta timer to avoid spikes
    -            this.pauseDuration = this.pausedTime;
    -        }
    -
    -        /**
    -        * Records how long the game was paused for in miliseconds.
    -        * @property pauseDuration
    -        * @public
    -        * @type {Number}
    -        */
    -        public pauseDuration: number = 0;
    -
    -        /**
    -        * The time the game started being paused.
    -        * @property _pauseStarted
    -        * @private
    -        * @type {Number}
    -        */
    -        private _pauseStarted: number = 0;
    -
    -        /**
    -        * How long has passed since the given time.
    -        * @method elapsedSince
    -        * @param {Number} since The time you want to measure against.
    -        * @return {Number} The difference between the given time and now.
    -        */
    -        public elapsedSince(since: number): number {
    -
    -            return this.now - since;
    -
    -        }
    -
    -        /**
    -        * How long has passed since the given time (in seconds).
    -        * @method elapsedSecondsSince
    -        * @param {Number} since The time you want to measure (in seconds).
    -        * @return {Number} Duration between given time and now (in seconds).
    -        */
    -        public elapsedSecondsSince(since: number): number {
    -
    -            return (this.now - since) * 0.001;
    -
    -        }
    -
    -        /**
    -        * Resets the private _started value to now.
    -        * @method reset
    -        */
    -        public reset() {
    -
    -            this._started = this.now;
    -
    -        }
    -
    -    }
    -
    -}
    -    
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/Docs/API/index.html b/Docs/API/index.html deleted file mode 100644 index ca852ea6..00000000 --- a/Docs/API/index.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - Phaser - - - - - - - - -
    -
    -
    - -

    - -
    -
    - API Docs for: 1.0.0 -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -
    -
    -

    - Browse to a module or class using the sidebar to view its API documentation. -

    - -

    Keyboard Shortcuts

    - -
      -
    • Press s to focus the API search box.

    • - -
    • Use Up and Down to select classes, modules, and search results.

    • - -
    • With the API search box or sidebar focused, use -Left or -Right to switch sidebar tabs.

    • - -
    • With the API search box or sidebar focused, use Ctrl+Left and Ctrl+Right to switch sidebar tabs.

    • -
    -
    -
    - - - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/Docs/API/modules/Phaser.html b/Docs/API/modules/Phaser.html deleted file mode 100644 index d6337ff1..00000000 --- a/Docs/API/modules/Phaser.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - Phaser - Phaser - - - - - - - - -
    -
    -
    - -

    - -
    -
    - API Docs for: 1.0.0 -
    -
    -
    - -
    - -
    -
    -
    - Show: - - - - - - - -
    - - -
    -
    -
    -

    Phaser Module

    -
    - - - - - - - - - -
    - - - -
    - -
    - - - -
    -
    - -

    This module provides the following classes:

    - - - -
    - -
    - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - diff --git a/Docs/docs_build.bat b/Docs/docs_build.bat deleted file mode 100644 index 95cc9ce7..00000000 --- a/Docs/docs_build.bat +++ /dev/null @@ -1 +0,0 @@ -yuidoc -c ../Phaser/yuidoc.json -o API/ -t yuidoc-theme-dana -e .ts ../Phaser/time \ No newline at end of file diff --git a/Docs/docs_server.bat b/Docs/docs_server.bat deleted file mode 100644 index 05d5d3d6..00000000 --- a/Docs/docs_server.bat +++ /dev/null @@ -1 +0,0 @@ -yuidoc -n -e .ts --server 3000 ../Phaser/time \ No newline at end of file diff --git a/Docs/yuidoc-theme-dana b/Docs/yuidoc-theme-dana deleted file mode 160000 index f4dea8f2..00000000 --- a/Docs/yuidoc-theme-dana +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f4dea8f2cc6cfac28244dd35b62d9f3cffe0291c diff --git a/Docs/zwoptex-phaser.template b/Docs/zwoptex-phaser.template new file mode 100644 index 00000000..23b7f62f --- /dev/null +++ b/Docs/zwoptex-phaser.template @@ -0,0 +1,40 @@ +{ + + "frames": + [ + {% for sprite in spritesAndAliases %}{% if currentLoop.currentIndex > 0 %},{% /if %} + { + "filename": "{{ sprite.name }}", + "frame": {"x":{{ sprite.textureRectX }},"y":{{ sprite.textureRectY }},"w":{{ sprite.textureRectWidth }},"h":{{ sprite.textureRectHeight }}}, + "rotated": {% if sprite.isRotated %}true{% else %}false{% /if %}, + "trimmed": {% if sprite.isTrimmed %}true{% else %}false{% /if %}, + "spriteSourceSize": {"x":0,"y":0,"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, + "sourceSize": {"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, + "spriteColorRect": {"x":{{ sprite.sourceColorRectX }},"y":{{ sprite.sourceColorRectY }},"w":{{ sprite.sourceColorRectWidth }},"h":{{ sprite.sourceColorRectHeight }}}, + "spriteOffset": {"x":{{ sprite.offsetX }}, "y":{{ sprite.offsetY }}}, + "spriteSize": {"w":{{ sprite.sizeWidth }}, "h":{{ sprite.sizeHeight }}} + }{% /for %} + ], + + "meta": + { + + "app": "http://zwoptexapp.com", + "version": "{{ metadata.version }}", + "image": "{{ metadata.target.textureFileName }}{{ metadata.target.textureFileExtension }}", + "size": {"w":{{ metadata.sizeWidth }},"h":{{ metadata.sizeHeight }}}, + "name": "{{ metadata.name }}", + "premultipliedAlpha": {% if metadata.premultipliedAlpha %}true{% else %}false{% /if %}, + "target": { + "name": "{{ metadata.target.name }}", + "textureFileName": "{{ metadata.target.textureFileName }}", + "textureFileExtension": "{{ metadata.target.textureFileExtension }}", + "coordinatesFileName": "{{ metadata.target.coordinatesFileName }}", + "coordinatesFileExtension": "{{ metadata.target.coordinatesFileExtension }}", + "premultipliedAlpha": {% if metadata.target.premultipliedAlpha %}true{% else %}false{% /if %} + }, + "scale": "1" + + } + +} \ No newline at end of file diff --git a/examples/input/multi touch.php b/examples/input/multi touch.php new file mode 100644 index 00000000..a34ebe10 --- /dev/null +++ b/examples/input/multi touch.php @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file From 6353d8c7abe551c25946dcea872a0e711cf08808 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 26 Sep 2013 15:22:49 +0100 Subject: [PATCH 007/125] Fixed some eases. --- README.md | 2 ++ src/tween/Easing.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 52a419c9..57576c33 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ Version 1.0.7 (in progress in the dev branch) * Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. * Updated ArcadePhysics.separateX/Y to use new body system - much better results now. * QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using worldTransform values. +* Fixed the Bounce.In and Bounce.InOut tweens (thanks XekeDeath) + * TODO: addMarker hh:mm:ss:ms * TODO: Direction constants diff --git a/src/tween/Easing.js b/src/tween/Easing.js index 7e007a8e..b2b8350c 100644 --- a/src/tween/Easing.js +++ b/src/tween/Easing.js @@ -240,7 +240,7 @@ Phaser.Easing = { In: function ( k ) { - return 1 - TWEEN.Easing.Bounce.Out( 1 - k ); + return 1 - Phaser.Easing.Bounce.Out( 1 - k ); }, @@ -268,8 +268,8 @@ Phaser.Easing = { InOut: function ( k ) { - if ( k < 0.5 ) return TWEEN.Easing.Bounce.In( k * 2 ) * 0.5; - return TWEEN.Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5; + if ( k < 0.5 ) return Phaser.Easing.Bounce.In( k * 2 ) * 0.5; + return Phaser.Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5; } From 18c695e9ddc4d62e47cf5c01824b30bce69daa7c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 27 Sep 2013 09:57:08 +0100 Subject: [PATCH 008/125] PixiPatch and other 1.0.7 features --- README.md | 10 ++ examples/input/follow mouse.php | 53 ++++++++ src/PixiPatch.js | 230 ++++++++++++++++++++++++++++++++ src/animation/Animation.js | 102 ++++++++++++-- src/animation/Parser.js | 24 ++-- src/gameobjects/Button.js | 2 +- src/gameobjects/Sprite.js | 4 +- src/gameobjects/Text.js | 8 +- src/sound/Sound.js | 2 +- src/utils/Utils.js | 4 +- 10 files changed, 413 insertions(+), 26 deletions(-) create mode 100644 examples/input/follow mouse.php create mode 100644 src/PixiPatch.js diff --git a/README.md b/README.md index 57576c33..00c900a4 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,19 @@ Version 1.0.7 (in progress in the dev branch) * Updated ArcadePhysics.separateX/Y to use new body system - much better results now. * QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using worldTransform values. * Fixed the Bounce.In and Bounce.InOut tweens (thanks XekeDeath) +* Renamed Phaser.Text.text to Phaser.Text.content to avoid conflict and overwrite from Pixi local var. +* Renamed Phaser.Text.style to Phaser.Text.font to avoid conflict and overwrite from Pixi local var. +* Phaser.Button now sets useHandCursor to true by default. +* Fixed an issue in Animation.update where if the game was paused it would get an insane delta timer throwing a uuid error. +* Added PixiPatch.js to patch in a few essential features until Pixi is updated. +* Fixed issue in Animation.play where the given frameRate and loop values wouldn't overwrite those set on construction. +* Added Animation.paused - can be set to true/false. +* New: Phaser.Animation.generateFrameNames - really useful when creating animation data from texture atlases using file names, not indexes. + * TODO: addMarker hh:mm:ss:ms * TODO: Direction constants +* TODO: Camera will adjust core DO. Means scrollFactor will need to be dropped sadly, but there are other ways to emulate its effect. Version 1.0.6 (September 24th 2013) diff --git a/examples/input/follow mouse.php b/examples/input/follow mouse.php new file mode 100644 index 00000000..67e480d0 --- /dev/null +++ b/examples/input/follow mouse.php @@ -0,0 +1,53 @@ + + + + + \ No newline at end of file diff --git a/src/PixiPatch.js b/src/PixiPatch.js new file mode 100644 index 00000000..c1bfe366 --- /dev/null +++ b/src/PixiPatch.js @@ -0,0 +1,230 @@ +/** + * We're replacing a couple of Pixi's methods here to fix or add some vital functionality: + * + * 1) Added support for Trimmed sprite sheets + * 2) Skip display objects with an alpha of zero + * + * Hopefully we can remove this once Pixi has been updated to support these things. + */ + +PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject) +{ + // no loger recurrsive! + var transform; + var context = this.context; + + context.globalCompositeOperation = 'source-over'; + + // one the display object hits this. we can break the loop + var testObject = displayObject.last._iNext; + displayObject = displayObject.first; + + do + { + transform = displayObject.worldTransform; + + if(!displayObject.visible) + { + displayObject = displayObject.last._iNext; + continue; + } + + if(!displayObject.renderable || displayObject.alpha == 0) + { + displayObject = displayObject._iNext; + continue; + } + + if(displayObject instanceof PIXI.Sprite) + { + var frame = displayObject.texture.frame; + + if(frame) + { + context.globalAlpha = displayObject.worldAlpha; + + if (displayObject.texture.trimmed) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2] + displayObject.texture.trim.x, transform[5] + displayObject.texture.trim.y); + } + else + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); + } + + context.drawImage(displayObject.texture.baseTexture.source, + frame.x, + frame.y, + frame.width, + frame.height, + (displayObject.anchor.x) * -frame.width, + (displayObject.anchor.y) * -frame.height, + frame.width, + frame.height); + } + } + else if(displayObject instanceof PIXI.Strip) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]) + this.renderStrip(displayObject); + } + else if(displayObject instanceof PIXI.TilingSprite) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]) + this.renderTilingSprite(displayObject); + } + else if(displayObject instanceof PIXI.CustomRenderable) + { + displayObject.renderCanvas(this); + } + else if(displayObject instanceof PIXI.Graphics) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]) + PIXI.CanvasGraphics.renderGraphics(displayObject, context); + } + else if(displayObject instanceof PIXI.FilterBlock) + { + if(displayObject.open) + { + context.save(); + + var cacheAlpha = displayObject.mask.alpha; + var maskTransform = displayObject.mask.worldTransform; + + context.setTransform(maskTransform[0], maskTransform[3], maskTransform[1], maskTransform[4], maskTransform[2], maskTransform[5]) + + displayObject.mask.worldAlpha = 0.5; + + context.worldAlpha = 0; + + PIXI.CanvasGraphics.renderGraphicsMask(displayObject.mask, context); + context.clip(); + + displayObject.mask.worldAlpha = cacheAlpha; + } + else + { + context.restore(); + } + } + // count++ + displayObject = displayObject._iNext; + + + } + while(displayObject != testObject) + +} + +PIXI.WebGLBatch.prototype.update = function() +{ + var gl = this.gl; + var worldTransform, width, height, aX, aY, w0, w1, h0, h1, index, index2, index3 + + var a, b, c, d, tx, ty; + + var indexRun = 0; + + var displayObject = this.head; + + while(displayObject) + { + if(displayObject.vcount === PIXI.visibleCount) + { + width = displayObject.texture.frame.width; + height = displayObject.texture.frame.height; + + // TODO trim?? + aX = displayObject.anchor.x;// - displayObject.texture.trim.x + aY = displayObject.anchor.y; //- displayObject.texture.trim.y + w0 = width * (1-aX); + w1 = width * -aX; + + h0 = height * (1-aY); + h1 = height * -aY; + + index = indexRun * 8; + + worldTransform = displayObject.worldTransform; + + a = worldTransform[0]; + b = worldTransform[3]; + c = worldTransform[1]; + d = worldTransform[4]; + tx = worldTransform[2]; + ty = worldTransform[5]; + + if (displayObject.texture.trimmed) + { + tx += displayObject.texture.trim.x; + ty += displayObject.texture.trim.y; + } + + this.verticies[index + 0 ] = a * w1 + c * h1 + tx; + this.verticies[index + 1 ] = d * h1 + b * w1 + ty; + + this.verticies[index + 2 ] = a * w0 + c * h1 + tx; + this.verticies[index + 3 ] = d * h1 + b * w0 + ty; + + this.verticies[index + 4 ] = a * w0 + c * h0 + tx; + this.verticies[index + 5 ] = d * h0 + b * w0 + ty; + + this.verticies[index + 6] = a * w1 + c * h0 + tx; + this.verticies[index + 7] = d * h0 + b * w1 + ty; + + if(displayObject.updateFrame || displayObject.texture.updateFrame) + { + this.dirtyUVS = true; + + var texture = displayObject.texture; + + var frame = texture.frame; + var tw = texture.baseTexture.width; + var th = texture.baseTexture.height; + + this.uvs[index + 0] = frame.x / tw; + this.uvs[index +1] = frame.y / th; + + this.uvs[index +2] = (frame.x + frame.width) / tw; + this.uvs[index +3] = frame.y / th; + + this.uvs[index +4] = (frame.x + frame.width) / tw; + this.uvs[index +5] = (frame.y + frame.height) / th; + + this.uvs[index +6] = frame.x / tw; + this.uvs[index +7] = (frame.y + frame.height) / th; + + displayObject.updateFrame = false; + } + + // TODO this probably could do with some optimisation.... + if(displayObject.cacheAlpha != displayObject.worldAlpha) + { + displayObject.cacheAlpha = displayObject.worldAlpha; + + var colorIndex = indexRun * 4; + this.colors[colorIndex] = this.colors[colorIndex + 1] = this.colors[colorIndex + 2] = this.colors[colorIndex + 3] = displayObject.worldAlpha; + this.dirtyColors = true; + } + } + else + { + index = indexRun * 8; + + this.verticies[index + 0 ] = 0; + this.verticies[index + 1 ] = 0; + + this.verticies[index + 2 ] = 0; + this.verticies[index + 3 ] = 0; + + this.verticies[index + 4 ] = 0; + this.verticies[index + 5 ] = 0; + + this.verticies[index + 6] = 0; + this.verticies[index + 7] = 0; + } + + indexRun++; + displayObject = displayObject.__next; + } +} diff --git a/src/animation/Animation.js b/src/animation/Animation.js index a5e8d271..4604a99a 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -72,6 +72,19 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope */ this.isPlaying = false; + /** + * @property {boolean} isPaused - The paused state of the Animation. + * @default + */ + this.isPaused = false; + + /** + * @property {boolean} _pauseStartTime - The time the animation paused. + * @private + * @default + */ + this._pauseStartTime = 0; + /** * @property {number} _frameIndex * @private @@ -101,18 +114,15 @@ Phaser.Animation.prototype = { */ play: function (frameRate, loop) { - frameRate = frameRate || null; - loop = loop || null; - - if (frameRate !== null) + if (typeof frameRate === 'number') { + // If they set a new frame rate then use it, otherwise use the one set on creation this.delay = 1000 / frameRate; - // this.delay = frameRate; } - if (loop !== null) + if (typeof loop === 'boolean') { - // If they set a new loop value then use it, otherwise use the default set on creation + // If they set a new loop value then use it, otherwise use the one set on creation this.looped = loop; } @@ -182,6 +192,11 @@ Phaser.Animation.prototype = { */ update: function () { + if (this.isPaused) + { + return false; + } + if (this.isPlaying == true && this.game.time.now >= this._timeNextFrame) { this._frameSkip = 1; @@ -210,7 +225,12 @@ Phaser.Animation.prototype = { { this._frameIndex = this._frameIndex - this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); - this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); + + if (this.currentFrame) + { + this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); + } + this._parent.events.onAnimationLoop.dispatch(this._parent, this); } else @@ -266,6 +286,38 @@ Phaser.Animation.prototype = { }; +/** + */ +Object.defineProperty(Phaser.Animation.prototype, "paused", { + + get: function () { + + return this.isPaused; + + }, + + set: function (value) { + + this.isPaused = value; + + if (value) + { + // Paused + this._pauseStartTime = this.game.time.now; + } + else + { + // Un-paused + if (this.isPlaying) + { + this._timeNextFrame = this.game.time.now + this.delay; + } + } + + } + +}); + Object.defineProperty(Phaser.Animation.prototype, "frameTotal", { /** @@ -316,3 +368,37 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { } }); + +/* + * Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. + * For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' + * You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); + * The zeroPad value dictates how many zeroes to add in front of the numbers (if any) + */ +Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { + + if (typeof suffix == 'undefined') { suffix = ''; } + + var output = []; + var frame = ''; + + for (var i = min; i <= max; i++) + { + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); + } + + return output; + +} \ No newline at end of file diff --git a/src/animation/Parser.js b/src/animation/Parser.js index 0c420392..46df1d6a 100644 --- a/src/animation/Parser.js +++ b/src/animation/Parser.js @@ -146,9 +146,11 @@ Phaser.Animation.Parser = { frames[i].spriteSourceSize.h ); - PIXI.TextureCache[uuid].realSize = frames[i].spriteSourceSize; - // PIXI.TextureCache[uuid].realSize = frames[i].sourceSize; - PIXI.TextureCache[uuid].trim.x = 0; + // We had to hack Pixi to get this to work :( + PIXI.TextureCache[uuid].trimmed = true; + PIXI.TextureCache[uuid].trim.x = frames[i].spriteSourceSize.x; + PIXI.TextureCache[uuid].trim.y = frames[i].spriteSourceSize.y; + } } @@ -216,9 +218,11 @@ Phaser.Animation.Parser = { frames[key].spriteSourceSize.h ); - PIXI.TextureCache[uuid].realSize = frames[key].spriteSourceSize; - // PIXI.TextureCache[uuid].realSize = frames[key].sourceSize; - PIXI.TextureCache[uuid].trim.x = 0; + // We had to hack Pixi to get this to work :( + PIXI.TextureCache[uuid].trimmed = true; + PIXI.TextureCache[uuid].trim.x = frames[key].spriteSourceSize.x; + PIXI.TextureCache[uuid].trim.y = frames[key].spriteSourceSize.y; + } i++; @@ -275,7 +279,8 @@ Phaser.Animation.Parser = { }); // Trimmed? - if (frame.frameX.nodeValue != '-0' || frame.frameY.nodeValue != '-0') { + if (frame.frameX.nodeValue != '-0' || frame.frameY.nodeValue != '-0') + { newFrame.setTrim( true, frame.width.nodeValue, @@ -293,7 +298,10 @@ Phaser.Animation.Parser = { h: frame.frameHeight.nodeValue }; - PIXI.TextureCache[uuid].trim.x = 0; + // We had to hack Pixi to get this to work :( + PIXI.TextureCache[uuid].trimmed = true; + PIXI.TextureCache[uuid].trim.x = Math.abs(frame.frameX.nodeValue); + PIXI.TextureCache[uuid].trim.y = Math.abs(frame.frameY.nodeValue); } } diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 325fee20..171ed086 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -55,7 +55,7 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, this.onInputUp.add(callback, callbackContext); } - this.input.start(0, false, true); + this.input.start(0, true); // Redirect the input events to here so we can handle animation updates, etc this.events.onInputOver.add(this.onInputOverHandler, this); diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 39b499fb..d10f366a 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -255,7 +255,7 @@ Phaser.Sprite.prototype.preUpdate = function() { } // Frame updated? - if (this.currentFrame.uuid != this._cache.frameID) + if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID) { this._cache.frameWidth = this.texture.frame.width; this._cache.frameHeight = this.texture.frame.height; @@ -263,7 +263,7 @@ Phaser.Sprite.prototype.preUpdate = function() { this._cache.dirty = true; } - if (this._cache.dirty) + if (this._cache.dirty && this.currentFrame) { this._cache.width = Math.floor(this.currentFrame.sourceSizeW * this._cache.scaleX); this._cache.height = Math.floor(this.currentFrame.sourceSizeH * this._cache.scaleY); diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index 092143eb..f3ba4472 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -94,7 +94,7 @@ Object.defineProperty(Phaser.Text.prototype, 'angle', { }); -Object.defineProperty(Phaser.Text.prototype, 'text', { +Object.defineProperty(Phaser.Text.prototype, 'content', { get: function() { return this._text; @@ -106,14 +106,14 @@ Object.defineProperty(Phaser.Text.prototype, 'text', { if (value !== this._text) { this._text = value; - this.dirty = true; + this.setText(value); } } }); -Object.defineProperty(Phaser.Text.prototype, 'style', { +Object.defineProperty(Phaser.Text.prototype, 'font', { get: function() { return this._style; @@ -125,7 +125,7 @@ Object.defineProperty(Phaser.Text.prototype, 'style', { if (value !== this._style) { this._style = value; - this.dirty = true; + this.setStyle(value); } } diff --git a/src/sound/Sound.js b/src/sound/Sound.js index c4cd3bea..f466cbfb 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -268,7 +268,7 @@ Phaser.Sound.prototype = { if (typeof loop == 'undefined') { loop = false; } if (typeof forceRestart == 'undefined') { forceRestart = false; } - console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); + // console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); if (this.isPlaying == true && forceRestart == false && this.override == false) { diff --git a/src/utils/Utils.js b/src/utils/Utils.js index ed08123e..8be83b21 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -13,8 +13,8 @@ Phaser.Utils = { /** - * Javascript string pad - * http://www.webtoolkit.info/ + * Javascript string pad + * http://www.webtoolkit.info/ * pad = the string to pad it out with (defaults to a space) * dir = 1 (left), 2 (right), 3 (both) * @method pad From 903b11b730021deece294cc4ec7d5c62bbf2be76 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 13:27:15 +0100 Subject: [PATCH 009/125] Groups examples and some boolean checks corrected --- examples/camera/follow styles.php | 3 - examples/groups/add to group 1.php | 63 ++++++++++++++++++ examples/groups/add to group 2.php | 56 ++++++++++++++++ examples/groups/bring to top 2.php | 101 +++++++++++++++++++++++++++++ examples/groups/bring to top.php | 46 +++++++++++++ examples/groups/call all.php | 52 +++++++++++++++ examples/groups/create group.php | 57 ++++++++++++++++ examples/groups/display order.php | 64 ++++++++++++++++++ examples/groups/for each.php | 50 ++++++++++++++ examples/groups/get first.php | 72 ++++++++++++++++++++ src/core/Game.js | 2 +- src/input/InputHandler.js | 2 +- 12 files changed, 563 insertions(+), 5 deletions(-) create mode 100644 examples/groups/add to group 1.php create mode 100644 examples/groups/add to group 2.php create mode 100644 examples/groups/bring to top 2.php create mode 100644 examples/groups/bring to top.php create mode 100644 examples/groups/call all.php create mode 100644 examples/groups/create group.php create mode 100644 examples/groups/display order.php create mode 100644 examples/groups/for each.php create mode 100644 examples/groups/get first.php diff --git a/examples/camera/follow styles.php b/examples/camera/follow styles.php index dac30a44..ee0f1dc9 100644 --- a/examples/camera/follow styles.php +++ b/examples/camera/follow styles.php @@ -71,9 +71,6 @@ game.camera.follow(ufo); - - - // follow style switch buttons btn0 = game.add.button(6, 40, 'button', lockonFollow,this, 0, 0, 0); btn1 = game.add.button(6, 120, 'button', platformerFollow,this, 1, 1, 1); diff --git a/examples/groups/add to group 1.php b/examples/groups/add to group 1.php new file mode 100644 index 00000000..03e6f9ca --- /dev/null +++ b/examples/groups/add to group 1.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/groups/add to group 2.php b/examples/groups/add to group 2.php new file mode 100644 index 00000000..726a1f68 --- /dev/null +++ b/examples/groups/add to group 2.php @@ -0,0 +1,56 @@ + + + + + + diff --git a/examples/groups/bring to top 2.php b/examples/groups/bring to top 2.php new file mode 100644 index 00000000..56872efc --- /dev/null +++ b/examples/groups/bring to top 2.php @@ -0,0 +1,101 @@ + + + + + + diff --git a/examples/groups/bring to top.php b/examples/groups/bring to top.php new file mode 100644 index 00000000..4849b19b --- /dev/null +++ b/examples/groups/bring to top.php @@ -0,0 +1,46 @@ + + + + + + diff --git a/examples/groups/call all.php b/examples/groups/call all.php new file mode 100644 index 00000000..c7f22265 --- /dev/null +++ b/examples/groups/call all.php @@ -0,0 +1,52 @@ + + + + + + diff --git a/examples/groups/create group.php b/examples/groups/create group.php new file mode 100644 index 00000000..3ce40f43 --- /dev/null +++ b/examples/groups/create group.php @@ -0,0 +1,57 @@ + + + + + + diff --git a/examples/groups/display order.php b/examples/groups/display order.php new file mode 100644 index 00000000..35b97990 --- /dev/null +++ b/examples/groups/display order.php @@ -0,0 +1,64 @@ + + + + + + diff --git a/examples/groups/for each.php b/examples/groups/for each.php new file mode 100644 index 00000000..32ca7739 --- /dev/null +++ b/examples/groups/for each.php @@ -0,0 +1,50 @@ + + + + + + diff --git a/examples/groups/get first.php b/examples/groups/get first.php new file mode 100644 index 00000000..c7cdd446 --- /dev/null +++ b/examples/groups/get first.php @@ -0,0 +1,72 @@ + + + + + + diff --git a/src/core/Game.js b/src/core/Game.js index c24dbb40..bf73da33 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -31,7 +31,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant renderer = renderer || Phaser.AUTO; parent = parent || ''; state = state || null; - transparent = transparent || false; + if (typeof transparent == 'undefined') { transparent = false; } antialias = typeof antialias === 'undefined' ? true : antialias; /** diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 4bcec1bf..6f14400a 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -75,7 +75,7 @@ Phaser.InputHandler.prototype = { start: function (priority, useHandCursor) { priority = priority || 0; - useHandCursor = useHandCursor || false; + if (typeof useHandCursor == 'undefined') { useHandCursor = false; } // Turning on if (this.enabled == false) From 497d15b5bcaacf01a38d25351b0556950cd43098 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 27 Sep 2013 13:47:22 +0100 Subject: [PATCH 010/125] Sprite.play --- README.md | 1 + src/gameobjects/Sprite.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index 00c900a4..7af998fd 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ Version 1.0.7 (in progress in the dev branch) * Fixed issue in Animation.play where the given frameRate and loop values wouldn't overwrite those set on construction. * Added Animation.paused - can be set to true/false. * New: Phaser.Animation.generateFrameNames - really useful when creating animation data from texture atlases using file names, not indexes. +* Added Sprite.play as a handy short-cut to play an animation already loaded onto a Sprite. * TODO: addMarker hh:mm:ss:ms diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index d10f366a..b0dc29a4 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -470,6 +470,25 @@ Phaser.Sprite.prototype.getBounds = function(rect) { } +/** +* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() +* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. +* +* @method play +* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". +* @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. +* @return {Phaser.Animation} A reference to playing Animation instance. +*/ +Phaser.Sprite.prototype.play = function (name, frameRate, loop) { + + if (this.animations) + { + this.animations.play(name, frameRate, loop); + } + +} + Object.defineProperty(Phaser.Sprite.prototype, 'angle', { get: function() { From efa01dcaa319bb403314145850372414d01cd4de Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 18:06:36 +0100 Subject: [PATCH 011/125] Final commit of the day more groups examples --- examples/groups/group as layer.php | 91 ++++++++++++++++++++ examples/groups/group transform - rotate.php | 63 ++++++++++++++ examples/groups/group transform - tween.php | 72 ++++++++++++++++ examples/groups/group transform.php | 78 +++++++++++++++++ examples/groups/recyling.php | 70 +++++++++++++++ examples/groups/remove.php | 73 ++++++++++++++++ examples/groups/replace.php | 79 +++++++++++++++++ examples/groups/set All.php | 46 ++++++++++ 8 files changed, 572 insertions(+) create mode 100644 examples/groups/group as layer.php create mode 100644 examples/groups/group transform - rotate.php create mode 100644 examples/groups/group transform - tween.php create mode 100644 examples/groups/group transform.php create mode 100644 examples/groups/recyling.php create mode 100644 examples/groups/remove.php create mode 100644 examples/groups/replace.php create mode 100644 examples/groups/set All.php diff --git a/examples/groups/group as layer.php b/examples/groups/group as layer.php new file mode 100644 index 00000000..1e2d25aa --- /dev/null +++ b/examples/groups/group as layer.php @@ -0,0 +1,91 @@ + + + + + + diff --git a/examples/groups/group transform - rotate.php b/examples/groups/group transform - rotate.php new file mode 100644 index 00000000..f2b0c7cd --- /dev/null +++ b/examples/groups/group transform - rotate.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/groups/group transform - tween.php b/examples/groups/group transform - tween.php new file mode 100644 index 00000000..b11d2560 --- /dev/null +++ b/examples/groups/group transform - tween.php @@ -0,0 +1,72 @@ + + + + + + diff --git a/examples/groups/group transform.php b/examples/groups/group transform.php new file mode 100644 index 00000000..c6a4fcea --- /dev/null +++ b/examples/groups/group transform.php @@ -0,0 +1,78 @@ + + + + + + diff --git a/examples/groups/recyling.php b/examples/groups/recyling.php new file mode 100644 index 00000000..bee0343a --- /dev/null +++ b/examples/groups/recyling.php @@ -0,0 +1,70 @@ + + + + + + diff --git a/examples/groups/remove.php b/examples/groups/remove.php new file mode 100644 index 00000000..1684870c --- /dev/null +++ b/examples/groups/remove.php @@ -0,0 +1,73 @@ + + + + + + diff --git a/examples/groups/replace.php b/examples/groups/replace.php new file mode 100644 index 00000000..6bbf5ba8 --- /dev/null +++ b/examples/groups/replace.php @@ -0,0 +1,79 @@ + + + + + + diff --git a/examples/groups/set All.php b/examples/groups/set All.php new file mode 100644 index 00000000..356bbaf7 --- /dev/null +++ b/examples/groups/set All.php @@ -0,0 +1,46 @@ + + + + + + From 8096dc67f5a7e094899d77c1a4dcb5f04a478d76 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 18:25:18 +0100 Subject: [PATCH 012/125] Corrected few typos and added a keyboard exampl --- examples/groups/add to group 2.php | 2 +- examples/groups/create group.php | 2 +- examples/groups/group transform - rotate.php | 2 +- examples/groups/group transform.php | 2 +- examples/input/keyboard.php | 95 ++++++++++++++++++++ 5 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 examples/input/keyboard.php diff --git a/examples/groups/add to group 2.php b/examples/groups/add to group 2.php index 726a1f68..5ece783f 100644 --- a/examples/groups/add to group 2.php +++ b/examples/groups/add to group 2.php @@ -23,7 +23,7 @@ friendAndFoe = game.add.group(); enemies = game.add.group(); - // You can directly create sprite and add it to a group + // You can directly create a sprite and add it to a group // using just one line. friendAndFoe.create(200, 240, 'ufo'); diff --git a/examples/groups/create group.php b/examples/groups/create group.php index 3ce40f43..0474e4bf 100644 --- a/examples/groups/create group.php +++ b/examples/groups/create group.php @@ -1,6 +1,6 @@ diff --git a/examples/groups/group transform - rotate.php b/examples/groups/group transform - rotate.php index f2b0c7cd..e569cc68 100644 --- a/examples/groups/group transform - rotate.php +++ b/examples/groups/group transform - rotate.php @@ -1,6 +1,6 @@ diff --git a/examples/groups/group transform.php b/examples/groups/group transform.php index c6a4fcea..06a8854a 100644 --- a/examples/groups/group transform.php +++ b/examples/groups/group transform.php @@ -1,6 +1,6 @@ diff --git a/examples/input/keyboard.php b/examples/input/keyboard.php new file mode 100644 index 00000000..c5a432da --- /dev/null +++ b/examples/input/keyboard.php @@ -0,0 +1,95 @@ + + + + + + From 40b968028aa81ad896c61536f4c993c98133c23b Mon Sep 17 00:00:00 2001 From: Betsy Cottonflop Date: Sat, 28 Sep 2013 16:52:37 -0700 Subject: [PATCH 013/125] Fix for incorrect new particle positioning --- src/gameobjects/Sprite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index b0dc29a4..dbb2337a 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -363,8 +363,8 @@ Phaser.Sprite.prototype.reset = function(x, y) { this.x = x; this.y = y; - this.position.x = x; - this.position.y = y; + this.position.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + this.position.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); this.alive = true; this.exists = true; this.visible = true; From 29dbbcae52f1f044102aeedf7c829c7bb494316d Mon Sep 17 00:00:00 2001 From: XekeDeath Date: Mon, 30 Sep 2013 13:01:51 +1000 Subject: [PATCH 014/125] Fix Particle Emitters when using Emitter width/height --- src/particles/arcade/Emitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index d8d886f3..c3fb007c 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -358,7 +358,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () { if (this.width > 1 || this.height > 1) { - particle.reset(this.emiteX - this.game.rnd.integerInRange(this.left, this.right), this.emiteY - this.game.rnd.integerInRange(this.top, this.bottom)); + particle.reset(this.game.rnd.integerInRange(this.left, this.right), this.game.rnd.integerInRange(this.top, this.bottom)); } else { From 80e80ddccb640ea5ffc3a2826eb57b4c26ab83e4 Mon Sep 17 00:00:00 2001 From: XekeDeath Date: Mon, 30 Sep 2013 13:04:22 +1000 Subject: [PATCH 015/125] Make animation looping robust when skipping frames. --- src/animation/Animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animation/Animation.js b/src/animation/Animation.js index a5e8d271..da486f01 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -208,7 +208,7 @@ Phaser.Animation.prototype = { { if (this.looped) { - this._frameIndex = this._frameIndex - this._frames.length; + this._frameIndex = this._frameIndex %= this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); this._parent.events.onAnimationLoop.dispatch(this._parent, this); From 62b5aa9bd996182e65d89b15bd6101248eb705c8 Mon Sep 17 00:00:00 2001 From: XekeDeath Date: Mon, 30 Sep 2013 13:28:17 +1000 Subject: [PATCH 016/125] Removed redundant assignment. --- src/animation/Animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animation/Animation.js b/src/animation/Animation.js index e59b3dff..90f456cf 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -223,7 +223,7 @@ Phaser.Animation.prototype = { { if (this.looped) { - this._frameIndex = this._frameIndex %= this._frames.length; + this._frameIndex %= this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); if (this.currentFrame) From 31bbf05aceec51c214e7fe72e671c01ef83c5393 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 30 Sep 2013 11:15:50 +0100 Subject: [PATCH 017/125] * Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly. * Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. * Change: When you swap State all active tweens are now purged. --- README.md | 4 + build/phaser.js | 507 +++++++++++++++++++++++++++--- examples/js.php | 1 + src/animation/AnimationManager.js | 16 + src/core/StateManager.js | 4 +- src/gameobjects/Button.js | 1 + src/sound/Sound.js | 28 +- src/sound/SoundManager.js | 2 - src/tween/Tween.js | 6 +- src/tween/TweenManager.js | 3 +- 10 files changed, 518 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 7af998fd..40e2b81f 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,10 @@ Version 1.0.7 (in progress in the dev branch) * Added Animation.paused - can be set to true/false. * New: Phaser.Animation.generateFrameNames - really useful when creating animation data from texture atlases using file names, not indexes. * Added Sprite.play as a handy short-cut to play an animation already loaded onto a Sprite. +* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly. +* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. +* Change: When you swap State all active tweens are now purged. +* BUG: Loader conflict if 2 keys are the same even if they are in different packages (i.e. "title" for picture and audio). * TODO: addMarker hh:mm:ss:ms diff --git a/build/phaser.js b/build/phaser.js index feaf453e..5bf30232 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -1,7 +1,7 @@ /** * Phaser - http://www.phaser.io * -* v1.0.6 - Built at: Tue, 24 Sep 2013 12:29:16 +0000 +* v1.0.7 - Built at: Fri, 27 Sep 2013 23:12:25 +0000 * * @author Richard Davey http://www.photonstorm.com @photonstorm * @@ -34,7 +34,7 @@ var PIXI = PIXI || {}; */ var Phaser = Phaser || { - VERSION: '1.0.6', + VERSION: '1.0.7-beta', GAMES: [], AUTO: 0, CANVAS: 1, @@ -80,8 +80,8 @@ PIXI.InteractionManager = function (dummy) { Phaser.Utils = { /** - * Javascript string pad - * http://www.webtoolkit.info/ + * Javascript string pad + * http://www.webtoolkit.info/ * pad = the string to pad it out with (defaults to a space) * dir = 1 (left), 2 (right), 3 (both) * @method pad @@ -7839,7 +7839,9 @@ Phaser.StateManager.prototype = { this.onShutDownCallback.call(this.callbackContext); } - if (clearWorld) { + if (clearWorld) + { + this.game.tweens.removeAll(); this.game.world.destroy(); @@ -10493,6 +10495,11 @@ Phaser.Game.prototype = { console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000'); } + if (Phaser.VERSION.substr(-5) == '-beta') + { + console.warn('You are using a beta version of Phaser. Some things may not work.'); + } + this.isRunning = true; this._loadComplete = false; @@ -14150,7 +14157,7 @@ Phaser.Sprite.prototype.preUpdate = function() { } // Frame updated? - if (this.currentFrame.uuid != this._cache.frameID) + if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID) { this._cache.frameWidth = this.texture.frame.width; this._cache.frameHeight = this.texture.frame.height; @@ -14158,7 +14165,7 @@ Phaser.Sprite.prototype.preUpdate = function() { this._cache.dirty = true; } - if (this._cache.dirty) + if (this._cache.dirty && this.currentFrame) { this._cache.width = Math.floor(this.currentFrame.sourceSizeW * this._cache.scaleX); this._cache.height = Math.floor(this.currentFrame.sourceSizeH * this._cache.scaleY); @@ -14365,6 +14372,25 @@ Phaser.Sprite.prototype.getBounds = function(rect) { } +/** +* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() +* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. +* +* @method play +* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". +* @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. +* @return {Phaser.Animation} A reference to playing Animation instance. +*/ +Phaser.Sprite.prototype.play = function (name, frameRate, loop) { + + if (this.animations) + { + this.animations.play(name, frameRate, loop); + } + +} + Object.defineProperty(Phaser.Sprite.prototype, 'angle', { get: function() { @@ -14637,7 +14663,7 @@ Object.defineProperty(Phaser.Text.prototype, 'angle', { }); -Object.defineProperty(Phaser.Text.prototype, 'text', { +Object.defineProperty(Phaser.Text.prototype, 'content', { get: function() { return this._text; @@ -14649,14 +14675,14 @@ Object.defineProperty(Phaser.Text.prototype, 'text', { if (value !== this._text) { this._text = value; - this.dirty = true; + this.setText(value); } } }); -Object.defineProperty(Phaser.Text.prototype, 'style', { +Object.defineProperty(Phaser.Text.prototype, 'font', { get: function() { return this._style; @@ -14668,7 +14694,7 @@ Object.defineProperty(Phaser.Text.prototype, 'style', { if (value !== this._style) { this._style = value; - this.dirty = true; + this.setStyle(value); } } @@ -14855,7 +14881,7 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, this.onInputUp.add(callback, callbackContext); } - this.input.start(0, false, true); + this.input.start(0, true); // Redirect the input events to here so we can handle animation updates, etc this.events.onInputOver.add(this.onInputOverHandler, this); @@ -14951,6 +14977,7 @@ Phaser.Button.prototype.onInputOutHandler = function (pointer) { { this.onInputOut.dispatch(this, pointer); } + }; Phaser.Button.prototype.onInputDownHandler = function (pointer) { @@ -19522,7 +19549,8 @@ Phaser.TweenManager.prototype = { */ removeAll: function () { - this._tweens = []; + this._add.length = 0; + this._tweens.length = 0; }, @@ -19877,11 +19905,15 @@ Phaser.Tween.prototype = { pause: function () { this._paused = true; + this._pausedTime = this.game.time.now; }, resume: function () { + this._paused = false; - this._startTime += this.game.time.pauseDuration; + + this._startTime += (this.game.time.now - this._pausedTime); + }, update: function ( time ) { @@ -20257,7 +20289,7 @@ Phaser.Easing = { In: function ( k ) { - return 1 - TWEEN.Easing.Bounce.Out( 1 - k ); + return 1 - Phaser.Easing.Bounce.Out( 1 - k ); }, @@ -20285,8 +20317,8 @@ Phaser.Easing = { InOut: function ( k ) { - if ( k < 0.5 ) return TWEEN.Easing.Bounce.In( k * 2 ) * 0.5; - return TWEEN.Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5; + if ( k < 0.5 ) return Phaser.Easing.Bounce.In( k * 2 ) * 0.5; + return Phaser.Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5; } @@ -20880,6 +20912,22 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); +Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { + + get: function () { + + return this.currentAnim.isPaused; + + }, + + set: function (value) { + + this.currentAnim.paused = value; + + } + +}); + Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { /** @@ -21023,6 +21071,19 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope */ this.isPlaying = false; + /** + * @property {boolean} isPaused - The paused state of the Animation. + * @default + */ + this.isPaused = false; + + /** + * @property {boolean} _pauseStartTime - The time the animation paused. + * @private + * @default + */ + this._pauseStartTime = 0; + /** * @property {number} _frameIndex * @private @@ -21052,18 +21113,15 @@ Phaser.Animation.prototype = { */ play: function (frameRate, loop) { - frameRate = frameRate || null; - loop = loop || null; - - if (frameRate !== null) + if (typeof frameRate === 'number') { + // If they set a new frame rate then use it, otherwise use the one set on creation this.delay = 1000 / frameRate; - // this.delay = frameRate; } - if (loop !== null) + if (typeof loop === 'boolean') { - // If they set a new loop value then use it, otherwise use the default set on creation + // If they set a new loop value then use it, otherwise use the one set on creation this.looped = loop; } @@ -21133,6 +21191,11 @@ Phaser.Animation.prototype = { */ update: function () { + if (this.isPaused) + { + return false; + } + if (this.isPlaying == true && this.game.time.now >= this._timeNextFrame) { this._frameSkip = 1; @@ -21161,7 +21224,12 @@ Phaser.Animation.prototype = { { this._frameIndex = this._frameIndex - this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); - this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); + + if (this.currentFrame) + { + this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); + } + this._parent.events.onAnimationLoop.dispatch(this._parent, this); } else @@ -21217,6 +21285,38 @@ Phaser.Animation.prototype = { }; +/** + */ +Object.defineProperty(Phaser.Animation.prototype, "paused", { + + get: function () { + + return this.isPaused; + + }, + + set: function (value) { + + this.isPaused = value; + + if (value) + { + // Paused + this._pauseStartTime = this.game.time.now; + } + else + { + // Un-paused + if (this.isPlaying) + { + this._timeNextFrame = this.game.time.now + this.delay; + } + } + + } + +}); + Object.defineProperty(Phaser.Animation.prototype, "frameTotal", { /** @@ -21268,6 +21368,39 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { }); +/* + * Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. + * For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' + * You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); + * The zeroPad value dictates how many zeroes to add in front of the numbers (if any) + */ +Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { + + if (typeof suffix == 'undefined') { suffix = ''; } + + var output = []; + var frame = ''; + + for (var i = min; i <= max; i++) + { + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); + } + + return output; + +} /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. @@ -21875,9 +22008,11 @@ Phaser.Animation.Parser = { frames[i].spriteSourceSize.h ); - PIXI.TextureCache[uuid].realSize = frames[i].spriteSourceSize; - // PIXI.TextureCache[uuid].realSize = frames[i].sourceSize; - PIXI.TextureCache[uuid].trim.x = 0; + // We had to hack Pixi to get this to work :( + PIXI.TextureCache[uuid].trimmed = true; + PIXI.TextureCache[uuid].trim.x = frames[i].spriteSourceSize.x; + PIXI.TextureCache[uuid].trim.y = frames[i].spriteSourceSize.y; + } } @@ -21945,9 +22080,11 @@ Phaser.Animation.Parser = { frames[key].spriteSourceSize.h ); - PIXI.TextureCache[uuid].realSize = frames[key].spriteSourceSize; - // PIXI.TextureCache[uuid].realSize = frames[key].sourceSize; - PIXI.TextureCache[uuid].trim.x = 0; + // We had to hack Pixi to get this to work :( + PIXI.TextureCache[uuid].trimmed = true; + PIXI.TextureCache[uuid].trim.x = frames[key].spriteSourceSize.x; + PIXI.TextureCache[uuid].trim.y = frames[key].spriteSourceSize.y; + } i++; @@ -22004,7 +22141,8 @@ Phaser.Animation.Parser = { }); // Trimmed? - if (frame.frameX.nodeValue != '-0' || frame.frameY.nodeValue != '-0') { + if (frame.frameX.nodeValue != '-0' || frame.frameY.nodeValue != '-0') + { newFrame.setTrim( true, frame.width.nodeValue, @@ -22022,7 +22160,10 @@ Phaser.Animation.Parser = { h: frame.frameHeight.nodeValue }; - PIXI.TextureCache[uuid].trim.x = 0; + // We had to hack Pixi to get this to work :( + PIXI.TextureCache[uuid].trimmed = true; + PIXI.TextureCache[uuid].trim.x = Math.abs(frame.frameX.nodeValue); + PIXI.TextureCache[uuid].trim.y = Math.abs(frame.frameY.nodeValue); } } @@ -23831,6 +23972,7 @@ Phaser.Sound.prototype = { // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) // volume is between 0 and 1 + /* addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; @@ -23845,6 +23987,25 @@ Phaser.Sound.prototype = { loop: loop }; + }, + */ + + // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) + // volume is between 0 and 1 + addMarker: function (name, start, duration, volume, loop) { + + volume = volume || 1; + if (typeof loop == 'undefined') { loop = false; } + + this.markers[name] = { + name: name, + start: start, + stop: start + duration, + volume: volume, + duration: duration, + loop: loop + }; + }, removeMarker: function (name) { @@ -23925,9 +24086,9 @@ Phaser.Sound.prototype = { position = position || 0; volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - if (typeof forceRestart == 'undefined') { forceRestart = false; } + if (typeof forceRestart == 'undefined') { forceRestart = true; } - console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); + console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); if (this.isPlaying == true && forceRestart == false && this.override == false) { @@ -23966,7 +24127,7 @@ Phaser.Sound.prototype = { this.loop = this.markers[marker].loop; this.duration = this.markers[marker].duration * 1000; - // console.log('marker info loaded', this.loop, this.duration); + console.log('marker info loaded', this.loop, this.duration); this._tempMarker = marker; this._tempPosition = this.position; this._tempVolume = this.volume; @@ -23974,6 +24135,8 @@ Phaser.Sound.prototype = { } else { + console.log('no marker info loaded'); + this.position = position; this.volume = volume; this.loop = loop; @@ -24590,8 +24753,6 @@ Phaser.SoundManager.prototype = { volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - - var sound = new Phaser.Sound(this.game, key, volume, loop); this._sounds.push(sound); @@ -26256,8 +26417,8 @@ Phaser.Physics.Arcade.prototype = { */ separateTile: function (object, x, y, width, height, mass, collideLeft, collideRight, collideUp, collideDown, separateX, separateY) { - var separatedY = this.separateTileY(object.body, x, y, width, height, mass, collideUp, collideDown, separateY); var separatedX = this.separateTileX(object.body, x, y, width, height, mass, collideLeft, collideRight, separateX); + var separatedY = this.separateTileY(object.body, x, y, width, height, mass, collideUp, collideDown, separateY); if (separatedX || separatedY) { @@ -26274,7 +26435,7 @@ Phaser.Physics.Arcade.prototype = { * @param tile The Tile to separate * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. */ - separateTileX: function (object, x, y, width, height, mass, collideLeft, collideRight, separate) { + OLDseparateTileX: function (object, x, y, width, height, mass, collideLeft, collideRight, separate) { // Can't separate two immovable objects (tiles are always immovable) if (object.immovable) @@ -26361,7 +26522,7 @@ Phaser.Physics.Arcade.prototype = { * @param tile The Tile to separate * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. */ - separateTileY: function (object, x, y, width, height, mass, collideUp, collideDown, separate) { + OLDseparateTileY: function (object, x, y, width, height, mass, collideUp, collideDown, separate) { // Can't separate two immovable objects (tiles are always immovable) if (object.immovable) @@ -26449,7 +26610,7 @@ Phaser.Physics.Arcade.prototype = { * @param tile The Tile to separate * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. */ - NEWseparateTileX: function (object, x, y, width, height, mass, collideLeft, collideRight, separate) { + separateTileX: function (object, x, y, width, height, mass, collideLeft, collideRight, separate) { // Can't separate two immovable objects (tiles are always immovable) if (object.immovable) @@ -26459,17 +26620,21 @@ Phaser.Physics.Arcade.prototype = { this._overlap = 0; + // Do we have any overlap at all? if (Phaser.Rectangle.intersectsRaw(object, x, x + width, y, y + height)) { this._maxOverlap = object.deltaAbsX() + this.OVERLAP_BIAS; if (object.deltaX() == 0) { - // Object is stuck inside a tile and not moving + // Object is either stuck inside the tile or only overlapping on the Y axis } else if (object.deltaX() > 0) { // Going right ... + + + this._overlap = object.x + object.width - x; if ((this._overlap > this._maxOverlap) || !object.allowCollision.right || !collideLeft) @@ -26500,6 +26665,7 @@ Phaser.Physics.Arcade.prototype = { { if (separate) { + console.log('x over', this._overlap); object.x = object.x - this._overlap; if (object.bounce.x == 0) @@ -26526,7 +26692,7 @@ Phaser.Physics.Arcade.prototype = { * @param tile The Tile to separate * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. */ - NEWseparateTileY: function (object, x, y, width, height, mass, collideUp, collideDown, separate) { + separateTileY: function (object, x, y, width, height, mass, collideUp, collideDown, separate) { // Can't separate two immovable objects (tiles are always immovable) if (object.immovable) @@ -26576,6 +26742,8 @@ Phaser.Physics.Arcade.prototype = { if (this._overlap != 0) { + console.log('y over', this._overlap); + if (separate) { object.y = object.y - this._overlap; @@ -27195,6 +27363,7 @@ Phaser.Physics.Arcade.Body.prototype = { }, + // Basically Math.abs deltaAbsX: function () { return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); }, @@ -28034,6 +28203,8 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { continue; } + // layer.createQuadTree(json.tilewidth * json.layers[i].width, json.tileheight * json.layers[i].height); + layer.alpha = json.layers[i].opacity; layer.visible = json.layers[i].visible; layer.tileMargin = json.tilesets[0].margin; @@ -28079,8 +28250,6 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { */ Phaser.Tilemap.prototype.generateTiles = function (qty) { - console.log('generating', qty, 'tiles'); - for (var i = 0; i < qty; i++) { this.tiles.push(new Phaser.Tile(this.game, this, i, this.currentLayer.tileWidth, this.currentLayer.tileHeight)); @@ -28413,6 +28582,8 @@ Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, til this._alpha = 1; + this.quadTree = null; + this.canvas = null; this.context = null; this.baseTexture = null; @@ -28798,6 +28969,12 @@ Phaser.TilemapLayer.prototype = { this.parent.addChild(this.sprite); + }, + + createQuadTree: function (width, height) { + + this.quadTree = new Phaser.QuadTree(this, 0, 0, width, height, 20, 4); + }, /** @@ -29133,8 +29310,15 @@ Phaser.TilemapRenderer.prototype = { layer.tileWidth, layer.tileHeight ); + + if (tilemap.tiles[this._columnData[tile]].collideNone == false) + { + layer.context.fillStyle = 'rgba(255,255,0,0.5)'; + layer.context.fillRect(this._tx, this._ty, layer.tileWidth, layer.tileHeight); + } } + this._tx += layer.tileWidth; } @@ -29162,3 +29346,234 @@ Phaser.TilemapRenderer.prototype = { } }; +/** + * We're replacing a couple of Pixi's methods here to fix or add some vital functionality: + * + * 1) Added support for Trimmed sprite sheets + * 2) Skip display objects with an alpha of zero + * + * Hopefully we can remove this once Pixi has been updated to support these things. + */ + +PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject) +{ + // no loger recurrsive! + var transform; + var context = this.context; + + context.globalCompositeOperation = 'source-over'; + + // one the display object hits this. we can break the loop + var testObject = displayObject.last._iNext; + displayObject = displayObject.first; + + do + { + transform = displayObject.worldTransform; + + if(!displayObject.visible) + { + displayObject = displayObject.last._iNext; + continue; + } + + if(!displayObject.renderable || displayObject.alpha == 0) + { + displayObject = displayObject._iNext; + continue; + } + + if(displayObject instanceof PIXI.Sprite) + { + var frame = displayObject.texture.frame; + + if(frame) + { + context.globalAlpha = displayObject.worldAlpha; + + if (displayObject.texture.trimmed) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2] + displayObject.texture.trim.x, transform[5] + displayObject.texture.trim.y); + } + else + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]); + } + + context.drawImage(displayObject.texture.baseTexture.source, + frame.x, + frame.y, + frame.width, + frame.height, + (displayObject.anchor.x) * -frame.width, + (displayObject.anchor.y) * -frame.height, + frame.width, + frame.height); + } + } + else if(displayObject instanceof PIXI.Strip) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]) + this.renderStrip(displayObject); + } + else if(displayObject instanceof PIXI.TilingSprite) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]) + this.renderTilingSprite(displayObject); + } + else if(displayObject instanceof PIXI.CustomRenderable) + { + displayObject.renderCanvas(this); + } + else if(displayObject instanceof PIXI.Graphics) + { + context.setTransform(transform[0], transform[3], transform[1], transform[4], transform[2], transform[5]) + PIXI.CanvasGraphics.renderGraphics(displayObject, context); + } + else if(displayObject instanceof PIXI.FilterBlock) + { + if(displayObject.open) + { + context.save(); + + var cacheAlpha = displayObject.mask.alpha; + var maskTransform = displayObject.mask.worldTransform; + + context.setTransform(maskTransform[0], maskTransform[3], maskTransform[1], maskTransform[4], maskTransform[2], maskTransform[5]) + + displayObject.mask.worldAlpha = 0.5; + + context.worldAlpha = 0; + + PIXI.CanvasGraphics.renderGraphicsMask(displayObject.mask, context); + context.clip(); + + displayObject.mask.worldAlpha = cacheAlpha; + } + else + { + context.restore(); + } + } + // count++ + displayObject = displayObject._iNext; + + + } + while(displayObject != testObject) + +} + +PIXI.WebGLBatch.prototype.update = function() +{ + var gl = this.gl; + var worldTransform, width, height, aX, aY, w0, w1, h0, h1, index, index2, index3 + + var a, b, c, d, tx, ty; + + var indexRun = 0; + + var displayObject = this.head; + + while(displayObject) + { + if(displayObject.vcount === PIXI.visibleCount) + { + width = displayObject.texture.frame.width; + height = displayObject.texture.frame.height; + + // TODO trim?? + aX = displayObject.anchor.x;// - displayObject.texture.trim.x + aY = displayObject.anchor.y; //- displayObject.texture.trim.y + w0 = width * (1-aX); + w1 = width * -aX; + + h0 = height * (1-aY); + h1 = height * -aY; + + index = indexRun * 8; + + worldTransform = displayObject.worldTransform; + + a = worldTransform[0]; + b = worldTransform[3]; + c = worldTransform[1]; + d = worldTransform[4]; + tx = worldTransform[2]; + ty = worldTransform[5]; + + if (displayObject.texture.trimmed) + { + tx += displayObject.texture.trim.x; + ty += displayObject.texture.trim.y; + } + + this.verticies[index + 0 ] = a * w1 + c * h1 + tx; + this.verticies[index + 1 ] = d * h1 + b * w1 + ty; + + this.verticies[index + 2 ] = a * w0 + c * h1 + tx; + this.verticies[index + 3 ] = d * h1 + b * w0 + ty; + + this.verticies[index + 4 ] = a * w0 + c * h0 + tx; + this.verticies[index + 5 ] = d * h0 + b * w0 + ty; + + this.verticies[index + 6] = a * w1 + c * h0 + tx; + this.verticies[index + 7] = d * h0 + b * w1 + ty; + + if(displayObject.updateFrame || displayObject.texture.updateFrame) + { + this.dirtyUVS = true; + + var texture = displayObject.texture; + + var frame = texture.frame; + var tw = texture.baseTexture.width; + var th = texture.baseTexture.height; + + this.uvs[index + 0] = frame.x / tw; + this.uvs[index +1] = frame.y / th; + + this.uvs[index +2] = (frame.x + frame.width) / tw; + this.uvs[index +3] = frame.y / th; + + this.uvs[index +4] = (frame.x + frame.width) / tw; + this.uvs[index +5] = (frame.y + frame.height) / th; + + this.uvs[index +6] = frame.x / tw; + this.uvs[index +7] = (frame.y + frame.height) / th; + + displayObject.updateFrame = false; + } + + // TODO this probably could do with some optimisation.... + if(displayObject.cacheAlpha != displayObject.worldAlpha) + { + displayObject.cacheAlpha = displayObject.worldAlpha; + + var colorIndex = indexRun * 4; + this.colors[colorIndex] = this.colors[colorIndex + 1] = this.colors[colorIndex + 2] = this.colors[colorIndex + 3] = displayObject.worldAlpha; + this.dirtyColors = true; + } + } + else + { + index = indexRun * 8; + + this.verticies[index + 0 ] = 0; + this.verticies[index + 1 ] = 0; + + this.verticies[index + 2 ] = 0; + this.verticies[index + 3 ] = 0; + + this.verticies[index + 4 ] = 0; + this.verticies[index + 5 ] = 0; + + this.verticies[index + 6] = 0; + this.verticies[index + 7] = 0; + } + + indexRun++; + displayObject = displayObject.__next; + } +} + diff --git a/examples/js.php b/examples/js.php index 3c6650cf..bbf12080 100644 --- a/examples/js.php +++ b/examples/js.php @@ -118,3 +118,4 @@ + diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index f6e40ea3..9bee583a 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -305,6 +305,22 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); +Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { + + get: function () { + + return this.currentAnim.isPaused; + + }, + + set: function (value) { + + this.currentAnim.paused = value; + + } + +}); + Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { /** diff --git a/src/core/StateManager.js b/src/core/StateManager.js index 86a2b8c6..da190432 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -235,7 +235,9 @@ Phaser.StateManager.prototype = { this.onShutDownCallback.call(this.callbackContext); } - if (clearWorld) { + if (clearWorld) + { + this.game.tweens.removeAll(); this.game.world.destroy(); diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 171ed086..ddf0871f 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -151,6 +151,7 @@ Phaser.Button.prototype.onInputOutHandler = function (pointer) { { this.onInputOut.dispatch(this, pointer); } + }; Phaser.Button.prototype.onInputDownHandler = function (pointer) { diff --git a/src/sound/Sound.js b/src/sound/Sound.js index f466cbfb..98fcd8ae 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -172,6 +172,7 @@ Phaser.Sound.prototype = { // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) // volume is between 0 and 1 + /* addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; @@ -186,6 +187,25 @@ Phaser.Sound.prototype = { loop: loop }; + }, + */ + + // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) + // volume is between 0 and 1 + addMarker: function (name, start, duration, volume, loop) { + + volume = volume || 1; + if (typeof loop == 'undefined') { loop = false; } + + this.markers[name] = { + name: name, + start: start, + stop: start + duration, + volume: volume, + duration: duration, + loop: loop + }; + }, removeMarker: function (name) { @@ -266,9 +286,9 @@ Phaser.Sound.prototype = { position = position || 0; volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - if (typeof forceRestart == 'undefined') { forceRestart = false; } + if (typeof forceRestart == 'undefined') { forceRestart = true; } - // console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); + console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); if (this.isPlaying == true && forceRestart == false && this.override == false) { @@ -307,7 +327,7 @@ Phaser.Sound.prototype = { this.loop = this.markers[marker].loop; this.duration = this.markers[marker].duration * 1000; - // console.log('marker info loaded', this.loop, this.duration); + console.log('marker info loaded', this.loop, this.duration); this._tempMarker = marker; this._tempPosition = this.position; this._tempVolume = this.volume; @@ -315,6 +335,8 @@ Phaser.Sound.prototype = { } else { + console.log('no marker info loaded'); + this.position = position; this.volume = volume; this.loop = loop; diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index 5464b6f6..252b57d6 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -293,8 +293,6 @@ Phaser.SoundManager.prototype = { volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - - var sound = new Phaser.Sound(this.game, key, volume, loop); this._sounds.push(sound); diff --git a/src/tween/Tween.js b/src/tween/Tween.js index e1161377..07fe841d 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -246,11 +246,15 @@ Phaser.Tween.prototype = { pause: function () { this._paused = true; + this._pausedTime = this.game.time.now; }, resume: function () { + this._paused = false; - this._startTime += this.game.time.pauseDuration; + + this._startTime += (this.game.time.now - this._pausedTime); + }, update: function ( time ) { diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index c6ab3920..e4c0963f 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -39,7 +39,8 @@ Phaser.TweenManager.prototype = { */ removeAll: function () { - this._tweens = []; + this._add.length = 0; + this._tweens.length = 0; }, From e846f3cbac974636c0535cc2f25a13afa830a0cf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 30 Sep 2013 11:20:45 +0100 Subject: [PATCH 018/125] Fix for incorrect new particle positioning (issue #73) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 40e2b81f..400916e6 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,9 @@ Version 1.0.7 (in progress in the dev branch) * Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. * Change: When you swap State all active tweens are now purged. * BUG: Loader conflict if 2 keys are the same even if they are in different packages (i.e. "title" for picture and audio). +* Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath) +* Made animation looping more robust when skipping frames (thanks XekeDeath) +* Fix for incorrect new particle positioning (issue #73) (thanks cottonflop) * TODO: addMarker hh:mm:ss:ms From 8d17e1f963830a35b6140225ea322d2460254519 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 30 Sep 2013 12:17:07 +0100 Subject: [PATCH 019/125] Sound duration fixes. --- README.md | 2 +- src/physics/arcade/ArcadePhysics.js | 4 ++-- src/sound/Sound.js | 17 +++++++++++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 400916e6..39287eb0 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Version 1.0.7 (in progress in the dev branch) * Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath) * Made animation looping more robust when skipping frames (thanks XekeDeath) * Fix for incorrect new particle positioning (issue #73) (thanks cottonflop) - +* Added support for Body.maxVelocity (thanks cocoademon) * TODO: addMarker hh:mm:ss:ms * TODO: Direction constants diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 57eb4b63..1402007a 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -51,13 +51,13 @@ Phaser.Physics.Arcade.prototype = { body.rotation += body.angularVelocity * this.game.time.physicsElapsed; // Horizontal - this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x) - body.velocity.x) / 2; + this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) / 2; body.velocity.x += this._velocityDelta; this._delta = body.velocity.x * this.game.time.physicsElapsed; body.x += this._delta; // Vertical - this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y) - body.velocity.y) / 2; + this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) / 2; body.velocity.y += this._velocityDelta; this._delta = body.velocity.y * this.game.time.physicsElapsed; body.y += this._delta; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 98fcd8ae..6a45bc7b 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -203,6 +203,7 @@ Phaser.Sound.prototype = { stop: start + duration, volume: volume, duration: duration, + durationMS: duration * 1000, loop: loop }; @@ -293,12 +294,13 @@ Phaser.Sound.prototype = { if (this.isPlaying == true && forceRestart == false && this.override == false) { // Use Restart instead + console.log('Use Restart instead'); return; } if (this.isPlaying && this.override) { - // console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); + console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); if (this.usingWebAudio) { @@ -325,9 +327,10 @@ Phaser.Sound.prototype = { this.position = this.markers[marker].start; this.volume = this.markers[marker].volume; this.loop = this.markers[marker].loop; - this.duration = this.markers[marker].duration * 1000; + this.duration = this.markers[marker].duration; + + console.log('Marker Loaded: ', marker, 'start:', this.position, 'end: ', this.duration, 'loop', this.loop); - console.log('marker info loaded', this.loop, this.duration); this._tempMarker = marker; this._tempPosition = this.position; this._tempVolume = this.volume; @@ -335,7 +338,7 @@ Phaser.Sound.prototype = { } else { - console.log('no marker info loaded'); + console.log('no marker info loaded', marker); this.position = position; this.volume = volume; @@ -377,12 +380,14 @@ Phaser.Sound.prototype = { // Useful to cache this somewhere perhaps? if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration / 1000); + this._sound.noteGrainOn(0, this.position, this.duration); + // this._sound.noteGrainOn(0, this.position, this.duration / 1000); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - this._sound.start(0, this.position, this.duration / 1000); + // this._sound.start(0, this.position, this.duration / 1000); + this._sound.start(0, this.position, this.duration); } this.isPlaying = true; From 4b177e0a9bef1c68397288dd8326ec08bb4c87d2 Mon Sep 17 00:00:00 2001 From: Webeled Date: Mon, 30 Sep 2013 13:26:56 +0100 Subject: [PATCH 020/125] Manual update --- src/animation/Animation.js | 4 +-- src/animation/AnimationManager.js | 16 +++++++++++ src/core/StateManager.js | 4 ++- src/gameobjects/Button.js | 1 + src/gameobjects/Sprite.js | 23 ++++++++++++++-- src/particles/arcade/Emitter.js | 2 +- src/physics/arcade/ArcadePhysics.js | 4 +-- src/sound/Sound.js | 41 ++++++++++++++++++++++++----- src/sound/SoundManager.js | 2 -- src/tween/Tween.js | 6 ++++- src/tween/TweenManager.js | 3 ++- 11 files changed, 87 insertions(+), 19 deletions(-) diff --git a/src/animation/Animation.js b/src/animation/Animation.js index 4604a99a..90f456cf 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -223,7 +223,7 @@ Phaser.Animation.prototype = { { if (this.looped) { - this._frameIndex = this._frameIndex - this._frames.length; + this._frameIndex %= this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); if (this.currentFrame) @@ -401,4 +401,4 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa return output; -} \ No newline at end of file +} diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index f6e40ea3..9bee583a 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -305,6 +305,22 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); +Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { + + get: function () { + + return this.currentAnim.isPaused; + + }, + + set: function (value) { + + this.currentAnim.paused = value; + + } + +}); + Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { /** diff --git a/src/core/StateManager.js b/src/core/StateManager.js index 86a2b8c6..da190432 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -235,7 +235,9 @@ Phaser.StateManager.prototype = { this.onShutDownCallback.call(this.callbackContext); } - if (clearWorld) { + if (clearWorld) + { + this.game.tweens.removeAll(); this.game.world.destroy(); diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 171ed086..ddf0871f 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -151,6 +151,7 @@ Phaser.Button.prototype.onInputOutHandler = function (pointer) { { this.onInputOut.dispatch(this, pointer); } + }; Phaser.Button.prototype.onInputDownHandler = function (pointer) { diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index d10f366a..dbb2337a 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -363,8 +363,8 @@ Phaser.Sprite.prototype.reset = function(x, y) { this.x = x; this.y = y; - this.position.x = x; - this.position.y = y; + this.position.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + this.position.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); this.alive = true; this.exists = true; this.visible = true; @@ -470,6 +470,25 @@ Phaser.Sprite.prototype.getBounds = function(rect) { } +/** +* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() +* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. +* +* @method play +* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". +* @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. +* @return {Phaser.Animation} A reference to playing Animation instance. +*/ +Phaser.Sprite.prototype.play = function (name, frameRate, loop) { + + if (this.animations) + { + this.animations.play(name, frameRate, loop); + } + +} + Object.defineProperty(Phaser.Sprite.prototype, 'angle', { get: function() { diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index d8d886f3..c3fb007c 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -358,7 +358,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () { if (this.width > 1 || this.height > 1) { - particle.reset(this.emiteX - this.game.rnd.integerInRange(this.left, this.right), this.emiteY - this.game.rnd.integerInRange(this.top, this.bottom)); + particle.reset(this.game.rnd.integerInRange(this.left, this.right), this.game.rnd.integerInRange(this.top, this.bottom)); } else { diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 57eb4b63..1402007a 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -51,13 +51,13 @@ Phaser.Physics.Arcade.prototype = { body.rotation += body.angularVelocity * this.game.time.physicsElapsed; // Horizontal - this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x) - body.velocity.x) / 2; + this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) / 2; body.velocity.x += this._velocityDelta; this._delta = body.velocity.x * this.game.time.physicsElapsed; body.x += this._delta; // Vertical - this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y) - body.velocity.y) / 2; + this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) / 2; body.velocity.y += this._velocityDelta; this._delta = body.velocity.y * this.game.time.physicsElapsed; body.y += this._delta; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index f466cbfb..6a45bc7b 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -172,6 +172,7 @@ Phaser.Sound.prototype = { // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) // volume is between 0 and 1 + /* addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; @@ -186,6 +187,26 @@ Phaser.Sound.prototype = { loop: loop }; + }, + */ + + // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) + // volume is between 0 and 1 + addMarker: function (name, start, duration, volume, loop) { + + volume = volume || 1; + if (typeof loop == 'undefined') { loop = false; } + + this.markers[name] = { + name: name, + start: start, + stop: start + duration, + volume: volume, + duration: duration, + durationMS: duration * 1000, + loop: loop + }; + }, removeMarker: function (name) { @@ -266,19 +287,20 @@ Phaser.Sound.prototype = { position = position || 0; volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - if (typeof forceRestart == 'undefined') { forceRestart = false; } + if (typeof forceRestart == 'undefined') { forceRestart = true; } - // console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); + console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); if (this.isPlaying == true && forceRestart == false && this.override == false) { // Use Restart instead + console.log('Use Restart instead'); return; } if (this.isPlaying && this.override) { - // console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); + console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); if (this.usingWebAudio) { @@ -305,9 +327,10 @@ Phaser.Sound.prototype = { this.position = this.markers[marker].start; this.volume = this.markers[marker].volume; this.loop = this.markers[marker].loop; - this.duration = this.markers[marker].duration * 1000; + this.duration = this.markers[marker].duration; + + console.log('Marker Loaded: ', marker, 'start:', this.position, 'end: ', this.duration, 'loop', this.loop); - // console.log('marker info loaded', this.loop, this.duration); this._tempMarker = marker; this._tempPosition = this.position; this._tempVolume = this.volume; @@ -315,6 +338,8 @@ Phaser.Sound.prototype = { } else { + console.log('no marker info loaded', marker); + this.position = position; this.volume = volume; this.loop = loop; @@ -355,12 +380,14 @@ Phaser.Sound.prototype = { // Useful to cache this somewhere perhaps? if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration / 1000); + this._sound.noteGrainOn(0, this.position, this.duration); + // this._sound.noteGrainOn(0, this.position, this.duration / 1000); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - this._sound.start(0, this.position, this.duration / 1000); + // this._sound.start(0, this.position, this.duration / 1000); + this._sound.start(0, this.position, this.duration); } this.isPlaying = true; diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index 5464b6f6..252b57d6 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -293,8 +293,6 @@ Phaser.SoundManager.prototype = { volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - - var sound = new Phaser.Sound(this.game, key, volume, loop); this._sounds.push(sound); diff --git a/src/tween/Tween.js b/src/tween/Tween.js index e1161377..07fe841d 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -246,11 +246,15 @@ Phaser.Tween.prototype = { pause: function () { this._paused = true; + this._pausedTime = this.game.time.now; }, resume: function () { + this._paused = false; - this._startTime += this.game.time.pauseDuration; + + this._startTime += (this.game.time.now - this._pausedTime); + }, update: function ( time ) { diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index c6ab3920..e4c0963f 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -39,7 +39,8 @@ Phaser.TweenManager.prototype = { */ removeAll: function () { - this._tweens = []; + this._add.length = 0; + this._tweens.length = 0; }, From 16b1913de1d366fb64997414ae54e979681ada60 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 30 Sep 2013 17:12:22 +0100 Subject: [PATCH 021/125] * Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead. * Button.setFrames will set the current frame based on the button state immediately. * InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call. * Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas. * When the game boots it will now by default disable user-select and touch action events on the game canvas. * Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox. --- README.md | 8 ++++++ src/core/Stage.js | 3 +++ src/gameobjects/Button.js | 30 +++++++++++++++++++++++ src/input/InputHandler.js | 31 ++++++++++++++++++------ src/loader/Loader.js | 8 +++--- src/sound/Sound.js | 51 ++++++++++++++++++++++++--------------- src/system/Canvas.js | 14 +++++++++++ 7 files changed, 114 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 39287eb0..c414119e 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,14 @@ Version 1.0.7 (in progress in the dev branch) * Made animation looping more robust when skipping frames (thanks XekeDeath) * Fix for incorrect new particle positioning (issue #73) (thanks cottonflop) * Added support for Body.maxVelocity (thanks cocoademon) +* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead. +* Button.setFrames will set the current frame based on the button state immediately. +* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call. +* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas. +* When the game boots it will now by default disable user-select and touch action events on the game canvas. +* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox. + + * TODO: addMarker hh:mm:ss:ms * TODO: Direction constants diff --git a/src/core/Stage.js b/src/core/Stage.js index 73ea9392..c4deb68c 100644 --- a/src/core/Stage.js +++ b/src/core/Stage.js @@ -104,6 +104,9 @@ Phaser.Stage.prototype = { return _this.visibilityChange(event); } + Phaser.Canvas.setUserSelect(this.canvas, 'none'); + Phaser.Canvas.setTouchAction(this.canvas, 'none'); + document.addEventListener('visibilitychange', this._onChange, false); document.addEventListener('webkitvisibilitychange', this._onChange, false); document.addEventListener('pagehide', this._onChange, false); diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index ddf0871f..0ed5c731 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -84,10 +84,20 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { if (typeof overFrame === 'string') { this._onOverFrameName = overFrame; + + if (this.input.pointerOver()) + { + this.frameName = overFrame; + } } else { this._onOverFrameID = overFrame; + + if (this.input.pointerOver()) + { + this.frame = overFrame; + } } } @@ -97,11 +107,21 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { { this._onOutFrameName = outFrame; this._onUpFrameName = outFrame; + + if (this.input.pointerOver() == false) + { + this.frameName = outFrame; + } } else { this._onOutFrameID = outFrame; this._onUpFrameID = outFrame; + + if (this.input.pointerOver() == false) + { + this.frame = outFrame; + } } } @@ -110,10 +130,20 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { if (typeof downFrame === 'string') { this._onDownFrameName = downFrame; + + if (this.input.pointerOver()) + { + this.frameName = downFrame; + } } else { this._onDownFrameID = downFrame; + + if (this.input.pointerOver()) + { + this.frame = downFrame; + } } } diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 6f14400a..2430d12a 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -68,6 +68,24 @@ Phaser.InputHandler = function (sprite) { this._tempPoint = new Phaser.Point; + this._pointerData = []; + + this._pointerData.push({ + id: 0, + x: 0, + y: 0, + isDown: false, + isUp: false, + isOver: false, + isOut: false, + timeOver: 0, + timeOut: 0, + timeDown: 0, + timeUp: 0, + downDuration: 0, + isDragged: false + }); + }; Phaser.InputHandler.prototype = { @@ -84,11 +102,10 @@ Phaser.InputHandler.prototype = { this.game.input.interactiveItems.add(this); this.useHandCursor = useHandCursor; this.priorityID = priority; - this._pointerData = []; for (var i = 0; i < 10; i++) { - this._pointerData.push({ + this._pointerData[i] = { id: i, x: 0, y: 0, @@ -102,7 +119,7 @@ Phaser.InputHandler.prototype = { timeUp: 0, downDuration: 0, isDragged: false - }); + }; } this.snapOffset = new Phaser.Point; @@ -350,10 +367,8 @@ Phaser.InputHandler.prototype = { } } } - else - { - return false; - } + + return false; }, @@ -388,7 +403,7 @@ Phaser.InputHandler.prototype = { */ update: function (pointer) { - if (this.enabled == false || this.sprite.visible == false) + if (this.enabled == false || this.sprite.visible == false || (this.sprite.group && this.sprite.group.visible == false)) { this._pointerOutHandler(pointer); return false; diff --git a/src/loader/Loader.js b/src/loader/Loader.js index da68a3bd..25777679 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -105,12 +105,12 @@ Phaser.Loader.prototype = { if (direction == 0) { // Horizontal crop - this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 0, sprite.height); + this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 1, sprite.height); } else { // Vertical crop - this.preloadSprite.crop = new Phaser.Rectangle(0, 0, sprite.width, 0); + this.preloadSprite.crop = new Phaser.Rectangle(0, 0, sprite.width, 1); } sprite.crop = this.preloadSprite.crop; @@ -904,11 +904,11 @@ Phaser.Loader.prototype = { { if (this.preloadSprite.direction == 0) { - this.preloadSprite.crop.width = (this.preloadSprite.width / 100) * this.progress; + this.preloadSprite.crop.width = Math.floor((this.preloadSprite.width / 100) * this.progress); } else { - this.preloadSprite.crop.height = (this.preloadSprite.height / 100) * this.progress; + this.preloadSprite.crop.height = Math.floor((this.preloadSprite.height / 100) * this.progress); } this.preloadSprite.sprite.crop = this.preloadSprite.crop; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 6a45bc7b..0445b7f6 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -101,6 +101,7 @@ Phaser.Sound = function (game, key, volume, loop) { this.startTime = 0; this.currentTime = 0; this.duration = 0; + this.durationMS = 0; this.stopTime = 0; this.paused = false; this.isPlaying = false; @@ -227,7 +228,7 @@ Phaser.Sound.prototype = { { this.currentTime = this.game.time.now - this.startTime; - if (this.currentTime >= this.duration) + if (this.currentTime >= this.durationMS) { //console.log(this.currentMarker, 'has hit duration'); if (this.usingWebAudio) @@ -289,18 +290,17 @@ Phaser.Sound.prototype = { if (typeof loop == 'undefined') { loop = false; } if (typeof forceRestart == 'undefined') { forceRestart = true; } - console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); + // console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); if (this.isPlaying == true && forceRestart == false && this.override == false) { // Use Restart instead - console.log('Use Restart instead'); return; } if (this.isPlaying && this.override) { - console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); + // console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); if (this.usingWebAudio) { @@ -322,28 +322,38 @@ Phaser.Sound.prototype = { this.currentMarker = marker; - if (marker !== '' && this.markers[marker]) + if (marker !== '') { - this.position = this.markers[marker].start; - this.volume = this.markers[marker].volume; - this.loop = this.markers[marker].loop; - this.duration = this.markers[marker].duration; + if (this.markers[marker]) + { + this.position = this.markers[marker].start; + this.volume = this.markers[marker].volume; + this.loop = this.markers[marker].loop; + this.duration = this.markers[marker].duration; + this.durationMS = this.markers[marker].durationMS; - console.log('Marker Loaded: ', marker, 'start:', this.position, 'end: ', this.duration, 'loop', this.loop); + // console.log('Marker Loaded: ', marker, 'start:', this.position, 'end: ', this.duration, 'loop', this.loop); - this._tempMarker = marker; - this._tempPosition = this.position; - this._tempVolume = this.volume; - this._tempLoop = this.loop; + this._tempMarker = marker; + this._tempPosition = this.position; + this._tempVolume = this.volume; + this._tempLoop = this.loop; + } + else + { + console.warn("Phaser.Sound.play: audio marker " + marker + " doesn't exist"); + return; + } } else { - console.log('no marker info loaded', marker); + // console.log('no marker info loaded', marker); this.position = position; this.volume = volume; this.loop = loop; this.duration = 0; + this.durationMS = 0; this._tempMarker = marker; this._tempPosition = position; @@ -369,7 +379,9 @@ Phaser.Sound.prototype = { if (this.duration == 0) { - this.duration = this.totalDuration * 1000; + // console.log('duration reset'); + this.duration = this.totalDuration; + this.durationMS = this.totalDuration * 1000; } if (this.loop && marker == '') @@ -393,7 +405,7 @@ Phaser.Sound.prototype = { this.isPlaying = true; this.startTime = this.game.time.now; this.currentTime = 0; - this.stopTime = this.startTime + this.duration; + this.stopTime = this.startTime + this.durationMS; this.onPlay.dispatch(this); } else @@ -426,7 +438,8 @@ Phaser.Sound.prototype = { if (this.duration == 0) { - this.duration = this.totalDuration * 1000; + this.duration = this.totalDuration; + this.durationMS = this.totalDuration * 1000; } // console.log('playing', this._sound); @@ -445,7 +458,7 @@ Phaser.Sound.prototype = { this.isPlaying = true; this.startTime = this.game.time.now; this.currentTime = 0; - this.stopTime = this.startTime + this.duration; + this.stopTime = this.startTime + this.durationMS; this.onPlay.dispatch(this); } else diff --git a/src/system/Canvas.js b/src/system/Canvas.js index 51c44c6b..49eb4b64 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -108,6 +108,20 @@ Phaser.Canvas = { }, + setUserSelect: function (canvas, value) { + + canvas.style['-webkit-touch-callout'] = value; + canvas.style['-webkit-user-select'] = value; + canvas.style['-khtml-user-select'] = value; + canvas.style['-moz-user-select'] = value; + canvas.style['-ms-user-select'] = value; + canvas.style['user-select'] = value; + canvas.style['-webkit-tap-highlight-color'] = 'rgba(0, 0, 0, 0)'; + + return canvas; + + }, + /** * Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent. * If no parent is given it will be added as a child of the document.body. From bdc8edea9dc1e0302acd6b457df883940d887bfa Mon Sep 17 00:00:00 2001 From: Webeled Date: Mon, 30 Sep 2013 17:30:45 +0100 Subject: [PATCH 022/125] Lots of new examples :) Lots of new examples, the wip/examples folder can be destoryed I think --- examples/display/fullscreen.php | 55 ++++++++ examples/display/linkedList.php | 65 +++++++++ .../groups/sub groups and group length.php | 77 +++++++++++ .../groups/swap children inside a group.php | 52 +++++++ examples/input/drag.php | 2 +- examples/input/drop limitation.php | 63 +++++++++ examples/input/game scale.php | 76 +++++++++++ examples/input/keyboard.php | 2 +- examples/input/motion lock - horizontal.php | 54 ++++++++ examples/input/motion lock - vertical.php | 54 ++++++++ examples/input/multi touch.php | 10 +- .../override browser keyboard controls.php | 127 ++++++++++++++++++ examples/misc/net.php | 39 ++++++ examples/physics/Motion.php | 80 +++++++++++ examples/physics/sprite bounds.php | 62 +++++++++ 15 files changed, 807 insertions(+), 11 deletions(-) create mode 100644 examples/display/fullscreen.php create mode 100644 examples/display/linkedList.php create mode 100644 examples/groups/sub groups and group length.php create mode 100644 examples/groups/swap children inside a group.php create mode 100644 examples/input/drop limitation.php create mode 100644 examples/input/game scale.php create mode 100644 examples/input/motion lock - horizontal.php create mode 100644 examples/input/motion lock - vertical.php create mode 100644 examples/input/override browser keyboard controls.php create mode 100644 examples/misc/net.php create mode 100644 examples/physics/Motion.php create mode 100644 examples/physics/sprite bounds.php diff --git a/examples/display/fullscreen.php b/examples/display/fullscreen.php new file mode 100644 index 00000000..966974c8 --- /dev/null +++ b/examples/display/fullscreen.php @@ -0,0 +1,55 @@ + + + + + \ No newline at end of file diff --git a/examples/display/linkedList.php b/examples/display/linkedList.php new file mode 100644 index 00000000..44e0a1f2 --- /dev/null +++ b/examples/display/linkedList.php @@ -0,0 +1,65 @@ + + + + + + diff --git a/examples/groups/sub groups and group length.php b/examples/groups/sub groups and group length.php new file mode 100644 index 00000000..d423dce8 --- /dev/null +++ b/examples/groups/sub groups and group length.php @@ -0,0 +1,77 @@ + + + + + + diff --git a/examples/groups/swap children inside a group.php b/examples/groups/swap children inside a group.php new file mode 100644 index 00000000..d4e9138d --- /dev/null +++ b/examples/groups/swap children inside a group.php @@ -0,0 +1,52 @@ + + + + + + diff --git a/examples/input/drag.php b/examples/input/drag.php index 5b22b440..8e0b42f7 100644 --- a/examples/input/drag.php +++ b/examples/input/drag.php @@ -1,5 +1,5 @@ diff --git a/examples/input/drop limitation.php b/examples/input/drop limitation.php new file mode 100644 index 00000000..a7326688 --- /dev/null +++ b/examples/input/drop limitation.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/input/game scale.php b/examples/input/game scale.php new file mode 100644 index 00000000..2a6c7d32 --- /dev/null +++ b/examples/input/game scale.php @@ -0,0 +1,76 @@ + + + + + diff --git a/examples/input/keyboard.php b/examples/input/keyboard.php index c5a432da..7b9a5def 100644 --- a/examples/input/keyboard.php +++ b/examples/input/keyboard.php @@ -44,7 +44,7 @@ game.add.sprite(900, 170, 'cloud2') .scrollFactor.setTo(0.7, 0.3); - // Create a ufo spirte as player. + // Create a ufo sprite as player. ufo = game.add.sprite(320, 240, 'ufo'); ufo.anchor.setTo(0.5, 0.5); diff --git a/examples/input/motion lock - horizontal.php b/examples/input/motion lock - horizontal.php new file mode 100644 index 00000000..39d4957b --- /dev/null +++ b/examples/input/motion lock - horizontal.php @@ -0,0 +1,54 @@ + + + + + diff --git a/examples/input/motion lock - vertical.php b/examples/input/motion lock - vertical.php new file mode 100644 index 00000000..a67e3a1f --- /dev/null +++ b/examples/input/motion lock - vertical.php @@ -0,0 +1,54 @@ + + + + + diff --git a/examples/input/multi touch.php b/examples/input/multi touch.php index a34ebe10..1ab9ccf3 100644 --- a/examples/input/multi touch.php +++ b/examples/input/multi touch.php @@ -7,13 +7,8 @@ (function () { - var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render }); + var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', {create: create, render: render }); - function preload() { - - // game.load.image('disk', 'assets/sprites/ra_dont_crack_under_pressure.png'); - - } function create() { @@ -21,9 +16,6 @@ } - function update() { - } - function render() { game.debug.renderPointer(game.input.mousePointer); diff --git a/examples/input/override browser keyboard controls.php b/examples/input/override browser keyboard controls.php new file mode 100644 index 00000000..8d2cdb78 --- /dev/null +++ b/examples/input/override browser keyboard controls.php @@ -0,0 +1,127 @@ + + + + + + diff --git a/examples/misc/net.php b/examples/misc/net.php new file mode 100644 index 00000000..35032df4 --- /dev/null +++ b/examples/misc/net.php @@ -0,0 +1,39 @@ + + + + +Reload with query string + + + diff --git a/examples/physics/Motion.php b/examples/physics/Motion.php new file mode 100644 index 00000000..bb9dd509 --- /dev/null +++ b/examples/physics/Motion.php @@ -0,0 +1,80 @@ + + + + + + diff --git a/examples/physics/sprite bounds.php b/examples/physics/sprite bounds.php new file mode 100644 index 00000000..f299b2fb --- /dev/null +++ b/examples/physics/sprite bounds.php @@ -0,0 +1,62 @@ + + + + + + From 933edb203fe540c32c9dee7abaf9fc739d316192 Mon Sep 17 00:00:00 2001 From: Webeled Date: Mon, 30 Sep 2013 19:13:01 +0100 Subject: [PATCH 023/125] Final Commit of the day, Final commit, the wip/examples folder can be removed, --- examples/input/game scale.php | 2 +- examples/loader/loading multiple files.php | 60 ++++++++++++++++++++++ examples/loader/spritesheet loading.php | 54 +++++++++++++++++++ examples/misc/net.php | 1 - examples/misc/random generators.php | 32 ++++++++++++ examples/sprites/outOfBounds.php | 54 +++++++++++++++++++ 6 files changed, 201 insertions(+), 2 deletions(-) create mode 100644 examples/loader/loading multiple files.php create mode 100644 examples/loader/spritesheet loading.php create mode 100644 examples/misc/random generators.php create mode 100644 examples/sprites/outOfBounds.php diff --git a/examples/input/game scale.php b/examples/input/game scale.php index 2a6c7d32..3eea2c62 100644 --- a/examples/input/game scale.php +++ b/examples/input/game scale.php @@ -7,7 +7,7 @@ (function () { - var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create,update:update,render:render}); + var game = new Phaser.Game(320, 240, Phaser.CANVAS, '', { preload: preload, create: create,update:update,render:render}); function preload() { diff --git a/examples/loader/loading multiple files.php b/examples/loader/loading multiple files.php new file mode 100644 index 00000000..82d2f139 --- /dev/null +++ b/examples/loader/loading multiple files.php @@ -0,0 +1,60 @@ + + + + + + + \ No newline at end of file diff --git a/examples/loader/spritesheet loading.php b/examples/loader/spritesheet loading.php new file mode 100644 index 00000000..f7e751b9 --- /dev/null +++ b/examples/loader/spritesheet loading.php @@ -0,0 +1,54 @@ + + + + + + + \ No newline at end of file diff --git a/examples/misc/net.php b/examples/misc/net.php index 35032df4..2425d376 100644 --- a/examples/misc/net.php +++ b/examples/misc/net.php @@ -18,7 +18,6 @@ // Add some values to the query string game.debug.renderText('Query string with new values : '+game.net.updateQueryString('atari', '520'),game.world.centerX-400,80); game.debug.renderText('Query string with new values : '+game.net.updateQueryString('amiga', '1200'),game.world.centerX-400,100); - game.debug.renderText('Query string with new values : '+game.net.updateQueryString('commodore', '64'),game.world.centerX-400,120); console.log('Query String: '+game.net.getQueryString(),game.world.centerX-300,140); console.log('Query String Param: '+game.net.getQueryString('atari'),game.world.centerX-300,160); diff --git a/examples/misc/random generators.php b/examples/misc/random generators.php new file mode 100644 index 00000000..2203d9c3 --- /dev/null +++ b/examples/misc/random generators.php @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/examples/sprites/outOfBounds.php b/examples/sprites/outOfBounds.php new file mode 100644 index 00000000..f07d81d3 --- /dev/null +++ b/examples/sprites/outOfBounds.php @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file From 5afce4bf8ed6d116eda29a44a2b894793164885a Mon Sep 17 00:00:00 2001 From: Webeled Date: Mon, 30 Sep 2013 19:18:33 +0100 Subject: [PATCH 024/125] Revert "Manual update" This reverts commit 4b177e0a9bef1c68397288dd8326ec08bb4c87d2. --- src/animation/Animation.js | 4 +-- src/animation/AnimationManager.js | 16 ----------- src/core/StateManager.js | 4 +-- src/gameobjects/Button.js | 1 - src/gameobjects/Sprite.js | 23 ++-------------- src/particles/arcade/Emitter.js | 2 +- src/physics/arcade/ArcadePhysics.js | 4 +-- src/sound/Sound.js | 41 +++++------------------------ src/sound/SoundManager.js | 2 ++ src/tween/Tween.js | 6 +---- src/tween/TweenManager.js | 3 +-- 11 files changed, 19 insertions(+), 87 deletions(-) diff --git a/src/animation/Animation.js b/src/animation/Animation.js index 90f456cf..4604a99a 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -223,7 +223,7 @@ Phaser.Animation.prototype = { { if (this.looped) { - this._frameIndex %= this._frames.length; + this._frameIndex = this._frameIndex - this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); if (this.currentFrame) @@ -401,4 +401,4 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa return output; -} +} \ No newline at end of file diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 9bee583a..f6e40ea3 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -305,22 +305,6 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); -Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { - - get: function () { - - return this.currentAnim.isPaused; - - }, - - set: function (value) { - - this.currentAnim.paused = value; - - } - -}); - Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { /** diff --git a/src/core/StateManager.js b/src/core/StateManager.js index da190432..86a2b8c6 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -235,9 +235,7 @@ Phaser.StateManager.prototype = { this.onShutDownCallback.call(this.callbackContext); } - if (clearWorld) - { - this.game.tweens.removeAll(); + if (clearWorld) { this.game.world.destroy(); diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index ddf0871f..171ed086 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -151,7 +151,6 @@ Phaser.Button.prototype.onInputOutHandler = function (pointer) { { this.onInputOut.dispatch(this, pointer); } - }; Phaser.Button.prototype.onInputDownHandler = function (pointer) { diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index dbb2337a..d10f366a 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -363,8 +363,8 @@ Phaser.Sprite.prototype.reset = function(x, y) { this.x = x; this.y = y; - this.position.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); - this.position.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); + this.position.x = x; + this.position.y = y; this.alive = true; this.exists = true; this.visible = true; @@ -470,25 +470,6 @@ Phaser.Sprite.prototype.getBounds = function(rect) { } -/** -* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() -* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. -* -* @method play -* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". -* @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. -* @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. -* @return {Phaser.Animation} A reference to playing Animation instance. -*/ -Phaser.Sprite.prototype.play = function (name, frameRate, loop) { - - if (this.animations) - { - this.animations.play(name, frameRate, loop); - } - -} - Object.defineProperty(Phaser.Sprite.prototype, 'angle', { get: function() { diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index c3fb007c..d8d886f3 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -358,7 +358,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () { if (this.width > 1 || this.height > 1) { - particle.reset(this.game.rnd.integerInRange(this.left, this.right), this.game.rnd.integerInRange(this.top, this.bottom)); + particle.reset(this.emiteX - this.game.rnd.integerInRange(this.left, this.right), this.emiteY - this.game.rnd.integerInRange(this.top, this.bottom)); } else { diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 1402007a..57eb4b63 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -51,13 +51,13 @@ Phaser.Physics.Arcade.prototype = { body.rotation += body.angularVelocity * this.game.time.physicsElapsed; // Horizontal - this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) / 2; + this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x) - body.velocity.x) / 2; body.velocity.x += this._velocityDelta; this._delta = body.velocity.x * this.game.time.physicsElapsed; body.x += this._delta; // Vertical - this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) / 2; + this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y) - body.velocity.y) / 2; body.velocity.y += this._velocityDelta; this._delta = body.velocity.y * this.game.time.physicsElapsed; body.y += this._delta; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 6a45bc7b..f466cbfb 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -172,7 +172,6 @@ Phaser.Sound.prototype = { // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) // volume is between 0 and 1 - /* addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; @@ -187,26 +186,6 @@ Phaser.Sound.prototype = { loop: loop }; - }, - */ - - // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) - // volume is between 0 and 1 - addMarker: function (name, start, duration, volume, loop) { - - volume = volume || 1; - if (typeof loop == 'undefined') { loop = false; } - - this.markers[name] = { - name: name, - start: start, - stop: start + duration, - volume: volume, - duration: duration, - durationMS: duration * 1000, - loop: loop - }; - }, removeMarker: function (name) { @@ -287,20 +266,19 @@ Phaser.Sound.prototype = { position = position || 0; volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } - if (typeof forceRestart == 'undefined') { forceRestart = true; } + if (typeof forceRestart == 'undefined') { forceRestart = false; } - console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); + // console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop); if (this.isPlaying == true && forceRestart == false && this.override == false) { // Use Restart instead - console.log('Use Restart instead'); return; } if (this.isPlaying && this.override) { - console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); + // console.log('asked to play ' + marker + ' but already playing ' + this.currentMarker); if (this.usingWebAudio) { @@ -327,10 +305,9 @@ Phaser.Sound.prototype = { this.position = this.markers[marker].start; this.volume = this.markers[marker].volume; this.loop = this.markers[marker].loop; - this.duration = this.markers[marker].duration; - - console.log('Marker Loaded: ', marker, 'start:', this.position, 'end: ', this.duration, 'loop', this.loop); + this.duration = this.markers[marker].duration * 1000; + // console.log('marker info loaded', this.loop, this.duration); this._tempMarker = marker; this._tempPosition = this.position; this._tempVolume = this.volume; @@ -338,8 +315,6 @@ Phaser.Sound.prototype = { } else { - console.log('no marker info loaded', marker); - this.position = position; this.volume = volume; this.loop = loop; @@ -380,14 +355,12 @@ Phaser.Sound.prototype = { // Useful to cache this somewhere perhaps? if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration); - // this._sound.noteGrainOn(0, this.position, this.duration / 1000); + this._sound.noteGrainOn(0, this.position, this.duration / 1000); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - // this._sound.start(0, this.position, this.duration / 1000); - this._sound.start(0, this.position, this.duration); + this._sound.start(0, this.position, this.duration / 1000); } this.isPlaying = true; diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index 252b57d6..5464b6f6 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -293,6 +293,8 @@ Phaser.SoundManager.prototype = { volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } + + var sound = new Phaser.Sound(this.game, key, volume, loop); this._sounds.push(sound); diff --git a/src/tween/Tween.js b/src/tween/Tween.js index 07fe841d..e1161377 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -246,15 +246,11 @@ Phaser.Tween.prototype = { pause: function () { this._paused = true; - this._pausedTime = this.game.time.now; }, resume: function () { - this._paused = false; - - this._startTime += (this.game.time.now - this._pausedTime); - + this._startTime += this.game.time.pauseDuration; }, update: function ( time ) { diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index e4c0963f..c6ab3920 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -39,8 +39,7 @@ Phaser.TweenManager.prototype = { */ removeAll: function () { - this._add.length = 0; - this._tweens.length = 0; + this._tweens = []; }, From fa1ed04aa8abfb9860f3fec31da904b3373daab5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 30 Sep 2013 19:54:35 +0100 Subject: [PATCH 025/125] Build --- build/phaser.js | 161 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 121 insertions(+), 40 deletions(-) diff --git a/build/phaser.js b/build/phaser.js index 5bf30232..2c1f1254 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -1,7 +1,7 @@ /** * Phaser - http://www.phaser.io * -* v1.0.7 - Built at: Fri, 27 Sep 2013 23:12:25 +0000 +* v1.0.7 - Built at: Mon, 30 Sep 2013 18:13:41 +0000 * * @author Richard Davey http://www.photonstorm.com @photonstorm * @@ -8962,6 +8962,9 @@ Phaser.Stage.prototype = { return _this.visibilityChange(event); } + Phaser.Canvas.setUserSelect(this.canvas, 'none'); + Phaser.Canvas.setTouchAction(this.canvas, 'none'); + document.addEventListener('visibilitychange', this._onChange, false); document.addEventListener('webkitvisibilitychange', this._onChange, false); document.addEventListener('pagehide', this._onChange, false); @@ -10204,7 +10207,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant renderer = renderer || Phaser.AUTO; parent = parent || ''; state = state || null; - transparent = transparent || false; + if (typeof transparent == 'undefined') { transparent = false; } antialias = typeof antialias === 'undefined' ? true : antialias; /** @@ -12969,6 +12972,24 @@ Phaser.InputHandler = function (sprite) { this._tempPoint = new Phaser.Point; + this._pointerData = []; + + this._pointerData.push({ + id: 0, + x: 0, + y: 0, + isDown: false, + isUp: false, + isOver: false, + isOut: false, + timeOver: 0, + timeOut: 0, + timeDown: 0, + timeUp: 0, + downDuration: 0, + isDragged: false + }); + }; Phaser.InputHandler.prototype = { @@ -12976,7 +12997,7 @@ Phaser.InputHandler.prototype = { start: function (priority, useHandCursor) { priority = priority || 0; - useHandCursor = useHandCursor || false; + if (typeof useHandCursor == 'undefined') { useHandCursor = false; } // Turning on if (this.enabled == false) @@ -12985,11 +13006,10 @@ Phaser.InputHandler.prototype = { this.game.input.interactiveItems.add(this); this.useHandCursor = useHandCursor; this.priorityID = priority; - this._pointerData = []; for (var i = 0; i < 10; i++) { - this._pointerData.push({ + this._pointerData[i] = { id: i, x: 0, y: 0, @@ -13003,7 +13023,7 @@ Phaser.InputHandler.prototype = { timeUp: 0, downDuration: 0, isDragged: false - }); + }; } this.snapOffset = new Phaser.Point; @@ -13251,10 +13271,8 @@ Phaser.InputHandler.prototype = { } } } - else - { - return false; - } + + return false; }, @@ -13289,7 +13307,7 @@ Phaser.InputHandler.prototype = { */ update: function (pointer) { - if (this.enabled == false || this.sprite.visible == false) + if (this.enabled == false || this.sprite.visible == false || (this.sprite.group && this.sprite.group.visible == false)) { this._pointerOutHandler(pointer); return false; @@ -14265,8 +14283,8 @@ Phaser.Sprite.prototype.reset = function(x, y) { this.x = x; this.y = y; - this.position.x = x; - this.position.y = y; + this.position.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + this.position.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); this.alive = true; this.exists = true; this.visible = true; @@ -14910,10 +14928,20 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { if (typeof overFrame === 'string') { this._onOverFrameName = overFrame; + + if (this.input.pointerOver()) + { + this.frameName = overFrame; + } } else { this._onOverFrameID = overFrame; + + if (this.input.pointerOver()) + { + this.frame = overFrame; + } } } @@ -14923,11 +14951,21 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { { this._onOutFrameName = outFrame; this._onUpFrameName = outFrame; + + if (this.input.pointerOver() == false) + { + this.frameName = outFrame; + } } else { this._onOutFrameID = outFrame; this._onUpFrameID = outFrame; + + if (this.input.pointerOver() == false) + { + this.frame = outFrame; + } } } @@ -14936,10 +14974,20 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { if (typeof downFrame === 'string') { this._onDownFrameName = downFrame; + + if (this.input.pointerOver()) + { + this.frameName = downFrame; + } } else { this._onDownFrameID = downFrame; + + if (this.input.pointerOver()) + { + this.frame = downFrame; + } } } @@ -15185,6 +15233,20 @@ Phaser.Canvas = { }, + setUserSelect: function (canvas, value) { + + canvas.style['-webkit-touch-callout'] = value; + canvas.style['-webkit-user-select'] = value; + canvas.style['-khtml-user-select'] = value; + canvas.style['-moz-user-select'] = value; + canvas.style['-ms-user-select'] = value; + canvas.style['user-select'] = value; + canvas.style['-webkit-tap-highlight-color'] = 'rgba(0, 0, 0, 0)'; + + return canvas; + + }, + /** * Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent. * If no parent is given it will be added as a child of the document.body. @@ -21222,7 +21284,7 @@ Phaser.Animation.prototype = { { if (this.looped) { - this._frameIndex = this._frameIndex - this._frames.length; + this._frameIndex %= this._frames.length; this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]); if (this.currentFrame) @@ -21401,6 +21463,7 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa return output; } + /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. @@ -22899,12 +22962,12 @@ Phaser.Loader.prototype = { if (direction == 0) { // Horizontal crop - this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 0, sprite.height); + this.preloadSprite.crop = new Phaser.Rectangle(0, 0, 1, sprite.height); } else { // Vertical crop - this.preloadSprite.crop = new Phaser.Rectangle(0, 0, sprite.width, 0); + this.preloadSprite.crop = new Phaser.Rectangle(0, 0, sprite.width, 1); } sprite.crop = this.preloadSprite.crop; @@ -23698,11 +23761,11 @@ Phaser.Loader.prototype = { { if (this.preloadSprite.direction == 0) { - this.preloadSprite.crop.width = (this.preloadSprite.width / 100) * this.progress; + this.preloadSprite.crop.width = Math.floor((this.preloadSprite.width / 100) * this.progress); } else { - this.preloadSprite.crop.height = (this.preloadSprite.height / 100) * this.progress; + this.preloadSprite.crop.height = Math.floor((this.preloadSprite.height / 100) * this.progress); } this.preloadSprite.sprite.crop = this.preloadSprite.crop; @@ -23901,6 +23964,7 @@ Phaser.Sound = function (game, key, volume, loop) { this.startTime = 0; this.currentTime = 0; this.duration = 0; + this.durationMS = 0; this.stopTime = 0; this.paused = false; this.isPlaying = false; @@ -24003,6 +24067,7 @@ Phaser.Sound.prototype = { stop: start + duration, volume: volume, duration: duration, + durationMS: duration * 1000, loop: loop }; @@ -24026,7 +24091,7 @@ Phaser.Sound.prototype = { { this.currentTime = this.game.time.now - this.startTime; - if (this.currentTime >= this.duration) + if (this.currentTime >= this.durationMS) { //console.log(this.currentMarker, 'has hit duration'); if (this.usingWebAudio) @@ -24088,7 +24153,7 @@ Phaser.Sound.prototype = { if (typeof loop == 'undefined') { loop = false; } if (typeof forceRestart == 'undefined') { forceRestart = true; } - console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); + // console.log(this.name + ' play ' + marker + ' position ' + position + ' volume ' + volume + ' loop ' + loop, 'force', forceRestart); if (this.isPlaying == true && forceRestart == false && this.override == false) { @@ -24120,27 +24185,38 @@ Phaser.Sound.prototype = { this.currentMarker = marker; - if (marker !== '' && this.markers[marker]) + if (marker !== '') { - this.position = this.markers[marker].start; - this.volume = this.markers[marker].volume; - this.loop = this.markers[marker].loop; - this.duration = this.markers[marker].duration * 1000; + if (this.markers[marker]) + { + this.position = this.markers[marker].start; + this.volume = this.markers[marker].volume; + this.loop = this.markers[marker].loop; + this.duration = this.markers[marker].duration; + this.durationMS = this.markers[marker].durationMS; - console.log('marker info loaded', this.loop, this.duration); - this._tempMarker = marker; - this._tempPosition = this.position; - this._tempVolume = this.volume; - this._tempLoop = this.loop; + // console.log('Marker Loaded: ', marker, 'start:', this.position, 'end: ', this.duration, 'loop', this.loop); + + this._tempMarker = marker; + this._tempPosition = this.position; + this._tempVolume = this.volume; + this._tempLoop = this.loop; + } + else + { + console.warn("Phaser.Sound.play: audio marker " + marker + " doesn't exist"); + return; + } } else { - console.log('no marker info loaded'); + // console.log('no marker info loaded', marker); this.position = position; this.volume = volume; this.loop = loop; this.duration = 0; + this.durationMS = 0; this._tempMarker = marker; this._tempPosition = position; @@ -24166,7 +24242,9 @@ Phaser.Sound.prototype = { if (this.duration == 0) { - this.duration = this.totalDuration * 1000; + // console.log('duration reset'); + this.duration = this.totalDuration; + this.durationMS = this.totalDuration * 1000; } if (this.loop && marker == '') @@ -24177,18 +24255,20 @@ Phaser.Sound.prototype = { // Useful to cache this somewhere perhaps? if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration / 1000); + this._sound.noteGrainOn(0, this.position, this.duration); + // this._sound.noteGrainOn(0, this.position, this.duration / 1000); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - this._sound.start(0, this.position, this.duration / 1000); + // this._sound.start(0, this.position, this.duration / 1000); + this._sound.start(0, this.position, this.duration); } this.isPlaying = true; this.startTime = this.game.time.now; this.currentTime = 0; - this.stopTime = this.startTime + this.duration; + this.stopTime = this.startTime + this.durationMS; this.onPlay.dispatch(this); } else @@ -24221,7 +24301,8 @@ Phaser.Sound.prototype = { if (this.duration == 0) { - this.duration = this.totalDuration * 1000; + this.duration = this.totalDuration; + this.durationMS = this.totalDuration * 1000; } // console.log('playing', this._sound); @@ -24240,7 +24321,7 @@ Phaser.Sound.prototype = { this.isPlaying = true; this.startTime = this.game.time.now; this.currentTime = 0; - this.stopTime = this.startTime + this.duration; + this.stopTime = this.startTime + this.durationMS; this.onPlay.dispatch(this); } else @@ -25836,13 +25917,13 @@ Phaser.Physics.Arcade.prototype = { body.rotation += body.angularVelocity * this.game.time.physicsElapsed; // Horizontal - this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x) - body.velocity.x) / 2; + this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) / 2; body.velocity.x += this._velocityDelta; this._delta = body.velocity.x * this.game.time.physicsElapsed; body.x += this._delta; // Vertical - this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y) - body.velocity.y) / 2; + this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) / 2; body.velocity.y += this._velocityDelta; this._delta = body.velocity.y * this.game.time.physicsElapsed; body.y += this._delta; @@ -27846,7 +27927,7 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () { if (this.width > 1 || this.height > 1) { - particle.reset(this.emiteX - this.game.rnd.integerInRange(this.left, this.right), this.emiteY - this.game.rnd.integerInRange(this.top, this.bottom)); + particle.reset(this.game.rnd.integerInRange(this.left, this.right), this.game.rnd.integerInRange(this.top, this.bottom)); } else { From 8668b82ef6b5fa8af8c0c2ebfd64ab8a2040e145 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 01:18:29 +0100 Subject: [PATCH 026/125] * Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski) * Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use. --- README.md | 3 + build/phaser.js | 2 +- examples/assets/skies/cavern1.png | Bin 0 -> 1809 bytes examples/assets/skies/cavern2.png | Bin 0 -> 1809 bytes examples/assets/skies/chrome.png | Bin 0 -> 1809 bytes examples/assets/skies/fire.png | Bin 0 -> 1809 bytes examples/assets/skies/fog.png | Bin 0 -> 1809 bytes examples/assets/skies/sky1.png | Bin 0 -> 1809 bytes examples/assets/skies/sky2.png | Bin 0 -> 1809 bytes examples/assets/skies/sky3.png | Bin 0 -> 1809 bytes examples/assets/skies/sky4.png | Bin 0 -> 1809 bytes examples/assets/skies/sky5.png | Bin 0 -> 1809 bytes examples/assets/skies/space1.png | Bin 0 -> 1809 bytes examples/assets/skies/space2.png | Bin 0 -> 1809 bytes examples/assets/skies/sunorbit.png | Bin 0 -> 1809 bytes examples/assets/skies/sunset.png | Bin 0 -> 1809 bytes examples/assets/skies/toxic.png | Bin 0 -> 1809 bytes examples/assets/skies/underwater1.png | Bin 0 -> 1809 bytes examples/assets/skies/underwater2.png | Bin 0 -> 1809 bytes examples/assets/skies/underwater3.png | Bin 0 -> 1809 bytes examples/assets/skies/wtf.png | Bin 0 -> 1809 bytes examples/input/key.php | 67 +++++++++++ examples/input/keyboard hotkeys.php | 58 ++++++++++ examples/input/keyboard justpressed.php | 47 ++++++++ examples/js.php | 1 + src/input/Input.js | 1 + src/input/Key.js | 142 ++++++++++++++++++++++++ src/input/Keyboard.js | 99 +++++++++++++---- 28 files changed, 397 insertions(+), 23 deletions(-) create mode 100644 examples/assets/skies/cavern1.png create mode 100644 examples/assets/skies/cavern2.png create mode 100644 examples/assets/skies/chrome.png create mode 100644 examples/assets/skies/fire.png create mode 100644 examples/assets/skies/fog.png create mode 100644 examples/assets/skies/sky1.png create mode 100644 examples/assets/skies/sky2.png create mode 100644 examples/assets/skies/sky3.png create mode 100644 examples/assets/skies/sky4.png create mode 100644 examples/assets/skies/sky5.png create mode 100644 examples/assets/skies/space1.png create mode 100644 examples/assets/skies/space2.png create mode 100644 examples/assets/skies/sunorbit.png create mode 100644 examples/assets/skies/sunset.png create mode 100644 examples/assets/skies/toxic.png create mode 100644 examples/assets/skies/underwater1.png create mode 100644 examples/assets/skies/underwater2.png create mode 100644 examples/assets/skies/underwater3.png create mode 100644 examples/assets/skies/wtf.png create mode 100644 examples/input/key.php create mode 100644 examples/input/keyboard hotkeys.php create mode 100644 examples/input/keyboard justpressed.php create mode 100644 src/input/Key.js diff --git a/README.md b/README.md index c414119e..5126296a 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,9 @@ Version 1.0.7 (in progress in the dev branch) * Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas. * When the game boots it will now by default disable user-select and touch action events on the game canvas. * Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox. +* Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski) +* Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use. + diff --git a/build/phaser.js b/build/phaser.js index 2c1f1254..27401015 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -1,7 +1,7 @@ /** * Phaser - http://www.phaser.io * -* v1.0.7 - Built at: Mon, 30 Sep 2013 18:13:41 +0000 +* v1.0.7 - Built at: Mon, 30 Sep 2013 21:50:07 +0000 * * @author Richard Davey http://www.photonstorm.com @photonstorm * diff --git a/examples/assets/skies/cavern1.png b/examples/assets/skies/cavern1.png new file mode 100644 index 0000000000000000000000000000000000000000..9002fae23e78d65cec7ac706f2681a65f860bd67 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z;bvjvWntuFVH9Fv6k}zSWM`1$U{>X3(c@z?6J&J|VRIK}3sqoA(Pb>M1}Yx~qaiTl zL%_qtrMNQx%JmIa7S&>N;f=rGA%m*bS);-PmzxS!4@|Tk)3m08$ zTcpa!cBCP}fro=6YQy(?ubEtdS|kK`Iv5XWC0?E-2tRFDv0ZX$_FIlxS|PH7QI z0p=tJ0|hn~lBg36gTe~DWM4f@T~iV literal 0 HcmV?d00001 diff --git a/examples/assets/skies/cavern2.png b/examples/assets/skies/cavern2.png new file mode 100644 index 0000000000000000000000000000000000000000..c20943de1c666c6728fbacdfe54e8906e8d5fd4e GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z;bvjvWntuFVH9Fv6k}zSWM`1(WRvCLmf`1@78I5e5tkH`mXuPIl-H0_(Fdv@1*0J_ z)I-3-#HF}0|H}0ZHr9O{z`W4y>EaktaqG>clY&f+0?Y>`Bi235_`mn5qVkuMCJPr` zYg?qs$abV5!GVW^Bx=L=d#{;Xfm$R4csdvll0+Fj5bXkLGE|TdU~VFbN;$wxwoYjg zNde|02LlB*7LuqF4dog}3M2&%G&CnL$_J!4kQ_Wf4T{Wm3r_&Ul*HfxYH(t!ahwPY zQxZK143!q13MX=P{%BJIhAD|j2oy?^ADGEbMB-#81$nZQ0=ceDOM7O|(6+5fXWCok QCk#N~>FVdQ&MBb@07=~XqW}N^ literal 0 HcmV?d00001 diff --git a/examples/assets/skies/chrome.png b/examples/assets/skies/chrome.png new file mode 100644 index 0000000000000000000000000000000000000000..414f578e90a4f03fc5c2c662a760c8e9a3d99559 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z=|B9xcIW?`4gaH-|M#5t-+bzSwVwZ?&Hq!vbp746tSr=3G*zVJWCVmoSUGrr>PNw7 z2n_WQ@Gx;HuFSu3eZ#J^`BlKY(Cz8s7*cWT&83rqOpXG~2PGrcJ=d#Wzp$PyH&I|Pb literal 0 HcmV?d00001 diff --git a/examples/assets/skies/fire.png b/examples/assets/skies/fire.png new file mode 100644 index 0000000000000000000000000000000000000000..759fac2b7e9d75f58c2ef6d201505c196f9e70ca GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z0Rnk8CVL*%cp>(B39k8ay!%!7?`sMDHxT{jBlI_e|4$3g?**K{_OSi90kVG-jE2Ba z4}sFSq6JH4fBJN}AXM=jFfVj_x;TbZ+gh{_lONsQl%m$-+g~ z+7_uYvK?tiaNyw}iQ4e}-fJdTpcV-Mo({%?BvD2WM7w~R3>72*~2WGMpkvQ2&L7wcSK(1@k(w^Bfv~6qBnf6xs Q2?G##y85}Sb4q9e06+)`=>Px# literal 0 HcmV?d00001 diff --git a/examples/assets/skies/fog.png b/examples/assets/skies/fog.png new file mode 100644 index 0000000000000000000000000000000000000000..76c7386ca1e92de32a62ceb0e06256f489d87045 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zQJXSbt-D9PsYatRN24G{Gu=lk)mdKI;Vst02fOF^Z)<= literal 0 HcmV?d00001 diff --git a/examples/assets/skies/sky1.png b/examples/assets/skies/sky1.png new file mode 100644 index 0000000000000000000000000000000000000000..18a30759a8195436cf3470bc5fb0f6839be72cb3 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zG3Z~Y+dfCDZn|38B<0**`P6oqm?nvkT2b!`A?IQ~t6XlQ40g?A7R5LQi3p(jQ7{?; zLp=maY0Wvzhn=fJ$s?djqeQgQ3erIUh8jsnaFB_q~7&G^6fsiN|ilO_un zU29vU%E)%4A;E!%gCuIh_j|9IT!C671b8|a50XR~JrL~zYBE%i5MXX1iAp)ZOtwyG z5lI2&BnJZpHWreo6Ak4WMhYYa4m30;Fv=fj2YUbj literal 0 HcmV?d00001 diff --git a/examples/assets/skies/sky2.png b/examples/assets/skies/sky2.png new file mode 100644 index 0000000000000000000000000000000000000000..10a85c76a15900c57f5a57e5f88f7fdcc94069f4 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z0Rm=54t8ciZdOTtb|qmBEpaYmX&xInJ{KhcUp2u{E#Wvl(KI9Rd^5=ki26}-Gz5lp z2$aSZEm$)9)2GYE51#M=(|@<8i(^Q|tv8oW3NkqgFdvkRSobvJ|K6vH%3n^JEL?Q0 zZILP?+mVI@2ObWRs14umy=HO+YLO7&>0mra5@qy2v4T{NTNXOE PFaUw4tDnm{r-UW|i1Yum literal 0 HcmV?d00001 diff --git a/examples/assets/skies/sky3.png b/examples/assets/skies/sky3.png new file mode 100644 index 0000000000000000000000000000000000000000..26714fafa9cd46c0968461324945cd0059b387f5 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zF|1f+UcK6`eywZsdY|?U!QGpp`nM!b-j+UXd)};_rSo>zEZWn&Y+u)^0~6OB0;(Sc zqaiTVL!dOSXu*=%pFUmQurP5IFfVj_x;TbZ+gh{_lONsQl%m z$-+g~+7_uYvK?tiaNyw}iQ4e}-fJdTpcV-Mo({%?BvD2WM7w~R3>72*~2WGMpkvQ2&L7wcSK(1@k(w^Bfv~6qB Unf6xs2?G##y85}Sb4q9e068`jI{*Lx literal 0 HcmV?d00001 diff --git a/examples/assets/skies/sky4.png b/examples/assets/skies/sky4.png new file mode 100644 index 0000000000000000000000000000000000000000..a2989c3eef15569ed1f59c1abc99c2fb45e4d784 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z5u0^Xe%=X<#ixx{oU>kg$#vsZzil@ncHc=na6jwlqmq+PYtOxGzx-yxjrX(eeg>)^ z1*0J_)I*>&u4uuM*`GdLmVaBD4$KSPo-U3d6}R48Iw{EHD8PJBGGg7+jQ@L|Dk^_D zX|iz9wYEj7jBH055*&CqNTN1;zxSHS6{tl*fTx4;AW4+b1JN#^CPM`Y0p=!>sFVZD zWb2d`krZG~axhR}Vhw6tgT3~k$* Ubf&#ke!>6*p00i_>zopr081?v;Q#;t literal 0 HcmV?d00001 diff --git a/examples/assets/skies/sky5.png b/examples/assets/skies/sky5.png new file mode 100644 index 0000000000000000000000000000000000000000..58db4343c8dc16f399bb7f02da7ffc98e10877c9 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zQIeEXl2uVu)KXM6P|!3}FtC@i^p$mulL^R^im8{%Xp}B(mT78}?eCDA(+yNV3PwX< zsE2@uiA!;1{*~(+g3sxG2j+!tPZ!6Kid%0kofKqp6kt9m8L{qZ#{a!f6_vl7G+DUl zTH7L3Mz$jj2@X6QBvBi_-+RsE3e+MYz|+BakR;0JfoK;{lc9oy0CN*bRLTKnvUN&} zND43~IT$Fgv5-WaXeie(QXnaCprJW|Q9dBWf#l!;YEWdhTX+H(rX&UrP=ga&jpIaM zn3Cv8V5qe4R5+2V^GBN!Fic5ILZDER{J>0hA`&M%DaezZ6v%aLTG}&vhPG`@I@8`N QKVbj@Pgg&ebxsLQ0A9@mZ2$lO literal 0 HcmV?d00001 diff --git a/examples/assets/skies/space1.png b/examples/assets/skies/space1.png new file mode 100644 index 0000000000000000000000000000000000000000..9d7643f1a0b1bc5c8f56dd2eeefaf903836e9a8b GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z0RmA&04#WAGf)|*Qw1(_TLm=8)utb3aAfA3R8ND3TiXii|14@hw!Ie35?6q)T7o&bg^iNOQZ;KWwrI1w18 zBzh7UDlI$}PUPzR(WV3pQxcO9D3l~WFq55##K}$y@?<9ka$TF2_ROB4ZCjJhw71Gn P7=Xaj)z4*}Q$iB}$A|on literal 0 HcmV?d00001 diff --git a/examples/assets/skies/space2.png b/examples/assets/skies/space2.png new file mode 100644 index 0000000000000000000000000000000000000000..2198cd4d760041e1d78b6317dc5c3e736b13398d GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z0RlD#HVy_3ZU$~X23|o%0TD)FQASa5CJ6~9X(?toDHcUZR%J;xH3<$)i26}-Gz5lp z2zZ#d6j$b7xxS&;qkT0nFLZmlIEGZ*dUNTdAd{m2^Fhgobx$+??|rJM{N<#{!bR8G z7O66_9cf5#;Nc*N+VK6}YbIBq76}2K4#tBdQAQ6$yMUSu6(j_hn@FNk4lt9gQ(8n) zfH}#*K!J^gB0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_A( zBq+iyCc!H$Bc!ToXrvfmC!6ObIXg<=L?*|V3Wjgpf35|wg*nQWcX zB9a2kNe%`IY%C;ECmPB%j1));9B61xV3ZF?aUeN(fEpB;?G~N@hAD}`1JvNeR^vDk z7^Wn85*R8iJQYsl>ip5B1PoIWlMpDBBtI~doruKAP73m5Ck1j{o0j&>o}q19lg_la R%1;=8z|+;wWt~$(69AT}3LpRg literal 0 HcmV?d00001 diff --git a/examples/assets/skies/sunset.png b/examples/assets/skies/sunset.png new file mode 100644 index 0000000000000000000000000000000000000000..18f5212bab9c575f84c71ff537de341fd2a85371 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zQDPR>U>4J3mNaFSv1XQcWL9!xRP|w23}lrFW0Q#H5RT{KPvPduCk2@t1(**?Myz|9@qh1AMddFiO%^V? z*0xBMk?lxBf&&i+Nz{h#_g*u(0<}m8@N_U9B#AP5Ale1gWT+q^z}!Rh{VZG3i4zp1#(@RmiEk^p>11}&a}76 QPZ)r})78&qol`;+0ITi&;Q#;t literal 0 HcmV?d00001 diff --git a/examples/assets/skies/toxic.png b/examples/assets/skies/toxic.png new file mode 100644 index 0000000000000000000000000000000000000000..8bfb378d079ea6ff211ce0f60ebddece650e913e GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zVHRU$Rb^*4<>GYZ;R)sEP2=S&=i%?*;-AT>zKX+PH(SIR*225Yo$r_y{Rb)^1*0J_ z8k!Rr<1M*si- literal 0 HcmV?d00001 diff --git a/examples/assets/skies/underwater1.png b/examples/assets/skies/underwater1.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ee99001d2a56867f1f3ba6e1f62987e8670400 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zFgQtX~zG(PZgEFoHSXu z=vvz%RYtZW4G9iB93)X2zTbPzu(6OtooFc6Fj62XaG;?%fl)pn#ewAD0cucWwp(}t7^Wl!4^V>>TaDvH zV3?BVNnoh7@KiXFtMf;j5-?0jOhTYglKj9-b|MldJ1NMMofOD*ZCcthdxo}cO*+%w RDnDTW0#8>zmvv4FO#u1>3uFKQ literal 0 HcmV?d00001 diff --git a/examples/assets/skies/underwater2.png b/examples/assets/skies/underwater2.png new file mode 100644 index 0000000000000000000000000000000000000000..0af1808a116d12a6ddfc04fff3fea859e2c506f3 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zkuLL-D)N)e^OMN(6HD_GP4W|o^An2l7Yy?k2=eFm^XK*Q=W+ArcJk-63jnGg1*0J_ z)I*>&u4uuM*`GdLPSrFw1?GirPZ!6Kid%0kofKqp6kt9m8L{qZ#{a!f6_vl7G+DUl zTH7L3Mz$jj2@X6QBvBi_-+RsE3e+MYz|+BakR;0JfoK;{lc9oy0CN*bRLTKnvUN&} zND43~IT$Fgv5-WaXeie(QXnaCprJW|Q9dBWf#l!;YEWdhTX+H(rX&UrP=ga&jpIaM zn3Cv8V5qe4R5+2V^GBN!Fic5ILZDER{J>0hA`&M%DaezZ6v%aLTG}&vhPG`@I@8`N QKVbj@Pgg&ebxsLQ01t`->Hq)$ literal 0 HcmV?d00001 diff --git a/examples/assets/skies/underwater3.png b/examples/assets/skies/underwater3.png new file mode 100644 index 0000000000000000000000000000000000000000..d4ff8955007fec572a7662de08931b90ead83393 GIT binary patch literal 1809 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sV0^&A3>0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL z0Rmvi{{dar1IEGZ*dUNTdAd{m2^Fhgobx$+??|rJM{N<#{!bR8G z7O66_9cf5#;Nc*N+VK6}YbIBq76}2K4#tBdQAQ6$yMUSu6(j_hn@FNk4lt9gQ(8n) zfH}#*K!J^gB0DF*SQ9yI14-?iy0WWg+Z8+Vb&Z8 zprAssN02WALzOxMLqjtI!><$|eTjjgtc`);%}WLb%Xth8qW_N7UAAIiU}gyL32_DL zS=A{zty!h9);PD!DWV|IB{M-kIbSNKUOF&e#w}jf%1>V3PC;2$Nm5Qq7--oj7!83T z9|9gGF2$AkSFUepSmFH(m>0S|T^vIyZoRp5Qjp0}fccX~BPY2^ck|?7GqFq2uh6)k_%uOUwDF>Lz)+sF_ zDZrfMV4%RpLK1bNp + + + + \ No newline at end of file diff --git a/examples/input/keyboard hotkeys.php b/examples/input/keyboard hotkeys.php new file mode 100644 index 00000000..94e162f6 --- /dev/null +++ b/examples/input/keyboard hotkeys.php @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/examples/input/keyboard justpressed.php b/examples/input/keyboard justpressed.php new file mode 100644 index 00000000..afddd675 --- /dev/null +++ b/examples/input/keyboard justpressed.php @@ -0,0 +1,47 @@ + + + + + \ No newline at end of file diff --git a/examples/js.php b/examples/js.php index bbf12080..32e1a272 100644 --- a/examples/js.php +++ b/examples/js.php @@ -52,6 +52,7 @@ + diff --git a/src/input/Input.js b/src/input/Input.js index f9df0d7a..a4075192 100644 --- a/src/input/Input.js +++ b/src/input/Input.js @@ -361,6 +361,7 @@ Phaser.Input.prototype = { if (this.pointer10) { this.pointer10.update(); } this._pollCounter = 0; + }, /** diff --git a/src/input/Key.js b/src/input/Key.js new file mode 100644 index 00000000..519b4e23 --- /dev/null +++ b/src/input/Key.js @@ -0,0 +1,142 @@ +Phaser.Key = function (game, keycode) { + + this.game = game; + + /** + * + * @property isDown + * @type Boolean + **/ + this.isDown = false; + + /** + * + * @property isUp + * @type Boolean + **/ + this.isUp = false; + + /** + * + * @property altKey + * @type Boolean + **/ + this.altKey = false; + + /** + * + * @property ctrlKey + * @type Boolean + **/ + this.ctrlKey = false; + + /** + * + * @property shiftKey + * @type Boolean + **/ + this.shiftKey = false; + + /** + * + * @property timeDown + * @type Number + **/ + this.timeDown = 0; + + /** + * + * @property duration + * @type Number + **/ + this.duration = 0; + + /** + * + * @property timeUp + * @type Number + **/ + this.timeUp = 0; + + /** + * + * @property repeats + * @type Number + **/ + this.repeats = 0; + + this.keyCode = keycode; + + this.onDown = new Phaser.Signal(); + this.onUp = new Phaser.Signal(); + +}; + +Phaser.Key.prototype = { + + /** + * + * @method update + * @param {KeyboardEvent} event. + * @return {} + */ + processKeyDown: function (event) { + + this.altKey = event.altKey; + this.ctrlKey = event.ctrlKey; + this.shiftKey = event.shiftKey; + + if (this.isDown) + { + // Key was already held down, this must be a repeat rate based event + this.duration = event.timeStamp - this.timeDown; + this.repeats++; + } + else + { + this.isDown = true; + this.isUp = false; + this.timeDown = event.timeStamp; + this.duration = 0; + this.repeats = 0; + + this.onDown.dispatch(this); + } + + }, + + processKeyUp: function (event) { + + this.isDown = false; + this.isUp = true; + this.timeUp = event.timeStamp; + + this.onUp.dispatch(this); + + }, + + /** + * @param {Number} [duration] + * @return {bool} + */ + justPressed: function (duration) { + + if (typeof duration === "undefined") { duration = 250; } + + return (this.isDown && this.duration < duration); + + }, + + /** + * @param {Number} [duration] + * @return {bool} + */ + justReleased: function (duration) { + + if (typeof duration === "undefined") { duration = 250; } + + return (this.isDown == false && (this.game.time.now - this.timeUp < duration)); + + } + +}; \ No newline at end of file diff --git a/src/input/Keyboard.js b/src/input/Keyboard.js index 1096a9a1..c19ad892 100644 --- a/src/input/Keyboard.js +++ b/src/input/Keyboard.js @@ -2,7 +2,15 @@ Phaser.Keyboard = function (game) { this.game = game; this._keys = {}; + this._hotkeys = {}; this._capture = {}; + + this.callbackContext = this; + this.onDownCallback = null; + this.onUpCallback = null; + + this.onDown = new Phaser.Signal(); + this.onUp = new Phaser.Signal(); }; @@ -19,16 +27,41 @@ Phaser.Keyboard.prototype = { _onKeyDown: null, _onKeyUp: null, + addCallbacks: function (context, onDown, onUp) { + + this.callbackContext = context; + this.onDownCallback = onDown; + + if (typeof onUp !== 'undefined') + { + this.onUpCallback = onUp; + } + + }, + + addKey: function (keycode) { + + this._hotkeys[keycode] = new Phaser.Key(this.game, keycode); + return this._hotkeys[keycode]; + + }, + + removeKey: function (keycode) { + + delete (this._hotkeys[keycode]); + + }, + start: function () { var _this = this; this._onKeyDown = function (event) { - return _this.onKeyDown(event); + return _this.processKeyDown(event); }; this._onKeyUp = function (event) { - return _this.onKeyUp(event); + return _this.processKeyUp(event); }; document.body.addEventListener('keydown', this._onKeyDown, false); @@ -80,10 +113,11 @@ Phaser.Keyboard.prototype = { }, + /** * @param {KeyboardEvent} event */ - onKeyDown: function (event) { + processKeyDown: function (event) { if (this.game.input.disabled || this.disabled) { @@ -95,18 +129,40 @@ Phaser.Keyboard.prototype = { event.preventDefault(); } - if (!this._keys[event.keyCode]) + if (this.onDownCallback) { - this._keys[event.keyCode] = { - isDown: true, - timeDown: this.game.time.now, - timeUp: 0 - }; + this.onDownCallback.call(this.callbackContext, event); + } + + if (this._keys[event.keyCode] && this._keys[event.keyCode].isDown) + { + // Key already down and still down, so update + this._keys[event.keyCode].duration = this.game.time.now - this._keys[event.keyCode].timeDown; } else { - this._keys[event.keyCode].isDown = true; - this._keys[event.keyCode].timeDown = this.game.time.now; + if (!this._keys[event.keyCode]) + { + // Not used this key before, so register it + this._keys[event.keyCode] = { + isDown: true, + timeDown: this.game.time.now, + timeUp: 0, + duration: 0 + }; + } + else + { + // Key used before but freshly down + this._keys[event.keyCode].isDown = true; + this._keys[event.keyCode].timeDown = this.game.time.now; + this._keys[event.keyCode].duration = 0; + } + } + + if (this._hotkeys[event.keyCode]) + { + this._hotkeys[event.keyCode].processKeyDown(event); } }, @@ -114,7 +170,7 @@ Phaser.Keyboard.prototype = { /** * @param {KeyboardEvent} event */ - onKeyUp: function (event) { + processKeyUp: function (event) { if (this.game.input.disabled || this.disabled) { @@ -126,20 +182,19 @@ Phaser.Keyboard.prototype = { event.preventDefault(); } - if (!this._keys[event.keyCode]) + if (this.onUpCallback) { - this._keys[event.keyCode] = { - isDown: false, - timeDown: 0, - timeUp: this.game.time.now - }; + this.onUpCallback.call(this.callbackContext, event); } - else + + if (this._hotkeys[event.keyCode]) { - this._keys[event.keyCode].isDown = false; - this._keys[event.keyCode].timeUp = this.game.time.now; + this._hotkeys[event.keyCode].processKeyUp(event); } + this._keys[event.keyCode].isDown = false; + this._keys[event.keyCode].timeUp = this.game.time.now; + }, reset: function () { @@ -160,7 +215,7 @@ Phaser.Keyboard.prototype = { if (typeof duration === "undefined") { duration = 250; } - if (this._keys[keycode] && this._keys[keycode].isDown === true && (this.game.time.now - this._keys[keycode].timeDown < duration)) + if (this._keys[keycode] && this._keys[keycode].isDown && this._keys[keycode].duration < duration) { return true; } From 480d90b00970748fdf2c6afaa2a9c3bff3a3b449 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 02:19:08 +0100 Subject: [PATCH 027/125] * Removed the callbackContext parameter from Group.callAll because it's no longer needed. * Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child. * Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg) --- README.md | 4 +- build/build.php | 51 +++- build/phaser.js | 288 ++++++++++++++++-- .../physics/group move towards object.php | 53 ++++ package.json | 4 +- src/core/Group.js | 31 +- 6 files changed, 375 insertions(+), 56 deletions(-) create mode 100644 examples/physics/group move towards object.php diff --git a/README.md b/README.md index 5126296a..c3dc074e 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ Version 1.0.7 (in progress in the dev branch) * Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox. * Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski) * Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use. - +* Removed the callbackContext parameter from Group.callAll because it's no longer needed. +* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child. +* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg) diff --git a/build/build.php b/build/build.php index 8379975d..19ea3f76 100644 --- a/build/build.php +++ b/build/build.php @@ -1,15 +1,14 @@ -Minify it
    - - \ No newline at end of file diff --git a/build/phaser.js b/build/phaser.js index 27401015..52fb8bc9 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -1,7 +1,7 @@ /** * Phaser - http://www.phaser.io * -* v1.0.7 - Built at: Mon, 30 Sep 2013 21:50:07 +0000 +* v1.0.7 - Built at: Tue, 01 Oct 2013 02:14:43 +0100 * * @author Richard Davey http://www.photonstorm.com @photonstorm * @@ -19,7 +19,15 @@ * "If you want them to be more intelligent, read them more fairy tales." * -- Albert Einstein */ - +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define(factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.Phaser = factory(); + } +}(this, function (b) { /** * @author Mat Groves http://matgroves.com/ @Doormat23 */ @@ -9435,12 +9443,11 @@ Phaser.Group.prototype = { /** * Calls a function on all of the children regardless if they are dead or alive (see callAllExists if you need control over that) - * You must pass the context in which the callback is applied. - * After the context you can add as many parameters as you like, which will all be passed to the child. + * After the function you can add as many parameters as you like, which will all be passed to the child. */ - callAll: function (callback, callbackContext) { + callAll: function (callback) { - var args = Array.prototype.splice.call(arguments, 2); + var args = Array.prototype.splice.call(arguments, 1); if (this._container.children.length > 0 && this._container.first._iNext) { @@ -9461,9 +9468,16 @@ Phaser.Group.prototype = { }, + // After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. forEach: function (callback, callbackContext, checkExists) { - if (typeof checkExists == 'undefined') { checkExists = false; } + if (typeof checkExists === 'undefined') + { + checkExists = false; + } + + var args = Array.prototype.splice.call(arguments, 3); + args.unshift(null); if (this._container.children.length > 0 && this._container.first._iNext) { @@ -9473,7 +9487,8 @@ Phaser.Group.prototype = { { if (checkExists == false || (checkExists && currentNode.exists)) { - callback.call(callbackContext, currentNode); + args[0] = currentNode; + callback.apply(callbackContext, args); } currentNode = currentNode._iNext; @@ -9486,6 +9501,9 @@ Phaser.Group.prototype = { forEachAlive: function (callback, callbackContext) { + var args = Array.prototype.splice.call(arguments, 2); + args.unshift(null); + if (this._container.children.length > 0 && this._container.first._iNext) { var currentNode = this._container.first._iNext; @@ -9494,7 +9512,8 @@ Phaser.Group.prototype = { { if (currentNode.alive) { - callback.call(callbackContext, currentNode); + args[0] = currentNode; + callback.apply(callbackContext, args); } currentNode = currentNode._iNext; @@ -9507,6 +9526,9 @@ Phaser.Group.prototype = { forEachDead: function (callback, callbackContext) { + var args = Array.prototype.splice.call(arguments, 2); + args.unshift(null); + if (this._container.children.length > 0 && this._container.first._iNext) { var currentNode = this._container.first._iNext; @@ -9515,7 +9537,8 @@ Phaser.Group.prototype = { { if (currentNode.alive == false) { - callback.call(callbackContext, currentNode); + args[0] = currentNode; + callback.apply(callbackContext, args); } currentNode = currentNode._iNext; @@ -10997,6 +11020,7 @@ Phaser.Input.prototype = { if (this.pointer10) { this.pointer10.update(); } this._pollCounter = 0; + }, /** @@ -11336,11 +11360,161 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", { }); +Phaser.Key = function (game, keycode) { + + this.game = game; + + /** + * + * @property isDown + * @type Boolean + **/ + this.isDown = false; + + /** + * + * @property isUp + * @type Boolean + **/ + this.isUp = false; + + /** + * + * @property altKey + * @type Boolean + **/ + this.altKey = false; + + /** + * + * @property ctrlKey + * @type Boolean + **/ + this.ctrlKey = false; + + /** + * + * @property shiftKey + * @type Boolean + **/ + this.shiftKey = false; + + /** + * + * @property timeDown + * @type Number + **/ + this.timeDown = 0; + + /** + * + * @property duration + * @type Number + **/ + this.duration = 0; + + /** + * + * @property timeUp + * @type Number + **/ + this.timeUp = 0; + + /** + * + * @property repeats + * @type Number + **/ + this.repeats = 0; + + this.keyCode = keycode; + + this.onDown = new Phaser.Signal(); + this.onUp = new Phaser.Signal(); + +}; + +Phaser.Key.prototype = { + + /** + * + * @method update + * @param {KeyboardEvent} event. + * @return {} + */ + processKeyDown: function (event) { + + this.altKey = event.altKey; + this.ctrlKey = event.ctrlKey; + this.shiftKey = event.shiftKey; + + if (this.isDown) + { + // Key was already held down, this must be a repeat rate based event + this.duration = event.timeStamp - this.timeDown; + this.repeats++; + } + else + { + this.isDown = true; + this.isUp = false; + this.timeDown = event.timeStamp; + this.duration = 0; + this.repeats = 0; + + this.onDown.dispatch(this); + } + + }, + + processKeyUp: function (event) { + + this.isDown = false; + this.isUp = true; + this.timeUp = event.timeStamp; + + this.onUp.dispatch(this); + + }, + + /** + * @param {Number} [duration] + * @return {bool} + */ + justPressed: function (duration) { + + if (typeof duration === "undefined") { duration = 250; } + + return (this.isDown && this.duration < duration); + + }, + + /** + * @param {Number} [duration] + * @return {bool} + */ + justReleased: function (duration) { + + if (typeof duration === "undefined") { duration = 250; } + + return (this.isDown == false && (this.game.time.now - this.timeUp < duration)); + + } + +}; Phaser.Keyboard = function (game) { this.game = game; this._keys = {}; + this._hotkeys = {}; this._capture = {}; + + this.callbackContext = this; + this.onDownCallback = null; + this.onUpCallback = null; + + this.onDown = new Phaser.Signal(); + this.onUp = new Phaser.Signal(); }; @@ -11357,16 +11531,41 @@ Phaser.Keyboard.prototype = { _onKeyDown: null, _onKeyUp: null, + addCallbacks: function (context, onDown, onUp) { + + this.callbackContext = context; + this.onDownCallback = onDown; + + if (typeof onUp !== 'undefined') + { + this.onUpCallback = onUp; + } + + }, + + addKey: function (keycode) { + + this._hotkeys[keycode] = new Phaser.Key(this.game, keycode); + return this._hotkeys[keycode]; + + }, + + removeKey: function (keycode) { + + delete (this._hotkeys[keycode]); + + }, + start: function () { var _this = this; this._onKeyDown = function (event) { - return _this.onKeyDown(event); + return _this.processKeyDown(event); }; this._onKeyUp = function (event) { - return _this.onKeyUp(event); + return _this.processKeyUp(event); }; document.body.addEventListener('keydown', this._onKeyDown, false); @@ -11418,10 +11617,11 @@ Phaser.Keyboard.prototype = { }, + /** * @param {KeyboardEvent} event */ - onKeyDown: function (event) { + processKeyDown: function (event) { if (this.game.input.disabled || this.disabled) { @@ -11433,18 +11633,40 @@ Phaser.Keyboard.prototype = { event.preventDefault(); } - if (!this._keys[event.keyCode]) + if (this.onDownCallback) { - this._keys[event.keyCode] = { - isDown: true, - timeDown: this.game.time.now, - timeUp: 0 - }; + this.onDownCallback.call(this.callbackContext, event); + } + + if (this._keys[event.keyCode] && this._keys[event.keyCode].isDown) + { + // Key already down and still down, so update + this._keys[event.keyCode].duration = this.game.time.now - this._keys[event.keyCode].timeDown; } else { - this._keys[event.keyCode].isDown = true; - this._keys[event.keyCode].timeDown = this.game.time.now; + if (!this._keys[event.keyCode]) + { + // Not used this key before, so register it + this._keys[event.keyCode] = { + isDown: true, + timeDown: this.game.time.now, + timeUp: 0, + duration: 0 + }; + } + else + { + // Key used before but freshly down + this._keys[event.keyCode].isDown = true; + this._keys[event.keyCode].timeDown = this.game.time.now; + this._keys[event.keyCode].duration = 0; + } + } + + if (this._hotkeys[event.keyCode]) + { + this._hotkeys[event.keyCode].processKeyDown(event); } }, @@ -11452,7 +11674,7 @@ Phaser.Keyboard.prototype = { /** * @param {KeyboardEvent} event */ - onKeyUp: function (event) { + processKeyUp: function (event) { if (this.game.input.disabled || this.disabled) { @@ -11464,20 +11686,19 @@ Phaser.Keyboard.prototype = { event.preventDefault(); } - if (!this._keys[event.keyCode]) + if (this.onUpCallback) { - this._keys[event.keyCode] = { - isDown: false, - timeDown: 0, - timeUp: this.game.time.now - }; + this.onUpCallback.call(this.callbackContext, event); } - else + + if (this._hotkeys[event.keyCode]) { - this._keys[event.keyCode].isDown = false; - this._keys[event.keyCode].timeUp = this.game.time.now; + this._hotkeys[event.keyCode].processKeyUp(event); } + this._keys[event.keyCode].isDown = false; + this._keys[event.keyCode].timeUp = this.game.time.now; + }, reset: function () { @@ -11498,7 +11719,7 @@ Phaser.Keyboard.prototype = { if (typeof duration === "undefined") { duration = 250; } - if (this._keys[keycode] && this._keys[keycode].isDown === true && (this.game.time.now - this._keys[keycode].timeDown < duration)) + if (this._keys[keycode] && this._keys[keycode].isDown && this._keys[keycode].duration < duration) { return true; } @@ -29658,3 +29879,6 @@ PIXI.WebGLBatch.prototype.update = function() } } + + return Phaser; +})); \ No newline at end of file diff --git a/examples/physics/group move towards object.php b/examples/physics/group move towards object.php new file mode 100644 index 00000000..f8998e18 --- /dev/null +++ b/examples/physics/group move towards object.php @@ -0,0 +1,53 @@ + + + + + \ No newline at end of file diff --git a/package.json b/package.json index c7e5d788..d7fc476c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "Phaser", - "version": "1.0.0", + "version": "1.0.7", "description": "html5 game framework", - "main": "index.js", + "main": "build/phaser.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/src/core/Group.js b/src/core/Group.js index 8b1dfcee..62910ffd 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -401,12 +401,11 @@ Phaser.Group.prototype = { /** * Calls a function on all of the children regardless if they are dead or alive (see callAllExists if you need control over that) - * You must pass the context in which the callback is applied. - * After the context you can add as many parameters as you like, which will all be passed to the child. + * After the function you can add as many parameters as you like, which will all be passed to the child. */ - callAll: function (callback, callbackContext) { + callAll: function (callback) { - var args = Array.prototype.splice.call(arguments, 2); + var args = Array.prototype.splice.call(arguments, 1); if (this._container.children.length > 0 && this._container.first._iNext) { @@ -427,9 +426,16 @@ Phaser.Group.prototype = { }, + // After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. forEach: function (callback, callbackContext, checkExists) { - if (typeof checkExists == 'undefined') { checkExists = false; } + if (typeof checkExists === 'undefined') + { + checkExists = false; + } + + var args = Array.prototype.splice.call(arguments, 3); + args.unshift(null); if (this._container.children.length > 0 && this._container.first._iNext) { @@ -439,7 +445,8 @@ Phaser.Group.prototype = { { if (checkExists == false || (checkExists && currentNode.exists)) { - callback.call(callbackContext, currentNode); + args[0] = currentNode; + callback.apply(callbackContext, args); } currentNode = currentNode._iNext; @@ -452,6 +459,9 @@ Phaser.Group.prototype = { forEachAlive: function (callback, callbackContext) { + var args = Array.prototype.splice.call(arguments, 2); + args.unshift(null); + if (this._container.children.length > 0 && this._container.first._iNext) { var currentNode = this._container.first._iNext; @@ -460,7 +470,8 @@ Phaser.Group.prototype = { { if (currentNode.alive) { - callback.call(callbackContext, currentNode); + args[0] = currentNode; + callback.apply(callbackContext, args); } currentNode = currentNode._iNext; @@ -473,6 +484,9 @@ Phaser.Group.prototype = { forEachDead: function (callback, callbackContext) { + var args = Array.prototype.splice.call(arguments, 2); + args.unshift(null); + if (this._container.children.length > 0 && this._container.first._iNext) { var currentNode = this._container.first._iNext; @@ -481,7 +495,8 @@ Phaser.Group.prototype = { { if (currentNode.alive == false) { - callback.call(callbackContext, currentNode); + args[0] = currentNode; + callback.apply(callbackContext, args); } currentNode = currentNode._iNext; From fa8ad51c794a9b0e68da100cc8070a679c5b5e89 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Mon, 30 Sep 2013 22:06:48 -0400 Subject: [PATCH 028/125] Fixed bug in LinkedList#remove that could cause first/tail to be have pointers to dead node --- src/core/LinkedList.js | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/core/LinkedList.js b/src/core/LinkedList.js index 1cf214ce..23eb1d1c 100644 --- a/src/core/LinkedList.js +++ b/src/core/LinkedList.js @@ -38,37 +38,19 @@ Phaser.LinkedList.prototype = { }, remove: function (child) { - - // If the list is empty - if (this.first == null && this.last == null) - { - return; - } + if( this.first ) { + child.next = this.last.next; + child.prev = this.last; + if( this.last.next ) { + this.last.next.prev = child; + } + this.last.next = child; + this.last = this.last.next; + } else { + this.first = this.last = child; + } this.total--; - - // The only node? - if (this.first == child && this.last == child) - { - this.first = null; - this.last = null; - this.next = null; - child.next = null; - child.prev = null; - return; - } - - var childPrev = child.prev; - - // Tail node? - if (child.next) - { - // Has another node after it? - child.next.prev = child.prev; - } - - childPrev.next = child.next; - }, callAll: function (callback) { From fa15f8015de3a10b22726fe0ea68c8f5a41858e5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 11:28:57 +0100 Subject: [PATCH 029/125] Fixed bug in LinkedList#remove that could cause first to point to a dead node --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3dc074e..55ad72c6 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Version 1.0.7 (in progress in the dev branch) * Removed the callbackContext parameter from Group.callAll because it's no longer needed. * Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child. * Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg) - +* Fixed bug in LinkedList#remove that could cause first to point to a dead node (thanks onedayitwillmake) * TODO: addMarker hh:mm:ss:ms From 305b12d76be5c43d00a76aaad2a4de5c36213315 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 13:54:29 +0100 Subject: [PATCH 030/125] Adding docs. --- src/Intro.js | 7 + src/Phaser.js | 7 + src/animation/Animation.js | 57 ++-- src/animation/AnimationManager.js | 149 +++++----- src/animation/Frame.js | 144 +++------- src/animation/FrameData.js | 55 ++-- src/animation/Parser.js | 48 ++-- src/core/Camera.js | 189 ++++++------- src/core/Game.js | 232 ++++++++-------- src/core/Group.js | 307 +++++++++++++++++++-- src/core/LinkedList.js | 62 ++++- src/core/Plugin.js | 54 +++- src/core/PluginManager.js | 70 ++++- src/core/Signal.js | 145 ++++++---- src/core/SignalBinding.js | 125 +++++---- src/core/Stage.js | 83 +++--- src/core/State.js | 100 ++++++- src/core/StateManager.js | 140 +++++++--- src/core/World.js | 108 ++++---- src/gameobjects/BitmapText.js | 95 ++++++- src/gameobjects/Button.js | 106 +++++++- src/gameobjects/Events.js | 14 +- src/gameobjects/GameObjectFactory.js | 162 ++++++++++- src/gameobjects/Graphics.js | 22 +- src/gameobjects/RenderTexture.js | 42 ++- src/gameobjects/Sprite.js | 326 +++++++++++++++++----- src/gameobjects/Text.js | 73 ++++- src/gameobjects/TileSprite.js | 40 ++- src/geom/Circle.js | 212 ++++++++------- src/geom/Point.js | 110 ++++---- src/geom/Rectangle.js | 374 ++++++++++++-------------- src/input/Input.js | 299 ++++++++++++++------- src/input/InputHandler.js | 316 +++++++++++++++++----- src/input/Keyboard.js | 120 ++++++--- src/input/MSPointer.js | 68 ++++- src/input/Mouse.js | 69 ++++- src/input/Pointer.js | 234 +++++++++------- src/input/Touch.js | 91 +++++-- src/loader/Cache.js | 198 ++++++++------ src/loader/Loader.js | 231 +++++++++++----- src/loader/Parser.js | 15 +- src/math/Math.js | 388 +++++++++++++++++++-------- src/math/QuadTree.js | 106 +++++--- src/math/RandomDataGenerator.js | 100 ++++--- src/net/Net.js | 40 +++ src/particles/Particles.js | 42 +++ src/particles/arcade/Emitter.js | 216 +++++++++++---- src/sound/Sound.js | 267 +++++++++++++----- src/sound/SoundManager.js | 144 ++++++---- src/system/Canvas.js | 60 ++--- src/system/Device.js | 196 ++++++++------ src/system/RequestAnimationFrame.js | 40 ++- src/system/StageScaleMode.js | 154 ++++++++--- src/tilemap/Tile.js | 92 ++++--- src/tilemap/Tilemap.js | 196 +++++++++----- src/tilemap/TilemapLayer.js | 278 +++++++++++++------ src/tilemap/TilemapRenderer.js | 99 ++++++- src/time/Time.js | 114 ++++---- src/tween/Easing.js | 316 ++++++++++++++++++++++ src/tween/Tween.js | 306 +++++++++++++++++---- src/tween/TweenManager.js | 74 +++-- src/utils/Color.js | 187 ++++++------- src/utils/Debug.js | 196 +++++++++++--- src/utils/Utils.js | 40 +-- 64 files changed, 6268 insertions(+), 2682 deletions(-) diff --git a/src/Intro.js b/src/Intro.js index 08ea73e7..2a7a7f15 100644 --- a/src/Intro.js +++ b/src/Intro.js @@ -1,3 +1,10 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Intro +*/ + /** * Phaser - http://www.phaser.io * diff --git a/src/Phaser.js b/src/Phaser.js index 662b1a94..7e408196 100644 --- a/src/Phaser.js +++ b/src/Phaser.js @@ -1,3 +1,10 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser +*/ + /** * @module Phaser */ diff --git a/src/animation/Animation.js b/src/animation/Animation.js index 90f456cf..c24d6621 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Animation */ @@ -92,7 +92,18 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope */ this._frameIndex = 0; + /** + * @property {number} _frameDiff + * @private + * @default + */ this._frameDiff = 0; + + /** + * @property {number} _frameSkip + * @private + * @default + */ this._frameSkip = 1; /** @@ -108,9 +119,9 @@ Phaser.Animation.prototype = { * Plays this animation. * * @method play - * @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - * @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - * @return {Phaser.Animation} A reference to this Animation instance. + * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. + * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. + * @return {Phaser.Animation} - A reference to this Animation instance. */ play: function (frameRate, loop) { @@ -169,7 +180,7 @@ Phaser.Animation.prototype = { * Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. * * @method stop - * @param {Boolean} [resetFrame=false] If true after the animation stops the currentFrame value will be set to the first frame in this animation. + * @param {boolean} [resetFrame=false] - If true after the animation stops the currentFrame value will be set to the first frame in this animation. */ stop: function (resetFrame) { @@ -287,6 +298,14 @@ Phaser.Animation.prototype = { }; /** + * Sets the paused state of the Animation. + * @param {boolean} value - Set to true to pause the animation or false to resume it if previous paused. + * + *//** + * + * Returns the paused state of the Animation. + * @returns {boolean} + * */ Object.defineProperty(Phaser.Animation.prototype, "paused", { @@ -318,12 +337,14 @@ Object.defineProperty(Phaser.Animation.prototype, "paused", { }); +/** + * + * Returns the total number of frames in this Animation. + * @return {number} + * + */ Object.defineProperty(Phaser.Animation.prototype, "frameTotal", { - /** - * @method frameTotal - * @return {Number} The total number of frames in this animation. - */ get: function () { return this._frames.length; } @@ -369,12 +390,18 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { }); -/* - * Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. - * For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' - * You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); - * The zeroPad value dictates how many zeroes to add in front of the numbers (if any) - */ +/** +* Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. +* For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' +* You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); +* +* @param {string} prefix - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. +* @param {number} min - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1. +* @param {number} max - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34. +* @param {string} [suffix=''] - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. +* @param {number} [zeroPad=0] - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. +* @method generateFrameNames +*/ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { if (typeof suffix == 'undefined') { suffix = ''; } diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 9bee583a..aadfcad6 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -1,75 +1,59 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.Animation +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.AnimationManager */ /** * The AnimationManager is used to add, play and update Phaser Animations. * Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance. * -* @class AnimationManager +* @class Phaser.AnimationManager * @constructor -* @param {Phaser.Sprite} sprite A reference to the Game Object that owns this AnimationManager. +* @param {Phaser.Sprite} sprite - A reference to the Game Object that owns this AnimationManager. */ Phaser.AnimationManager = function (sprite) { /** - * A reference to the parent Sprite that owns this AnimationManager. - * @property sprite - * @public - * @type {Phaser.Sprite} + * @property {Phaser.Sprite} sprite - A reference to the parent Sprite that owns this AnimationManager. */ this.sprite = sprite; /** - * A reference to the currently running Game. - * @property game - * @public - * @type {Phaser.Game} + * @property {Phaser.Game} game - A reference to the currently running Game. */ this.game = sprite.game; - /** - * The currently displayed Frame of animation, if any. - * @property currentFrame - * @public - * @type {Phaser.Animation.Frame} - */ + /** + * @property {Phaser.Animation.Frame} currentFrame - The currently displayed Frame of animation, if any. + * @default + */ this.currentFrame = null; - - /** - * Should the animation data continue to update even if the Sprite.visible is set to false. - * @property updateIfVisible - * @public - * @type {Boolean} - * @default true - */ + + /** + * @property {boolean} updateIfVisible - Should the animation data continue to update even if the Sprite.visible is set to false. + * @default + */ this.updateIfVisible = true; - /** - * A temp. var for holding the currently playing Animations FrameData. - * @property _frameData - * @private - * @type {Phaser.Animation.FrameData} - */ + /** + * @property {Phaser.Animation.FrameData} _frameData - A temp. var for holding the currently playing Animations FrameData. + * @private + * @default + */ this._frameData = null; - /** - * An internal object that stores all of the Animation instances. - * @property _anims - * @private - * @type {Object} - */ + /** + * @property {object} _anims - An internal object that stores all of the Animation instances. + * @private + */ this._anims = {}; - /** - * An internal object to help avoid gc. - * @property _outputFrames - * @private - * @type {Object} - */ + /** + * @property {object} _outputFrames - An internal object to help avoid gc. + * @private + */ this._outputFrames = []; }; @@ -82,7 +66,7 @@ Phaser.AnimationManager.prototype = { * * @method loadFrameData * @private - * @param {Phaser.Animation.FrameData} frameData The FrameData set to load. + * @param {Phaser.Animation.FrameData} frameData - The FrameData set to load. */ loadFrameData: function (frameData) { @@ -96,11 +80,11 @@ Phaser.AnimationManager.prototype = { * Animations added in this way are played back with the play function. * * @method add - * @param {String} name The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". - * @param {Array} [frames=null] An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. - * @param {Number} [frameRate=60] The speed at which the animation should play. The speed is given in frames per second. - * @param {Boolean} [loop=false] {bool} Whether or not the animation is looped or just plays once. - * @param {Boolean} [useNumericIndex=true] Are the given frames using numeric indexes (default) or strings? (false) + * @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". + * @param {Array} [frames=null] - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. + * @param {number} [frameRate=60] - The speed at which the animation should play. The speed is given in frames per second. + * @param {boolean} [loop=false] {boolean} - Whether or not the animation is looped or just plays once. + * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? * @return {Phaser.Animation} The Animation object that was created. */ add: function (name, frames, frameRate, loop, useNumericIndex) { @@ -141,9 +125,9 @@ Phaser.AnimationManager.prototype = { * Check whether the frames in the given array are valid and exist. * * @method validateFrames - * @param {Array} frames An array of frames to be validated. - * @param {Boolean} [useNumericIndex=true] Validate the frames based on their numeric index (true) or string index (false) - * @return {Boolean} True if all given Frames are valid, otherwise false. + * @param {Array} frames - An array of frames to be validated. + * @param {boolean} [useNumericIndex=true] - Validate the frames based on their numeric index (true) or string index (false) + * @return {boolean} True if all given Frames are valid, otherwise false. */ validateFrames: function (frames, useNumericIndex) { @@ -176,9 +160,9 @@ Phaser.AnimationManager.prototype = { * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * * @method play - * @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". - * @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - * @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. + * @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump". + * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. + * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. * @return {Phaser.Animation} A reference to playing Animation instance. */ play: function (name, frameRate, loop) { @@ -206,8 +190,8 @@ Phaser.AnimationManager.prototype = { * The currentAnim property of the AnimationManager is automatically set to the animation given. * * @method stop - * @param {String} [name=null] The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. - * @param {Boolean} [resetFrame=false] When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) + * @param {string} [name=null] - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. + * @param {boolean} [resetFrame=false] - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) */ stop: function (name, resetFrame) { @@ -236,7 +220,7 @@ Phaser.AnimationManager.prototype = { * * @method update * @protected - * @return {Boolean} True if a new animation frame has been set, otherwise false. + * @return {boolean} True if a new animation frame has been set, otherwise false. */ update: function () { @@ -273,24 +257,22 @@ Phaser.AnimationManager.prototype = { }; +/** +* @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation. +*/ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", { - /** - * @method frameData - * @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation. - */ get: function () { return this._frameData; } }); +/** +* @return {number} Returns the total number of frames in the loaded FrameData, or -1 if no FrameData is loaded. +*/ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { - - /** - * @method frameTotal - * @return {Number} Returns the total number of frames in the loaded FrameData, or -1 if no FrameData is loaded. - */ + get: function () { if (this._frameData) @@ -305,6 +287,11 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); +/** +* @return {boolean} Returns the paused state of the current animation. +*//** +* @param {boolean} value - Sets the paused state of the current animation. +*/ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { get: function () { @@ -321,12 +308,13 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { }); +/** +* @return {number} Returns the index of the current frame. +*//** +* @param {number} value - Sets the current frame on the Sprite and updates the texture cache for display. +*/ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { - /** - * @method frame - * @return {Number} Returns the index of the current frame. - */ get: function () { if (this.currentFrame) @@ -336,10 +324,6 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { }, - /** - * @method frame - * @param {Number} value Sets the current frame on the Sprite and updates the texture cache for display. - */ set: function (value) { if (this._frameData && this._frameData.getFrame(value) !== null) @@ -354,12 +338,13 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { }); +/** +* @return {string} Returns the name of the current frame if it has one. +*//** +* @param {string} value - Sets the current frame on the Sprite and updates the texture cache for display. +*/ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { - /** - * @method frameName - * @return {String} Returns the name of the current frame if it has one. - */ get: function () { if (this.currentFrame) @@ -369,10 +354,6 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { }, - /** - * @method frameName - * @param {String} value Sets the current frame on the Sprite and updates the texture cache for display. - */ set: function (value) { if (this._frameData && this._frameData.getFrameByName(value) !== null) diff --git a/src/animation/Frame.js b/src/animation/Frame.js index 35132c13..0ec9e9fa 100644 --- a/src/animation/Frame.js +++ b/src/animation/Frame.js @@ -1,180 +1,124 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.Animation +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Frame */ /** * A Frame is a single frame of an animation and is part of a FrameData collection. * -* @class Frame +* @class Phaser.Animation.Frame * @constructor -* @param {Number} index The index of this Frame within the FrameData set it is being added to. -* @param {Number} x X position of the frame within the texture image. -* @param {Number} y Y position of the frame within the texture image. -* @param {Number} width Width of the frame within the texture image. -* @param {Number} height Height of the frame within the texture image. -* @param {String} name The name of the frame. In Texture Atlas data this is usually set to the filename. -* @param {String} uuid Internal UUID key. +* @param {number} index - The index of this Frame within the FrameData set it is being added to. +* @param {number} x - X position of the frame within the texture image. +* @param {number} y - Y position of the frame within the texture image. +* @param {number} width - Width of the frame within the texture image. +* @param {number} height - Height of the frame within the texture image. +* @param {string} name - The name of the frame. In Texture Atlas data this is usually set to the filename. +* @param {string} uuid - Internal UUID key. */ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { /** - * The index of this Frame within the FrameData set it is being added to. - * @property index - * @public - * @type {Number} + * @property {number} index - The index of this Frame within the FrameData set it is being added to. */ this.index = index; - + /** - * X position within the image to cut from. - * @property x - * @public - * @type {Number} + * @property {number} x - X position within the image to cut from. */ this.x = x; /** - * Y position within the image to cut from. - * @property y - * @public - * @type {Number} + * @property {number} y - Y position within the image to cut from. */ this.y = y; /** - * Width of the frame. - * @property width - * @public - * @type {Number} + * @property {number} width - Width of the frame. */ this.width = width; /** - * Height of the frame. - * @property height - * @public - * @type {Number} + * @property {number} height - Height of the frame. */ this.height = height; /** - * Useful for Texture Atlas files. (is set to the filename value) - * @property name - * @public - * @type {String} + * @property {string} name - Useful for Texture Atlas files (is set to the filename value). */ this.name = name; /** - * A link to the PIXI.TextureCache entry - * @property uuid - * @public - * @type {String} + * @property {string} uuid - A link to the PIXI.TextureCache entry. */ this.uuid = uuid; /** - * center X position within the image to cut from. - * @property centerX - * @public - * @type {Number} + * @property {number} centerX - Center X position within the image to cut from. */ this.centerX = Math.floor(width / 2); /** - * center Y position within the image to cut from. - * @property centerY - * @public - * @type {Number} + * @property {number} centerY - Center Y position within the image to cut from. */ this.centerY = Math.floor(height / 2); /** - * The distance from the top left to the bottom-right of this Frame. - * @property distance - * @public - * @type {Number} + * @property {number} distance - The distance from the top left to the bottom-right of this Frame. */ this.distance = Phaser.Math.distance(0, 0, width, height); /** - * Rotated? (not yet implemented) - * @property rotated - * @public - * @type {Boolean} - * @default false + * @property {bool} rotated - Rotated? (not yet implemented) + * @default */ this.rotated = false; /** - * Either cw or ccw, rotation is always 90 degrees. - * @property rotationDirection - * @public - * @type {String} - * @default "cw" + * @property {string} rotationDirection - Either 'cw' or 'ccw', rotation is always 90 degrees. + * @default 'cw' */ this.rotationDirection = 'cw'; /** - * Was it trimmed when packed? - * @property trimmed - * @public - * @type {Boolean} + * @property {bool} trimmed - Was it trimmed when packed? + * @default */ this.trimmed = false; /** - * Width of the original sprite. - * @property sourceSizeW - * @public - * @type {Number} + * @property {number} sourceSizeW - Width of the original sprite. */ this.sourceSizeW = width; /** - * Height of the original sprite. - * @property sourceSizeH - * @public - * @type {Number} + * @property {number} sourceSizeH - Height of the original sprite. */ this.sourceSizeH = height; /** - * X position of the trimmed sprite inside original sprite. - * @property spriteSourceSizeX - * @public - * @type {Number} - * @default 0 + * @property {number} spriteSourceSizeX - X position of the trimmed sprite inside original sprite. + * @default */ this.spriteSourceSizeX = 0; /** - * Y position of the trimmed sprite inside original sprite. - * @property spriteSourceSizeY - * @public - * @type {Number} - * @default 0 + * @property {number} spriteSourceSizeY - Y position of the trimmed sprite inside original sprite. + * @default */ this.spriteSourceSizeY = 0; /** - * Width of the trimmed sprite. - * @property spriteSourceSizeW - * @public - * @type {Number} - * @default 0 + * @property {number} spriteSourceSizeW - Width of the trimmed sprite. + * @default */ this.spriteSourceSizeW = 0; /** - * Height of the trimmed sprite. - * @property spriteSourceSizeH - * @public - * @type {Number} - * @default 0 + * @property {number} spriteSourceSizeH - Height of the trimmed sprite. + * @default */ this.spriteSourceSizeH = 0; @@ -186,13 +130,13 @@ Phaser.Animation.Frame.prototype = { * If the frame was trimmed when added to the Texture Atlas this records the trim and source data. * * @method setTrim - * @param {Boolean} trimmed If this frame was trimmed or not. - * @param {Number} actualWidth The width of the frame before being trimmed. - * @param {Number} actualHeight The height of the frame before being trimmed. - * @param {Number} destX The destination X position of the trimmed frame for display. - * @param {Number} destY The destination Y position of the trimmed frame for display. - * @param {Number} destWidth The destination width of the trimmed frame for display. - * @param {Number} destHeight The destination height of the trimmed frame for display. + * @param {bool} trimmed - If this frame was trimmed or not. + * @param {number} actualWidth - The width of the frame before being trimmed. + * @param {number} actualHeight - The height of the frame before being trimmed. + * @param {number} destX - The destination X position of the trimmed frame for display. + * @param {number} destY - The destination Y position of the trimmed frame for display. + * @param {number} destWidth - The destination width of the trimmed frame for display. + * @param {number} destHeight - The destination height of the trimmed frame for display. */ setTrim: function (trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight) { diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index b4f5d407..9f57e5dd 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -1,32 +1,29 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.Animation.FrameData +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.FrameData */ /** * FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. * -* @class FrameData +* @class Phaser.Animation.FrameData * @constructor */ Phaser.Animation.FrameData = function () { - /** - * Local array of frames. - * @property _frames - * @private - * @type {Array} - */ + /** + * @property {Array} _frames - Local array of frames. + * @private + */ this._frames = []; - /** - * Local array of frame names for name to index conversions. - * @property _frameNames - * @private - * @type {Array} - */ + + /** + * @property {Array} _frameNames - Local array of frame names for name to index conversions. + * @private + */ this._frameNames = []; }; @@ -37,7 +34,7 @@ Phaser.Animation.FrameData.prototype = { * Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. * * @method addFrame - * @param {Phaser.Animation.Frame} frame The frame to add to this FrameData set. + * @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set. * @return {Phaser.Animation.Frame} The frame that was just added. */ addFrame: function (frame) { @@ -59,7 +56,7 @@ Phaser.Animation.FrameData.prototype = { * Get a Frame by its numerical index. * * @method getFrame - * @param {Number} index The index of the frame you want to get. + * @param {number} index - The index of the frame you want to get. * @return {Phaser.Animation.Frame} The frame, if found. */ getFrame: function (index) { @@ -77,7 +74,7 @@ Phaser.Animation.FrameData.prototype = { * Get a Frame by its frame name. * * @method getFrameByName - * @param {String} name The name of the frame you want to get. + * @param {string} name - The name of the frame you want to get. * @return {Phaser.Animation.Frame} The frame, if found. */ getFrameByName: function (name) { @@ -95,8 +92,8 @@ Phaser.Animation.FrameData.prototype = { * Check if there is a Frame with the given name. * * @method checkFrameName - * @param {String} name The name of the frame you want to check. - * @return {Boolean} True if the frame is found, otherwise false. + * @param {string} name - The name of the frame you want to check. + * @return {boolean} True if the frame is found, otherwise false. */ checkFrameName: function (name) { @@ -113,9 +110,9 @@ Phaser.Animation.FrameData.prototype = { * Returns a range of frames based on the given start and end frame indexes and returns them in an Array. * * @method getFrameRange - * @param {Number} start The starting frame index. - * @param {Number} end The ending frame index. - * @param {Array} [output] Optional array. If given the results will be appended to the end of this Array. + * @param {number} start - The starting frame index. + * @param {number} end - The ending frame index. + * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. * @return {Array} An array of Frames between the start and end index values, or an empty array if none were found. */ getFrameRange: function (start, end, output) { @@ -136,9 +133,9 @@ Phaser.Animation.FrameData.prototype = { * The frames are returned in the output array, or if none is provided in a new Array object. * * @method getFrames - * @param {Array} frames An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. - * @param {Boolean} [useNumericIndex=true] Are the given frames using numeric indexes (default) or strings? (false) - * @param {Array} [output] Optional array. If given the results will be appended to the end of this Array, otherwise a new array is created. + * @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. + * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false) + * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. * @return {Array} An array of all Frames in this FrameData set matching the given names or IDs. */ getFrames: function (frames, useNumericIndex, output) { @@ -183,9 +180,9 @@ Phaser.Animation.FrameData.prototype = { * The frames indexes are returned in the output array, or if none is provided in a new Array object. * * @method getFrameIndexes - * @param {Array} frames An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. - * @param {Boolean} [useNumericIndex=true] Are the given frames using numeric indexes (default) or strings? (false) - * @param {Array} [output] Optional array. If given the results will be appended to the end of this Array, otherwise a new array is created. + * @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. + * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false) + * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. * @return {Array} An array of all Frame indexes matching the given names or IDs. */ getFrameIndexes: function (frames, useNumericIndex, output) { diff --git a/src/animation/Parser.js b/src/animation/Parser.js index 46df1d6a..6341db1c 100644 --- a/src/animation/Parser.js +++ b/src/animation/Parser.js @@ -1,23 +1,26 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Animation.Parser +*/ + /** * Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations. * -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.Animation +* @class Phaser.Animation.Parser */ - Phaser.Animation.Parser = { /** * Parse a Sprite Sheet and extract the animation frame data from it. * * @method spriteSheet - * @param {Phaser.Game} game A reference to the currently running game. - * @param {String} key The Game.Cache asset key of the Sprite Sheet image. - * @param {Number} frameWidth The fixed width of each frame of the animation. If negative, indicates how many columns there are. - * @param {Number} frameHeight The fixed height of each frame of the animation. If negative, indicates how many rows there are. - * @param {Number} [frameMax=-1] The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames". + * @param {Phaser.Game} game - A reference to the currently running game. + * @param {string} key - The Game.Cache asset key of the Sprite Sheet image. + * @param {number} frameWidth - The fixed width of each frame of the animation. + * @param {number} frameHeight - The fixed height of each frame of the animation. + * @param {number} [frameMax=-1] - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames". * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames. */ spriteSheet: function (game, key, frameWidth, frameHeight, frameMax) { @@ -32,14 +35,17 @@ Phaser.Animation.Parser = { var width = img.width; var height = img.height; + if (frameWidth <= 0) { - frameWidth = Math.floor(-width/Math.min(-1, frameWidth)); + frameWidth = Math.floor(-width / Math.min(-1, frameWidth)); } + if (frameHeight <= 0) { - frameHeight = Math.floor(-height/Math.min(-1, frameHeight)); + frameHeight = Math.floor(-height / Math.min(-1, frameHeight)); } + var row = Math.round(width / frameWidth); var column = Math.round(height / frameHeight); var total = row * column; @@ -91,9 +97,9 @@ Phaser.Animation.Parser = { * Parse the JSON data and extract the animation frame data from it. * * @method JSONData - * @param {Phaser.Game} game A reference to the currently running game. - * @param {Object} json The JSON data from the Texture Atlas. Must be in Array format. - * @param {String} cacheKey The Game.Cache asset key of the texture image. + * @param {Phaser.Game} game - A reference to the currently running game. + * @param {Object} json - The JSON data from the Texture Atlas. Must be in Array format. + * @param {string} cacheKey - The Game.Cache asset key of the texture image. * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames. */ JSONData: function (game, json, cacheKey) { @@ -162,9 +168,9 @@ Phaser.Animation.Parser = { * Parse the JSON data and extract the animation frame data from it. * * @method JSONDataHash - * @param {Phaser.Game} game A reference to the currently running game. - * @param {Object} json The JSON data from the Texture Atlas. Must be in JSON Hash format. - * @param {String} cacheKey The Game.Cache asset key of the texture image. + * @param {Phaser.Game} game - A reference to the currently running game. + * @param {Object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format. + * @param {string} cacheKey - The Game.Cache asset key of the texture image. * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames. */ JSONDataHash: function (game, json, cacheKey) { @@ -236,9 +242,9 @@ Phaser.Animation.Parser = { * Parse the XML data and extract the animation frame data from it. * * @method XMLData - * @param {Phaser.Game} game A reference to the currently running game. - * @param {Object} xml The XML data from the Texture Atlas. Must be in Starling XML format. - * @param {String} cacheKey The Game.Cache asset key of the texture image. + * @param {Phaser.Game} game - A reference to the currently running game. + * @param {Object} xml - The XML data from the Texture Atlas. Must be in Starling XML format. + * @param {string} cacheKey - The Game.Cache asset key of the texture image. * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames. */ XMLData: function (game, xml, cacheKey) { diff --git a/src/core/Camera.js b/src/core/Camera.js index e5da9e26..c2ee4286 100644 --- a/src/core/Camera.js +++ b/src/core/Camera.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Camera */ @@ -12,95 +12,71 @@ * * @class Camera * @constructor -* @param {Phaser.Game} game game reference to the currently running game. -* @param {number} id not being used at the moment, will be when Phaser supports multiple camera -* @param {number} x position of the camera on the X axis -* @param {number} y position of the camera on the Y axis -* @param {number} width the width of the view rectangle -* @param {number} height the height of the view rectangle +* @param {Phaser.Game} game - Game reference to the currently running game. +* @param {number} id - Not being used at the moment, will be when Phaser supports multiple camera +* @param {number} x - Position of the camera on the X axis +* @param {number} y - Position of the camera on the Y axis +* @param {number} width - The width of the view rectangle +* @param {number} height - The height of the view rectangle */ Phaser.Camera = function (game, id, x, y, width, height) { - - /** - * A reference to the currently running Game. - * @property game - * @public - * @type {Phaser.Game} - */ + + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; - /** - * A reference to the game world - * @property world - * @public - * @type {Phaser.World} - */ + /** + * @property {Phaser.World} world - A reference to the game world. + */ this.world = game.world; - /** - * reserved for future multiple camera set-ups - * @property id - * @public - * @type {number} - */ + /** + * @property {number} id - Reserved for future multiple camera set-ups. + * @default + */ this.id = 0; - /** - * Camera view. - * The view into the world we wish to render (by default the game dimensions) - * The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render - * Objects outside of this view are not rendered (unless set to ignore the Camera, i.e. UI?) - * @property view - * @public - * @type {Phaser.Rectangle} - */ + /** + * Camera view. + * The view into the world we wish to render (by default the game dimensions). + * The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render. + * Objects outside of this view are not rendered (unless set to ignore the Camera, i.e. UI?). + * @property {Phaser.Rectangle} view + */ this.view = new Phaser.Rectangle(x, y, width, height); /** - * Used by Sprites to work out Camera culling. - * @property screenView - * @public - * @type {Phaser.Rectangle} - */ + * @property {Phaser.Rectangle} screenView - Used by Sprites to work out Camera culling. + */ this.screenView = new Phaser.Rectangle(x, y, width, height); /** - * Sprite moving inside this Rectangle will not cause camera moving. - * @property deadzone - * @type {Phaser.Rectangle} - */ + * @property {Phaser.Rectangle} deadzone - Moving inside this Rectangle will not cause camera moving. + */ this.deadzone = null; - /** - * Whether this camera is visible or not. (default is true) - * @property visible - * @public - * @default true - * @type {bool} - */ + /** + * @property {bool} visible - Whether this camera is visible or not. + * @default + */ this.visible = true; - /** - * Whether this camera is flush with the World Bounds or not. - * @property atLimit - * @type {bool} + /** + * @property {bool} atLimit - Whether this camera is flush with the World Bounds or not. */ this.atLimit = { x: false, y: false }; - /** - * If the camera is tracking a Sprite, this is a reference to it, otherwise null - * @property target - * @public - * @type {Phaser.Sprite} + /** + * @property {Phaser.Sprite} target - If the camera is tracking a Sprite, this is a reference to it, otherwise null. + * @default */ this.target = null; - /** - * Edge property - * @property edge - * @private - * @type {number} + /** + * @property {number} edge - Edge property. Description. + * @default */ this._edge = 0; @@ -117,7 +93,7 @@ Phaser.Camera.prototype = { /** * Tells this camera which sprite to follow. * @method follow - * @param {Phaser.Sprite} target The object you want the camera to track. Set to null to not follow anything. + * @param {Phaser.Sprite} target - The object you want the camera to track. Set to null to not follow anything. * @param {number} [style] Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). */ follow: function (target, style) { @@ -157,8 +133,8 @@ Phaser.Camera.prototype = { /** * Move the camera focus to a location instantly. * @method focusOnXY - * @param {number} x X position. - * @param {number} y Y position. + * @param {number} x - X position. + * @param {number} y - Y position. */ focusOnXY: function (x, y) { @@ -218,7 +194,7 @@ Phaser.Camera.prototype = { }, /** - * Method called to ensure the camera doesn't venture outside of the game world + * Method called to ensure the camera doesn't venture outside of the game world. * @method checkWorldBounds */ checkWorldBounds: function () { @@ -257,11 +233,11 @@ Phaser.Camera.prototype = { /** * A helper function to set both the X and Y properties of the camera at once - * without having to use game.camera.x and game.camera.y + * without having to use game.camera.x and game.camera.y. * * @method setPosition - * @param {number} x X position. - * @param {number} y Y position. + * @param {number} x - X position. + * @param {number} y - Y position. */ setPosition: function (x, y) { @@ -272,11 +248,11 @@ Phaser.Camera.prototype = { }, /** - * Sets the size of the view rectangle given the width and height in parameters + * Sets the size of the view rectangle given the width and height in parameters. * * @method setSize - * @param {number} width The desired width. - * @param {number} height The desired height. + * @param {number} width - The desired width. + * @param {number} height - The desired height. */ setSize: function (width, height) { @@ -287,19 +263,19 @@ Phaser.Camera.prototype = { }; +/** +* Get +* @return {number} The x position. +*//** +* Sets the camera's x position and clamp it if it's outside the world bounds. +* @param {number} value - The x position. +*/ Object.defineProperty(Phaser.Camera.prototype, "x", { - /** - * @method x - * @return {Number} The x position - */ get: function () { return this.view.x; }, - /** - * @method x - * @return {Number} Sets the camera's x position and clamp it if it's outside the world bounds - */ + set: function (value) { this.view.x = value; this.checkWorldBounds(); @@ -307,20 +283,19 @@ Object.defineProperty(Phaser.Camera.prototype, "x", { }); +/** +* Get +* @return {number} The y position. +*//** +* Sets the camera's y position and clamp it if it's outside the world bounds. +* @param {number} value - The y position. +*/ Object.defineProperty(Phaser.Camera.prototype, "y", { - - /** - * @method y - * @return {Number} The y position - */ + get: function () { return this.view.y; }, - /** - * @method y - * @return {Number} Sets the camera's y position and clamp it if it's outside the world bounds - */ set: function (value) { this.view.y = value; this.checkWorldBounds(); @@ -328,40 +303,38 @@ Object.defineProperty(Phaser.Camera.prototype, "y", { }); +/** +* Returns the width of the view rectangle, in pixels. +* @return {number} The width of the view rectangle, in pixels. +*//** +* Sets the width of the view rectangle. +* @param {number} value - Width of the view rectangle. +*/ Object.defineProperty(Phaser.Camera.prototype, "width", { - /** - * @method width - * @return {Number} The width of the view rectangle, in pixels - */ get: function () { return this.view.width; }, - /** - * @method width - * @return {Number} Sets the width of the view rectangle - */ set: function (value) { this.view.width = value; } }); +/** +* Returns the height of the view rectangle, in pixels. +* @return {number} The height of the view rectangle, in pixels. +*//** +* Sets the height of the view rectangle. +* @param {number} value - Height of the view rectangle. +*/ Object.defineProperty(Phaser.Camera.prototype, "height", { - /** - * @method height - * @return {Number} The height of the view rectangle, in pixels - */ get: function () { return this.view.height; }, - /** - * @method height - * @return {Number} Sets the height of the view rectangle - */ set: function (value) { this.view.height = value; } diff --git a/src/core/Game.js b/src/core/Game.js index bf73da33..6492b9d1 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -1,28 +1,27 @@ /** -* Phaser.Game -* -* This is where the magic happens. The Game object is the heart of your game, -* providing quick access to common functions and handling the boot process. -* -* "Hell, there are no rules here - we're trying to accomplish something." -* Thomas A. Edison -* -* @package Phaser.Game -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Game */ /** * Game constructor * * Instantiate a new Phaser.Game object. -* +* @class +* @classdesc This is where the magic happens. The Game object is the heart of your game, +* providing quick access to common functions and handling the boot process. +*

    "Hell, there are no rules here - we're trying to accomplish something."


    +* Thomas A. Edison * @constructor -* @param width {number} The width of your game in game pixels. -* @param height {number} The height of your game in game pixels. -* @param renderer {number} Which renderer to use (canvas or webgl) -* @param parent {string} ID of its parent DOM element. +* @param {number} width - The width of your game in game pixels. +* @param {number} height - The height of your game in game pixels. +* @param {number} renderer -Which renderer to use (canvas or webgl) +* @param {HTMLElement} parent -The Games DOM parent. +* @param {Description} state - Description. +* @param {bool} transparent - Use a transparent canvas background or not. +* @param {bool} antialias - Anti-alias graphics. */ Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias) { @@ -32,205 +31,199 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant parent = parent || ''; state = state || null; if (typeof transparent == 'undefined') { transparent = false; } - antialias = typeof antialias === 'undefined' ? true : antialias; - + if (typeof antialias == 'undefined') { antialias = false; } + /** - * Phaser Game ID (for when Pixi supports multiple instances) - * @type {number} + * @property {number} id - Phaser Game ID (for when Pixi supports multiple instances). */ this.id = Phaser.GAMES.push(this) - 1; /** - * The Games DOM parent. - * @type {HTMLElement} + * @property {HTMLElement} parent - The Games DOM parent. */ this.parent = parent; // Do some more intelligent size parsing here, so they can set "100%" for example, maybe pass the scale mode in here too? /** - * The Game width (in pixels). - * @type {number} + * @property {number} width - The Game width (in pixels). */ this.width = width; /** - * The Game height (in pixels). - * @type {number} + * @property {number} height - The Game height (in pixels). */ this.height = height; /** - * Use a transparent canvas background or not. - * @type {boolean} + * @property {bool} transparent - Use a transparent canvas background or not. */ this.transparent = transparent; /** - * Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality) - * @type {boolean} + * @property {bool} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality). */ this.antialias = antialias; /** - * The Pixi Renderer - * @type {number} + * @property {number} renderer - The Pixi Renderer + * @default */ this.renderer = null; - /** - * The StateManager. - * @type {Phaser.StateManager} - */ + /** + * @property {number} state - The StateManager. + */ this.state = new Phaser.StateManager(this, state); /** - * Is game paused? - * @type {bool} + * @property {bool} _paused - Is game paused? + * @private + * @default */ this._paused = false; /** - * The Renderer this Phaser.Game will use. Either Phaser.RENDERER_AUTO, Phaser.RENDERER_CANVAS or Phaser.RENDERER_WEBGL - * @type {number} + * @property {number} renderType - The Renderer this Phaser.Game will use. Either Phaser.RENDERER_AUTO, Phaser.RENDERER_CANVAS or Phaser.RENDERER_WEBGL. */ this.renderType = renderer; /** - * Whether load complete loading or not. - * @type {bool} + * @property {bool} _loadComplete - Whether load complete loading or not. + * @private + * @default */ this._loadComplete = false; /** - * Whether the game engine is booted, aka available. - * @type {bool} + * @property {bool} isBooted - Whether the game engine is booted, aka available. + * @default */ this.isBooted = false; /** - * Is game running or paused? - * @type {bool} + * @property {bool} id -Is game running or paused? + * @default */ this.isRunning = false; /** - * Automatically handles the core game loop via requestAnimationFrame or setTimeout - * @type {Phaser.RequestAnimationFrame} + * @property {Phaser.RequestAnimationFrame} raf - Automatically handles the core game loop via requestAnimationFrame or setTimeout + * @default */ this.raf = null; - /** - * Reference to the GameObject Factory. - * @type {Phaser.GameObjectFactory} - */ + /** + * @property {Phaser.GameObjectFactory} add - Reference to the GameObject Factory. + * @default + */ this.add = null; /** - * Reference to the assets cache. - * @type {Phaser.Cache} - */ + * @property {Phaser.Cache} cache - Reference to the assets cache. + * @default + */ this.cache = null; /** - * Reference to the input manager - * @type {Phaser.Input} - */ + * @property {Phaser.Input} input - Reference to the input manager + * @default + */ this.input = null; /** - * Reference to the assets loader. - * @type {Phaser.Loader} - */ + * @property {Phaser.Loader} load - Reference to the assets loader. + * @default + */ this.load = null; /** - * Reference to the math helper. - * @type {Phaser.GameMath} - */ + * @property {Phaser.GameMath} math - Reference to the math helper. + * @default + */ this.math = null; /** - * Reference to the network class. - * @type {Phaser.Net} - */ + * @property {Phaser.Net} net - Reference to the network class. + * @default + */ this.net = null; /** - * Reference to the sound manager. - * @type {Phaser.SoundManager} - */ + * @property {Phaser.SoundManager} sound - Reference to the sound manager. + * @default + */ this.sound = null; /** - * Reference to the stage. - * @type {Phaser.Stage} - */ + * @property {Phaser.Stage} stage - Reference to the stage. + * @default + */ this.stage = null; /** - * Reference to game clock. - * @type {Phaser.TimeManager} - */ + * @property {Phaser.TimeManager} time - Reference to game clock. + * @default + */ this.time = null; /** - * Reference to the tween manager. - * @type {Phaser.TweenManager} - */ + * @property {Phaser.TweenManager} tweens - Reference to the tween manager. + * @default + */ this.tweens = null; /** - * Reference to the world. - * @type {Phaser.World} - */ + * @property {Phaser.World} world - Reference to the world. + * @default + */ this.world = null; /** - * Reference to the physics manager. - * @type {Phaser.Physics.PhysicsManager} - */ + * @property {Phaser.Physics.PhysicsManager} physics - Reference to the physics manager. + * @default + */ this.physics = null; /** - * Instance of repeatable random data generator helper. - * @type {Phaser.RandomDataGenerator} - */ + * @property {Phaser.RandomDataGenerator} rnd - Instance of repeatable random data generator helper. + * @default + */ this.rnd = null; /** - * Contains device information and capabilities. - * @type {Phaser.Device} - */ + * @property {Phaser.Device} device - Contains device information and capabilities. + * @default + */ this.device = null; - /** - * A handy reference to world.camera - * @type {Phaser.Camera} + /** + * @property {Phaser.Physics.PhysicsManager} camera - A handy reference to world.camera. + * @default */ this.camera = null; - /** - * A handy reference to renderer.view - * @type {HTMLCanvasElement} + /** + * @property {HTMLCanvasElement} canvas - A handy reference to renderer.view. + * @default */ this.canvas = null; /** - * A handy reference to renderer.context (only set for CANVAS games) - * @type {Context} + * @property {Context} context - A handy reference to renderer.context (only set for CANVAS games) + * @default */ this.context = null; - /** - * A set of useful debug utilities - * @type {Phaser.Utils.Debug} + /** + * @property {Phaser.Utils.Debug} debug - A set of useful debug utilitie. + * @default */ this.debug = null; /** - * The Particle Manager - * @type {Phaser.Particles} + * @property {Phaser.Particles} particles - The Particle Manager. + * @default */ this.particles = null; @@ -258,9 +251,8 @@ Phaser.Game.prototype = { /** * Initialize engine sub modules and start the game. - * @param parent {string} ID of parent Dom element. - * @param width {number} Width of the game screen. - * @param height {number} Height of the game screen. + * + * @method boot */ boot: function () { @@ -336,7 +328,12 @@ Phaser.Game.prototype = { } }, - + + /** + * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. + * + * @method setUpRenderer + */ setUpRenderer: function () { if (this.renderType === Phaser.CANVAS || (this.renderType === Phaser.AUTO && this.device.webGL == false)) @@ -370,6 +367,8 @@ Phaser.Game.prototype = { /** * Called when the load has finished, after preload was run. + * + * @method loadComplete */ loadComplete: function () { @@ -379,6 +378,12 @@ Phaser.Game.prototype = { }, + /** + * The core game loop. + * + * @method update + * @param {number} time - The current time as provided by RequestAnimationFrame. + */ update: function (time) { this.time.update(time); @@ -409,6 +414,8 @@ Phaser.Game.prototype = { /** * Nuke the entire game from orbit + * + * @method destroy */ destroy: function () { @@ -428,6 +435,13 @@ Phaser.Game.prototype = { }; +/** +* Get +* @returns {boolean} - The paused state of the game. +*//** +* Set +* @param {boolean} value - Put the game into a paused state or resume it. A paused game doesn't call any of the subsystems. +*/ Object.defineProperty(Phaser.Game.prototype, "paused", { get: function () { diff --git a/src/core/Group.js b/src/core/Group.js index 62910ffd..4e17ff85 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -1,3 +1,21 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Group +*/ + +/** +* Phaser Group constructor. +* @class Phaser.Group +* @classdesc An Animation instance contains a single animation and the controls to play it. +* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Description} parent - Description. +* @param {string} name - The unique name for this animation, used in playback commands. +* @param {bool} useStage - Description. +*/ Phaser.Group = function (game, parent, name, useStage) { parent = parent || null; @@ -7,7 +25,14 @@ Phaser.Group = function (game, parent, name, useStage) { useStage = false; } + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; + + /** + * @property {Phaser.Game} name - Description. + */ this.name = name || 'group'; if (useStage) @@ -36,19 +61,35 @@ Phaser.Group = function (game, parent, name, useStage) { } } + /** + * @property {Description} type - Description. + */ this.type = Phaser.GROUP; + /** + * @property {bool} exists - Description. + * @default + */ this.exists = true; - /** - * Helper for sort. - */ + /** + * @property {string} _sortIndex - Helper for sort. + * @private + * @default + */ this._sortIndex = 'y'; }; Phaser.Group.prototype = { + /** + * Description. + * + * @method add + * @param {Description} child - Description. + * @return {Description} Description. + */ add: function (child) { if (child.group !== this) @@ -67,6 +108,14 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method addAt + * @param {Description} child - Description. + * @param {Description} index - Description. + * @return {Description} Description. + */ addAt: function (child, index) { if (child.group !== this) @@ -85,12 +134,30 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method getAt + * @param {Description} index - Description. + * @return {Description} Description. + */ getAt: function (index) { return this._container.getChildAt(index); }, + /** + * Description. + * + * @method create + * @param {number} x - Description. + * @param {number} y - Description. + * @param {string} key - Description. + * @param {string} [frame] - Description. + * @param {boolean} [exists] - Description. + * @return {Description} Description. + */ create: function (x, y, key, frame, exists) { if (typeof exists == 'undefined') { exists = true; } @@ -111,6 +178,14 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method swap + * @param {Description} child1 - Description. + * @param {Description} child2 - Description. + * @return {bool} Description. + */ swap: function (child1, child2) { if (child1 === child2 || !child1.parent || !child2.parent) @@ -231,6 +306,13 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method bringToTop + * @param {Description} child - Description. + * @return {Description} Description. + */ bringToTop: function (child) { if (child.group === this) @@ -243,12 +325,26 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method getIndex + * @param {Description} child - Description. + * @return {Description} Description. + */ getIndex: function (child) { return this._container.children.indexOf(child); }, + /** + * Description. + * + * @method replace + * @param {Description} oldChild - Description. + * @param {Description} newChild - Description. + */ replace: function (oldChild, newChild) { if (!this._container.first._iNext) @@ -273,7 +369,16 @@ Phaser.Group.prototype = { }, - // key is an ARRAY of values. + /** + * Description. + * + * @method setProperty + * @param {Description} child - Description. + * @param {array} key - An array of values that will be set. + * @param {Description} value - Description. + * @param {Description} operation - Description. + * @return {number} An integer value: -1 (Obj1 before Obj2), 0 (same), or 1 (Obj1 after Obj2). (TODO) + */ setProperty: function (child, key, value, operation) { operation = operation || 0; @@ -327,11 +432,23 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method setAll + * @param {Description} key - Description. + * @param {Description} value - Description. + * @param {Description} checkAlive - Description. + * @param {Description} checkVisible - Description. + * @param {Description} operation - Description. + */ setAll: function (key, value, checkAlive, checkVisible, operation) { key = key.split('.'); - checkAlive = checkAlive || false; - checkVisible = checkVisible || false; + + if (typeof checkAlive === 'undefined') { checkAlive = false; } + if (typeof checkVisible === 'undefined') { checkVisible = false; } + operation = operation || 0; if (this._container.children.length > 0 && this._container.first._iNext) @@ -352,33 +469,82 @@ Phaser.Group.prototype = { }, - addAll: function (key, value, checkAlive, checkVisible) { + /** + * Adds the amount to the given property on all children in this Group. + * Group.addAll('x', 10) will add 10 to the child.x value. + * + * @method addAll + * @param {string} property - The property to increment, for example 'body.velocity.x' or 'angle'. + * @param {number} amount - The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. + * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. + * @param {boolean} checkVisible - If true the property will only be changed if the child is visible. + */ + addAll: function (property, amount, checkAlive, checkVisible) { - this.setAll(key, value, checkAlive, checkVisible, 1); + this.setAll(property, amount, checkAlive, checkVisible, 1); }, - subAll: function (key, value, checkAlive, checkVisible) { + /** + * Subtracts the amount from the given property on all children in this Group. + * Group.subAll('x', 10) will minus 10 from the child.x value. + * + * @method subAll + * @param {string} property - The property to decrement, for example 'body.velocity.x' or 'angle'. + * @param {number} amount - The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. + * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. + * @param {boolean} checkVisible - If true the property will only be changed if the child is visible. + */ + subAll: function (property, amount, checkAlive, checkVisible) { - this.setAll(key, value, checkAlive, checkVisible, 2); + this.setAll(property, amount, checkAlive, checkVisible, 2); }, - multiplyAll: function (key, value, checkAlive, checkVisible) { + /** + * Multiplies the given property by the amount on all children in this Group. + * Group.multiplyAll('x', 2) will x2 the child.x value. + * + * @method multiplyAll + * @param {string} property - The property to multiply, for example 'body.velocity.x' or 'angle'. + * @param {number} amount - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. + * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. + * @param {boolean} checkVisible - If true the property will only be changed if the child is visible. + */ + multiplyAll: function (property, amount, checkAlive, checkVisible) { - this.setAll(key, value, checkAlive, checkVisible, 3); + this.setAll(property, amount, checkAlive, checkVisible, 3); }, - divideAll: function (key, value, checkAlive, checkVisible) { + /** + * Divides the given property by the amount on all children in this Group. + * Group.divideAll('x', 2) will half the child.x value. + * + * @method divideAll + * @param {string} property - The property to divide, for example 'body.velocity.x' or 'angle'. + * @param {number} amount - The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. + * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. + * @param {boolean} checkVisible - If true the property will only be changed if the child is visible. + */ + divideAll: function (property, amount, checkAlive, checkVisible) { - this.setAll(key, value, checkAlive, checkVisible, 4); + this.setAll(property, amount, checkAlive, checkVisible, 4); }, - callAllExists: function (callback, callbackContext, existsValue) { + /** + * Calls a function on all of the children that have exists=true in this Group. + * After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. + * + * @method callAllExists + * @param {function} callback - The function that exists on the children that will be called. + * @param {boolean} existsValue - Only children with exists=existsValue will be called. + * @param {...*} parameter - Additional parameters that will be passed to the callback. + */ + callAllExists: function (callback, existsValue) { - var args = Array.prototype.splice.call(arguments, 3); + var args = Array.prototype.splice.call(arguments, 2); if (this._container.children.length > 0 && this._container.first._iNext) { @@ -401,7 +567,11 @@ Phaser.Group.prototype = { /** * Calls a function on all of the children regardless if they are dead or alive (see callAllExists if you need control over that) - * After the function you can add as many parameters as you like, which will all be passed to the child. + * After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child. + * + * @method callAll + * @param {function} callback - The function that exists on the children that will be called. + * @param {...*} parameter - Additional parameters that will be passed to the callback. */ callAll: function (callback) { @@ -426,7 +596,15 @@ Phaser.Group.prototype = { }, - // After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. + /** + * Description. + * After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. + * + * @method forEach + * @param {Description} callback - Description. + * @param {Description} callbackContext - Description. + * @param {bool} checkExists - Description. + */ forEach: function (callback, callbackContext, checkExists) { if (typeof checkExists === 'undefined') @@ -457,6 +635,13 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method forEachAlive + * @param {Description} callback - Description. + * @param {Description} callbackContext - Description. + */ forEachAlive: function (callback, callbackContext) { var args = Array.prototype.splice.call(arguments, 2); @@ -482,6 +667,13 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method forEachDead + * @param {Description} callback - Description. + * @param {Description} callbackContext - Description. + */ forEachDead: function (callback, callbackContext) { var args = Array.prototype.splice.call(arguments, 2); @@ -509,6 +701,8 @@ Phaser.Group.prototype = { /** * Call this function to retrieve the first object with exists == (the given state) in the group. * + * @method getFirstExists + * @param {Description} state - Description. * @return {Any} The first child, or null if none found. */ getFirstExists: function (state) { @@ -542,6 +736,7 @@ Phaser.Group.prototype = { * Call this function to retrieve the first object with alive == true in the group. * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * + * @method getFirstAlive * @return {Any} The first alive child, or null if none found. */ getFirstAlive: function () { @@ -570,6 +765,7 @@ Phaser.Group.prototype = { * Call this function to retrieve the first object with alive == false in the group. * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * + * @method getFirstDead * @return {Any} The first dead child, or null if none found. */ getFirstDead: function () { @@ -597,6 +793,7 @@ Phaser.Group.prototype = { /** * Call this function to find out how many members of the group are alive. * + * @method countLiving * @return {number} The number of children flagged as alive. Returns -1 if Group is empty. */ countLiving: function () { @@ -626,6 +823,7 @@ Phaser.Group.prototype = { /** * Call this function to find out how many members of the group are dead. * + * @method countDead * @return {number} The number of children flagged as dead. Returns -1 if Group is empty. */ countDead: function () { @@ -655,9 +853,8 @@ Phaser.Group.prototype = { /** * Returns a member at random from the group. * - * @param {number} startIndex Optional offset off the front of the array. Default value is 0, or the beginning of the array. - * @param {number} length Optional restriction on the number of values you want to randomly select from. - * + * @param {number} startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. + * @param {number} length - Optional restriction on the number of values you want to randomly select from. * @return {Any} A random child of this Group. */ getRandom: function (startIndex, length) { @@ -674,6 +871,12 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method remove + * @param {Description} child - Description. + */ remove: function (child) { child.events.onRemovedFromGroup.dispatch(child, this); @@ -682,6 +885,11 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method removeAll + */ removeAll: function () { if (this._container.children.length == 0) @@ -701,6 +909,13 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method removeBetween + * @param {Description} startIndex - Description. + * @param {Description} endIndex - Description. + */ removeBetween: function (startIndex, endIndex) { if (this._container.children.length == 0) @@ -722,6 +937,11 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method destroy + */ destroy: function () { this.removeAll(); @@ -736,6 +956,11 @@ Phaser.Group.prototype = { }, + /** + * Description. + * + * @method dump + */ dump: function (full) { if (typeof full == 'undefined') @@ -822,6 +1047,11 @@ Phaser.Group.prototype = { }; + +/** +* Get +* @return {Description} +*/ Object.defineProperty(Phaser.Group.prototype, "length", { get: function () { @@ -830,6 +1060,13 @@ Object.defineProperty(Phaser.Group.prototype, "length", { }); +/** +* Get +* @return {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Group.prototype, "x", { get: function () { @@ -842,6 +1079,13 @@ Object.defineProperty(Phaser.Group.prototype, "x", { }); +/** +* Get +* @return {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Group.prototype, "y", { get: function () { @@ -854,6 +1098,13 @@ Object.defineProperty(Phaser.Group.prototype, "y", { }); +/** +* Get +* @return {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Group.prototype, "angle", { get: function() { @@ -866,6 +1117,13 @@ Object.defineProperty(Phaser.Group.prototype, "angle", { }); +/** +* Get +* @return {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Group.prototype, "rotation", { get: function () { @@ -878,6 +1136,13 @@ Object.defineProperty(Phaser.Group.prototype, "rotation", { }); +/** +* Get +* @return {Description} +*//** +* Set +* @param {Description} value - Description. +*/ Object.defineProperty(Phaser.Group.prototype, "visible", { get: function () { diff --git a/src/core/LinkedList.js b/src/core/LinkedList.js index 23eb1d1c..8f440aff 100644 --- a/src/core/LinkedList.js +++ b/src/core/LinkedList.js @@ -1,16 +1,59 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.LinkedList +*/ + +/** +* A linked list data structure. +* +* @class Phaser.LinkedList +* @constructor +*/ Phaser.LinkedList = function () { + /** + * @property {object} next - Next element in the list. + * @default + */ this.next = null; + + /** + * @property {object} prev - Previous element in the list. + * @default + */ this.prev = null; + + /** + * @property {object} first - First element in the list. + * @default + */ this.first = null; + + /** + * @property {object} last - Last element in the list. + * @default + */ this.last = null; + + /** + * @property {object} game - Number of elements in the list. + * @default + */ this.total = 0; }; Phaser.LinkedList.prototype = { - + /** + * Add element to a linked list. + * + * @method add + * @param {object} child - Description. + * @return {object} Description. + */ add: function (child) { // If the list is empty @@ -37,6 +80,12 @@ Phaser.LinkedList.prototype = { }, + /** + * Remove element from a linked list. + * + * @method remove + * @param {object} child - Description. + */ remove: function (child) { if( this.first ) { child.next = this.last.next; @@ -53,6 +102,12 @@ Phaser.LinkedList.prototype = { this.total--; }, + /** + * Description. + * + * @method callAll + * @param {object} callback - Description. + */ callAll: function (callback) { if (!this.first || !this.last) @@ -76,6 +131,11 @@ Phaser.LinkedList.prototype = { }, + /** + * Description. + * + * @method dump + */ dump: function () { var spacing = 20; diff --git a/src/core/Plugin.js b/src/core/Plugin.js index ef1a967a..4b5374d3 100644 --- a/src/core/Plugin.js +++ b/src/core/Plugin.js @@ -1,19 +1,67 @@ /** -* Phaser - Plugin -* -* This is a base Plugin template to use for any Phaser plugin development +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Plugin +*/ + + +/** +* This is a base Plugin template to use for any Phaser plugin development. +* +* @class Phaser.Plugin +* @classdesc Phaser - Plugin +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Description} parent - Description. +* */ Phaser.Plugin = function (game, parent) { + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + + /** + * @property {Description} parent - Description. + */ this.parent = parent; + /** + * @property {bool} active - Description. + * @default + */ this.active = false; + + /** + * @property {bool} visible - Description. + * @default + */ this.visible = false; + /** + * @property {bool} hasPreUpdate - Description. + * @default + */ this.hasPreUpdate = false; + + /** + * @property {bool} hasUpdate - Description. + * @default + */ this.hasUpdate = false; + + /** + * @property {bool} hasRender - Description. + * @default + */ this.hasRender = false; + + /** + * @property {bool} hasPostRender - Description. + * @default + */ this.hasPostRender = false; }; diff --git a/src/core/PluginManager.js b/src/core/PluginManager.js index a4074f7a..0e7558b1 100644 --- a/src/core/PluginManager.js +++ b/src/core/PluginManager.js @@ -1,14 +1,44 @@ /** -* Phaser - PluginManager -* -* TODO: We can optimise this a lot by using separate hashes per function (update, render, etc) +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.PluginManager */ + +// TODO: We can optimise this a lot by using separate hashes per function (update, render, etc) +/** +* Description. +* +* @class Phaser.PluginManager +* @classdesc PPhaser - PluginManager +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Description} parent - Description. +*/ Phaser.PluginManager = function(game, parent) { + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + + /** + * @property {Description} _parent - Description. + * @private + */ this._parent = parent; + + /** + * @property {array} plugins - Description. + */ this.plugins = []; + + /** + * @property {array} _pluginsLength - Description. + * @private + * @default + */ this._pluginsLength = 0; }; @@ -17,8 +47,9 @@ Phaser.PluginManager.prototype = { /** * Add a new Plugin to the PluginManager. - * The plugins game and parent reference are set to this game and pluginmanager parent. - * @type {Phaser.Plugin} + * The plugin's game and parent reference are set to this game and pluginmanager parent. + * @param {Phaser.Plugin} plugin - Description. + * @return {Phaser.Plugin} Description. */ add: function (plugin) { @@ -82,6 +113,10 @@ Phaser.PluginManager.prototype = { } }, + /** + * Remove a Plugin from the PluginManager. + * @param {Phaser.Plugin} plugin - Description. + */ remove: function (plugin) { // TODO @@ -89,6 +124,11 @@ Phaser.PluginManager.prototype = { }, + /** + * Description. + * + * @method preUpdate + */ preUpdate: function () { if (this._pluginsLength == 0) @@ -106,6 +146,11 @@ Phaser.PluginManager.prototype = { }, + /** + * Description. + * + * @method update + */ update: function () { if (this._pluginsLength == 0) @@ -123,6 +168,11 @@ Phaser.PluginManager.prototype = { }, + /** + * Description. + * + * @method render + */ render: function () { if (this._pluginsLength == 0) @@ -140,6 +190,11 @@ Phaser.PluginManager.prototype = { }, + /** + * Description. + * + * @method postRender + */ postRender: function () { if (this._pluginsLength == 0) @@ -157,6 +212,11 @@ Phaser.PluginManager.prototype = { }, + /** + * Description. + * + * @method destroy + */ destroy: function () { this.plugins.length = 0; diff --git a/src/core/Signal.js b/src/core/Signal.js index cc5f4383..5502d0ec 100644 --- a/src/core/Signal.js +++ b/src/core/Signal.js @@ -1,23 +1,40 @@ /** -* Phaser.Signal -* +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Signal +*/ + + +/** +* * A Signal is used for object communication via a custom broadcaster instead of Events. * +* @class Phaser.Signal +* @classdesc Phaser Signal * @author Miller Medeiros http://millermedeiros.github.com/js-signals/ * @constructor */ Phaser.Signal = function () { /** - * @type Array. - * @private - */ + * @property {Array.} _bindings - Description. + * @private + */ this._bindings = []; + + /** + * @property {Description} _prevParams - Description. + * @private + */ this._prevParams = null; // enforce dispatch to aways work on same context (#47) var self = this; + /** + * @property {Description} dispatch - Description. + */ this.dispatch = function(){ Phaser.Signal.prototype.dispatch.apply(self, arguments); }; @@ -27,26 +44,35 @@ Phaser.Signal = function () { Phaser.Signal.prototype = { /** - * If Signal should keep record of previously dispatched parameters and - * automatically execute listener during `add()`/`addOnce()` if Signal was - * already dispatched before. - * @type boolean - */ + * If Signal should keep record of previously dispatched parameters and + * automatically execute listener during `add()`/`addOnce()` if Signal was + * already dispatched before. + * @property {bool} memorize + */ memorize: false, /** - * @type boolean - * @private - */ + * Description. + * @property {bool} _shouldPropagate + * @private + */ _shouldPropagate: true, /** - * If Signal is active and should broadcast events. - *

    IMPORTANT: Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.

    - * @type boolean - */ + * If Signal is active and should broadcast events. + *

    IMPORTANT: Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.

    + * @property {bool} active + * @default + */ active: true, + /** + * Description. + * + * @method validateListener + * @param {function} listener - Signal handler function. + * @param {Description} fnName - Description. + */ validateListener: function (listener, fnName) { if (typeof listener !== 'function') { throw new Error( 'listener is a required param of {fn}() and should be a Function.'.replace('{fn}', fnName) ); @@ -54,11 +80,14 @@ Phaser.Signal.prototype = { }, /** - * @param {Function} listener - * @param {boolean} isOnce - * @param {Object} [listenerContext] - * @param {Number} [priority] - * @return {Phaser.SignalBinding} + * Description. + * + * @method _registerListener + * @param {function} listener - Signal handler function. + * @param {bool} isOnce - Description. + * @param {object} [listenerContext] - Description. + * @param {number} [priority] - The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0). + * @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener. * @private */ _registerListener: function (listener, isOnce, listenerContext, priority) { @@ -84,7 +113,10 @@ Phaser.Signal.prototype = { }, /** - * @param {Phaser.SignalBinding} binding + * Description. + * + * @method _addBinding + * @param {Phaser.SignalBinding} binding - An Object representing the binding between the Signal and listener. * @private */ _addBinding: function (binding) { @@ -95,8 +127,11 @@ Phaser.Signal.prototype = { }, /** - * @param {Function} listener - * @return {number} + * Description. + * + * @method _indexOfListener + * @param {function} listener - Signal handler function. + * @return {number} Description. * @private */ _indexOfListener: function (listener, context) { @@ -113,9 +148,11 @@ Phaser.Signal.prototype = { /** * Check if listener was attached to Signal. - * @param {Function} listener - * @param {Object} [context] - * @return {boolean} if Signal has the specified listener. + * + * @method has + * @param {Function} listener - Signal handler function. + * @param {Object} [context] - Context on which listener will be executed (object that should represent the `this` variable inside listener function). + * @return {bool} If Signal has the specified listener. */ has: function (listener, context) { return this._indexOfListener(listener, context) !== -1; @@ -123,9 +160,11 @@ Phaser.Signal.prototype = { /** * Add a listener to the signal. - * @param {Function} listener Signal handler function. - * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) + * + * @method add + * @param {function} listener - Signal handler function. + * @param {object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). + * @param {number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0). * @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener. */ add: function (listener, listenerContext, priority) { @@ -134,23 +173,23 @@ Phaser.Signal.prototype = { }, /** - * Add listener to the signal that should be removed after first execution (will be executed only once). - * @param {Function} listener Signal handler function. - * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) - * @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener. - */ + * Add listener to the signal that should be removed after first execution (will be executed only once). + * @param {function} listener Signal handler function. + * @param {object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). + * @param {number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) + * @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener. + */ addOnce: function (listener, listenerContext, priority) { this.validateListener(listener, 'addOnce'); return this._registerListener(listener, true, listenerContext, priority); }, /** - * Remove a single listener from the dispatch queue. - * @param {Function} listener Handler function that should be removed. - * @param {Object} [context] Execution context (since you can add the same handler multiple times if executing in a different context). - * @return {Function} Listener handler function. - */ + * Remove a single listener from the dispatch queue. + * @param {function} listener Handler function that should be removed. + * @param {object} [context] Execution context (since you can add the same handler multiple times if executing in a different context). + * @return {function} Listener handler function. + */ remove: function (listener, context) { this.validateListener(listener, 'remove'); @@ -163,8 +202,8 @@ Phaser.Signal.prototype = { }, /** - * Remove all listeners from the Signal. - */ + * Remove all listeners from the Signal. + */ removeAll: function () { var n = this._bindings.length; while (n--) { @@ -174,25 +213,25 @@ Phaser.Signal.prototype = { }, /** - * @return {number} Number of listeners attached to the Signal. - */ + * @return {number} Number of listeners attached to the Signal. + */ getNumListeners: function () { return this._bindings.length; }, /** - * Stop propagation of the event, blocking the dispatch to next listeners on the queue. - *

    IMPORTANT: should be called only during signal dispatch, calling it before/after dispatch won't affect signal broadcast.

    - * @see Signal.prototype.disable - */ + * Stop propagation of the event, blocking the dispatch to next listeners on the queue. + *

    IMPORTANT: should be called only during signal dispatch, calling it before/after dispatch won't affect signal broadcast.

    + * @see Signal.prototype.disable + */ halt: function () { this._shouldPropagate = false; }, /** - * Dispatch/Broadcast Signal to all listeners added to the queue. - * @param {...*} [params] Parameters that should be passed to each handler. - */ + * Dispatch/Broadcast Signal to all listeners added to the queue. + * @param {Description} [params] - Parameters that should be passed to each handler. + */ dispatch: function (params) { if (! this.active) { return; diff --git a/src/core/SignalBinding.js b/src/core/SignalBinding.js index 3617838d..e61b31a2 100644 --- a/src/core/SignalBinding.js +++ b/src/core/SignalBinding.js @@ -1,3 +1,11 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.SignalBinding +*/ + + /** * Phaser.SignalBinding * @@ -5,52 +13,47 @@ *
    - This is an internal constructor and shouldn't be called by regular users. *
    - inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes. * +* @class Phaser.SignalBinding +* @name SignalBinding * @author Miller Medeiros http://millermedeiros.github.com/js-signals/ * @constructor -* @internal -* @name SignalBinding -* @param {Signal} signal Reference to Signal object that listener is currently bound to. -* @param {Function} listener Handler function bound to the signal. -* @param {boolean} isOnce If binding should be executed just once. -* @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). -* @param {Number} [priority] The priority level of the event listener. (default = 0). +* @inner +* @param {Signal} signal - Reference to Signal object that listener is currently bound to. +* @param {function} listener - Handler function bound to the signal. +* @param {bool} isOnce - If binding should be executed just once. +* @param {object} [listenerContext] - Context on which listener will be executed (object that should represent the `this` variable inside listener function). +* @param {number} [priority] - The priority level of the event listener. (default = 0). */ Phaser.SignalBinding = function (signal, listener, isOnce, listenerContext, priority) { /** - * Handler function bound to the signal. - * @type Function - * @private - */ + * @property {Phaser.Game} _listener - Handler function bound to the signal. + * @private + */ this._listener = listener; /** - * If binding should be executed just once. - * @type boolean - * @private - */ + * @property {bool} _isOnce - If binding should be executed just once. + * @private + */ this._isOnce = isOnce; /** - * Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @memberOf SignalBinding.prototype - * @name context - * @type Object|undefined|null - */ + * @property {object|undefined|null} context - Context on which listener will be executed (object that should represent the `this` variable inside listener function). + * @memberOf SignalBinding.prototype + */ this.context = listenerContext; /** - * Reference to Signal object that listener is currently bound to. - * @type Signal - * @private - */ + * @property {Signal} _signal - Reference to Signal object that listener is currently bound to. + * @private + */ this._signal = signal; /** - * Listener priority - * @type Number - * @private - */ + * @property {number} _priority - Listener priority. + * @private + */ this._priority = priority || 0; }; @@ -58,23 +61,26 @@ Phaser.SignalBinding = function (signal, listener, isOnce, listenerContext, prio Phaser.SignalBinding.prototype = { /** - * If binding is active and should be executed. - * @type boolean - */ + * If binding is active and should be executed. + * @property {bool} active + * @default + */ active: true, /** - * Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute`. (curried parameters) - * @type Array|null - */ + * Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute` (curried parameters). + * @property {array|null} params + * @default + */ params: null, /** - * Call listener passing arbitrary parameters. - *

    If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

    - * @param {Array} [paramsArr] Array of parameters that should be passed to the listener - * @return {*} Value returned by the listener. - */ + * Call listener passing arbitrary parameters. + *

    If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

    + * @method execute + * @param {array} [paramsArr] - Array of parameters that should be passed to the listener. + * @return {Description} Value returned by the listener. + */ execute: function (paramsArr) { var handlerReturn, params; @@ -95,46 +101,52 @@ Phaser.SignalBinding.prototype = { }, /** - * Detach binding from signal. - * - alias to: mySignal.remove(myBinding.getListener()); - * @return {Function|null} Handler function bound to the signal or `null` if binding was previously detached. - */ + * Detach binding from signal. + *

    alias to: @see mySignal.remove(myBinding.getListener()); + * @method detach + * @return {function|null} Handler function bound to the signal or `null` if binding was previously detached. + */ detach: function () { return this.isBound() ? this._signal.remove(this._listener, this.context) : null; }, /** - * @return {Boolean} `true` if binding is still bound to the signal and have a listener. - */ + * @method isBound + * @return {bool} True if binding is still bound to the signal and has a listener. + */ isBound: function () { return (!!this._signal && !!this._listener); }, /** - * @return {boolean} If SignalBinding will only be executed once. - */ + * @method isOnce + * @return {bool} If SignalBinding will only be executed once. + */ isOnce: function () { return this._isOnce; }, /** - * @return {Function} Handler function bound to the signal. - */ + * @method getListener + * @return {Function} Handler function bound to the signal. + */ getListener: function () { return this._listener; }, /** - * @return {Signal} Signal that listener is currently bound to. - */ + * @method getSignal + * @return {Signal} Signal that listener is currently bound to. + */ getSignal: function () { return this._signal; }, /** - * Delete instance properties - * @private - */ + * @method _destroy + * Delete instance properties + * @private + */ _destroy: function () { delete this._signal; delete this._listener; @@ -142,8 +154,9 @@ Phaser.SignalBinding.prototype = { }, /** - * @return {string} String representation of the object. - */ + * @method toString + * @return {string} String representation of the object. + */ toString: function () { return '[Phaser.SignalBinding isOnce:' + this._isOnce +', isBound:'+ this.isBound() +', active:' + this.active + ']'; } diff --git a/src/core/Stage.js b/src/core/Stage.js index c4deb68c..269243b2 100644 --- a/src/core/Stage.js +++ b/src/core/Stage.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Stage */ @@ -12,76 +12,55 @@ * * @class Stage * @constructor -* @param {Phaser.Game} game Game reference to the currently running game. -* @param {number} width Width of the canvas element -* @param {number} height Height of the canvas element +* @param {Phaser.Game} game - Game reference to the currently running game. +* @param {number} width - Width of the canvas element. +* @param {number} height - Height of the canvas element. */ Phaser.Stage = function (game, width, height) { - /** - * A reference to the currently running Game. - * @property game - * @public - * @type {Phaser.Game} - */ + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; /** - * Background color of the stage (defaults to black). Set via the public backgroundColor property. - * @property _backgroundColor - * @private - * @type {string} - */ + * @property {string} game - Background color of the stage (defaults to black). Set via the public backgroundColor property. + * @private + * @default 'rgb(0,0,0)' + */ this._backgroundColor = 'rgb(0,0,0)'; /** - * Get the offset values (for input and other things) - * @property offset - * @public - * @type {Phaser.Point} - */ + * @property {Phaser.Point} offset - Get the offset values (for input and other things). + */ this.offset = new Phaser.Point; /** - * reference to the newly created element - * @property canvas - * @public - * @type {HTMLCanvasElement} + * @property {HTMLCanvasElement} canvas - Reference to the newly created <canvas> element. */ - this.canvas = Phaser.Canvas.create(width, height); + this.canvas = Phaser.Canvas.create(width, height); this.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%'; /** - * The Pixi Stage which is hooked to the renderer - * @property _stage + * @property {PIXI.Stage} _stage - The Pixi Stage which is hooked to the renderer. * @private - * @type {PIXI.Stage} */ this._stage = new PIXI.Stage(0x000000, false); this._stage.name = '_stage_root'; /** - * The current scaleMode - * @property scaleMode - * @public - * @type {number} - */ + * @property {number} scaleMode - The current scaleMode. + */ this.scaleMode = Phaser.StageScaleMode.NO_SCALE; /** - * The scale of the current running game - * @property scale - * @public - * @type {Phaser.StageScaleMode} + * @property {Phaser.StageScaleMode} scale - The scale of the current running game. */ this.scale = new Phaser.StageScaleMode(this.game, width, height); /** - * aspect ratio - * @property aspectRatio - * @public - * @type {number} - */ + * @property {number} aspectRatio - Aspect ratio. + */ this.aspectRatio = width / height; }; @@ -89,7 +68,7 @@ Phaser.Stage = function (game, width, height) { Phaser.Stage.prototype = { /** - * Initialises the stage and adds the event listeners + * Initialises the stage and adds the event listeners. * @method boot */ boot: function () { @@ -120,7 +99,7 @@ Phaser.Stage.prototype = { /** * This method is called when the document visibility is changed. * @method visibilityChange - * @param {Event} event Its type will be used to decide whether the game should be paused or not + * @param {Event} event - Its type will be used to decide whether the game should be paused or not. */ visibilityChange: function (event) { @@ -144,21 +123,19 @@ Phaser.Stage.prototype = { }; +/** +* Get +* @returns {string} Returns the background color of the stage. +*//** +* Set +* @param {string} The background color you want the stage to have +*/. Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", { - /** - * @method backgroundColor - * @return {string} returns the background color of the stage - */ get: function () { return this._backgroundColor; }, - /** - * @method backgroundColor - * @param {string} the background color you want the stage to have - * @return {string} returns the background color of the stage - */ set: function (color) { this._backgroundColor = color; diff --git a/src/core/State.js b/src/core/State.js index 42fb59e6..0613d8f5 100644 --- a/src/core/State.js +++ b/src/core/State.js @@ -1,30 +1,101 @@ /** -* State -* +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.State +*/ + + +/** * This is a base State class which can be extended if you are creating your own game. * It provides quick access to common functions such as the camera, cache, input, match, sound and more. * -* @package Phaser.State -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @class Phaser.State +* @constructor */ Phaser.State = function () { - + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = null; + + /** + * @property {Description} add - Description. + * @default + */ this.add = null; + + /** + * @property {Phaser.Physics.PhysicsManager} camera - A handy reference to world.camera. + * @default + */ this.camera = null; + + /** + * @property {Phaser.Cache} cache - Reference to the assets cache. + * @default + */ this.cache = null; + + /** + * @property {Phaser.Input} input - Reference to the input manager + * @default + */ this.input = null; + + /** + * @property {Phaser.Loader} load - Reference to the assets loader. + * @default + */ this.load = null; + + /** + * @property {Phaser.GameMath} math - Reference to the math helper. + * @default + */ this.math = null; + + /** + * @property {Phaser.SoundManager} sound - Reference to the sound manager. + * @default + */ this.sound = null; + + /** + * @property {Phaser.Stage} stage - Reference to the stage. + * @default + */ this.stage = null; + + /** + * @property {Phaser.TimeManager} time - Reference to game clock. + * @default + */ this.time = null; + + /** + * @property {Phaser.TweenManager} tweens - Reference to the tween manager. + * @default + */ this.tweens = null; + + /** + * @property {Phaser.World} world - Reference to the world. + * @default + */ this.world = null; + + /** + * @property {Description} add - Description. + * @default + */ this.particles = null; + + /** + * @property {Phaser.Physics.PhysicsManager} physics - Reference to the physics manager. + * @default + */ this.physics = null; }; @@ -34,37 +105,48 @@ Phaser.State.prototype = { /** * Override this method to add some load operations. * If you need to use the loader, you may need to use them here. + * + * @method preload */ preload: function () { }, /** * This method is called after the game engine successfully switches states. - * Feel free to add any setup code here.(Do not load anything here, override preload() instead) + * Feel free to add any setup code here (do not load anything here, override preload() instead). + * + * @method create */ create: function () { }, /** * Put update logic here. + * + * @method update */ update: function () { }, /** * Put render operations here. + * + * @method render */ render: function () { }, /** * This method will be called when game paused. + * + * @method paused */ paused: function () { }, /** - * This method will be called when the state is destroyed + * This method will be called when the state is destroyed.# + * @method destroy */ destroy: function () { } diff --git a/src/core/StateManager.js b/src/core/StateManager.js index da190432..3bbf58d2 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -1,7 +1,30 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.StateManager +*/ + +/** +* Description. +* +* @class Phaser.StateManager +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Description} pendingState - Description. +*/ Phaser.StateManager = function (game, pendingState) { + /** + * A reference to the currently running game. + * @property {Phaser.Game} game. + */ this.game = game; + /** + * Description. + * @property {Description} states. + */ this.states = {}; if (pendingState !== null) @@ -14,94 +37,101 @@ Phaser.StateManager = function (game, pendingState) { Phaser.StateManager.prototype = { /** - * @type {Phaser.Game} + * A reference to the currently running game. + * @property {Phaser.Game} game. */ game: null, /** * The state to be switched to in the next frame. - * @type {State} + * @property {State} _pendingState + * @private */ _pendingState: null, /** * Flag that sets if the State has been created or not. - * @type {Boolean} + * @property {bool}_created + * @private */ _created: false, /** * The state to be switched to in the next frame. - * @type {Object} + * @property {Description} states */ states: {}, /** - * The current active State object (defaults to null) - * @type {String} + * The current active State object (defaults to null). + * @property {string} current */ current: '', /** - * This will be called when the state is started (i.e. set as the current active state) - * @type {function} + * This will be called when the state is started (i.e. set as the current active state). + * @property {function} onInitCallback */ onInitCallback: null, /** - * This will be called when init states. (loading assets...) - * @type {function} + * This will be called when init states (loading assets...). + * @property {function} onPreloadCallback */ onPreloadCallback: null, /** - * This will be called when create states. (setup states...) - * @type {function} + * This will be called when create states (setup states...). + * @property {function} onCreateCallback */ onCreateCallback: null, /** - * This will be called when State is updated, this doesn't happen during load (see onLoadUpdateCallback) - * @type {function} + * This will be called when State is updated, this doesn't happen during load (@see onLoadUpdateCallback). + * @property {function} onUpdateCallback */ onUpdateCallback: null, /** - * This will be called when the State is rendered, this doesn't happen during load (see onLoadRenderCallback) - * @type {function} + * This will be called when the State is rendered, this doesn't happen during load (see onLoadRenderCallback). + * @property {function} onRenderCallback */ onRenderCallback: null, /** - * This will be called before the State is rendered and before the stage is cleared - * @type {function} + * This will be called before the State is rendered and before the stage is cleared. + * @property {function} onPreRenderCallback */ onPreRenderCallback: null, /** - * This will be called when the State is updated but only during the load process - * @type {function} + * This will be called when the State is updated but only during the load process. + * @property {function} onLoadUpdateCallback */ onLoadUpdateCallback: null, /** - * This will be called when the State is rendered but only during the load process - * @type {function} + * This will be called when the State is rendered but only during the load process. + * @property {function} onLoadRenderCallback */ onLoadRenderCallback: null, /** * This will be called when states paused. - * @type {function} + * @property {function} onPausedCallback */ onPausedCallback: null, /** - * This will be called when the state is shut down (i.e. swapped to another state) - * @type {function} + * This will be called when the state is shut down (i.e. swapped to another state). + * @property {function} onShutDownCallback */ onShutDownCallback: null, + /** + * Description. + * @method boot + */ boot: function () { // console.log('Phaser.StateManager.boot'); @@ -127,9 +157,10 @@ Phaser.StateManager.prototype = { /** * Add a new State. - * @param key {String} A unique key you use to reference this state, i.e. "MainMenu", "Level1". - * @param state {State} The state you want to switch to. - * @param autoStart {Boolean} Start the state immediately after creating it? (default true) + * @method add + * @param key {string} - A unique key you use to reference this state, i.e. "MainMenu", "Level1". + * @param state {State} - The state you want to switch to. + * @param autoStart {bool} - Start the state immediately after creating it? (default true) */ add: function (key, state, autoStart) { @@ -178,6 +209,11 @@ Phaser.StateManager.prototype = { }, + /** + * Delete the given state. + * @method remove + * @param {string} key - A unique key you use to reference this state, i.e. "MainMenu", "Level1". + */ remove: function (key) { if (this.current == key) @@ -203,9 +239,10 @@ Phaser.StateManager.prototype = { /** * Start the given state - * @param key {String} The key of the state you want to start. - * @param [clearWorld] {bool} clear everything in the world? (Default to true) - * @param [clearCache] {bool} clear asset cache? (Default to false and ONLY available when clearWorld=true) + * @method start + * @param {string} key - The key of the state you want to start. + * @param {bool} [clearWorld] - clear everything in the world? (Default to true) + * @param {bool} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true) */ start: function (key, clearWorld, clearCache) { @@ -277,11 +314,21 @@ Phaser.StateManager.prototype = { } }, - - // Used by onInit and onShutdown when those functions don't exist on the state + + /** + * Used by onInit and onShutdown when those functions don't exist on the state + * @method dummy + * @private + */ dummy: function () { }, + /** + * Description. + * @method checkState + * @param {string} key - The key of the state you want to check. + * @return {bool} Description. + */ checkState: function (key) { if (this.states[key]) @@ -314,6 +361,11 @@ Phaser.StateManager.prototype = { }, + /** + * Description. + * @method link + * @param {string} key - Description. + */ link: function (key) { // console.log('linked'); @@ -335,6 +387,11 @@ Phaser.StateManager.prototype = { }, + /** + * Description. + * @method setCurrentState + * @param {string} key - Description. + */ setCurrentState: function (key) { this.callbackContext = this.states[key]; @@ -363,6 +420,10 @@ Phaser.StateManager.prototype = { }, + /** + * Description. + * @method loadComplete + */ loadComplete: function () { // console.log('Phaser.StateManager.loadComplete'); @@ -380,6 +441,10 @@ Phaser.StateManager.prototype = { }, + /** + * Description. + * @method update + */ update: function () { if (this._created && this.onUpdateCallback) @@ -396,6 +461,10 @@ Phaser.StateManager.prototype = { }, + /** + * Description. + * @method preRender + */ preRender: function () { if (this.onPreRenderCallback) @@ -405,6 +474,10 @@ Phaser.StateManager.prototype = { }, + /** + * Description. + * @method render + */ render: function () { if (this._created && this.onRenderCallback) @@ -423,6 +496,7 @@ Phaser.StateManager.prototype = { /** * Nuke the entire game from orbit + * @method destroy */ destroy: function () { diff --git a/src/core/World.js b/src/core/World.js index 5f100a6d..585be20d 100644 --- a/src/core/World.js +++ b/src/core/World.js @@ -1,71 +1,55 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.World */ /** * * "This world is but a canvas to our imagination." - Henry David Thoreau - * + *

    * A game has only one world. The world is an abstract place in which all game objects live. It is not bound * by stage limits and can be any size. You look into the world via cameras. All game objects live within * the world at world-based coordinates. By default a world is created the same size as your Stage. * - * @class World + * @class Phaser.World * @constructor - * @param {Phaser.Game} game Reference to the current game instance. + * @param {Phaser.Game} game - Reference to the current game instance. */ Phaser.World = function (game) { /** - * A reference to the currently running Game. - * @property game - * @public - * @type {Phaser.Game} - */ + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; /** - * Bound of this world that objects can not escape from. - * @property bounds - * @public - * @type {Phaser.Rectangle} - */ + * @property {Phaser.Rectangle} bounds - Bound of this world that objects can not escape from. + */ this.bounds = new Phaser.Rectangle(0, 0, game.width, game.height); /** - * Camera instance. - * @property camera - * @public - * @type {Phaser.Camera} - */ + * @property {Phaser.Camera} camera - Camera instance. + */ this.camera = null; /** - * Reset each frame, keeps a count of the total number of objects updated. - * @property currentRenderOrderID - * @public - * @type {Number} - */ + * @property {number} currentRenderOrderID - Reset each frame, keeps a count of the total number of objects updated. + */ this.currentRenderOrderID = 0; - + /** - * Object container stores every object created with `create*` methods. - * @property group - * @public - * @type {Phaser.Group} - */ + * @property {Phaser.Group} group - Object container stores every object created with `create*` methods. + */ this.group = null; }; Phaser.World.prototype = { - /** - * Initialises the game world + * Initialises the game world. * * @method boot */ @@ -81,6 +65,7 @@ Phaser.World.prototype = { /** * This is called automatically every frame, and is where main logic happens. + * * @method update */ update: function () { @@ -139,8 +124,8 @@ Phaser.World.prototype = { /** * Updates the size of this world. * @method setSize - * @param {number} width New width of the world. - * @param {number} height New height of the world. + * @param {number} width - New width of the world. + * @param {number} height - New height of the world. */ setSize: function (width, height) { @@ -174,7 +159,13 @@ Phaser.World.prototype = { }; // Getters / Setters - +/** +* Get +* @returns {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.World.prototype, "width", { /** @@ -195,68 +186,67 @@ Object.defineProperty(Phaser.World.prototype, "width", { }); +/** +* Get +* @returns {number} The current height of the game world. +*//** +* Sets the width of the game world. +* @param {Description} value - Height of the game world. +*/ Object.defineProperty(Phaser.World.prototype, "height", { - /** - * @method height - * @return {Number} The current height of the game world - */ get: function () { return this.bounds.height; }, - /** - * @method height - * @return {Number} Sets the width of the game world - */ set: function (value) { this.bounds.height = value; } }); +/** +* Get +* @returns {number} return the X position of the center point of the world +*/ Object.defineProperty(Phaser.World.prototype, "centerX", { - /** - * @method centerX - * @return {Number} return the X position of the center point of the world - */ get: function () { return this.bounds.halfWidth; } }); +/** +* Get +* @returns {number} return the Y position of the center point of the world +*/ Object.defineProperty(Phaser.World.prototype, "centerY", { - /** - * @method centerY - * @return {Number} return the Y position of the center point of the world - */ get: function () { return this.bounds.halfHeight; } }); +/** +* Get +* @returns {number} a random integer which is lesser or equal to the current width of the game world +*/ Object.defineProperty(Phaser.World.prototype, "randomX", { - /** - * @method randomX - * @return {Number} a random integer which is lesser or equal to the current width of the game world - */ get: function () { return Math.round(Math.random() * this.bounds.width); } }); +/** +* Get +* @returns {number} a random integer which is lesser or equal to the current height of the game world +*/ Object.defineProperty(Phaser.World.prototype, "randomY", { - /** - * @method randomY - * @return {Number} a random integer which is lesser or equal to the current height of the game world - */ get: function () { return Math.round(Math.random() * this.bounds.height); } diff --git a/src/gameobjects/BitmapText.js b/src/gameobjects/BitmapText.js index 42dfaf11..0f5ec0a4 100644 --- a/src/gameobjects/BitmapText.js +++ b/src/gameobjects/BitmapText.js @@ -1,37 +1,98 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.BitmapText +*/ + +/** +* An Animation instance contains a single animation and the controls to play it. +* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +* +* @class Phaser.BitmapText +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {number} x - X position of Description. +* @param {number} y - Y position of Description. +* @param {string} text - Description. +* @param {string} style - Description. +*/ Phaser.BitmapText = function (game, x, y, text, style) { x = x || 0; y = y || 0; + text = text || ''; style = style || ''; - // If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all + /** + * @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. + * @default + */ this.exists = true; - // This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering + /** + * @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. + * @default + */ this.alive = true; + /** + * @property {Description} group - Description. + * @default + */ this.group = null; + /** + * @property {string} name - Description. + * @default + */ this.name = ''; + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; PIXI.BitmapText.call(this, text, style); + /** + * @property {Description} type - Description. + */ this.type = Phaser.BITMAPTEXT; + /** + * @property {number} position.x - Description. + */ this.position.x = x; + + /** + * @property {number} position.y - Description. + */ this.position.y = y; // Replaces the PIXI.Point with a slightly more flexible one + /** + * @property {Phaser.Point} anchor - Description. + */ this.anchor = new Phaser.Point(); + + /** + * @property {Phaser.Point} scale - Description. + */ this.scale = new Phaser.Point(1, 1); // Influence of camera movement upon the position + /** + * @property {Phaser.Point} scrollFactor - Description. + */ this.scrollFactor = new Phaser.Point(1, 1); // A mini cache for storing all of the calculated values + /** + * @property {function} _cache - Description. + * @private + */ this._cache = { dirty: false, @@ -50,6 +111,10 @@ Phaser.BitmapText = function (game, x, y, text, style) { this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); + /** + * @property {bool} renderable - Description. + * @private + */ this.renderable = true; }; @@ -59,8 +124,9 @@ Phaser.BitmapText.prototype = Object.create(PIXI.BitmapText.prototype); Phaser.BitmapText.prototype.constructor = Phaser.BitmapText; /** - * Automatically called by World.update - */ +* Automatically called by World.update +* @method Phaser.BitmapText.prototype.update +*/ Phaser.BitmapText.prototype.update = function() { if (!this.exists) @@ -85,6 +151,13 @@ Phaser.BitmapText.prototype.update = function() { } +/** +* Get +* @returns {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.BitmapText.prototype, 'angle', { get: function() { @@ -97,6 +170,13 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'angle', { }); +/** +* Get +* @returns {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.BitmapText.prototype, 'x', { get: function() { @@ -109,6 +189,13 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'x', { }); +/** +* Get +* @returns {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.BitmapText.prototype, 'y', { get: function() { diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 0ed5c731..9173f4fd 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -1,13 +1,14 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Button */ + /** * Create a new Button object. -* @class Button +* @class Phaser.Button * @constructor * * @param {Phaser.Game} game Current game instance. @@ -22,7 +23,6 @@ */ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) { - x = x || 0; y = y || 0; key = key || null; @@ -31,21 +31,86 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, Phaser.Sprite.call(this, game, x, y, key, outFrame); + /** + * @property {Description} type - Description. + */ this.type = Phaser.BUTTON; + /** + * @property {Description} _onOverFrameName - Description. + * @private + * @default + */ this._onOverFrameName = null; + + /** + * @property {Description} _onOutFrameName - Description. + * @private + * @default + */ this._onOutFrameName = null; + + /** + * @property {Description} _onDownFrameName - Description. + * @private + * @default + */ this._onDownFrameName = null; + + /** + * @property {Description} _onUpFrameName - Description. + * @private + * @default + */ this._onUpFrameName = null; + + /** + * @property {Description} _onOverFrameID - Description. + * @private + * @default + */ this._onOverFrameID = null; + + /** + * @property {Description} _onOutFrameID - Description. + * @private + * @default + */ this._onOutFrameID = null; + + /** + * @property {Description} _onDownFrameID - Description. + * @private + * @default + */ this._onDownFrameID = null; + + /** + * @property {Description} _onUpFrameID - Description. + * @private + * @default + */ this._onUpFrameID = null; // These are the signals the game will subscribe to + /** + * @property {Phaser.Signal} onInputOver - Description. + */ this.onInputOver = new Phaser.Signal; + + /** + * @property {Phaser.Signal} onInputOut - Description. + */ this.onInputOut = new Phaser.Signal; + + /** + * @property {Phaser.Signal} onInputDown - Description. + */ this.onInputDown = new Phaser.Signal; + + /** + * @property {Phaser.Signal} onInputUp - Description. + */ this.onInputUp = new Phaser.Signal; this.setFrames(overFrame, outFrame, downFrame); @@ -70,12 +135,12 @@ Phaser.Button.prototype.constructor = Phaser.Button; /** * Used to manually set the frames that will be used for the different states of the button -* exactly like setting them in the constructor +* exactly like setting them in the constructor. * -* @method setFrames -* @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. -* @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. -* @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. +* @method Phaser.Button.prototype.setFrames +* @param {string|number} [overFrame] - This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. +* @param {string|number} [outFrame] - This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. +* @param {string|number} [downFrame] - This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. */ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { @@ -149,6 +214,12 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) { }; +/** +* Description. +* +* @method Phaser.Button.prototype.onInputOverHandler +* @param {Description} pointer - Description. +*/ Phaser.Button.prototype.onInputOverHandler = function (pointer) { if (this._onOverFrameName != null) @@ -166,6 +237,12 @@ Phaser.Button.prototype.onInputOverHandler = function (pointer) { } }; +/** +* Description. +* +* @method Phaser.Button.prototype.onInputOutHandler +* @param {Description} pointer - Description. +*/ Phaser.Button.prototype.onInputOutHandler = function (pointer) { if (this._onOutFrameName != null) @@ -181,9 +258,14 @@ Phaser.Button.prototype.onInputOutHandler = function (pointer) { { this.onInputOut.dispatch(this, pointer); } - }; +/** +* Description. +* +* @method Phaser.Button.prototype.onInputDownHandler +* @param {Description} pointer - Description. +*/ Phaser.Button.prototype.onInputDownHandler = function (pointer) { if (this._onDownFrameName != null) @@ -201,6 +283,12 @@ Phaser.Button.prototype.onInputDownHandler = function (pointer) { } }; +/** +* Description. +* +* @method Phaser.Button.prototype.onInputUpHandler +* @param {Description} pointer - Description. +*/ Phaser.Button.prototype.onInputUpHandler = function (pointer) { if (this._onUpFrameName != null) diff --git a/src/gameobjects/Events.js b/src/gameobjects/Events.js index 09329ef9..e1e3c85d 100644 --- a/src/gameobjects/Events.js +++ b/src/gameobjects/Events.js @@ -1,6 +1,18 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Events +*/ + + /** * The Events component is a collection of events fired by the parent game object and its components. -* @param parent The game object using this Input component +* +* @class Phaser.Events +* @constructor +* +* @param {Phaser.Sprite} sprite - A reference to Description. */ Phaser.Events = function (sprite) { diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 7ce7cf5b..b5d671c9 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -1,15 +1,51 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.GameObjectFactory +*/ + +/** +* Description. +* +* @class Phaser.GameObjectFactory +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +*/ Phaser.GameObjectFactory = function (game) { + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; + + /** + * @property {Phaser.World} world - A reference to the game world. + */ this.world = this.game.world; }; Phaser.GameObjectFactory.prototype = { + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + * @default + */ game: null, + + /** + * @property {Phaser.World} world - A reference to the game world. + * @default + */ world: null, + /** + * Description. + * @method existing. + * @param {object} - Description. + * @return {bool} Description. + */ existing: function (object) { return this.world.group.add(object); @@ -19,11 +55,12 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key. * - * @param x {number} X position of the new sprite. - * @param y {number} Y position of the new sprite. - * @param [key] {string|RenderTexture} The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture - * @param [frame] {string|number} If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @returns {Sprite} The newly created sprite object. + * @method sprite + * @param {number} x - X position of the new sprite. + * @param {number} y - Y position of the new sprite. + * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture. + * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. + * @returns {Description} Description. */ sprite: function (x, y, key, frame) { @@ -34,11 +71,12 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent. * - * @param x {number} X position of the new sprite. - * @param y {number} Y position of the new sprite. - * @param [key] {string|RenderTexture} The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture - * @param [frame] {string|number} If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @returns {Sprite} The newly created sprite object. + * @method child + * @param {number} x - X position of the new sprite. + * @param {number} y - Y position of the new sprite. + * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture. + * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. + * @returns {Description} Description. */ child: function (parent, x, y, key, frame) { @@ -51,8 +89,9 @@ Phaser.GameObjectFactory.prototype = { /** * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. * - * @param obj {object} Object the tween will be run on. - * @return {Phaser.Tween} The newly created tween object. + * @method tween + * @param {object} obj - Object the tween will be run on. + * @return {Description} Description. */ tween: function (obj) { @@ -60,60 +99,159 @@ Phaser.GameObjectFactory.prototype = { }, + /** + * Description. + * + * @method group + * @param {Description} parent - Description. + * @param {Description} name - Description. + * @return {Description} Description. + */ group: function (parent, name) { return new Phaser.Group(this.game, parent, name); }, + /** + * Description. + * + * @method audio + * @param {Description} key - Description. + * @param {Description} volume - Description. + * @param {Description} loop - Description. + * @return {Description} Description. + */ audio: function (key, volume, loop) { return this.game.sound.add(key, volume, loop); }, + /** + * Description. + * + * @method tileSprite + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {Description} width - Description. + * @param {Description} height - Description. + * @param {Description} key - Description. + * @param {Description} frame - Description. + * @return {Description} Description. + */ tileSprite: function (x, y, width, height, key, frame) { return this.world.group.add(new Phaser.TileSprite(this.game, x, y, width, height, key, frame)); }, + /** + * Description. + * + * @method text + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {Description} text - Description. + * @param {Description} style - Description. + */ text: function (x, y, text, style) { return this.world.group.add(new Phaser.Text(this.game, x, y, text, style)); }, + /** + * Description. + * + * @method button + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {Description} callback - Description. + * @param {Description} callbackContext - Description. + * @param {Description} overFrame - Description. + * @param {Description} outFrame - Description. + * @param {Description} downFrame - Description. + * @return {Description} Description. + */ button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) { return this.world.group.add(new Phaser.Button(this.game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame)); }, + /** + * Description. + * + * @method graphics + * @param {Description} x - Description. + * @param {Description} y - Description. + * @return {Description} Description. + */ graphics: function (x, y) { return this.world.group.add(new Phaser.Graphics(this.game, x, y)); }, + /** + * Description. + * + * @method emitter + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {Description} maxParticles - Description. + * @return {Description} Description. + */ emitter: function (x, y, maxParticles) { return this.game.particles.add(new Phaser.Particles.Arcade.Emitter(this.game, x, y, maxParticles)); }, + /** + * Description. + * + * @method bitmapText + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {Description} text - Description. + * @param {Description} style - Description. + * @return {Description} Description. + */ bitmapText: function (x, y, text, style) { return this.world.group.add(new Phaser.BitmapText(this.game, x, y, text, style)); }, + /** + * Description. + * + * @method tilemap + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {Description} key - Description. + * @param {Description} resizeWorld - Description. + * @param {Description} tileWidth - Description. + * @param {Description} tileHeight - Description. + * @return {Description} Description. + */ tilemap: function (x, y, key, resizeWorld, tileWidth, tileHeight) { return this.world.group.add(new Phaser.Tilemap(this.game, key, x, y, resizeWorld, tileWidth, tileHeight)); }, + /** + * Description. + * + * @method renderTexture + * @param {Description} key - Description. + * @param {Description} width - Description. + * @param {Description} height - Description. + * @return {Description} Description. + */ renderTexture: function (key, width, height) { var texture = new Phaser.RenderTexture(this.game, key, width, height); diff --git a/src/gameobjects/Graphics.js b/src/gameobjects/Graphics.js index 9bafc76b..cf399254 100644 --- a/src/gameobjects/Graphics.js +++ b/src/gameobjects/Graphics.js @@ -1,9 +1,27 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Graphics +*/ + +/** +* Description. +* +* @class Phaser.Graphics +* @constructor +* +* @param {Phaser.Game} game Current game instance. +* @param {number} [x] X position of Description. +* @param {number} [y] Y position of Description. +*/ Phaser.Graphics = function (game, x, y) { PIXI.Graphics.call(this); - Phaser.Sprite.call(this, game, x, y); - + /** + * @property {Description} type - Description. + */ this.type = Phaser.GRAPHICS; }; diff --git a/src/gameobjects/RenderTexture.js b/src/gameobjects/RenderTexture.js index 10d8560a..e9d154cd 100644 --- a/src/gameobjects/RenderTexture.js +++ b/src/gameobjects/RenderTexture.js @@ -1,20 +1,58 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.RenderTexture +*/ + +/** +* Description of constructor. +* @class Phaser.RenderTexture +* @classdesc Description of class. +* @constructor +* @param {Phaser.Game} game - Current game instance. +* @param {string} key - Description. +* @param {number} width - Description. +* @param {number} height - Description. +*/ Phaser.RenderTexture = function (game, key, width, height) { + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + /** + * @property {Description} name - Description. + */ this.name = key; PIXI.EventTarget.call( this ); + /** + * @property {number} width - Description. + */ this.width = width || 100; + + /** + * @property {number} height - Description. + */ this.height = height || 100; - // I know this has a typo in it, but it's because the PIXI.RenderTexture does and we need to pair-up with it - // once they update pixi to fix the typo, we'll fix it here too :) + /** I know this has a typo in it, but it's because the PIXI.RenderTexture does and we need to pair-up with it + * once they update pixi to fix the typo, we'll fix it here too :) + * @property {Description} indetityMatrix - Description. + */ this.indetityMatrix = PIXI.mat3.create(); + /** + * @property {Description} frame - Description. + */ this.frame = new PIXI.Rectangle(0, 0, this.width, this.height); + /** + * @property {Description} type - Description. + */ this.type = Phaser.RENDERTEXTURE; if (PIXI.gl) diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index dbb2337a..58be67f6 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -1,48 +1,94 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Sprite +*/ + +/** +* Create a new Sprite. +* @class Phaser.Sprite +* @classdesc Description of class. +* @constructor +* @param {Phaser.Game} game - Current game instance. +* @param {Description} x - Description. +* @param {Description} y - Description. +* @param {string} key - Description. +* @param {Description} frame - Description. +*/ Phaser.Sprite = function (game, x, y, key, frame) { x = x || 0; y = y || 0; key = key || null; frame = frame || null; - + + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; - - // If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all + + /** + * @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. + * @default + */ this.exists = true; - // This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering + /** + * @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. + * @default + */ this.alive = true; + /** + * @property {Description} group - Description. + * @default + */ this.group = null; + /** + * @property {string} name - The user defined name given to this Sprite. + * @default + */ this.name = ''; + /** + * @property {Description} type - Description. + */ this.type = Phaser.SPRITE; + /** + * @property {number} renderOrderID - Description. + * @default + */ this.renderOrderID = -1; - // If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc. - // The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called. + /** + * If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc. + * The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called. + * @property {number} lifespan + * @default + */ this.lifespan = 0; /** - * The Signals you can subscribe to that are dispatched when certain things happen on this Sprite or its components - * @type Events - */ + * @property {Events} events - The Signals you can subscribe to that are dispatched when certain things happen on this Sprite or its components + */ this.events = new Phaser.Events(this); /** - * This manages animations of the sprite. You can modify animations through it. (see AnimationManager) - * @type AnimationManager - */ + * @property {AnimationManager} animations - This manages animations of the sprite. You can modify animations through it. (see AnimationManager) + */ this.animations = new Phaser.AnimationManager(this); /** - * The Input Handler Component - * @type InputHandler - */ + * @property {InputHandler} input - The Input Handler Component. + */ this.input = new Phaser.InputHandler(this); + /** + * @property {Description} key - Description. + */ this.key = key; if (key instanceof Phaser.RenderTexture) @@ -83,46 +129,70 @@ Phaser.Sprite = function (game, x, y, key, frame) { } /** - * The anchor sets the origin point of the texture. - * The default is 0,0 this means the textures origin is the top left - * Setting than anchor to 0.5,0.5 means the textures origin is centered - * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right - * - * @property anchor - * @type Point - */ + * The anchor sets the origin point of the texture. + * The default is 0,0 this means the textures origin is the top left + * Setting than anchor to 0.5,0.5 means the textures origin is centered + * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right + * + * @property {Phaser.Point} anchor + */ this.anchor = new Phaser.Point(); + /** + * @property {Description} _cropUUID - Description. + * @private + * @default + */ this._cropUUID = null; + + /** + * @property {Description} _cropUUID - Description. + * @private + * @default + */ this._cropRect = null; + /** + * @property {number} x - Description. + */ this.x = x; + + /** + * @property {number} y - Description. + */ this.y = y; - this.prevX = x; - this.prevY = y; - + /** + * @property {Description} position - Description. + */ this.position.x = x; this.position.y = y; /** - * Should this Sprite be automatically culled if out of range of the camera? - * A culled sprite has its visible property set to 'false'. - * Note that this check doesn't look at this Sprites children, which may still be in camera range. - * So you should set autoCull to false if the Sprite will have children likely to still be in camera range. - * - * @property autoCull - * @type Boolean - */ + * Should this Sprite be automatically culled if out of range of the camera? + * A culled sprite has its visible property set to 'false'. + * Note that this check doesn't look at this Sprites children, which may still be in camera range. + * So you should set autoCull to false if the Sprite will have children likely to still be in camera range. + * + * @property {bool} autoCull + * @default + */ this.autoCull = false; - // Replaces the PIXI.Point with a slightly more flexible one + /** + * @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one. + */ this.scale = new Phaser.Point(1, 1); - // Influence of camera movement upon the position + /** + * @property {Phaser.Point} scrollFactor - Influence of camera movement upon the position. + */ this.scrollFactor = new Phaser.Point(1, 1); - // A mini cache for storing all of the calculated values + /** + * @property {Phaser.Point} _cache - A mini cache for storing all of the calculated values. + * @private + */ this._cache = { dirty: false, @@ -157,25 +227,73 @@ Phaser.Sprite = function (game, x, y, key, frame) { cameraVisible: true }; - - // Corner point defaults + + /** + * @property {Phaser.Point} offset - Corner point defaults. + */ this.offset = new Phaser.Point; + + /** + * @property {Phaser.Point} center - Description. + */ this.center = new Phaser.Point(x + Math.floor(this._cache.width / 2), y + Math.floor(this._cache.height / 2)); + + /** + * @property {Phaser.Point} topLeft - Description. + */ this.topLeft = new Phaser.Point(x, y); + + /** + * @property {Phaser.Point} topRight - Description. + */ this.topRight = new Phaser.Point(x + this._cache.width, y); + + /** + * @property {Phaser.Point} bottomRight - Description. + */ this.bottomRight = new Phaser.Point(x + this._cache.width, y + this._cache.height); + + /** + * @property {Phaser.Point} bottomLeft - Description. + */ this.bottomLeft = new Phaser.Point(x, y + this._cache.height); + + /** + * @property {Phaser.Rectangle} bounds - Description. + */ this.bounds = new Phaser.Rectangle(x, y, this._cache.width, this._cache.height); - - // Set-up the physics body + + /** + * @property {Phaser.Physics.Arcade.Body} body - Set-up the physics body. + */ this.body = new Phaser.Physics.Arcade.Body(this); + /** + * @property {Description} velocity - Description. + */ this.velocity = this.body.velocity; + + /** + * @property {Description} acceleration - Description. + */ this.acceleration = this.body.acceleration; - // World bounds check + /** + * @property {Description} inWorld - World bounds check. + */ this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds); + + /** + * @property {number} inWorldThreshold - World bounds check. + * @default + */ this.inWorldThreshold = 0; + + /** + * @property {bool} _outOfBoundsFired - Description. + * @private + * @default + */ this._outOfBoundsFired = false; }; @@ -185,8 +303,9 @@ Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype); Phaser.Sprite.prototype.constructor = Phaser.Sprite; /** - * Automatically called by World.update. You can create your own update in Objects that extend Phaser.Sprite. - */ +* Automatically called by World.update. You can create your own update in Objects that extend Phaser.Sprite. +* @method Phaser.Sprite.prototype.preUpdate +*/ Phaser.Sprite.prototype.preUpdate = function() { if (!this.exists) @@ -331,9 +450,13 @@ Phaser.Sprite.prototype.deltaY = function () { } /** - * Moves the sprite so its center is located on the given x and y coordinates. - * Doesn't change the origin of the sprite. - */ +* Moves the sprite so its center is located on the given x and y coordinates. +* Doesn't change the origin of the sprite. +* +* @method Phaser.Sprite.prototype.centerOn +* @param {number} x - Description. +* @param {number} y - Description. +*/ Phaser.Sprite.prototype.centerOn = function(x, y) { this.x = x + (this.x - this.center.x); @@ -341,6 +464,11 @@ Phaser.Sprite.prototype.centerOn = function(x, y) { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.revive +*/ Phaser.Sprite.prototype.revive = function() { this.alive = true; @@ -350,6 +478,11 @@ Phaser.Sprite.prototype.revive = function() { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.kill +*/ Phaser.Sprite.prototype.kill = function() { this.alive = false; @@ -359,6 +492,11 @@ Phaser.Sprite.prototype.kill = function() { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.reset +*/ Phaser.Sprite.prototype.reset = function(x, y) { this.x = x; @@ -373,6 +511,11 @@ Phaser.Sprite.prototype.reset = function(x, y) { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.updateBounds +*/ Phaser.Sprite.prototype.updateBounds = function() { // Update the edge points @@ -421,6 +564,15 @@ Phaser.Sprite.prototype.updateBounds = function() { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.getLocalPosition +* @param {Description} p - Description. +* @param {number} x - Description. +* @param {number} y - Description. +* @return {Description} Description. +*/ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) { p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this._cache.scaleX) + this._cache.a02; @@ -430,6 +582,15 @@ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.getLocalUnmodifiedPosition +* @param {Description} p - Description. +* @param {number} x - Description. +* @param {number} y - Description. +* @return {Description} Description. +*/ Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { p.x = this._cache.a11 * this._cache.idi * x + -this._cache.i01 * this._cache.idi * y + (this._cache.a12 * this._cache.i01 - this._cache.a02 * this._cache.a11) * this._cache.idi; @@ -439,6 +600,11 @@ Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.bringToTop +*/ Phaser.Sprite.prototype.bringToTop = function() { if (this.group) @@ -452,6 +618,13 @@ Phaser.Sprite.prototype.bringToTop = function() { } +/** +* Description. +* +* @method Phaser.Sprite.prototype.bringToTop +* @param {Phaser.Rectangle} rect - Description. +* @return {Phaser.Rectangle} Description. +*/ Phaser.Sprite.prototype.getBounds = function(rect) { rect = rect || new Phaser.Rectangle; @@ -501,67 +674,71 @@ Object.defineProperty(Phaser.Sprite.prototype, 'angle', { }); +/** +* Get the animation frame number. +* @returns {Description} +*//** +* Set the animation frame by frame number. +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Sprite.prototype, "frame", { - /** - * Get the animation frame number. - */ get: function () { return this.animations.frame; }, - /** - * Set the animation frame by frame number. - */ set: function (value) { this.animations.frame = value; } }); +/** +* Get the animation frame name. +* @returns {Description} +*//** +* Set the animation frame by frame name. +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { - /** - * Get the animation frame name. - */ get: function () { return this.animations.frameName; }, - /** - * Set the animation frame by frame name. - */ set: function (value) { this.animations.frameName = value; } }); +/** +* Is this sprite visible to the camera or not? +* @returns {bool} +*/ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { - /** - * Is this sprite visible to the camera or not? - */ get: function () { return this._cache.cameraVisible; } }); +/** +* Get the input enabled state of this Sprite. +* @returns {Description} +*//** +* Set the ability for this sprite to receive input events. +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Sprite.prototype, "crop", { - /** - * Get the input enabled state of this Sprite. - */ get: function () { return this._cropRect; }, - /** - * Set the ability for this sprite to receive input events. - */ set: function (value) { if (value instanceof Phaser.Rectangle) @@ -590,20 +767,21 @@ Object.defineProperty(Phaser.Sprite.prototype, "crop", { }); +/** +* Get the input enabled state of this Sprite. +* @returns {Description} +*//** +* Set the ability for this sprite to receive input events. +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", { - /** - * Get the input enabled state of this Sprite. - */ get: function () { return (this.input.enabled); }, - /** - * Set the ability for this sprite to receive input events. - */ set: function (value) { if (value) diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index f3ba4472..41bbd9f3 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -1,3 +1,21 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Text +*/ + +/** +* Create a new Text. +* @class Phaser.Text +* @classdesc Description of class. +* @constructor +* @param {Phaser.Game} game - Current game instance. +* @param {Description} x - Description. +* @param {Description} y - Description. +* @param {string} text - Description. +* @param {string} style - Description. +*/ Phaser.Text = function (game, x, y, text, style) { x = x || 0; @@ -6,15 +24,34 @@ Phaser.Text = function (game, x, y, text, style) { style = style || ''; // If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all + /** + * @property {bool} exists - Description. + * @default + */ this.exists = true; // This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering + /** + * @property {bool} alive - Description. + * @default + */ this.alive = true; + /** + * @property {Description} group - Description. + * @default + */ this.group = null; + /** + * @property {string} name - Description. + * @default + */ this.name = ''; + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; this._text = text; @@ -22,19 +59,39 @@ Phaser.Text = function (game, x, y, text, style) { PIXI.Text.call(this, text, style); + /** + * @property {Description} type - Description. + */ this.type = Phaser.TEXT; + /** + * @property {Description} position - Description. + */ this.position.x = this.x = x; this.position.y = this.y = y; // Replaces the PIXI.Point with a slightly more flexible one + /** + * @property {Phaser.Point} anchor - Description. + */ this.anchor = new Phaser.Point(); + + /** + * @property {Phaser.Point} scale - Description. + */ this.scale = new Phaser.Point(1, 1); // Influence of camera movement upon the position + /** + * @property {Phaser.Point} scrollFactor - Description. + */ this.scrollFactor = new Phaser.Point(1, 1); // A mini cache for storing all of the calculated values + /** + * @property {Description} _cache - Description. + * @private + */ this._cache = { dirty: false, @@ -53,6 +110,9 @@ Phaser.Text = function (game, x, y, text, style) { this._cache.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); + /** + * @property {bool} renderable - Description. + */ this.renderable = true; }; @@ -60,7 +120,11 @@ Phaser.Text = function (game, x, y, text, style) { Phaser.Text.prototype = Object.create(PIXI.Text.prototype); Phaser.Text.prototype.constructor = Phaser.Text; -// Automatically called by World.update + +/** +* Automatically called by World.update. +* @method Phaser.Text.prototype.update +*/ Phaser.Text.prototype.update = function() { if (!this.exists) @@ -82,6 +146,13 @@ Phaser.Text.prototype.update = function() { } +/** +* Get +* @returns {Description} +*//** +* Set +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Text.prototype, 'angle', { get: function() { diff --git a/src/gameobjects/TileSprite.js b/src/gameobjects/TileSprite.js index d578f736..f274940f 100644 --- a/src/gameobjects/TileSprite.js +++ b/src/gameobjects/TileSprite.js @@ -1,3 +1,23 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.TileSprite +*/ + +/** +* Create a new TileSprite. +* @class Phaser.Tilemap +* @classdesc Class description. +* @constructor +* @param {Phaser.Game} game - Current game instance. +* @param {object} x - Description. +* @param {object} y - Description. +* @param {number} width - Description. +* @param {number} height - Description. +* @param {string} key - Description. +* @param {Description} frame - Description. +*/ Phaser.TileSprite = function (game, x, y, width, height, key, frame) { x = x || 0; @@ -9,26 +29,26 @@ Phaser.TileSprite = function (game, x, y, width, height, key, frame) { Phaser.Sprite.call(this, game, x, y, key, frame); + /** + * @property {Description} texture - Description. + */ this.texture = PIXI.TextureCache[key]; PIXI.TilingSprite.call(this, this.texture, width, height); + /** + * @property {Description} type - Description. + */ this.type = Phaser.TILESPRITE; /** - * The scaling of the image that is being tiled - * - * @property tileScale - * @type Point - */ + * @property {Point} tileScale - The scaling of the image that is being tiled. + */ this.tileScale = new Phaser.Point(1, 1); /** - * The offset position of the image that is being tiled - * - * @property tilePosition - * @type Point - */ + * @property {Point} tilePosition - The offset position of the image that is being tiled. + */ this.tilePosition = new Phaser.Point(0, 0); }; diff --git a/src/geom/Circle.js b/src/geom/Circle.js index ada013d1..e8e93b0b 100644 --- a/src/geom/Circle.js +++ b/src/geom/Circle.js @@ -1,13 +1,19 @@ /** -* Phaser - Circle -* +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Circle +*/ + +/** * Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created. * @class Circle +* @classdesc Phaser - Circle * @constructor -* @param {Number} [x] The x coordinate of the center of the circle. -* @param {Number} [y] The y coordinate of the center of the circle. -* @param {Number} [diameter] The diameter of the circle. -* @return {Circle} This circle object +* @param {number} [x] The x coordinate of the center of the circle. +* @param {number} [y] The y coordinate of the center of the circle. +* @param {number} [diameter] The diameter of the circle. +* @return {Phaser.Circle} This circle object **/ Phaser.Circle = function (x, y, diameter) { @@ -16,23 +22,27 @@ Phaser.Circle = function (x, y, diameter) { diameter = diameter || 0; /** - * The x coordinate of the center of the circle - * @property x - * @type Number + * @property {number} x - The x coordinate of the center of the circle. **/ this.x = x; /** - * The y coordinate of the center of the circle - * @property y - * @type Number + * @property {number} y - The y coordinate of the center of the circle. **/ this.y = y; + /** + * @property {number} _diameter - The diameter of the circle. + * @private + **/ this._diameter = diameter; if (diameter > 0) { + /** + * @property {number} _radius - The radius of the circle. + * @private + **/ this._radius = diameter * 0.5; } else @@ -47,7 +57,7 @@ Phaser.Circle.prototype = { /** * The circumference of the circle. * @method circumference - * @return {Number} + * @return {number} **/ circumference: function () { return 2 * (Math.PI * this._radius); @@ -56,10 +66,10 @@ Phaser.Circle.prototype = { /** * Sets the members of Circle to the specified values. * @method setTo - * @param {Number} x The x coordinate of the center of the circle. - * @param {Number} y The y coordinate of the center of the circle. - * @param {Number} diameter The diameter of the circle in pixels. - * @return {Circle} This circle object + * @param {number} x - The x coordinate of the center of the circle. + * @param {number} y - The y coordinate of the center of the circle. + * @param {number} diameter - The diameter of the circle in pixels. + * @return {Circle} This circle object. **/ setTo: function (x, y, diameter) { this.x = x; @@ -96,9 +106,9 @@ Phaser.Circle.prototype = { * Returns the distance from the center of the Circle object to the given object * (can be Circle, Point or anything with x/y properties) * @method distance - * @param {object} dest The target object. Must have visible x and y properties that represent the center of the object. - * @param {bool} [optional] round Round the distance to the nearest integer (default false) - * @return {Number} The distance between this Point object and the destination Point object. + * @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object. + * @param {bool} [round] - Round the distance to the nearest integer (default false). + * @return {number} The distance between this Point object and the destination Point object. */ distance: function (dest, round) { @@ -118,7 +128,7 @@ Phaser.Circle.prototype = { /** * Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object. * @method clone - * @param {Phaser.Circle} out Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned. + * @param {Phaser.Circle} out - Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned. * @return {Phaser.Circle} The cloned Circle object. */ clone: function(out) { @@ -132,8 +142,8 @@ Phaser.Circle.prototype = { /** * Return true if the given x/y coordinates are within this Circle object. * @method contains - * @param {Number} x The X value of the coordinate to test. - * @param {Number} y The Y value of the coordinate to test. + * @param {number} x - The X value of the coordinate to test. + * @param {number} y - The Y value of the coordinate to test. * @return {bool} True if the coordinates are within this circle, otherwise false. */ contains: function (x, y) { @@ -143,9 +153,9 @@ Phaser.Circle.prototype = { /** * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. * @method circumferencePoint - * @param {Number} angle The angle in radians (unless asDegrees is true) to return the point from. - * @param {bool} asDegrees Is the given angle in radians (false) or degrees (true)? - * @param {Phaser.Point} [optional] output An optional Point object to put the result in to. If none specified a new Point object will be created. + * @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from. + * @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)? + * @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created. * @return {Phaser.Point} The Point object holding the result. */ circumferencePoint: function (angle, asDegrees, out) { @@ -155,8 +165,8 @@ Phaser.Circle.prototype = { /** * Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts. * @method offset - * @param {Number} dx Moves the x value of the Circle object by this amount. - * @param {Number} dy Moves the y value of the Circle object by this amount. + * @param {number} dx - Moves the x value of the Circle object by this amount. + * @param {number} dy - Moves the y value of the Circle object by this amount. * @return {Circle} This Circle object. **/ offset: function (dx, dy) { @@ -188,13 +198,15 @@ Phaser.Circle.prototype = { // Getters / Setters +/** +* Get the diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2. +* @return {number} +*//** +* Set the diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2. +* @param {number} value - The diameter of the circle. +*/ Object.defineProperty(Phaser.Circle.prototype, "diameter", { - /** - * The diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2. - * @method diameter - * @return {Number} - **/ get: function () { return this._diameter; }, @@ -213,22 +225,19 @@ Object.defineProperty(Phaser.Circle.prototype, "diameter", { }); +/** +* Get the radius of the circle. The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. +* @return {number} +*//** +* Set +* @param {number} value - The radius of the circle. The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. +*/ Object.defineProperty(Phaser.Circle.prototype, "radius", { - /** - * The radius of the circle. The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. - * @method radius - * @return {Number} - **/ get: function () { return this._radius; }, - /** - * The radius of the circle. The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. - * @method radius - * @param {Number} The radius of the circle. - **/ set: function (value) { if (value > 0) { this._radius = value; @@ -238,22 +247,19 @@ Object.defineProperty(Phaser.Circle.prototype, "radius", { }); +/** +* Get the x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. +* @return {number} The x coordinate of the leftmost point of the circle. +*//** +* Set the x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. +* @param {number} value - The value to adjust the position of the leftmost point of the circle by. +*/ Object.defineProperty(Phaser.Circle.prototype, "left", { - /** - * The x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. - * @method left - * @return {Number} The x coordinate of the leftmost point of the circle. - **/ get: function () { return this.x - this._radius; }, - /** - * The x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. - * @method left - * @param {Number} The value to adjust the position of the leftmost point of the circle by. - **/ set: function (value) { if (value > this.x) { this._radius = 0; @@ -265,22 +271,19 @@ Object.defineProperty(Phaser.Circle.prototype, "left", { }); +/** +* Get the x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. +* @return {number} The x coordinate of the rightmost point of the circle. +*//** +* Set the x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. +* @param {number} value - The amount to adjust the diameter of the circle by. +*/ Object.defineProperty(Phaser.Circle.prototype, "right", { - /** - * The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. - * @method right - * @return {Number} - **/ get: function () { return this.x + this._radius; }, - /** - * The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. - * @method right - * @param {Number} The amount to adjust the diameter of the circle by. - **/ set: function (value) { if (value < this.x) { this._radius = 0; @@ -292,22 +295,19 @@ Object.defineProperty(Phaser.Circle.prototype, "right", { }); +/** +* Get the sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. +* @return {number} +*//** +* The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. +* @param {number} value - The amount to adjust the height of the circle by. +*/ Object.defineProperty(Phaser.Circle.prototype, "top", { - /** - * The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. - * @method bottom - * @return {Number} - **/ get: function () { return this.y - this._radius; }, - /** - * The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. - * @method bottom - * @param {Number} The amount to adjust the height of the circle by. - **/ set: function (value) { if (value > this.y) { this._radius = 0; @@ -319,22 +319,19 @@ Object.defineProperty(Phaser.Circle.prototype, "top", { }); +/** +* Get the sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. +* @return {number} +*//** +* Set the sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. +* @param {number} value - The value to adjust the height of the circle by. +*/ Object.defineProperty(Phaser.Circle.prototype, "bottom", { - /** - * The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. - * @method bottom - * @return {Number} - **/ get: function () { return this.y + this._radius; }, - /** - * The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. - * @method bottom - * @param {Number} The value to adjust the height of the circle by. - **/ set: function (value) { if (value < this.y) { @@ -347,13 +344,12 @@ Object.defineProperty(Phaser.Circle.prototype, "bottom", { }); +/** +* Gets the area of this Circle. +* @return {number} This area of this circle. +*/ Object.defineProperty(Phaser.Circle.prototype, "area", { - /** - * Gets the area of this Circle. - * @method area - * @return {Number} This area of this circle. - **/ get: function () { if (this._radius > 0) { return Math.PI * this._radius * this._radius; @@ -364,19 +360,21 @@ Object.defineProperty(Phaser.Circle.prototype, "area", { }); +/** +* Determines whether or not this Circle object is empty. +* @return {bool} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. +*//** +* Sets all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. +* @param {Description} value - Description. +*/ Object.defineProperty(Phaser.Circle.prototype, "empty", { - /** - * Determines whether or not this Circle object is empty. - * @method empty - * @return {bool} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. - **/ get: function () { return (this._diameter == 0); }, /** - * Sets all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. + * * @method setEmpty * @return {Circle} This Circle object **/ @@ -391,9 +389,9 @@ Object.defineProperty(Phaser.Circle.prototype, "empty", { /** * Return true if the given x/y coordinates are within the Circle object. * @method contains -* @param {Phaser.Circle} a The Circle to be checked. -* @param {Number} x The X value of the coordinate to test. -* @param {Number} y The Y value of the coordinate to test. +* @param {Phaser.Circle} a - The Circle to be checked. +* @param {number} x - The X value of the coordinate to test. +* @param {number} y - The Y value of the coordinate to test. * @return {bool} True if the coordinates are within this circle, otherwise false. */ Phaser.Circle.contains = function (a, x, y) { @@ -415,8 +413,8 @@ Phaser.Circle.contains = function (a, x, y) { /** * Determines whether the two Circle objects match. This method compares the x, y and diameter properties. * @method equals -* @param {Phaser.Circle} a The first Circle object. -* @param {Phaser.Circle} b The second Circle object. +* @param {Phaser.Circle} a - The first Circle object. +* @param {Phaser.Circle} b - The second Circle object. * @return {bool} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. */ Phaser.Circle.equals = function (a, b) { @@ -427,8 +425,8 @@ Phaser.Circle.equals = function (a, b) { * Determines whether the two Circle objects intersect. * This method checks the radius distances between the two Circle objects to see if they intersect. * @method intersects -* @param {Phaser.Circle} a The first Circle object. -* @param {Phaser.Circle} b The second Circle object. +* @param {Phaser.Circle} a - The first Circle object. +* @param {Phaser.Circle} b - The second Circle object. * @return {bool} A value of true if the specified object intersects with this Circle object; otherwise false. */ Phaser.Circle.intersects = function (a, b) { @@ -438,10 +436,10 @@ Phaser.Circle.intersects = function (a, b) { /** * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. * @method circumferencePoint -* @param {Phaser.Circle} a The first Circle object. -* @param {Number} angle The angle in radians (unless asDegrees is true) to return the point from. -* @param {bool} asDegrees Is the given angle in radians (false) or degrees (true)? -* @param {Phaser.Point} [optional] output An optional Point object to put the result in to. If none specified a new Point object will be created. +* @param {Phaser.Circle} a - The first Circle object. +* @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from. +* @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)? +* @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created. * @return {Phaser.Point} The Point object holding the result. */ Phaser.Circle.circumferencePoint = function (a, angle, asDegrees, out) { @@ -463,8 +461,8 @@ Phaser.Circle.circumferencePoint = function (a, angle, asDegrees, out) { /** * Checks if the given Circle and Rectangle objects intersect. * @method intersectsRectangle -* @param {Phaser.Circle} c The Circle object to test. -* @param {Phaser.Rectangle} r The Rectangle object to test. +* @param {Phaser.Circle} c - The Circle object to test. +* @param {Phaser.Rectangle} r - The Rectangle object to test. * @return {bool} True if the two objects intersect, otherwise false. */ Phaser.Circle.intersectsRectangle = function (c, r) { diff --git a/src/geom/Point.js b/src/geom/Point.js index d6adb21a..4133584a 100644 --- a/src/geom/Point.js +++ b/src/geom/Point.js @@ -1,17 +1,14 @@ /** -* Phaser - Point -* -* The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. -* * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Point */ /** * Creates a new Point. If you pass no parameters a Point is created set to (0,0). * @class Point +* @classdesc The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. * @constructor * @param {Number} x The horizontal position of this Point (default 0) * @param {Number} y The vertical position of this Point (default 0) @@ -21,7 +18,14 @@ Phaser.Point = function (x, y) { x = x || 0; y = y || 0; + /** + * @property {number} x - The x coordinate of the point. + **/ this.x = x; + + /** + * @property {number} y - The y coordinate of the point. + **/ this.y = y; }; @@ -50,8 +54,8 @@ Phaser.Point.prototype = { /** * Sets the x and y values of this Point object to the given coordinates. * @method setTo - * @param {Number} x - The horizontal position of this point. - * @param {Number} y - The vertical position of this point. + * @param {number} x - The horizontal position of this point. + * @param {number} y - The vertical position of this point. * @return {Point} This Point object. Useful for chaining method calls. **/ setTo: function (x, y) { @@ -93,10 +97,10 @@ Phaser.Point.prototype = { }, /** - * Clamps the x value of this Point to be between the given min and max + * Clamps the x value of this Point to be between the given min and max. * @method clampX - * @param {Number} min The minimum value to clamp this Point to - * @param {Number} max The maximum value to clamp this Point to + * @param {number} min - The minimum value to clamp this Point to. + * @param {number} max - The maximum value to clamp this Point to. * @return {Phaser.Point} This Point object. */ clampX: function (min, max) { @@ -109,8 +113,8 @@ Phaser.Point.prototype = { /** * Clamps the y value of this Point to be between the given min and max * @method clampY - * @param {Number} min The minimum value to clamp this Point to - * @param {Number} max The maximum value to clamp this Point to + * @param {number} min - The minimum value to clamp this Point to. + * @param {number} max - The maximum value to clamp this Point to. * @return {Phaser.Point} This Point object. */ clampY: function (min, max) { @@ -121,10 +125,10 @@ Phaser.Point.prototype = { }, /** - * Clamps this Point object values to be between the given min and max + * Clamps this Point object values to be between the given min and max. * @method clamp - * @param {Number} min The minimum value to clamp this Point to - * @param {Number} max The maximum value to clamp this Point to + * @param {number} min - The minimum value to clamp this Point to. + * @param {number} max - The maximum value to clamp this Point to. * @return {Phaser.Point} This Point object. */ clamp: function (min, max) { @@ -138,7 +142,7 @@ Phaser.Point.prototype = { /** * Creates a copy of the given Point. * @method clone - * @param {Phaser.Point} output Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned. + * @param {Phaser.Point} [output] Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned. * @return {Phaser.Point} The new Point object. */ clone: function (output) { @@ -177,9 +181,9 @@ Phaser.Point.prototype = { /** * Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) * @method distance - * @param {object} dest The target object. Must have visible x and y properties that represent the center of the object. - * @param {bool} [optional] round Round the distance to the nearest integer (default false) - * @return {Number} The distance between this Point object and the destination Point object. + * @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object. + * @param {bool} [round] - Round the distance to the nearest integer (default false). + * @return {number} The distance between this Point object and the destination Point object. */ distance: function (dest, round) { @@ -190,7 +194,7 @@ Phaser.Point.prototype = { /** * Determines whether the given objects x/y values are equal to this Point object. * @method equals - * @param {Phaser.Point} a The first object to compare. + * @param {Phaser.Point} a - The first object to compare. * @return {bool} A value of true if the Points are equal, otherwise false. */ equals: function (a) { @@ -200,12 +204,12 @@ Phaser.Point.prototype = { /** * Rotates this Point around the x/y coordinates given to the desired angle. * @method rotate - * @param {Number} x The x coordinate of the anchor point - * @param {Number} y The y coordinate of the anchor point - * @param {Number} angle The angle in radians (unless asDegrees is true) to rotate the Point to. - * @param {bool} asDegrees Is the given rotation in radians (false) or degrees (true)? - * @param {Number} distance An optional distance constraint between the Point and the anchor. - * @return {Phaser.Point} The modified point object + * @param {number} x - The x coordinate of the anchor point + * @param {number} y - The y coordinate of the anchor point + * @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to. + * @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)? + * @param {number} [distance] - An optional distance constraint between the Point and the anchor. + * @return {Phaser.Point} The modified point object. */ rotate: function (x, y, angle, asDegrees, distance) { return Phaser.Point.rotate(this, x, y, angle, asDegrees, distance); @@ -214,7 +218,7 @@ Phaser.Point.prototype = { /** * Returns a string representation of this object. * @method toString - * @return {string} a string representation of the instance. + * @return {string} A string representation of the instance. **/ toString: function () { return '[{Point (x=' + this.x + ' y=' + this.y + ')}]'; @@ -227,9 +231,9 @@ Phaser.Point.prototype = { /** * Adds the coordinates of two points together to create a new point. * @method add -* @param {Phaser.Point} a The first Point object. -* @param {Phaser.Point} b The second Point object. -* @param {Phaser.Point} out Optional Point to store the value in, if not supplied a new Point object will be created. +* @param {Phaser.Point} a - The first Point object. +* @param {Phaser.Point} b - The second Point object. +* @param {Phaser.Point} [out] - Optional Point to store the value in, if not supplied a new Point object will be created. * @return {Phaser.Point} The new Point object. */ Phaser.Point.add = function (a, b, out) { @@ -246,9 +250,9 @@ Phaser.Point.add = function (a, b, out) { /** * Subtracts the coordinates of two points to create a new point. * @method subtract -* @param {Phaser.Point} a The first Point object. -* @param {Phaser.Point} b The second Point object. -* @param {Phaser.Point} out Optional Point to store the value in, if not supplied a new Point object will be created. +* @param {Phaser.Point} a - The first Point object. +* @param {Phaser.Point} b - The second Point object. +* @param {Phaser.Point} [out] - Optional Point to store the value in, if not supplied a new Point object will be created. * @return {Phaser.Point} The new Point object. */ Phaser.Point.subtract = function (a, b, out) { @@ -265,9 +269,9 @@ Phaser.Point.subtract = function (a, b, out) { /** * Multiplies the coordinates of two points to create a new point. * @method subtract -* @param {Phaser.Point} a The first Point object. -* @param {Phaser.Point} b The second Point object. -* @param {Phaser.Point} out Optional Point to store the value in, if not supplied a new Point object will be created. +* @param {Phaser.Point} a - The first Point object. +* @param {Phaser.Point} b - The second Point object. +* @param {Phaser.Point} [out] - Optional Point to store the value in, if not supplied a new Point object will be created. * @return {Phaser.Point} The new Point object. */ Phaser.Point.multiply = function (a, b, out) { @@ -284,9 +288,9 @@ Phaser.Point.multiply = function (a, b, out) { /** * Divides the coordinates of two points to create a new point. * @method subtract -* @param {Phaser.Point} a The first Point object. -* @param {Phaser.Point} b The second Point object. -* @param {Phaser.Point} out Optional Point to store the value in, if not supplied a new Point object will be created. +* @param {Phaser.Point} a - The first Point object. +* @param {Phaser.Point} b - The second Point object. +* @param {Phaser.Point} [out] - Optional Point to store the value in, if not supplied a new Point object will be created. * @return {Phaser.Point} The new Point object. */ Phaser.Point.divide = function (a, b, out) { @@ -303,8 +307,8 @@ Phaser.Point.divide = function (a, b, out) { /** * Determines whether the two given Point objects are equal. They are considered equal if they have the same x and y values. * @method equals -* @param {Phaser.Point} a The first Point object. -* @param {Phaser.Point} b The second Point object. +* @param {Phaser.Point} a - The first Point object. +* @param {Phaser.Point} b - The second Point object. * @return {bool} A value of true if the Points are equal, otherwise false. */ Phaser.Point.equals = function (a, b) { @@ -312,11 +316,11 @@ Phaser.Point.equals = function (a, b) { }; /** -* Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) +* Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties). * @method distance -* @param {object} a The target object. Must have visible x and y properties that represent the center of the object. -* @param {object} b The target object. Must have visible x and y properties that represent the center of the object. -* @param {bool} [optional] round Round the distance to the nearest integer (default false) +* @param {object} a - The target object. Must have visible x and y properties that represent the center of the object. +* @param {object} b - The target object. Must have visible x and y properties that represent the center of the object. +* @param {bool} [round] - Round the distance to the nearest integer (default false). * @return {Number} The distance between this Point object and the destination Point object. */ Phaser.Point.distance = function (a, b, round) { @@ -337,13 +341,13 @@ Phaser.Point.distance = function (a, b, round) { /** * Rotates a Point around the x/y coordinates given to the desired angle. * @method rotate -* @param {Phaser.Point} a The Point object to rotate. -* @param {Number} x The x coordinate of the anchor point -* @param {Number} y The y coordinate of the anchor point -* @param {Number} angle The angle in radians (unless asDegrees is true) to rotate the Point to. -* @param {bool} asDegrees Is the given rotation in radians (false) or degrees (true)? -* @param {Number} distance An optional distance constraint between the Point and the anchor. -* @return {Phaser.Point} The modified point object +* @param {Phaser.Point} a - The Point object to rotate. +* @param {number} x - The x coordinate of the anchor point +* @param {number} y - The y coordinate of the anchor point +* @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to. +* @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)? +* @param {number} distance - An optional distance constraint between the Point and the anchor. +* @return {Phaser.Point} The modified point object. */ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) { diff --git a/src/geom/Rectangle.js b/src/geom/Rectangle.js index ca7de4f6..1a7894c5 100644 --- a/src/geom/Rectangle.js +++ b/src/geom/Rectangle.js @@ -1,13 +1,21 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Rectangle +*/ + + /** * Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters. If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created. * -* @class Rectangle +* @class Phaser.Rectangle * @constructor -* @param {Number} x The x coordinate of the top-left corner of the Rectangle. -* @param {Number} y The y coordinate of the top-left corner of the Rectangle. -* @param {Number} width The width of the Rectangle in pixels. -* @param {Number} height The height of the Rectangle in pixels. -* @return {Rectangle} This Rectangle object +* @param {number} x - The x coordinate of the top-left corner of the Rectangle. +* @param {number} y - The y coordinate of the top-left corner of the Rectangle. +* @param {number} width - The width of the Rectangle in pixels. +* @param {number} height - The height of the Rectangle in pixels. +* @return {Rectangle} This Rectangle object. **/ Phaser.Rectangle = function (x, y, width, height) { @@ -17,31 +25,23 @@ Phaser.Rectangle = function (x, y, width, height) { height = height || 0; /** - * @property x - * @type Number - * @default 0 - */ + * @property {number} x - Description. + */ this.x = x; /** - * @property y - * @type Number - * @default 0 - */ + * @property {number} y - Description. + */ this.y = y; /** - * @property width - * @type Number - * @default 0 - */ + * @property {number} width - Description. + */ this.width = width; /** - * @property height - * @type Number - * @default 0 - */ + * @property {number} height - Description. + */ this.height = height; }; @@ -51,8 +51,8 @@ Phaser.Rectangle.prototype = { /** * Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts. * @method offset - * @param {Number} dx Moves the x value of the Rectangle object by this amount. - * @param {Number} dy Moves the y value of the Rectangle object by this amount. + * @param {number} dx - Moves the x value of the Rectangle object by this amount. + * @param {number} dy - Moves the y value of the Rectangle object by this amount. * @return {Rectangle} This Rectangle object. **/ offset: function (dx, dy) { @@ -67,7 +67,7 @@ Phaser.Rectangle.prototype = { /** * Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter. * @method offsetPoint - * @param {Point} point A Point object to use to offset this Rectangle object. + * @param {Point} point - A Point object to use to offset this Rectangle object. * @return {Rectangle} This Rectangle object. **/ offsetPoint: function (point) { @@ -77,10 +77,10 @@ Phaser.Rectangle.prototype = { /** * Sets the members of Rectangle to the specified values. * @method setTo - * @param {Number} x The x coordinate of the top-left corner of the Rectangle. - * @param {Number} y The y coordinate of the top-left corner of the Rectangle. - * @param {Number} width The width of the Rectangle in pixels. - * @param {Number} height The height of the Rectangle in pixels. + * @param {number} x - The x coordinate of the top-left corner of the Rectangle. + * @param {number} y - The y coordinate of the top-left corner of the Rectangle. + * @param {number} width - The width of the Rectangle in pixels. + * @param {number} height - The height of the Rectangle in pixels. * @return {Rectangle} This Rectangle object **/ setTo: function (x, y, width, height) { @@ -135,8 +135,8 @@ Phaser.Rectangle.prototype = { /** * Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. * @method inflate - * @param {Number} dx The amount to be added to the left side of the Rectangle. - * @param {Number} dy The amount to be added to the bottom side of the Rectangle. + * @param {number} dx - The amount to be added to the left side of the Rectangle. + * @param {number} dy - The amount to be added to the bottom side of the Rectangle. * @return {Phaser.Rectangle} This Rectangle object. */ inflate: function (dx, dy) { @@ -146,8 +146,8 @@ Phaser.Rectangle.prototype = { /** * The size of the Rectangle object, expressed as a Point object with the values of the width and height properties. * @method size - * @param {Phaser.Point} output Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. - * @return {Phaser.Point} The size of the Rectangle object + * @param {Phaser.Point} [output] - Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. + * @return {Phaser.Point} The size of the Rectangle object. */ size: function (output) { return Phaser.Rectangle.size(this, output); @@ -156,8 +156,8 @@ Phaser.Rectangle.prototype = { /** * Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object. * @method clone - * @param {Phaser.Rectangle} output Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. - * @return {Phaser.Rectangle} + * @param {Phaser.Rectangle} [output] - Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. + * @return {Phaser.Rectangle} */ clone: function (output) { return Phaser.Rectangle.clone(this, output); @@ -166,8 +166,8 @@ Phaser.Rectangle.prototype = { /** * Determines whether the specified coordinates are contained within the region defined by this Rectangle object. * @method contains - * @param {Number} x The x coordinate of the point to test. - * @param {Number} y The y coordinate of the point to test. + * @param {number} x - The x coordinate of the point to test. + * @param {number} y - The y coordinate of the point to test. * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. */ contains: function (x, y) { @@ -178,7 +178,7 @@ Phaser.Rectangle.prototype = { * Determines whether the first Rectangle object is fully contained within the second Rectangle object. * A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. * @method containsRect - * @param {Phaser.Rectangle} b The second Rectangle object. + * @param {Phaser.Rectangle} b - The second Rectangle object. * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. */ containsRect: function (b) { @@ -189,7 +189,7 @@ Phaser.Rectangle.prototype = { * Determines whether the two Rectangles are equal. * This method compares the x, y, width and height properties of each Rectangle. * @method equals - * @param {Phaser.Rectangle} b The second Rectangle object. + * @param {Phaser.Rectangle} b - The second Rectangle object. * @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ equals: function (b) { @@ -199,8 +199,8 @@ Phaser.Rectangle.prototype = { /** * If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0. * @method intersection - * @param {Phaser.Rectangle} b The second Rectangle object. - * @param {Phaser.Rectangle} output Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. + * @param {Phaser.Rectangle} b - The second Rectangle object. + * @param {Phaser.Rectangle} out - Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. * @return {Phaser.Rectangle} A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0. */ intersection: function (b, out) { @@ -211,8 +211,8 @@ Phaser.Rectangle.prototype = { * Determines whether the two Rectangles intersect with each other. * This method checks the x, y, width, and height properties of the Rectangles. * @method intersects - * @param {Phaser.Rectangle} b The second Rectangle object. - * @param {Number} tolerance A tolerance value to allow for an intersection test with padding, default to 0 + * @param {Phaser.Rectangle} b - The second Rectangle object. + * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0. * @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ intersects: function (b, tolerance) { @@ -222,11 +222,11 @@ Phaser.Rectangle.prototype = { /** * Determines whether the object specified intersects (overlaps) with the given values. * @method intersectsRaw - * @param {Number} left - * @param {Number} right - * @param {Number} top - * @param {Number} bottomt - * @param {Number} tolerance A tolerance value to allow for an intersection test with padding, default to 0 + * @param {number} left - Description. + * @param {number} right - Description. + * @param {number} top - Description. + * @param {number} bottomt - Description. + * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 * @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false. */ intersectsRaw: function (left, right, top, bottom, tolerance) { @@ -236,8 +236,8 @@ Phaser.Rectangle.prototype = { /** * Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles. * @method union - * @param {Phaser.Rectangle} b The second Rectangle object. - * @param {Phaser.Rectangle} output Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. + * @param {Phaser.Rectangle} b - The second Rectangle object. + * @param {Phaser.Rectangle} [out] - Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. * @return {Phaser.Rectangle} A Rectangle object that is the union of the two Rectangles. */ union: function (b, out) { @@ -247,7 +247,7 @@ Phaser.Rectangle.prototype = { /** * Returns a string representation of this object. * @method toString - * @return {string} a string representation of the instance. + * @return {string} A string representation of the instance. **/ toString: function () { return "[{Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + " empty=" + this.empty + ")}]"; @@ -257,48 +257,43 @@ Phaser.Rectangle.prototype = { // Getters / Setters +/** +* Get half of the width of the Rectangle. +* @return {number} +*/ Object.defineProperty(Phaser.Rectangle.prototype, "halfWidth", { - /** - * Half of the width of the Rectangle - * @property halfWidth - * @type Number - **/ get: function () { return Math.round(this.width / 2); } }); +/** +* Get galf of the height of the Rectangle. +* @return {number} +*/ Object.defineProperty(Phaser.Rectangle.prototype, "halfHeight", { - /** - * Half of the height of the Rectangle - * @property halfHeight - * @type Number - **/ get: function () { return Math.round(this.height / 2); } }); +/** +* The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. +* @return {number} +*//** +* The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. +* @param {number} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "bottom", { - /** - * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. - * @method bottom - * @return {Number} - **/ get: function () { return this.y + this.height; }, - - /** - * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. - * @method bottom - * @param {Number} value - **/ + set: function (value) { if (value <= this.y) { this.height = 0; @@ -309,21 +304,19 @@ Object.defineProperty(Phaser.Rectangle.prototype, "bottom", { }); +/** +* Get the location of the Rectangles bottom right corner as a Point object. +* @return {Phaser.Point} +*//** +* Sets the bottom-right corner of the Rectangle, determined by the values of the given Point object. +* @param {Phaser.Point} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "bottomRight", { - /** - * Get the location of the Rectangles bottom right corner as a Point object. - * @return {Phaser.Point} The new Point object. - */ get: function () { return new Phaser.Point(this.right, this.bottom); }, - /** - * Sets the bottom-right corner of the Rectangle, determined by the values of the given Point object. - * @method bottomRight - * @param {Point} value - **/ set: function (value) { this.right = value.x; this.bottom = value.y; @@ -331,23 +324,19 @@ Object.defineProperty(Phaser.Rectangle.prototype, "bottomRight", { }); +/** +* The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. +* @return {number} +*//** +* The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties.* However it does affect the width, whereas changing the x value does not affect the width property. +* @param {number} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "left", { - - /** - * The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. - * @method left - * @ return {number} - **/ + get: function () { return this.x; }, - /** - * The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. - * However it does affect the width, whereas changing the x value does not affect the width property. - * @method left - * @param {Number} value - **/ set: function (value) { if (value >= this.right) { this.width = 0; @@ -359,24 +348,21 @@ Object.defineProperty(Phaser.Rectangle.prototype, "left", { }); +/** +* The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. +* However it does affect the width property. +* @return {number} +*//** +* The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. +* However it does affect the width property. +* @param {number} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "right", { - - /** - * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. - * However it does affect the width property. - * @method right - * @return {Number} - **/ + get: function () { return this.x + this.width; }, - /** - * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. - * However it does affect the width property. - * @method right - * @param {Number} value - **/ set: function (value) { if (value <= this.x) { this.width = 0; @@ -387,94 +373,83 @@ Object.defineProperty(Phaser.Rectangle.prototype, "right", { }); +/** +* The volume of the Rectangle derived from width * height. +* @return {number} +*/ Object.defineProperty(Phaser.Rectangle.prototype, "volume", { - - /** - * The volume of the Rectangle derived from width * height - * @method volume - * @return {Number} - **/ + get: function () { return this.width * this.height; } }); +/** +* The perimeter size of the Rectangle. This is the sum of all 4 sides. +* @return {number} +*/ Object.defineProperty(Phaser.Rectangle.prototype, "perimeter", { - /** - * The perimeter size of the Rectangle. This is the sum of all 4 sides. - * @method perimeter - * @return {Number} - **/ get: function () { return (this.width * 2) + (this.height * 2); } }); +/** +* The x coordinate of the center of the Rectangle. +* @return {number} +*//** +* The x coordinate of the center of the Rectangle. +* @param {number} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "centerX", { - /** - * The x coordinate of the center of the Rectangle. - * @method centerX - * @return {Number} - **/ get: function () { return this.x + this.halfWidth; }, - /** - * The x coordinate of the center of the Rectangle. - * @method centerX - * @param {Number} value - **/ set: function (value) { this.x = value - this.halfWidth; } }); +/** +* The y coordinate of the center of the Rectangle. +* @return {number} +*//** +* The y coordinate of the center of the Rectangle. +* @param {number} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "centerY", { - /** - * The y coordinate of the center of the Rectangle. - * @method centerY - * @return {Number} - **/ get: function () { return this.y + this.halfHeight; }, - /** - * The y coordinate of the center of the Rectangle. - * @method centerY - * @param {Number} value - **/ set: function (value) { this.y = value - this.halfHeight; } }); +/** +* The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. +* However it does affect the height property, whereas changing the y value does not affect the height property. +* @return {number} +*//** +* The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. + * However it does affect the height property, whereas changing the y value does not affect the height property. +* @param {number} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "top", { - /** - * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. - * However it does affect the height property, whereas changing the y value does not affect the height property. - * @method top - * @return {Number} - **/ get: function () { return this.y; }, - /** - * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. - * However it does affect the height property, whereas changing the y value does not affect the height property. - * @method top - * @param {Number} value - **/ set: function (value) { if (value >= this.bottom) { this.height = 0; @@ -486,21 +461,19 @@ Object.defineProperty(Phaser.Rectangle.prototype, "top", { }); +/** +* Get the location of the Rectangles top left corner as a Point object. +* @return {Phaser.Point} +*//** +* The location of the Rectangles top-left corner, determined by the x and y coordinates of the Point. +* @param {Phaser.Point} value - Description. +*/ Object.defineProperty(Phaser.Rectangle.prototype, "topLeft", { - /** - * Get the location of the Rectangles top left corner as a Point object. - * @return {Phaser.Point} The new Point object. - */ get: function () { return new Phaser.Point(this.x, this.y); }, - - /** - * The location of the Rectangles top-left corner, determined by the x and y coordinates of the Point. - * @method topLeft - * @param {Point} value - **/ + set: function (value) { this.x = value.x; this.y = value.y; @@ -508,22 +481,19 @@ Object.defineProperty(Phaser.Rectangle.prototype, "topLeft", { }); +/** +* Determines whether or not this Rectangle object is empty. +* @return {bool} +*//** +* Sets all of the Rectangle object's properties to 0. A Rectangle object is empty if its width or height is less than or equal to 0. +* @param {Description} value +*/ Object.defineProperty(Phaser.Rectangle.prototype, "empty", { - /** - * Determines whether or not this Rectangle object is empty. - * @method isEmpty - * @return {bool} A value of true if the Rectangle objects width or height is less than or equal to 0; otherwise false. - **/ get: function () { return (!this.width || !this.height); }, - /** - * Sets all of the Rectangle object's properties to 0. A Rectangle object is empty if its width or height is less than or equal to 0. - * @method setEmpty - * @return {Rectangle} This Rectangle object - **/ set: function (value) { this.setTo(0, 0, 0, 0); } @@ -535,9 +505,9 @@ Object.defineProperty(Phaser.Rectangle.prototype, "empty", { /** * Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. * @method inflate -* @param {Phaser.Rectangle} a The Rectangle object. -* @param {Number} dx The amount to be added to the left side of the Rectangle. -* @param {Number} dy The amount to be added to the bottom side of the Rectangle. +* @param {Phaser.Rectangle} a - The Rectangle object. +* @param {Number} dx - The amount to be added to the left side of the Rectangle. +* @param {Number} dy - The amount to be added to the bottom side of the Rectangle. * @return {Phaser.Rectangle} This Rectangle object. */ Phaser.Rectangle.inflate = function (a, dx, dy) { @@ -551,8 +521,8 @@ Phaser.Rectangle.inflate = function (a, dx, dy) { /** * Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter. * @method inflatePoint -* @param {Phaser.Rectangle} a The Rectangle object. -* @param {Phaser.Point} point The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object. +* @param {Phaser.Rectangle} a - The Rectangle object. +* @param {Phaser.Point} point - The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object. * @return {Phaser.Rectangle} The Rectangle object. */ Phaser.Rectangle.inflatePoint = function (a, point) { @@ -562,8 +532,8 @@ Phaser.Rectangle.inflatePoint = function (a, point) { /** * The size of the Rectangle object, expressed as a Point object with the values of the width and height properties. * @method size -* @param {Phaser.Rectangle} a The Rectangle object. -* @param {Phaser.Point} output Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. +* @param {Phaser.Rectangle} a - The Rectangle object. +* @param {Phaser.Point} [output] - Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. * @return {Phaser.Point} The size of the Rectangle object */ Phaser.Rectangle.size = function (a, output) { @@ -574,8 +544,8 @@ Phaser.Rectangle.size = function (a, output) { /** * Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object. * @method clone -* @param {Phaser.Rectangle} a The Rectangle object. -* @param {Phaser.Rectangle} output Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. +* @param {Phaser.Rectangle} a - The Rectangle object. +* @param {Phaser.Rectangle} [output] - Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. * @return {Phaser.Rectangle} */ Phaser.Rectangle.clone = function (a, output) { @@ -586,9 +556,9 @@ Phaser.Rectangle.clone = function (a, output) { /** * Determines whether the specified coordinates are contained within the region defined by this Rectangle object. * @method contains -* @param {Phaser.Rectangle} a The Rectangle object. -* @param {Number} x The x coordinate of the point to test. -* @param {Number} y The y coordinate of the point to test. +* @param {Phaser.Rectangle} a - The Rectangle object. +* @param {number} x - The x coordinate of the point to test. +* @param {number} y - The y coordinate of the point to test. * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.contains = function (a, x, y) { @@ -598,8 +568,8 @@ Phaser.Rectangle.contains = function (a, x, y) { /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter. * @method containsPoint -* @param {Phaser.Rectangle} a The Rectangle object. -* @param {Phaser.Point} point The point object being checked. Can be Point or any object with .x and .y values. +* @param {Phaser.Rectangle} a - The Rectangle object. +* @param {Phaser.Point} point - The point object being checked. Can be Point or any object with .x and .y values. * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsPoint = function (a, point) { @@ -610,8 +580,8 @@ Phaser.Rectangle.containsPoint = function (a, point) { * Determines whether the first Rectangle object is fully contained within the second Rectangle object. * A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. * @method containsRect -* @param {Phaser.Rectangle} a The first Rectangle object. -* @param {Phaser.Rectangle} b The second Rectangle object. +* @param {Phaser.Rectangle} a - The first Rectangle object. +* @param {Phaser.Rectangle} b - The second Rectangle object. * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsRect = function (a, b) { @@ -630,8 +600,8 @@ Phaser.Rectangle.containsRect = function (a, b) { * Determines whether the two Rectangles are equal. * This method compares the x, y, width and height properties of each Rectangle. * @method equals -* @param {Phaser.Rectangle} a The first Rectangle object. -* @param {Phaser.Rectangle} b The second Rectangle object. +* @param {Phaser.Rectangle} a - The first Rectangle object. +* @param {Phaser.Rectangle} b - The second Rectangle object. * @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ Phaser.Rectangle.equals = function (a, b) { @@ -641,14 +611,14 @@ Phaser.Rectangle.equals = function (a, b) { /** * If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0. * @method intersection -* @param {Phaser.Rectangle} a The first Rectangle object. -* @param {Phaser.Rectangle} b The second Rectangle object. -* @param {Phaser.Rectangle} output Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. +* @param {Phaser.Rectangle} a - The first Rectangle object. +* @param {Phaser.Rectangle} b - The second Rectangle object. +* @param {Phaser.Rectangle} [out] - Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. * @return {Phaser.Rectangle} A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0. */ Phaser.Rectangle.intersection = function (a, b, out) { - out = out || new Phaser.Rectangle; + out = out || new Phaser.Rectangle; if (Phaser.Rectangle.intersects(a, b)) { @@ -666,9 +636,9 @@ Phaser.Rectangle.intersection = function (a, b, out) { * Determines whether the two Rectangles intersect with each other. * This method checks the x, y, width, and height properties of the Rectangles. * @method intersects -* @param {Phaser.Rectangle} a The first Rectangle object. -* @param {Phaser.Rectangle} b The second Rectangle object. -* @param {Number} tolerance A tolerance value to allow for an intersection test with padding, default to 0 +* @param {Phaser.Rectangle} a - The first Rectangle object. +* @param {Phaser.Rectangle} b - The second Rectangle object. +* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 * @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ Phaser.Rectangle.intersects = function (a, b, tolerance) { @@ -682,11 +652,11 @@ Phaser.Rectangle.intersects = function (a, b, tolerance) { /** * Determines whether the object specified intersects (overlaps) with the given values. * @method intersectsRaw -* @param {Number} left -* @param {Number} right -* @param {Number} top -* @param {Number} bottomt -* @param {Number} tolerance A tolerance value to allow for an intersection test with padding, default to 0 +* @param {number} left - Description. +* @param {number} right - Description. +* @param {number} top - Description. +* @param {number} bottom - Description. +* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 * @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false. */ Phaser.Rectangle.intersectsRaw = function (a, left, right, top, bottom, tolerance) { @@ -700,9 +670,9 @@ Phaser.Rectangle.intersectsRaw = function (a, left, right, top, bottom, toleranc /** * Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles. * @method union -* @param {Phaser.Rectangle} a The first Rectangle object. -* @param {Phaser.Rectangle} b The second Rectangle object. -* @param {Phaser.Rectangle} output Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. +* @param {Phaser.Rectangle} a - The first Rectangle object. +* @param {Phaser.Rectangle} b - The second Rectangle object. +* @param {Phaser.Rectangle} [out] - Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. * @return {Phaser.Rectangle} A Rectangle object that is the union of the two Rectangles. */ Phaser.Rectangle.union = function (a, b, out) { diff --git a/src/input/Input.js b/src/input/Input.js index a4075192..9a1ec1ef 100644 --- a/src/input/Input.js +++ b/src/input/Input.js @@ -1,14 +1,35 @@ /** -* Phaser.Input -* -* A game specific Input manager that looks after the mouse, keyboard and touch objects. +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Input +*/ + +/** +* Constructor for Phaser Input. +* @class Phaser.Input +* @classdesc A game specific Input manager that looks after the mouse, keyboard and touch objects. * This is updated by the core game loop. +* @constructor +* @param {Phaser.Game} game - Current game instance. */ Phaser.Input = function (game) { + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + /** + * @property {Description} hitCanvas - Description. + * @default + */ this.hitCanvas = null; + + /** + * @property {Description} hitContext - Description. + * @default + */ this.hitContext = null; }; @@ -19,124 +40,141 @@ Phaser.Input.MOUSE_TOUCH_COMBINE = 2; Phaser.Input.prototype = { + /** + * @property {Phaser.Game} game + */ game: null, /** * How often should the input pointers be checked for updates? * A value of 0 means every single frame (60fps), a value of 1 means every other frame (30fps) and so on. - * @type {number} + * @property {number} pollRate + * @default */ pollRate: 0, + + /** + * @property {number} _pollCounter - Description. + * @private + * @default + */ _pollCounter: 0, /** * A vector object representing the previous position of the Pointer. - * @property vector - * @type {Vec2} + * @property {Vec2} vector + * @default **/ _oldPosition: null, /** * X coordinate of the most recent Pointer event - * @type {Number} + * @property {number} _x * @private + * @default */ _x: 0, /** - * X coordinate of the most recent Pointer event - * @type {Number} + * Y coordinate of the most recent Pointer event + * @property {number} _y * @private + * @default */ _y: 0, /** * You can disable all Input by setting Input.disabled: true. While set all new input related events will be ignored. * If you need to disable just one type of input, for example mouse, use Input.mouse.disabled: true instead - * @type {bool} + * @property {bool} disabled + * @default */ disabled: false, /** - * Controls the expected behaviour when using a mouse and touch together on a multi-input device + * Controls the expected behaviour when using a mouse and touch together on a multi-input device. + * @property {Description} multiInputOverride */ multiInputOverride: Phaser.Input.MOUSE_TOUCH_COMBINE, /** * A vector object representing the current position of the Pointer. - * @property vector - * @type {Vec2} + * @property {Vec2} position + * @default **/ position: null, /** * A vector object representing the speed of the Pointer. Only really useful in single Pointer games, * otherwise see the Pointer objects directly. - * @property vector - * @type {Vec2} + * @property {Vec2} speed + * @default **/ speed: null, /** * A Circle object centered on the x/y screen coordinates of the Input. * Default size of 44px (Apples recommended "finger tip" size) but can be changed to anything - * @property circle - * @type {Circle} + * @property {Circle} circle + * @default **/ circle: null, /** * The scale by which all input coordinates are multiplied, calculated by the StageScaleMode. * In an un-scaled game the values will be x: 1 and y: 1. - * @type {Vec2} + * @property {Vec2} scale + * @default */ scale: null, /** * The maximum number of Pointers allowed to be active at any one time. - * For lots of games it's useful to set this to 1 - * @type {Number} + * For lots of games it's useful to set this to 1. + * @property {number} maxPointers + * @default */ maxPointers: 10, /** * The current number of active Pointers. - * @type {Number} + * @property {number} currentPointers + * @default */ currentPointers: 0, /** - * The number of milliseconds that the Pointer has to be pressed down and then released to be considered a tap or click - * @property tapRate - * @type {Number} + * The number of milliseconds that the Pointer has to be pressed down and then released to be considered a tap or clicke + * @property {number} tapRate + * @default **/ tapRate: 200, /** * The number of milliseconds between taps of the same Pointer for it to be considered a double tap / click - * @property doubleTapRate - * @type {Number} + * @property {number} doubleTapRate + * @default **/ doubleTapRate: 300, /** * The number of milliseconds that the Pointer has to be pressed down for it to fire a onHold event - * @property holdRate - * @type {Number} + * @property {number} holdRate + * @default **/ holdRate: 2000, /** * The number of milliseconds below which the Pointer is considered justPressed - * @property justPressedRate - * @type {Number} + * @property {number} justPressedRate + * @default **/ justPressedRate: 200, /** - * The number of milliseconds below which the Pointer is considered justReleased - * @property justReleasedRate - * @type {Number} + * The number of milliseconds below which the Pointer is considered justReleased + * @property {number} justReleasedRate + * @default **/ justReleasedRate: 200, @@ -144,120 +182,162 @@ Phaser.Input.prototype = { * Sets if the Pointer objects should record a history of x/y coordinates they have passed through. * The history is cleared each time the Pointer is pressed down. * The history is updated at the rate specified in Input.pollRate - * @property recordPointerHistory - * @type {bool} + * @property {bool} recordPointerHistory + * @default **/ recordPointerHistory: false, /** * The rate in milliseconds at which the Pointer objects should update their tracking history - * @property recordRate - * @type {Number} + * @property {number} recordRate + * @default */ recordRate: 100, /** * The total number of entries that can be recorded into the Pointer objects tracking history. * If the Pointer is tracking one event every 100ms, then a trackLimit of 100 would store the last 10 seconds worth of history. - * @property recordLimit - * @type {Number} + * @property {number} recordLimit + * @default */ recordLimit: 100, /** * A Pointer object - * @property pointer1 - * @type {Pointer} + * @property {Pointer} pointer1 **/ pointer1: null, /** * A Pointer object - * @property pointer2 - * @type {Pointer} + * @property {Pointer} pointer2 **/ pointer2: null, /** - * A Pointer object - * @property pointer3 - * @type {Pointer} + * A Pointer object + * @property {Pointer} pointer3 **/ pointer3: null, /** * A Pointer object - * @property pointer4 - * @type {Pointer} + * @property {Pointer} pointer4 **/ pointer4: null, /** * A Pointer object - * @property pointer5 - * @type {Pointer} + * @property {Pointer} pointer5 **/ pointer5: null, /** * A Pointer object - * @property pointer6 - * @type {Pointer} + * @property {Pointer} pointer6 **/ pointer6: null, /** - * A Pointer object - * @property pointer7 - * @type {Pointer} + * A Pointer object + * @property {Pointer} pointer7 **/ pointer7: null, /** * A Pointer object - * @property pointer8 - * @type {Pointer} + * @property {Pointer} pointer8 **/ pointer8: null, /** * A Pointer object - * @property pointer9 - * @type {Pointer} - **/ + * @property {Pointer} pointer9 + **/ pointer9: null, /** - * A Pointer object - * @property pointer10 - * @type {Pointer} + * A Pointer object. + * @property {Pointer} pointer10 **/ pointer10: null, /** * The most recently active Pointer object. * When you've limited max pointers to 1 this will accurately be either the first finger touched or mouse. - * @property activePointer - * @type {Pointer} + * @property {Pointer} activePointer + * @default **/ activePointer: null, + /** + * Description. + * @property {Pointer} mousePointer + * @default + **/ mousePointer: null, + + /** + * Description. + * @property {Description} mouse + * @default + **/ mouse: null, + + /** + * Description. + * @property {Description} keyboard + * @default + **/ keyboard: null, + + /** + * Description. + * @property {Description} touch + * @default + **/ touch: null, + + /** + * Description. + * @property {Description} mspointer + * @default + **/ mspointer: null, + /** + * Description. + * @property {Description} onDown + * @default + **/ onDown: null, + + /** + * Description. + * @property {Description} onUp + * @default + **/ onUp: null, + + /** + * Description. + * @property {Description} onTap + * @default + **/ onTap: null, + + /** + * Description. + * @property {Description} onHold + * @default + **/ onHold: null, // A linked list of interactive objects, the InputHandler components (belong to Sprites) register themselves with this interactiveItems: new Phaser.LinkedList(), /** - * Starts the Input Manager running + * Starts the Input Manager running. * @method start **/ boot: function () { @@ -303,7 +383,7 @@ Phaser.Input.prototype = { * Add a new Pointer object to the Input Manager. By default Input creates 2 pointer objects for you. If you need more * use this to create a new one, up to a maximum of 10. * @method addPointer - * @return {Pointer} A reference to the new Pointer object + * @return {Pointer} A reference to the new Pointer object. **/ addPointer: function () { @@ -361,13 +441,12 @@ Phaser.Input.prototype = { if (this.pointer10) { this.pointer10.update(); } this._pollCounter = 0; - }, /** * Reset all of the Pointers and Input states * @method reset - * @param hard {bool} A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will. + * @param {bool} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will. **/ reset: function (hard) { @@ -420,8 +499,8 @@ Phaser.Input.prototype = { /** * Find the first free Pointer object and start it, passing in the event data. * @method startPointer - * @param {Any} event The event data from the Touch event - * @return {Pointer} The Pointer object that was started or null if no Pointer object is available + * @param {Any} event - The event data from the Touch event. + * @return {Pointer} The Pointer object that was started or null if no Pointer object is available. **/ startPointer: function (event) { @@ -456,8 +535,8 @@ Phaser.Input.prototype = { /** * Updates the matching Pointer object, passing in the event data. * @method updatePointer - * @param {Any} event The event data from the Touch event - * @return {Pointer} The Pointer object that was updated or null if no Pointer object is available + * @param {Any} event - The event data from the Touch event. + * @return {Pointer} The Pointer object that was updated or null if no Pointer object is available. **/ updatePointer: function (event) { @@ -487,8 +566,8 @@ Phaser.Input.prototype = { /** * Stops the matching Pointer object, passing in the event data. * @method stopPointer - * @param {Any} event The event data from the Touch event - * @return {Pointer} The Pointer object that was stopped or null if no Pointer object is available + * @param {Any} event - The event data from the Touch event. + * @return {Pointer} The Pointer object that was stopped or null if no Pointer object is available. **/ stopPointer: function (event) { @@ -518,7 +597,7 @@ Phaser.Input.prototype = { /** * Get the next Pointer object whos active property matches the given state * @method getPointer - * @param {bool} state The state the Pointer should be in (false for inactive, true for active) + * @param {bool} state - The state the Pointer should be in (false for inactive, true for active). * @return {Pointer} A Pointer object or null if no Pointer object matches the requested state. **/ getPointer: function (state) { @@ -549,9 +628,9 @@ Phaser.Input.prototype = { }, /** - * Get the Pointer object whos identified property matches the given identifier value + * Get the Pointer object whos identified property matches the given identifier value. * @method getPointerFromIdentifier - * @param {Number} identifier The Pointer.identifier value to search for + * @param {number} identifier - The Pointer.identifier value to search for. * @return {Pointer} A Pointer object or null if no Pointer object matches the requested identifier. **/ getPointerFromIdentifier: function (identifier) { @@ -580,20 +659,22 @@ Phaser.Input.prototype = { }, /** - * Get the distance between two Pointer objects + * Get the distance between two Pointer objects. * @method getDistance * @param {Pointer} pointer1 * @param {Pointer} pointer2 + * @return {Description} Description. **/ getDistance: function (pointer1, pointer2) { // return Phaser.Vec2Utils.distance(pointer1.position, pointer2.position); }, /** - * Get the angle between two Pointer objects + * Get the angle between two Pointer objects. * @method getAngle * @param {Pointer} pointer1 * @param {Pointer} pointer2 + * @return {Description} Description. **/ getAngle: function (pointer1, pointer2) { // return Phaser.Vec2Utils.angle(pointer1.position, pointer2.position); @@ -603,14 +684,16 @@ Phaser.Input.prototype = { // Getters / Setters +/** +* The X coordinate of the most recently active pointer. +* This value takes game scaling into account automatically. See Pointer.screenX/clientX for source values. +* @return {number} +*//** +* Set +* @param {number} value - Description. +*/ Object.defineProperty(Phaser.Input.prototype, "x", { - /** - * The X coordinate of the most recently active pointer. - * This value takes game scaling into account automatically. See Pointer.screenX/clientX for source values. - * @property x - * @type {Number} - **/ get: function () { return this._x; }, @@ -621,14 +704,16 @@ Object.defineProperty(Phaser.Input.prototype, "x", { }); +/** +* The Y coordinate of the most recently active pointer. + * This value takes game scaling into account automatically. See Pointer.screenY/clientY for source values. +* @return {number} +*//** +* Set +* @param {number} value - Description. +*/ Object.defineProperty(Phaser.Input.prototype, "y", { - /** - * The Y coordinate of the most recently active pointer. - * This value takes game scaling into account automatically. See Pointer.screenY/clientY for source values. - * @property y - * @type {Number} - **/ get: function () { return this._y; }, @@ -639,6 +724,10 @@ Object.defineProperty(Phaser.Input.prototype, "y", { }); +/** +* Get +* @return {Description} Description. +*/ Object.defineProperty(Phaser.Input.prototype, "pollLocked", { get: function () { @@ -647,26 +736,24 @@ Object.defineProperty(Phaser.Input.prototype, "pollLocked", { }); +/** +* Get the total number of inactive Pointers +* @return {number} The number of Pointers currently inactive. +*/ Object.defineProperty(Phaser.Input.prototype, "totalInactivePointers", { - /** - * Get the total number of inactive Pointers - * @method totalInactivePointers - * @return {Number} The number of Pointers currently inactive - **/ get: function () { return 10 - this.currentPointers; } }); +/** +* Recalculates the total number of active Pointers +* @return {number} The number of Pointers currently active. +*/ Object.defineProperty(Phaser.Input.prototype, "totalActivePointers", { - /** - * Recalculates the total number of active Pointers - * @method totalActivePointers - * @return {Number} The number of Pointers currently active - **/ get: function () { this.currentPointers = 0; @@ -685,6 +772,10 @@ Object.defineProperty(Phaser.Input.prototype, "totalActivePointers", { }); +/** +* Get +* @return {Description} +*/ Object.defineProperty(Phaser.Input.prototype, "worldX", { get: function () { @@ -693,6 +784,10 @@ Object.defineProperty(Phaser.Input.prototype, "worldX", { }); +/** +* Get +* @return {Description} +*/ Object.defineProperty(Phaser.Input.prototype, "worldY", { get: function () { diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 2430d12a..4a55dc60 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -1,71 +1,174 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.InputHandler +*/ + +/** +* Constructor for Phaser InputHandler. +* @class Phaser.InputHandler +* @classdesc Description. +* @constructor +* @param {Phaser.Sprite} game - Description. +*/ Phaser.InputHandler = function (sprite) { + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = sprite.game; + + /** + * @property {Phaser.Sprite} sprite - Description. + */ this.sprite = sprite; + /** + * @property {bool} enabled - Description. + * @default + */ this.enabled = false; // Linked list references + /** + * @property {Description} parent - Description. + * @default + */ this.parent = null; + + /** + * @property {Description} next - Description. + * @default + */ this.next = null; + + /** + * @property {Description} prev - Description. + * @default + */ this.prev = null; + + /** + * @property {Description} last - Description. + * @default + */ this.last = this; + + /** + * @property {Description} first - Description. + * @default + */ this.first = this; - /** - * The PriorityID controls which Sprite receives an Input event first if they should overlap. - */ + /** + * @property {number} priorityID - The PriorityID controls which Sprite receives an Input event first if they should overlap. + * @default + */ this.priorityID = 0; + + /** + * @property {bool} useHandCursor - Description. + * @default + */ this.useHandCursor = false; + /** + * @property {bool} isDragged - Description. + * @default + */ this.isDragged = false; + + /** + * @property {bool} allowHorizontalDrag - Description. + * @default + */ this.allowHorizontalDrag = true; + + /** + * @property {bool} allowVerticalDrag - Description. + * @default + */ this.allowVerticalDrag = true; + + /** + * @property {bool} bringToTop - Description. + * @default + */ this.bringToTop = false; + /** + * @property {Description} snapOffset - Description. + * @default + */ this.snapOffset = null; + + /** + * @property {bool} snapOnDrag - Description. + * @default + */ this.snapOnDrag = false; + + /** + * @property {bool} snapOnRelease - Description. + * @default + */ this.snapOnRelease = false; + + /** + * @property {number} snapX - Description. + * @default + */ this.snapX = 0; + + /** + * @property {number} snapY - Description. + * @default + */ this.snapY = 0; - /** - * Should we use pixel perfect hit detection? Warning: expensive. Only enable if you really need it! - * @default false - */ + /** + * @property {number} pixelPerfect - Should we use pixel perfect hit detection? Warning: expensive. Only enable if you really need it! + * @default + */ this.pixelPerfect = false; /** - * The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit. - * @default 255 + * @property {number} pixelPerfectAlpha - The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit. + * @default */ this.pixelPerfectAlpha = 255; /** - * Is this sprite allowed to be dragged by the mouse? true = yes, false = no - * @default false + * @property {bool} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no + * @default */ this.draggable = false; /** - * A region of the game world within which the sprite is restricted during drag - * @default null + * @property {Description} boundsRect - A region of the game world within which the sprite is restricted during drag. + * @default */ this.boundsRect = null; /** - * An Sprite the bounds of which this sprite is restricted during drag - * @default null + * @property {Description} boundsSprite - A Sprite the bounds of which this sprite is restricted during drag. + * @default */ this.boundsSprite = null; /** * If this object is set to consume the pointer event then it will stop all propogation from this object on. * For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it. - * @type {bool} + * @property {bool} consumePointerEvent + * @default */ this.consumePointerEvent = false; + /** + * @property {Phaser.Point} _tempPoint - Description. + * @private + */ this._tempPoint = new Phaser.Point; this._pointerData = []; @@ -90,6 +193,13 @@ Phaser.InputHandler = function (sprite) { Phaser.InputHandler.prototype = { + /** + * Description. + * @method start + * @param {number} priority - Description. + * @param {bool} useHandCursor - Description. + * @return {Phaser.Sprite} Description. + */ start: function (priority, useHandCursor) { priority = priority || 0; @@ -141,6 +251,10 @@ Phaser.InputHandler.prototype = { }, + /** + * Description. + * @method reset + */ reset: function () { this.enabled = false; @@ -165,6 +279,10 @@ Phaser.InputHandler.prototype = { } }, + /** + * Description. + * @method stop + */ stop: function () { // Turning off @@ -182,8 +300,9 @@ Phaser.InputHandler.prototype = { }, /** - * Clean up memory. - */ + * Clean up memory. + * @method destroy + */ destroy: function () { if (this.enabled) @@ -198,7 +317,9 @@ Phaser.InputHandler.prototype = { /** * The x coordinate of the Input pointer, relative to the top-left of the parent Sprite. * This value is only set when the pointer is over this Sprite. - * @type {number} + * @method pointerX + * @param {Pointer} pointer + * @return {number} The x coordinate of the Input pointer. */ pointerX: function (pointer) { @@ -211,7 +332,9 @@ Phaser.InputHandler.prototype = { /** * The y coordinate of the Input pointer, relative to the top-left of the parent Sprite * This value is only set when the pointer is over this Sprite. - * @type {number} + * @method pointerY + * @param {Pointer} pointer + * @return {number} The y coordinate of the Input pointer. */ pointerY: function (pointer) { @@ -222,10 +345,11 @@ Phaser.InputHandler.prototype = { }, /** - * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true - * @property isDown - * @type {bool} - **/ + * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true. + * @method pointerDown + * @param {Pointer} pointer + * @return {bool} + */ pointerDown: function (pointer) { pointer = pointer || 0; @@ -236,9 +360,10 @@ Phaser.InputHandler.prototype = { /** * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true - * @property isUp - * @type {bool} - **/ + * @method pointerUp + * @param {Pointer} pointer + * @return {bool} + */ pointerUp: function (pointer) { pointer = pointer || 0; @@ -249,9 +374,10 @@ Phaser.InputHandler.prototype = { /** * A timestamp representing when the Pointer first touched the touchscreen. - * @property timeDown - * @type {Number} - **/ + * @method pointerTimeDown + * @param {Pointer} pointer + * @return {number} + */ pointerTimeDown: function (pointer) { pointer = pointer || 0; @@ -262,9 +388,10 @@ Phaser.InputHandler.prototype = { /** * A timestamp representing when the Pointer left the touchscreen. - * @property timeUp - * @type {Number} - **/ + * @method pointerTimeUp + * @param {Pointer} pointer + * @return {number} + */ pointerTimeUp: function (pointer) { pointer = pointer || 0; @@ -274,10 +401,11 @@ Phaser.InputHandler.prototype = { }, /** - * Is the Pointer over this Sprite - * @property isOver - * @type {bool} - **/ + * Is the Pointer over this Sprite? + * @method pointerOver + * @param {Pointer} pointer + * @return {bool + */ pointerOver: function (pointer) { pointer = pointer || 0; @@ -287,10 +415,11 @@ Phaser.InputHandler.prototype = { }, /** - * Is the Pointer outside of this Sprite - * @property isOut - * @type {bool} - **/ + * Is the Pointer outside of this Sprite? + * @method pointerOut + * @param {Pointer} pointer + * @return {bool} + */ pointerOut: function (pointer) { pointer = pointer || 0; @@ -301,9 +430,10 @@ Phaser.InputHandler.prototype = { /** * A timestamp representing when the Pointer first touched the touchscreen. - * @property timeDown - * @type {Number} - **/ + * @method pointerTimeOver + * @param {Pointer} pointer + * @return {number} + */ pointerTimeOver: function (pointer) { pointer = pointer || 0; @@ -314,9 +444,10 @@ Phaser.InputHandler.prototype = { /** * A timestamp representing when the Pointer left the touchscreen. - * @property timeUp - * @type {Number} - **/ + * @method pointerTimeOut + * @param {Pointer} pointer + * @return {number} + */ pointerTimeOut: function (pointer) { pointer = pointer || 0; @@ -327,7 +458,9 @@ Phaser.InputHandler.prototype = { /** * Is this sprite being dragged by the mouse or not? - * @default false + * @method pointerTimeOut + * @param {Pointer} pointer + * @return {number} */ pointerDragged: function (pointer) { @@ -339,6 +472,9 @@ Phaser.InputHandler.prototype = { /** * Checks if the given pointer is over this Sprite. + * @method checkPointerOver + * @param {Pointer} pointer + * @return {bool} */ checkPointerOver: function (pointer) { @@ -372,6 +508,13 @@ Phaser.InputHandler.prototype = { }, + /** + * Description. + * @method checkPixel + * @param {Description} x - Description. + * @param {Description} y - Description. + * @return {bool} + */ checkPixel: function (x, y) { x += (this.sprite.texture.frame.width * this.sprite.anchor.x); @@ -399,7 +542,9 @@ Phaser.InputHandler.prototype = { }, /** - * Update + * Update. + * @method update + * @param {Pointer} pointer */ update: function (pointer) { @@ -429,6 +574,12 @@ Phaser.InputHandler.prototype = { } }, + /** + * Description. + * @method _pointerOverHandler + * @private + * @param {Pointer} pointer + */ _pointerOverHandler: function (pointer) { if (this._pointerData[pointer.id].isOver == false) @@ -448,6 +599,12 @@ Phaser.InputHandler.prototype = { } }, + /** + * Description. + * @method _pointerOutHandler + * @private + * @param {Pointer} pointer + */ _pointerOutHandler: function (pointer) { this._pointerData[pointer.id].isOver = false; @@ -463,6 +620,12 @@ Phaser.InputHandler.prototype = { }, + /** + * Description. + * @method _touchedHandler + * @private + * @param {Pointer} pointer + */ _touchedHandler: function (pointer) { if (this._pointerData[pointer.id].isDown == false && this._pointerData[pointer.id].isOver == true) @@ -489,6 +652,12 @@ Phaser.InputHandler.prototype = { }, + /** + * Description. + * @method _releasedHandler + * @private + * @param {Pointer} pointer + */ _releasedHandler: function (pointer) { // If was previously touched by this Pointer, check if still is AND still over this item @@ -525,6 +694,9 @@ Phaser.InputHandler.prototype = { /** * Updates the Pointer drag on this Sprite. + * @method updateDrag + * @param {Pointer} pointer + * @return {bool} */ updateDrag: function (pointer) { @@ -566,8 +738,10 @@ Phaser.InputHandler.prototype = { /** * Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second) - * @param delay The time below which the pointer is considered as just over. - * @returns {bool} + * @method justOver + * @param {Pointer} pointer + * @param {number} delay - The time below which the pointer is considered as just over. + * @return {bool} */ justOver: function (pointer, delay) { @@ -580,8 +754,10 @@ Phaser.InputHandler.prototype = { /** * Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second) - * @param delay The time below which the pointer is considered as just out. - * @returns {bool} + * @method justOut + * @param {Pointer} pointer + * @param {number} delay - The time below which the pointer is considered as just out. + * @return {bool} */ justOut: function (pointer, delay) { @@ -594,8 +770,10 @@ Phaser.InputHandler.prototype = { /** * Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second) - * @param delay The time below which the pointer is considered as just over. - * @returns {bool} + * @method justPressed + * @param {Pointer} pointer + * @param {number} delay - The time below which the pointer is considered as just over. + * @return {bool} */ justPressed: function (pointer, delay) { @@ -608,8 +786,10 @@ Phaser.InputHandler.prototype = { /** * Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second) - * @param delay The time below which the pointer is considered as just out. - * @returns {bool} + * @method justReleased + * @param {Pointer} pointer + * @param {number} delay - The time below which the pointer is considered as just out. + * @return {bool} */ justReleased: function (pointer, delay) { @@ -622,7 +802,9 @@ Phaser.InputHandler.prototype = { /** * If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds. - * @returns {number} The number of milliseconds the pointer has been over the Sprite, or -1 if not over. + * @method overDuration + * @param {Pointer} pointer + * @return {number} The number of milliseconds the pointer has been over the Sprite, or -1 if not over. */ overDuration: function (pointer) { @@ -639,7 +821,9 @@ Phaser.InputHandler.prototype = { /** * If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds. - * @returns {number} The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over. + * @method downDuration + * @param {Pointer} pointer + * @return {number} The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over. */ downDuration: function (pointer) { @@ -656,7 +840,7 @@ Phaser.InputHandler.prototype = { /** * Make this Sprite draggable by the mouse. You can also optionally set mouseStartDragCallback and mouseStopDragCallback - * + * @method enableDrag * @param lockCenter If false the Sprite will drag from where you click it minus the dragOffset. If true it will center itself to the tip of the mouse pointer. * @param bringToTop If true the Sprite will be bought to the top of the rendering list in its current Group. * @param pixelPerfect If true it will use a pixel perfect test to see if you clicked the Sprite. False uses the bounding box. @@ -697,6 +881,7 @@ Phaser.InputHandler.prototype = { /** * Stops this sprite from being able to be dragged. If it is currently the target of an active drag it will be stopped immediately. Also disables any set callbacks. + * @method disableDrag */ disableDrag: function () { @@ -716,6 +901,7 @@ Phaser.InputHandler.prototype = { /** * Called by Pointer when drag starts on this Sprite. Should not usually be called directly. + * @method startDrag */ startDrag: function (pointer) { @@ -746,6 +932,7 @@ Phaser.InputHandler.prototype = { /** * Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly. + * @method stopDrag */ stopDrag: function (pointer) { @@ -766,7 +953,7 @@ Phaser.InputHandler.prototype = { /** * Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move! - * + * @method setDragLock * @param allowHorizontal To enable the sprite to be dragged horizontally set to true, otherwise false * @param allowVertical To enable the sprite to be dragged vertically set to true, otherwise false */ @@ -783,7 +970,7 @@ Phaser.InputHandler.prototype = { /** * Make this Sprite snap to the given grid either during drag or when it's released. * For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels. - * + * @method enableSnap * @param snapX The width of the grid cell in pixels * @param snapY The height of the grid cell in pixels * @param onDrag If true the sprite will snap to the grid while being dragged @@ -803,6 +990,7 @@ Phaser.InputHandler.prototype = { /** * Stops the sprite from snapping to a grid during drag or release. + * @method disableSnap */ disableSnap: function () { @@ -813,6 +1001,7 @@ Phaser.InputHandler.prototype = { /** * Bounds Rect check for the sprite drag + * @method checkBoundsRect */ checkBoundsRect: function () { @@ -837,7 +1026,8 @@ Phaser.InputHandler.prototype = { }, /** - * Parent Sprite Bounds check for the sprite drag + * Parent Sprite Bounds check for the sprite drag. + * @method checkBoundsSprite */ checkBoundsSprite: function () { diff --git a/src/input/Keyboard.js b/src/input/Keyboard.js index c19ad892..a65e3f14 100644 --- a/src/input/Keyboard.js +++ b/src/input/Keyboard.js @@ -1,8 +1,36 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Keyboard +*/ + + +/** +* Phaser - Keyboard constructor. +* +* @class Phaser.Keyboard +* @classdesc A Keyboard object Description. +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +*/ Phaser.Keyboard = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + + /** + * @property {Description} _keys - Description. + * @private + */ this._keys = {}; - this._hotkeys = {}; + + /** + * @property {Description} _capture - Description. + * @private + */ this._capture = {}; this.callbackContext = this; @@ -16,42 +44,38 @@ Phaser.Keyboard = function (game) { Phaser.Keyboard.prototype = { + /** + * @property {Phaser.Game} game - Local reference to game. + */ game: null, /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @type {bool} + * @default + * @property {bool} disabled */ disabled: false, + /** + * Description. + * @property {Description} _onKeyDown + * @private + * @default + */ _onKeyDown: null, + + /** + * Description. + * @property {Description} _onKeyUp + * @private + * @default + */ _onKeyUp: null, - addCallbacks: function (context, onDown, onUp) { - - this.callbackContext = context; - this.onDownCallback = onDown; - - if (typeof onUp !== 'undefined') - { - this.onUpCallback = onUp; - } - - }, - - addKey: function (keycode) { - - this._hotkeys[keycode] = new Phaser.Key(this.game, keycode); - return this._hotkeys[keycode]; - - }, - - removeKey: function (keycode) { - - delete (this._hotkeys[keycode]); - - }, - + /** + * Description. + * @method start + */ start: function () { var _this = this; @@ -69,6 +93,10 @@ Phaser.Keyboard.prototype = { }, + /** + * Description. + * @method stop + */ stop: function () { document.body.removeEventListener('keydown', this._onKeyDown); @@ -81,6 +109,7 @@ Phaser.Keyboard.prototype = { * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll. * You can use addKeyCapture to consume the keyboard event for specific keys so it doesn't bubble up to the the browser. * Pass in either a single keycode or an array/hash of keycodes. + * @method addKeyCapture * @param {Any} keycode */ addKeyCapture: function (keycode) { @@ -99,7 +128,9 @@ Phaser.Keyboard.prototype = { }, /** - * @param {Number} keycode + * Description. + * @method removeKeyCapture + * @param {number} keycode */ removeKeyCapture: function (keycode) { @@ -107,14 +138,19 @@ Phaser.Keyboard.prototype = { }, + /** + * Description. + * @method clearCaptures + */ clearCaptures: function () { this._capture = {}; }, - /** + * Description. + * @method processKeyDown * @param {KeyboardEvent} event */ processKeyDown: function (event) { @@ -168,6 +204,8 @@ Phaser.Keyboard.prototype = { }, /** + * Description. + * @method processKeyUp * @param {KeyboardEvent} event */ processKeyUp: function (event) { @@ -197,6 +235,10 @@ Phaser.Keyboard.prototype = { }, + /** + * Description. + * @method reset + */ reset: function () { for (var key in this._keys) @@ -207,8 +249,10 @@ Phaser.Keyboard.prototype = { }, /** - * @param {Number} keycode - * @param {Number} [duration] + * Description. + * @method justPressed + * @param {number} keycode + * @param {number} [duration] * @return {bool} */ justPressed: function (keycode, duration) { @@ -224,9 +268,11 @@ Phaser.Keyboard.prototype = { }, - /** - * @param {Number} keycode - * @param {Number} [duration] + /** + * Description. + * @method justReleased + * @param {number} keycode + * @param {number} [duration] * @return {bool} */ justReleased: function (keycode, duration) { @@ -242,8 +288,10 @@ Phaser.Keyboard.prototype = { }, - /** - * @param {Number} keycode + /** + * Description. + * @method isDown + * @param {number} keycode * @return {bool} */ isDown: function (keycode) { diff --git a/src/input/MSPointer.js b/src/input/MSPointer.js index d6ffa313..1016a098 100644 --- a/src/input/MSPointer.js +++ b/src/input/MSPointer.js @@ -1,37 +1,92 @@ /** -* Phaser.MSPointer +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.MSPointer +*/ + + +/** +* Phaser - MSPointer constructor. * -* The MSPointer class handles touch interactions with the game and the resulting Pointer objects. +* @class Phaser.MSPointer +* @classdesc The MSPointer class handles touch interactions with the game and the resulting Pointer objects. * It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 apps using JavaScript. * http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.MSPointer = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + + /** + * @property {Phaser.Game} callbackContext - Description. + */ this.callbackContext = this.game; + /** + * @property {Description} mouseDownCallback - Description. + * @default + */ this.mouseDownCallback = null; + + /** + * @property {Description} mouseMoveCallback - Description. + * @default + */ this.mouseMoveCallback = null; + + /** + * @property {Description} mouseUpCallback - Description. + * @default + */ this.mouseUpCallback = null; }; Phaser.MSPointer.prototype = { + /** + * @property {Phaser.Game} game - Local reference to game. + */ game: null, /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @type {bool} + * @property {bool} disabled */ disabled: false, + /** + * Description. + * @property {Description} _onMSPointerDown + * @private + * @default + */ _onMSPointerDown: null, + + /** + * Description. + * @property {Description} _onMSPointerMove + * @private + * @default + */ _onMSPointerMove: null, + + /** + * Description. + * @property {Description} _onMSPointerUp + * @private + * @default + */ _onMSPointerUp: null, /** - * Starts the event listeners running + * Starts the event listeners running. * @method start */ start: function () { @@ -64,6 +119,7 @@ Phaser.MSPointer.prototype = { }, /** + * Description. * @method onPointerDown * @param {Any} event **/ @@ -82,6 +138,7 @@ Phaser.MSPointer.prototype = { }, /** + * Description. * @method onPointerMove * @param {Any} event **/ @@ -100,6 +157,7 @@ Phaser.MSPointer.prototype = { }, /** + * Description. * @method onPointerUp * @param {Any} event **/ @@ -118,7 +176,7 @@ Phaser.MSPointer.prototype = { }, /** - * Stop the event listeners + * Stop the event listeners. * @method stop */ stop: function () { diff --git a/src/input/Mouse.js b/src/input/Mouse.js index 2c762435..bf78e3c8 100644 --- a/src/input/Mouse.js +++ b/src/input/Mouse.js @@ -1,10 +1,47 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Mouse +*/ + + +/** +* Phaser - Mouse constructor. +* +* @class Phaser.Mouse +* @classdesc The Mouse class +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +*/ Phaser.Mouse = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + + /** + * @property {Phaser.Game} callbackContext - Description. + */ this.callbackContext = this.game; + /** + * @property {Description} mouseDownCallback - Description. + * @default + */ this.mouseDownCallback = null; + + /** + * @property {Description} mouseMoveCallback - Description. + * @default + */ this.mouseMoveCallback = null; + + /** + * @property {Description} mouseUpCallback - Description. + * @default + */ this.mouseUpCallback = null; }; @@ -15,22 +52,27 @@ Phaser.Mouse.RIGHT_BUTTON = 2; Phaser.Mouse.prototype = { + /** + * @property {Phaser.Game} game - Local reference to game. + */ game: null, /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @type {bool} + * @property {bool} disabled + * @default */ disabled: false, /** * If the mouse has been Pointer Locked successfully this will be set to true. - * @type {bool} + * @property {bool} locked + * @default */ locked: false, /** - * Starts the event listeners running + * Starts the event listeners running. * @method start */ start: function () { @@ -62,6 +104,8 @@ Phaser.Mouse.prototype = { }, /** + * Description. + * @method onMouseDown * @param {MouseEvent} event */ onMouseDown: function (event) { @@ -83,6 +127,8 @@ Phaser.Mouse.prototype = { }, /** + * Description + * @method onMouseMove * @param {MouseEvent} event */ onMouseMove: function (event) { @@ -104,6 +150,8 @@ Phaser.Mouse.prototype = { }, /** + * Description. + * @method onMouseUp * @param {MouseEvent} event */ onMouseUp: function (event) { @@ -124,6 +172,10 @@ Phaser.Mouse.prototype = { }, + /** + * Description. + * @method requestPointerLock + */ requestPointerLock: function () { if (this.game.device.pointerLock) @@ -147,6 +199,11 @@ Phaser.Mouse.prototype = { }, + /** + * Description. + * @method pointerLockChange + * @param {MouseEvent} event + */ pointerLockChange: function (event) { var element = this.game.stage.canvas; @@ -164,6 +221,10 @@ Phaser.Mouse.prototype = { }, + /** + * Description. + * @method releasePointerLock + */ releasePointerLock: function () { document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock; @@ -177,7 +238,7 @@ Phaser.Mouse.prototype = { }, /** - * Stop the event listeners + * Stop the event listeners. * @method stop */ stop: function () { diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 658385fc..dc0b4785 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -1,193 +1,232 @@ /** -* Phaser - Pointer +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Pointer +*/ + +/** +* Phaser - Pointer constructor. * -* A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen. +* @class Phaser.Pointer +* @classdesc A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen. +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Description} id - Description. */ Phaser.Pointer = function (game, id) { /** - * Local private variable to store the status of dispatching a hold event - * @property _holdSent - * @type {bool} + * Local private variable to store the status of dispatching a hold event. + * @property {bool} _holdSent * @private + * @default */ this._holdSent = false; /** - * Local private variable storing the short-term history of pointer movements - * @property _history - * @type {Array} + * Local private variable storing the short-term history of pointer movements. + * @property {array} _history * @private */ this._history = []; /** * Local private variable storing the time at which the next history drop should occur - * @property _lastDrop - * @type {Number} + * @property {number} _lastDrop * @private + * @default */ this._nextDrop = 0; - // Monitor events outside of a state reset loop + /** + * Monitor events outside of a state reset loop. + * @property {bool} _stateReset + * @private + * @default + */ this._stateReset = false; /** * A Vector object containing the initial position when the Pointer was engaged with the screen. - * @property positionDown - * @type {Vec2} + * @property {Vec2} positionDown + * @default **/ this.positionDown = null; /** * A Vector object containing the current position of the Pointer on the screen. - * @property position - * @type {Vec2} + * @property {Vec2} position + * @default **/ this.position = null; /** * A Circle object centered on the x/y screen coordinates of the Pointer. - * Default size of 44px (Apple's recommended "finger tip" size) - * @property circle - * @type {Circle} + * Default size of 44px (Apple's recommended "finger tip" size). + * @property {Circle} circle + * @default **/ this.circle = null; /** - * - * @property withinGame - * @type {bool} + * Description. + * @property {bool} withinGame */ this.withinGame = false; /** - * The horizontal coordinate of point relative to the viewport in pixels, excluding any scroll offset - * @property clientX - * @type {Number} + * The horizontal coordinate of point relative to the viewport in pixels, excluding any scroll offset. + * @property {number} clientX + * @default */ this.clientX = -1; /** - * The vertical coordinate of point relative to the viewport in pixels, excluding any scroll offset - * @property clientY - * @type {Number} + * The vertical coordinate of point relative to the viewport in pixels, excluding any scroll offset. + * @property {number} clientY + * @default */ this.clientY = -1; /** - * The horizontal coordinate of point relative to the viewport in pixels, including any scroll offset - * @property pageX - * @type {Number} + * The horizontal coordinate of point relative to the viewport in pixels, including any scroll offset. + * @property {number} pageX + * @default */ this.pageX = -1; /** - * The vertical coordinate of point relative to the viewport in pixels, including any scroll offset - * @property pageY - * @type {Number} + * The vertical coordinate of point relative to the viewport in pixels, including any scroll offset. + * @property {number} pageY + * @default */ this.pageY = -1; /** - * The horizontal coordinate of point relative to the screen in pixels - * @property screenX - * @type {Number} + * The horizontal coordinate of point relative to the screen in pixels. + * @property {number} screenX + * @default */ this.screenX = -1; /** - * The vertical coordinate of point relative to the screen in pixels - * @property screenY - * @type {Number} + * The vertical coordinate of point relative to the screen in pixels. + * @property {number} screenY + * @default */ this.screenY = -1; /** * The horizontal coordinate of point relative to the game element. This value is automatically scaled based on game size. - * @property x - * @type {Number} + * @property {number} x + * @default */ this.x = -1; /** * The vertical coordinate of point relative to the game element. This value is automatically scaled based on game size. - * @property y - * @type {Number} + * @property {number} y + * @default */ this.y = -1; /** - * If the Pointer is a mouse this is true, otherwise false - * @property isMouse + * If the Pointer is a mouse this is true, otherwise false. + * @property {bool} isMouse * @type {bool} - **/ + */ this.isMouse = false; /** - * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true - * @property isDown - * @type {bool} - **/ + * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true. + * @property {bool} isDown + * @default + */ this.isDown = false; /** - * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true - * @property isUp - * @type {bool} - **/ + * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true. + * @property {bool} isUp + * @default + */ this.isUp = true; /** * A timestamp representing when the Pointer first touched the touchscreen. - * @property timeDown - * @type {Number} - **/ + * @property {number} timeDown + * @default + */ this.timeDown = 0; /** * A timestamp representing when the Pointer left the touchscreen. - * @property timeUp - * @type {Number} - **/ + * @property {number} timeUp + * @default + */ this.timeUp = 0; /** - * A timestamp representing when the Pointer was last tapped or clicked - * @property previousTapTime - * @type {Number} - **/ + * A timestamp representing when the Pointer was last tapped or clicked. + * @property {number} previousTapTime + * @default + */ this.previousTapTime = 0; /** - * The total number of times this Pointer has been touched to the touchscreen - * @property totalTouches - * @type {Number} - **/ + * The total number of times this Pointer has been touched to the touchscreen. + * @property {number} totalTouches + * @default + */ this.totalTouches = 0; /** - * The number of miliseconds since the last click - * @property msSinceLastClick - * @type {Number} - **/ + * The number of miliseconds since the last click. + * @property {number} msSinceLastClick + * @default + */ this.msSinceLastClick = Number.MAX_VALUE; /** * The Game Object this Pointer is currently over / touching / dragging. - * @property targetObject - * @type {Any} - **/ + * @property {Any} targetObject + * @default + */ this.targetObject = null; + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + + /** + * @property {Description} id - Description. + */ this.id = id; + /** + * Description. + * @property {bool} isDown - Description. + * @default + */ this.active = false; + /** + * Description + * @property {Phaser.Point} position + */ this.position = new Phaser.Point(); + + /** + * Description + * @property {Phaser.Point} positionDown + */ this.positionDown = new Phaser.Point(); + /** + * Description + * @property {Phaser.Circle} circle + */ this.circle = new Phaser.Circle(0, 0, 44); if (id == 0) @@ -200,7 +239,7 @@ Phaser.Pointer = function (game, id) { Phaser.Pointer.prototype = { /** - * Called when the Pointer is pressed onto the touchscreen + * Called when the Pointer is pressed onto the touchscreen. * @method start * @param {Any} event */ @@ -264,6 +303,10 @@ Phaser.Pointer.prototype = { }, + /** + * Description. + * @method update + */ update: function () { if (this.active) @@ -438,7 +481,7 @@ Phaser.Pointer.prototype = { }, /** - * Called when the Pointer leaves the target area + * Called when the Pointer leaves the target area. * @method leave * @param {Any} event */ @@ -450,7 +493,7 @@ Phaser.Pointer.prototype = { }, /** - * Called when the Pointer leaves the touchscreen + * Called when the Pointer leaves the touchscreen. * @method stop * @param {Any} event */ @@ -529,9 +572,9 @@ Phaser.Pointer.prototype = { }, /** - * The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate + * The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate. * @method justPressed - * @param {Number} [duration]. + * @param {number} [duration] * @return {bool} */ justPressed: function (duration) { @@ -543,9 +586,9 @@ Phaser.Pointer.prototype = { }, /** - * The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate + * The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate. * @method justReleased - * @param {Number} [duration]. + * @param {number} [duration] * @return {bool} */ justReleased: function (duration) { @@ -587,7 +630,7 @@ Phaser.Pointer.prototype = { /** * Returns a string representation of this object. * @method toString - * @return {String} a string representation of the instance. + * @return {string} A string representation of the instance. **/ toString: function () { return "[{Pointer (id=" + this.id + " identifer=" + this.identifier + " active=" + this.active + " duration=" + this.duration + " withinGame=" + this.withinGame + " x=" + this.x + " y=" + this.y + " clientX=" + this.clientX + " clientY=" + this.clientY + " screenX=" + this.screenX + " screenY=" + this.screenY + " pageX=" + this.pageX + " pageY=" + this.pageY + ")}]"; @@ -595,13 +638,12 @@ Phaser.Pointer.prototype = { }; +/** +* How long the Pointer has been depressed on the touchscreen. If not currently down it returns -1. +* @return {number} +*/ Object.defineProperty(Phaser.Pointer.prototype, "duration", { - /** - * How long the Pointer has been depressed on the touchscreen. If not currently down it returns -1. - * @property duration - * @type {Number} - **/ get: function () { if (this.isUp) @@ -615,12 +657,12 @@ Object.defineProperty(Phaser.Pointer.prototype, "duration", { }); +/** + * Gets the X value of this Pointer in world coordinates based on the given camera. + * @return {Description} + */ Object.defineProperty(Phaser.Pointer.prototype, "worldX", { - /** - * Gets the X value of this Pointer in world coordinates based on the given camera. - * @param {Camera} [camera] - */ get: function () { return this.game.world.camera.x + this.x; @@ -629,12 +671,12 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldX", { }); +/** + * Gets the Y value of this Pointer in world coordinates based on the given camera. + * @return {Description} + */ Object.defineProperty(Phaser.Pointer.prototype, "worldY", { - /** - * Gets the Y value of this Pointer in world coordinates based on the given camera. - * @param {Camera} [camera] - */ get: function () { return this.game.world.camera.y + this.y; diff --git a/src/input/Touch.js b/src/input/Touch.js index 155129ab..b680fc89 100644 --- a/src/input/Touch.js +++ b/src/input/Touch.js @@ -1,24 +1,75 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Touch +*/ + /** * Phaser - Touch * -* The Touch class handles touch interactions with the game and the resulting Pointer objects. -* http://www.w3.org/TR/touch-events/ -* https://developer.mozilla.org/en-US/docs/DOM/TouchList -* http://www.html5rocks.com/en/mobile/touchandmouse/ -* Note: Android 2.x only supports 1 touch event at once, no multi-touch +* @class +* +* @classdesc The Touch class handles touch interactions with the game and the resulting Pointer objects. +* {@link http://www.w3.org/TR/touch-events/} +* {@link https://developer.mozilla.org/en-US/docs/DOM/TouchList} +* {@link http://www.html5rocks.com/en/mobile/touchandmouse/} +*

    Note: Android 2.x only supports 1 touch event at once, no multi-touch. +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.Touch = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + + /** + * @property {Phaser.Game} callbackContext - Description. + */ this.callbackContext = this.game; + /** + * @property {Phaser.Game} touchStartCallback - Description. + * @default + */ this.touchStartCallback = null; + + /** + * @property {Phaser.Game} touchMoveCallback - Description. + * @default + */ this.touchMoveCallback = null; + + /** + * @property {Phaser.Game} touchEndCallback - Description. + * @default + */ this.touchEndCallback = null; + + /** + * @property {Phaser.Game} touchEnterCallback - Description. + * @default + */ this.touchEnterCallback = null; + + /** + * @property {Phaser.Game} touchLeaveCallback - Description. + * @default + */ this.touchLeaveCallback = null; + + /** + * @property {Description} touchCancelCallback - Description. + * @default + */ this.touchCancelCallback = null; - + + /** + * @property {bool} preventDefault - Description. + * @default + */ this.preventDefault = true; }; @@ -29,7 +80,8 @@ Phaser.Touch.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @type {bool} + * @method disabled + * @return {bool} */ disabled: false, @@ -42,7 +94,7 @@ Phaser.Touch.prototype = { _onTouchMove: null, /** - * Starts the event listeners running + * Starts the event listeners running. * @method start */ start: function () { @@ -86,9 +138,8 @@ Phaser.Touch.prototype = { }, /** - * Consumes all touchmove events on the document (only enable this if you know you need it!) + * Consumes all touchmove events on the document (only enable this if you know you need it!). * @method consumeTouchMove - * @param {Any} event **/ consumeDocumentTouches: function () { @@ -101,7 +152,7 @@ Phaser.Touch.prototype = { }, /** - * + * Description. * @method onTouchStart * @param {Any} event **/ @@ -133,8 +184,8 @@ Phaser.Touch.prototype = { }, /** - * Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome) - * Occurs for example on iOS when you put down 4 fingers and the app selector UI appears + * Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome). + * Occurs for example on iOS when you put down 4 fingers and the app selector UI appears. * @method onTouchCancel * @param {Any} event **/ @@ -165,8 +216,8 @@ Phaser.Touch.prototype = { }, /** - * For touch enter and leave its a list of the touch points that have entered or left the target - * Doesn't appear to be supported by most browsers on a canvas element yet + * For touch enter and leave its a list of the touch points that have entered or left the target. + * Doesn't appear to be supported by most browsers on a canvas element yet. * @method onTouchEnter * @param {Any} event **/ @@ -195,8 +246,8 @@ Phaser.Touch.prototype = { }, /** - * For touch enter and leave its a list of the touch points that have entered or left the target - * Doesn't appear to be supported by most browsers on a canvas element yet + * For touch enter and leave its a list of the touch points that have entered or left the target. + * Doesn't appear to be supported by most browsers on a canvas element yet. * @method onTouchLeave * @param {Any} event **/ @@ -220,7 +271,7 @@ Phaser.Touch.prototype = { }, /** - * + * Description. * @method onTouchMove * @param {Any} event **/ @@ -244,7 +295,7 @@ Phaser.Touch.prototype = { }, /** - * + * Description. * @method onTouchEnd * @param {Any} event **/ @@ -271,7 +322,7 @@ Phaser.Touch.prototype = { }, /** - * Stop the event listeners + * Stop the event listeners. * @method stop */ stop: function () { diff --git a/src/loader/Cache.js b/src/loader/Cache.js index bba57f00..5998b59d 100644 --- a/src/loader/Cache.js +++ b/src/loader/Cache.js @@ -1,60 +1,68 @@ /** -* Cache +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Cache +*/ + +/** +* Phaser.Cache constructor. * -* A game only has one instance of a Cache and it is used to store all externally loaded assets such +* @class Phaser.Cache +* @classdesc A game only has one instance of a Cache and it is used to store all externally loaded assets such * as images, sounds and data files as a result of Loader calls. Cache items use string based keys for look-up. -* -* @package Phaser.Cache -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.Cache = function (game) { /** - * Local reference to Game. - */ + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; - /** - * Canvas key-value container. - * @type {object} - * @private - */ + /** + * @property {object} game - Canvas key-value container. + * @private + */ this._canvases = {}; /** - * Image key-value container. - * @type {object} - */ + * @property {object} _images - Image key-value container. + * @private + */ this._images = {}; /** - * RenderTexture key-value container. - * @type {object} - */ + * @property {object} _textures - RenderTexture key-value container. + * @private + */ this._textures = {}; /** - * Sound key-value container. - * @type {object} - */ + * @property {object} _sounds - Sound key-value container. + * @private + */ this._sounds = {}; /** - * Text key-value container. - * @type {object} - */ + * @property {object} _text - Text key-value container. + * @private + */ this._text = {}; /** - * Tilemap key-value container. - * @type {object} - */ + * @property {object} _tilemaps - Tilemap key-value container. + * @private + */ this._tilemaps = {}; + this.addDefaultImage(); + /** + * @property {Phaser.Signal} onSoundUnlock - Description. + */ this.onSoundUnlock = new Phaser.Signal; }; @@ -63,9 +71,9 @@ Phaser.Cache.prototype = { /** * Add a new canvas. - * @param key {string} Asset key for this canvas. - * @param canvas {HTMLCanvasElement} Canvas DOM element. - * @param context {CanvasRenderingContext2D} Render context of this canvas. + * @param {string} key - Asset key for this canvas. + * @param {HTMLCanvasElement} canvas - Canvas DOM element. + * @param {CanvasRenderingContext2D} context - Render context of this canvas. */ addCanvas: function (key, canvas, context) { @@ -88,12 +96,12 @@ Phaser.Cache.prototype = { /** * Add a new sprite sheet. - * @param key {string} Asset key for the sprite sheet. - * @param url {string} URL of this sprite sheet file. - * @param data {object} Extra sprite sheet data. - * @param frameWidth {number} Width of the sprite sheet. - * @param frameHeight {number} Height of the sprite sheet. - * @param frameMax {number} How many frames stored in the sprite sheet. + * @param {string} key - Asset key for the sprite sheet. + * @param {string} url - URL of this sprite sheet file. + * @param {object} data - Extra sprite sheet data. + * @param {number} frameWidth - Width of the sprite sheet. + * @param {number} frameHeight - Height of the sprite sheet. + * @param {number} frameMax - How many frames stored in the sprite sheet. */ addSpriteSheet: function (key, url, data, frameWidth, frameHeight, frameMax) { @@ -108,10 +116,10 @@ Phaser.Cache.prototype = { /** * Add a new tilemap. - * @param key {string} Asset key for the texture atlas. - * @param url {string} URL of this texture atlas file. - * @param data {object} Extra texture atlas data. - * @param atlasData {object} Texture atlas frames data. + * @param {string} key - Asset key for the texture atlas. + * @param {string} url - URL of this texture atlas file. + * @param {object} data - Extra texture atlas data. + * @param {object} atlasData - Texture atlas frames data. */ addTilemap: function (key, url, data, mapData, format) { @@ -124,10 +132,11 @@ Phaser.Cache.prototype = { /** * Add a new texture atlas. - * @param key {string} Asset key for the texture atlas. - * @param url {string} URL of this texture atlas file. - * @param data {object} Extra texture atlas data. - * @param atlasData {object} Texture atlas frames data. + * @param {string} key - Asset key for the texture atlas. + * @param {string} url - URL of this texture atlas file. + * @param {object} data - Extra texture atlas data. + * @param {object} atlasData - Texture atlas frames data. + * @param {Description} format - Description. */ addTextureAtlas: function (key, url, data, atlasData, format) { @@ -153,9 +162,9 @@ Phaser.Cache.prototype = { /** * Add a new Bitmap Font. - * @param key {string} Asset key for the font texture. - * @param url {string} URL of this font xml file. - * @param data {object} Extra font data. + * @param {string} key - Asset key for the font texture. + * @param {string} url - URL of this font xml file. + * @param {object} data - Extra font data. * @param xmlData {object} Texture atlas frames data. */ addBitmapFont: function (key, url, data, xmlData) { @@ -173,6 +182,7 @@ Phaser.Cache.prototype = { /** * Adds a default image to be used when a key is wrong / missing. * Is mapped to the key __default + * @method addDefaultImage */ addDefaultImage: function () { @@ -191,9 +201,10 @@ Phaser.Cache.prototype = { /** * Add a new image. - * @param key {string} Asset key for the image. - * @param url {string} URL of this image file. - * @param data {object} Extra image data. + * @method addImage + * @param {string} key - Asset key for the image. + * @param {string} url - URL of this image file. + * @param {object} data - Extra image data. */ addImage: function (key, url, data) { @@ -207,9 +218,10 @@ Phaser.Cache.prototype = { /** * Add a new sound. - * @param key {string} Asset key for the sound. - * @param url {string} URL of this sound file. - * @param data {object} Extra sound data. + * @method addSound + * @param {string} key - Asset key for the sound. + * @param {string} url - URL of this sound file. + * @param {object} data - Extra sound data. */ addSound: function (key, url, data, webAudio, audioTag) { @@ -228,6 +240,11 @@ Phaser.Cache.prototype = { }, + /** + * Reload a sound. + * @method reloadSound + * @param {string} key - Asset key for the sound. + */ reloadSound: function (key) { var _this = this; @@ -244,6 +261,11 @@ Phaser.Cache.prototype = { } }, + /** + * Description. + * @method reloadSoundComplete + * @param {string} key - Asset key for the sound. + */ reloadSoundComplete: function (key) { if (this._sounds[key]) @@ -254,6 +276,11 @@ Phaser.Cache.prototype = { }, + /** + * Description. + * @method updateSound + * @param {string} key - Asset key for the sound. + */ updateSound: function (key, property, value) { if (this._sounds[key]) @@ -265,8 +292,8 @@ Phaser.Cache.prototype = { /** * Add a new decoded sound. - * @param key {string} Asset key for the sound. - * @param data {object} Extra sound data. + * @param {string} key - Asset key for the sound. + * @param {object} data - Extra sound data. */ decodedSound: function (key, data) { @@ -278,9 +305,9 @@ Phaser.Cache.prototype = { /** * Add a new text data. - * @param key {string} Asset key for the text data. - * @param url {string} URL of this text data file. - * @param data {object} Extra text data. + * @param {string} key - Asset key for the text data. + * @param {string} url - URL of this text data file. + * @param {object} data - Extra text data. */ addText: function (key, url, data) { @@ -293,7 +320,7 @@ Phaser.Cache.prototype = { /** * Get canvas by key. - * @param key Asset key of the canvas you want. + * @param {string} key - Asset key of the canvas you want. * @return {object} The canvas you want. */ getCanvas: function (key) { @@ -308,8 +335,8 @@ Phaser.Cache.prototype = { /** * Checks if an image key exists. - * @param key Asset key of the image you want. - * @return {boolean} True if the key exists, otherwise false. + * @param {string} key - Asset key of the image you want. + * @return {bool} True if the key exists, otherwise false. */ checkImageKey: function (key) { @@ -324,7 +351,7 @@ Phaser.Cache.prototype = { /** * Get image data by key. - * @param key Asset key of the image you want. + * @param {string} key - Asset key of the image you want. * @return {object} The image data you want. */ getImage: function (key) { @@ -339,7 +366,7 @@ Phaser.Cache.prototype = { /** * Get tilemap data by key. - * @param key Asset key of the tilemap you want. + * @param {string} key - Asset key of the tilemap you want. * @return {object} The tilemap data. The tileset image is in the data property, the map data in mapData. */ getTilemap: function (key) { @@ -354,7 +381,7 @@ Phaser.Cache.prototype = { /** * Get frame data by key. - * @param key Asset key of the frame data you want. + * @param {string} key - Asset key of the frame data you want. * @return {object} The frame data you want. */ getFrameData: function (key) { @@ -369,7 +396,7 @@ Phaser.Cache.prototype = { /** * Get a single frame out of a frameData set by key. - * @param key Asset key of the frame data you want. + * @param {string} key - Asset key of the frame data you want. * @return {object} The frame data you want. */ getFrameByIndex: function (key, frame) { @@ -384,7 +411,7 @@ Phaser.Cache.prototype = { /** * Get a single frame out of a frameData set by key. - * @param key Asset key of the frame data you want. + * @param {string} key - Asset key of the frame data you want. * @return {object} The frame data you want. */ getFrameByName: function (key, frame) { @@ -399,7 +426,7 @@ Phaser.Cache.prototype = { /** * Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image. - * @param key Asset key of the frame data you want. + * @param {string} key - Asset key of the frame data you want. * @return {object} The frame data you want. */ getFrame: function (key) { @@ -414,7 +441,7 @@ Phaser.Cache.prototype = { /** * Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image. - * @param key Asset key of the frame data you want. + * @param {string} key - Asset key of the frame data you want. * @return {object} The frame data you want. */ getTextureFrame: function (key) { @@ -429,7 +456,7 @@ Phaser.Cache.prototype = { /** * Get a RenderTexture by key. - * @param key Asset key of the RenderTexture you want. + * @param {string} key - Asset key of the RenderTexture you want. * @return {object} The RenderTexture you want. */ getTexture: function (key) { @@ -445,7 +472,7 @@ Phaser.Cache.prototype = { /** * Get sound by key. - * @param key Asset key of the sound you want. + * @param {string} key - Asset key of the sound you want. * @return {object} The sound you want. */ getSound: function (key) { @@ -461,7 +488,7 @@ Phaser.Cache.prototype = { /** * Get sound data by key. - * @param key Asset key of the sound you want. + * @param {string} key - Asset key of the sound you want. * @return {object} The sound data you want. */ getSoundData: function (key) { @@ -477,7 +504,7 @@ Phaser.Cache.prototype = { /** * Check whether an asset is decoded sound. - * @param key Asset key of the sound you want. + * @param {string} key - Asset key of the sound you want. * @return {object} The sound data you want. */ isSoundDecoded: function (key) { @@ -491,7 +518,7 @@ Phaser.Cache.prototype = { /** * Check whether an asset is decoded sound. - * @param key Asset key of the sound you want. + * @param {string} key - Asset key of the sound you want. * @return {object} The sound data you want. */ isSoundReady: function (key) { @@ -502,7 +529,7 @@ Phaser.Cache.prototype = { /** * Check whether an asset is sprite sheet. - * @param key Asset key of the sprite sheet you want. + * @param {string} key - Asset key of the sprite sheet you want. * @return {object} The sprite sheet data you want. */ isSpriteSheet: function (key) { @@ -518,7 +545,7 @@ Phaser.Cache.prototype = { /** * Get text data by key. - * @param key Asset key of the text data you want. + * @param {string} key - Asset key of the text data you want. * @return {object} The text data you want. */ getText: function (key) { @@ -572,24 +599,41 @@ Phaser.Cache.prototype = { return this.getKeys(this._text); }, + /** + * Description. + * @method removeCanvas + */ removeCanvas: function (key) { delete this._canvases[key]; }, + /** + * Description. + * @method removeImage + */ removeImage: function (key) { delete this._images[key]; }, + /** + * Description. + * @method removeSound + */ removeSound: function (key) { delete this._sounds[key]; }, + /** + * Description. + * @method removeText + */ removeText: function (key) { delete this._text[key]; }, /** * Clean up cache memory. + * @method destroy */ destroy: function () { diff --git a/src/loader/Loader.js b/src/loader/Loader.js index 25777679..b4364d0e 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -1,71 +1,86 @@ /** -* Phaser.Loader -* +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Loader +*/ + +/** +* Phaser loader constructor. * The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files. * It uses a combination of Image() loading and xhr and provides progress and completion callbacks. +* @class Phaser.Loader +* @classdesc The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files. +* It uses a combination of Image() loading and xhr and provides progress and completion callbacks. +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.Loader = function (game) { /** - * Local reference to Game. + * @property {Phaser.Game} game - Local reference to game. */ this.game = game; /** - * Array stores assets keys. So you can get that asset by its unique key. - */ + * @property {array} _keys - Array stores assets keys. So you can get that asset by its unique key. + * @private + */ this._keys = []; /** - * Contains all the assets file infos. - */ + * @property {Description} _fileList - Contains all the assets file infos. + * @private + */ this._fileList = {}; /** - * Indicates assets loading progress. (from 0 to 100) - * @type {number} + * @property {number} _progressChunk - Indicates assets loading progress. (from 0 to 100) + * @private + * @default */ this._progressChunk = 0; /** - * An XMLHttpRequest object used for loading text and audio data - * @type {XMLHttpRequest} + * @property {XMLHttpRequest} - An XMLHttpRequest object used for loading text and audio data. + * @private */ this._xhr = new XMLHttpRequest(); - /** - * Length of assets queue. - * @type {number} + /** + * @property {number} - Length of assets queue. + * @default */ this.queueSize = 0; /** - * True if the Loader is in the process of loading the queue. - * @type {bool} + * @property {bool} isLoading - True if the Loader is in the process of loading the queue. + * @default */ this.isLoading = false; /** - * True if all assets in the queue have finished loading. - * @type {bool} + * @property {bool} hasLoaded - True if all assets in the queue have finished loading. + * @default */ this.hasLoaded = false; /** - * The Load progress percentage value (from 0 to 100) - * @type {number} + * @property {number} progress - The Load progress percentage value (from 0 to 100) + * @default */ this.progress = 0; /** * You can optionally link a sprite to the preloader. * If you do so the Sprite's width or height will be cropped based on the percentage loaded. + * @property {Description} preloadSprite + * @default */ this.preloadSprite = null; /** - * The crossOrigin value applied to loaded images - * @type {string} + * @property {string} crossOrigin - The crossOrigin value applied to loaded images */ this.crossOrigin = ''; @@ -73,16 +88,29 @@ Phaser.Loader = function (game) { * If you want to append a URL before the path of any asset you can set this here. * Useful if you need to allow an asset url to be configured outside of the game code. * MUST have / on the end of it! - * @type {string} + * @property {string} baseURL + * @default */ this.baseURL = ''; /** - * Event Signals - */ + * @property {Phaser.Signal} onFileComplete - Event signal. + */ this.onFileComplete = new Phaser.Signal; + + /** + * @property {Phaser.Signal} onFileError - Event signal. + */ this.onFileError = new Phaser.Signal; + + /** + * @property {Phaser.Signal} onLoadStart - Event signal. + */ this.onLoadStart = new Phaser.Signal; + + /** + * @property {Phaser.Signal} onLoadComplete - Event signal. + */ this.onLoadComplete = new Phaser.Signal; }; @@ -95,7 +123,13 @@ Phaser.Loader.TEXTURE_ATLAS_JSON_HASH = 1; Phaser.Loader.TEXTURE_ATLAS_XML_STARLING = 2; Phaser.Loader.prototype = { - + /** + * Description. + * + * @method setPreloadSprite + * @param {Phaser.Sprite} sprite - Description. + * @param {number} direction - Description. + */ setPreloadSprite: function (sprite, direction) { direction = direction || 0; @@ -119,7 +153,8 @@ Phaser.Loader.prototype = { /** * Check whether asset exists with a specific key. - * @param key {string} Key of the asset you want to check. + * @method checkKeyExists + * @param {string} key - Key of the asset you want to check. * @return {bool} Return true if exists, otherwise return false. */ checkKeyExists: function (key) { @@ -136,8 +171,9 @@ Phaser.Loader.prototype = { }, /** - * Reset loader, this will remove all loaded assets. - */ + * Reset loader, this will remove all loaded assets. + * @method reset + */ reset: function () { this.preloadSprite = null; @@ -148,6 +184,11 @@ Phaser.Loader.prototype = { /** * Internal function that adds a new entry to the file list. + * @method addToFileList + * @param {Description} type - Description. + * @param {string} key - Description. + * @param {string} url - URL of Description. + * @param {Description} properties - Description. */ addToFileList: function (type, key, url, properties) { @@ -178,9 +219,10 @@ Phaser.Loader.prototype = { /** * Add an image to the Loader. - * @param key {string} Unique asset key of this image file. - * @param url {string} URL of image file. - * @param overwrite {boolean} If an entry with a matching key already exists this will over-write it + * @method image + * @param {string} key - Unique asset key of this image file. + * @param {string} url - URL of image file. + * @param {boolean} overwrite - If an entry with a matching key already exists this will over-write it */ image: function (key, url, overwrite) { @@ -195,8 +237,10 @@ Phaser.Loader.prototype = { /** * Add a text file to the Loader. - * @param key {string} Unique asset key of the text file. - * @param url {string} URL of the text file. + * @method text + * @param {string} key - Unique asset key of the text file. + * @param {string} url - URL of the text file. + * @param {bool} overwrite - True if Description. */ text: function (key, url, overwrite) { @@ -211,11 +255,12 @@ Phaser.Loader.prototype = { /** * Add a new sprite sheet loading request. - * @param key {string} Unique asset key of the sheet file. - * @param url {string} URL of sheet file. - * @param frameWidth {number} Width of each single frame. - * @param frameHeight {number} Height of each single frame. - * @param frameMax {number} How many frames in this sprite sheet. + * @method spritesheet + * @param {string} key - Unique asset key of the sheet file. + * @param {string} url - URL of the sheet file. + * @param {number} frameWidth - Width of each single frame. + * @param {number} frameHeight - Height of each single frame. + * @param {number} frameMax - How many frames in this sprite sheet. */ spritesheet: function (key, url, frameWidth, frameHeight, frameMax) { @@ -230,9 +275,10 @@ Phaser.Loader.prototype = { /** * Add a new audio file loading request. - * @param key {string} Unique asset key of the audio file. - * @param urls {Array} An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ] - * @param autoDecode {bool} When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. + * @method audio + * @param {string} key - Unique asset key of the audio file. + * @param {Array} urls - An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ]. + * @param {bool} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. */ audio: function (key, urls, autoDecode) { @@ -247,11 +293,12 @@ Phaser.Loader.prototype = { /** * Add a new tilemap loading request. - * @param key {string} Unique asset key of the tilemap data. - * @param tilesetURL {string} The url of the tile set image file. - * @param [mapDataURL] {string} The url of the map data file (csv/json) - * @param [mapData] {object} An optional JSON data object (can be given in place of a URL). - * @param [format] {string} The format of the map data. + * @method tilemap + * @param {string} key - Unique asset key of the tilemap data. + * @param {string} tilesetURL - The url of the tile set image file. + * @param {string} [mapDataURL] - The url of the map data file (csv/json) + * @param {object} [mapData] - An optional JSON data object (can be given in place of a URL). + * @param {string} [format] - The format of the map data. */ tilemap: function (key, tilesetURL, mapDataURL, mapData, format) { @@ -293,10 +340,11 @@ Phaser.Loader.prototype = { /** * Add a new bitmap font loading request. - * @param key {string} Unique asset key of the bitmap font. - * @param textureURL {string} The url of the font image file. - * @param [xmlURL] {string} The url of the font data file (xml/fnt) - * @param [xmlData] {object} An optional XML data object. + * @method bitmapFont + * @param {string} key - Unique asset key of the bitmap font. + * @param {string} textureURL - The url of the font image file. + * @param {string} [xmlURL] - The url of the font data file (xml/fnt) + * @param {object} [xmlData] - An optional XML data object. */ bitmapFont: function (key, textureURL, xmlURL, xmlData) { @@ -349,18 +397,39 @@ Phaser.Loader.prototype = { }, + /** + * Description. + * @method atlasJSONArray + * @param {string} key - Unique asset key of the bitmap font. + * @param {Description} atlasURL - The url of the Description. + * @param {Description} atlasData - Description. + */ atlasJSONArray: function (key, textureURL, atlasURL, atlasData) { this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY); }, + /** + * Description. + * @method atlasJSONHash + * @param {string} key - Unique asset key of the bitmap font. + * @param {Description} atlasURL - The url of the Description. + * @param {Description} atlasData - Description. + */ atlasJSONHash: function (key, textureURL, atlasURL, atlasData) { this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_HASH); }, + /** + * Description. + * @method atlasXML + * @param {string} key - Unique asset key of the bitmap font. + * @param {Description} atlasURL - The url of the Description. + * @param {Description} atlasData - Description. + */ atlasXML: function (key, textureURL, atlasURL, atlasData) { this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_XML_STARLING); @@ -369,11 +438,12 @@ Phaser.Loader.prototype = { /** * Add a new texture atlas loading request. - * @param key {string} Unique asset key of the texture atlas file. - * @param textureURL {string} The url of the texture atlas image file. - * @param [atlasURL] {string} The url of the texture atlas data file (json/xml) - * @param [atlasData] {object} A JSON or XML data object. - * @param [format] {number} A value describing the format of the data. + * @method atlas + * @param {string} key - Unique asset key of the texture atlas file. + * @param {string} textureURL - The url of the texture atlas image file. + * @param {string} [atlasURL] - The url of the texture atlas data file (json/xml) + * @param {object} [atlasData] - A JSON or XML data object. + * @param {number} [format] - A value describing the format of the data. */ atlas: function (key, textureURL, atlasURL, atlasData, format) { @@ -448,6 +518,7 @@ Phaser.Loader.prototype = { /** * Remove loading request of a file. + * @method removeFile * @param key {string} Key of the file you want to remove. */ removeFile: function (key) { @@ -458,6 +529,7 @@ Phaser.Loader.prototype = { /** * Remove all file loading requests. + * @method removeAll */ removeAll: function () { @@ -467,6 +539,7 @@ Phaser.Loader.prototype = { /** * Load assets. + * @method start */ start: function () { @@ -497,6 +570,7 @@ Phaser.Loader.prototype = { /** * Load files. Private method ONLY used by loader. + * @method loadFile * @private */ loadFile: function () { @@ -589,6 +663,11 @@ Phaser.Loader.prototype = { }, + /** + * Load files. Private method ONLY used by loader. + * @method getAudioURL + * @param {Description} urls - Description. + */ getAudioURL: function (urls) { var extension; @@ -610,9 +689,10 @@ Phaser.Loader.prototype = { }, /** - * Error occured when load a file. - * @param key {string} Key of the error loading file. - */ + * Error occured when load a file. + * @method fileError + * @param {string} key - Key of the error loading file. + */ fileError: function (key) { this._fileList[key].loaded = true; @@ -627,9 +707,10 @@ Phaser.Loader.prototype = { }, /** - * Called when a file is successfully loaded. - * @param key {string} Key of the successfully loaded file. - */ + * Called when a file is successfully loaded. + * @method fileComplete + * @param {string} key - Key of the successfully loaded file. + */ fileComplete: function (key) { if (!this._fileList[key]) @@ -790,9 +871,10 @@ Phaser.Loader.prototype = { }, /** - * Successfully loaded a JSON file. - * @param key {string} Key of the loaded JSON file. - */ + * Successfully loaded a JSON file. + * @method jsonLoadComplete + * @param {string} key - Key of the loaded JSON file. + */ jsonLoadComplete: function (key) { var data = JSON.parse(this._xhr.response); @@ -812,9 +894,10 @@ Phaser.Loader.prototype = { }, /** - * Successfully loaded a CSV file. - * @param key {string} Key of the loaded CSV file. - */ + * Successfully loaded a CSV file. + * @method csvLoadComplete + * @param {string} key - Key of the loaded CSV file. + */ csvLoadComplete: function (key) { var data = this._xhr.response; @@ -827,9 +910,10 @@ Phaser.Loader.prototype = { }, /** - * Error occured when load a JSON. - * @param key {string} Key of the error loading JSON file. - */ + * Error occured when load a JSON. + * @method dataLoadError + * @param {string} key - Key of the error loading JSON file. + */ dataLoadError: function (key) { var file = this._fileList[key]; @@ -842,6 +926,11 @@ Phaser.Loader.prototype = { }, + /** + * Successfully loaded an XML file. + * @method xmlLoadComplete + * @param {string} key - Key of the loaded XML file. + */ xmlLoadComplete: function (key) { var data = this._xhr.response; diff --git a/src/loader/Parser.js b/src/loader/Parser.js index 1ef50442..a402ad51 100644 --- a/src/loader/Parser.js +++ b/src/loader/Parser.js @@ -1,8 +1,21 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Parser +*/ + + +/** +* Description of Phaser.Loader.Parser +* +* @class Phaser.Loader.Parser +*/ Phaser.Loader.Parser = { /** * Parse frame data from an XML file. - * @param xml {object} XML data you want to parse. + * @param {object} xml - XML data you want to parse. * @return {FrameData} Generated FrameData object. */ bitmapFont: function (game, xml, cacheKey) { diff --git a/src/math/Math.js b/src/math/Math.js index d9f46edc..20913191 100644 --- a/src/math/Math.js +++ b/src/math/Math.js @@ -1,32 +1,88 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Math +*/ + +/** +* A collection of mathematical methods. +* +* @class Phaser.Math +*/ Phaser.Math = { + /** + * = 2 π + * @method PI2 + * + */ PI2: Math.PI * 2, + /** + * Two number are fuzzyEqual if their difference is less than ε. + * @method fuzzyEqual + * @param {number} a + * @param {number} b + * @param {number} epsilon + * @return {bool} True if |a-b|<ε + */ fuzzyEqual: function (a, b, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } return Math.abs(a - b) < epsilon; }, + /** + * a is fuzzyLessThan b if it is less than b + ε. + * @method fuzzyEqual + * @param {number} a + * @param {number} b + * @param {number} epsilon + * @return {bool} True if ab+ε + */ fuzzyGreaterThan: function (a, b, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } return a > b - epsilon; }, + /** + * @method fuzzyCeil + * @param {number} val + * @param {number} epsilon + * @return {bool} ceiling(val-ε) + */ fuzzyCeil: function (val, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } return Math.ceil(val - epsilon); }, + /** + * @method fuzzyFloor + * @param {number} val + * @param {number} epsilon + * @return {bool} floor(val-ε) + */ fuzzyFloor: function (val, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } return Math.floor(val + epsilon); }, + /** + * @method average + */ average: function () { var args = []; @@ -45,10 +101,18 @@ Phaser.Math = { }, + /** + * @method truncate + */ truncate: function (n) { return (n > 0) ? Math.floor(n) : Math.ceil(n); }, + /** + * @method shear + * @param n + * @return n mod 1 + */ shear: function (n) { return n % 1; }, @@ -56,11 +120,12 @@ Phaser.Math = { /** * Snap a value to nearest grid slice, using rounding. * - * example if you have an interval gap of 5 and a position of 12... you will snap to 10. Where as 14 will snap to 15 + * Example: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15. * - * @param input - the value to snap - * @param gap - the interval gap of the grid - * @param [start] - optional starting offset for gap + * @method snapTo + * @param {number} input - The value to snap. + * @param {number} gap - The interval gap of the grid. + * @param {number} [start] - Optional starting offset for gap. */ snapTo: function (input, gap, start) { @@ -80,11 +145,12 @@ Phaser.Math = { /** * Snap a value to nearest grid slice, using floor. * - * example if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15 + * Example: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15 * - * @param input - the value to snap - * @param gap - the interval gap of the grid - * @param [start] - optional starting offset for gap + * @method snapToFloor + * @param {number} input - The value to snap. + * @param {number} gap - The interval gap of the grid. + * @param {number} [start] - Optional starting offset for gap. */ snapToFloor: function (input, gap, start) { @@ -104,11 +170,12 @@ Phaser.Math = { /** * Snap a value to nearest grid slice, using ceil. * - * example if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20 + * Example: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20. * - * @param input - the value to snap - * @param gap - the interval gap of the grid - * @param [start] - optional starting offset for gap + * @method snapToCeil + * @param {number} input - The value to snap. + * @param {number} gap - The interval gap of the grid. + * @param {number} [start] - Optional starting offset for gap. */ snapToCeil: function (input, gap, start) { @@ -128,6 +195,10 @@ Phaser.Math = { /** * Snaps a value to the nearest value in an array. + * @method + * @param {number} input + * @param {array} arr + * @param {bool} sort - True if the array needs to be sorted. */ snapToInArray: function (input, arr, sort) { @@ -155,16 +226,10 @@ Phaser.Math = { }, /** - * roundTo some place comparative to a 'base', default is 10 for decimal place + * Round to some place comparative to a 'base', default is 10 for decimal place. * * 'place' is represented by the power applied to 'base' to get that place - * - * @param value - the value to round - * @param place - the place to round to - * @param base - the base to round in... default is 10 for decimal - * * e.g. - * * 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011 * * roundTo(2000/7,3) == 0 @@ -187,8 +252,13 @@ Phaser.Math = { * roundTo(2000/7,-4,2) == 285.6875 -- 100011101.1011 * roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111 * - * note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed + * Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed * because we are rounding 100011.1011011011011011 which rounds up. + * + * @method roundTo + * @param {number} value - The value to round. + * @param {number} place - The place to round to. + * @param {number} base - The base to round in... default is 10 for decimal. */ roundTo: function (value, place, base) { @@ -201,6 +271,12 @@ Phaser.Math = { }, + /** + * @method floorTo + * @param {number} value - The value to round. + * @param {number} place - The place to round to. + * @param {number} base - The base to round in... default is 10 for decimal. + */ floorTo: function (value, place, base) { if (typeof place === "undefined") { place = 0; } @@ -212,6 +288,12 @@ Phaser.Math = { }, + /** + * @method ceilTo + * @param {number} value - The value to round. + * @param {number} place - The place to round to. + * @param {number} base - The base to round in... default is 10 for decimal. + */ ceilTo: function (value, place, base) { if (typeof place === "undefined") { place = 0; } @@ -224,34 +306,50 @@ Phaser.Math = { }, /** - * a one dimensional linear interpolation of a value. + * A one dimensional linear interpolation of a value. + * @method interpolateFloat + * @param {number} a + * @param {number} b + * @param {number} weight */ interpolateFloat: function (a, b, weight) { return (b - a) * weight + a; }, /** - * Find the angle of a segment from (x1, y1) -> (x2, y2 ) + * Find the angle of a segment from (x1, y1) -> (x2, y2 ). + * @method angleBetween + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 */ angleBetween: function (x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1); }, /** - * set an angle within the bounds of -PI to PI + * Set an angle within the bounds of -π toπ. + * @method normalizeAngle + * @param {number} angle + * @param {bool} radians - True if angle size is expressed in radians. */ normalizeAngle: function (angle, radians) { if (typeof radians === "undefined") { radians = true; } - var rd = (radians) ? Math.PI : 180; - return this.wrap(angle, -rd, rd); + var rd = (radians) ? GameMath.PI : 180; + return this.wrap(angle, rd, -rd); }, /** - * closest angle between two angles from a1 to a2 + * Closest angle between two angles from a1 to a2 * absolute value the return for exact angle + * @method nearestAngleBetween + * @param {number} a1 + * @param {number} a2 + * @param {bool} radians - True if angle sizes are expressed in radians. */ nearestAngleBetween: function (a1, a2, radians) { @@ -276,7 +374,13 @@ Phaser.Math = { }, /** - * interpolate across the shortest arc between two angles + * Interpolate across the shortest arc between two angles. + * @method interpolateAngles + * @param {number} a1 - Description. + * @param {number} a2 - Description. + * @param {number} weight - Description. + * @param {bool} radians - True if angle sizes are expressed in radians. + * @param {Description} ease - Description. */ interpolateAngles: function (a1, a2, weight, radians, ease) { @@ -291,13 +395,14 @@ Phaser.Math = { }, /** - * Generate a random bool result based on the chance value + * Generate a random bool result based on the chance value. *

    * Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance * of getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed. *

    - * @param chance The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%) - * @return true if the roll passed, or false + * @method chanceRoll + * @param {number} chance - The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). + * @return {bool} True if the roll passed, or false otherwise. */ chanceRoll: function (chance) { @@ -326,11 +431,12 @@ Phaser.Math = { }, /** - * Returns an Array containing the numbers from min to max (inclusive) + * Returns an Array containing the numbers from min to max (inclusive). * - * @param min The minimum value the array starts with - * @param max The maximum value the array contains - * @return The array of number values + * @method numberArray + * @param {number} min - The minimum value the array starts with. + * @param {number} max - The maximum value the array contains. + * @return {array} The array of number values. */ numberArray: function (min, max) { @@ -346,12 +452,13 @@ Phaser.Math = { }, /** - * Adds the given amount to the value, but never lets the value go over the specified maximum + * Adds the given amount to the value, but never lets the value go over the specified maximum. * - * @param value The value to add the amount to - * @param amount The amount to add to the value - * @param max The maximum the value is allowed to be - * @return The new value + * @method maxAdd + * @param {number} value - The value to add the amount to. + * @param {number} amount - The amount to add to the value. + * @param {number} max- The maximum the value is allowed to be. + * @return The new value. */ maxAdd: function (value, amount, max) { @@ -367,12 +474,13 @@ Phaser.Math = { }, /** - * Subtracts the given amount from the value, but never lets the value go below the specified minimum + * Subtracts the given amount from the value, but never lets the value go below the specified minimum. * - * @param value The base value - * @param amount The amount to subtract from the base value - * @param min The minimum the value is allowed to be - * @return The new value + * @method minSub + * @param {number} value - The base value. + * @param {number} amount - The amount to subtract from the base value. + * @param {number} min - The minimum the value is allowed to be. + * @return {number} The new value. */ minSub: function (value, amount, min) { @@ -415,10 +523,12 @@ Phaser.Math = { * Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around. *

    Values must be positive integers, and are passed through Math.abs

    * - * @param value The value to add the amount to - * @param amount The amount to add to the value - * @param max The maximum the value is allowed to be - * @return The wrapped value + * @method wrapValue + * @param {number} value - The value to add the amount to. + * @param {number} amount - The amount to add to the value. + * @param {number} max - The maximum the value is allowed to be. + * @return {number} The wrapped value. + */ wrapValue: function (value, amount, max) { @@ -433,9 +543,10 @@ Phaser.Math = { }, /** - * Randomly returns either a 1 or -1 + * Randomly returns either a 1 or -1. * - * @return 1 or -1 + * @method randomSign + * @return {number} 1 or -1 */ randomSign: function () { return (Math.random() > 0.5) ? 1 : -1; @@ -444,9 +555,9 @@ Phaser.Math = { /** * Returns true if the number given is odd. * - * @param n The number to check - * - * @return True if the given number is odd. False if the given number is even. + * @method isOdd + * @param {number} n - The number to check. + * @return {bool} True if the given number is odd. False if the given number is even. */ isOdd: function (n) { @@ -457,9 +568,9 @@ Phaser.Math = { /** * Returns true if the number given is even. * - * @param n The number to check - * - * @return True if the given number is even. False if the given number is odd. + * @method isEven + * @param {number} n - The number to check. + * @return {bool} True if the given number is even. False if the given number is odd. */ isEven: function (n) { @@ -476,8 +587,9 @@ Phaser.Math = { /** * Significantly faster version of Math.max - * See http://jsperf.com/math-s-min-max-vs-homemade/5 + * See {@link http://jsperf.com/math-s-min-max-vs-homemade/5} * + * @method max * @return The highest value from those given. */ max: function () { @@ -496,8 +608,9 @@ Phaser.Math = { /** * Significantly faster version of Math.min - * See http://jsperf.com/math-s-min-max-vs-homemade/5 + * See {@link http://jsperf.com/math-s-min-max-vs-homemade/5} * + * @method min * @return The lowest value from those given. */ min: function () { @@ -518,9 +631,9 @@ Phaser.Math = { * Keeps an angle value between -180 and +180
    * Should be called whenever the angle is updated on the Sprite to stop it from going insane. * - * @param angle The angle value to check - * - * @return The new angle value, returns the same as the input angle if it was within bounds + * @method wrapAngle + * @param {number} angle - The angle value to check + * @return {number} The new angle value, returns the same as the input angle if it was within bounds. */ wrapAngle: function (angle) { @@ -545,13 +658,14 @@ Phaser.Math = { }, /** - * Keeps an angle value between the given min and max values + * Keeps an angle value between the given min and max values. * - * @param angle The angle value to check. Must be between -180 and +180 - * @param min The minimum angle that is allowed (must be -180 or greater) - * @param max The maximum angle that is allowed (must be 180 or less) + * @method angleLimit + * @param {number} angle - The angle value to check. Must be between -180 and +180. + * @param {number} min - The minimum angle that is allowed (must be -180 or greater). + * @param {number} max - The maximum angle that is allowed (must be 180 or less). * - * @return The new angle value, returns the same as the input angle if it was within bounds + * @return {number} The new angle value, returns the same as the input angle if it was within bounds */ angleLimit: function (angle, min, max) { var result = angle; @@ -564,10 +678,11 @@ Phaser.Math = { }, /** + * Description. * @method linearInterpolation - * @param {Any} v - * @param {Any} k - * @public + * @param {number} v + * @param {number} k + * @return {number} */ linearInterpolation: function (v, k) { var m = v.length - 1; @@ -583,10 +698,11 @@ Phaser.Math = { }, /** + * Description. * @method bezierInterpolation - * @param {Any} v - * @param {Any} k - * @public + * @param {number} v + * @param {number} k + * @return {number} */ bezierInterpolation: function (v, k) { var b = 0; @@ -598,10 +714,11 @@ Phaser.Math = { }, /** + * Description. * @method catmullRomInterpolation - * @param {Any} v - * @param {Any} k - * @public + * @param {number} v + * @param {number} k + * @return {number} */ catmullRomInterpolation: function (v, k) { @@ -626,11 +743,12 @@ Phaser.Math = { }, /** + * Description. * @method Linear - * @param {Any} p0 - * @param {Any} p1 - * @param {Any} t - * @public + * @param {number} p0 + * @param {number} p1 + * @param {number} t + * @return {number} */ linear: function (p0, p1, t) { return (p1 - p0) * t + p0; @@ -638,22 +756,23 @@ Phaser.Math = { /** * @method bernstein - * @param {Any} n - * @param {Any} i - * @public + * @param {number} n + * @param {number} i + * @return {number} */ bernstein: function (n, i) { return this.factorial(n) / this.factorial(i) / this.factorial(n - i); }, /** + * Description. * @method catmullRom - * @param {Any} p0 - * @param {Any} p1 - * @param {Any} p2 - * @param {Any} p3 - * @param {Any} t - * @public + * @param {number} p0 + * @param {number} p1 + * @param {number} p2 + * @param {number} p3 + * @param {number} t + * @return {number} */ catmullRom: function (p0, p1, p2, p3, t) { var v0 = (p2 - p0) * 0.5, v1 = (p3 - p1) * 0.5, t2 = t * t, t3 = t * t2; @@ -668,10 +787,10 @@ Phaser.Math = { * Fetch a random entry from the given array. * Will return null if random selection is missing, or array has no entries. * + * @method getRandom * @param objects An array of objects. * @param startIndex Optional offset off the front of the array. Default value is 0, or the beginning of the array. * @param length Optional restriction on the number of values you want to randomly select from. - * * @return The random object that was selected. */ getRandom: function (objects, startIndex, length) { @@ -701,9 +820,9 @@ Phaser.Math = { /** * Round down to the next whole number. E.g. floor(1.7) == 1, and floor(-2.7) == -2. * - * @param Value Any number. - * - * @return The rounded value of that number. + * @method floor + * @param {number} Value Any number. + * @return {number} The rounded value of that number. */ floor: function (value) { @@ -802,12 +921,13 @@ Phaser.Math = { /** * Returns the distance between the two given set of coordinates. + * * @method distance - * @param {Number} x1 - * @param {Number} y1 - * @param {Number} x2 - * @param {Number} y2 - * @return {Number} The distance between this Point object and the destination Point object. + * @param {number} x1 + * @param {number} y1 + * @param {number} x2 + * @param {number} y2 + * @return {number} The distance between this Point object and the destination Point object. **/ distance: function (x1, y1, x2, y2) { @@ -825,34 +945,61 @@ Phaser.Math = { }, /** - * force a value within the boundaries of two values - * + * Force a value within the boundaries of two values. * Clamp value to range + * + * @method clamp + * @param {number} x + * @param {number} a + * @param {number} b */ clamp: function ( x, a, b ) { return ( x < a ) ? a : ( ( x > b ) ? b : x ); }, - - // Clamp value to range to range - + + /** + * Linear mapping from range to range + * + * @method mapLinear + * @param {number} x + * @param {number} a1 + * @param {number} a1 + * @param {number} a2 + * @param {number} b1 + * @param {number} b2 + * @return {number} + */ mapLinear: function ( x, a1, a2, b1, b2 ) { return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 ); }, - // http://en.wikipedia.org/wiki/Smoothstep - + // + /** + * {@link http://en.wikipedia.org/wiki/Smoothstep} + * + * @method smoothstep + * @param {number} x + * @param {number} min + * @param {number} max + * @return {number} + */ smoothstep: function ( x, min, max ) { if ( x <= min ) return 0; @@ -864,6 +1011,15 @@ Phaser.Math = { }, + /** + * {@link http://en.wikipedia.org/wiki/Smoothstep} + * + * @method smootherstep + * @param {number} x + * @param {number} min + * @param {number} max + * @return {number} + */ smootherstep: function ( x, min, max ) { if ( x <= min ) return 0; @@ -876,8 +1032,12 @@ Phaser.Math = { }, /** - * a value representing the sign of the value. + * A value representing the sign of the value. * -1 for negative, +1 for positive, 0 if value is 0 + * + * @method sign + * @param {number} x + * @return {number} */ sign: function ( x ) { @@ -885,6 +1045,12 @@ Phaser.Math = { }, + /** + * Convert degrees to radians. + * + * @method degToRad + * @return {function} + */ degToRad: function() { var degreeToRadiansFactor = Math.PI / 180; @@ -897,6 +1063,12 @@ Phaser.Math = { }(), + /** + * Convert degrees to radians. + * + * @method radToDeg + * @return {function} + */ radToDeg: function() { var radianToDegreesFactor = 180 / Math.PI; diff --git a/src/math/QuadTree.js b/src/math/QuadTree.js index 0c6e317c..ded11e42 100644 --- a/src/math/QuadTree.js +++ b/src/math/QuadTree.js @@ -1,4 +1,11 @@ -/* +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Quadtree +*/ + +/** * Javascript QuadTree * @version 1.0 * @author Timo Hausmann @@ -12,35 +19,49 @@ * Original version at https://github.com/timohausmann/quadtree-js/ */ -/* - Copyright © 2012 Timo Hausmann - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +/** +* @overview +* @copyright © 2012 Timo Hausmann +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* "Software"), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject to +* the following conditions: +* +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* -* QuadTree Constructor -* @param Integer maxObjects (optional) max objects a node can hold before splitting into 4 subnodes (default: 10) -* @param Integer maxLevels (optional) total max levels inside root QuadTree (default: 4) -* @param Integer level (optional) deepth level, required for subnodes -*/ +/** + * QuadTree Constructor + * + * @class Phaser.QuadTree + * @classdesc Javascript QuadTree

    + * The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked + * it massively to add node indexing, removed lots of temp. var creation and significantly + * increased performance as a result.

    + * Original version at {@link https://github.com/timohausmann/quadtree-js/} + * @constructor + * @param {Description} physicsManager - Description. + * @param {Description} x - Description. + * @param {Description} y - Description. + * @param {number} width - The width of your game in game pixels. + * @param {number} height - The height of your game in game pixels. + * @param {number} maxObjects - Description. + * @param {number} maxLevels - Description. + * @param {number} level - Description. + */ Phaser.QuadTree = function (physicsManager, x, y, width, height, maxObjects, maxLevels, level) { this.physicsManager = physicsManager; @@ -70,8 +91,10 @@ Phaser.QuadTree = function (physicsManager, x, y, width, height, maxObjects, max Phaser.QuadTree.prototype = { /* - * Split the node into 4 subnodes - */ + * Split the node into 4 subnodes + * + * @method split + */ split: function() { this.level++; @@ -94,7 +117,9 @@ Phaser.QuadTree.prototype = { * Insert the object into the node. If the node * exceeds the capacity, it will split and add all * objects to their corresponding subnodes. - * @param Object pRect bounds of the object to be added, with x, y, width, height + * + * @method insert + * @param {object} body - Description. */ insert: function (body) { @@ -142,9 +167,11 @@ Phaser.QuadTree.prototype = { }, /* - * Determine which node the object belongs to - * @param Object pRect bounds of the area to be checked, with x, y, width, height - * @return Integer index of the subnode (0-3), or -1 if pRect cannot completely fit within a subnode and is part of the parent node + * Determine which node the object belongs to. + * + * @method getIndex + * @param {object} rect - Description. + * @return {number} index - Index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node. */ getIndex: function (rect) { @@ -184,9 +211,11 @@ Phaser.QuadTree.prototype = { }, /* - * Return all objects that could collide with the given object - * @param Object pRect bounds of the object to be checked, with x, y, width, height - * @Return Array array with all detected objects + * Return all objects that could collide with the given object. + * + * @method retrieve + * @param {object} rect - Description. + * @Return {array} - Array with all detected objects. */ retrieve: function (sprite) { @@ -219,7 +248,8 @@ Phaser.QuadTree.prototype = { }, /* - * Clear the quadtree + * Clear the quadtree. + * @method clear */ clear: function () { diff --git a/src/math/RandomDataGenerator.js b/src/math/RandomDataGenerator.js index c34ba800..9f3c7d32 100644 --- a/src/math/RandomDataGenerator.js +++ b/src/math/RandomDataGenerator.js @@ -1,9 +1,21 @@ /** -* Phaser.RandomDataGenerator -* -* An extremely useful repeatable random data generator. Access it via Phaser.Game.rnd -* Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense -* Random number generator from http://baagoe.org/en/wiki/Better_random_numbers_for_javascript +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.RandomDataGenerator +*/ + + +/** +* Phaser.RandomDataGenerator constructor. +* +* @class Phaser.RandomDataGenerator +* @classdesc An extremely useful repeatable random data generator. Access it via Phaser.Game.rnd +* Based on Nonsense by Josh Faul {@link https://github.com/jocafa/Nonsense}. +* Random number generator from {@link http://baagoe.org/en/wiki/Better_random_numbers_for_javascript} +* +* @constructor +* @param {array} seeds */ Phaser.RandomDataGenerator = function (seeds) { @@ -16,37 +28,34 @@ Phaser.RandomDataGenerator = function (seeds) { Phaser.RandomDataGenerator.prototype = { /** - * @property c - * @type Number + * @property {number} c * @private */ c: 1, /** - * @property s0 - * @type Number + * @property {number} s0 * @private */ s0: 0, /** - * @property s1 - * @type Number + * @property {number} s1 * @private */ s1: 0, /** - * @property s2 - * @type Number + * @property {number} s2 * @private */ s2: 0, /** - * Private random helper + * Private random helper. * @method rnd * @private + * @return {number} Description. */ rnd: function () { @@ -61,9 +70,10 @@ Phaser.RandomDataGenerator.prototype = { }, /** - * Reset the seed of the random data generator + * Reset the seed of the random data generator. + * * @method sow - * @param {Array} seeds + * @param {array} seeds */ sow: function (seeds) { @@ -87,9 +97,11 @@ Phaser.RandomDataGenerator.prototype = { }, /** + * Description. * @method hash * @param {Any} data * @private + * @return {number} Description. */ hash: function (data) { @@ -113,49 +125,49 @@ Phaser.RandomDataGenerator.prototype = { }, /** - * Returns a random integer between 0 and 2^32 + * Returns a random integer between 0 and 2^32. * @method integer - * @return {Number} + * @return {number} */ integer: function() { return this.rnd.apply(this) * 0x100000000;// 2^32 }, /** - * Returns a random real number between 0 and 1 + * Returns a random real number between 0 and 1. * @method frac - * @return {Number} + * @return {number} */ frac: function() { return this.rnd.apply(this) + (this.rnd.apply(this) * 0x200000 | 0) * 1.1102230246251565e-16;// 2^-53 }, /** - * Returns a random real number between 0 and 2^32 + * Returns a random real number between 0 and 2^32. * @method real - * @return {Number} + * @return {number} */ real: function() { return this.integer() + this.frac(); }, /** - * Returns a random integer between min and max + * Returns a random integer between min and max. * @method integerInRange - * @param {Number} min - * @param {Number} max - * @return {Number} + * @param {number} min + * @param {number} max + * @return {number} */ integerInRange: function (min, max) { return Math.floor(this.realInRange(min, max)); }, /** - * Returns a random real number between min and max + * Returns a random real number between min and max. * @method realInRange - * @param {Number} min - * @param {Number} max - * @return {Number} + * @param {number} min + * @param {number} max + * @return {number} */ realInRange: function (min, max) { @@ -167,18 +179,18 @@ Phaser.RandomDataGenerator.prototype = { }, /** - * Returns a random real number between -1 and 1 + * Returns a random real number between -1 and 1. * @method normal - * @return {Number} + * @return {number} */ normal: function () { return 1 - 2 * this.frac(); }, /** - * Returns a valid RFC4122 version4 ID hex string (from https://gist.github.com/1308368) + * Returns a valid RFC4122 version4 ID hex string (from {@link https://gist.github.com/1308368}). * @method uuid - * @return {String} + * @return {string} */ uuid: function () { @@ -195,36 +207,40 @@ Phaser.RandomDataGenerator.prototype = { }, /** - * Returns a random member of `array` + * Returns a random member of `array`. * @method pick - * @param {Any} array + * @param {Any} ary + * @return {number} */ pick: function (ary) { return ary[this.integerInRange(0, ary.length)]; }, /** - * Returns a random member of `array`, favoring the earlier entries + * Returns a random member of `array`, favoring the earlier entries. * @method weightedPick - * @param {Any} array + * @param {Any} ary + * @return {number} */ weightedPick: function (ary) { return ary[~~(Math.pow(this.frac(), 2) * ary.length)]; }, /** - * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified + * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified. * @method timestamp - * @param {Number} min - * @param {Number} max + * @param {number} min + * @param {number} max + * @return {number} */ timestamp: function (a, b) { return this.realInRange(a || 946684800000, b || 1577862000000); }, /** - * Returns a random angle between -180 and 180 + * Returns a random angle between -180 and 180. * @method angle + * @return {number} */ angle: function() { return this.integerInRange(-180, 180); diff --git a/src/net/Net.js b/src/net/Net.js index 0e6e7c60..d23bf0f7 100644 --- a/src/net/Net.js +++ b/src/net/Net.js @@ -1,3 +1,17 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Net +*/ + +/** +* Description of Phaser.Net +* +* @class Phaser.Net +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +*/ Phaser.Net = function (game) { this.game = game; @@ -8,6 +22,9 @@ Phaser.Net.prototype = { /** * Returns the hostname given by the browser. + * + * @method getHostName + * @return {string} */ getHostName: function () { @@ -24,6 +41,10 @@ Phaser.Net.prototype = { * If the domain name is found it returns true. * You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc. * Do not include 'http://' at the start. + * + * @method checkDomainName + * @param {string} domain + * @return {string} */ checkDomainName: function (domain) { return window.location.hostname.indexOf(domain) !== -1; @@ -34,6 +55,13 @@ Phaser.Net.prototype = { * If the value doesn't already exist it is set. * If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string. * Optionally you can redirect to the new url, or just return it as a string. + * + * @method updateQueryString + * @param {Description} key - Description. + * @param {Description} value - Description. + * @param {Description} redirect - Description. + * @param {Description} url - Description. + * @return {Description} Description. */ updateQueryString: function (key, value, redirect, url) { @@ -93,6 +121,10 @@ Phaser.Net.prototype = { /** * Returns the Query String as an object. * If you specify a parameter it will return just the value of that parameter, should it exist. + * + * @method getQueryString + * @param {string} parameter - Description. + * @return {Description} Description. */ getQueryString: function (parameter) { @@ -122,6 +154,14 @@ Phaser.Net.prototype = { }, + /** + * Returns the Query String as an object. + * If you specify a parameter it will return just the value of that parameter, should it exist. + * + * @method decodeURI + * @param {string} value - Description. + * @return {string} Description. + */ decodeURI: function (value) { return decodeURIComponent(value.replace(/\+/g, " ")); } diff --git a/src/particles/Particles.js b/src/particles/Particles.js index 1e1d0cd0..cb2a6f16 100644 --- a/src/particles/Particles.js +++ b/src/particles/Particles.js @@ -1,15 +1,47 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Particles +*/ + + +/** +* Phaser.Particles constructor +* @class Phaser.Particles +* @classdesc Phaser Particles +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +*/ Phaser.Particles = function (game) { + /** + * @property {Description} emitters - Description. + */ this.emitters = {}; + /** + * @property {number} ID - Description. + * @default + */ this.ID = 0; }; Phaser.Particles.prototype = { + /** + * Description. + * @method emitters + */ emitters: null, + /** + * Description. + * @method add + * @param {Description} emitter - Description. + * @return {Description} Description. + */ add: function (emitter) { this.emitters[emitter.name] = emitter; @@ -18,12 +50,22 @@ Phaser.Particles.prototype = { }, + /** + * Description. + * @method remove + * @param {Description} emitter - Description. + */ remove: function (emitter) { delete this.emitters[emitter.name]; }, + /** + * Description. + * @method update + * @param {Description} emitter - Description. + */ update: function () { for (var key in this.emitters) diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index c3fb007c..207c56c3 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -1,145 +1,210 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Emitter +*/ + /** * Phaser - ArcadeEmitter * -* Emitter is a lightweight particle emitter. It can be used for one-time explosions or for +* @class Phaser.Particles.Arcade.Emitter +* @classdesc Emitter is a lightweight particle emitter. It can be used for one-time explosions or for * continuous effects like rain and fire. All it really does is launch Particle objects out * at set intervals, and fixes their positions and velocities accorindgly. +* @constructor +* @param {Phaser.Game} game - Current game instance. +* @param {number} x - Description. +* @param {number} y - Description. +* @param {number} maxParticles - Description. */ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { + /** + * @property {number} maxParticles - Description. + * @default + */ maxParticles = maxParticles || 50; Phaser.Group.call(this, game); + /** + * @property {string} name - Description. + */ this.name = 'emitter' + this.game.particles.ID++; + /** + * @property {Description} type - Description. + */ this.type = Phaser.EMITTER; /** - * The X position of the top left corner of the emitter in world space. + * @property {number} x - The X position of the top left corner of the emitter in world space. + * @default */ this.x = 0; /** - * The Y position of the top left corner of emitter in world space. + * @property {number} y - The Y position of the top left corner of emitter in world space. + * @default */ this.y = 0; /** - * The width of the emitter. Particles can be randomly generated from anywhere within this box. + * @property {number} width - The width of the emitter. Particles can be randomly generated from anywhere within this box. + * @default */ this.width = 1; /** - * The height of the emitter. Particles can be randomly generated from anywhere within this box. - */ + * @property {number} height - The height of the emitter. Particles can be randomly generated from anywhere within this box. + * @default + */ this.height = 1; /** - * The minimum possible velocity of a particle. - * The default value is (-100,-100). - */ + * The minimum possible velocity of a particle. + * The default value is (-100,-100). + * @property {Phaser.Point} minParticleSpeed + */ this.minParticleSpeed = new Phaser.Point(-100, -100); /** - * The maximum possible velocity of a particle. - * The default value is (100,100). - */ + * The maximum possible velocity of a particle. + * The default value is (100,100). + * @property {Phaser.Point} maxParticleSpeed + */ this.maxParticleSpeed = new Phaser.Point(100, 100); /** - * The minimum possible scale of a particle. - * The default value is 1. - */ + * The minimum possible scale of a particle. + * The default value is 1. + * @property {number} minParticleScale + * @default + */ this.minParticleScale = 1; /** * The maximum possible scale of a particle. * The default value is 1. + * @property {number} maxParticleScale + * @default */ this.maxParticleScale = 1; /** * The minimum possible angular velocity of a particle. The default value is -360. + * @property {number} minRotation + * @default */ this.minRotation = -360; /** * The maximum possible angular velocity of a particle. The default value is 360. + * @property {number} maxRotation + * @default */ this.maxRotation = 360; /** * Sets the gravity.y of each particle to this value on launch. + * @property {number} gravity + * @default */ this.gravity = 2; /** * Set your own particle class type here. - * Default is Particle. + * @property {Description} particleClass + * @default */ this.particleClass = null; /** * The X and Y drag component of particles launched from the emitter. + * @property {Phaser.Point} particleDrag */ this.particleDrag = new Phaser.Point(); /** * The angular drag component of particles launched from the emitter if they are rotating. + * @property {number} angularDrag + * @default */ this.angularDrag = 0; /** * How often a particle is emitted in ms (if emitter is started with Explode == false). + * @property {bool} frequency + * @default */ this.frequency = 100; /** * The total number of particles in this emitter. + * @property {number} maxParticles */ this.maxParticles = maxParticles; /** * How long each particle lives once it is emitted in ms. Default is 2 seconds. * Set lifespan to 'zero' for particles to live forever. + * @property {number} lifespan + * @default */ this.lifespan = 2000; /** * How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce. + * @property {Phaser.Point} bounce */ this.bounce = new Phaser.Point(); /** * Internal helper for deciding how many particles to launch. + * @property {number} _quantity + * @private + * @default */ this._quantity = 0; /** * Internal helper for deciding when to launch particles or kill them. + * @property {number} _timer + * @private + * @default */ this._timer = 0; /** * Internal counter for figuring out how many particles to launch. + * @property {number} _counter + * @private + * @default */ this._counter = 0; /** * Internal helper for the style of particle emission (all at once, or one at a time). + * @property {bool} _explode + * @private + * @default */ this._explode = true; /** * Determines whether the emitter is currently emitting particles. * It is totally safe to directly toggle this. + * @property {bool} on + * @default */ this.on = false; /** * Determines whether the emitter is being updated by the core game loop. + * @property {bool} exists + * @default */ this.exists = true; @@ -147,8 +212,16 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { * The point the particles are emitted from. * Emitter.x and Emitter.y control the containers location, which updates all current particles * Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position. + * @property {bool} emitX */ this.emitX = x; + + /** + * The point the particles are emitted from. + * Emitter.x and Emitter.y control the containers location, which updates all current particles + * Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position. + * @property {bool} emitY + */ this.emitY = y; }; @@ -158,6 +231,7 @@ Phaser.Particles.Arcade.Emitter.prototype.constructor = Phaser.Particles.Arcade. /** * Called automatically by the game loop, decides when to launch particles and when to "die". + * @method Phaser.Particles.Arcade.Emitter.prototype.update */ Phaser.Particles.Arcade.Emitter.prototype.update = function () { @@ -202,12 +276,13 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () { /** * This function generates a new array of particle sprites to attach to the emitter. * - * @param graphics If you opted to not pre-configure an array of Sprite objects, you can simply pass in a particle image or sprite sheet. - * @param quantity {number} The number of particles to generate when using the "create from image" option. - * @param multiple {boolean} Whether the image in the Graphics param is a single particle or a bunch of particles (if it's a bunch, they need to be square!). - * @param collide {number} Whether the particles should be flagged as not 'dead' (non-colliding particles are higher performance). 0 means no collisions, 0-1 controls scale of particle's bounding box. - * - * @return This Emitter instance (nice for chaining stuff together, if you're into that). + * @method Phaser.Particles.Arcade.Emitter.prototype.makeParticles + * @param {Description} keys - Description. + * @param {number} frames - Description. + * @param {number} quantity - The number of particles to generate when using the "create from image" option. + * @param {number} collide - Description. + * @param {bool} collideWorldBounds - Description. + * @return This Emitter instance (nice for chaining stuff together, if you're into that). */ Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames, quantity, collide, collideWorldBounds) { @@ -278,6 +353,7 @@ Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames /** * Call this function to turn off all the particles and the emitter. + * @method Phaser.Particles.Arcade.Emitter.prototype.kill */ Phaser.Particles.Arcade.Emitter.prototype.kill = function () { @@ -290,6 +366,7 @@ Phaser.Particles.Arcade.Emitter.prototype.kill = function () { /** * Handy for bringing game objects "back to life". Just sets alive and exists back to true. * In practice, this is most often called by Object.reset(). + * @method Phaser.Particles.Arcade.Emitter.prototype.revive */ Phaser.Particles.Arcade.Emitter.prototype.revive = function () { @@ -300,11 +377,11 @@ Phaser.Particles.Arcade.Emitter.prototype.revive = function () { /** * Call this function to start emitting particles. - * - * @param explode {boolean} Whether the particles should all burst out at once. - * @param lifespan {number} How long each particle lives once emitted. 0 = forever. - * @param frequency {number} Ignored if Explode is set to true. Frequency is how often to emit a particle in ms. - * @param quantity {number} How many particles to launch. 0 = "all of the particles". + * @method Phaser.Particles.Arcade.Emitter.prototype.start + * @param {boolean} explode - Whether the particles should all burst out at once. + * @param {number} lifespan - How long each particle lives once emitted. 0 = forever. + * @param {number} frequency - Ignored if Explode is set to true. Frequency is how often to emit a particle in ms. + * @param {number} quantity - How many particles to launch. 0 = "all of the particles". */ Phaser.Particles.Arcade.Emitter.prototype.start = function (explode, lifespan, frequency, quantity) { @@ -346,6 +423,7 @@ Phaser.Particles.Arcade.Emitter.prototype.start = function (explode, lifespan, f /** * This function can be used both internally and externally to emit the next particle. + * @method Phaser.Particles.Arcade.Emitter.prototype.emitParticle */ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () { @@ -412,9 +490,9 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () { /** * A more compact way of setting the width and height of the emitter. - * - * @param width {number} The desired width of the emitter (particles are spawned randomly within these dimensions). - * @param height {number} The desired height of the emitter. + * @method Phaser.Particles.Arcade.Emitter.prototype.setSize + * @param {number} width - The desired width of the emitter (particles are spawned randomly within these dimensions). + * @param {number} height - The desired height of the emitter. */ Phaser.Particles.Arcade.Emitter.prototype.setSize = function (width, height) { @@ -425,9 +503,9 @@ Phaser.Particles.Arcade.Emitter.prototype.setSize = function (width, height) { /** * A more compact way of setting the X velocity range of the emitter. - * - * @param Min {number} The minimum value for this range. - * @param Max {number} The maximum value for this range. + * @method Phaser.Particles.Arcade.Emitter.prototype.setXSpeed + * @param {number} min - The minimum value for this range. + * @param {number} max - The maximum value for this range. */ Phaser.Particles.Arcade.Emitter.prototype.setXSpeed = function (min, max) { @@ -441,9 +519,9 @@ Phaser.Particles.Arcade.Emitter.prototype.setXSpeed = function (min, max) { /** * A more compact way of setting the Y velocity range of the emitter. - * - * @param Min {number} The minimum value for this range. - * @param Max {number} The maximum value for this range. + * @method Phaser.Particles.Arcade.Emitter.prototype.setYSpeed + * @param {number} min - The minimum value for this range. + * @param {number} max - The maximum value for this range. */ Phaser.Particles.Arcade.Emitter.prototype.setYSpeed = function (min, max) { @@ -457,9 +535,9 @@ Phaser.Particles.Arcade.Emitter.prototype.setYSpeed = function (min, max) { /** * A more compact way of setting the angular velocity constraints of the emitter. - * - * @param Min {number} The minimum value for this range. - * @param Max {number} The maximum value for this range. + * @method Phaser.Particles.Arcade.Emitter.prototype.setRotation + * @param {number} min - The minimum value for this range. + * @param {number} max - The maximum value for this range. */ Phaser.Particles.Arcade.Emitter.prototype.setRotation = function (min, max) { @@ -473,8 +551,8 @@ Phaser.Particles.Arcade.Emitter.prototype.setRotation = function (min, max) { /** * Change the emitter's midpoint to match the midpoint of a Object. - * - * @param Object {object} The Object that you want to sync up with. + * @method Phaser.Particles.Arcade.Emitter.prototype.at + * @param {object} object - The Object that you want to sync up with. */ Phaser.Particles.Arcade.Emitter.prototype.at = function (object) { @@ -483,42 +561,51 @@ Phaser.Particles.Arcade.Emitter.prototype.at = function (object) { } +/** +* Get the emitter alpha. +* @return {Description} +*//** +* Set the emiter alpha value. +* @param {Description} value - Description +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "alpha", { - /** - * Get the emitter alpha. - */ get: function () { return this._container.alpha; }, - /** - * Set the emiter alpha value. - */ set: function (value) { this._container.alpha = value; } }); +/** +* Get the emitter visible state. +* @return {bool} +*//** +* Set the emitter visible state. +* @param {bool} value - Description +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", { - /** - * Get the emitter visible state. - */ get: function () { return this._container.visible; }, - /** - * Set the emitter visible state. - */ set: function (value) { this._container.visible = value; } }); +/** +* Get +* @return {bool} +*//** +* Set +* @param {bool} value - Description +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", { get: function () { @@ -531,6 +618,13 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", { }); +/** +* Get +* @return {bool} +*//** +* Set +* @param {bool} value - Description +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "y", { get: function () { @@ -543,6 +637,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "y", { }); +/** +* Get +* @return {number} +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "left", { get: function () { @@ -551,6 +649,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "left", { }); +/** +* Get +* @return {number} +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "right", { get: function () { @@ -559,6 +661,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "right", { }); +/** +* Get +* @return {number} +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "top", { get: function () { @@ -567,6 +673,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "top", { }); +/** +* Get +* @return {number} +*/ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", { get: function () { diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 0445b7f6..a109093e 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -1,12 +1,21 @@ + /** -* The Sound class +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Sound +*/ + +/** +* The Sound class constructor. * -* @class Sound +* @class Phaser.Sound +* @classdesc The Sound class * @constructor -* @param {Phaser.Game} game Reference to the current game instance. -* @param {string} key Asset key for the sound. -* @param {number} volume Default value for the volume. -* @param {bool} loop Whether or not the sound will loop. +* @param {Phaser.Game} game - Reference to the current game instance. +* @param {string} key - Asset key for the sound. +* @param {number} volume - Default value for the volume. +* @param {bool} loop - Whether or not the sound will loop. */ Phaser.Sound = function (game, key, volume, loop) { @@ -15,101 +24,152 @@ Phaser.Sound = function (game, key, volume, loop) { /** * A reference to the currently running Game. - * @property game - * @public - * @type {Phaser.Game} + * @property {Phaser.Game} game */ this.game = game; /** - * Name of the sound - * @property name - * @public - * @type {string} + * Name of the sound. + * @property {string} name + * @default */ this.name = key; /** * Asset key for the sound. - * @property key - * @public - * @type {string} + * @property {string} key */ this.key = key; /** * Whether or not the sound will loop. - * @property loop - * @public - * @type {bool} + * @property {bool} loop */ this.loop = loop; /** - * The global audio volume. A value between 0 (silence) and 1 (full volume) - * @property _volume + * The global audio volume. A value between 0 (silence) and 1 (full volume). + * @property {number} _volume * @private - * @type {number} */ this._volume = volume; /** - * The sound markers, empty by default - * @property markers - * @public - * @type {object} + * The sound markers, empty by default. + * @property {object} markers */ this.markers = {}; /** * Reference to AudioContext instance. - * @property context - * @public - * @type {AudioContext} + * @property {AudioContext} context + * @default */ this.context = null; /** * Decoded data buffer / Audio tag. + * @property {Description} _buffer + * @private */ this._buffer = null; /** - * Boolean indicating whether the game is on "mute" - * @property _muted + * Boolean indicating whether the game is on "mute". + * @property {bool} _muted * @private - * @type {bool} + * @default */ this._muted = false; /** - * Boolean indicating whether the sound should start automatically - * @property autoplay - * @public - * @type {bool} + * Boolean indicating whether the sound should start automatically. + * @property {bool} autoplay + * @private */ this.autoplay = false; /** * The total duration of the sound, in milliseconds - * @property autoplay - * @public - * @type {bool} + * @property {number} totalDuration + * @default */ this.totalDuration = 0; + + /** + * Description. + * @property {number} startTime + * @default + */ this.startTime = 0; + + /** + * Description. + * @property {number} currentTime + * @default + */ this.currentTime = 0; + + /** + * Description. + * @property {number} duration + * @default + */ this.duration = 0; - this.durationMS = 0; + + /** + * Description. + * @property {number} autoplay + * @default + */ this.stopTime = 0; + + /** + * Description. + * @property {bool} paused + * @default + */ this.paused = false; + + /** + * Description. + * @property {bool} isPlaying + * @default + */ this.isPlaying = false; + + /** + * Description. + * @property {string} currentMarker + * @default + */ this.currentMarker = ''; + + /** + * Description. + * @property {bool} pendingPlayback + * @default + */ this.pendingPlayback = false; + + /** + * Description. + * @property {bool} override + * @default + */ this.override = false; - + + /** + * Description. + * @property {bool} usingWebAudio + */ this.usingWebAudio = this.game.sound.usingWebAudio; + + /** + * Description. + * @property {Description} usingAudioTag + */ this.usingAudioTag = this.game.sound.usingAudioTag; if (this.usingWebAudio) @@ -147,19 +207,62 @@ Phaser.Sound = function (game, key, volume, loop) { } } + /** + * Description. + * @property {Phaser.Signal} onDecoded + */ this.onDecoded = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onPlay + */ this.onPlay = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onPause + */ this.onPause = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onResume + */ this.onResume = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onLoop + */ this.onLoop = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onStop + */ this.onStop = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onMute + */ this.onMute = new Phaser.Signal; + + /** + * Description. + * @property {Phaser.Signal} onMarkerComplete + */ this.onMarkerComplete = new Phaser.Signal; }; Phaser.Sound.prototype = { + /** + * @method soundHasUnlocked + * @param {string} key - Description. + */ soundHasUnlocked: function (key) { if (key == this.key) @@ -171,9 +274,15 @@ Phaser.Sound.prototype = { }, - // start and stop are in SECONDS.MS (2.5 = 2500ms, 0.5 = 500ms, etc) - // volume is between 0 and 1 - /* + /** + * Description. + * @method addMarker + * @param {string} name - Description. + * @param {Description} start - Description. + * @param {Description} stop - Description. + * @param {Description} volume - Description. + * @param {Description} loop - Description. + */ addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; @@ -210,12 +319,21 @@ Phaser.Sound.prototype = { }, + /** + * Description. + * @method removeMarker + * @param {string} name - Description. + */ removeMarker: function (name) { delete this.markers[name]; }, + /** + * Description. + * @method update + */ update: function () { if (this.pendingPlayback && this.game.cache.isSoundReady(this.key)) @@ -276,10 +394,11 @@ Phaser.Sound.prototype = { /** * Play this sound, or a marked section of it. * @method play - * @param {string} marker Assets key of the sound you want to play. - * @param {number} position The starting position - * @param {number} [volume] Volume of the sound you want to play. - * @param {bool} [loop] Loop when it finished playing? (Default to false) + * @param {string} marker - Assets key of the sound you want to play. + * @param {number} position - The starting position. + * @param {number} [volume] - Volume of the sound you want to play. + * @param {bool} [loop] - Loop when it finished playing? (Default to false) + * @param {Description} forceRestart - Description. * @return {Sound} The playing sound object. */ play: function (marker, position, volume, loop, forceRestart) { @@ -472,10 +591,10 @@ Phaser.Sound.prototype = { /** * Restart the sound, or a marked section of it. * @method restart - * @param {string} marker Assets key of the sound you want to play. - * @param {number} position The starting position - * @param {number} [volume] Volume of the sound you want to play. - * @param {bool} [loop] Loop when it finished playing? (Default to false) + * @param {string} marker - Assets key of the sound you want to play. + * @param {number} position - The starting position. + * @param {number} [volume] - Volume of the sound you want to play. + * @param {bool} [loop] - Loop when it finished playing? (Default to false) */ restart: function (marker, position, volume, loop) { @@ -505,7 +624,7 @@ Phaser.Sound.prototype = { }, /** * Resumes the sound - * @method pause + * @method resume */ resume: function () { @@ -571,6 +690,10 @@ Phaser.Sound.prototype = { }; +/** +* Get +* @return {bool} Description. +*/ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", { get: function () { @@ -579,6 +702,10 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", { }); +/** +* Get +* @return {bool} Description. +*/ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", { get: function () { @@ -587,22 +714,19 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", { }); +/** +* Get +* @return {bool} Whether or not the sound is muted. +*//** +* Mutes sound. +* @param {bool} value - Whether or not the sound is muted. +*/ Object.defineProperty(Phaser.Sound.prototype, "mute", { - - /** - * Mutes sound. - * @method mute - * @return {bool} whether or not the sound is muted - */ get: function () { return this._muted; }, - /** - * Mutes sound. - * @method mute - * @return {bool} whether or not the sound is muted - */ + set: function (value) { value = value || null; @@ -642,20 +766,19 @@ Object.defineProperty(Phaser.Sound.prototype, "mute", { }); +/** +* Get the current volume. A value between 0 (silence) and 1 (full volume). +* @return {number} +*//** +* Set +* @param {number} value - Sets the current volume. A value between 0 (silence) and 1 (full volume). +*/ Object.defineProperty(Phaser.Sound.prototype, "volume", { - /** - * @method volume - * @return {number} The current volume. A value between 0 (silence) and 1 (full volume) - */ get: function () { return this._volume; }, - /** - * @method volume - * @return {number} Sets the current volume. A value between 0 (silence) and 1 (full volume) - */ set: function (value) { if (this.usingWebAudio) diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index 252b57d6..8bd8c375 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -1,56 +1,93 @@ /** -* Phaser - SoundManager +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.SoundManager +*/ + + +/** +* Sound Manager constructor. * -* @class SoundManager +* @class Phaser.SoundManager +* @classdesc Phaser Sound Manager. * @constructor * @param {Phaser.Game} game reference to the current game instance. */ Phaser.SoundManager = function (game) { - /** - * A reference to the currently running Game. - * @property game - * @public - * @type {Phaser.Game} - */ + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; - + + /** + * @property {Phaser.Signal} onSoundDecode - Description. + */ this.onSoundDecode = new Phaser.Signal; - - - /** - * Boolean indicating whether the game is on "mute" - * @property _muted - * @private - * @type {bool} - */ + + /** + * @property {bool} _muted - Description. + * @private + * @default + */ this._muted = false; + + /** + * @property {Description} _unlockSource - Description. + * @private + * @default + */ this._unlockSource = null; /** - * The global audio volume. A value between 0 (silence) and 1 (full volume) - * @property _volume + * @property {number} _volume - The global audio volume. A value between 0 (silence) and 1 (full volume). * @private - * @type {number} + * @default */ this._volume = 1; /** - * An array containing all the sounds - * @property _sounds + * @property {array} _sounds - An array containing all the sounds * @private - * @type {array} + * @default The empty array. */ this._sounds = []; - + /** + * @property {Description} context - Description. + * @default + */ this.context = null; + + /** + * @property {bool} usingWebAudio - Description. + * @default + */ this.usingWebAudio = true; + + /** + * @property {bool} usingAudioTag - Description. + * @default + */ this.usingAudioTag = false; + + /** + * @property {bool} noAudio - Description. + * @default + */ this.noAudio = false; + /** + * @property {bool} touchLocked - Description. + * @default + */ this.touchLocked = false; + /** + * @property {number} channels - Description. + * @default + */ this.channels = 32; }; @@ -58,7 +95,7 @@ Phaser.SoundManager = function (game) { Phaser.SoundManager.prototype = { /** - * Initialises the sound manager + * Initialises the sound manager. * @method boot */ boot: function () { @@ -140,7 +177,7 @@ Phaser.SoundManager.prototype = { }, /** - * Enables the audio, usually after the first touch + * Enables the audio, usually after the first touch. * @method unlock */ unlock: function () { @@ -174,7 +211,7 @@ Phaser.SoundManager.prototype = { }, /** - * Stops all the sounds in the game + * Stops all the sounds in the game. * @method stopAll */ stopAll: function () { @@ -190,7 +227,7 @@ Phaser.SoundManager.prototype = { }, /** - * Pauses all the sounds in the game + * Pauses all the sounds in the game. * @method pauseAll */ pauseAll: function () { @@ -206,7 +243,7 @@ Phaser.SoundManager.prototype = { }, /** - * resumes every sound in the game + * resumes every sound in the game. * @method resumeAll */ resumeAll: function () { @@ -224,8 +261,8 @@ Phaser.SoundManager.prototype = { /** * Decode a sound with its assets key. * @method decode - * @param key {string} Assets key of the sound to be decoded. - * @param [sound] {Phaser.Sound} its bufer will be set to decoded data. + * @param {string} key - Assets key of the sound to be decoded. + * @param {Phaser.Sound} [sound] - Its buffer will be set to decoded data. */ decode: function (key, sound) { @@ -254,7 +291,7 @@ Phaser.SoundManager.prototype = { }, /** - * updates every sound in the game + * Updates every sound in the game. * @method update */ update: function () { @@ -282,17 +319,19 @@ Phaser.SoundManager.prototype = { /** - * + * Description. * @method add - * @param {string} key Asset key for the sound. - * @param {number} volume Default value for the volume. - * @param {bool} loop Whether or not the sound will loop. + * @param {string} key - Asset key for the sound. + * @param {number} volume - Default value for the volume. + * @param {bool} loop - Whether or not the sound will loop. */ add: function (key, volume, loop) { volume = volume || 1; if (typeof loop == 'undefined') { loop = false; } + + var sound = new Phaser.Sound(this.game, key, volume, loop); this._sounds.push(sound); @@ -303,24 +342,21 @@ Phaser.SoundManager.prototype = { }; +/** +* A global audio mute toggle. +* @return {bool} Whether or not the game is on "mute". +*//** +* Mute sounds. +* @param {bool} value - Whether or not the game is on "mute" +*/ Object.defineProperty(Phaser.SoundManager.prototype, "mute", { - /** - * A global audio mute toggle. - * @method mute - * @return {bool} whether or not the game is on "mute" - */ get: function () { return this._muted; }, - /** - * Mute sounds. - * @method mute - * @return {bool} whether or not the game is on "mute" - */ set: function (value) { value = value || null; @@ -376,12 +412,15 @@ Object.defineProperty(Phaser.SoundManager.prototype, "mute", { }); +/** +* Get +* @return {number} The global audio volume. A value between 0 (silence) and 1 (full volume). +*//** +* Sets the global volume +* @return {number} value - The global audio volume. A value between 0 (silence) and 1 (full volume). +*/ Object.defineProperty(Phaser.SoundManager.prototype, "volume", { - /** - * @method volume - * @return {number} The global audio volume. A value between 0 (silence) and 1 (full volume) - */ get: function () { if (this.usingWebAudio) @@ -395,11 +434,6 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", { }, - /** - * Sets the global volume - * @method volume - * @return {number} The global audio volume. A value between 0 (silence) and 1 (full volume) - */ set: function (value) { value = this.game.math.clamp(value, 1, 0); diff --git a/src/system/Canvas.js b/src/system/Canvas.js index 49eb4b64..4b1fd255 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -1,28 +1,26 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Canvas */ /** -* The Canvas class handles everything related to the tag as a DOM Element, like styles, offset, aspect ratio +* The Canvas class handles everything related to the <canvas> tag as a DOM Element, like styles, offset, aspect ratio * * @class Canvas * @static */ - Phaser.Canvas = { /** - * Creates the tag + * Creates the <canvas> tag * * @method create - * @param {number} width The desired width - * @param {number} height The desired height - * @return {HTMLCanvasElement} the newly created tag + * @param {number} width - The desired width. + * @param {number} height - The desired height. + * @return {HTMLCanvasElement} The newly created <canvas> tag. */ create: function (width, height) { - width = width || 256; height = height || 256; @@ -38,9 +36,9 @@ Phaser.Canvas = { /** * Get the DOM offset values of any given element * @method getOffset - * @param {HTMLElement} element The targeted element that we want to retrieve the offset - * @param {Phaser.Point} [point] The point we want to take the x/y values of the offset - * @return point {Phaser.Point} A point objet with the offsetX and Y as its properties + * @param {HTMLElement} element - The targeted element that we want to retrieve the offset. + * @param {Phaser.Point} [point] - The point we want to take the x/y values of the offset. + * @return {Phaser.Point} - A point objet with the offsetX and Y as its properties. */ getOffset: function (element, point) { @@ -63,8 +61,8 @@ Phaser.Canvas = { * Returns the aspect ratio of the given canvas. * * @method getAspectRatio - * @param {HTMLCanvasElement} canvas The canvas to get the aspect ratio from. - * @return {Number} Returns true on success + * @param {HTMLCanvasElement} canvas - The canvas to get the aspect ratio from. + * @return {number} The ratio between canvas' width and height. */ getAspectRatio: function (canvas) { return canvas.width / canvas.height; @@ -74,8 +72,8 @@ Phaser.Canvas = { * Sets the background color behind the canvas. This changes the canvas style property. * * @method setBackgroundColor - * @param {HTMLCanvasElement} canvas The canvas to set the background color on. - * @param {String} color The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color. + * @param {HTMLCanvasElement} canvas - The canvas to set the background color on. + * @param {string} [color] - The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color. * @return {HTMLCanvasElement} Returns the source canvas. */ setBackgroundColor: function (canvas, color) { @@ -92,9 +90,9 @@ Phaser.Canvas = { * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions. * * @method setTouchAction - * @param {HTMLCanvasElement} canvas The canvas to set the touch action on. - * @param {String} value The touch action to set. Defaults to 'none'. - * @return {HTMLCanvasElement} Returns the source canvas. + * @param {HTMLCanvasElement} canvas - The canvas to set the touch action on. + * @param {String} [value] - The touch action to set. Defaults to 'none'. + * @return {HTMLCanvasElement} The source canvas. */ setTouchAction: function (canvas, value) { @@ -127,9 +125,9 @@ Phaser.Canvas = { * If no parent is given it will be added as a child of the document.body. * * @method addToDOM - * @param {HTMLCanvasElement} canvas The canvas to set the touch action on. - * @param {String} parent The DOM element to add the canvas to. Defaults to ''. - * @param {bool} overflowHidden If set to true it will add the overflow='hidden' style to the parent DOM element. + * @param {HTMLCanvasElement} canvas - The canvas to set the touch action on. + * @param {string} parent - The DOM element to add the canvas to. Defaults to ''. + * @param {bool} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element. * @return {HTMLCanvasElement} Returns the source canvas. */ addToDOM: function (canvas, parent, overflowHidden) { @@ -167,13 +165,13 @@ Phaser.Canvas = { * Sets the transform of the given canvas to the matrix values provided. * * @method setTransform - * @param {CanvasRenderingContext2D} context The context to set the transform on. - * @param {Number} translateX The value to translate horizontally by. - * @param {Number} translateY The value to translate vertically by. - * @param {Number} scaleX The value to scale horizontally by. - * @param {Number} scaleY The value to scale vertically by. - * @param {Number} skewX The value to skew horizontaly by. - * @param {Number} skewY The value to skew vertically by. + * @param {CanvasRenderingContext2D} context - The context to set the transform on. + * @param {number} translateX - The value to translate horizontally by. + * @param {number} translateY - The value to translate vertically by. + * @param {number} scaleX - The value to scale horizontally by. + * @param {number} scaleY - The value to scale vertically by. + * @param {number} skewX - The value to skew horizontaly by. + * @param {number} skewY - The value to skew vertically by. * @return {CanvasRenderingContext2D} Returns the source context. */ setTransform: function (context, translateX, translateY, scaleX, scaleY, skewX, skewY) { @@ -192,8 +190,8 @@ Phaser.Canvas = { * patchy on earlier browsers, especially on mobile. * * @method setSmoothingEnabled - * @param {CanvasRenderingContext2D} context The context to enable or disable the image smoothing on. - * @param {bool} value If set to true it will enable image smoothing, false will disable it. + * @param {CanvasRenderingContext2D} context - The context to enable or disable the image smoothing on. + * @param {bool} value - If set to true it will enable image smoothing, false will disable it. * @return {CanvasRenderingContext2D} Returns the source context. */ setSmoothingEnabled: function (context, value) { @@ -213,7 +211,7 @@ Phaser.Canvas = { * Note that if this doesn't given the desired result then see the setSmoothingEnabled. * * @method setImageRenderingCrisp - * @param {HTMLCanvasElement} canvas The canvas to set image-rendering crisp on. + * @param {HTMLCanvasElement} canvas - The canvas to set image-rendering crisp on. * @return {HTMLCanvasElement} Returns the source canvas. */ setImageRenderingCrisp: function (canvas) { diff --git a/src/system/Device.js b/src/system/Device.js index d3da1582..4b4a6341 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -1,184 +1,194 @@ /** -* Phaser - Device -* +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Device +*/ + + +/** * Detects device support capabilities. Using some elements from System.js by MrDoob and Modernizr -* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/audio.js +* {@link https://github.com/Modernizr/Modernizr/blob/master/feature-detects/audio.js} +* +* @class Phaser.Device +* @constructor */ Phaser.Device = function () { /** * An optional 'fix' for the horrendous Android stock browser bug - * https://code.google.com/p/android/issues/detail?id=39247 - * @type {boolean} + * {@link https://code.google.com/p/android/issues/detail?id=39247} + * @property {bool} patchAndroidClearRectBug - Description. + * @default */ this.patchAndroidClearRectBug = false; // Operating System /** - * Is running desktop? - * @type {boolean} + * @property {bool} desktop - Is running desktop? + * @default */ this.desktop = false; /** - * Is running on iOS? - * @type {boolean} + * @property {bool} iOS - Is running on iOS? + * @default */ this.iOS = false; /** - * Is running on android? - * @type {boolean} + * @property {bool} android - Is running on android? + * @default */ this.android = false; /** - * Is running on chromeOS? - * @type {boolean} + * @property {bool} chromeOS - Is running on chromeOS? + * @default */ this.chromeOS = false; /** - * Is running on linux? - * @type {boolean} + * @property {bool} linux - Is running on linux? + * @default */ this.linux = false; /** - * Is running on maxOS? - * @type {boolean} + * @property {bool} maxOS - Is running on maxOS? + * @default */ this.macOS = false; /** - * Is running on windows? - * @type {boolean} + * @property {bool} windows - Is running on windows? + * @default */ this.windows = false; // Features /** - * Is canvas available? - * @type {boolean} + * @property {bool} canvas - Is canvas available? + * @default */ this.canvas = false; /** - * Is file available? - * @type {boolean} + * @property {bool} file - Is file available? + * @default */ this.file = false; /** - * Is fileSystem available? - * @type {boolean} + * @property {bool} fileSystem - Is fileSystem available? + * @default */ this.fileSystem = false; /** - * Is localStorage available? - * @type {boolean} + * @property {bool} localStorage - Is localStorage available? + * @default */ this.localStorage = false; /** - * Is webGL available? - * @type {boolean} + * @property {bool} webGL - Is webGL available? + * @default */ this.webGL = false; /** - * Is worker available? - * @type {boolean} + * @property {bool} worker - Is worker available? + * @default */ this.worker = false; /** - * Is touch available? - * @type {boolean} + * @property {bool} touch - Is touch available? + * @default */ this.touch = false; /** - * Is mspointer available? - * @type {boolean} + * @property {bool} mspointer - Is mspointer available? + * @default */ this.mspointer = false; /** - * Is css3D available? - * @type {boolean} + * @property {bool} css3D - Is css3D available? + * @default */ this.css3D = false; - /** - * Is Pointer Lock available? - * @type {boolean} + /** + * @property {bool} pointerLock - Is Pointer Lock available? + * @default */ this.pointerLock = false; // Browser /** - * Is running in arora? - * @type {boolean} + * @property {bool} arora - Is running in arora? + * @default */ this.arora = false; /** - * Is running in chrome? - * @type {boolean} + * @property {bool} chrome - Is running in chrome? + * @default */ this.chrome = false; /** - * Is running in epiphany? - * @type {boolean} + * @property {bool} epiphany - Is running in epiphany? + * @default */ this.epiphany = false; /** - * Is running in firefox? - * @type {boolean} + * @property {bool} firefox - Is running in firefox? + * @default */ this.firefox = false; /** - * Is running in ie? - * @type {boolean} + * @property {bool} ie - Is running in ie? + * @default */ this.ie = false; /** - * Version of ie? - * @type Number + * @property {number} ieVersion - Version of ie? + * @default */ this.ieVersion = 0; /** - * Is running in mobileSafari? - * @type {boolean} + * @property {bool} mobileSafari - Is running in mobileSafari? + * @default */ this.mobileSafari = false; /** - * Is running in midori? - * @type {boolean} + * @property {bool} midori - Is running in midori? + * @default */ this.midori = false; /** - * Is running in opera? - * @type {boolean} + * @property {bool} opera - Is running in opera? + * @default */ this.opera = false; /** - * Is running in safari? - * @type {boolean} + * @property {bool} safari - Is running in safari? + * @default */ this.safari = false; this.webApp = false; @@ -186,75 +196,76 @@ Phaser.Device = function () { // Audio /** - * Are Audio tags available? - * @type {boolean} + * @property {bool} audioData - Are Audio tags available? + * @default */ this.audioData = false; /** - * Is the WebAudio API available? - * @type {boolean} + * @property {bool} webAudio - Is the WebAudio API available? + * @default */ this.webAudio = false; /** - * Can this device play ogg files? - * @type {boolean} + * @property {bool} ogg - Can this device play ogg files? + * @default */ this.ogg = false; /** - * Can this device play opus files? - * @type {boolean} + * @property {bool} opus - Can this device play opus files? + * @default */ this.opus = false; /** - * Can this device play mp3 files? - * @type {boolean} + * @property {bool} mp3 - Can this device play mp3 files? + * @default */ this.mp3 = false; /** - * Can this device play wav files? - * @type {boolean} + * @property {bool} wav - Can this device play wav files? + * @default */ this.wav = false; /** * Can this device play m4a files? - * @type {boolean} + * @property {bool} m4a - True if this device can play m4a files. + * @default */ this.m4a = false; /** - * Can this device play webm files? - * @type {boolean} + * @property {bool} webm - Can this device play webm files? + * @default */ this.webm = false; // Device /** - * Is running on iPhone? - * @type {boolean} + * @property {bool} iPhone - Is running on iPhone? + * @default */ this.iPhone = false; /** - * Is running on iPhone4? - * @type {boolean} + * @property {bool} iPhone4 - Is running on iPhone4? + * @default */ this.iPhone4 = false; - /** - * Is running on iPad? - * @type {boolean} + /** + * @property {bool} iPad - Is running on iPad? + * @default */ this.iPad = false; /** - * PixelRatio of the host device? - * @type Number + * @property {number} pixelRatio - PixelRatio of the host device? + * @default */ this.pixelRatio = 0; @@ -272,6 +283,7 @@ Phaser.Device.prototype = { /** * Check which OS is game running on. + * @method _checkOS * @private */ _checkOS: function () { @@ -300,6 +312,7 @@ Phaser.Device.prototype = { /** * Check HTML5 features of the host environment. + * @method _checkFeatures * @private */ _checkFeatures: function () { @@ -332,6 +345,7 @@ Phaser.Device.prototype = { /** * Check what browser is game running in. + * @method _checkBrowser * @private */ _checkBrowser: function () { @@ -368,6 +382,7 @@ Phaser.Device.prototype = { /** * Check audio support. + * @method _checkAudio * @private */ _checkAudio: function () { @@ -414,6 +429,7 @@ Phaser.Device.prototype = { /** * Check PixelRatio of devices. + * @method _checkDevice * @private */ _checkDevice: function () { @@ -427,6 +443,7 @@ Phaser.Device.prototype = { /** * Check whether the host environment support 3D CSS. + * @method _checkCSS3D * @private */ _checkCSS3D: function () { @@ -453,6 +470,11 @@ Phaser.Device.prototype = { }, + /** + * Check whether the host environment can play audio. + * @method canPlayAudio + * @param {string} type - One of 'mp3, 'ogg', 'm4a', 'wav', 'webm'. + */ canPlayAudio: function (type) { if (type == 'mp3' && this.mp3) { @@ -471,6 +493,12 @@ Phaser.Device.prototype = { }, + /** + * Check whether the console is open. + * @method isConsoleOpen + * @return {bool} True if console is open. + */ + isConsoleOpen: function () { if (window.console && window.console['firebug']) { diff --git a/src/system/RequestAnimationFrame.js b/src/system/RequestAnimationFrame.js index 9366e22d..7243e7e1 100644 --- a/src/system/RequestAnimationFrame.js +++ b/src/system/RequestAnimationFrame.js @@ -1,13 +1,35 @@ /** -* Phaser - RequestAnimationFrame -* +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.RequestAnimationFrame +*/ + + +/** * Abstracts away the use of RAF or setTimeOut for the core game update loop. +* +* @class Phaser.RequestAnimationFrame +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.RequestAnimationFrame = function(game) { + /** + * @property {Phaser.Game} game - The currently running game. + */ this.game = game; + /** + * @property {bool} _isSetTimeOut - Description. + * @private + */ this._isSetTimeOut = false; + + /** + * @property {bool} isRunning - Description. + * @default + */ this.isRunning = false; var vendors = [ @@ -28,6 +50,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * The function called by the update + * @property _onLoop * @private **/ _onLoop: null, @@ -67,7 +90,8 @@ Phaser.RequestAnimationFrame.prototype = { /** * The update method for the requestAnimationFrame - * @method RAFUpdate + * @method updateRAF + * @param {number} time - Description. **/ updateRAF: function (time) { @@ -78,8 +102,8 @@ Phaser.RequestAnimationFrame.prototype = { }, /** - * The update method for the setTimeout - * @method SetTimeoutUpdate + * The update method for the setTimeout. + * @method updateSetTimeout **/ updateSetTimeout: function () { @@ -90,7 +114,7 @@ Phaser.RequestAnimationFrame.prototype = { }, /** - * Stops the requestAnimationFrame from running + * Stops the requestAnimationFrame from running. * @method stop **/ stop: function () { @@ -111,7 +135,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * Is the browser using setTimeout? * @method isSetTimeOut - * @return bool + * @return {bool} **/ isSetTimeOut: function () { return this._isSetTimeOut; @@ -120,7 +144,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * Is the browser using requestAnimationFrame? * @method isRAF - * @return bool + * @return {bool} **/ isRAF: function () { return (this._isSetTimeOut === false); diff --git a/src/system/StageScaleMode.js b/src/system/StageScaleMode.js index 3ff98a9d..b581395f 100644 --- a/src/system/StageScaleMode.js +++ b/src/system/StageScaleMode.js @@ -1,91 +1,120 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.StageScaleMode +*/ + +/** +* An Animation instance contains a single animation and the controls to play it. +* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +* +* @class Phaser.StageScaleMode +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {number} width - Description. +* @param {number} height - Description. +*/ Phaser.StageScaleMode = function (game, width, height) { /** - * Stage height when start the game. - * @type {number} + * @property {number} _startHeight - Stage height when starting the game. + * @default + * @private */ this._startHeight = 0; /** - * If the game should be forced to use Landscape mode, this is set to true by Game.Stage - * @type {bool} + * @property {bool} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage + * @default */ this.forceLandscape = false; /** - * If the game should be forced to use Portrait mode, this is set to true by Game.Stage - * @type {bool} + * @property {bool} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage + * @default */ - this.forcePortrait = false; + this.forcePortrait = false; /** - * If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true. - * @type {bool} + * @property {bool} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true. + * @default */ this.incorrectOrientation = false; /** - * If you wish to align your game in the middle of the page then you can set this value to true. - * It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing. - * It doesn't care about any other DOM element that may be on the page, it literally just sets the margin. - * @type {bool} + * @property {bool} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true. +

    • It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
    • +
    • It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.
    + * @default */ this.pageAlignHorizontally = false; /** - * If you wish to align your game in the middle of the page then you can set this value to true. - * It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing. - * It doesn't care about any other DOM element that may be on the page, it literally just sets the margin. - * @type {bool} + * @property {bool} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true. +
    • It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing. +
    • It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.
    + * @default */ this.pageAlignVeritcally = false; /** - * Minimum width the canvas should be scaled to (in pixels) - * @type {number} + * @property {number} minWidth - Minimum width the canvas should be scaled to (in pixels). + * @default */ this.minWidth = null; /** - * Maximum width the canvas should be scaled to (in pixels). + * @property {number} maxWidth - Maximum width the canvas should be scaled to (in pixels). * If null it will scale to whatever width the browser can handle. - * @type {number} + * @default */ this.maxWidth = null; /** - * Minimum height the canvas should be scaled to (in pixels) - * @type {number} + * @property {number} minHeight - Minimum height the canvas should be scaled to (in pixels). + * @default */ this.minHeight = null; /** - * Maximum height the canvas should be scaled to (in pixels). + * @property {number} maxHeight - Maximum height the canvas should be scaled to (in pixels). * If null it will scale to whatever height the browser can handle. - * @type {number} + * @default */ this.maxHeight = null; /** - * Width of the stage after calculation. - * @type {number} + * @property {number} width - Width of the stage after calculation. + * @default */ this.width = 0; /** - * Height of the stage after calculation. - * @type {number} + * @property {number} height - Height of the stage after calculation. + * @default */ this.height = 0; /** - * The maximum number of times it will try to resize the canvas to fill the browser (default is 5) - * @type {number} + * @property {number} maxIterations - The maximum number of times it will try to resize the canvas to fill the browser. + * @default */ this.maxIterations = 5; + + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + /** + * @property {Description} enterLandscape - Description. + */ this.enterLandscape = new Phaser.Signal(); + + /** + * @property {Description} enterPortrait - Description. + */ this.enterPortrait = new Phaser.Signal(); if (window['orientation']) @@ -104,7 +133,15 @@ Phaser.StageScaleMode = function (game, width, height) { } } + /** + * @property {Description} scaleFactor - Description. + */ this.scaleFactor = new Phaser.Point(1, 1); + + /** + * @property {number} aspectRatio - Aspect ratio. + * @default + */ this.aspectRatio = 0; var _this = this; @@ -124,7 +161,10 @@ Phaser.StageScaleMode.NO_SCALE = 1; Phaser.StageScaleMode.SHOW_ALL = 2; Phaser.StageScaleMode.prototype = { - + /** + * Description. + * @method startFullScreen + */ startFullScreen: function () { if (this.isFullScreen) @@ -152,6 +192,10 @@ Phaser.StageScaleMode.prototype = { }, + /** + * Description. + * @method stopFullScreen + */ stopFullScreen: function () { if (document['cancelFullScreen']) @@ -169,6 +213,10 @@ Phaser.StageScaleMode.prototype = { }, + /** + * Description. + * @method checkOrientationState + */ checkOrientationState: function () { // They are in the wrong orientation @@ -194,8 +242,10 @@ Phaser.StageScaleMode.prototype = { } }, - /** + /** * Handle window.orientationchange events + * @method checkOrientation + * @param {Description} event - Description. */ checkOrientation: function (event) { @@ -217,8 +267,10 @@ Phaser.StageScaleMode.prototype = { }, - /** + /** * Handle window.resize events + * @method checkResize + * @param {Description} event - Description. */ checkResize: function (event) { @@ -246,8 +298,9 @@ Phaser.StageScaleMode.prototype = { } }, - /** + /** * Re-calculate scale mode and update screen size. + * @method refresh */ refresh: function () { @@ -280,8 +333,9 @@ Phaser.StageScaleMode.prototype = { }, - /** + /** * Set screen size automatically based on the scaleMode. + * @param {Description} force - Description. */ setScreenSize: function (force) { @@ -329,6 +383,10 @@ Phaser.StageScaleMode.prototype = { }, + /** + * Description. + * @method setSize + */ setSize: function () { if (this.incorrectOrientation == false) @@ -392,6 +450,10 @@ Phaser.StageScaleMode.prototype = { }, + /** + * Description. + * @method setMaximum + */ setMaximum: function () { this.width = window.innerWidth; @@ -399,6 +461,10 @@ Phaser.StageScaleMode.prototype = { }, + /** + * Description. + * @method setShowAll + */ setShowAll: function () { var multiplier = Math.min((window.innerHeight / this.game.height), (window.innerWidth / this.game.width)); @@ -408,6 +474,10 @@ Phaser.StageScaleMode.prototype = { }, + /** + * Description. + * @method setExactFit + */ setExactFit: function () { var availableWidth = window.innerWidth - 0; @@ -439,6 +509,10 @@ Phaser.StageScaleMode.prototype = { }; +/** +* Get +* @return {bool} +*/ Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", { get: function () { @@ -454,6 +528,10 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", { }); +/** +* Get +* @return {number} +*/ Object.defineProperty(Phaser.StageScaleMode.prototype, "isPortrait", { get: function () { @@ -462,6 +540,10 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isPortrait", { }); +/** +* Get +* @return {number} +*/ Object.defineProperty(Phaser.StageScaleMode.prototype, "isLandscape", { get: function () { diff --git a/src/tilemap/Tile.js b/src/tilemap/Tile.js index e4500526..29f776f3 100644 --- a/src/tilemap/Tile.js +++ b/src/tilemap/Tile.js @@ -1,91 +1,120 @@ /** -* Phaser - Tile -* -* A Tile is a single representation of a tile within a Tilemap +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Tile */ + /** -* Tile constructor * Create a new Tile. * -* @param tilemap {Tilemap} the tilemap this tile belongs to. -* @param index {number} The index of this tile type in the core map data. -* @param width {number} Width of the tile. -* @param height number} Height of the tile. +* @class Phaser.Tile +* @classdesc A Tile is a single representation of a tile within a Tilemap. +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {Tilemap} tilemap - The tilemap this tile belongs to. +* @param {number} index - The index of this tile type in the core map data. +* @param {number} width - Width of the tile. +* @param {number} height - Height of the tile. */ Phaser.Tile = function (game, tilemap, index, width, height) { /** - * The virtual mass of the tile. - * @type {number} + * @property {number} mass - The virtual mass of the tile. + * @default */ this.mass = 1.0; /** - * Indicating this Tile doesn't collide at all. - * @type {bool} + * @property {bool} collideNone - Indicating this Tile doesn't collide at all. + * @default */ this.collideNone = true; /** - * Indicating collide with any object on the left. - * @type {bool} + * @property {bool} collideLeft - Indicating collide with any object on the left. + * @default */ this.collideLeft = false; /** - * Indicating collide with any object on the right. - * @type {bool} + * @property {bool} collideRight - Indicating collide with any object on the right. + * @default */ this.collideRight = false; /** - * Indicating collide with any object on the top. - * @type {bool} + * @property {bool} collideUp - Indicating collide with any object on the top. + * @default */ this.collideUp = false; /** - * Indicating collide with any object on the bottom. - * @type {bool} + * @property {bool} collideDown - Indicating collide with any object on the bottom. + * @default */ this.collideDown = false; /** - * Enable separation at x-axis. - * @type {bool} + * @property {bool} separateX - Enable separation at x-axis. + * @default */ this.separateX = true; /** - * Enable separation at y-axis. - * @type {bool} + * @property {bool} separateY - Enable separation at y-axis. + * @default */ this.separateY = true; + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + + /** + * @property {bool} tilemap - The tilemap this tile belongs to. + */ this.tilemap = tilemap; + + /** + * @property {number} index - The index of this tile type in the core map data. + */ this.index = index; + + /** + * @property {number} width - The width of the tile. + */ this.width = width; + + /** + * @property {number} height - The height of the tile. + */ this.height = height; }; Phaser.Tile.prototype = { - /** + /** * Clean up memory. + * @method destroy */ destroy: function () { this.tilemap = null; }, - /** + /** * Set collision configs. - * @param collision {number} Bit field of flags. (see Tile.allowCollision) - * @param resetCollisions {bool} Reset collision flags before set. - * @param separateX {bool} Enable seprate at x-axis. - * @param separateY {bool} Enable seprate at y-axis. + * @method setCollision + * @param {bool} left - Indicating collide with any object on the left. + * @param {bool} right - Indicating collide with any object on the right. + * @param {bool} up - Indicating collide with any object on the top. + * @param {bool} down - Indicating collide with any object on the bottom. + * @param {bool} reset - Description. + * @param {bool} separateX - Separate at x-axis. + * @param {bool} separateY - Separate at y-axis. */ setCollision: function (left, right, up, down, reset, separateX, separateY) { @@ -110,8 +139,9 @@ Phaser.Tile.prototype = { }, - /** + /** * Reset collision status flags. + * @method resetCollision */ resetCollision: function () { diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index 40eec6c8..dfbc677c 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -1,21 +1,24 @@ /** -* Phaser - Tilemap -* -* This GameObject allows for the display of a tilemap within the game world. Tile maps consist of an image, tile data and a size. -* Internally it creates a TilemapLayer for each layer in the tilemap. +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @module Phaser.Tilemap */ + /** -* Tilemap constructor * Create a new Tilemap. -* -* @param game {Phaser.Game} Current game instance. -* @param key {string} Asset key for this map. -* @param mapData {string} Data of this map. (a big 2d array, normally in csv) -* @param format {number} Format of this map data, available: Tilemap.CSV or Tilemap.JSON. -* @param resizeWorld {bool} Resize the world bound automatically based on this tilemap? -* @param tileWidth {number} Width of tiles in this map (used for CSV maps). -* @param tileHeight {number} Height of tiles in this map (used for CSV maps). +* @class Phaser.Tilemap +* @classdesc This GameObject allows for the display of a tilemap within the game world. Tile maps consist of an image, tile data and a size. +* Internally it creates a TilemapLayer for each layer in the tilemap. +* @constructor +* @param {Phaser.Game} game - Current game instance. +* @param {string} key - Asset key for this map. +* @param {object} x - Description. +* @param {object} y - Description. +* @param {bool} resizeWorld - Resize the world bound automatically based on this tilemap? +* @param {number} tileWidth - Width of tiles in this map (used for CSV maps). +* @param {number} tileHeight - Height of tiles in this map (used for CSV maps). */ Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight) { @@ -23,38 +26,85 @@ Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight) if (typeof tileWidth === "undefined") { tileWidth = 0; } if (typeof tileHeight === "undefined") { tileHeight = 0; } + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; + + /** + * @property {Description} group - Description. + */ this.group = null; + + /** + * @property {string} name - The user defined name given to this Description. + * @default + */ this.name = ''; + + /** + * @property {Description} key - Description. + */ this.key = key; /** - * Render iteration counter + * @property {number} renderOrderID - Render iteration counter + * @default */ this.renderOrderID = 0; - /** - * Tilemap collision callback. - * @type {function} - */ + /** + * @property {bool} collisionCallback - Tilemap collision callback. + * @default + */ this.collisionCallback = null; + /** + * @property {bool} exists - Description. + * @default + */ this.exists = true; + + /** + * @property {bool} visible - Description. + * @default + */ this.visible = true; + /** + * @property {bool} tiles - Description. + * @default + */ this.tiles = []; + + /** + * @property {bool} layers - Description. + * @default + */ this.layers = []; var map = this.game.cache.getTilemap(key); PIXI.DisplayObjectContainer.call(this); + /** + * @property {Description} position - Description. + */ this.position.x = x; this.position.y = y; + /** + * @property {Description} type - Description. + */ this.type = Phaser.TILEMAP; + /** + * @property {Description} renderer - Description. + */ this.renderer = new Phaser.TilemapRenderer(this.game); + /** + * @property {Description} mapFormat - Description. + */ this.mapFormat = map.format; switch (this.mapFormat) @@ -83,11 +133,13 @@ Phaser.Tilemap.CSV = 0; Phaser.Tilemap.JSON = 1; /** -* Parset csv map data and generate tiles. -* @param data {string} CSV map data. -* @param key {string} Asset key for tileset image. -* @param tileWidth {number} Width of its tile. -* @param tileHeight {number} Height of its tile. +* Parse csv map data and generate tiles. +* +* @method Phaser.Tilemap.prototype.parseCSV +* @param {string} data - CSV map data. +* @param {string} key - Asset key for tileset image. +* @param {number} tileWidth - Width of its tile. +* @param {number} tileHeight - Height of its tile. */ Phaser.Tilemap.prototype.parseCSV = function (data, key, tileWidth, tileHeight) { @@ -123,8 +175,10 @@ Phaser.Tilemap.prototype.parseCSV = function (data, key, tileWidth, tileHeight) /** * Parse JSON map data and generate tiles. -* @param data {string} JSON map data. -* @param key {string} Asset key for tileset image. +* +* @method Phaser.Tilemap.prototype.parseTiledJSON +* @param {string} data - JSON map data. +* @param {string} key - Asset key for tileset image. */ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { @@ -181,7 +235,8 @@ Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { /** * Create tiles of given quantity. -* @param qty {number} Quentity of tiles to be generated. +* @method Phaser.Tilemap.prototype.generateTiles +* @param {number} qty - Quantity of tiles to be generated. */ Phaser.Tilemap.prototype.generateTiles = function (qty) { @@ -194,8 +249,10 @@ Phaser.Tilemap.prototype.generateTiles = function (qty) { /** * Set callback to be called when this tilemap collides. -* @param context {object} Callback will be called with this context. -* @param callback {function} Callback function. +* +* @method Phaser.Tilemap.prototype.setCollisionCallback +* @param {object} context - Callback will be called with this context. +* @param {Function} callback - Callback function. */ Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) { @@ -206,12 +263,14 @@ Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) { /** * Set collision configs of tiles in a range index. -* @param start {number} First index of tiles. -* @param end {number} Last index of tiles. -* @param collision {number} Bit field of flags. (see Tile.allowCollision) -* @param resetCollisions {bool} Reset collision flags before set. -* @param separateX {bool} Enable seprate at x-axis. -* @param separateY {bool} Enable seprate at y-axis. +* +* @method Phaser.Tilemap.prototype.setCollisionRange +* @param {number} start - First index of tiles. +* @param {number} end - Last index of tiles. +* @param {number} collision - Bit field of flags. (see Tile.allowCollision) +* @param {bool} resetCollisions - Reset collision flags before set. +* @param {bool} separateX - Enable separate at x-axis. +* @param {bool} separateY - Enable separate at y-axis. */ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, up, down, resetCollisions, separateX, separateY) { @@ -228,11 +287,15 @@ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, /** * Set collision configs of tiles with given index. -* @param values {number[]} Index array which contains all tile indexes. The tiles with those indexes will be setup with rest parameters. -* @param collision {number} Bit field of flags. (see Tile.allowCollision) -* @param resetCollisions {bool} Reset collision flags before set. -* @param separateX {bool} Enable seprate at x-axis. -* @param separateY {bool} Enable seprate at y-axis. +* @param {number[]} values - Index array which contains all tile indexes. The tiles with those indexes will be setup with rest parameters. +* @param {number} collision - Bit field of flags (see Tile.allowCollision). +* @param {bool} resetCollisions - Reset collision flags before set. +* @param {bool} left - Indicating collide with any object on the left. +* @param {bool} right - Indicating collide with any object on the right. +* @param {bool} up - Indicating collide with any object on the top. +* @param {bool} down - Indicating collide with any object on the bottom. +* @param {bool} separateX - Enable separate at x-axis. +* @param {bool} separateY - Enable separate at y-axis. */ Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up, down, resetCollisions, separateX, separateY) { @@ -251,7 +314,7 @@ Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up /** * Get the tile by its index. -* @param value {number} Index of the tile you want to get. +* @param {number} value - Index of the tile you want to get. * @return {Tile} The tile with given index. */ Phaser.Tilemap.prototype.getTileByIndex = function (value) { @@ -267,9 +330,9 @@ Phaser.Tilemap.prototype.getTileByIndex = function (value) { /** * Get the tile located at specific position and layer. -* @param x {number} X position of this tile located. -* @param y {number} Y position of this tile located. -* @param [layer] {number} layer of this tile located. +* @param {number} x - X position of this tile located. +* @param {number} y - Y position of this tile located. +* @param {number} [layer] - layer of this tile located. * @return {Tile} The tile with specific properties. */ Phaser.Tilemap.prototype.getTile = function (x, y, layer) { @@ -281,10 +344,10 @@ Phaser.Tilemap.prototype.getTile = function (x, y, layer) { }; /** -* Get the tile located at specific position (in world coordinate) and layer. (thus you give a position of a point which is within the tile) -* @param x {number} X position of the point in target tile. -* @param x {number} Y position of the point in target tile. -* @param [layer] {number} layer of this tile located. +* Get the tile located at specific position (in world coordinate) and layer (thus you give a position of a point which is within the tile). +* @param {number} x - X position of the point in target tile. +* @param {number} y - Y position of the point in target tile. +* @param {number} [layer] - layer of this tile located. * @return {Tile} The tile with specific properties. */ Phaser.Tilemap.prototype.getTileFromWorldXY = function (x, y, layer) { @@ -296,9 +359,9 @@ Phaser.Tilemap.prototype.getTileFromWorldXY = function (x, y, layer) { }; /** -* Gets the tile underneath the Input.x/y position -* @param layer The layer to check, defaults to 0 -* @returns {Tile} +* Gets the tile underneath the Input.x/y position. +* @param {number} layer - The layer to check, defaults to 0. +* @return {Tile} */ Phaser.Tilemap.prototype.getTileFromInputXY = function (layer) { @@ -310,8 +373,8 @@ Phaser.Tilemap.prototype.getTileFromInputXY = function (layer) { /** * Get tiles overlaps the given object. -* @param object {GameObject} Tiles you want to get that overlaps this. -* @return {array} Array with tiles information. (Each contains x, y and the tile.) +* @param {GameObject} object - Tiles you want to get that overlaps this. +* @return {array} Array with tiles information (Each contains x, y and the tile). */ Phaser.Tilemap.prototype.getTileOverlaps = function (object) { @@ -323,9 +386,9 @@ Phaser.Tilemap.prototype.getTileOverlaps = function (object) { /** * Check whether this tilemap collides with the given game object or group of objects. -* @param objectOrGroup {function} Target object of group you want to check. -* @param callback {function} This is called if objectOrGroup collides the tilemap. -* @param context {object} Callback will be called with this context. +* @param {Function} objectOrGroup - Target object of group you want to check. +* @param {Function} callback - This is called if objectOrGroup collides the tilemap. +* @param {object} context - Callback will be called with this context. * @return {bool} Return true if this collides with given object, otherwise return false. */ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { @@ -353,7 +416,7 @@ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { /** * Check whether this tilemap collides with the given game object. -* @param object {GameObject} Target object you want to check. +* @param {GameObject} object - Target object you want to check. * @return {bool} Return true if this collides with given object, otherwise return false. */ Phaser.Tilemap.prototype.collideGameObject = function (object) { @@ -383,10 +446,10 @@ Phaser.Tilemap.prototype.collideGameObject = function (object) { /** * Set a tile to a specific layer. -* @param x {number} X position of this tile. -* @param y {number} Y position of this tile. -* @param index {number} The index of this tile type in the core map data. -* @param [layer] {number} which layer you want to set the tile to. +* @param {number} x - X position of this tile. +* @param {number} y - Y position of this tile. +* @param {number} index - The index of this tile type in the core map data. +* @param {number} [layer] - Which layer you want to set the tile to. */ Phaser.Tilemap.prototype.putTile = function (x, y, index, layer) { @@ -397,7 +460,7 @@ Phaser.Tilemap.prototype.putTile = function (x, y, index, layer) { }; /** -* Calls the renderer +* Calls the renderer. */ Phaser.Tilemap.prototype.update = function () { @@ -405,6 +468,9 @@ Phaser.Tilemap.prototype.update = function () { }; +/** +* Description. +*/ Phaser.Tilemap.prototype.destroy = function () { this.tiles.length = 0; @@ -412,6 +478,10 @@ Phaser.Tilemap.prototype.destroy = function () { }; +/** +* Get width in pixels. +* @return {number} +*/ Object.defineProperty(Phaser.Tilemap.prototype, "widthInPixels", { get: function () { @@ -420,6 +490,10 @@ Object.defineProperty(Phaser.Tilemap.prototype, "widthInPixels", { }); +/** +* Get height in pixels. +* @return {number} +*/ Object.defineProperty(Phaser.Tilemap.prototype, "heightInPixels", { get: function () { diff --git a/src/tilemap/TilemapLayer.js b/src/tilemap/TilemapLayer.js index 8e5487ee..510d32f6 100644 --- a/src/tilemap/TilemapLayer.js +++ b/src/tilemap/TilemapLayer.js @@ -1,113 +1,203 @@ /** -* Phaser - TilemapLayer -* -* A Tilemap Layer. Tiled format maps can have multiple overlapping layers. +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @module Phaser.TilemapLayer */ /** -* TilemapLayer constructor * Create a new TilemapLayer. -* +* @class Phaser.TilemapLayer +* @classdesc A Tilemap Layer. Tiled format maps can have multiple overlapping layers. +* @constructor * @param parent {Tilemap} The tilemap that contains this layer. * @param id {number} The ID of this layer within the Tilemap array. * @param key {string} Asset key for this map. -* @param mapFormat {number} Format of this map data, available: Tilemap.CSV or Tilemap.JSON. +* @param mapformat {number} Format of this map data, available: Tilemap.CSV or Tilemap.JSON. * @param name {string} Name of this layer, so you can get this layer by its name. * @param tileWidth {number} Width of tiles in this map. * @param tileHeight {number} Height of tiles in this map. */ Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, tileHeight) { - /** - * Controls whether update() and draw() are automatically called. - * @type {bool} - */ + /** + * @property {bool} exists - Controls whether update() and draw() are automatically called. + * @default + */ this.exists = true; - /** - * Controls whether draw() are automatically called. - * @type {bool} - */ + /** + * @property {bool} visible - Controls whether draw() are automatically called. + * @default + */ this.visible = true; /** * How many tiles in each row. * Read-only variable, do NOT recommend changing after the map is loaded! - * @type {number} + * @property {number} widthInTiles + * @default */ this.widthInTiles = 0; /** * How many tiles in each column. * Read-only variable, do NOT recommend changing after the map is loaded! - * @type {number} + * @property {number} heightInTiles + * @default */ this.heightInTiles = 0; /** * Read-only variable, do NOT recommend changing after the map is loaded! - * @type {number} + * @property {number} widthInPixels + * @default */ this.widthInPixels = 0; /** * Read-only variable, do NOT recommend changing after the map is loaded! - * @type {number} + * @property {number} heightInPixels + * @default */ this.heightInPixels = 0; /** * Distance between REAL tiles to the tileset texture bound. - * @type {number} + * @property {number} tileMargin + * @default */ this.tileMargin = 0; /** * Distance between every 2 neighbor tile in the tileset texture. - * @type {number} + * @property {number} tileSpacing + * @default */ this.tileSpacing = 0; + /** + * @property {Description} parent - Description. + */ this.parent = parent; + + /** + * @property {Phaser.Game} game - Description. + */ this.game = parent.game; + + /** + * @property {Description} ID - Description. + */ this.ID = id; + + /** + * @property {Description} name - Description. + */ this.name = name; + + /** + * @property {Description} key - Description. + */ this.key = key; + + /** + * @property {Description} type - Description. + */ this.type = Phaser.TILEMAPLAYER; + /** + * @property {tileWidth} mapFormat - Description. + */ this.mapFormat = mapFormat; + + /** + * @property {Description} tileWidth - Description. + */ this.tileWidth = tileWidth; + + /** + * @property {Description} tileHeight - Description. + */ this.tileHeight = tileHeight; + /** + * @property {Phaser.Rectangle} boundsInTiles - Description. + */ this.boundsInTiles = new Phaser.Rectangle(); var map = this.game.cache.getTilemap(key); + /** + * @property {Description} tileset - Description. + */ this.tileset = map.data; + /** + * @property {Description} _alpha - Description. + * @private + * @default + */ this._alpha = 1; - this.quadTree = null; - + /** + * @property {Description} canvas - Description. + * @default + */ this.canvas = null; + + /** + * @property {Description} context - Description. + * @default + */ this.context = null; + + /** + * @property {Description} baseTexture - Description. + * @default + */ this.baseTexture = null; + + /** + * @property {Description} texture - Description. + * @default + */ this.texture = null; + + /** + * @property {Description} sprite - Description. + * @default + */ this.sprite = null; + /** + * @property {array} mapData - Description. + */ this.mapData = []; + + /** + * @property {array} _tempTileBlock - Description. + * @private + */ this._tempTileBlock = []; + + /** + * @property {array} _tempBlockResults - Description. + * @private + * + */ this._tempBlockResults = []; }; Phaser.TilemapLayer.prototype = { - /** + /** * Set a specific tile with its x and y in tiles. - * @param x {number} X position of this tile in world coordinates. - * @param y {number} Y position of this tile in world coordinates. - * @param index {number} The index of this tile type in the core map data. + * @method putTileWorldXY + * @param {number} x - X position of this tile in world coordinates. + * @param {number} y - Y position of this tile in world coordinates. + * @param {number} index - The index of this tile type in the core map data. */ putTileWorldXY: function (x, y, index) { @@ -124,11 +214,12 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Set a specific tile with its x and y in tiles. - * @param x {number} X position of this tile. - * @param y {number} Y position of this tile. - * @param index {number} The index of this tile type in the core map data. + * @method putTile + * @param {number} x - X position of this tile. + * @param {number} y - Y position of this tile. + * @param {number} index - The index of this tile type in the core map data. */ putTile: function (x, y, index) { @@ -142,14 +233,15 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Swap tiles with 2 kinds of indexes. - * @param tileA {number} First tile index. - * @param tileB {number} Second tile index. - * @param [x] {number} specify a Rectangle of tiles to operate. The x position in tiles of Rectangle's left-top corner. - * @param [y] {number} specify a Rectangle of tiles to operate. The y position in tiles of Rectangle's left-top corner. - * @param [width] {number} specify a Rectangle of tiles to operate. The width in tiles. - * @param [height] {number} specify a Rectangle of tiles to operate. The height in tiles. + * @method swapTile + * @param {number} tileA - First tile index. + * @param {number} tileB - Second tile index. + * @param {number} [x] - specify a Rectangle of tiles to operate. The x position in tiles of Rectangle's left-top corner. + * @param {number} [y] - specify a Rectangle of tiles to operate. The y position in tiles of Rectangle's left-top corner. + * @param {number} [width] - specify a Rectangle of tiles to operate. The width in tiles. + * @param {number} [height] - specify a Rectangle of tiles to operate. The height in tiles. */ swapTile: function (tileA, tileB, x, y, width, height) { @@ -186,13 +278,14 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Fill a tile block with a specific tile index. - * @param index {number} Index of tiles you want to fill with. - * @param [x] {number} x position (in tiles) of block's left-top corner. - * @param [y] {number} y position (in tiles) of block's left-top corner. - * @param [width] {number} width of block. - * @param [height] {number} height of block. + * @method fillTile + * @param {number} index - Index of tiles you want to fill with. + * @param {number} [x] - X position (in tiles) of block's left-top corner. + * @param {number} [y] - Y position (in tiles) of block's left-top corner. + * @param {number} [width] - width of block. + * @param {number} [height] - height of block. */ fillTile: function (index, x, y, width, height) { @@ -210,13 +303,14 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Set random tiles to a specific tile block. - * @param tiles {number[]} Tiles with indexes in this array will be randomly set to the given block. - * @param [x] {number} x position (in tiles) of block's left-top corner. - * @param [y] {number} y position (in tiles) of block's left-top corner. - * @param [width] {number} width of block. - * @param [height] {number} height of block. + * @method randomiseTiles + * @param {number[]} tiles - Tiles with indexes in this array will be randomly set to the given block. + * @param {number} [x] - X position (in tiles) of block's left-top corner. + * @param {number} [y] - Y position (in tiles) of block's left-top corner. + * @param {number} [width] - width of block. + * @param {number} [height] - height of block. */ randomiseTiles: function (tiles, x, y, width, height) { @@ -234,14 +328,15 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Replace one kind of tiles to another kind. - * @param tileA {number} Index of tiles you want to replace. - * @param tileB {number} Index of tiles you want to set. - * @param [x] {number} x position (in tiles) of block's left-top corner. - * @param [y] {number} y position (in tiles) of block's left-top corner. - * @param [width] {number} width of block. - * @param [height] {number} height of block. + * @method replaceTile + * @param {number} tileA - First tile index. + * @param {number} tileB - Second tile index. + * @param {number} [x] - X position (in tiles) of block's left-top corner. + * @param {number} [y] - Y position (in tiles) of block's left-top corner. + * @param {number} [width] - width of block. + * @param {number} [height] - height of block. */ replaceTile: function (tileA, tileB, x, y, width, height) { @@ -262,12 +357,13 @@ Phaser.TilemapLayer.prototype = { }, - /** - * Get a tile block with specific position and size.(both are in tiles) - * @param x {number} X position of block's left-top corner. - * @param y {number} Y position of block's left-top corner. - * @param width {number} Width of block. - * @param height {number} Height of block. + /** + * Get a tile block with specific position and size (both are in tiles). + * @method getTileBlock + * @param {number} [x] - X position (in tiles) of block's left-top corner. + * @param {number} [y] - Y position (in tiles) of block's left-top corner. + * @param {number} [width] - width of block. + * @param {number} [height] - height of block. */ getTileBlock: function (x, y, width, height) { @@ -288,10 +384,11 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Get a tile with specific position (in world coordinate). (thus you give a position of a point which is within the tile) - * @param x {number} X position of the point in target tile. - * @param x {number} Y position of the point in target tile. + * @method getTileFromWorldXY + * @param {number} [x] - X position (in tiles) of block's left-top corner. + * @param {number} [y] - Y position (in tiles) of block's left-top corner. */ getTileFromWorldXY: function (x, y) { @@ -302,10 +399,11 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Get tiles overlaps the given object. - * @param object {GameObject} Tiles you want to get that overlaps this. - * @return {array} Array with tiles informations. (Each contains x, y and the tile.) + * @method getTileOverlaps + * @param {GameObject} object - Tiles you want to get that overlaps this. + * @return {array} Array with tiles informations (each contains x, y, and the tile). */ getTileOverlaps: function (object) { @@ -339,13 +437,14 @@ Phaser.TilemapLayer.prototype = { }, - /** - * Get a tile block with its position and size. (This method does not return, it'll set result to _tempTileBlock) - * @param x {number} X position of block's left-top corner. - * @param y {number} Y position of block's left-top corner. - * @param width {number} Width of block. - * @param height {number} Height of block. - * @param collisionOnly {bool} Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). + /** + * Get a tile block with its position and size (this method does not return, it'll set result to _tempTileBlock). + * @method getTempBlock + * @param {number} [x] - X position (in tiles) of block's left-top corner. + * @param {number} [y] - Y position (in tiles) of block's left-top corner. + * @param {number} [width] - width of block. + * @param {number} [height] - height of block. + * @param {bool} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). */ getTempBlock: function (x, y, width, height, collisionOnly) { @@ -404,10 +503,11 @@ Phaser.TilemapLayer.prototype = { } }, - /** + /** * Get the tile index of specific position (in tiles). - * @param x {number} X position of the tile. - * @param y {number} Y position of the tile. + * @method getTileIndex + * @param {number} x - X position of the tile. + * @param {number} y - Y position of the tile. * @return {number} Index of the tile at that position. Return null if there isn't a tile there. */ getTileIndex: function (x, y) { @@ -424,9 +524,10 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Add a column of tiles into the layer. - * @param column {string[]/number[]} An array of tile indexes to be added. + * @method addColumn + * @param {string[]|number[]} column - An array of tile indexes to be added. */ addColumn: function (column) { @@ -450,6 +551,10 @@ Phaser.TilemapLayer.prototype = { }, + /** + * Description. + * @method createCanvas + */ createCanvas: function () { var width = this.game.width; @@ -484,6 +589,7 @@ Phaser.TilemapLayer.prototype = { /** * Update boundsInTiles with widthInTiles and heightInTiles. + * @method updateBounds */ updateBounds: function () { @@ -491,12 +597,13 @@ Phaser.TilemapLayer.prototype = { }, - /** + /** * Parse tile offsets from map data. * Basically this creates a large array of objects that contain the x/y coordinates to grab each tile from * for the entire map. Yes we could calculate this at run-time by using the tile index and some math, but we're * trading a quite small bit of memory here to not have to process that in our main render loop. - * @return {number} length of tileOffsets array. + * @method parseTileOffsets + * @return {number} Length of tileOffsets array. */ parseTileOffsets: function () { @@ -529,6 +636,13 @@ Phaser.TilemapLayer.prototype = { }; +/** +* Get +* @return {Description} +*//** +* Set +* @param {Description} value - Description. +*/ Object.defineProperty(Phaser.TilemapLayer.prototype, 'alpha', { get: function() { diff --git a/src/tilemap/TilemapRenderer.js b/src/tilemap/TilemapRenderer.js index bd881058..85ff3328 100644 --- a/src/tilemap/TilemapRenderer.js +++ b/src/tilemap/TilemapRenderer.js @@ -1,19 +1,106 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @module Phaser.TilemapRenderer +*/ + +/** +* Tilemap renderer. +* +* @class Phaser.TilemapRenderer +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. +*/ Phaser.TilemapRenderer = function (game) { + /** + * @property {Phaser.Game} game - A reference to the currently running game. + */ this.game = game; - - // Local rendering related temp vars to help avoid gc spikes through constant var creation + + /** + * @property {number} _ga - Local rendering related temp vars to help avoid gc spikes through constant var creation. + * @private + * @default + */ this._ga = 1; + + /** + * @property {number} _dx - Description. + * @private + * @default + */ this._dx = 0; + + /** + * @property {number} _dy - Description. + * @private + * @default + */ this._dy = 0; + + /** + * @property {number} _dw - Description. + * @private + * @default + */ this._dw = 0; + + /** + * @property {number} _dh - Description. + * @private + * @default + */ this._dh = 0; + + /** + * @property {number} _tx - Description. + * @private + * @default + */ this._tx = 0; + + /** + * @property {number} _ty - Description. + * @private + * @default + */ this._ty = 0; + + /** + * @property {number} _tl - Description. + * @private + * @default + */ this._tl = 0; + + /** + * @property {number} _maxX - Description. + * @private + * @default + */ this._maxX = 0; + + /** + * @property {number} _maxY - Description. + * @private + * @default + */ this._maxY = 0; + + /** + * @property {number} _startX - Description. + * @private + * @default + */ this._startX = 0; + + /** + * @property {number} _startY - Description. + * @private + * @default + */ this._startY = 0; }; @@ -21,9 +108,11 @@ Phaser.TilemapRenderer = function (game) { Phaser.TilemapRenderer.prototype = { /** - * Render a tilemap to a canvas. - * @param tilemap {Tilemap} The tilemap data to render. - */ + * Render a tilemap to a canvas. + * @method render + * @param tilemap {Tilemap} The tilemap data to render. + * @return {bool} Description. + */ render: function (tilemap) { // Loop through the layers diff --git a/src/time/Time.js b/src/time/Time.js index b141e24f..219a42bc 100644 --- a/src/time/Time.js +++ b/src/time/Time.js @@ -1,160 +1,145 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Time */ /** -* This is the core internal game clock. It manages the elapsed time and calculation of elapsed values, -* used for game object motion and tweens. +* Time constructor. * -* @class Time +* @class Phaser.Time +* @classdesc This is the core internal game clock. It manages the elapsed time and calculation of elapsed values, +* used for game object motion and tweens. * @constructor * @param {Phaser.Game} game A reference to the currently running game. */ Phaser.Time = function (game) { /** - * A reference to the currently running Game. - * @property game - * @type {Phaser.Game} + * @property {Phaser.Game} game - Local reference to game. */ this.game = game; /** * The time at which the Game instance started. - * @property _started + * @property {number} _started * @private - * @type {Number} + * @default */ this._started = 0; /** * The time (in ms) that the last second counter ticked over. - * @property _timeLastSecond + * @property {number} _timeLastSecond * @private - * @type {Number} + * @default */ this._timeLastSecond = 0; /** * The time the game started being paused. - * @property _pauseStarted + * @property {number} _pauseStarted * @private - * @type {Number} + * @default */ this._pauseStarted = 0; /** * The elapsed time calculated for the physics motion updates. - * @property physicsElapsed - * @public - * @type {Number} + * @property {number} physicsElapsed + * @default */ this.physicsElapsed = 0; /** * Game time counter. - * @property time - * @public - * @type {Number} + * @property {number} time + * @default */ this.time = 0; /** * Records how long the game has been paused for. Is reset each time the game pauses. - * @property pausedTime - * @public - * @type {Number} + * @property {number} pausedTime + * @default */ this.pausedTime = 0; /** * The time right now. - * @property now - * @public - * @type {Number} + * @property {number} now + * @default */ this.now = 0; /** * Elapsed time since the last frame. - * @property elapsed - * @public - * @type {Number} + * @property {number} elapsed + * @default */ this.elapsed = 0; /** * Frames per second. - * @property fps - * @public - * @type {Number} + * @property {number} fps + * @default */ this.fps = 0; /** * The lowest rate the fps has dropped to. - * @property fpsMin - * @public - * @type {Number} + * @property {number} fpsMin + * @default */ this.fpsMin = 1000; /** * The highest rate the fps has reached (usually no higher than 60fps). - * @property fpsMax - * @public - * @type {Number} + * @property {number} fpsMax + * @default */ this.fpsMax = 0; /** * The minimum amount of time the game has taken between two frames. - * @property msMin - * @public - * @type {Number} + * @property {number} msMin + * @default */ this.msMin = 1000; /** * The maximum amount of time the game has taken between two frames. - * @property msMax - * @public - * @type {Number} + * @property {number} msMax + * @default */ this.msMax = 0; /** * The number of frames record in the last second. - * @property frames - * @public - * @type {Number} + * @property {number} frames + * @default */ this.frames = 0; /** * Records how long the game was paused for in miliseconds. - * @property pauseDuration - * @public - * @type {Number} + * @property {number} pauseDuration + * @default */ this.pauseDuration = 0; /** * The value that setTimeout needs to work out when to next update - * @property timeToCall - * @public - * @type {Number} + * @property {number} timeToCall + * @default */ this.timeToCall = 0; /** * Internal value used by timeToCall as part of the setTimeout loop - * @property lastTime - * @public - * @type {Number} + * @property {number} lastTime + * @default */ this.lastTime = 0; @@ -162,6 +147,11 @@ Phaser.Time = function (game) { this.game.onPause.add(this.gamePaused, this); this.game.onResume.add(this.gameResumed, this); + /** + * Description. + * @property {bool} _justResumed + * @default + */ this._justResumed = false; }; @@ -171,7 +161,7 @@ Phaser.Time.prototype = { /** * The number of seconds that have elapsed since the game was started. * @method totalElapsedSeconds - * @return {Number} + * @return {number} */ totalElapsedSeconds: function() { return (this.now - this._started) * 0.001; @@ -179,9 +169,9 @@ Phaser.Time.prototype = { /** * Updates the game clock and calculate the fps. - * This is called automatically by Phaser.Game + * This is called automatically by Phaser.Game. * @method update - * @param {Number} time The current timestamp, either performance.now or Date.now depending on the browser + * @param {number} time - The current timestamp, either performance.now or Date.now depending on the browser. */ update: function (time) { @@ -251,8 +241,8 @@ Phaser.Time.prototype = { /** * How long has passed since the given time. * @method elapsedSince - * @param {Number} since The time you want to measure against. - * @return {Number} The difference between the given time and now. + * @param {number} since - The time you want to measure against. + * @return {number} The difference between the given time and now. */ elapsedSince: function (since) { return this.now - since; @@ -261,8 +251,8 @@ Phaser.Time.prototype = { /** * How long has passed since the given time (in seconds). * @method elapsedSecondsSince - * @param {Number} since The time you want to measure (in seconds). - * @return {Number} Duration between given time and now (in seconds). + * @param {number} since - The time you want to measure (in seconds). + * @return {number} Duration between given time and now (in seconds). */ elapsedSecondsSince: function (since) { return (this.now - since) * 0.001; diff --git a/src/tween/Easing.js b/src/tween/Easing.js index b2b8350c..42ea177a 100644 --- a/src/tween/Easing.js +++ b/src/tween/Easing.js @@ -1,7 +1,33 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Easing +*/ + + +/** +* A collection of easing methods defining ease-in ease-out curves. +* +* @class Phaser.Easing +*/ Phaser.Easing = { + /** + * Linear easing. + * + * @namespace Linear + */ Linear: { + /** + * Ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Linear + * @returns {number} k^2. + */ None: function ( k ) { return k; @@ -10,20 +36,49 @@ Phaser.Easing = { }, + /** + * Quadratic easing. + * + * @namespace Quadratic + */ Quadratic: { + /** + * Ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Quadratic + * @returns {number} k^2. + */ In: function ( k ) { return k * k; }, + /** + * Ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Quadratic + * @returns {number} k* (2-k). + */ Out: function ( k ) { return k * ( 2 - k ); }, + /** + * Ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Quadratic + * @returns {number} Description. + */ InOut: function ( k ) { if ( ( k *= 2 ) < 1 ) return 0.5 * k * k; @@ -33,20 +88,49 @@ Phaser.Easing = { }, + /** + * Cubic easing. + * + * @namespace Cubic + */ Cubic: { + /** + * Cubic ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Cubic + * @returns {number} Description. + */ In: function ( k ) { return k * k * k; }, + /** + * Cubic ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Cubic + * @returns {number} Description. + */ Out: function ( k ) { return --k * k * k + 1; }, + /** + * Cubic ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Cubic + * @returns {number} Description. + */ InOut: function ( k ) { if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k; @@ -56,20 +140,49 @@ Phaser.Easing = { }, + /** + * Quartic easing. + * + * @namespace Quartic + */ Quartic: { + /** + * Quartic ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Quartic + * @returns {number} Description. + */ In: function ( k ) { return k * k * k * k; }, + /** + * Quartic ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Quartic + * @returns {number} Description. + */ Out: function ( k ) { return 1 - ( --k * k * k * k ); }, + /** + * Quartic ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @returns {number} Description. + * @memberof Quartic + */ InOut: function ( k ) { if ( ( k *= 2 ) < 1) return 0.5 * k * k * k * k; @@ -79,20 +192,49 @@ Phaser.Easing = { }, + /** + * Quintic easing. + * + * @namespace Quintic + */ Quintic: { + /** + * Quintic ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Quintic + * @returns {number} Description. + */ In: function ( k ) { return k * k * k * k * k; }, + /** + * Quintic ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Quintic + * @returns {number} Description. + */ Out: function ( k ) { return --k * k * k * k * k + 1; }, + /** + * Quintic ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Quintic + * @returns {number} Description. + */ InOut: function ( k ) { if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k * k * k; @@ -102,20 +244,49 @@ Phaser.Easing = { }, + /** + * Sinusoidal easing. + * + * @namespace Sinusoidal + */ Sinusoidal: { + /** + * Sinusoidal ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Sinusoidal + * @returns {number} Description. + */ In: function ( k ) { return 1 - Math.cos( k * Math.PI / 2 ); }, + /** + * Sinusoidal ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Sinusoidal + * @returns {number} Description. + */ Out: function ( k ) { return Math.sin( k * Math.PI / 2 ); }, + /** + * Sinusoidal ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Sinusoidal + * @returns {number} Description. + */ InOut: function ( k ) { return 0.5 * ( 1 - Math.cos( Math.PI * k ) ); @@ -124,20 +295,49 @@ Phaser.Easing = { }, + /** + * Exponential easing. + * + * @namespace Exponential + */ Exponential: { + /** + * Exponential ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Exponential + * @returns {number} Description. + */ In: function ( k ) { return k === 0 ? 0 : Math.pow( 1024, k - 1 ); }, + /** + * Exponential ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Exponential + * @returns {number} Description. + */ Out: function ( k ) { return k === 1 ? 1 : 1 - Math.pow( 2, - 10 * k ); }, + /** + * Exponential ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Exponential + * @returns {number} Description. + */ InOut: function ( k ) { if ( k === 0 ) return 0; @@ -149,20 +349,49 @@ Phaser.Easing = { }, + /** + * Circular easing. + * + * @namespace Circular + */ Circular: { + /** + * Circular ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Circular + * @returns {number} Description. + */ In: function ( k ) { return 1 - Math.sqrt( 1 - k * k ); }, + /** + * Circular ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Circular + * @returns {number} Description. + */ Out: function ( k ) { return Math.sqrt( 1 - ( --k * k ) ); }, + /** + * Circular ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Circular + * @returns {number} Description. + */ InOut: function ( k ) { if ( ( k *= 2 ) < 1) return - 0.5 * ( Math.sqrt( 1 - k * k) - 1); @@ -172,8 +401,21 @@ Phaser.Easing = { }, + /** + * Elastic easing. + * + * @namespace Elastic + */ Elastic: { + /** + * Elastic ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Elastic + * @returns {number} Description. + */ In: function ( k ) { var s, a = 0.1, p = 0.4; @@ -185,6 +427,14 @@ Phaser.Easing = { }, + /** + * Elastic ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Elastic + * @returns {number} Description. + */ Out: function ( k ) { var s, a = 0.1, p = 0.4; @@ -196,6 +446,14 @@ Phaser.Easing = { }, + /** + * Elastic ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Elastic + * @returns {number} Description. + */ InOut: function ( k ) { var s, a = 0.1, p = 0.4; @@ -210,8 +468,21 @@ Phaser.Easing = { }, + /** + * Back easing. + * + * @namespace Back + */ Back: { + /** + * Back ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Back + * @returns {number} Description. + */ In: function ( k ) { var s = 1.70158; @@ -219,6 +490,14 @@ Phaser.Easing = { }, + /** + * Back ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Back + * @returns {number} Description. + */ Out: function ( k ) { var s = 1.70158; @@ -226,6 +505,14 @@ Phaser.Easing = { }, + /** + * Back ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Back + * @returns {number} Description. + */ InOut: function ( k ) { var s = 1.70158 * 1.525; @@ -236,14 +523,35 @@ Phaser.Easing = { }, + /** + * Bounce easing. + * + * @namespace Bounce + */ Bounce: { + /** + * Bounce ease-in. + * + * @method In + * @param {number} k - Description. + * @memberof Bounce + * @returns {number} Description. + */ In: function ( k ) { return 1 - Phaser.Easing.Bounce.Out( 1 - k ); }, + /** + * Bounce ease-out. + * + * @method Out + * @param {number} k - Description. + * @memberof Bounce + * @returns {number} Description. + */ Out: function ( k ) { if ( k < ( 1 / 2.75 ) ) { @@ -266,6 +574,14 @@ Phaser.Easing = { }, + /** + * Bounce ease-in/out. + * + * @method InOut + * @param {number} k - Description. + * @memberof Bounce + * @returns {number} Description. + */ InOut: function ( k ) { if ( k < 0.5 ) return Phaser.Easing.Bounce.In( k * 2 ) * 0.5; diff --git a/src/tween/Tween.js b/src/tween/Tween.js index 07fe841d..4abbad87 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -1,52 +1,177 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Tween +*/ + + /** * Tween constructor * Create a new Tween. * -* @param object {object} Target object will be affected by this tween. -* @param game {Phaser.Game} Current game instance. +* @class Phaser.Tween +* @constructor +* @param {object} object - Target object will be affected by this tween. +* @param {Phaser.Game} game - Current game instance. */ - Phaser.Tween = function (object, game) { /** * Reference to the target object. - * @type {object} + * @property {object} _object + * @private */ this._object = object; + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; + + /** + * @property {object} _manager - Description. + * @private + */ this._manager = this.game.tweens; - this._valuesStart = {}; - this._valuesEnd = {}; - this._valuesStartRepeat = {}; - this._duration = 1000; - this._repeat = 0; - this._yoyo = false; - this._reversed = false; - this._delayTime = 0; - this._startTime = null; - this._easingFunction = Phaser.Easing.Linear.None; - this._interpolationFunction = Phaser.Math.linearInterpolation; - this._chainedTweens = []; - this._onStartCallback = null; - this._onStartCallbackFired = false; - this._onUpdateCallback = null; - this._onCompleteCallback = null; + /** + * @property {object} _valuesStart - Description. + * @private + */ + this._valuesStart = {}; + /** + * @property {object} _valuesEnd - Description. + * @private + */ + this._valuesEnd = {}; + + /** + * @property {object} _valuesStartRepeat - Description. + * @private + */ + this._valuesStartRepeat = {}; + + /** + * @property {number} _duration - Description. + * @default + */ + this._duration = 1000; + + /** + * @property {number} _repeat - Description. + * @private + * @default + */ + this._repeat = 0; + + /** + * @property {bool} _yoyo - Description. + * @private + * @default + */ + this._yoyo = false; + + /** + * @property {bool} _reversed - Description. + * @private + * @default + */ + this._reversed = false; + + /** + * @property {number} _delayTime - Description. + * @private + * @default + */ + this._delayTime = 0; + + /** + * @property {Description} _startTime - Description. + * @private + * @default null + */ + this._startTime = null; + + /** + * @property {Description} _easingFunction - Description. + * @private + */ + this._easingFunction = Phaser.Easing.Linear.None; + + /** + * @property {Description} _interpolationFunction - Description. + * @private + */ + this._interpolationFunction = Phaser.Math.linearInterpolation; + + /** + * @property {Description} _chainedTweens - Description. + * @private + */ + this._chainedTweens = []; + + /** + * @property {Description} _onStartCallback - Description. + * @private + * @default + */ + this._onStartCallback = null; + + /** + * @property {bool} _onStartCallbackFired - Description. + * @private + * @default + */ + this._onStartCallbackFired = false; + + /** + * @property {Description} _onUpdateCallback - Description. + * @private + * @default null + */ + this._onUpdateCallback = null; + + /** + * @property {Description} _onCompleteCallback - Description. + * @private + * @default null + */ + this._onCompleteCallback = null; + + /** + * @property {number} _pausedTime - Description. + * @private + * @default + */ this._pausedTime = 0; - this._parent = null; + /** + * @property {bool} pendingDelete - Description. + * @default + */ this.pendingDelete = false; - // Set all starting values present on the target object - for ( var field in object ) { - this._valuesStart[ field ] = parseFloat(object[field], 10); - } - + // Set all starting values present on the target object + for ( var field in object ) { + this._valuesStart[ field ] = parseFloat(object[field], 10); + } + + /** + * @property {Phaser.Signal} onStart - Description. + */ this.onStart = new Phaser.Signal(); + + /** + * @property {Phaser.Signal} onComplete - Description. + */ this.onComplete = new Phaser.Signal(); + /** + * @property {bool} isRunning - Description. + * @default + */ this.isRunning = false; }; @@ -55,13 +180,16 @@ Phaser.Tween.prototype = { /** * Configure the Tween - * @param properties {object} Propertis you want to tween. - * @param [duration] {number} duration of this tween. - * @param [ease] {any} Easing function. - * @param [autoStart] {bool} Whether this tween will start automatically or not. - * @param [delay] {number} delay before this tween will start, defaults to 0 (no delay) - * @param [loop] {bool} Should the tween automatically restart once complete? (ignores any chained tweens) - * @return {Tween} Itself. + * + * @method to + * @param {object} properties - Properties you want to tween. + * @param {number} duration - Duration of this tween. + * @param {function} ease - Easing function. + * @param {bool} autoStart - Whether this tween will start automatically or not. + * @param {number} delay - Delay before this tween will start, defaults to 0 (no delay). + * @param {bool} repeat - Should the tween automatically restart once complete? (ignores any chained tweens). + * @param {Phaser.Tween} yoyo - Description. + * @return {Phaser.Tween} Itself. */ to: function ( properties, duration, ease, autoStart, delay, repeat, yoyo ) { @@ -109,6 +237,13 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method start + * @param {number} time - Description. + * @return {Phaser.Tween} Itself. + */ start: function ( time ) { if (this.game === null || this._object === null) { @@ -155,6 +290,12 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method stop + * @return {Phaser.Tween} Itself. + */ stop: function () { this._manager.remove(this); @@ -164,6 +305,13 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method delay + * @param {number} amount - Description. + * @return {Phaser.Tween} Itself. + */ delay: function ( amount ) { this._delayTime = amount; @@ -171,6 +319,13 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method repeat + * @param {number} times - How many times to repeat. + * @return {Phaser.Tween} Itself. + */ repeat: function ( times ) { this._repeat = times; @@ -178,6 +333,13 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method yoyo + * @param {Phaser.Tween} yoyo - Description. + * @return {Phaser.Tween} Itself. + */ yoyo: function( yoyo ) { this._yoyo = yoyo; @@ -185,6 +347,13 @@ Phaser.Tween.prototype = { }, + /** + * Set easing function. + * + * @method easing + * @param {function} easing - Description. + * @return {Phaser.Tween} Itself. + */ easing: function ( easing ) { this._easingFunction = easing; @@ -192,6 +361,13 @@ Phaser.Tween.prototype = { }, + /** + * Set interpolation function. + * + * @method interpolation + * @param {function} interpolation - Description. + * @return {Phaser.Tween} Itself. + */ interpolation: function ( interpolation ) { this._interpolationFunction = interpolation; @@ -199,6 +375,12 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method chain + * @return {Phaser.Tween} Itself. + */ chain: function () { this._chainedTweens = arguments; @@ -215,7 +397,7 @@ Phaser.Tween.prototype = { * .to({ x: 0 }, 1000, Phaser.Easing.Linear.None) * .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) * .loop(); - * + * @method loop * @return {Tween} Itself. */ loop: function() { @@ -223,6 +405,13 @@ Phaser.Tween.prototype = { return this; }, + /** + * Description. + * + * @method onStartCallback + * @param {object} callback - Description. + * @return {Phaser.Tween} Itself. + */ onStartCallback: function ( callback ) { this._onStartCallback = callback; @@ -230,6 +419,13 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method onUpdateCallback + * @param {object} callback - Description. + * @return {Phaser.Tween} Itself. + */ onUpdateCallback: function ( callback ) { this._onUpdateCallback = callback; @@ -237,6 +433,13 @@ Phaser.Tween.prototype = { }, + /** + * Description. + * + * @method onCompleteCallback + * @param {object} callback - Description. + * @return {Phaser.Tween} Itself. + */ onCompleteCallback: function ( callback ) { this._onCompleteCallback = callback; @@ -244,19 +447,32 @@ Phaser.Tween.prototype = { }, - pause: function () { - this._paused = true; - this._pausedTime = this.game.time.now; - }, + /** + * Pause. + * + * @method pause + */ + pause: function () { + this._paused = true; + }, - resume: function () { - - this._paused = false; - - this._startTime += (this.game.time.now - this._pausedTime); - - }, + /** + * Resume. + * + * @method resume + */ + resume: function () { + this._paused = false; + this._startTime += this.game.time.pauseDuration; + }, + /** + * Description. + * + * @method update + * @param {number} time - Description. + * @return {bool} Description. + */ update: function ( time ) { if (this.pendingDelete) diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index e4c0963f..23cc4b2c 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -1,18 +1,44 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.TweenManager +*/ + + /** * Phaser - TweenManager -* +* +* @class Phaser.TweenManager +* @classdesc * Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. * Tweens are hooked into the game clock and pause system, adjusting based on the game state. * -* TweenManager is based heavily on tween.js by sole (http://soledadpenades.com). +* TweenManager is based heavily on tween.js by {@link http://soledadpenades.com|sole}. * The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. * It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. -* Please see https://github.com/sole/tween.js for a full list of contributors. +* Please see {@link https://github.com/sole/tween.js} for a full list of contributors. +* @constructor +* +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.TweenManager = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + + /** + * @property {array} _tweens - Description. + * @private + */ this._tweens = []; + + /** + * @property {array} _add - Description. + * @private + */ this._add = []; this.game.onPause.add(this.pauseAll, this); @@ -22,11 +48,17 @@ Phaser.TweenManager = function (game) { Phaser.TweenManager.prototype = { + /** + * Description. + * @property {string} REVISION + * @default + */ REVISION: '11dev', /** * Get all the tween objects in an array. - * @return {Phaser.Tween[]} Array with all tween objects. + * @method getAll + * @returns {Phaser.Tween[]} Array with all tween objects. */ getAll: function () { @@ -36,19 +68,20 @@ Phaser.TweenManager.prototype = { /** * Remove all tween objects. + * @method removeAll */ removeAll: function () { - this._add.length = 0; - this._tweens.length = 0; + this._tweens = []; }, /** * Add a new tween into the TweenManager. * - * @param tween {Phaser.Tween} The tween object you want to add. - * @return {Phaser.Tween} The tween object you added to the manager. + * @method add + * @param {Phaser.Tween} tween - The tween object you want to add. + * @returns {Phaser.Tween} The tween object you added to the manager. */ add: function ( tween ) { @@ -57,11 +90,12 @@ Phaser.TweenManager.prototype = { }, /** - * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. - * - * @param obj {object} Object the tween will be run on. - * @return {Phaser.Tween} The newly created tween object. - */ + * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. + * + * @method create + * @param {Object} object - Object the tween will be run on. + * @returns {Phaser.Tween} The newly created tween object. + */ create: function (object) { return new Phaser.Tween(object, this.game); @@ -71,7 +105,8 @@ Phaser.TweenManager.prototype = { /** * Remove a tween from this manager. * - * @param tween {Phaser.Tween} The tween object you want to remove. + * @method remove + * @param {Phaser.Tween} tween - The tween object you want to remove. */ remove: function ( tween ) { @@ -88,7 +123,8 @@ Phaser.TweenManager.prototype = { /** * Update all the tween objects you added to this manager. * - * @return {bool} Return false if there's no tween to update, otherwise return true. + * @method update + * @returns {bool} Return false if there's no tween to update, otherwise return true. */ update: function () { @@ -126,8 +162,10 @@ Phaser.TweenManager.prototype = { /** * Pauses all currently running tweens. + * + * @method update */ - pauseAll: function () { + pauseAll: function () { for (var i = this._tweens.length - 1; i >= 0; i--) { this._tweens[i].pause(); @@ -137,8 +175,10 @@ Phaser.TweenManager.prototype = { /** * Pauses all currently paused tweens. + * + * @method resumeAll */ - resumeAll: function () { + resumeAll: function () { for (var i = this._tweens.length - 1; i >= 0; i--) { this._tweens[i].resume(); diff --git a/src/utils/Color.js b/src/utils/Color.js index 9c489aa9..a3852434 100644 --- a/src/utils/Color.js +++ b/src/utils/Color.js @@ -1,48 +1,53 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Colors +*/ + + /** * A collection of methods useful for manipulating and comparing colors. * -* @class Color -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser +* @class Phaser.Color */ + Phaser.Color = { - /** - * Given an alpha and 3 color values this will return an integer representation of it + /** + * Given an alpha and 3 color values this will return an integer representation of it. * * @method getColor32 - * @param {Number} alpha The Alpha value (between 0 and 255) - * @param {Number} red The Red channel value (between 0 and 255) - * @param {Number} green The Green channel value (between 0 and 255) - * @param {Number} blue The Blue channel value (between 0 and 255) - * @return {Number} A native color value integer (format: 0xAARRGGBB) + * @param {number} alpha - The Alpha value (between 0 and 255). + * @param {number} red - The Red channel value (between 0 and 255). + * @param {number} green - The Green channel value (between 0 and 255). + * @param {number} blue - The Blue channel value (between 0 and 255). + * @returns {number} A native color value integer (format: 0xAARRGGBB). */ getColor32: function (alpha, red, green, blue) { return alpha << 24 | red << 16 | green << 8 | blue; }, - /** + /** * Given 3 color values this will return an integer representation of it. * * @method getColor - * @param {Number} red The Red channel value (between 0 and 255) - * @param {Number} green The Green channel value (between 0 and 255) - * @param {Number} blue The Blue channel value (between 0 and 255) - * @return {Number} A native color value integer (format: 0xRRGGBB) + * @param {number} red - The Red channel value (between 0 and 255). + * @param {number} green - The Green channel value (between 0 and 255). + * @param {number} blue - The Blue channel value (between 0 and 255). + * @returns {number} A native color value integer (format: 0xRRGGBB). */ getColor: function (red, green, blue) { return red << 16 | green << 8 | blue; }, - /** + /** * Converts the given hex string into an object containing the RGB values. * * @method hexToRGB - * @param {String} The string hex color to convert. - * @return {Object} An object with 3 properties: r,g and b. + * @param {string}h - The string hex color to convert. + * @returns {object} An object with 3 properties: r,g and b. */ hexToRGB: function (h) { @@ -55,13 +60,13 @@ Phaser.Color = { }, - /** + /** * Returns a string containing handy information about the given color including string hex value, * RGB format information and HSL information. Each section starts on a newline, 3 lines in total. * * @method getColorInfo - * @param {Number} color A color value in the format 0xAARRGGBB - * @return {String} string containing the 3 lines of information + * @param {number} color - A color value in the format 0xAARRGGBB. + * @returns {string}String containing the 3 lines of information. */ getColorInfo: function (color) { var argb = Phaser.Color.getRGB(color); @@ -75,36 +80,36 @@ Phaser.Color = { return result; }, - /** - * Return a string representation of the color in the format 0xAARRGGBB + /** + * Return a string representation of the color in the format 0xAARRGGBB. * * @method RGBtoHexstring - * @param {Number} color The color to get the string representation for - * @return {String A string of length 10 characters in the format 0xAARRGGBB + * @param {number} color - The color to get the string representation for + * @returns {String A string of length 10 characters in the format 0xAARRGGBB */ RGBtoHexstring: function (color) { var argb = Phaser.Color.getRGB(color); return "0x" + Phaser.Color.colorToHexstring(argb.alpha) + Phaser.Color.colorToHexstring(argb.red) + Phaser.Color.colorToHexstring(argb.green) + Phaser.Color.colorToHexstring(argb.blue); }, - /** - * Return a string representation of the color in the format #RRGGBB + /** + * Return a string representation of the color in the format #RRGGBB. * * @method RGBtoWebstring - * @param {Number} color The color to get the string representation for - * @return {String} A string of length 10 characters in the format 0xAARRGGBB + * @param {number} color - The color to get the string representation for. + * @returns {string}A string of length 10 characters in the format 0xAARRGGBB. */ RGBtoWebstring: function (color) { var argb = Phaser.Color.getRGB(color); return "#" + Phaser.Color.colorToHexstring(argb.red) + Phaser.Color.colorToHexstring(argb.green) + Phaser.Color.colorToHexstring(argb.blue); }, - /** - * Return a string containing a hex representation of the given color + /** + * Return a string containing a hex representation of the given color. * * @method colorToHexstring - * @param {Number} color The color channel to get the hex value for, must be a value between 0 and 255) - * @return {String} A string of length 2 characters, i.e. 255 = FF, 0 = 00 + * @param {number} color - The color channel to get the hex value for, must be a value between 0 and 255). + * @returns {string}A string of length 2 characters, i.e. 255 = FF, 0 = 00. */ colorToHexstring: function (color) { var digits = "0123456789ABCDEF"; @@ -114,15 +119,15 @@ Phaser.Color = { return hexified; }, - /** + /** * Interpolates the two given colours based on the supplied step and currentStep properties. * @method interpolateColor - * @param {Number} color1 - * @param {Number} color2 - * @param {Number} steps - * @param {Number} currentStep - * @param {Number} alpha - * @return {Number} The interpolated color value. + * @param {number} color1 - Description. + * @param {number} color2 - Description. + * @param {number} steps - Description. + * @param {number} currentStep - Description. + * @param {number} alpha - Description. + * @returns {number} The interpolated color value. */ interpolateColor: function (color1, color2, steps, currentStep, alpha) { if (typeof alpha === "undefined") { alpha = 255; } @@ -134,16 +139,16 @@ Phaser.Color = { return Phaser.Color.getColor32(alpha, r, g, b); }, - /** + /** * Interpolates the two given colours based on the supplied step and currentStep properties. * @method interpolateColorWithRGB - * @param {Number} color - * @param {Number} r - * @param {Number} g - * @param {Number} b - * @param {Number} steps - * @param {Number} currentStep - * @return {Number} The interpolated color value. + * @param {number} color - Description. + * @param {number} r - Description. + * @param {number} g - Description. + * @param {number} b - Description. + * @param {number} steps - Description. + * @param {number} currentStep - Description. + * @returns {number} The interpolated color value. */ interpolateColorWithRGB: function (color, r, g, b, steps, currentStep) { var src = Phaser.Color.getRGB(color); @@ -153,18 +158,18 @@ Phaser.Color = { return Phaser.Color.getColor(or, og, ob); }, - /** + /** * Interpolates the two given colours based on the supplied step and currentStep properties. * @method interpolateRGB - * @param {Number} r1 - * @param {Number} g1 - * @param {Number} b1 - * @param {Number} r2 - * @param {Number} g2 - * @param {Number} b2 - * @param {Number} steps - * @param {Number} currentStep - * @return {Number} The interpolated color value. + * @param {number} r1 - Description. + * @param {number} g1 - Description. + * @param {number} b1 - Description. + * @param {number} r2 - Description. + * @param {number} g2 - Description. + * @param {number} b2 - Description. + * @param {number} steps - Description. + * @param {number} currentStep - Description. + * @returns {number} The interpolated color value. */ interpolateRGB: function (r1, g1, b1, r2, g2, b2, steps, currentStep) { var r = (((r2 - r1) * currentStep) / steps) + r1; @@ -173,16 +178,16 @@ Phaser.Color = { return Phaser.Color.getColor(r, g, b); }, - /** + /** * Returns a random color value between black and white *

    Set the min value to start each channel from the given offset.

    *

    Set the max value to restrict the maximum color used per channel

    * * @method getRandomColor - * @param {Number} min The lowest value to use for the color - * @param {Number} max The highest value to use for the color - * @param {Number} alpha The alpha value of the returning color (default 255 = fully opaque) - * @return {Number} 32-bit color value with alpha + * @param {number} min - The lowest value to use for the color. + * @param {number} max - The highest value to use for the color. + * @param {number} alpha - The alpha value of the returning color (default 255 = fully opaque). + * @returns {number} 32-bit color value with alpha. */ getRandomColor: function (min, max, alpha) { if (typeof min === "undefined") { min = 0; } @@ -201,14 +206,14 @@ Phaser.Color = { return Phaser.Color.getColor32(alpha, red, green, blue); }, - /** + /** * Return the component parts of a color as an Object with the properties alpha, red, green, blue * *

    Alpha will only be set if it exist in the given color (0xAARRGGBB)

    * * @method getRGB - * @param {Number} color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB) - * @return {Object} An Object with properties: alpha, red, green, blue + * @param {number} color - Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB). + * @returns {object} An Object with properties: alpha, red, green, blue. */ getRGB: function (color) { return { @@ -219,11 +224,11 @@ Phaser.Color = { }; }, - /** + /** * Returns a CSS friendly string value from the given color. * @method getWebRGB - * @param {Number} color - * @return {String} A string in the format: 'rgba(r,g,b,a)' + * @param {number} color + * @returns {string}A string in the format: 'rgba(r,g,b,a)' */ getWebRGB: function (color) { var alpha = (color >>> 24) / 255; @@ -233,56 +238,56 @@ Phaser.Color = { return 'rgba(' + red.toString() + ',' + green.toString() + ',' + blue.toString() + ',' + alpha.toString() + ')'; }, - /** - * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255 + /** + * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255. * * @method getAlpha - * @param {Number} color In the format 0xAARRGGBB - * @return {Number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)) + * @param {number} color - In the format 0xAARRGGBB. + * @returns {number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). */ getAlpha: function (color) { return color >>> 24; }, - /** - * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1 + /** + * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1. * * @method getAlphaFloat - * @param {Number} color In the format 0xAARRGGBB - * @return {Number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)) + * @param {number} color - In the format 0xAARRGGBB. + * @returns {number} The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). */ getAlphaFloat: function (color) { return (color >>> 24) / 255; }, - /** - * Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255 + /** + * Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255. * * @method getRed - * @param {Number} color In the format 0xAARRGGBB - * @return {Number} The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red) + * @param {number} color In the format 0xAARRGGBB. + * @returns {number} The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red). */ getRed: function (color) { return color >> 16 & 0xFF; }, - /** - * Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255 + /** + * Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255. * * @method getGreen - * @param {Number} color In the format 0xAARRGGBB - * @return {Number} The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green) + * @param {number} color - In the format 0xAARRGGBB. + * @returns {number} The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green). */ getGreen: function (color) { return color >> 8 & 0xFF; }, - /** - * Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255 + /** + * Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255. * * @method getBlue - * @param {Number} color In the format 0xAARRGGBB - * @return {Number} The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue) + * @param {number} color - In the format 0xAARRGGBB. + * @returns {number} The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue). */ getBlue: function (color) { return color & 0xFF; diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 6516684e..8e5baea4 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -1,38 +1,73 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +* @module Phaser.Debug */ /** * A collection of methods for displaying debug information about game objects. * -* @class DebugUtils +* @class Phaser.Utils.Debug +* @constructor +* @param {Phaser.Game} game - A reference to the currently running game. */ Phaser.Utils.Debug = function (game) { + /** + * @property {Phaser.Game} game - A reference to the currently running Game. + */ this.game = game; + + /** + * @property {Context} context - Description. + */ this.context = game.context; + /** + * @property {string} font - Description. + * @default '14px Courier' + */ this.font = '14px Courier'; + + /** + * @property {number} lineHeight - Description. + */ this.lineHeight = 16; + + /** + * @property {bool} renderShadow - Description. + */ this.renderShadow = true; + + /** + * @property {Context} currentX - Description. + * @default + */ this.currentX = 0; + + /** + * @property {number} currentY - Description. + * @default + */ this.currentY = 0; + + /** + * @property {number} currentAlpha - Description. + * @default + */ this.currentAlpha = 1; }; Phaser.Utils.Debug.prototype = { - /** * Internal method that resets the debug output values. * @method start - * @param {Number} x The X value the debug info will start from. - * @param {Number} y The Y value the debug info will start from. - * @param {String} color The color the debug info will drawn in. + * @param {number} x - The X value the debug info will start from. + * @param {number} y - The Y value the debug info will start from. + * @param {string} color - The color the debug info will drawn in. */ start: function (x, y, color) { @@ -72,9 +107,9 @@ Phaser.Utils.Debug.prototype = { /** * Internal method that outputs a single line of text. * @method line - * @param {String} text The line of text to draw. - * @param {Number} x The X value the debug info will start from. - * @param {Number} y The Y value the debug info will start from. + * @param {string} text - The line of text to draw. + * @param {number} x - The X value the debug info will start from. + * @param {number} y - The Y value the debug info will start from. */ line: function (text, x, y) { @@ -106,6 +141,12 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderQuadTree + * @param {Description} quadtree - Description. + * @param {string} color - Description. + */ renderQuadTree: function (quadtree, color) { color = color || 'rgba(255,0,0,0.3)'; @@ -140,6 +181,14 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderSpriteCorners + * @param {Phaser.Sprite} sprite - The sprite to be rendered. + * @param {bool} showText - Description. + * @param {bool} showBounds - Description. + * @param {string} color - Description. + */ renderSpriteCorners: function (sprite, showText, showBounds, color) { if (this.context == null) @@ -189,10 +238,12 @@ Phaser.Utils.Debug.prototype = { }, /** - * Render debug infos. (including id, position, rotation, scrolling factor, worldBounds and some other properties) - * @param x {number} X position of the debug info to be rendered. - * @param y {number} Y position of the debug info to be rendered. - * @param [color] {number} color of the debug info to be rendered. (format is css color string) + * Render debug infos (including id, position, rotation, scrolling factor, worldBounds and some other properties). + * @method renderSoundInfo + * @param {Description} sound - Description. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - color of the debug info to be rendered. (format is css color string). */ renderSoundInfo: function (sound, x, y, color) { @@ -225,9 +276,11 @@ Phaser.Utils.Debug.prototype = { /** * Render debug infos. (including id, position, rotation, scrolling factor, worldBounds and some other properties) - * @param x {number} X position of the debug info to be rendered. - * @param y {number} Y position of the debug info to be rendered. - * @param [color] {number} color of the debug info to be rendered. (format is css color string) + * @method renderCameraInfo + * @param {Description} camera - Description. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - color of the debug info to be rendered (format is css color string) */ renderCameraInfo: function (camera, x, y, color) { @@ -248,6 +301,11 @@ Phaser.Utils.Debug.prototype = { /** * Renders the Pointer.circle object onto the stage in green if down or red if up. * @method renderDebug + * @param {Description} pointer - Description. + * @param {bool} hideIfUp - Description. + * @param {string} downColor - Description. + * @param {string} upColor - Description. + * @param {string} color - Description. */ renderPointer: function (pointer, hideIfUp, downColor, upColor, color) { @@ -301,10 +359,12 @@ Phaser.Utils.Debug.prototype = { }, /** - * Render Sprite Input Debug information - * @param x {number} X position of the debug info to be rendered. - * @param y {number} Y position of the debug info to be rendered. - * @param [color] {number} color of the debug info to be rendered. (format is css color string) + * Render Sprite Input Debug information. + * @method renderSpriteInputInfo + * @param {Phaser.Sprite} sprite - The sprite to be rendered. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - color of the debug info to be rendered (format is css color string). */ renderSpriteInputInfo: function (sprite, x, y, color) { @@ -320,6 +380,14 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Render Sprite collision. + * @method renderSpriteCollision + * @param {Phaser.Sprite} sprite - The sprite to be rendered. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - color of the debug info to be rendered (format is css color string). + */ renderSpriteCollision: function (sprite, x, y, color) { color = color || 'rgb(255,255,255)'; @@ -338,9 +406,10 @@ Phaser.Utils.Debug.prototype = { /** * Render debug information about the Input object. - * @param x {number} X position of the debug info to be rendered. - * @param y {number} Y position of the debug info to be rendered. - * @param [color] {number} color of the debug info to be rendered. (format is css color string) + * @method renderInputInfo + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - color of the debug info to be rendered. (format is css color string) */ renderInputInfo: function (x, y, color) { @@ -362,10 +431,12 @@ Phaser.Utils.Debug.prototype = { }, /** - * Render debug infos. (including name, bounds info, position and some other properties) - * @param x {number} X position of the debug info to be rendered. - * @param y {number} Y position of the debug info to be rendered. - * @param [color] {number} color of the debug info to be rendered. (format is css color string) + * Render debug infos (including name, bounds info, position and some other properties). + * @method renderSpriteInfo + * @param {Phaser.Sprite} sprite - Description. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - Color of the debug info to be rendered (format is css color string). */ renderSpriteInfo: function (sprite, x, y, color) { @@ -391,6 +462,7 @@ Phaser.Utils.Debug.prototype = { // 4 = scaleY // 5 = translateY + // this.line('id: ' + sprite._id); // this.line('scale x: ' + sprite.worldTransform[0]); // this.line('scale y: ' + sprite.worldTransform[4]); @@ -407,6 +479,14 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Render debug infos (including name, bounds info, position and some other properties). + * @method renderWorldTransformInfo + * @param {Phaser.Sprite} sprite - Description. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - Color of the debug info to be rendered (format is css color string). + */ renderWorldTransformInfo: function (sprite, x, y, color) { if (this.context == null) @@ -428,6 +508,14 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderLocalTransformInfo + * @param {Phaser.Sprite} sprite - Description. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - Color of the debug info to be rendered (format is css color string). + */ renderLocalTransformInfo: function (sprite, x, y, color) { if (this.context == null) @@ -451,6 +539,14 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderPointInfo + * @param {Phaser.Sprite} sprite - Description. + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - Color of the debug info to be rendered (format is css color string). + */ renderPointInfo: function (point, x, y, color) { if (this.context == null) @@ -466,7 +562,13 @@ Phaser.Utils.Debug.prototype = { }, - renderSpriteBody: function (sprite, color) { + /** + * Description. + * @method renderSpriteBounds + * @param {Phaser.Sprite} sprite - Description. + * @param {string} [color] - Color of the debug info to be rendered (format is css color string). + */ + renderSpriteBounds: function (sprite, color) { if (this.context == null) { @@ -512,6 +614,13 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderPixel + * @param {number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} fillStyle - Description. + */ renderPixel: function (x, y, fillStyle) { if (this.context == null) @@ -528,6 +637,12 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderPoint + * @param {Description} point - Description. + * @param {string} fillStyle - Description. + */ renderPoint: function (point, fillStyle) { if (this.context == null) @@ -544,6 +659,12 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderRectangle + * @param {Description} rect - Description. + * @param {string} fillStyle - Description. + */ renderRectangle: function (rect, fillStyle) { if (this.context == null) @@ -560,6 +681,12 @@ Phaser.Utils.Debug.prototype = { }, + /** + * Description. + * @method renderCircle + * @param {Description} circle - Description. + * @param {string} fillStyle - Description. + */ renderCircle: function (circle, fillStyle) { if (this.context == null) @@ -580,10 +707,13 @@ Phaser.Utils.Debug.prototype = { }, /** - * Render text - * @param x {number} X position of the debug info to be rendered. - * @param y {number} Y position of the debug info to be rendered. - * @param [color] {number} color of the debug info to be rendered. (format is css color string) + * Render text. + * @method renderText + * @param {string} text - The line of text to draw. + * @param{number} x - X position of the debug info to be rendered. + * @param {number} y - Y position of the debug info to be rendered. + * @param {string} [color] - Color of the debug info to be rendered (format is css color string). + * @param {string} font - The font of text to draw. */ renderText: function (text, x, y, color, font) { diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 8be83b21..8fc83814 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -1,7 +1,7 @@ /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @module Phaser.Utils */ @@ -13,15 +13,15 @@ Phaser.Utils = { /** - * Javascript string pad - * http://www.webtoolkit.info/ - * pad = the string to pad it out with (defaults to a space) + * Javascript string pad ({@link http://www.webtoolkit.info/}) + * pad = the string to pad it out with (defaults to a space)
    * dir = 1 (left), 2 (right), 3 (both) * @method pad - * @param {string} str the target string - * @param {number} pad the string to pad it out with (defaults to a space) - * @param {number} len - * @param {number} [dir=3] the direction dir = 1 (left), 2 (right), 3 (both) + * @param {string} str - The target string. + * @param {number} len - Description. + * @param {number} pad - the string to pad it out with (defaults to a space). + * @param {number} [dir=3] the direction dir = 1 (left), 2 (right), 3 (both). + * @return {string} **/ pad: function (str, len, pad, dir) { @@ -53,10 +53,11 @@ Phaser.Utils = { }, - /** - * This is a slightly modified version of jQuery.isPlainObject + /** + * This is a slightly modified version of jQuery.isPlainObject. * @method isPlainObject - * @param {object} obj + * @param {object} obj - Description. + * @return {bool} - Description. */ isPlainObject: function (obj) { @@ -87,12 +88,17 @@ Phaser.Utils = { return true; }, - /** - * This is a slightly modified version of jQuery.extend (http://api.jquery.com/jQuery.extend/) + + // deep, target, objects to copy to the target object + // This is a slightly modified version of {@link http://api.jquery.com/jQuery.extend/|jQuery.extend} + // deep (boolean) + // target (object to add to) + // objects ... (objects to recurse and copy from) + + /** + * This is a slightly modified version of {@link http://api.jquery.com/jQuery.extend/|jQuery.extend} * @method extend - * @param {bool} [deep] If true, the merge becomes recursive (aka. deep copy). - * @param {object} target The object to add to - * @param {object} objets Objects to recurse and copy from + * @return {Description} Description. */ extend: function () { @@ -173,7 +179,7 @@ Phaser.Utils = { * Converts a hex color number to an [R, G, B] array * * @method HEXtoRGB - * @param {Number} hex + * @param {number} hex * @return {array} */ function HEXtoRGB(hex) { From 0a98bb67d8c32263e095e30ddeac79a507e2caf1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 15:05:30 +0100 Subject: [PATCH 031/125] jsdoc blocks added to every file and tidied up. --- examples/games/breakout.php | 8 ++++---- src/core/Stage.js | 2 +- src/sound/Sound.js | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/games/breakout.php b/examples/games/breakout.php index be67307e..def89f91 100644 --- a/examples/games/breakout.php +++ b/examples/games/breakout.php @@ -129,7 +129,7 @@ } else { - livesText.text = 'lives: ' + lives; + livesText.content = 'lives: ' + lives; ballOnPaddle = true; ball.body.velocity.setTo(0, 0); ball.x = paddle.x + 16; @@ -143,7 +143,7 @@ ball.body.velocity.setTo(0, 0); - introText.text = "Game Over!"; + introText.content = "Game Over!"; introText.visible = true; } @@ -155,14 +155,14 @@ score += 10; - scoreText.text = 'score: ' + score; + scoreText.content = 'score: ' + score; // Are they any bricks left? if (bricks.countLiving() == 0) { // New level starts score += 1000; - scoreText.text = 'score: ' + score; + scoreText.content = 'score: ' + score; introText = '- Next Level -'; // Let's move the ball back to the paddle diff --git a/src/core/Stage.js b/src/core/Stage.js index 269243b2..a20df7a8 100644 --- a/src/core/Stage.js +++ b/src/core/Stage.js @@ -129,7 +129,7 @@ Phaser.Stage.prototype = { *//** * Set * @param {string} The background color you want the stage to have -*/. +*/ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", { get: function () { diff --git a/src/sound/Sound.js b/src/sound/Sound.js index a109093e..11c0998f 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -282,7 +282,6 @@ Phaser.Sound.prototype = { * @param {Description} stop - Description. * @param {Description} volume - Description. * @param {Description} loop - Description. - */ addMarker: function (name, start, stop, volume, loop) { volume = volume || 1; From f593afd1643a30f20ded7700516333fe51a3b658 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Tue, 1 Oct 2013 10:08:09 -0400 Subject: [PATCH 032/125] Fixed accidentally overwroting remove function with a prepend function --- src/core/LinkedList.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/core/LinkedList.js b/src/core/LinkedList.js index 23eb1d1c..7b302cae 100644 --- a/src/core/LinkedList.js +++ b/src/core/LinkedList.js @@ -38,17 +38,14 @@ Phaser.LinkedList.prototype = { }, remove: function (child) { - if( this.first ) { - child.next = this.last.next; - child.prev = this.last; - if( this.last.next ) { - this.last.next.prev = child; - } - this.last.next = child; - this.last = this.last.next; - } else { - this.first = this.last = child; - } + if( child == this.first ) this.first = this.first.next; // It was 'first', make 'first' point to first.next + else if ( child == this.last ) this.last = this.last.prev; // It was 'last', make 'last' point to last.prev + + if( child.prev ) child.prev.next = child.next; // make child.prev.next point to childs.next instead of child + if( child.next ) child.next.prev = child.prev; // make child.next.prev point to child.prev instead of child + child.next = child.prev = null; + + if( this.first == null ) this.last = null; this.total--; }, From 9b4b267e7ad845f3b6c4047b1ac3000b60b14d39 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 16:15:45 +0100 Subject: [PATCH 033/125] Working through building the docs. --- Docs/conf.json | 23 + .../out/Animation-Phaser.Animation.Frame.html | 2284 +++++++++ .../Animation-Phaser.Animation.FrameData.html | 154 + Docs/out/Animation-Phaser.Animation.html | 1162 +++++ Docs/out/Animation.html | 135 + ...mationManager-Phaser.AnimationManager.html | 614 +++ Docs/out/AnimationManager.html | 135 + Docs/out/Frame-Phaser.Animation.Frame.html | 2282 +++++++++ Docs/out/Frame.html | 133 + .../FrameData-Phaser.Animation.FrameData.html | 152 + Docs/out/FrameData.html | 133 + Docs/out/Parser.html | 133 + Docs/out/Phaser.Animation.Frame.html | 2282 +++++++++ Docs/out/Phaser.Animation.FrameData.html | 152 + Docs/out/Phaser.Animation.Parser.html | 150 + Docs/out/Phaser.Animation.html | 1175 +++++ Docs/out/Phaser.AnimationManager.html | 616 +++ Docs/out/Phaser.html | 133 + Docs/out/global.html | 4516 +++++++++++++++++ Docs/out/index.html | 63 + Docs/out/module-Phaser.html | 120 + Docs/out/scripts/linenumber.js | 17 + .../scripts/prettify/Apache-License-2.0.txt | 202 + Docs/out/scripts/prettify/lang-css.js | 2 + Docs/out/scripts/prettify/prettify.js | 28 + Docs/out/styles/jsdoc-default.css | 283 ++ Docs/out/styles/prettify-jsdoc.css | 111 + Docs/out/styles/prettify-tomorrow.css | 132 + README.md | 2 +- src/Phaser.js | 2 +- src/animation/Animation.js | 15 +- src/animation/AnimationManager.js | 4 +- src/animation/Frame.js | 2 +- src/animation/FrameData.js | 2 +- src/animation/Parser.js | 2 +- src/gameobjects/Sprite.js | 2 +- src/input/Keyboard.js | 31 + 37 files changed, 17374 insertions(+), 10 deletions(-) create mode 100644 Docs/conf.json create mode 100644 Docs/out/Animation-Phaser.Animation.Frame.html create mode 100644 Docs/out/Animation-Phaser.Animation.FrameData.html create mode 100644 Docs/out/Animation-Phaser.Animation.html create mode 100644 Docs/out/Animation.html create mode 100644 Docs/out/AnimationManager-Phaser.AnimationManager.html create mode 100644 Docs/out/AnimationManager.html create mode 100644 Docs/out/Frame-Phaser.Animation.Frame.html create mode 100644 Docs/out/Frame.html create mode 100644 Docs/out/FrameData-Phaser.Animation.FrameData.html create mode 100644 Docs/out/FrameData.html create mode 100644 Docs/out/Parser.html create mode 100644 Docs/out/Phaser.Animation.Frame.html create mode 100644 Docs/out/Phaser.Animation.FrameData.html create mode 100644 Docs/out/Phaser.Animation.Parser.html create mode 100644 Docs/out/Phaser.Animation.html create mode 100644 Docs/out/Phaser.AnimationManager.html create mode 100644 Docs/out/Phaser.html create mode 100644 Docs/out/global.html create mode 100644 Docs/out/index.html create mode 100644 Docs/out/module-Phaser.html create mode 100644 Docs/out/scripts/linenumber.js create mode 100644 Docs/out/scripts/prettify/Apache-License-2.0.txt create mode 100644 Docs/out/scripts/prettify/lang-css.js create mode 100644 Docs/out/scripts/prettify/prettify.js create mode 100644 Docs/out/styles/jsdoc-default.css create mode 100644 Docs/out/styles/prettify-jsdoc.css create mode 100644 Docs/out/styles/prettify-tomorrow.css diff --git a/Docs/conf.json b/Docs/conf.json new file mode 100644 index 00000000..03c4a53d --- /dev/null +++ b/Docs/conf.json @@ -0,0 +1,23 @@ +{ + "tags": { + "allowUnknownTags": true + }, + "source": { + "include": [ "../src/Phaser.js", "../src/animation/Animation.js" ], + "exclude": [], + "includePattern": ".+\\.js(doc)?$", + "excludePattern": "(^|\\/|\\\\)_" + }, + "plugins": [], + "templates": { + "cleverLinks": false, + "monospaceLinks": false + }, + "opts": { + "encoding": "utf8", + "destination": "./out/", + "recurse": true, + "private": false, + "lenient": true, + } +} \ No newline at end of file diff --git a/Docs/out/Animation-Phaser.Animation.Frame.html b/Docs/out/Animation-Phaser.Animation.Frame.html new file mode 100644 index 00000000..66bc0315 --- /dev/null +++ b/Docs/out/Animation-Phaser.Animation.Frame.html @@ -0,0 +1,2284 @@ + + + + + JSDoc: Class: Frame + + + + + + + + + + +
    + +

    Class: Frame

    + + + + + +
    + +
    +

    + .Animation. + + Frame +

    + +
    Phaser.Animation.Frame
    + +
    + +
    +
    + + + + +
    +

    new Frame(index, x, y, width, height, name, uuid)

    + + +
    +
    + + +
    + A Frame is a single frame of an animation and is part of a FrameData collection. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of this Frame within the FrameData set it is being added to.
    x + + +number + + + + X position of the frame within the texture image.
    y + + +number + + + + Y position of the frame within the texture image.
    width + + +number + + + + Width of the frame within the texture image.
    height + + +number + + + + Height of the frame within the texture image.
    name + + +string + + + + The name of the frame. In Texture Atlas data this is usually set to the filename.
    uuid + + +string + + + + Internal UUID key.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 21 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    centerX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    centerX + + +number + + + + Center X position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 61 +
    + + + + + + + +
    + + + +
    + + + +
    +

    centerY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    centerY + + +number + + + + Center Y position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 66 +
    + + + + + + + +
    + + + +
    + + + +
    +

    distance

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    distance + + +number + + + + The distance from the top left to the bottom-right of this Frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 71 +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    height + + +number + + + + Height of the frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 46 +
    + + + + + + + +
    + + + +
    + + + +
    +

    index

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of this Frame within the FrameData set it is being added to.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 26 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + Useful for Texture Atlas files (is set to the filename value).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 51 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotated

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotated + + +bool + + + + Rotated? (not yet implemented)
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Frame.js, line 77 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotationDirection

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotationDirection + + +string + + + + Either 'cw' or 'ccw', rotation is always 90 degrees.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 'cw'
    + + + +
    Source:
    +
    • + animation/Frame.js, line 83 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sourceSizeH

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceSizeH + + +number + + + + Height of the original sprite.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 99 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sourceSizeW

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceSizeW + + +number + + + + Width of the original sprite.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 94 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeH

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeH + + +number + + + + Height of the trimmed sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 123 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeW

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeW + + +number + + + + Width of the trimmed sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 117 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeX + + +number + + + + X position of the trimmed sprite inside original sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 105 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeY + + +number + + + + Y position of the trimmed sprite inside original sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 111 +
    + + + + + + + +
    + + + +
    + + + +
    +

    trimmed

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    trimmed + + +bool + + + + Was it trimmed when packed?
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Frame.js, line 89 +
    + + + + + + + +
    + + + +
    + + + +
    +

    uuid

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    uuid + + +string + + + + A link to the PIXI.TextureCache entry.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 56 +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + + Width of the frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 41 +
    + + + + + + + +
    + + + +
    + + + +
    +

    x

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + + X position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 31 +
    + + + + + + + +
    + + + +
    + + + +
    +

    y

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    y + + +number + + + + Y position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 36 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:00:44 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Animation-Phaser.Animation.FrameData.html b/Docs/out/Animation-Phaser.Animation.FrameData.html new file mode 100644 index 00000000..00525b48 --- /dev/null +++ b/Docs/out/Animation-Phaser.Animation.FrameData.html @@ -0,0 +1,154 @@ + + + + + JSDoc: Class: FrameData + + + + + + + + + + +
    + +

    Class: FrameData

    + + + + + +
    + +
    +

    + .Animation. + + FrameData +

    + +
    Phaser.Animation.FrameData
    + +
    + +
    +
    + + + + +
    +

    new FrameData()

    + + +
    +
    + + +
    + FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 14 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:00:44 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Animation-Phaser.Animation.html b/Docs/out/Animation-Phaser.Animation.html new file mode 100644 index 00000000..18ced43a --- /dev/null +++ b/Docs/out/Animation-Phaser.Animation.html @@ -0,0 +1,1162 @@ + + + + + JSDoc: Class: Animation + + + + + + + + + + +
    + +

    Class: Animation

    + + + + + +
    + +
    +

    + Animation +

    + +
    Phaser.Animation
    + +
    + +
    +
    + + + + +
    +

    new Animation(game, parent, name, frameData, frames, delay, looped)

    + + +
    +
    + + +
    + An Animation instance contains a single animation and the controls to play it. It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    parent + + +Phaser.Sprite + + + + A reference to the owner of this Animation.
    name + + +string + + + + The unique name for this animation, used in playback commands.
    frameData + + +Phaser.Animation.FrameData + + + + The FrameData object that contains all frames used by this Animation.
    frames + + +Array.<number> +| + +Array.<string> + + + + An array of numbers or strings indicating which frames to play in which order.
    delay + + +number + + + + The time between each frame of the animation, given in ms.
    looped + + +boolean + + + + Should this animation loop or play through once.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 22 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    currentFrame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    currentFrame + + +Phaser.Animation.Frame + + + + The currently displayed frame of the Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 112 +
    + + + + + + + +
    + + + +
    + + + +
    +

    delay

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    delay + + +number + + + + The delay in ms between each frame of the Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 56 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 27 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isFinished

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isFinished + + +boolean + + + + The finished state of the Animation. Set to true once playback completes, false during playback.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Animation.js, line 67 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isPaused

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isPaused + + +boolean + + + + The paused state of the Animation.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Animation.js, line 79 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isPlaying

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isPlaying + + +boolean + + + + The playing state of the Animation. Set to false once playback completes, true during playback.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Animation.js, line 73 +
    + + + + + + + +
    + + + +
    + + + +
    +

    looped

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    looped + + +boolean + + + + The loop state of the Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 61 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + The user defined name given to this Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 44 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Animation.html b/Docs/out/Animation.html new file mode 100644 index 00000000..430b23d0 --- /dev/null +++ b/Docs/out/Animation.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Animation + + + + + + + + + + +
    + +

    Module: Animation

    + + + + + +
    + +
    +

    + Phaser. + + Animation +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + animation/Animation.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/AnimationManager-Phaser.AnimationManager.html b/Docs/out/AnimationManager-Phaser.AnimationManager.html new file mode 100644 index 00000000..cf00c76a --- /dev/null +++ b/Docs/out/AnimationManager-Phaser.AnimationManager.html @@ -0,0 +1,614 @@ + + + + + JSDoc: Class: AnimationManager + + + + + + + + + + +
    + +

    Class: AnimationManager

    + + + + + +
    + +
    +

    + AnimationManager +

    + +
    Phaser.AnimationManager
    + +
    + +
    +
    + + + + +
    +

    new AnimationManager(sprite)

    + + +
    +
    + + +
    + The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + + A reference to the Game Object that owns this AnimationManager.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 16 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    currentFrame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    currentFrame + + +Phaser.Animation.Frame + + + + The currently displayed Frame of animation, if any.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 32 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 26 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sprite

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + + A reference to the parent Sprite that owns this AnimationManager.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 21 +
    + + + + + + + +
    + + + +
    + + + +
    +

    updateIfVisible

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    updateIfVisible + + +boolean + + + + Should the animation data continue to update even if the Sprite.visible is set to false.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 38 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:00:44 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/AnimationManager.html b/Docs/out/AnimationManager.html new file mode 100644 index 00000000..9a7f441f --- /dev/null +++ b/Docs/out/AnimationManager.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: AnimationManager + + + + + + + + + + +
    + +

    Module: AnimationManager

    + + + + + +
    + +
    +

    + Phaser. + + AnimationManager +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:00:44 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Frame-Phaser.Animation.Frame.html b/Docs/out/Frame-Phaser.Animation.Frame.html new file mode 100644 index 00000000..5d34389b --- /dev/null +++ b/Docs/out/Frame-Phaser.Animation.Frame.html @@ -0,0 +1,2282 @@ + + + + + JSDoc: Class: Frame + + + + + + + + + + +
    + +

    Class: Frame

    + + + + + +
    + +
    +

    + Frame +

    + +
    Phaser.Animation.Frame
    + +
    + +
    +
    + + + + +
    +

    new Frame(index, x, y, width, height, name, uuid)

    + + +
    +
    + + +
    + A Frame is a single frame of an animation and is part of a FrameData collection. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of this Frame within the FrameData set it is being added to.
    x + + +number + + + + X position of the frame within the texture image.
    y + + +number + + + + Y position of the frame within the texture image.
    width + + +number + + + + Width of the frame within the texture image.
    height + + +number + + + + Height of the frame within the texture image.
    name + + +string + + + + The name of the frame. In Texture Atlas data this is usually set to the filename.
    uuid + + +string + + + + Internal UUID key.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 21 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    centerX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    centerX + + +number + + + + Center X position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 61 +
    + + + + + + + +
    + + + +
    + + + +
    +

    centerY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    centerY + + +number + + + + Center Y position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 66 +
    + + + + + + + +
    + + + +
    + + + +
    +

    distance

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    distance + + +number + + + + The distance from the top left to the bottom-right of this Frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 71 +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    height + + +number + + + + Height of the frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 46 +
    + + + + + + + +
    + + + +
    + + + +
    +

    index

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of this Frame within the FrameData set it is being added to.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 26 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + Useful for Texture Atlas files (is set to the filename value).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 51 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotated

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotated + + +bool + + + + Rotated? (not yet implemented)
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Frame.js, line 77 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotationDirection

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotationDirection + + +string + + + + Either 'cw' or 'ccw', rotation is always 90 degrees.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 'cw'
    + + + +
    Source:
    +
    • + animation/Frame.js, line 83 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sourceSizeH

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceSizeH + + +number + + + + Height of the original sprite.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 99 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sourceSizeW

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceSizeW + + +number + + + + Width of the original sprite.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 94 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeH

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeH + + +number + + + + Height of the trimmed sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 123 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeW

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeW + + +number + + + + Width of the trimmed sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 117 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeX + + +number + + + + X position of the trimmed sprite inside original sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 105 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeY + + +number + + + + Y position of the trimmed sprite inside original sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 111 +
    + + + + + + + +
    + + + +
    + + + +
    +

    trimmed

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    trimmed + + +bool + + + + Was it trimmed when packed?
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Frame.js, line 89 +
    + + + + + + + +
    + + + +
    + + + +
    +

    uuid

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    uuid + + +string + + + + A link to the PIXI.TextureCache entry.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 56 +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + + Width of the frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 41 +
    + + + + + + + +
    + + + +
    + + + +
    +

    x

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + + X position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 31 +
    + + + + + + + +
    + + + +
    + + + +
    +

    y

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    y + + +number + + + + Y position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 36 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 15:59:15 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Frame.html b/Docs/out/Frame.html new file mode 100644 index 00000000..3d194dbd --- /dev/null +++ b/Docs/out/Frame.html @@ -0,0 +1,133 @@ + + + + + JSDoc: Module: Frame + + + + + + + + + + +
    + +

    Module: Frame

    + + + + + +
    + +
    +

    + Frame +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + animation/Frame.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 15:59:15 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/FrameData-Phaser.Animation.FrameData.html b/Docs/out/FrameData-Phaser.Animation.FrameData.html new file mode 100644 index 00000000..7947187f --- /dev/null +++ b/Docs/out/FrameData-Phaser.Animation.FrameData.html @@ -0,0 +1,152 @@ + + + + + JSDoc: Class: FrameData + + + + + + + + + + +
    + +

    Class: FrameData

    + + + + + +
    + +
    +

    + FrameData +

    + +
    Phaser.Animation.FrameData
    + +
    + +
    +
    + + + + +
    +

    new FrameData()

    + + +
    +
    + + +
    + FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 14 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 15:59:15 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/FrameData.html b/Docs/out/FrameData.html new file mode 100644 index 00000000..51e79ef2 --- /dev/null +++ b/Docs/out/FrameData.html @@ -0,0 +1,133 @@ + + + + + JSDoc: Module: FrameData + + + + + + + + + + +
    + +

    Module: FrameData

    + + + + + +
    + +
    +

    + FrameData +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 15:59:15 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Parser.html b/Docs/out/Parser.html new file mode 100644 index 00000000..efc64fc7 --- /dev/null +++ b/Docs/out/Parser.html @@ -0,0 +1,133 @@ + + + + + JSDoc: Module: Parser + + + + + + + + + + +
    + +

    Module: Parser

    + + + + + +
    + +
    +

    + Parser +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + animation/Parser.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 15:59:16 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Frame.html b/Docs/out/Phaser.Animation.Frame.html new file mode 100644 index 00000000..f5208d26 --- /dev/null +++ b/Docs/out/Phaser.Animation.Frame.html @@ -0,0 +1,2282 @@ + + + + + JSDoc: Class: Frame + + + + + + + + + + +
    + +

    Class: Frame

    + + + + + +
    + +
    +

    + Frame +

    + +
    Phaser.Animation.Frame
    + +
    + +
    +
    + + + + +
    +

    new Frame(index, x, y, width, height, name, uuid)

    + + +
    +
    + + +
    + A Frame is a single frame of an animation and is part of a FrameData collection. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of this Frame within the FrameData set it is being added to.
    x + + +number + + + + X position of the frame within the texture image.
    y + + +number + + + + Y position of the frame within the texture image.
    width + + +number + + + + Width of the frame within the texture image.
    height + + +number + + + + Height of the frame within the texture image.
    name + + +string + + + + The name of the frame. In Texture Atlas data this is usually set to the filename.
    uuid + + +string + + + + Internal UUID key.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 21 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    centerX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    centerX + + +number + + + + Center X position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 61 +
    + + + + + + + +
    + + + +
    + + + +
    +

    centerY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    centerY + + +number + + + + Center Y position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 66 +
    + + + + + + + +
    + + + +
    + + + +
    +

    distance

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    distance + + +number + + + + The distance from the top left to the bottom-right of this Frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 71 +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    height + + +number + + + + Height of the frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 46 +
    + + + + + + + +
    + + + +
    + + + +
    +

    index

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of this Frame within the FrameData set it is being added to.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 26 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + Useful for Texture Atlas files (is set to the filename value).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 51 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotated

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotated + + +bool + + + + Rotated? (not yet implemented)
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Frame.js, line 77 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotationDirection

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotationDirection + + +string + + + + Either 'cw' or 'ccw', rotation is always 90 degrees.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 'cw'
    + + + +
    Source:
    +
    • + animation/Frame.js, line 83 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sourceSizeH

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceSizeH + + +number + + + + Height of the original sprite.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 99 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sourceSizeW

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceSizeW + + +number + + + + Width of the original sprite.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 94 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeH

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeH + + +number + + + + Height of the trimmed sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 123 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeW

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeW + + +number + + + + Width of the trimmed sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 117 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeX + + +number + + + + X position of the trimmed sprite inside original sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 105 +
    + + + + + + + +
    + + + +
    + + + +
    +

    spriteSourceSizeY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    spriteSourceSizeY + + +number + + + + Y position of the trimmed sprite inside original sprite.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + animation/Frame.js, line 111 +
    + + + + + + + +
    + + + +
    + + + +
    +

    trimmed

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    trimmed + + +bool + + + + Was it trimmed when packed?
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + animation/Frame.js, line 89 +
    + + + + + + + +
    + + + +
    + + + +
    +

    uuid

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    uuid + + +string + + + + A link to the PIXI.TextureCache entry.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 56 +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + + Width of the frame.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 41 +
    + + + + + + + +
    + + + +
    + + + +
    +

    x

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + + X position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 31 +
    + + + + + + + +
    + + + +
    + + + +
    +

    y

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    y + + +number + + + + Y position within the image to cut from.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 36 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.FrameData.html b/Docs/out/Phaser.Animation.FrameData.html new file mode 100644 index 00000000..9a9c8662 --- /dev/null +++ b/Docs/out/Phaser.Animation.FrameData.html @@ -0,0 +1,152 @@ + + + + + JSDoc: Class: FrameData + + + + + + + + + + +
    + +

    Class: FrameData

    + + + + + +
    + +
    +

    + FrameData +

    + +
    Phaser.Animation.FrameData
    + +
    + +
    +
    + + + + +
    +

    new FrameData()

    + + +
    +
    + + +
    + FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 14 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Parser.html b/Docs/out/Phaser.Animation.Parser.html new file mode 100644 index 00000000..3a6f1d33 --- /dev/null +++ b/Docs/out/Phaser.Animation.Parser.html @@ -0,0 +1,150 @@ + + + + + JSDoc: Class: Parser + + + + + + + + + + +
    + +

    Class: Parser

    + + + + + +
    + +
    +

    + Parser +

    + +
    + +
    +
    + + + + +
    +

    new Parser()

    + + +
    +
    + + +
    + Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 3 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.html b/Docs/out/Phaser.Animation.html new file mode 100644 index 00000000..a33e5c99 --- /dev/null +++ b/Docs/out/Phaser.Animation.html @@ -0,0 +1,1175 @@ + + + + + JSDoc: Class: Animation + + + + + + + + + + +
    + +

    Class: Animation

    + + + + + +
    + +
    +

    + Animation +

    + +
    Phaser.Animation
    + +
    + +
    +
    + + + + +
    +

    new Animation(game, parent, name, frameData, frames, delay, looped)

    + + +
    +
    + + +
    + An Animation instance contains a single animation and the controls to play it. It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    parent + + +Phaser.Sprite + + + + A reference to the owner of this Animation.
    name + + +string + + + + The unique name for this animation, used in playback commands.
    frameData + + +Phaser.Animation.FrameData + + + + The FrameData object that contains all frames used by this Animation.
    frames + + +Array.<number> +| + +Array.<string> + + + + An array of numbers or strings indicating which frames to play in which order.
    delay + + +number + + + + The time between each frame of the animation, given in ms.
    looped + + +boolean + + + + Should this animation loop or play through once.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Animation.js, line 22 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + +

    Classes

    + +
    +
    Frame
    +
    + +
    FrameData
    +
    + +
    Parser
    +
    +
    + + + + + +

    Members

    + +
    + +
    +

    currentFrame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    currentFrame + + +Phaser.Animation.Frame + + + + The currently displayed frame of the Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Animation.js, line 112 +
    + + + + + + + +
    + + + +
    + + + +
    +

    delay

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    delay + + +number + + + + The delay in ms between each frame of the Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Animation.js, line 56 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Animation.js, line 27 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isFinished

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isFinished + + +boolean + + + + The finished state of the Animation. Set to true once playback completes, false during playback.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + Animation.js, line 67 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isPaused

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isPaused + + +boolean + + + + The paused state of the Animation.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + Animation.js, line 79 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isPlaying

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isPlaying + + +boolean + + + + The playing state of the Animation. Set to false once playback completes, true during playback.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + Animation.js, line 73 +
    + + + + + + + +
    + + + +
    + + + +
    +

    looped

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    looped + + +boolean + + + + The loop state of the Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Animation.js, line 61 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + The user defined name given to this Animation.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Animation.js, line 44 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 15:44:41 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.AnimationManager.html b/Docs/out/Phaser.AnimationManager.html new file mode 100644 index 00000000..7de98bb6 --- /dev/null +++ b/Docs/out/Phaser.AnimationManager.html @@ -0,0 +1,616 @@ + + + + + JSDoc: Class: AnimationManager + + + + + + + + + + +
    + +

    Class: AnimationManager

    + + + + + +
    + +
    +

    + Phaser. + + AnimationManager +

    + +
    Phaser.AnimationManager
    + +
    + +
    +
    + + + + +
    +

    new AnimationManager(sprite)

    + + +
    +
    + + +
    + The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + + A reference to the Game Object that owns this AnimationManager.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 16 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    currentFrame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    currentFrame + + +Phaser.Animation.Frame + + + + The currently displayed Frame of animation, if any.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 32 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 26 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sprite

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + + A reference to the parent Sprite that owns this AnimationManager.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 21 +
    + + + + + + + +
    + + + +
    + + + +
    +

    updateIfVisible

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    updateIfVisible + + +boolean + + + + Should the animation data continue to update even if the Sprite.visible is set to false.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 38 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.html b/Docs/out/Phaser.html new file mode 100644 index 00000000..27f59ac4 --- /dev/null +++ b/Docs/out/Phaser.html @@ -0,0 +1,133 @@ + + + + + JSDoc: Namespace: Phaser + + + + + + + + + + +
    + +

    Namespace: Phaser

    + + + + + +
    + +
    +

    + Phaser +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + Phaser.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/global.html b/Docs/out/global.html new file mode 100644 index 00000000..d968bd5b --- /dev/null +++ b/Docs/out/global.html @@ -0,0 +1,4516 @@ + + + + + JSDoc: Global + + + + + + + + + + +
    + +

    Global

    + + + + + +
    + +
    +

    + +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +

    add(name, frames, frameRate, loop, useNumericIndex) → {Phaser.Animation}

    + + +
    +
    + + +
    + Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + + + + + + + The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
    frames + + +Array + + + + + + <optional>
    + + + + + +
    + + null + + An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
    frameRate + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + + The speed at which the animation should play. The speed is given in frames per second.
    loop + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + + {boolean} - Whether or not the animation is looped or just plays once.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Are the given frames using numeric indexes (default) or strings?
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 78 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The Animation object that was created. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation + + +
    +
    + + + + +
    + + + +
    +

    addFrame(frame) → {Phaser.Animation.Frame}

    + + +
    +
    + + +
    + Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    frame + + +Phaser.Animation.Frame + + + + The frame to add to this FrameData set.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 33 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The frame that was just added. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.Frame + + +
    +
    + + + + +
    + + + +
    +

    checkFrameName(name) → {boolean}

    + + +
    +
    + + +
    + Check if there is a Frame with the given name. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + The name of the frame you want to check.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 91 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + True if the frame is found, otherwise false. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + + + +
    +

    destroy()

    + + +
    +
    + + +
    + Cleans up this animation ready for deletion. Nulls all values and references. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 265 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    destroy()

    + + +
    +
    + + +
    + Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 243 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    generateFrameNames(prefix, min, max, suffix, zeroPad)

    + + +
    +
    + + +
    + Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    prefix + + +string + + + + + + + + + + + + The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'.
    min + + +number + + + + + + + + + + + + The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1.
    max + + +number + + + + + + + + + + + + The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34.
    suffix + + +string + + + + + + <optional>
    + + + + + +
    + + '' + + The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'.
    zeroPad + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + + The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 393 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    getFrame(index) → {Phaser.Animation.Frame}

    + + +
    +
    + + +
    + Get a Frame by its numerical index. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of the frame you want to get.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 55 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The frame, if found. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.Frame + + +
    +
    + + + + +
    + + + +
    +

    getFrameByName(name) → {Phaser.Animation.Frame}

    + + +
    +
    + + +
    + Get a Frame by its frame name. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + The name of the frame you want to get.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 73 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The frame, if found. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.Frame + + +
    +
    + + + + +
    + + + +
    +

    getFrameIndexes(frames, useNumericIndex, output) → {Array}

    + + +
    +
    + + +
    + Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frames + + +Array + + + + + + + + + + + + An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Are the given frames using numeric indexes (default) or strings? (false)
    output + + +Array + + + + + + <optional>
    + + + + + +
    + + If given the results will be appended to the end of this array otherwise a new array will be created.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 178 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An array of all Frame indexes matching the given names or IDs. +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + +
    + + + +
    +

    getFrameRange(start, end, output) → {Array}

    + + +
    +
    + + +
    + Returns a range of frames based on the given start and end frame indexes and returns them in an Array. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    start + + +number + + + + + + + + + + The starting frame index.
    end + + +number + + + + + + + + + + The ending frame index.
    output + + +Array + + + + + + <optional>
    + + + + + +
    If given the results will be appended to the end of this array otherwise a new array will be created.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 109 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An array of Frames between the start and end index values, or an empty array if none were found. +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + +
    + + + +
    +

    getFrames(frames, useNumericIndex, output) → {Array}

    + + +
    +
    + + +
    + Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frames + + +Array + + + + + + + + + + + + An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Are the given frames using numeric indexes (default) or strings? (false)
    output + + +Array + + + + + + <optional>
    + + + + + +
    + + If given the results will be appended to the end of this array otherwise a new array will be created.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 131 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An array of all Frames in this FrameData set matching the given names or IDs. +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + +
    + + + +
    +

    JSONData(game, json, cacheKey) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse the JSON data and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    json + + +Object + + + + The JSON data from the Texture Atlas. Must be in Array format.
    cacheKey + + +string + + + + The Game.Cache asset key of the texture image.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 96 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + + + +
    +

    JSONDataHash(game, json, cacheKey) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse the JSON data and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    json + + +Object + + + + The JSON data from the Texture Atlas. Must be in JSON Hash format.
    cacheKey + + +string + + + + The Game.Cache asset key of the texture image.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 167 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + + + +
    +

    onComplete()

    + + +
    +
    + + +
    + Called internally when the animation finishes playback. Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 281 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    play(frameRate, loop) → {Phaser.Animation}

    + + +
    +
    + + +
    + Plays this animation. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frameRate + + +number + + + + + + <optional>
    + + + + + +
    + + null + + The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
    loop + + +boolean + + + + + + <optional>
    + + + + + +
    + + null + + Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 118 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + - A reference to this Animation instance. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation + + +
    +
    + + + + +
    + + + +
    +

    play(name, frameRate, loop) → {Phaser.Animation}

    + + +
    +
    + + +
    + Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + + + + + + + The name of the animation to be played, e.g. "fire", "walk", "jump".
    frameRate + + +number + + + + + + <optional>
    + + + + + +
    + + null + + The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
    loop + + +boolean + + + + + + <optional>
    + + + + + +
    + + null + + Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 158 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A reference to playing Animation instance. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation + + +
    +
    + + + + +
    + + + +
    +

    restart()

    + + +
    +
    + + +
    + Sets this animation back to the first frame and restarts the animation. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 160 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

    + + +
    +
    + + +
    + If the frame was trimmed when added to the Texture Atlas this records the trim and source data. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    trimmed + + +bool + + + + If this frame was trimmed or not.
    actualWidth + + +number + + + + The width of the frame before being trimmed.
    actualHeight + + +number + + + + The height of the frame before being trimmed.
    destX + + +number + + + + The destination X position of the trimmed frame for display.
    destY + + +number + + + + The destination Y position of the trimmed frame for display.
    destWidth + + +number + + + + The destination width of the trimmed frame for display.
    destHeight + + +number + + + + The destination height of the trimmed frame for display.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 129 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse a Sprite Sheet and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    game + + +Phaser.Game + + + + + + + + + + + + A reference to the currently running game.
    key + + +string + + + + + + + + + + + + The Game.Cache asset key of the Sprite Sheet image.
    frameWidth + + +number + + + + + + + + + + + + The fixed width of each frame of the animation.
    frameHeight + + +number + + + + + + + + + + + + The fixed height of each frame of the animation.
    frameMax + + +number + + + + + + <optional>
    + + + + + +
    + + -1 + + The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 15 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + + + +
    +

    stop(resetFrame)

    + + +
    +
    + + +
    + Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    resetFrame + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + + If true after the animation stops the currentFrame value will be set to the first frame in this animation.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 179 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    stop(name, resetFrame)

    + + +
    +
    + + +
    + Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + <optional>
    + + + + + +
    + + null + + The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
    resetFrame + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + + When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 188 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    total() → {Number}

    + + +
    +
    + + +
    + Returns the total number of frames in this FrameData set. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 226 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The total number of frames in this FrameData set. +
    + + + +
    +
    + Type +
    +
    + +Number + + +
    +
    + + + + +
    + + + +
    +

    update()

    + + +
    +
    + + +
    + Updates this animation. Called automatically by the AnimationManager. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Animation.js, line 199 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected> update() → {boolean}

    + + +
    +
    + + +
    + The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 218 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + True if a new animation frame has been set, otherwise false. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + + + +
    +

    validateFrames(frames, useNumericIndex) → {boolean}

    + + +
    +
    + + +
    + Check whether the frames in the given array are valid and exist. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frames + + +Array + + + + + + + + + + + + An array of frames to be validated.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Validate the frames based on their numeric index (true) or string index (false)
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 124 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + True if all given Frames are valid, otherwise false. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + + + +
    +

    XMLData(game, xml, cacheKey) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse the XML data and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    xml + + +Object + + + + The XML data from the Texture Atlas. Must be in Starling XML format.
    cacheKey + + +string + + + + The Game.Cache asset key of the texture image.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 241 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/index.html b/Docs/out/index.html new file mode 100644 index 00000000..baad952e --- /dev/null +++ b/Docs/out/index.html @@ -0,0 +1,63 @@ + + + + + JSDoc: Index + + + + + + + + + + +
    + +

    Index

    + + + + + + + +

    + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/module-Phaser.html b/Docs/out/module-Phaser.html new file mode 100644 index 00000000..b711810a --- /dev/null +++ b/Docs/out/module-Phaser.html @@ -0,0 +1,120 @@ + + + + + JSDoc: Module: Phaser + + + + + + + + + + +
    + +

    Module: Phaser

    + + + + + +
    + +
    +

    + Phaser +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + Phaser.js, line 3 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/scripts/linenumber.js b/Docs/out/scripts/linenumber.js new file mode 100644 index 00000000..a0c570d5 --- /dev/null +++ b/Docs/out/scripts/linenumber.js @@ -0,0 +1,17 @@ +(function() { + var counter = 0; + var numbered; + var source = document.getElementsByClassName('prettyprint source'); + + if (source && source[0]) { + source = source[0].getElementsByTagName('code')[0]; + + numbered = source.innerHTML.split('\n'); + numbered = numbered.map(function(item) { + counter++; + return '' + item; + }); + + source.innerHTML = numbered.join('\n'); + } +})(); diff --git a/Docs/out/scripts/prettify/Apache-License-2.0.txt b/Docs/out/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/Docs/out/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Docs/out/scripts/prettify/lang-css.js b/Docs/out/scripts/prettify/lang-css.js new file mode 100644 index 00000000..041e1f59 --- /dev/null +++ b/Docs/out/scripts/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/Docs/out/scripts/prettify/prettify.js b/Docs/out/scripts/prettify/prettify.js new file mode 100644 index 00000000..eef5ad7e --- /dev/null +++ b/Docs/out/scripts/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser +* @namespace Phaser */ /** diff --git a/src/animation/Animation.js b/src/animation/Animation.js index c24d6621..9a5c09bd 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -119,6 +119,7 @@ Phaser.Animation.prototype = { * Plays this animation. * * @method play + * @memberof Phaser.Animation * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. * @return {Phaser.Animation} - A reference to this Animation instance. @@ -161,6 +162,7 @@ Phaser.Animation.prototype = { * Sets this animation back to the first frame and restarts the animation. * * @method restart + * @memberof Phaser.Animation */ restart: function () { @@ -180,6 +182,7 @@ Phaser.Animation.prototype = { * Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. * * @method stop + * @memberof Phaser.Animation * @param {boolean} [resetFrame=false] - If true after the animation stops the currentFrame value will be set to the first frame in this animation. */ stop: function (resetFrame) { @@ -200,6 +203,7 @@ Phaser.Animation.prototype = { * Updates this animation. Called automatically by the AnimationManager. * * @method update + * @memberof Phaser.Animation */ update: function () { @@ -266,6 +270,7 @@ Phaser.Animation.prototype = { * Cleans up this animation ready for deletion. Nulls all values and references. * * @method destroy + * @memberof Phaser.Animation */ destroy: function () { @@ -282,6 +287,7 @@ Phaser.Animation.prototype = { * Called internally when the animation finishes playback. Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent. * * @method onComplete + * @memberof Phaser.Animation */ onComplete: function () { @@ -299,11 +305,13 @@ Phaser.Animation.prototype = { /** * Sets the paused state of the Animation. + * @memberof Phaser.Animation * @param {boolean} value - Set to true to pause the animation or false to resume it if previous paused. * *//** * * Returns the paused state of the Animation. + * @memberof Phaser.Animation * @returns {boolean} * */ @@ -338,8 +346,8 @@ Object.defineProperty(Phaser.Animation.prototype, "paused", { }); /** - * * Returns the total number of frames in this Animation. + * @memberof Phaser.Animation * @return {number} * */ @@ -353,11 +361,13 @@ Object.defineProperty(Phaser.Animation.prototype, "frameTotal", { /** * Sets the current frame to the given frame index and updates the texture cache. + * @memberof Phaser.Animation * @param {number} value - The frame to display * *//** * * Returns the current frame, or if not set the index of the most recent frame. + * @memberof Phaser.Animation * @returns {Animation.Frame} * */ @@ -395,12 +405,13 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { * For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' * You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); * +* @method generateFrameNames +* @memberof Phaser.Animation * @param {string} prefix - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. * @param {number} min - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1. * @param {number} max - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34. * @param {string} [suffix=''] - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. * @param {number} [zeroPad=0] - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. -* @method generateFrameNames */ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index aadfcad6..22f6faa6 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -2,11 +2,11 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.AnimationManager +* @memberof Phaser.Animation */ /** -* The AnimationManager is used to add, play and update Phaser Animations. +* The Animation Manager is used to add, play and update Phaser Animations. * Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance. * * @class Phaser.AnimationManager diff --git a/src/animation/Frame.js b/src/animation/Frame.js index 0ec9e9fa..f3f243ea 100644 --- a/src/animation/Frame.js +++ b/src/animation/Frame.js @@ -2,7 +2,7 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Frame +* @memberof Phaser.Animation */ /** diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index 9f57e5dd..96ac86a0 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -2,7 +2,7 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.FrameData +* @memberof Phaser.Animation */ /** diff --git a/src/animation/Parser.js b/src/animation/Parser.js index 6341db1c..ca7c0827 100644 --- a/src/animation/Parser.js +++ b/src/animation/Parser.js @@ -2,7 +2,7 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Animation.Parser +* @memberof Phaser.Animation */ /** diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 58be67f6..4f2ec955 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -77,7 +77,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.events = new Phaser.Events(this); /** - * @property {AnimationManager} animations - This manages animations of the sprite. You can modify animations through it. (see AnimationManager) + * @property {Phaser.AnimationManager} animations - This manages animations of the sprite. You can modify animations through it. (see Phaser.AnimationManager) */ this.animations = new Phaser.AnimationManager(this); diff --git a/src/input/Keyboard.js b/src/input/Keyboard.js index a65e3f14..e4ee231e 100644 --- a/src/input/Keyboard.js +++ b/src/input/Keyboard.js @@ -27,6 +27,12 @@ Phaser.Keyboard = function (game) { */ this._keys = {}; + /** + * @property {Description} _hotkeys - Description. + * @private + */ + this._hotkeys = {}; + /** * @property {Description} _capture - Description. * @private @@ -72,6 +78,31 @@ Phaser.Keyboard.prototype = { */ _onKeyUp: null, + addCallbacks: function (context, onDown, onUp) { + + this.callbackContext = context; + this.onDownCallback = onDown; + + if (typeof onUp !== 'undefined') + { + this.onUpCallback = onUp; + } + + }, + + addKey: function (keycode) { + + this._hotkeys[keycode] = new Phaser.Key(this.game, keycode); + return this._hotkeys[keycode]; + + }, + + removeKey: function (keycode) { + + delete (this._hotkeys[keycode]); + + }, + /** * Description. * @method start From ca113b85aa3c0435904ce84f7453414644bd50a4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 16:39:39 +0100 Subject: [PATCH 034/125] More docs coming on. --- Docs/conf.json | 2 +- Docs/out/Animation-Phaser.Animation.html | 12 +- Docs/out/Animation.html | 4 +- Docs/out/Camera-Phaser.Camera.html | 1345 ++++++ Docs/out/Camera.html | 135 + Docs/out/Game-Phaser.Game.html | 3542 ++++++++++++++++ Docs/out/Game.html | 135 + Docs/out/Group-Phaser.Group.html | 680 +++ Docs/out/Group.html | 135 + Docs/out/Phaser.Animation.Frame.html | 263 +- Docs/out/Phaser.Animation.FrameData.html | 1628 ++++++- Docs/out/Phaser.Animation.Parser.html | 862 +++- Docs/out/Phaser.AnimationManager.html | 1084 ++++- Docs/out/Phaser.html | 11 +- Docs/out/global.html | 4237 +------------------ Docs/out/index.html | 4 +- Docs/out/module-Phaser.html | 4 +- src/animation/AnimationManager.js | 15 + src/animation/Frame.js | 7 +- src/animation/FrameData.js | 10 +- src/animation/Parser.js | 4 + src/core/Camera.js | 10 +- src/core/Game.js | 21 +- src/core/Group.js | 42 +- src/core/Plugin.js | 12 +- src/core/Signal.js | 10 +- src/core/SignalBinding.js | 10 +- src/core/StateManager.js | 10 +- src/core/World.js | 4 +- src/gameobjects/BitmapText.js | 6 +- src/gameobjects/GameObjectFactory.js | 2 +- src/gameobjects/Sprite.js | 12 +- src/gameobjects/Text.js | 6 +- src/geom/Circle.js | 20 +- src/geom/Point.js | 18 +- src/geom/Rectangle.js | 28 +- src/input/Input.js | 8 +- src/input/InputHandler.js | 42 +- src/input/Key.js | 8 +- src/input/Keyboard.js | 8 +- src/input/MSPointer.js | 2 +- src/input/Mouse.js | 4 +- src/input/Pointer.js | 20 +- src/input/Touch.js | 4 +- src/loader/Cache.js | 2 +- src/loader/Loader.js | 12 +- src/math/Math.js | 24 +- src/particles/arcade/Emitter.js | 26 +- src/physics/arcade/Body.js | 8 +- src/pixi/core/Circle.js | 10 +- src/pixi/core/Ellipse.js | 12 +- src/pixi/core/Point.js | 4 +- src/pixi/core/Polygon.js | 4 +- src/pixi/core/Rectangle.js | 12 +- src/pixi/display/DisplayObjectContainer.js | 4 +- src/pixi/display/MovieClip.js | 4 +- src/pixi/display/Stage.js | 4 +- src/pixi/extras/TilingSprite.js | 4 +- src/pixi/primitives/Graphics.js | 38 +- src/pixi/renderers/canvas/CanvasRenderer.js | 8 +- src/pixi/renderers/webgl/WebGLRenderer.js | 8 +- src/pixi/text/Text.js | 8 +- src/pixi/textures/RenderTexture.js | 4 +- src/pixi/utils/Detector.js | 4 +- src/pixi/utils/Utils.js | 2 +- src/sound/Sound.js | 30 +- src/sound/SoundManager.js | 16 +- src/system/Canvas.js | 4 +- src/system/Device.js | 78 +- src/system/RequestAnimationFrame.js | 8 +- src/system/StageScaleMode.js | 12 +- src/tilemap/Tile.js | 34 +- src/tilemap/Tilemap.js | 36 +- src/tilemap/TilemapLayer.js | 6 +- src/tilemap/TilemapRenderer.js | 2 +- src/time/Time.js | 2 +- src/tween/Tween.js | 16 +- src/tween/TweenManager.js | 2 +- src/utils/Debug.js | 8 +- src/utils/Utils.js | 2 +- 80 files changed, 10121 insertions(+), 4763 deletions(-) create mode 100644 Docs/out/Camera-Phaser.Camera.html create mode 100644 Docs/out/Camera.html create mode 100644 Docs/out/Game-Phaser.Game.html create mode 100644 Docs/out/Game.html create mode 100644 Docs/out/Group-Phaser.Group.html create mode 100644 Docs/out/Group.html diff --git a/Docs/conf.json b/Docs/conf.json index 03c4a53d..dab97499 100644 --- a/Docs/conf.json +++ b/Docs/conf.json @@ -3,7 +3,7 @@ "allowUnknownTags": true }, "source": { - "include": [ "../src/Phaser.js", "../src/animation/Animation.js" ], + "include": [ "../src/Phaser.js", "../src/animation/", "../src/core/Camera.js", "../src/core/Game.js", "../src/core/Group.js" ], "exclude": [], "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" diff --git a/Docs/out/Animation-Phaser.Animation.html b/Docs/out/Animation-Phaser.Animation.html index 18ced43a..c35f1eed 100644 --- a/Docs/out/Animation-Phaser.Animation.html +++ b/Docs/out/Animation-Phaser.Animation.html @@ -89,7 +89,7 @@ -Phaser.Game +Phaser.Game @@ -158,7 +158,7 @@ -Phaser.Animation.FrameData +Phaser.Animation.FrameData @@ -360,7 +360,7 @@ -Phaser.Animation.Frame +Phaser.Animation.Frame @@ -562,7 +562,7 @@ -Phaser.Game +Phaser.Game @@ -1147,13 +1147,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
    diff --git a/Docs/out/Animation.html b/Docs/out/Animation.html index 430b23d0..46dd954e 100644 --- a/Docs/out/Animation.html +++ b/Docs/out/Animation.html @@ -120,13 +120,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
    diff --git a/Docs/out/Camera-Phaser.Camera.html b/Docs/out/Camera-Phaser.Camera.html new file mode 100644 index 00000000..1ccf8e45 --- /dev/null +++ b/Docs/out/Camera-Phaser.Camera.html @@ -0,0 +1,1345 @@ + + + + + JSDoc: Class: Camera + + + + + + + + + + +
    + +

    Class: Camera

    + + + + + +
    + +
    +

    + Camera +

    + +
    Camera
    + +
    + +
    +
    + + + + +
    +

    new Camera(game, id, x, y, width, height)

    + + +
    +
    + + +
    + A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + Game reference to the currently running game.
    id + + +number + + + + Not being used at the moment, will be when Phaser supports multiple camera
    x + + +number + + + + Position of the camera on the X axis
    y + + +number + + + + Position of the camera on the Y axis
    width + + +number + + + + The width of the view rectangle
    height + + +number + + + + The height of the view rectangle
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 23 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    _edge

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    edge + + +number + + + + Edge property. Description.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + core/Camera.js, line 81 +
    + + + + + + + +
    + + + +
    + + + +
    +

    atLimit

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    atLimit + + +bool + + + + Whether this camera is flush with the World Bounds or not.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 69 +
    + + + + + + + +
    + + + +
    + + + +
    +

    deadzone

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    deadzone + + +Phaser.Rectangle + + + + Moving inside this Rectangle will not cause camera moving.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 58 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 28 +
    + + + + + + + +
    + + + +
    + + + +
    +

    id

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +number + + + + Reserved for future multiple camera set-ups.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    • + core/Camera.js, line 39 +
    + + + + + + + +
    + + + +
    + + + +
    +

    screenView

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    screenView + + +Phaser.Rectangle + + + + Used by Sprites to work out Camera culling.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 53 +
    + + + + + + + +
    + + + +
    + + + +
    +

    target

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    target + + +Phaser.Sprite + + + + If the camera is tracking a Sprite, this is a reference to it, otherwise null.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Camera.js, line 75 +
    + + + + + + + +
    + + + +
    + + + +
    +

    view

    + + +
    +
    + +
    + Camera view. The view into the world we wish to render (by default the game dimensions). The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render. Objects outside of this view are not rendered (unless set to ignore the Camera, i.e. UI?). +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    view + + +Phaser.Rectangle + + + +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 48 +
    + + + + + + + +
    + + + +
    + + + +
    +

    visible

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    visible + + +bool + + + + Whether this camera is visible or not.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    • + core/Camera.js, line 64 +
    + + + + + + + +
    + + + +
    + + + +
    +

    world

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    world + + +Phaser.World + + + + A reference to the game world.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Camera.js, line 33 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Camera.html b/Docs/out/Camera.html new file mode 100644 index 00000000..d0d10d17 --- /dev/null +++ b/Docs/out/Camera.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Camera + + + + + + + + + + +
    + +

    Module: Camera

    + + + + + +
    + +
    +

    + Phaser. + + Camera +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + core/Camera.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Game-Phaser.Game.html b/Docs/out/Game-Phaser.Game.html new file mode 100644 index 00000000..4c2447d6 --- /dev/null +++ b/Docs/out/Game-Phaser.Game.html @@ -0,0 +1,3542 @@ + + + + + JSDoc: Class: Game + + + + + + + + + + +
    + +

    Class: Game

    + + + + + +
    + +
    +

    + Game +

    + +
    This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

    "Hell, there are no rules here - we're trying to accomplish something."


    Thomas A. Edison
    + +
    + +
    +
    + + + + +
    +

    new Game(width, height, renderer, parent, state, transparent, antialias)

    + + +
    +
    + + +
    + Game constructor Instantiate a new Phaser.Game object. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + + The width of your game in game pixels.
    height + + +number + + + + The height of your game in game pixels.
    renderer + + +number + + + + Which renderer to use (canvas or webgl)
    parent + + +HTMLElement + + + + The Games DOM parent.
    state + + +Description + + + + Description.
    transparent + + +bool + + + + Use a transparent canvas background or not.
    antialias + + +bool + + + + Anti-alias graphics.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 26 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    add

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    add + + +Phaser.GameObjectFactory + + + + Reference to the GameObject Factory.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 120 +
    + + + + + + + +
    + + + +
    + + + +
    +

    antialias

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    antialias + + +bool + + + + Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 66 +
    + + + + + + + +
    + + + +
    + + + +
    +

    cache

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    cache + + +Phaser.Cache + + + + Reference to the assets cache.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 126 +
    + + + + + + + +
    + + + +
    + + + +
    +

    camera

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    camera + + +Phaser.Physics.PhysicsManager + + + + A handy reference to world.camera.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 204 +
    + + + + + + + +
    + + + +
    + + + +
    +

    canvas

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    canvas + + +HTMLCanvasElement + + + + A handy reference to renderer.view.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 210 +
    + + + + + + + +
    + + + +
    + + + +
    +

    context

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    context + + +Context + + + + A handy reference to renderer.context (only set for CANVAS games)
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 216 +
    + + + + + + + +
    + + + +
    + + + +
    +

    debug

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    debug + + +Phaser.Utils.Debug + + + + A set of useful debug utilitie.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 222 +
    + + + + + + + +
    + + + +
    + + + +
    +

    device

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    device + + +Phaser.Device + + + + Contains device information and capabilities.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 198 +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    height + + +number + + + + The Game height (in pixels).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 56 +
    + + + + + + + +
    + + + +
    + + + +
    +

    id

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +number + + + + Phaser Game ID (for when Pixi supports multiple instances).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 39 +
    + + + + + + + +
    + + + +
    + + + +
    +

    input

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    input + + +Phaser.Input + + + + Reference to the input manager
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 132 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isBooted

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isBooted + + +bool + + + + Whether the game engine is booted, aka available.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + core/Game.js, line 102 +
    + + + + + + + +
    + + + +
    + + + +
    +

    isRunning

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +bool + + + + Is game running or paused?
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    • + core/Game.js, line 108 +
    + + + + + + + +
    + + + +
    + + + +
    +

    load

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    load + + +Phaser.Loader + + + + Reference to the assets loader.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 138 +
    + + + + + + + +
    + + + +
    + + + +
    +

    math

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    math + + +Phaser.GameMath + + + + Reference to the math helper.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 144 +
    + + + + + + + +
    + + + +
    + + + +
    +

    net

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    net + + +Phaser.Net + + + + Reference to the network class.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 150 +
    + + + + + + + +
    + + + +
    + + + +
    +

    parent

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    parent + + +HTMLElement + + + + The Games DOM parent.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 44 +
    + + + + + + + +
    + + + +
    + + + +
    +

    particles

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    particles + + +Phaser.Particles + + + + The Particle Manager.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 228 +
    + + + + + + + +
    + + + +
    + + + +
    +

    physics

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    physics + + +Phaser.Physics.PhysicsManager + + + + Reference to the physics manager.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 186 +
    + + + + + + + +
    + + + +
    + + + +
    +

    raf

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    raf + + +Phaser.RequestAnimationFrame + + + + Automatically handles the core game loop via requestAnimationFrame or setTimeout
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 114 +
    + + + + + + + +
    + + + +
    + + + +
    +

    renderer

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    renderer + + +number + + + + The Pixi Renderer
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 72 +
    + + + + + + + +
    + + + +
    + + + +
    +

    renderType

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    renderType + + +number + + + + The Renderer this Phaser.Game will use. Either Phaser.RENDERER_AUTO, Phaser.RENDERER_CANVAS or Phaser.RENDERER_WEBGL.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 89 +
    + + + + + + + +
    + + + +
    + + + +
    +

    rnd

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rnd + + +Phaser.RandomDataGenerator + + + + Instance of repeatable random data generator helper.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 192 +
    + + + + + + + +
    + + + +
    + + + +
    +

    sound

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sound + + +Phaser.SoundManager + + + + Reference to the sound manager.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 156 +
    + + + + + + + +
    + + + +
    + + + +
    +

    stage

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    stage + + +Phaser.Stage + + + + Reference to the stage.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 162 +
    + + + + + + + +
    + + + +
    + + + +
    +

    state

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    state + + +number + + + + The StateManager.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 77 +
    + + + + + + + +
    + + + +
    + + + +
    +

    time

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    time + + +Phaser.TimeManager + + + + Reference to game clock.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 168 +
    + + + + + + + +
    + + + +
    + + + +
    +

    transparent

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    transparent + + +bool + + + + Use a transparent canvas background or not.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 61 +
    + + + + + + + +
    + + + +
    + + + +
    +

    tweens

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    tweens + + +Phaser.TweenManager + + + + Reference to the tween manager.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 174 +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + + The Game width (in pixels).
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Game.js, line 51 +
    + + + + + + + +
    + + + +
    + + + +
    +

    world

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    world + + +Phaser.World + + + + Reference to the world.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    • + core/Game.js, line 180 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Game.html b/Docs/out/Game.html new file mode 100644 index 00000000..f5b57424 --- /dev/null +++ b/Docs/out/Game.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Game + + + + + + + + + + +
    + +

    Module: Game

    + + + + + +
    + +
    +

    + Phaser. + + Game +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + core/Game.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Group-Phaser.Group.html b/Docs/out/Group-Phaser.Group.html new file mode 100644 index 00000000..63066302 --- /dev/null +++ b/Docs/out/Group-Phaser.Group.html @@ -0,0 +1,680 @@ + + + + + JSDoc: Class: Group + + + + + + + + + + +
    + +

    Class: Group

    + + + + + +
    + +
    +

    + Group +

    + +
    An Animation instance contains a single animation and the controls to play it. It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.
    + +
    + +
    +
    + + + + +
    +

    new Group(game, parent, name, useStage)

    + + +
    +
    + + +
    + Phaser Group constructor. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    parent + + +Description + + + + Description.
    name + + +string + + + + The unique name for this animation, used in playback commands.
    useStage + + +bool + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 19 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    exists

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    exists + + +bool + + + + Description.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    • + core/Group.js, line 73 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 31 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +Phaser.Game + + + + Description.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 36 +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + + Description.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 67 +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Group.html b/Docs/out/Group.html new file mode 100644 index 00000000..e5bb4cc7 --- /dev/null +++ b/Docs/out/Group.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Group + + + + + + + + + + +
    + +

    Module: Group

    + + + + + +
    + +
    +

    + Phaser. + + Group +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + core/Group.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Frame.html b/Docs/out/Phaser.Animation.Frame.html index f5208d26..1ae6098f 100644 --- a/Docs/out/Phaser.Animation.Frame.html +++ b/Docs/out/Phaser.Animation.Frame.html @@ -2253,6 +2253,265 @@ +

    Methods

    + +
    + +
    +

    <static> setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

    + + +
    +
    + + +
    + If the frame was trimmed when added to the Texture Atlas this records the trim and source data. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    trimmed + + +bool + + + + If this frame was trimmed or not.
    actualWidth + + +number + + + + The width of the frame before being trimmed.
    actualHeight + + +number + + + + The height of the frame before being trimmed.
    destX + + +number + + + + The destination X position of the trimmed frame for display.
    destY + + +number + + + + The destination Y position of the trimmed frame for display.
    destWidth + + +number + + + + The destination width of the trimmed frame for display.
    destHeight + + +number + + + + The destination height of the trimmed frame for display.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Frame.js, line 129 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + @@ -2267,13 +2526,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.Animation.FrameData.html b/Docs/out/Phaser.Animation.FrameData.html index 9a9c8662..150d583f 100644 --- a/Docs/out/Phaser.Animation.FrameData.html +++ b/Docs/out/Phaser.Animation.FrameData.html @@ -1,152 +1,1478 @@ - - - - - JSDoc: Class: FrameData - - - - - - - - - - -
    - -

    Class: FrameData

    - - - - - -
    - -
    -

    - FrameData -

    - -
    Phaser.Animation.FrameData
    - -
    - -
    -
    - - - - -
    -

    new FrameData()

    - - -
    -
    - - -
    - FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 14 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - - - -
    - -
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) -
    - - - - + + + + + JSDoc: Class: FrameData + + + + + + + + + + +
    + +

    Class: FrameData

    + + + + + +
    + +
    +

    + FrameData +

    + +
    Phaser.Animation.FrameData
    + +
    + +
    +
    + + + + +
    +

    new FrameData()

    + + +
    +
    + + +
    + FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 14 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + +

    Methods

    + +
    + +
    +

    <static> addFrame(frame) → {Phaser.Animation.Frame}

    + + +
    +
    + + +
    + Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    frame + + +Phaser.Animation.Frame + + + + The frame to add to this FrameData set.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 33 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The frame that was just added. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.Frame + + +
    +
    + + + + +
    + + + +
    +

    <static> checkFrameName(name) → {boolean}

    + + +
    +
    + + +
    + Check if there is a Frame with the given name. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + The name of the frame you want to check.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 94 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + True if the frame is found, otherwise false. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + + + +
    +

    <static> getFrame(index) → {Phaser.Animation.Frame}

    + + +
    +
    + + +
    + Get a Frame by its numerical index. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +number + + + + The index of the frame you want to get.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 56 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The frame, if found. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.Frame + + +
    +
    + + + + +
    + + + +
    +

    <static> getFrameByName(name) → {Phaser.Animation.Frame}

    + + +
    +
    + + +
    + Get a Frame by its frame name. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + + The name of the frame you want to get.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 75 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The frame, if found. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.Frame + + +
    +
    + + + + +
    + + + +
    +

    <static> getFrameIndexes(frames, useNumericIndex, output) → {Array}

    + + +
    +
    + + +
    + Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frames + + +Array + + + + + + + + + + + + An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Are the given frames using numeric indexes (default) or strings? (false)
    output + + +Array + + + + + + <optional>
    + + + + + +
    + + If given the results will be appended to the end of this array otherwise a new array will be created.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 184 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An array of all Frame indexes matching the given names or IDs. +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + +
    + + + +
    +

    <static> getFrameRange(start, end, output) → {Array}

    + + +
    +
    + + +
    + Returns a range of frames based on the given start and end frame indexes and returns them in an Array. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    start + + +number + + + + + + + + + + The starting frame index.
    end + + +number + + + + + + + + + + The ending frame index.
    output + + +Array + + + + + + <optional>
    + + + + + +
    If given the results will be appended to the end of this array otherwise a new array will be created.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 113 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An array of Frames between the start and end index values, or an empty array if none were found. +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + +
    + + + +
    +

    <static> getFrames(frames, useNumericIndex, output) → {Array}

    + + +
    +
    + + +
    + Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frames + + +Array + + + + + + + + + + + + An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Are the given frames using numeric indexes (default) or strings? (false)
    output + + +Array + + + + + + <optional>
    + + + + + +
    + + If given the results will be appended to the end of this array otherwise a new array will be created.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 136 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An array of all Frames in this FrameData set matching the given names or IDs. +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + +
    + + + +
    +

    <static> total() → {Number}

    + + +
    +
    + + +
    + Returns the total number of frames in this FrameData set. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/FrameData.js, line 233 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The total number of frames in this FrameData set. +
    + + + +
    +
    + Type +
    +
    + +Number + + +
    +
    + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST) +
    + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Parser.html b/Docs/out/Phaser.Animation.Parser.html index 3a6f1d33..0d846933 100644 --- a/Docs/out/Phaser.Animation.Parser.html +++ b/Docs/out/Phaser.Animation.Parser.html @@ -121,6 +121,864 @@ +

    Methods

    + +
    + +
    +

    <static> JSONData(game, json, cacheKey) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse the JSON data and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    json + + +Object + + + + The JSON data from the Texture Atlas. Must be in Array format.
    cacheKey + + +string + + + + The Game.Cache asset key of the texture image.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 97 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + + + +
    +

    <static> JSONDataHash(game, json, cacheKey) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse the JSON data and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    json + + +Object + + + + The JSON data from the Texture Atlas. Must be in JSON Hash format.
    cacheKey + + +string + + + + The Game.Cache asset key of the texture image.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 169 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + + + +
    +

    <static> spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse a Sprite Sheet and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    game + + +Phaser.Game + + + + + + + + + + + + A reference to the currently running game.
    key + + +string + + + + + + + + + + + + The Game.Cache asset key of the Sprite Sheet image.
    frameWidth + + +number + + + + + + + + + + + + The fixed width of each frame of the animation.
    frameHeight + + +number + + + + + + + + + + + + The fixed height of each frame of the animation.
    frameMax + + +number + + + + + + <optional>
    + + + + + +
    + + -1 + + The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 15 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + + + +
    +

    <static> XMLData(game, xml, cacheKey) → {Phaser.Animation.FrameData}

    + + +
    +
    + + +
    + Parse the XML data and extract the animation frame data from it. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    xml + + +Object + + + + The XML data from the Texture Atlas. Must be in Starling XML format.
    cacheKey + + +string + + + + The Game.Cache asset key of the texture image.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/Parser.js, line 244 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A FrameData object containing the parsed frames. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation.FrameData + + +
    +
    + + + + +
    + +
    + @@ -135,13 +993,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.AnimationManager.html b/Docs/out/Phaser.AnimationManager.html index 7de98bb6..c5af2ecc 100644 --- a/Docs/out/Phaser.AnimationManager.html +++ b/Docs/out/Phaser.AnimationManager.html @@ -325,7 +325,7 @@ -Phaser.Game +Phaser.Game @@ -587,6 +587,1084 @@ +

    Methods

    + +
    + +
    +

    <static> add(name, frames, frameRate, loop, useNumericIndex) → {Phaser.Animation}

    + + +
    +
    + + +
    + Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + + + + + + + The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
    frames + + +Array + + + + + + <optional>
    + + + + + +
    + + null + + An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
    frameRate + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + + The speed at which the animation should play. The speed is given in frames per second.
    loop + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + + {boolean} - Whether or not the animation is looped or just plays once.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Are the given frames using numeric indexes (default) or strings?
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 79 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The Animation object that was created. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation + + +
    +
    + + + + +
    + + + +
    +

    <static> destroy()

    + + +
    +
    + + +
    + Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 249 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> play(name, frameRate, loop) → {Phaser.Animation}

    + + +
    +
    + + +
    + Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + + + + + + + The name of the animation to be played, e.g. "fire", "walk", "jump".
    frameRate + + +number + + + + + + <optional>
    + + + + + +
    + + null + + The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
    loop + + +boolean + + + + + + <optional>
    + + + + + +
    + + null + + Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 161 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A reference to playing Animation instance. +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation + + +
    +
    + + + + +
    + + + +
    +

    <static> stop(name, resetFrame)

    + + +
    +
    + + +
    + Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + <optional>
    + + + + + +
    + + null + + The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
    resetFrame + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + + When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 192 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected, static> update() → {boolean}

    + + +
    +
    + + +
    + The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 223 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + True if a new animation frame has been set, otherwise false. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + + + +
    +

    <static> validateFrames(frames, useNumericIndex) → {boolean}

    + + +
    +
    + + +
    + Check whether the frames in the given array are valid and exist. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    frames + + +Array + + + + + + + + + + + + An array of frames to be validated.
    useNumericIndex + + +boolean + + + + + + <optional>
    + + + + + +
    + + true + + Validate the frames based on their numeric index (true) or string index (false)
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + animation/AnimationManager.js, line 126 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + True if all given Frames are valid, otherwise false. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + +
    + @@ -601,13 +1679,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.html b/Docs/out/Phaser.html index 27f59ac4..db2e43d5 100644 --- a/Docs/out/Phaser.html +++ b/Docs/out/Phaser.html @@ -98,6 +98,13 @@ +

    Classes

    + +
    +
    AnimationManager
    +
    +
    + @@ -118,13 +125,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
    diff --git a/Docs/out/global.html b/Docs/out/global.html index d968bd5b..4e445f3c 100644 --- a/Docs/out/global.html +++ b/Docs/out/global.html @@ -91,7 +91,7 @@
    -

    add(name, frames, frameRate, loop, useNumericIndex) → {Phaser.Animation}

    +

    multiplyAll(property, amount, checkAlive, checkVisible)

    @@ -99,318 +99,7 @@
    - Adds a new animation under the given key. Optionally set the frames, frame rate and loop. Animations added in this way are played back with the play function. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    name - - -string - - - - - - - - - - - - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk".
    frames - - -Array - - - - - - <optional>
    - - - - - -
    - - null - - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used.
    frameRate - - -number - - - - - - <optional>
    - - - - - -
    - - 60 - - The speed at which the animation should play. The speed is given in frames per second.
    loop - - -boolean - - - - - - <optional>
    - - - - - -
    - - false - - {boolean} - Whether or not the animation is looped or just plays once.
    useNumericIndex - - -boolean - - - - - - <optional>
    - - - - - -
    - - true - - Are the given frames using numeric indexes (default) or strings?
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/AnimationManager.js, line 78 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - The Animation object that was created. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation - - -
    -
    - - - - - - - - -
    -

    addFrame(frame) → {Phaser.Animation.Frame}

    - - -
    -
    - - -
    - Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. + Multiplies the given property by the amount on all children in this Group. Group.multiplyAll('x', 2) will x2 the child.x value.
    @@ -444,146 +133,7 @@ - frame - - - - - -Phaser.Animation.Frame - - - - - - - - - - The frame to add to this FrameData set. - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 33 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - The frame that was just added. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.Frame - - -
    -
    - - - - -
    - - - -
    -

    checkFrameName(name) → {boolean}

    - - -
    -
    - - -
    - Check if there is a Frame with the given name. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - -
    NameTypeDescription
    nameproperty @@ -599,549 +149,14 @@ - The name of the frame you want to check.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 91 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - True if the frame is found, otherwise false. -
    - - - -
    -
    - Type -
    -
    - -boolean - - -
    -
    - - - - -
    - - - -
    -

    destroy()

    - - -
    -
    - - -
    - Cleans up this animation ready for deletion. Nulls all values and references. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 265 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    destroy()

    - - -
    -
    - - -
    - Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/AnimationManager.js, line 243 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    generateFrameNames(prefix, min, max, suffix, zeroPad)

    - - -
    -
    - - -
    - Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers. For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    prefix - - -string - - - - - - - - - - - - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'.The property to multiply, for example 'body.velocity.x' or 'angle'.
    min - - -number - - - - - - - - - - - - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1.
    max - - -number - - - - - - - - - - - - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34.
    suffix - - -string - - - - - - <optional>
    - - - - - -
    - - '' - - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'.
    zeroPad - - -number - - - - - - <optional>
    - - - - - -
    - - 0 - - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 393 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    getFrame(index) → {Phaser.Animation.Frame}

    - - -
    -
    - - -
    - Get a Frame by its numerical index. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - -
    NameTypeDescription
    indexamount @@ -1157,308 +172,14 @@ - The index of the frame you want to get.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 55 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - The frame, if found. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.Frame - - -
    -
    - - - - -
    - - - -
    -

    getFrameByName(name) → {Phaser.Animation.Frame}

    - - -
    -
    - - -
    - Get a Frame by its frame name. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - - -string - - - - The name of the frame you want to get.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 73 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - The frame, if found. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.Frame - - -
    -
    - - - - -
    - - - -
    -

    getFrameIndexes(frames, useNumericIndex, output) → {Array}

    - - -
    -
    - - -
    - Returns all of the Frame indexes in this FrameData set. The frames indexes are returned in the output array, or if none is provided in a new Array object. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - + - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    frames - - -Array - - - - - - - - - - - - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.
    useNumericIndexcheckAlive @@ -1471,438 +192,17 @@ - - <optional>
    - - - - - -
    - - true - - Are the given frames using numeric indexes (default) or strings? (false)If true the property will only be changed if the child is alive.
    output - - -Array - - - - - - <optional>
    - - - - - -
    - - If given the results will be appended to the end of this array otherwise a new array will be created.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 178 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - An array of all Frame indexes matching the given names or IDs. -
    - - - -
    -
    - Type -
    -
    - -Array - - -
    -
    - - - - -
    - - - -
    -

    getFrameRange(start, end, output) → {Array}

    - - -
    -
    - - -
    - Returns a range of frames based on the given start and end frame indexes and returns them in an Array. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDescription
    start - - -number - - - - - - - - - - The starting frame index.
    end - - -number - - - - - - - - - - The ending frame index.
    output - - -Array - - - - - - <optional>
    - - - - - -
    If given the results will be appended to the end of this array otherwise a new array will be created.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 109 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - An array of Frames between the start and end index values, or an empty array if none were found. -
    - - - -
    -
    - Type -
    -
    - -Array - - -
    -
    - - - - -
    - - - -
    -

    getFrames(frames, useNumericIndex, output) → {Array}

    - - -
    -
    - - -
    - Returns all of the Frames in this FrameData set where the frame index is found in the input array. The frames are returned in the output array, or if none is provided in a new Array object. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2002,7 +249,7 @@
    Source:
    • - animation/FrameData.js, line 131 + core/Group.js, line 516
    @@ -2023,2464 +270,6 @@ -
    Returns:
    - - -
    - An array of all Frames in this FrameData set matching the given names or IDs. -
    - - - -
    -
    - Type -
    -
    - -Array - - -
    -
    - - - - - - - - -
    -

    JSONData(game, json, cacheKey) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    - Parse the JSON data and extract the animation frame data from it. -
    - - - - - - - -
    Parameters:
    - - -
    NameTypeArgumentDefaultDescription
    frames - - -Array - - - - - - - - - - - - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.
    useNumericIndexcheckVisible @@ -1915,63 +215,10 @@ - - <optional>
    - - - - - -
    - - true - - Are the given frames using numeric indexes (default) or strings? (false)
    output - - -Array - - - - - - <optional>
    - - - - - -
    - - If given the results will be appended to the end of this array otherwise a new array will be created.If true the property will only be changed if the child is visible.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - - A reference to the currently running game.
    json - - -Object - - - - The JSON data from the Texture Atlas. Must be in Array format.
    cacheKey - - -string - - - - The Game.Cache asset key of the texture image.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Parser.js, line 96 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - A FrameData object containing the parsed frames. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - -
    - - - -
    -

    JSONDataHash(game, json, cacheKey) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    - Parse the JSON data and extract the animation frame data from it. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - - A reference to the currently running game.
    json - - -Object - - - - The JSON data from the Texture Atlas. Must be in JSON Hash format.
    cacheKey - - -string - - - - The Game.Cache asset key of the texture image.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Parser.js, line 167 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - A FrameData object containing the parsed frames. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - -
    - - - -
    -

    onComplete()

    - - -
    -
    - - -
    - Called internally when the animation finishes playback. Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 281 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    play(frameRate, loop) → {Phaser.Animation}

    - - -
    -
    - - -
    - Plays this animation. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    frameRate - - -number - - - - - - <optional>
    - - - - - -
    - - null - - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
    loop - - -boolean - - - - - - <optional>
    - - - - - -
    - - null - - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 118 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - - A reference to this Animation instance. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation - - -
    -
    - - - - -
    - - - -
    -

    play(name, frameRate, loop) → {Phaser.Animation}

    - - -
    -
    - - -
    - Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    name - - -string - - - - - - - - - - - - The name of the animation to be played, e.g. "fire", "walk", "jump".
    frameRate - - -number - - - - - - <optional>
    - - - - - -
    - - null - - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
    loop - - -boolean - - - - - - <optional>
    - - - - - -
    - - null - - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/AnimationManager.js, line 158 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - A reference to playing Animation instance. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation - - -
    -
    - - - - -
    - - - -
    -

    restart()

    - - -
    -
    - - -
    - Sets this animation back to the first frame and restarts the animation. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 160 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

    - - -
    -
    - - -
    - If the frame was trimmed when added to the Texture Atlas this records the trim and source data. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    trimmed - - -bool - - - - If this frame was trimmed or not.
    actualWidth - - -number - - - - The width of the frame before being trimmed.
    actualHeight - - -number - - - - The height of the frame before being trimmed.
    destX - - -number - - - - The destination X position of the trimmed frame for display.
    destY - - -number - - - - The destination Y position of the trimmed frame for display.
    destWidth - - -number - - - - The destination width of the trimmed frame for display.
    destHeight - - -number - - - - The destination height of the trimmed frame for display.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Frame.js, line 129 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    - Parse a Sprite Sheet and extract the animation frame data from it. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    game - - -Phaser.Game - - - - - - - - - - - - A reference to the currently running game.
    key - - -string - - - - - - - - - - - - The Game.Cache asset key of the Sprite Sheet image.
    frameWidth - - -number - - - - - - - - - - - - The fixed width of each frame of the animation.
    frameHeight - - -number - - - - - - - - - - - - The fixed height of each frame of the animation.
    frameMax - - -number - - - - - - <optional>
    - - - - - -
    - - -1 - - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Parser.js, line 15 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - A FrameData object containing the parsed frames. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - -
    - - - -
    -

    stop(resetFrame)

    - - -
    -
    - - -
    - Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    resetFrame - - -boolean - - - - - - <optional>
    - - - - - -
    - - false - - If true after the animation stops the currentFrame value will be set to the first frame in this animation.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 179 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    stop(name, resetFrame)

    - - -
    -
    - - -
    - Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. The currentAnim property of the AnimationManager is automatically set to the animation given. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    name - - -string - - - - - - <optional>
    - - - - - -
    - - null - - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped.
    resetFrame - - -boolean - - - - - - <optional>
    - - - - - -
    - - false - - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false)
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/AnimationManager.js, line 188 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    total() → {Number}

    - - -
    -
    - - -
    - Returns the total number of frames in this FrameData set. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/FrameData.js, line 226 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - The total number of frames in this FrameData set. -
    - - - -
    -
    - Type -
    -
    - -Number - - -
    -
    - - - - -
    - - - -
    -

    update()

    - - -
    -
    - - -
    - Updates this animation. Called automatically by the AnimationManager. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Animation.js, line 199 -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - - -
    -

    <protected> update() → {boolean}

    - - -
    -
    - - -
    - The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/AnimationManager.js, line 218 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - True if a new animation frame has been set, otherwise false. -
    - - - -
    -
    - Type -
    -
    - -boolean - - -
    -
    - - - - -
    - - - -
    -

    validateFrames(frames, useNumericIndex) → {boolean}

    - - -
    -
    - - -
    - Check whether the frames in the given array are valid and exist. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    frames - - -Array - - - - - - - - - - - - An array of frames to be validated.
    useNumericIndex - - -boolean - - - - - - <optional>
    - - - - - -
    - - true - - Validate the frames based on their numeric index (true) or string index (false)
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/AnimationManager.js, line 124 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - True if all given Frames are valid, otherwise false. -
    - - - -
    -
    - Type -
    -
    - -boolean - - -
    -
    - - - - -
    - - - -
    -

    XMLData(game, xml, cacheKey) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    - Parse the XML data and extract the animation frame data from it. -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - - A reference to the currently running game.
    xml - - -Object - - - - The XML data from the Texture Atlas. Must be in Starling XML format.
    cacheKey - - -string - - - - The Game.Cache asset key of the texture image.
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    • - animation/Parser.js, line 241 -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    - A FrameData object containing the parsed frames. -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - -
    @@ -4501,13 +290,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:05:08 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:30 GMT+0100 (BST)
    diff --git a/Docs/out/index.html b/Docs/out/index.html index baad952e..bb7dcca2 100644 --- a/Docs/out/index.html +++ b/Docs/out/index.html @@ -48,13 +48,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
    diff --git a/Docs/out/module-Phaser.html b/Docs/out/module-Phaser.html index b711810a..7d5d6aba 100644 --- a/Docs/out/module-Phaser.html +++ b/Docs/out/module-Phaser.html @@ -105,13 +105,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:09:01 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST)
    diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 22f6faa6..15765ac3 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -65,6 +65,7 @@ Phaser.AnimationManager.prototype = { * This is called automatically when a new Sprite is created. * * @method loadFrameData + * @memberof Phaser.AnimationManager * @private * @param {Phaser.Animation.FrameData} frameData - The FrameData set to load. */ @@ -80,6 +81,7 @@ Phaser.AnimationManager.prototype = { * Animations added in this way are played back with the play function. * * @method add + * @memberof Phaser.AnimationManager * @param {string} name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". * @param {Array} [frames=null] - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. * @param {number} [frameRate=60] - The speed at which the animation should play. The speed is given in frames per second. @@ -125,6 +127,7 @@ Phaser.AnimationManager.prototype = { * Check whether the frames in the given array are valid and exist. * * @method validateFrames + * @memberof Phaser.AnimationManager * @param {Array} frames - An array of frames to be validated. * @param {boolean} [useNumericIndex=true] - Validate the frames based on their numeric index (true) or string index (false) * @return {boolean} True if all given Frames are valid, otherwise false. @@ -160,6 +163,7 @@ Phaser.AnimationManager.prototype = { * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * * @method play + * @memberof Phaser.AnimationManager * @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump". * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. @@ -190,6 +194,7 @@ Phaser.AnimationManager.prototype = { * The currentAnim property of the AnimationManager is automatically set to the animation given. * * @method stop + * @memberof Phaser.AnimationManager * @param {string} [name=null] - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. * @param {boolean} [resetFrame=false] - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) */ @@ -219,6 +224,7 @@ Phaser.AnimationManager.prototype = { * The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. * * @method update + * @memberof Phaser.AnimationManager * @protected * @return {boolean} True if a new animation frame has been set, otherwise false. */ @@ -244,6 +250,7 @@ Phaser.AnimationManager.prototype = { * Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. * * @method destroy + * @memberof Phaser.AnimationManager */ destroy: function () { @@ -258,6 +265,7 @@ Phaser.AnimationManager.prototype = { }; /** +* @memberof Phaser.AnimationManager * @return {Phaser.Animation.FrameData} Returns the FrameData of the current animation. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", { @@ -269,6 +277,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameData", { }); /** +* @memberof Phaser.AnimationManager * @return {number} Returns the total number of frames in the loaded FrameData, or -1 if no FrameData is loaded. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { @@ -288,8 +297,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameTotal", { }); /** +* @memberof Phaser.AnimationManager * @return {boolean} Returns the paused state of the current animation. *//** +* @memberof Phaser.AnimationManager * @param {boolean} value - Sets the paused state of the current animation. */ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { @@ -309,8 +320,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "paused", { }); /** +* @memberof Phaser.AnimationManager * @return {number} Returns the index of the current frame. *//** +* @memberof Phaser.AnimationManager * @param {number} value - Sets the current frame on the Sprite and updates the texture cache for display. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { @@ -339,8 +352,10 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { }); /** +* @memberof Phaser.AnimationManager * @return {string} Returns the name of the current frame if it has one. *//** +* @memberof Phaser.AnimationManager * @param {string} value - Sets the current frame on the Sprite and updates the texture cache for display. */ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { diff --git a/src/animation/Frame.js b/src/animation/Frame.js index f3f243ea..bc160d08 100644 --- a/src/animation/Frame.js +++ b/src/animation/Frame.js @@ -71,7 +71,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { this.distance = Phaser.Math.distance(0, 0, width, height); /** - * @property {bool} rotated - Rotated? (not yet implemented) + * @property {boolean} rotated - Rotated? (not yet implemented) * @default */ this.rotated = false; @@ -83,7 +83,7 @@ Phaser.Animation.Frame = function (index, x, y, width, height, name, uuid) { this.rotationDirection = 'cw'; /** - * @property {bool} trimmed - Was it trimmed when packed? + * @property {boolean} trimmed - Was it trimmed when packed? * @default */ this.trimmed = false; @@ -130,7 +130,8 @@ Phaser.Animation.Frame.prototype = { * If the frame was trimmed when added to the Texture Atlas this records the trim and source data. * * @method setTrim - * @param {bool} trimmed - If this frame was trimmed or not. + * @memberof Phaser.Animation.Frame + * @param {boolean} trimmed - If this frame was trimmed or not. * @param {number} actualWidth - The width of the frame before being trimmed. * @param {number} actualHeight - The height of the frame before being trimmed. * @param {number} destX - The destination X position of the trimmed frame for display. diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index 96ac86a0..50551db1 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -34,6 +34,7 @@ Phaser.Animation.FrameData.prototype = { * Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. * * @method addFrame + * @memberof Phaser.Animation.FrameData * @param {Phaser.Animation.Frame} frame - The frame to add to this FrameData set. * @return {Phaser.Animation.Frame} The frame that was just added. */ @@ -56,6 +57,7 @@ Phaser.Animation.FrameData.prototype = { * Get a Frame by its numerical index. * * @method getFrame + * @memberof Phaser.Animation.FrameData * @param {number} index - The index of the frame you want to get. * @return {Phaser.Animation.Frame} The frame, if found. */ @@ -74,6 +76,7 @@ Phaser.Animation.FrameData.prototype = { * Get a Frame by its frame name. * * @method getFrameByName + * @memberof Phaser.Animation.FrameData * @param {string} name - The name of the frame you want to get. * @return {Phaser.Animation.Frame} The frame, if found. */ @@ -92,6 +95,7 @@ Phaser.Animation.FrameData.prototype = { * Check if there is a Frame with the given name. * * @method checkFrameName + * @memberof Phaser.Animation.FrameData * @param {string} name - The name of the frame you want to check. * @return {boolean} True if the frame is found, otherwise false. */ @@ -110,6 +114,7 @@ Phaser.Animation.FrameData.prototype = { * Returns a range of frames based on the given start and end frame indexes and returns them in an Array. * * @method getFrameRange + * @memberof Phaser.Animation.FrameData * @param {number} start - The starting frame index. * @param {number} end - The ending frame index. * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. @@ -133,6 +138,7 @@ Phaser.Animation.FrameData.prototype = { * The frames are returned in the output array, or if none is provided in a new Array object. * * @method getFrames + * @memberof Phaser.Animation.FrameData * @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false) * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. @@ -180,6 +186,7 @@ Phaser.Animation.FrameData.prototype = { * The frames indexes are returned in the output array, or if none is provided in a new Array object. * * @method getFrameIndexes + * @memberof Phaser.Animation.FrameData * @param {Array} frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. * @param {boolean} [useNumericIndex=true] - Are the given frames using numeric indexes (default) or strings? (false) * @param {Array} [output] - If given the results will be appended to the end of this array otherwise a new array will be created. @@ -227,7 +234,8 @@ Object.defineProperty(Phaser.Animation.FrameData.prototype, "total", { * Returns the total number of frames in this FrameData set. * * @method total - * @return {Number} The total number of frames in this FrameData set. + * @memberof Phaser.Animation.FrameData + * @return {number} The total number of frames in this FrameData set. */ get: function () { return this._frames.length; diff --git a/src/animation/Parser.js b/src/animation/Parser.js index ca7c0827..b8e2b8ed 100644 --- a/src/animation/Parser.js +++ b/src/animation/Parser.js @@ -16,6 +16,7 @@ Phaser.Animation.Parser = { * Parse a Sprite Sheet and extract the animation frame data from it. * * @method spriteSheet + * @memberof Phaser.Animation.Parser * @param {Phaser.Game} game - A reference to the currently running game. * @param {string} key - The Game.Cache asset key of the Sprite Sheet image. * @param {number} frameWidth - The fixed width of each frame of the animation. @@ -97,6 +98,7 @@ Phaser.Animation.Parser = { * Parse the JSON data and extract the animation frame data from it. * * @method JSONData + * @memberof Phaser.Animation.Parser * @param {Phaser.Game} game - A reference to the currently running game. * @param {Object} json - The JSON data from the Texture Atlas. Must be in Array format. * @param {string} cacheKey - The Game.Cache asset key of the texture image. @@ -168,6 +170,7 @@ Phaser.Animation.Parser = { * Parse the JSON data and extract the animation frame data from it. * * @method JSONDataHash + * @memberof Phaser.Animation.Parser * @param {Phaser.Game} game - A reference to the currently running game. * @param {Object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format. * @param {string} cacheKey - The Game.Cache asset key of the texture image. @@ -242,6 +245,7 @@ Phaser.Animation.Parser = { * Parse the XML data and extract the animation frame data from it. * * @method XMLData + * @memberof Phaser.Animation.Parser * @param {Phaser.Game} game - A reference to the currently running game. * @param {Object} xml - The XML data from the Texture Atlas. Must be in Starling XML format. * @param {string} cacheKey - The Game.Cache asset key of the texture image. diff --git a/src/core/Camera.js b/src/core/Camera.js index c2ee4286..2ca65f10 100644 --- a/src/core/Camera.js +++ b/src/core/Camera.js @@ -58,13 +58,13 @@ Phaser.Camera = function (game, id, x, y, width, height) { this.deadzone = null; /** - * @property {bool} visible - Whether this camera is visible or not. + * @property {boolean} visible - Whether this camera is visible or not. * @default */ this.visible = true; /** - * @property {bool} atLimit - Whether this camera is flush with the World Bounds or not. + * @property {boolean} atLimit - Whether this camera is flush with the World Bounds or not. */ this.atLimit = { x: false, y: false }; @@ -93,6 +93,7 @@ Phaser.Camera.prototype = { /** * Tells this camera which sprite to follow. * @method follow + * @memberOf Phaser.Camera * @param {Phaser.Sprite} target - The object you want the camera to track. Set to null to not follow anything. * @param {number} [style] Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). */ @@ -133,6 +134,7 @@ Phaser.Camera.prototype = { /** * Move the camera focus to a location instantly. * @method focusOnXY + * @memberOf Phaser.Camera * @param {number} x - X position. * @param {number} y - Y position. */ @@ -146,6 +148,7 @@ Phaser.Camera.prototype = { /** * Update focusing and scrolling. * @method update + * @memberOf Phaser.Camera */ update: function () { @@ -196,6 +199,7 @@ Phaser.Camera.prototype = { /** * Method called to ensure the camera doesn't venture outside of the game world. * @method checkWorldBounds + * @memberOf Phaser.Camera */ checkWorldBounds: function () { @@ -236,6 +240,7 @@ Phaser.Camera.prototype = { * without having to use game.camera.x and game.camera.y. * * @method setPosition + * @memberOf Phaser.Camera * @param {number} x - X position. * @param {number} y - Y position. */ @@ -251,6 +256,7 @@ Phaser.Camera.prototype = { * Sets the size of the view rectangle given the width and height in parameters. * * @method setSize + * @memberOf Phaser.Camera * @param {number} width - The desired width. * @param {number} height - The desired height. */ diff --git a/src/core/Game.js b/src/core/Game.js index 6492b9d1..92874a6c 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -20,8 +20,8 @@ * @param {number} renderer -Which renderer to use (canvas or webgl) * @param {HTMLElement} parent -The Games DOM parent. * @param {Description} state - Description. -* @param {bool} transparent - Use a transparent canvas background or not. -* @param {bool} antialias - Anti-alias graphics. +* @param {boolean} transparent - Use a transparent canvas background or not. +* @param {boolean} antialias - Anti-alias graphics. */ Phaser.Game = function (width, height, renderer, parent, state, transparent, antialias) { @@ -56,12 +56,12 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant this.height = height; /** - * @property {bool} transparent - Use a transparent canvas background or not. + * @property {boolean} transparent - Use a transparent canvas background or not. */ this.transparent = transparent; /** - * @property {bool} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality). + * @property {boolean} antialias - Anti-alias graphics (in WebGL this helps with edges, in Canvas2D it retains pixel-art quality). */ this.antialias = antialias; @@ -77,7 +77,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant this.state = new Phaser.StateManager(this, state); /** - * @property {bool} _paused - Is game paused? + * @property {boolean} _paused - Is game paused? * @private * @default */ @@ -89,20 +89,20 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant this.renderType = renderer; /** - * @property {bool} _loadComplete - Whether load complete loading or not. + * @property {boolean} _loadComplete - Whether load complete loading or not. * @private * @default */ this._loadComplete = false; /** - * @property {bool} isBooted - Whether the game engine is booted, aka available. + * @property {boolean} isBooted - Whether the game engine is booted, aka available. * @default */ this.isBooted = false; /** - * @property {bool} id -Is game running or paused? + * @property {boolean} id -Is game running or paused? * @default */ this.isRunning = false; @@ -253,6 +253,7 @@ Phaser.Game.prototype = { * Initialize engine sub modules and start the game. * * @method boot + * @memberOf Phaser.Game */ boot: function () { @@ -333,6 +334,7 @@ Phaser.Game.prototype = { * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. * * @method setUpRenderer + * @memberOf Phaser.Game */ setUpRenderer: function () { @@ -369,6 +371,7 @@ Phaser.Game.prototype = { * Called when the load has finished, after preload was run. * * @method loadComplete + * @memberOf Phaser.Game */ loadComplete: function () { @@ -382,6 +385,7 @@ Phaser.Game.prototype = { * The core game loop. * * @method update + * @memberOf Phaser.Game * @param {number} time - The current time as provided by RequestAnimationFrame. */ update: function (time) { @@ -416,6 +420,7 @@ Phaser.Game.prototype = { * Nuke the entire game from orbit * * @method destroy + * @memberOf Phaser.Game */ destroy: function () { diff --git a/src/core/Group.js b/src/core/Group.js index 4e17ff85..e7698e8b 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -8,13 +8,12 @@ /** * Phaser Group constructor. * @class Phaser.Group -* @classdesc An Animation instance contains a single animation and the controls to play it. -* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. +* @classdesc A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * @constructor * @param {Phaser.Game} game - A reference to the currently running game. * @param {Description} parent - Description. * @param {string} name - The unique name for this animation, used in playback commands. -* @param {bool} useStage - Description. +* @param {boolean} useStage - Description. */ Phaser.Group = function (game, parent, name, useStage) { @@ -67,7 +66,7 @@ Phaser.Group = function (game, parent, name, useStage) { this.type = Phaser.GROUP; /** - * @property {bool} exists - Description. + * @property {boolean} exists - Description. * @default */ this.exists = true; @@ -87,6 +86,7 @@ Phaser.Group.prototype = { * Description. * * @method add + * @memberOf Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -112,6 +112,7 @@ Phaser.Group.prototype = { * Description. * * @method addAt + * @memberOf Phaser.Group * @param {Description} child - Description. * @param {Description} index - Description. * @return {Description} Description. @@ -138,6 +139,7 @@ Phaser.Group.prototype = { * Description. * * @method getAt + * @memberOf Phaser.Group * @param {Description} index - Description. * @return {Description} Description. */ @@ -151,6 +153,7 @@ Phaser.Group.prototype = { * Description. * * @method create + * @memberOf Phaser.Group * @param {number} x - Description. * @param {number} y - Description. * @param {string} key - Description. @@ -182,9 +185,10 @@ Phaser.Group.prototype = { * Description. * * @method swap + * @memberOf Phaser.Group * @param {Description} child1 - Description. * @param {Description} child2 - Description. - * @return {bool} Description. + * @return {boolean} Description. */ swap: function (child1, child2) { @@ -310,6 +314,7 @@ Phaser.Group.prototype = { * Description. * * @method bringToTop + * @memberOf Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -329,6 +334,7 @@ Phaser.Group.prototype = { * Description. * * @method getIndex + * @memberOf Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -342,6 +348,7 @@ Phaser.Group.prototype = { * Description. * * @method replace + * @memberOf Phaser.Group * @param {Description} oldChild - Description. * @param {Description} newChild - Description. */ @@ -373,6 +380,7 @@ Phaser.Group.prototype = { * Description. * * @method setProperty + * @memberOf Phaser.Group * @param {Description} child - Description. * @param {array} key - An array of values that will be set. * @param {Description} value - Description. @@ -436,6 +444,7 @@ Phaser.Group.prototype = { * Description. * * @method setAll + * @memberOf Phaser.Group * @param {Description} key - Description. * @param {Description} value - Description. * @param {Description} checkAlive - Description. @@ -474,6 +483,7 @@ Phaser.Group.prototype = { * Group.addAll('x', 10) will add 10 to the child.x value. * * @method addAll + * @memberOf Phaser.Group * @param {string} property - The property to increment, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -490,6 +500,7 @@ Phaser.Group.prototype = { * Group.subAll('x', 10) will minus 10 from the child.x value. * * @method subAll + * @memberOf Phaser.Group * @param {string} property - The property to decrement, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -506,6 +517,7 @@ Phaser.Group.prototype = { * Group.multiplyAll('x', 2) will x2 the child.x value. * * @method multiplyAll + * @memberOf Phaser.Group * @param {string} property - The property to multiply, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -522,6 +534,7 @@ Phaser.Group.prototype = { * Group.divideAll('x', 2) will half the child.x value. * * @method divideAll + * @memberOf Phaser.Group * @param {string} property - The property to divide, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -538,6 +551,7 @@ Phaser.Group.prototype = { * After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. * * @method callAllExists + * @memberOf Phaser.Group * @param {function} callback - The function that exists on the children that will be called. * @param {boolean} existsValue - Only children with exists=existsValue will be called. * @param {...*} parameter - Additional parameters that will be passed to the callback. @@ -570,6 +584,7 @@ Phaser.Group.prototype = { * After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child. * * @method callAll + * @memberOf Phaser.Group * @param {function} callback - The function that exists on the children that will be called. * @param {...*} parameter - Additional parameters that will be passed to the callback. */ @@ -601,9 +616,10 @@ Phaser.Group.prototype = { * After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. * * @method forEach + * @memberOf Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. - * @param {bool} checkExists - Description. + * @param {boolean} checkExists - Description. */ forEach: function (callback, callbackContext, checkExists) { @@ -639,6 +655,7 @@ Phaser.Group.prototype = { * Description. * * @method forEachAlive + * @memberOf Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. */ @@ -671,6 +688,7 @@ Phaser.Group.prototype = { * Description. * * @method forEachDead + * @memberOf Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. */ @@ -702,6 +720,7 @@ Phaser.Group.prototype = { * Call this function to retrieve the first object with exists == (the given state) in the group. * * @method getFirstExists + * @memberOf Phaser.Group * @param {Description} state - Description. * @return {Any} The first child, or null if none found. */ @@ -737,6 +756,7 @@ Phaser.Group.prototype = { * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * * @method getFirstAlive + * @memberOf Phaser.Group * @return {Any} The first alive child, or null if none found. */ getFirstAlive: function () { @@ -766,6 +786,7 @@ Phaser.Group.prototype = { * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * * @method getFirstDead + * @memberOf Phaser.Group * @return {Any} The first dead child, or null if none found. */ getFirstDead: function () { @@ -794,6 +815,7 @@ Phaser.Group.prototype = { * Call this function to find out how many members of the group are alive. * * @method countLiving + * @memberOf Phaser.Group * @return {number} The number of children flagged as alive. Returns -1 if Group is empty. */ countLiving: function () { @@ -824,6 +846,7 @@ Phaser.Group.prototype = { * Call this function to find out how many members of the group are dead. * * @method countDead + * @memberOf Phaser.Group * @return {number} The number of children flagged as dead. Returns -1 if Group is empty. */ countDead: function () { @@ -853,6 +876,8 @@ Phaser.Group.prototype = { /** * Returns a member at random from the group. * + * @method getRandom + * @memberOf Phaser.Group * @param {number} startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. * @param {number} length - Optional restriction on the number of values you want to randomly select from. * @return {Any} A random child of this Group. @@ -875,6 +900,7 @@ Phaser.Group.prototype = { * Description. * * @method remove + * @memberOf Phaser.Group * @param {Description} child - Description. */ remove: function (child) { @@ -889,6 +915,7 @@ Phaser.Group.prototype = { * Description. * * @method removeAll + * @memberOf Phaser.Group */ removeAll: function () { @@ -913,6 +940,7 @@ Phaser.Group.prototype = { * Description. * * @method removeBetween + * @memberOf Phaser.Group * @param {Description} startIndex - Description. * @param {Description} endIndex - Description. */ @@ -941,6 +969,7 @@ Phaser.Group.prototype = { * Description. * * @method destroy + * @memberOf Phaser.Group */ destroy: function () { @@ -960,6 +989,7 @@ Phaser.Group.prototype = { * Description. * * @method dump + * @memberOf Phaser.Group */ dump: function (full) { diff --git a/src/core/Plugin.js b/src/core/Plugin.js index 4b5374d3..00f247f9 100644 --- a/src/core/Plugin.js +++ b/src/core/Plugin.js @@ -29,37 +29,37 @@ Phaser.Plugin = function (game, parent) { this.parent = parent; /** - * @property {bool} active - Description. + * @property {boolean} active - Description. * @default */ this.active = false; /** - * @property {bool} visible - Description. + * @property {boolean} visible - Description. * @default */ this.visible = false; /** - * @property {bool} hasPreUpdate - Description. + * @property {boolean} hasPreUpdate - Description. * @default */ this.hasPreUpdate = false; /** - * @property {bool} hasUpdate - Description. + * @property {boolean} hasUpdate - Description. * @default */ this.hasUpdate = false; /** - * @property {bool} hasRender - Description. + * @property {boolean} hasRender - Description. * @default */ this.hasRender = false; /** - * @property {bool} hasPostRender - Description. + * @property {boolean} hasPostRender - Description. * @default */ this.hasPostRender = false; diff --git a/src/core/Signal.js b/src/core/Signal.js index 5502d0ec..f517427e 100644 --- a/src/core/Signal.js +++ b/src/core/Signal.js @@ -47,13 +47,13 @@ Phaser.Signal.prototype = { * If Signal should keep record of previously dispatched parameters and * automatically execute listener during `add()`/`addOnce()` if Signal was * already dispatched before. - * @property {bool} memorize + * @property {boolean} memorize */ memorize: false, /** * Description. - * @property {bool} _shouldPropagate + * @property {boolean} _shouldPropagate * @private */ _shouldPropagate: true, @@ -61,7 +61,7 @@ Phaser.Signal.prototype = { /** * If Signal is active and should broadcast events. *

    IMPORTANT: Setting this property during a dispatch will only affect the next dispatch, if you want to stop the propagation of a signal use `halt()` instead.

    - * @property {bool} active + * @property {boolean} active * @default */ active: true, @@ -84,7 +84,7 @@ Phaser.Signal.prototype = { * * @method _registerListener * @param {function} listener - Signal handler function. - * @param {bool} isOnce - Description. + * @param {boolean} isOnce - Description. * @param {object} [listenerContext] - Description. * @param {number} [priority] - The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0). * @return {Phaser.SignalBinding} An Object representing the binding between the Signal and listener. @@ -152,7 +152,7 @@ Phaser.Signal.prototype = { * @method has * @param {Function} listener - Signal handler function. * @param {Object} [context] - Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @return {bool} If Signal has the specified listener. + * @return {boolean} If Signal has the specified listener. */ has: function (listener, context) { return this._indexOfListener(listener, context) !== -1; diff --git a/src/core/SignalBinding.js b/src/core/SignalBinding.js index e61b31a2..6864a302 100644 --- a/src/core/SignalBinding.js +++ b/src/core/SignalBinding.js @@ -20,7 +20,7 @@ * @inner * @param {Signal} signal - Reference to Signal object that listener is currently bound to. * @param {function} listener - Handler function bound to the signal. -* @param {bool} isOnce - If binding should be executed just once. +* @param {boolean} isOnce - If binding should be executed just once. * @param {object} [listenerContext] - Context on which listener will be executed (object that should represent the `this` variable inside listener function). * @param {number} [priority] - The priority level of the event listener. (default = 0). */ @@ -33,7 +33,7 @@ Phaser.SignalBinding = function (signal, listener, isOnce, listenerContext, prio this._listener = listener; /** - * @property {bool} _isOnce - If binding should be executed just once. + * @property {boolean} _isOnce - If binding should be executed just once. * @private */ this._isOnce = isOnce; @@ -62,7 +62,7 @@ Phaser.SignalBinding.prototype = { /** * If binding is active and should be executed. - * @property {bool} active + * @property {boolean} active * @default */ active: true, @@ -112,7 +112,7 @@ Phaser.SignalBinding.prototype = { /** * @method isBound - * @return {bool} True if binding is still bound to the signal and has a listener. + * @return {boolean} True if binding is still bound to the signal and has a listener. */ isBound: function () { return (!!this._signal && !!this._listener); @@ -120,7 +120,7 @@ Phaser.SignalBinding.prototype = { /** * @method isOnce - * @return {bool} If SignalBinding will only be executed once. + * @return {boolean} If SignalBinding will only be executed once. */ isOnce: function () { return this._isOnce; diff --git a/src/core/StateManager.js b/src/core/StateManager.js index 3bbf58d2..bacadd3b 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -51,7 +51,7 @@ Phaser.StateManager.prototype = { /** * Flag that sets if the State has been created or not. - * @property {bool}_created + * @property {boolean}_created * @private */ _created: false, @@ -160,7 +160,7 @@ Phaser.StateManager.prototype = { * @method add * @param key {string} - A unique key you use to reference this state, i.e. "MainMenu", "Level1". * @param state {State} - The state you want to switch to. - * @param autoStart {bool} - Start the state immediately after creating it? (default true) + * @param autoStart {boolean} - Start the state immediately after creating it? (default true) */ add: function (key, state, autoStart) { @@ -241,8 +241,8 @@ Phaser.StateManager.prototype = { * Start the given state * @method start * @param {string} key - The key of the state you want to start. - * @param {bool} [clearWorld] - clear everything in the world? (Default to true) - * @param {bool} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true) + * @param {boolean} [clearWorld] - clear everything in the world? (Default to true) + * @param {boolean} [clearCache] - clear asset cache? (Default to false and ONLY available when clearWorld=true) */ start: function (key, clearWorld, clearCache) { @@ -327,7 +327,7 @@ Phaser.StateManager.prototype = { * Description. * @method checkState * @param {string} key - The key of the state you want to check. - * @return {bool} Description. + * @return {boolean} Description. */ checkState: function (key) { diff --git a/src/core/World.js b/src/core/World.js index 585be20d..efa8d25a 100644 --- a/src/core/World.js +++ b/src/core/World.js @@ -170,7 +170,7 @@ Object.defineProperty(Phaser.World.prototype, "width", { /** * @method width - * @return {Number} The current width of the game world + * @return {number} The current width of the game world */ get: function () { return this.bounds.width; @@ -178,7 +178,7 @@ Object.defineProperty(Phaser.World.prototype, "width", { /** * @method width - * @return {Number} Sets the width of the game world + * @return {number} Sets the width of the game world */ set: function (value) { this.bounds.width = value; diff --git a/src/gameobjects/BitmapText.js b/src/gameobjects/BitmapText.js index 0f5ec0a4..b58c1b32 100644 --- a/src/gameobjects/BitmapText.js +++ b/src/gameobjects/BitmapText.js @@ -26,13 +26,13 @@ Phaser.BitmapText = function (game, x, y, text, style) { style = style || ''; /** - * @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. + * @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. * @default */ this.exists = true; /** - * @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. + * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. * @default */ this.alive = true; @@ -112,7 +112,7 @@ Phaser.BitmapText = function (game, x, y, text, style) { this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); /** - * @property {bool} renderable - Description. + * @property {boolean} renderable - Description. * @private */ this.renderable = true; diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index b5d671c9..00d8406a 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -44,7 +44,7 @@ Phaser.GameObjectFactory.prototype = { * Description. * @method existing. * @param {object} - Description. - * @return {bool} Description. + * @return {boolean} Description. */ existing: function (object) { diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 4f2ec955..afd024a5 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -29,13 +29,13 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.game = game; /** - * @property {bool} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. + * @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all. * @default */ this.exists = true; /** - * @property {bool} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. + * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering. * @default */ this.alive = true; @@ -174,7 +174,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { * Note that this check doesn't look at this Sprites children, which may still be in camera range. * So you should set autoCull to false if the Sprite will have children likely to still be in camera range. * - * @property {bool} autoCull + * @property {boolean} autoCull * @default */ this.autoCull = false; @@ -290,7 +290,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.inWorldThreshold = 0; /** - * @property {bool} _outOfBoundsFired - Description. + * @property {boolean} _outOfBoundsFired - Description. * @private * @default */ @@ -649,7 +649,7 @@ Phaser.Sprite.prototype.getBounds = function(rect) { * * @method play * @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". -* @param {Number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. * @param {Boolean} [loop=null] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. * @return {Phaser.Animation} A reference to playing Animation instance. */ @@ -714,7 +714,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { /** * Is this sprite visible to the camera or not? -* @returns {bool} +* @returns {boolean} */ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index 41bbd9f3..632e54ed 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -25,14 +25,14 @@ Phaser.Text = function (game, x, y, text, style) { // If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all /** - * @property {bool} exists - Description. + * @property {boolean} exists - Description. * @default */ this.exists = true; // This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering /** - * @property {bool} alive - Description. + * @property {boolean} alive - Description. * @default */ this.alive = true; @@ -111,7 +111,7 @@ Phaser.Text = function (game, x, y, text, style) { this._cache.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); /** - * @property {bool} renderable - Description. + * @property {boolean} renderable - Description. */ this.renderable = true; diff --git a/src/geom/Circle.js b/src/geom/Circle.js index e8e93b0b..9e4752cc 100644 --- a/src/geom/Circle.js +++ b/src/geom/Circle.js @@ -107,7 +107,7 @@ Phaser.Circle.prototype = { * (can be Circle, Point or anything with x/y properties) * @method distance * @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param {bool} [round] - Round the distance to the nearest integer (default false). + * @param {boolean} [round] - Round the distance to the nearest integer (default false). * @return {number} The distance between this Point object and the destination Point object. */ distance: function (dest, round) { @@ -144,7 +144,7 @@ Phaser.Circle.prototype = { * @method contains * @param {number} x - The X value of the coordinate to test. * @param {number} y - The Y value of the coordinate to test. - * @return {bool} True if the coordinates are within this circle, otherwise false. + * @return {boolean} True if the coordinates are within this circle, otherwise false. */ contains: function (x, y) { return Phaser.Circle.contains(this, x, y); @@ -154,7 +154,7 @@ Phaser.Circle.prototype = { * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. * @method circumferencePoint * @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from. - * @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)? + * @param {boolean} asDegrees - Is the given angle in radians (false) or degrees (true)? * @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created. * @return {Phaser.Point} The Point object holding the result. */ @@ -214,7 +214,7 @@ Object.defineProperty(Phaser.Circle.prototype, "diameter", { /** * The diameter of the circle. The largest distance between any two points on the circle. The same as the radius * 2. * @method diameter - * @param {Number} The diameter of the circle. + * @param {number} The diameter of the circle. **/ set: function (value) { if (value > 0) { @@ -362,7 +362,7 @@ Object.defineProperty(Phaser.Circle.prototype, "area", { /** * Determines whether or not this Circle object is empty. -* @return {bool} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. +* @return {boolean} A value of true if the Circle objects diameter is less than or equal to 0; otherwise false. *//** * Sets all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. * @param {Description} value - Description. @@ -392,7 +392,7 @@ Object.defineProperty(Phaser.Circle.prototype, "empty", { * @param {Phaser.Circle} a - The Circle to be checked. * @param {number} x - The X value of the coordinate to test. * @param {number} y - The Y value of the coordinate to test. -* @return {bool} True if the coordinates are within this circle, otherwise false. +* @return {boolean} True if the coordinates are within this circle, otherwise false. */ Phaser.Circle.contains = function (a, x, y) { @@ -415,7 +415,7 @@ Phaser.Circle.contains = function (a, x, y) { * @method equals * @param {Phaser.Circle} a - The first Circle object. * @param {Phaser.Circle} b - The second Circle object. -* @return {bool} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. +* @return {boolean} A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. */ Phaser.Circle.equals = function (a, b) { return (a.x == b.x && a.y == b.y && a.diameter == b.diameter); @@ -427,7 +427,7 @@ Phaser.Circle.equals = function (a, b) { * @method intersects * @param {Phaser.Circle} a - The first Circle object. * @param {Phaser.Circle} b - The second Circle object. -* @return {bool} A value of true if the specified object intersects with this Circle object; otherwise false. +* @return {boolean} A value of true if the specified object intersects with this Circle object; otherwise false. */ Phaser.Circle.intersects = function (a, b) { return (Phaser.Math.distance(a.x, a.y, b.x, b.y) <= (a.radius + b.radius)); @@ -438,7 +438,7 @@ Phaser.Circle.intersects = function (a, b) { * @method circumferencePoint * @param {Phaser.Circle} a - The first Circle object. * @param {number} angle - The angle in radians (unless asDegrees is true) to return the point from. -* @param {bool} asDegrees - Is the given angle in radians (false) or degrees (true)? +* @param {boolean} asDegrees - Is the given angle in radians (false) or degrees (true)? * @param {Phaser.Point} [out] - An optional Point object to put the result in to. If none specified a new Point object will be created. * @return {Phaser.Point} The Point object holding the result. */ @@ -463,7 +463,7 @@ Phaser.Circle.circumferencePoint = function (a, angle, asDegrees, out) { * @method intersectsRectangle * @param {Phaser.Circle} c - The Circle object to test. * @param {Phaser.Rectangle} r - The Rectangle object to test. -* @return {bool} True if the two objects intersect, otherwise false. +* @return {boolean} True if the two objects intersect, otherwise false. */ Phaser.Circle.intersectsRectangle = function (c, r) { diff --git a/src/geom/Point.js b/src/geom/Point.js index 4133584a..79384f99 100644 --- a/src/geom/Point.js +++ b/src/geom/Point.js @@ -10,8 +10,8 @@ * @class Point * @classdesc The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. * @constructor -* @param {Number} x The horizontal position of this Point (default 0) -* @param {Number} y The vertical position of this Point (default 0) +* @param {number} x The horizontal position of this Point (default 0) +* @param {number} y The vertical position of this Point (default 0) **/ Phaser.Point = function (x, y) { @@ -182,7 +182,7 @@ Phaser.Point.prototype = { * Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) * @method distance * @param {object} dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param {bool} [round] - Round the distance to the nearest integer (default false). + * @param {boolean} [round] - Round the distance to the nearest integer (default false). * @return {number} The distance between this Point object and the destination Point object. */ distance: function (dest, round) { @@ -195,7 +195,7 @@ Phaser.Point.prototype = { * Determines whether the given objects x/y values are equal to this Point object. * @method equals * @param {Phaser.Point} a - The first object to compare. - * @return {bool} A value of true if the Points are equal, otherwise false. + * @return {boolean} A value of true if the Points are equal, otherwise false. */ equals: function (a) { return (a.x == this.x && a.y == this.y); @@ -207,7 +207,7 @@ Phaser.Point.prototype = { * @param {number} x - The x coordinate of the anchor point * @param {number} y - The y coordinate of the anchor point * @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to. - * @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)? + * @param {boolean} asDegrees - Is the given rotation in radians (false) or degrees (true)? * @param {number} [distance] - An optional distance constraint between the Point and the anchor. * @return {Phaser.Point} The modified point object. */ @@ -309,7 +309,7 @@ Phaser.Point.divide = function (a, b, out) { * @method equals * @param {Phaser.Point} a - The first Point object. * @param {Phaser.Point} b - The second Point object. -* @return {bool} A value of true if the Points are equal, otherwise false. +* @return {boolean} A value of true if the Points are equal, otherwise false. */ Phaser.Point.equals = function (a, b) { return (a.x == b.x && a.y == b.y); @@ -320,8 +320,8 @@ Phaser.Point.equals = function (a, b) { * @method distance * @param {object} a - The target object. Must have visible x and y properties that represent the center of the object. * @param {object} b - The target object. Must have visible x and y properties that represent the center of the object. -* @param {bool} [round] - Round the distance to the nearest integer (default false). -* @return {Number} The distance between this Point object and the destination Point object. +* @param {boolean} [round] - Round the distance to the nearest integer (default false). +* @return {number} The distance between this Point object and the destination Point object. */ Phaser.Point.distance = function (a, b, round) { @@ -345,7 +345,7 @@ Phaser.Point.distance = function (a, b, round) { * @param {number} x - The x coordinate of the anchor point * @param {number} y - The y coordinate of the anchor point * @param {number} angle - The angle in radians (unless asDegrees is true) to rotate the Point to. -* @param {bool} asDegrees - Is the given rotation in radians (false) or degrees (true)? +* @param {boolean} asDegrees - Is the given rotation in radians (false) or degrees (true)? * @param {number} distance - An optional distance constraint between the Point and the anchor. * @return {Phaser.Point} The modified point object. */ diff --git a/src/geom/Rectangle.js b/src/geom/Rectangle.js index 1a7894c5..fe499fb6 100644 --- a/src/geom/Rectangle.js +++ b/src/geom/Rectangle.js @@ -168,7 +168,7 @@ Phaser.Rectangle.prototype = { * @method contains * @param {number} x - The x coordinate of the point to test. * @param {number} y - The y coordinate of the point to test. - * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. + * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ contains: function (x, y) { return Phaser.Rectangle.contains(this, x, y); @@ -179,7 +179,7 @@ Phaser.Rectangle.prototype = { * A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. * @method containsRect * @param {Phaser.Rectangle} b - The second Rectangle object. - * @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. + * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ containsRect: function (b) { return Phaser.Rectangle.containsRect(this, b); @@ -190,7 +190,7 @@ Phaser.Rectangle.prototype = { * This method compares the x, y, width and height properties of each Rectangle. * @method equals * @param {Phaser.Rectangle} b - The second Rectangle object. - * @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. + * @return {boolean} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ equals: function (b) { return Phaser.Rectangle.equals(this, b); @@ -213,7 +213,7 @@ Phaser.Rectangle.prototype = { * @method intersects * @param {Phaser.Rectangle} b - The second Rectangle object. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0. - * @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false. + * @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ intersects: function (b, tolerance) { return Phaser.Rectangle.intersects(this, b, tolerance); @@ -227,7 +227,7 @@ Phaser.Rectangle.prototype = { * @param {number} top - Description. * @param {number} bottomt - Description. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 - * @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false. + * @return {boolean} A value of true if the specified object intersects with the Rectangle; otherwise false. */ intersectsRaw: function (left, right, top, bottom, tolerance) { return Phaser.Rectangle.intersectsRaw(this, left, right, top, bottom, tolerance); @@ -483,7 +483,7 @@ Object.defineProperty(Phaser.Rectangle.prototype, "topLeft", { /** * Determines whether or not this Rectangle object is empty. -* @return {bool} +* @return {boolean} *//** * Sets all of the Rectangle object's properties to 0. A Rectangle object is empty if its width or height is less than or equal to 0. * @param {Description} value @@ -506,8 +506,8 @@ Object.defineProperty(Phaser.Rectangle.prototype, "empty", { * Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. * @method inflate * @param {Phaser.Rectangle} a - The Rectangle object. -* @param {Number} dx - The amount to be added to the left side of the Rectangle. -* @param {Number} dy - The amount to be added to the bottom side of the Rectangle. +* @param {number} dx - The amount to be added to the left side of the Rectangle. +* @param {number} dy - The amount to be added to the bottom side of the Rectangle. * @return {Phaser.Rectangle} This Rectangle object. */ Phaser.Rectangle.inflate = function (a, dx, dy) { @@ -559,7 +559,7 @@ Phaser.Rectangle.clone = function (a, output) { * @param {Phaser.Rectangle} a - The Rectangle object. * @param {number} x - The x coordinate of the point to test. * @param {number} y - The y coordinate of the point to test. -* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. +* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.contains = function (a, x, y) { return (x >= a.x && x <= a.right && y >= a.y && y <= a.bottom); @@ -570,7 +570,7 @@ Phaser.Rectangle.contains = function (a, x, y) { * @method containsPoint * @param {Phaser.Rectangle} a - The Rectangle object. * @param {Phaser.Point} point - The point object being checked. Can be Point or any object with .x and .y values. -* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. +* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsPoint = function (a, point) { return Phaser.Phaser.Rectangle.contains(a, point.x, point.y); @@ -582,7 +582,7 @@ Phaser.Rectangle.containsPoint = function (a, point) { * @method containsRect * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. -* @return {bool} A value of true if the Rectangle object contains the specified point; otherwise false. +* @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsRect = function (a, b) { @@ -602,7 +602,7 @@ Phaser.Rectangle.containsRect = function (a, b) { * @method equals * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. -* @return {bool} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. +* @return {boolean} A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ Phaser.Rectangle.equals = function (a, b) { return (a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height); @@ -639,7 +639,7 @@ Phaser.Rectangle.intersection = function (a, b, out) { * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 -* @return {bool} A value of true if the specified object intersects with this Rectangle object; otherwise false. +* @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ Phaser.Rectangle.intersects = function (a, b, tolerance) { @@ -657,7 +657,7 @@ Phaser.Rectangle.intersects = function (a, b, tolerance) { * @param {number} top - Description. * @param {number} bottom - Description. * @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 -* @return {bool} A value of true if the specified object intersects with the Rectangle; otherwise false. +* @return {boolean} A value of true if the specified object intersects with the Rectangle; otherwise false. */ Phaser.Rectangle.intersectsRaw = function (a, left, right, top, bottom, tolerance) { diff --git a/src/input/Input.js b/src/input/Input.js index 9a1ec1ef..4ac153f3 100644 --- a/src/input/Input.js +++ b/src/input/Input.js @@ -86,7 +86,7 @@ Phaser.Input.prototype = { /** * You can disable all Input by setting Input.disabled: true. While set all new input related events will be ignored. * If you need to disable just one type of input, for example mouse, use Input.mouse.disabled: true instead - * @property {bool} disabled + * @property {boolean} disabled * @default */ disabled: false, @@ -182,7 +182,7 @@ Phaser.Input.prototype = { * Sets if the Pointer objects should record a history of x/y coordinates they have passed through. * The history is cleared each time the Pointer is pressed down. * The history is updated at the rate specified in Input.pollRate - * @property {bool} recordPointerHistory + * @property {boolean} recordPointerHistory * @default **/ recordPointerHistory: false, @@ -446,7 +446,7 @@ Phaser.Input.prototype = { /** * Reset all of the Pointers and Input states * @method reset - * @param {bool} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will. + * @param {boolean} hard - A soft reset (hard = false) won't reset any signals that might be bound. A hard reset will. **/ reset: function (hard) { @@ -597,7 +597,7 @@ Phaser.Input.prototype = { /** * Get the next Pointer object whos active property matches the given state * @method getPointer - * @param {bool} state - The state the Pointer should be in (false for inactive, true for active). + * @param {boolean} state - The state the Pointer should be in (false for inactive, true for active). * @return {Pointer} A Pointer object or null if no Pointer object matches the requested state. **/ getPointer: function (state) { diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 4a55dc60..28cb6f03 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -25,7 +25,7 @@ Phaser.InputHandler = function (sprite) { this.sprite = sprite; /** - * @property {bool} enabled - Description. + * @property {boolean} enabled - Description. * @default */ this.enabled = false; @@ -68,31 +68,31 @@ Phaser.InputHandler = function (sprite) { this.priorityID = 0; /** - * @property {bool} useHandCursor - Description. + * @property {boolean} useHandCursor - Description. * @default */ this.useHandCursor = false; /** - * @property {bool} isDragged - Description. + * @property {boolean} isDragged - Description. * @default */ this.isDragged = false; /** - * @property {bool} allowHorizontalDrag - Description. + * @property {boolean} allowHorizontalDrag - Description. * @default */ this.allowHorizontalDrag = true; /** - * @property {bool} allowVerticalDrag - Description. + * @property {boolean} allowVerticalDrag - Description. * @default */ this.allowVerticalDrag = true; /** - * @property {bool} bringToTop - Description. + * @property {boolean} bringToTop - Description. * @default */ this.bringToTop = false; @@ -104,13 +104,13 @@ Phaser.InputHandler = function (sprite) { this.snapOffset = null; /** - * @property {bool} snapOnDrag - Description. + * @property {boolean} snapOnDrag - Description. * @default */ this.snapOnDrag = false; /** - * @property {bool} snapOnRelease - Description. + * @property {boolean} snapOnRelease - Description. * @default */ this.snapOnRelease = false; @@ -140,7 +140,7 @@ Phaser.InputHandler = function (sprite) { this.pixelPerfectAlpha = 255; /** - * @property {bool} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no + * @property {boolean} draggable - Is this sprite allowed to be dragged by the mouse? true = yes, false = no * @default */ this.draggable = false; @@ -160,7 +160,7 @@ Phaser.InputHandler = function (sprite) { /** * If this object is set to consume the pointer event then it will stop all propogation from this object on. * For example if you had a stack of 6 sprites with the same priority IDs and one consumed the event, none of the others would receive it. - * @property {bool} consumePointerEvent + * @property {boolean} consumePointerEvent * @default */ this.consumePointerEvent = false; @@ -197,7 +197,7 @@ Phaser.InputHandler.prototype = { * Description. * @method start * @param {number} priority - Description. - * @param {bool} useHandCursor - Description. + * @param {boolean} useHandCursor - Description. * @return {Phaser.Sprite} Description. */ start: function (priority, useHandCursor) { @@ -348,7 +348,7 @@ Phaser.InputHandler.prototype = { * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true. * @method pointerDown * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ pointerDown: function (pointer) { @@ -362,7 +362,7 @@ Phaser.InputHandler.prototype = { * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true * @method pointerUp * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ pointerUp: function (pointer) { @@ -418,7 +418,7 @@ Phaser.InputHandler.prototype = { * Is the Pointer outside of this Sprite? * @method pointerOut * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ pointerOut: function (pointer) { @@ -474,7 +474,7 @@ Phaser.InputHandler.prototype = { * Checks if the given pointer is over this Sprite. * @method checkPointerOver * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ checkPointerOver: function (pointer) { @@ -513,7 +513,7 @@ Phaser.InputHandler.prototype = { * @method checkPixel * @param {Description} x - Description. * @param {Description} y - Description. - * @return {bool} + * @return {boolean} */ checkPixel: function (x, y) { @@ -696,7 +696,7 @@ Phaser.InputHandler.prototype = { * Updates the Pointer drag on this Sprite. * @method updateDrag * @param {Pointer} pointer - * @return {bool} + * @return {boolean} */ updateDrag: function (pointer) { @@ -741,7 +741,7 @@ Phaser.InputHandler.prototype = { * @method justOver * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just over. - * @return {bool} + * @return {boolean} */ justOver: function (pointer, delay) { @@ -757,7 +757,7 @@ Phaser.InputHandler.prototype = { * @method justOut * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just out. - * @return {bool} + * @return {boolean} */ justOut: function (pointer, delay) { @@ -773,7 +773,7 @@ Phaser.InputHandler.prototype = { * @method justPressed * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just over. - * @return {bool} + * @return {boolean} */ justPressed: function (pointer, delay) { @@ -789,7 +789,7 @@ Phaser.InputHandler.prototype = { * @method justReleased * @param {Pointer} pointer * @param {number} delay - The time below which the pointer is considered as just out. - * @return {bool} + * @return {boolean} */ justReleased: function (pointer, delay) { diff --git a/src/input/Key.js b/src/input/Key.js index 519b4e23..a94bf7d5 100644 --- a/src/input/Key.js +++ b/src/input/Key.js @@ -116,8 +116,8 @@ Phaser.Key.prototype = { }, /** - * @param {Number} [duration] - * @return {bool} + * @param {number} [duration] + * @return {boolean} */ justPressed: function (duration) { @@ -128,8 +128,8 @@ Phaser.Key.prototype = { }, /** - * @param {Number} [duration] - * @return {bool} + * @param {number} [duration] + * @return {boolean} */ justReleased: function (duration) { diff --git a/src/input/Keyboard.js b/src/input/Keyboard.js index e4ee231e..a2c1289c 100644 --- a/src/input/Keyboard.js +++ b/src/input/Keyboard.js @@ -58,7 +58,7 @@ Phaser.Keyboard.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. * @default - * @property {bool} disabled + * @property {boolean} disabled */ disabled: false, @@ -284,7 +284,7 @@ Phaser.Keyboard.prototype = { * @method justPressed * @param {number} keycode * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justPressed: function (keycode, duration) { @@ -304,7 +304,7 @@ Phaser.Keyboard.prototype = { * @method justReleased * @param {number} keycode * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justReleased: function (keycode, duration) { @@ -323,7 +323,7 @@ Phaser.Keyboard.prototype = { * Description. * @method isDown * @param {number} keycode - * @return {bool} + * @return {boolean} */ isDown: function (keycode) { diff --git a/src/input/MSPointer.js b/src/input/MSPointer.js index 1016a098..17f43d73 100644 --- a/src/input/MSPointer.js +++ b/src/input/MSPointer.js @@ -57,7 +57,7 @@ Phaser.MSPointer.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @property {bool} disabled + * @property {boolean} disabled */ disabled: false, diff --git a/src/input/Mouse.js b/src/input/Mouse.js index bf78e3c8..f1008091 100644 --- a/src/input/Mouse.js +++ b/src/input/Mouse.js @@ -59,14 +59,14 @@ Phaser.Mouse.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. - * @property {bool} disabled + * @property {boolean} disabled * @default */ disabled: false, /** * If the mouse has been Pointer Locked successfully this will be set to true. - * @property {bool} locked + * @property {boolean} locked * @default */ locked: false, diff --git a/src/input/Pointer.js b/src/input/Pointer.js index dc0b4785..f753af48 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -18,7 +18,7 @@ Phaser.Pointer = function (game, id) { /** * Local private variable to store the status of dispatching a hold event. - * @property {bool} _holdSent + * @property {boolean} _holdSent * @private * @default */ @@ -41,7 +41,7 @@ Phaser.Pointer = function (game, id) { /** * Monitor events outside of a state reset loop. - * @property {bool} _stateReset + * @property {boolean} _stateReset * @private * @default */ @@ -71,7 +71,7 @@ Phaser.Pointer = function (game, id) { /** * Description. - * @property {bool} withinGame + * @property {boolean} withinGame */ this.withinGame = false; @@ -133,21 +133,21 @@ Phaser.Pointer = function (game, id) { /** * If the Pointer is a mouse this is true, otherwise false. - * @property {bool} isMouse - * @type {bool} + * @property {boolean} isMouse + * @type {boolean} */ this.isMouse = false; /** * If the Pointer is touching the touchscreen, or the mouse button is held down, isDown is set to true. - * @property {bool} isDown + * @property {boolean} isDown * @default */ this.isDown = false; /** * If the Pointer is not touching the touchscreen, or the mouse button is up, isUp is set to true. - * @property {bool} isUp + * @property {boolean} isUp * @default */ this.isUp = true; @@ -206,7 +206,7 @@ Phaser.Pointer = function (game, id) { /** * Description. - * @property {bool} isDown - Description. + * @property {boolean} isDown - Description. * @default */ this.active = false; @@ -575,7 +575,7 @@ Phaser.Pointer.prototype = { * The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate. * @method justPressed * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justPressed: function (duration) { @@ -589,7 +589,7 @@ Phaser.Pointer.prototype = { * The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate. * @method justReleased * @param {number} [duration] - * @return {bool} + * @return {boolean} */ justReleased: function (duration) { diff --git a/src/input/Touch.js b/src/input/Touch.js index b680fc89..6d4e6c27 100644 --- a/src/input/Touch.js +++ b/src/input/Touch.js @@ -67,7 +67,7 @@ Phaser.Touch = function (game) { this.touchCancelCallback = null; /** - * @property {bool} preventDefault - Description. + * @property {boolean} preventDefault - Description. * @default */ this.preventDefault = true; @@ -81,7 +81,7 @@ Phaser.Touch.prototype = { /** * You can disable all Input by setting disabled = true. While set all new input related events will be ignored. * @method disabled - * @return {bool} + * @return {boolean} */ disabled: false, diff --git a/src/loader/Cache.js b/src/loader/Cache.js index 5998b59d..6e736c40 100644 --- a/src/loader/Cache.js +++ b/src/loader/Cache.js @@ -336,7 +336,7 @@ Phaser.Cache.prototype = { /** * Checks if an image key exists. * @param {string} key - Asset key of the image you want. - * @return {bool} True if the key exists, otherwise false. + * @return {boolean} True if the key exists, otherwise false. */ checkImageKey: function (key) { diff --git a/src/loader/Loader.js b/src/loader/Loader.js index b4364d0e..630ef484 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -54,13 +54,13 @@ Phaser.Loader = function (game) { this.queueSize = 0; /** - * @property {bool} isLoading - True if the Loader is in the process of loading the queue. + * @property {boolean} isLoading - True if the Loader is in the process of loading the queue. * @default */ this.isLoading = false; /** - * @property {bool} hasLoaded - True if all assets in the queue have finished loading. + * @property {boolean} hasLoaded - True if all assets in the queue have finished loading. * @default */ this.hasLoaded = false; @@ -155,7 +155,7 @@ Phaser.Loader.prototype = { * Check whether asset exists with a specific key. * @method checkKeyExists * @param {string} key - Key of the asset you want to check. - * @return {bool} Return true if exists, otherwise return false. + * @return {boolean} Return true if exists, otherwise return false. */ checkKeyExists: function (key) { @@ -240,7 +240,7 @@ Phaser.Loader.prototype = { * @method text * @param {string} key - Unique asset key of the text file. * @param {string} url - URL of the text file. - * @param {bool} overwrite - True if Description. + * @param {boolean} overwrite - True if Description. */ text: function (key, url, overwrite) { @@ -278,7 +278,7 @@ Phaser.Loader.prototype = { * @method audio * @param {string} key - Unique asset key of the audio file. * @param {Array} urls - An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ]. - * @param {bool} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. + * @param {boolean} autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. */ audio: function (key, urls, autoDecode) { @@ -978,7 +978,7 @@ Phaser.Loader.prototype = { /** * Handle loading next file. * @param previousKey {string} Key of previous loaded asset. - * @param success {bool} Whether the previous asset loaded successfully or not. + * @param success {boolean} Whether the previous asset loaded successfully or not. */ nextFile: function (previousKey, success) { diff --git a/src/math/Math.js b/src/math/Math.js index 20913191..f9b3298a 100644 --- a/src/math/Math.js +++ b/src/math/Math.js @@ -25,7 +25,7 @@ Phaser.Math = { * @param {number} a * @param {number} b * @param {number} epsilon - * @return {bool} True if |a-b|<ε + * @return {boolean} True if |a-b|<ε */ fuzzyEqual: function (a, b, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -38,7 +38,7 @@ Phaser.Math = { * @param {number} a * @param {number} b * @param {number} epsilon - * @return {bool} True if ab+ε + * @return {boolean} True if a>b+ε */ fuzzyGreaterThan: function (a, b, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -62,7 +62,7 @@ Phaser.Math = { * @method fuzzyCeil * @param {number} val * @param {number} epsilon - * @return {bool} ceiling(val-ε) + * @return {boolean} ceiling(val-ε) */ fuzzyCeil: function (val, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -73,7 +73,7 @@ Phaser.Math = { * @method fuzzyFloor * @param {number} val * @param {number} epsilon - * @return {bool} floor(val-ε) + * @return {boolean} floor(val-ε) */ fuzzyFloor: function (val, epsilon) { if (typeof epsilon === "undefined") { epsilon = 0.0001; } @@ -198,7 +198,7 @@ Phaser.Math = { * @method * @param {number} input * @param {array} arr - * @param {bool} sort - True if the array needs to be sorted. + * @param {boolean} sort - True if the array needs to be sorted. */ snapToInArray: function (input, arr, sort) { @@ -332,7 +332,7 @@ Phaser.Math = { * Set an angle within the bounds of -π toπ. * @method normalizeAngle * @param {number} angle - * @param {bool} radians - True if angle size is expressed in radians. + * @param {boolean} radians - True if angle size is expressed in radians. */ normalizeAngle: function (angle, radians) { @@ -349,7 +349,7 @@ Phaser.Math = { * @method nearestAngleBetween * @param {number} a1 * @param {number} a2 - * @param {bool} radians - True if angle sizes are expressed in radians. + * @param {boolean} radians - True if angle sizes are expressed in radians. */ nearestAngleBetween: function (a1, a2, radians) { @@ -379,7 +379,7 @@ Phaser.Math = { * @param {number} a1 - Description. * @param {number} a2 - Description. * @param {number} weight - Description. - * @param {bool} radians - True if angle sizes are expressed in radians. + * @param {boolean} radians - True if angle sizes are expressed in radians. * @param {Description} ease - Description. */ interpolateAngles: function (a1, a2, weight, radians, ease) { @@ -402,7 +402,7 @@ Phaser.Math = { *

    * @method chanceRoll * @param {number} chance - The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). - * @return {bool} True if the roll passed, or false otherwise. + * @return {boolean} True if the roll passed, or false otherwise. */ chanceRoll: function (chance) { @@ -557,7 +557,7 @@ Phaser.Math = { * * @method isOdd * @param {number} n - The number to check. - * @return {bool} True if the given number is odd. False if the given number is even. + * @return {boolean} True if the given number is odd. False if the given number is even. */ isOdd: function (n) { @@ -570,7 +570,7 @@ Phaser.Math = { * * @method isEven * @param {number} n - The number to check. - * @return {bool} True if the given number is even. False if the given number is odd. + * @return {boolean} True if the given number is even. False if the given number is odd. */ isEven: function (n) { diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index 207c56c3..8dbbeb4e 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -136,7 +136,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { /** * How often a particle is emitted in ms (if emitter is started with Explode == false). - * @property {bool} frequency + * @property {boolean} frequency * @default */ this.frequency = 100; @@ -187,7 +187,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { /** * Internal helper for the style of particle emission (all at once, or one at a time). - * @property {bool} _explode + * @property {boolean} _explode * @private * @default */ @@ -196,14 +196,14 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { /** * Determines whether the emitter is currently emitting particles. * It is totally safe to directly toggle this. - * @property {bool} on + * @property {boolean} on * @default */ this.on = false; /** * Determines whether the emitter is being updated by the core game loop. - * @property {bool} exists + * @property {boolean} exists * @default */ this.exists = true; @@ -212,7 +212,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { * The point the particles are emitted from. * Emitter.x and Emitter.y control the containers location, which updates all current particles * Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position. - * @property {bool} emitX + * @property {boolean} emitX */ this.emitX = x; @@ -220,7 +220,7 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) { * The point the particles are emitted from. * Emitter.x and Emitter.y control the containers location, which updates all current particles * Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position. - * @property {bool} emitY + * @property {boolean} emitY */ this.emitY = y; @@ -281,7 +281,7 @@ Phaser.Particles.Arcade.Emitter.prototype.update = function () { * @param {number} frames - Description. * @param {number} quantity - The number of particles to generate when using the "create from image" option. * @param {number} collide - Description. - * @param {bool} collideWorldBounds - Description. + * @param {boolean} collideWorldBounds - Description. * @return This Emitter instance (nice for chaining stuff together, if you're into that). */ Phaser.Particles.Arcade.Emitter.prototype.makeParticles = function (keys, frames, quantity, collide, collideWorldBounds) { @@ -582,10 +582,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "alpha", { /** * Get the emitter visible state. -* @return {bool} +* @return {boolean} *//** * Set the emitter visible state. -* @param {bool} value - Description +* @param {boolean} value - Description */ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", { @@ -601,10 +601,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "visible", { /** * Get -* @return {bool} +* @return {boolean} *//** * Set -* @param {bool} value - Description +* @param {boolean} value - Description */ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", { @@ -620,10 +620,10 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "x", { /** * Get -* @return {bool} +* @return {boolean} *//** * Set -* @param {bool} value - Description +* @param {boolean} value - Description */ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "y", { diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 06ae389e..dbd6b819 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -255,7 +255,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { /** * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. * @method bottom - * @return {Number} + * @return {number} **/ get: function () { return this.y + this.height; @@ -264,7 +264,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { /** * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. * @method bottom - * @param {Number} value + * @param {number} value **/ set: function (value) { @@ -287,7 +287,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", { * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. * However it does affect the width property. * @method right - * @return {Number} + * @return {number} **/ get: function () { return this.x + this.width; @@ -297,7 +297,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", { * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. * However it does affect the width property. * @method right - * @param {Number} value + * @param {number} value **/ set: function (value) { diff --git a/src/pixi/core/Circle.js b/src/pixi/core/Circle.js index a9ceed02..e36abe74 100644 --- a/src/pixi/core/Circle.js +++ b/src/pixi/core/Circle.js @@ -7,9 +7,9 @@ * * @class Circle * @constructor - * @param x {Number} The X coord of the upper-left corner of the framing rectangle of this circle - * @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this circle - * @param radius {Number} The radius of the circle + * @param x {number} The X coord of the upper-left corner of the framing rectangle of this circle + * @param y {number} The Y coord of the upper-left corner of the framing rectangle of this circle + * @param radius {number} The radius of the circle */ PIXI.Circle = function(x, y, radius) { @@ -50,8 +50,8 @@ PIXI.Circle.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this circle * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this polygon */ PIXI.Circle.prototype.contains = function(x, y) diff --git a/src/pixi/core/Ellipse.js b/src/pixi/core/Ellipse.js index dd369daa..27428d39 100644 --- a/src/pixi/core/Ellipse.js +++ b/src/pixi/core/Ellipse.js @@ -7,10 +7,10 @@ * * @class Ellipse * @constructor - * @param x {Number} The X coord of the upper-left corner of the framing rectangle of this ellipse - * @param y {Number} The Y coord of the upper-left corner of the framing rectangle of this ellipse - * @param width {Number} The overall height of this ellipse - * @param height {Number} The overall width of this ellipse + * @param x {number} The X coord of the upper-left corner of the framing rectangle of this ellipse + * @param y {number} The Y coord of the upper-left corner of the framing rectangle of this ellipse + * @param width {number} The overall height of this ellipse + * @param height {number} The overall width of this ellipse */ PIXI.Ellipse = function(x, y, width, height) { @@ -58,8 +58,8 @@ PIXI.Ellipse.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this ellipse * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this ellipse */ PIXI.Ellipse.prototype.contains = function(x, y) diff --git a/src/pixi/core/Point.js b/src/pixi/core/Point.js index 85208615..d68175aa 100644 --- a/src/pixi/core/Point.js +++ b/src/pixi/core/Point.js @@ -7,8 +7,8 @@ * * @class Point * @constructor - * @param x {Number} position of the point - * @param y {Number} position of the point + * @param x {number} position of the point + * @param y {number} position of the point */ PIXI.Point = function(x, y) { diff --git a/src/pixi/core/Polygon.js b/src/pixi/core/Polygon.js index 47cf17bc..e40f13aa 100644 --- a/src/pixi/core/Polygon.js +++ b/src/pixi/core/Polygon.js @@ -52,8 +52,8 @@ PIXI.Polygon.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this polygon * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this polygon */ PIXI.Polygon.prototype.contains = function(x, y) diff --git a/src/pixi/core/Rectangle.js b/src/pixi/core/Rectangle.js index 57484175..7a7ba086 100644 --- a/src/pixi/core/Rectangle.js +++ b/src/pixi/core/Rectangle.js @@ -7,10 +7,10 @@ * * @class Rectangle * @constructor - * @param x {Number} The X coord of the upper-left corner of the rectangle - * @param y {Number} The Y coord of the upper-left corner of the rectangle - * @param width {Number} The overall wisth of this rectangle - * @param height {Number} The overall height of this rectangle + * @param x {number} The X coord of the upper-left corner of the rectangle + * @param y {number} The Y coord of the upper-left corner of the rectangle + * @param width {number} The overall wisth of this rectangle + * @param height {number} The overall height of this rectangle */ PIXI.Rectangle = function(x, y, width, height) { @@ -58,8 +58,8 @@ PIXI.Rectangle.prototype.clone = function() * Checks if the x, and y coords passed to this function are contained within this Rectangle * * @method contains - * @param x {Number} The X coord of the point to test - * @param y {Number} The Y coord of the point to test + * @param x {number} The X coord of the point to test + * @param y {number} The Y coord of the point to test * @return {Boolean} if the x/y coords are within this Rectangle */ PIXI.Rectangle.prototype.contains = function(x, y) diff --git a/src/pixi/display/DisplayObjectContainer.js b/src/pixi/display/DisplayObjectContainer.js index 01b566d2..43891296 100644 --- a/src/pixi/display/DisplayObjectContainer.js +++ b/src/pixi/display/DisplayObjectContainer.js @@ -134,7 +134,7 @@ PIXI.DisplayObjectContainer.prototype.addChild = function(child) * * @method addChildAt * @param child {DisplayObject} The child to add - * @param index {Number} The index to place the child in + * @param index {number} The index to place the child in */ PIXI.DisplayObjectContainer.prototype.addChildAt = function(child, index) { @@ -269,7 +269,7 @@ PIXI.DisplayObjectContainer.prototype.swapChildren = function(child, child2) * Returns the Child at the specified index * * @method getChildAt - * @param index {Number} The index to get the child from + * @param index {number} The index to get the child from */ PIXI.DisplayObjectContainer.prototype.getChildAt = function(index) { diff --git a/src/pixi/display/MovieClip.js b/src/pixi/display/MovieClip.js index 40a0a182..5f984078 100644 --- a/src/pixi/display/MovieClip.js +++ b/src/pixi/display/MovieClip.js @@ -96,7 +96,7 @@ PIXI.MovieClip.prototype.play = function() * Stops the MovieClip and goes to a specific frame * * @method gotoAndStop - * @param frameNumber {Number} frame index to stop at + * @param frameNumber {number} frame index to stop at */ PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber) { @@ -110,7 +110,7 @@ PIXI.MovieClip.prototype.gotoAndStop = function(frameNumber) * Goes to a specific frame and begins playing the MovieClip * * @method gotoAndPlay - * @param frameNumber {Number} frame index to start at + * @param frameNumber {number} frame index to start at */ PIXI.MovieClip.prototype.gotoAndPlay = function(frameNumber) { diff --git a/src/pixi/display/Stage.js b/src/pixi/display/Stage.js index ca76d9e3..02830cfe 100644 --- a/src/pixi/display/Stage.js +++ b/src/pixi/display/Stage.js @@ -8,7 +8,7 @@ * @class Stage * @extends DisplayObjectContainer * @constructor - * @param backgroundColor {Number} the background color of the stage, easiest way to pass this in is in hex format + * @param backgroundColor {number} the background color of the stage, easiest way to pass this in is in hex format * like: 0xFFFFFF for white * @param interactive {Boolean} enable / disable interaction (default is false) */ @@ -99,7 +99,7 @@ PIXI.Stage.prototype.updateTransform = function() * Sets the background color for the stage * * @method setBackgroundColor - * @param backgroundColor {Number} the color of the background, easiest way to pass this in is in hex format + * @param backgroundColor {number} the color of the background, easiest way to pass this in is in hex format * like: 0xFFFFFF for white */ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor) diff --git a/src/pixi/extras/TilingSprite.js b/src/pixi/extras/TilingSprite.js index 2cb17fae..f52465c7 100644 --- a/src/pixi/extras/TilingSprite.js +++ b/src/pixi/extras/TilingSprite.js @@ -9,8 +9,8 @@ * @extends DisplayObjectContainer * @constructor * @param texture {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 + * @param width {number} the width of the tiling sprite + * @param height {number} the height of the tiling sprite */ PIXI.TilingSprite = function(texture, width, height) { diff --git a/src/pixi/primitives/Graphics.js b/src/pixi/primitives/Graphics.js index cd599fa8..a73838c2 100644 --- a/src/pixi/primitives/Graphics.js +++ b/src/pixi/primitives/Graphics.js @@ -69,9 +69,9 @@ PIXI.Graphics.prototype.constructor = PIXI.Graphics; * Specifies a line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method. * * @method lineStyle - * @param lineWidth {Number} width of the line to draw, will update the object's stored style - * @param color {Number} color of the line to draw, will update the object's stored style - * @param alpha {Number} alpha of the line to draw, will update the object's stored style + * @param lineWidth {number} width of the line to draw, will update the object's stored style + * @param color {number} color of the line to draw, will update the object's stored style + * @param alpha {number} alpha of the line to draw, will update the object's stored style */ PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha) { @@ -91,8 +91,8 @@ PIXI.Graphics.prototype.lineStyle = function(lineWidth, color, alpha) * Moves the current drawing position to (x, y). * * @method moveTo - * @param x {Number} the X coord to move to - * @param y {Number} the Y coord to move to + * @param x {number} the X coord to move to + * @param y {number} the Y coord to move to */ PIXI.Graphics.prototype.moveTo = function(x, y) { @@ -111,8 +111,8 @@ PIXI.Graphics.prototype.moveTo = function(x, y) * the current drawing position is then set to (x, y). * * @method lineTo - * @param x {Number} the X coord to draw to - * @param y {Number} the Y coord to draw to + * @param x {number} the X coord to draw to + * @param y {number} the Y coord to draw to */ PIXI.Graphics.prototype.lineTo = function(x, y) { @@ -126,7 +126,7 @@ PIXI.Graphics.prototype.lineTo = function(x, y) * * @method beginFill * @param color {uint} the color of the fill - * @param alpha {Number} the alpha + * @param alpha {number} the alpha */ PIXI.Graphics.prototype.beginFill = function(color, alpha) { @@ -150,10 +150,10 @@ PIXI.Graphics.prototype.endFill = function() /** * @method drawRect * - * @param x {Number} The X coord of the top-left of the rectangle - * @param y {Number} The Y coord of the top-left of the rectangle - * @param width {Number} The width of the rectangle - * @param height {Number} The height of the rectangle + * @param x {number} The X coord of the top-left of the rectangle + * @param y {number} The Y coord of the top-left of the rectangle + * @param width {number} The width of the rectangle + * @param height {number} The height of the rectangle */ PIXI.Graphics.prototype.drawRect = function( x, y, width, height ) { @@ -171,9 +171,9 @@ PIXI.Graphics.prototype.drawRect = function( x, y, width, height ) * Draws a circle. * * @method drawCircle - * @param x {Number} The X coord of the center of the circle - * @param y {Number} The Y coord of the center of the circle - * @param radius {Number} The radius of the circle + * @param x {number} The X coord of the center of the circle + * @param y {number} The Y coord of the center of the circle + * @param radius {number} The radius of the circle */ PIXI.Graphics.prototype.drawCircle = function( x, y, radius) { @@ -191,10 +191,10 @@ PIXI.Graphics.prototype.drawCircle = function( x, y, radius) * Draws an elipse. * * @method drawElipse - * @param x {Number} - * @param y {Number} - * @param width {Number} - * @param height {Number} + * @param x {number} + * @param y {number} + * @param width {number} + * @param height {number} */ PIXI.Graphics.prototype.drawElipse = function( x, y, width, height) { diff --git a/src/pixi/renderers/canvas/CanvasRenderer.js b/src/pixi/renderers/canvas/CanvasRenderer.js index 45cc80df..8dbb6256 100644 --- a/src/pixi/renderers/canvas/CanvasRenderer.js +++ b/src/pixi/renderers/canvas/CanvasRenderer.js @@ -9,8 +9,8 @@ * * @class CanvasRenderer * @constructor - * @param width=0 {Number} the width of the canvas view - * @param height=0 {Number} the height of the canvas view + * @param width=0 {number} the width of the canvas view + * @param height=0 {number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional * @param transparent=false {Boolean} the transparency of the render view, default false */ @@ -114,8 +114,8 @@ PIXI.CanvasRenderer.prototype.render = function(stage) * resizes the canvas view to the specified width and height * * @method resize - * @param width {Number} the new width of the canvas view - * @param height {Number} the new height of the canvas view + * @param width {number} the new width of the canvas view + * @param height {number} the new height of the canvas view */ PIXI.CanvasRenderer.prototype.resize = function(width, height) { diff --git a/src/pixi/renderers/webgl/WebGLRenderer.js b/src/pixi/renderers/webgl/WebGLRenderer.js index f05c162e..e192cfb7 100644 --- a/src/pixi/renderers/webgl/WebGLRenderer.js +++ b/src/pixi/renderers/webgl/WebGLRenderer.js @@ -16,8 +16,8 @@ PIXI.gl; * * @class WebGLRenderer * @constructor - * @param width=0 {Number} the width of the canvas view - * @param height=0 {Number} the height of the canvas view + * @param width=0 {number} the width of the canvas view + * @param height=0 {number} the height of the canvas view * @param view {Canvas} the canvas to use as a view, optional * @param transparent=false {Boolean} the transparency of the render view, default false * @param antialias=false {Boolean} sets antialias (only applicable in chrome at the moment) @@ -277,8 +277,8 @@ PIXI.WebGLRenderer.destroyTexture = function(texture) * resizes the webGL view to the specified width and height * * @method resize - * @param width {Number} the new width of the webGL view - * @param height {Number} the new height of the webGL view + * @param width {number} the new width of the webGL view + * @param height {number} the new height of the webGL view */ PIXI.WebGLRenderer.prototype.resize = function(width, height) { diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index 0b136218..aaf6a431 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -14,9 +14,9 @@ * @param [style.fill="black"] {Object} A canvas fillstyle that will be used on the text eg "red", "#00FF00" * @param [style.align="left"] {String} An alignment of the multiline text ("left", "center" or "right") * @param [style.stroke] {String} A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" - * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) + * @param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used - * @param [style.wordWrapWidth=100] {Number} The width at which text will wrap + * @param [style.wordWrapWidth=100] {number} The width at which text will wrap */ PIXI.Text = function(text, style) { @@ -44,9 +44,9 @@ PIXI.Text.prototype.constructor = PIXI.Text; * @param [style.fill="black"] {Object} A canvas fillstyle that will be used on the text eg "red", "#00FF00" * @param [style.align="left"] {String} An alignment of the multiline text ("left", "center" or "right") * @param [style.stroke="black"] {String} A canvas fillstyle that will be used on the text stroke eg "blue", "#FCFF00" - * @param [style.strokeThickness=0] {Number} A number that represents the thickness of the stroke. Default is 0 (no stroke) + * @param [style.strokeThickness=0] {number} A number that represents the thickness of the stroke. Default is 0 (no stroke) * @param [style.wordWrap=false] {Boolean} Indicates if word wrap should be used - * @param [style.wordWrapWidth=100] {Number} The width at which text will wrap + * @param [style.wordWrapWidth=100] {number} The width at which text will wrap */ PIXI.Text.prototype.setStyle = function(style) { diff --git a/src/pixi/textures/RenderTexture.js b/src/pixi/textures/RenderTexture.js index 25b2cfe1..788fc8ef 100644 --- a/src/pixi/textures/RenderTexture.js +++ b/src/pixi/textures/RenderTexture.js @@ -27,8 +27,8 @@ @class RenderTexture @extends Texture @constructor - @param width {Number} The width of the render texture - @param height {Number} The height of the render texture + @param width {number} The width of the render texture + @param height {number} The height of the render texture */ PIXI.RenderTexture = function(width, height) { diff --git a/src/pixi/utils/Detector.js b/src/pixi/utils/Detector.js index d04a5687..f3256256 100644 --- a/src/pixi/utils/Detector.js +++ b/src/pixi/utils/Detector.js @@ -9,8 +9,8 @@ * * @method autoDetectRenderer * @static - * @param width {Number} the width of the renderers view - * @param height {Number} the height of the renderers view + * @param width {number} the width of the renderers view + * @param height {number} the height of the renderers view * @param view {Canvas} the canvas to use as a view, optional * @param transparent=false {Boolean} the transparency of the render view, default false * @param antialias=false {Boolean} sets antialias (only applicable in webGL chrome at the moment) diff --git a/src/pixi/utils/Utils.js b/src/pixi/utils/Utils.js index 9534c839..4299583d 100644 --- a/src/pixi/utils/Utils.js +++ b/src/pixi/utils/Utils.js @@ -44,7 +44,7 @@ window.requestAnimFrame = window.requestAnimationFrame; * Converts a hex color number to an [R, G, B] array * * @method HEXtoRGB - * @param hex {Number} + * @param hex {number} */ function HEXtoRGB(hex) { return [(hex >> 16 & 0xFF) / 255, ( hex >> 8 & 0xFF) / 255, (hex & 0xFF)/ 255]; diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 11c0998f..aa8a5933 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -15,7 +15,7 @@ * @param {Phaser.Game} game - Reference to the current game instance. * @param {string} key - Asset key for the sound. * @param {number} volume - Default value for the volume. -* @param {bool} loop - Whether or not the sound will loop. +* @param {boolean} loop - Whether or not the sound will loop. */ Phaser.Sound = function (game, key, volume, loop) { @@ -43,7 +43,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Whether or not the sound will loop. - * @property {bool} loop + * @property {boolean} loop */ this.loop = loop; @@ -77,7 +77,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Boolean indicating whether the game is on "mute". - * @property {bool} _muted + * @property {boolean} _muted * @private * @default */ @@ -85,7 +85,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Boolean indicating whether the sound should start automatically. - * @property {bool} autoplay + * @property {boolean} autoplay * @private */ this.autoplay = false; @@ -127,14 +127,14 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {bool} paused + * @property {boolean} paused * @default */ this.paused = false; /** * Description. - * @property {bool} isPlaying + * @property {boolean} isPlaying * @default */ this.isPlaying = false; @@ -148,21 +148,21 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {bool} pendingPlayback + * @property {boolean} pendingPlayback * @default */ this.pendingPlayback = false; /** * Description. - * @property {bool} override + * @property {boolean} override * @default */ this.override = false; /** * Description. - * @property {bool} usingWebAudio + * @property {boolean} usingWebAudio */ this.usingWebAudio = this.game.sound.usingWebAudio; @@ -396,7 +396,7 @@ Phaser.Sound.prototype = { * @param {string} marker - Assets key of the sound you want to play. * @param {number} position - The starting position. * @param {number} [volume] - Volume of the sound you want to play. - * @param {bool} [loop] - Loop when it finished playing? (Default to false) + * @param {boolean} [loop] - Loop when it finished playing? (Default to false) * @param {Description} forceRestart - Description. * @return {Sound} The playing sound object. */ @@ -593,7 +593,7 @@ Phaser.Sound.prototype = { * @param {string} marker - Assets key of the sound you want to play. * @param {number} position - The starting position. * @param {number} [volume] - Volume of the sound you want to play. - * @param {bool} [loop] - Loop when it finished playing? (Default to false) + * @param {boolean} [loop] - Loop when it finished playing? (Default to false) */ restart: function (marker, position, volume, loop) { @@ -691,7 +691,7 @@ Phaser.Sound.prototype = { /** * Get -* @return {bool} Description. +* @return {boolean} Description. */ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", { @@ -703,7 +703,7 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoding", { /** * Get -* @return {bool} Description. +* @return {boolean} Description. */ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", { @@ -715,10 +715,10 @@ Object.defineProperty(Phaser.Sound.prototype, "isDecoded", { /** * Get -* @return {bool} Whether or not the sound is muted. +* @return {boolean} Whether or not the sound is muted. *//** * Mutes sound. -* @param {bool} value - Whether or not the sound is muted. +* @param {boolean} value - Whether or not the sound is muted. */ Object.defineProperty(Phaser.Sound.prototype, "mute", { diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index 8bd8c375..a1c0bc36 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -27,7 +27,7 @@ Phaser.SoundManager = function (game) { this.onSoundDecode = new Phaser.Signal; /** - * @property {bool} _muted - Description. + * @property {boolean} _muted - Description. * @private * @default */ @@ -61,25 +61,25 @@ Phaser.SoundManager = function (game) { this.context = null; /** - * @property {bool} usingWebAudio - Description. + * @property {boolean} usingWebAudio - Description. * @default */ this.usingWebAudio = true; /** - * @property {bool} usingAudioTag - Description. + * @property {boolean} usingAudioTag - Description. * @default */ this.usingAudioTag = false; /** - * @property {bool} noAudio - Description. + * @property {boolean} noAudio - Description. * @default */ this.noAudio = false; /** - * @property {bool} touchLocked - Description. + * @property {boolean} touchLocked - Description. * @default */ this.touchLocked = false; @@ -323,7 +323,7 @@ Phaser.SoundManager.prototype = { * @method add * @param {string} key - Asset key for the sound. * @param {number} volume - Default value for the volume. - * @param {bool} loop - Whether or not the sound will loop. + * @param {boolean} loop - Whether or not the sound will loop. */ add: function (key, volume, loop) { @@ -344,10 +344,10 @@ Phaser.SoundManager.prototype = { /** * A global audio mute toggle. -* @return {bool} Whether or not the game is on "mute". +* @return {boolean} Whether or not the game is on "mute". *//** * Mute sounds. -* @param {bool} value - Whether or not the game is on "mute" +* @param {boolean} value - Whether or not the game is on "mute" */ Object.defineProperty(Phaser.SoundManager.prototype, "mute", { diff --git a/src/system/Canvas.js b/src/system/Canvas.js index 4b1fd255..80b88779 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -127,7 +127,7 @@ Phaser.Canvas = { * @method addToDOM * @param {HTMLCanvasElement} canvas - The canvas to set the touch action on. * @param {string} parent - The DOM element to add the canvas to. Defaults to ''. - * @param {bool} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element. + * @param {boolean} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element. * @return {HTMLCanvasElement} Returns the source canvas. */ addToDOM: function (canvas, parent, overflowHidden) { @@ -191,7 +191,7 @@ Phaser.Canvas = { * * @method setSmoothingEnabled * @param {CanvasRenderingContext2D} context - The context to enable or disable the image smoothing on. - * @param {bool} value - If set to true it will enable image smoothing, false will disable it. + * @param {boolean} value - If set to true it will enable image smoothing, false will disable it. * @return {CanvasRenderingContext2D} Returns the source context. */ setSmoothingEnabled: function (context, value) { diff --git a/src/system/Device.js b/src/system/Device.js index 4b4a6341..dfee32d8 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -19,7 +19,7 @@ Phaser.Device = function () { /** * An optional 'fix' for the horrendous Android stock browser bug * {@link https://code.google.com/p/android/issues/detail?id=39247} - * @property {bool} patchAndroidClearRectBug - Description. + * @property {boolean} patchAndroidClearRectBug - Description. * @default */ this.patchAndroidClearRectBug = false; @@ -27,43 +27,43 @@ Phaser.Device = function () { // Operating System /** - * @property {bool} desktop - Is running desktop? + * @property {boolean} desktop - Is running desktop? * @default */ this.desktop = false; /** - * @property {bool} iOS - Is running on iOS? + * @property {boolean} iOS - Is running on iOS? * @default */ this.iOS = false; /** - * @property {bool} android - Is running on android? + * @property {boolean} android - Is running on android? * @default */ this.android = false; /** - * @property {bool} chromeOS - Is running on chromeOS? + * @property {boolean} chromeOS - Is running on chromeOS? * @default */ this.chromeOS = false; /** - * @property {bool} linux - Is running on linux? + * @property {boolean} linux - Is running on linux? * @default */ this.linux = false; /** - * @property {bool} maxOS - Is running on maxOS? + * @property {boolean} maxOS - Is running on maxOS? * @default */ this.macOS = false; /** - * @property {bool} windows - Is running on windows? + * @property {boolean} windows - Is running on windows? * @default */ this.windows = false; @@ -71,61 +71,61 @@ Phaser.Device = function () { // Features /** - * @property {bool} canvas - Is canvas available? + * @property {boolean} canvas - Is canvas available? * @default */ this.canvas = false; /** - * @property {bool} file - Is file available? + * @property {boolean} file - Is file available? * @default */ this.file = false; /** - * @property {bool} fileSystem - Is fileSystem available? + * @property {boolean} fileSystem - Is fileSystem available? * @default */ this.fileSystem = false; /** - * @property {bool} localStorage - Is localStorage available? + * @property {boolean} localStorage - Is localStorage available? * @default */ this.localStorage = false; /** - * @property {bool} webGL - Is webGL available? + * @property {boolean} webGL - Is webGL available? * @default */ this.webGL = false; /** - * @property {bool} worker - Is worker available? + * @property {boolean} worker - Is worker available? * @default */ this.worker = false; /** - * @property {bool} touch - Is touch available? + * @property {boolean} touch - Is touch available? * @default */ this.touch = false; /** - * @property {bool} mspointer - Is mspointer available? + * @property {boolean} mspointer - Is mspointer available? * @default */ this.mspointer = false; /** - * @property {bool} css3D - Is css3D available? + * @property {boolean} css3D - Is css3D available? * @default */ this.css3D = false; /** - * @property {bool} pointerLock - Is Pointer Lock available? + * @property {boolean} pointerLock - Is Pointer Lock available? * @default */ this.pointerLock = false; @@ -133,31 +133,31 @@ Phaser.Device = function () { // Browser /** - * @property {bool} arora - Is running in arora? + * @property {boolean} arora - Is running in arora? * @default */ this.arora = false; /** - * @property {bool} chrome - Is running in chrome? + * @property {boolean} chrome - Is running in chrome? * @default */ this.chrome = false; /** - * @property {bool} epiphany - Is running in epiphany? + * @property {boolean} epiphany - Is running in epiphany? * @default */ this.epiphany = false; /** - * @property {bool} firefox - Is running in firefox? + * @property {boolean} firefox - Is running in firefox? * @default */ this.firefox = false; /** - * @property {bool} ie - Is running in ie? + * @property {boolean} ie - Is running in ie? * @default */ this.ie = false; @@ -169,25 +169,25 @@ Phaser.Device = function () { this.ieVersion = 0; /** - * @property {bool} mobileSafari - Is running in mobileSafari? + * @property {boolean} mobileSafari - Is running in mobileSafari? * @default */ this.mobileSafari = false; /** - * @property {bool} midori - Is running in midori? + * @property {boolean} midori - Is running in midori? * @default */ this.midori = false; /** - * @property {bool} opera - Is running in opera? + * @property {boolean} opera - Is running in opera? * @default */ this.opera = false; /** - * @property {bool} safari - Is running in safari? + * @property {boolean} safari - Is running in safari? * @default */ this.safari = false; @@ -196,49 +196,49 @@ Phaser.Device = function () { // Audio /** - * @property {bool} audioData - Are Audio tags available? + * @property {boolean} audioData - Are Audio tags available? * @default */ this.audioData = false; /** - * @property {bool} webAudio - Is the WebAudio API available? + * @property {boolean} webAudio - Is the WebAudio API available? * @default */ this.webAudio = false; /** - * @property {bool} ogg - Can this device play ogg files? + * @property {boolean} ogg - Can this device play ogg files? * @default */ this.ogg = false; /** - * @property {bool} opus - Can this device play opus files? + * @property {boolean} opus - Can this device play opus files? * @default */ this.opus = false; /** - * @property {bool} mp3 - Can this device play mp3 files? + * @property {boolean} mp3 - Can this device play mp3 files? * @default */ this.mp3 = false; /** - * @property {bool} wav - Can this device play wav files? + * @property {boolean} wav - Can this device play wav files? * @default */ this.wav = false; /** * Can this device play m4a files? - * @property {bool} m4a - True if this device can play m4a files. + * @property {boolean} m4a - True if this device can play m4a files. * @default */ this.m4a = false; /** - * @property {bool} webm - Can this device play webm files? + * @property {boolean} webm - Can this device play webm files? * @default */ this.webm = false; @@ -246,19 +246,19 @@ Phaser.Device = function () { // Device /** - * @property {bool} iPhone - Is running on iPhone? + * @property {boolean} iPhone - Is running on iPhone? * @default */ this.iPhone = false; /** - * @property {bool} iPhone4 - Is running on iPhone4? + * @property {boolean} iPhone4 - Is running on iPhone4? * @default */ this.iPhone4 = false; /** - * @property {bool} iPad - Is running on iPad? + * @property {boolean} iPad - Is running on iPad? * @default */ this.iPad = false; @@ -496,7 +496,7 @@ Phaser.Device.prototype = { /** * Check whether the console is open. * @method isConsoleOpen - * @return {bool} True if console is open. + * @return {boolean} True if console is open. */ isConsoleOpen: function () { diff --git a/src/system/RequestAnimationFrame.js b/src/system/RequestAnimationFrame.js index 7243e7e1..816c14ec 100644 --- a/src/system/RequestAnimationFrame.js +++ b/src/system/RequestAnimationFrame.js @@ -21,13 +21,13 @@ Phaser.RequestAnimationFrame = function(game) { this.game = game; /** - * @property {bool} _isSetTimeOut - Description. + * @property {boolean} _isSetTimeOut - Description. * @private */ this._isSetTimeOut = false; /** - * @property {bool} isRunning - Description. + * @property {boolean} isRunning - Description. * @default */ this.isRunning = false; @@ -135,7 +135,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * Is the browser using setTimeout? * @method isSetTimeOut - * @return {bool} + * @return {boolean} **/ isSetTimeOut: function () { return this._isSetTimeOut; @@ -144,7 +144,7 @@ Phaser.RequestAnimationFrame.prototype = { /** * Is the browser using requestAnimationFrame? * @method isRAF - * @return {bool} + * @return {boolean} **/ isRAF: function () { return (this._isSetTimeOut === false); diff --git a/src/system/StageScaleMode.js b/src/system/StageScaleMode.js index b581395f..8fc6155c 100644 --- a/src/system/StageScaleMode.js +++ b/src/system/StageScaleMode.js @@ -25,25 +25,25 @@ Phaser.StageScaleMode = function (game, width, height) { this._startHeight = 0; /** - * @property {bool} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage + * @property {boolean} forceLandscape - If the game should be forced to use Landscape mode, this is set to true by Game.Stage * @default */ this.forceLandscape = false; /** - * @property {bool} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage + * @property {boolean} forcePortrait - If the game should be forced to use Portrait mode, this is set to true by Game.Stage * @default */ this.forcePortrait = false; /** - * @property {bool} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true. + * @property {boolean} incorrectOrientation - If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true. * @default */ this.incorrectOrientation = false; /** - * @property {bool} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true. + * @property {boolean} pageAlignHorizontally - If you wish to align your game in the middle of the page then you can set this value to true.
    • It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
    • It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.
    * @default @@ -51,7 +51,7 @@ Phaser.StageScaleMode = function (game, width, height) { this.pageAlignHorizontally = false; /** - * @property {bool} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true. + * @property {boolean} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true.
    • It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
    • It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.
    * @default @@ -511,7 +511,7 @@ Phaser.StageScaleMode.prototype = { /** * Get -* @return {bool} +* @return {boolean} */ Object.defineProperty(Phaser.StageScaleMode.prototype, "isFullScreen", { diff --git a/src/tilemap/Tile.js b/src/tilemap/Tile.js index 29f776f3..069f1b46 100644 --- a/src/tilemap/Tile.js +++ b/src/tilemap/Tile.js @@ -27,43 +27,43 @@ Phaser.Tile = function (game, tilemap, index, width, height) { this.mass = 1.0; /** - * @property {bool} collideNone - Indicating this Tile doesn't collide at all. + * @property {boolean} collideNone - Indicating this Tile doesn't collide at all. * @default */ this.collideNone = true; /** - * @property {bool} collideLeft - Indicating collide with any object on the left. + * @property {boolean} collideLeft - Indicating collide with any object on the left. * @default */ this.collideLeft = false; /** - * @property {bool} collideRight - Indicating collide with any object on the right. + * @property {boolean} collideRight - Indicating collide with any object on the right. * @default */ this.collideRight = false; /** - * @property {bool} collideUp - Indicating collide with any object on the top. + * @property {boolean} collideUp - Indicating collide with any object on the top. * @default */ this.collideUp = false; /** - * @property {bool} collideDown - Indicating collide with any object on the bottom. + * @property {boolean} collideDown - Indicating collide with any object on the bottom. * @default */ this.collideDown = false; /** - * @property {bool} separateX - Enable separation at x-axis. + * @property {boolean} separateX - Enable separation at x-axis. * @default */ this.separateX = true; /** - * @property {bool} separateY - Enable separation at y-axis. + * @property {boolean} separateY - Enable separation at y-axis. * @default */ this.separateY = true; @@ -74,7 +74,7 @@ Phaser.Tile = function (game, tilemap, index, width, height) { this.game = game; /** - * @property {bool} tilemap - The tilemap this tile belongs to. + * @property {boolean} tilemap - The tilemap this tile belongs to. */ this.tilemap = tilemap; @@ -108,13 +108,13 @@ Phaser.Tile.prototype = { /** * Set collision configs. * @method setCollision - * @param {bool} left - Indicating collide with any object on the left. - * @param {bool} right - Indicating collide with any object on the right. - * @param {bool} up - Indicating collide with any object on the top. - * @param {bool} down - Indicating collide with any object on the bottom. - * @param {bool} reset - Description. - * @param {bool} separateX - Separate at x-axis. - * @param {bool} separateY - Separate at y-axis. + * @param {boolean} left - Indicating collide with any object on the left. + * @param {boolean} right - Indicating collide with any object on the right. + * @param {boolean} up - Indicating collide with any object on the top. + * @param {boolean} down - Indicating collide with any object on the bottom. + * @param {boolean} reset - Description. + * @param {boolean} separateX - Separate at x-axis. + * @param {boolean} separateY - Separate at y-axis. */ setCollision: function (left, right, up, down, reset, separateX, separateY) { @@ -160,7 +160,7 @@ Object.defineProperty(Phaser.Tile.prototype, "bottom", { /** * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. * @method bottom - * @return {Number} + * @return {number} **/ get: function () { return this.y + this.height; @@ -174,7 +174,7 @@ Object.defineProperty(Phaser.Tile.prototype, "right", { * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. * However it does affect the width property. * @method right - * @return {Number} + * @return {number} **/ get: function () { return this.x + this.width; diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index dfbc677c..203d4495 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -16,7 +16,7 @@ * @param {string} key - Asset key for this map. * @param {object} x - Description. * @param {object} y - Description. -* @param {bool} resizeWorld - Resize the world bound automatically based on this tilemap? +* @param {boolean} resizeWorld - Resize the world bound automatically based on this tilemap? * @param {number} tileWidth - Width of tiles in this map (used for CSV maps). * @param {number} tileHeight - Height of tiles in this map (used for CSV maps). */ @@ -54,31 +54,31 @@ Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight) this.renderOrderID = 0; /** - * @property {bool} collisionCallback - Tilemap collision callback. + * @property {boolean} collisionCallback - Tilemap collision callback. * @default */ this.collisionCallback = null; /** - * @property {bool} exists - Description. + * @property {boolean} exists - Description. * @default */ this.exists = true; /** - * @property {bool} visible - Description. + * @property {boolean} visible - Description. * @default */ this.visible = true; /** - * @property {bool} tiles - Description. + * @property {boolean} tiles - Description. * @default */ this.tiles = []; /** - * @property {bool} layers - Description. + * @property {boolean} layers - Description. * @default */ this.layers = []; @@ -268,9 +268,9 @@ Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) { * @param {number} start - First index of tiles. * @param {number} end - Last index of tiles. * @param {number} collision - Bit field of flags. (see Tile.allowCollision) -* @param {bool} resetCollisions - Reset collision flags before set. -* @param {bool} separateX - Enable separate at x-axis. -* @param {bool} separateY - Enable separate at y-axis. +* @param {boolean} resetCollisions - Reset collision flags before set. +* @param {boolean} separateX - Enable separate at x-axis. +* @param {boolean} separateY - Enable separate at y-axis. */ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, up, down, resetCollisions, separateX, separateY) { @@ -289,13 +289,13 @@ Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, * Set collision configs of tiles with given index. * @param {number[]} values - Index array which contains all tile indexes. The tiles with those indexes will be setup with rest parameters. * @param {number} collision - Bit field of flags (see Tile.allowCollision). -* @param {bool} resetCollisions - Reset collision flags before set. -* @param {bool} left - Indicating collide with any object on the left. -* @param {bool} right - Indicating collide with any object on the right. -* @param {bool} up - Indicating collide with any object on the top. -* @param {bool} down - Indicating collide with any object on the bottom. -* @param {bool} separateX - Enable separate at x-axis. -* @param {bool} separateY - Enable separate at y-axis. +* @param {boolean} resetCollisions - Reset collision flags before set. +* @param {boolean} left - Indicating collide with any object on the left. +* @param {boolean} right - Indicating collide with any object on the right. +* @param {boolean} up - Indicating collide with any object on the top. +* @param {boolean} down - Indicating collide with any object on the bottom. +* @param {boolean} separateX - Enable separate at x-axis. +* @param {boolean} separateY - Enable separate at y-axis. */ Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up, down, resetCollisions, separateX, separateY) { @@ -389,7 +389,7 @@ Phaser.Tilemap.prototype.getTileOverlaps = function (object) { * @param {Function} objectOrGroup - Target object of group you want to check. * @param {Function} callback - This is called if objectOrGroup collides the tilemap. * @param {object} context - Callback will be called with this context. -* @return {bool} Return true if this collides with given object, otherwise return false. +* @return {boolean} Return true if this collides with given object, otherwise return false. */ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { @@ -417,7 +417,7 @@ Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { /** * Check whether this tilemap collides with the given game object. * @param {GameObject} object - Target object you want to check. -* @return {bool} Return true if this collides with given object, otherwise return false. +* @return {boolean} Return true if this collides with given object, otherwise return false. */ Phaser.Tilemap.prototype.collideGameObject = function (object) { diff --git a/src/tilemap/TilemapLayer.js b/src/tilemap/TilemapLayer.js index 510d32f6..80fd7516 100644 --- a/src/tilemap/TilemapLayer.js +++ b/src/tilemap/TilemapLayer.js @@ -21,13 +21,13 @@ Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, tileHeight) { /** - * @property {bool} exists - Controls whether update() and draw() are automatically called. + * @property {boolean} exists - Controls whether update() and draw() are automatically called. * @default */ this.exists = true; /** - * @property {bool} visible - Controls whether draw() are automatically called. + * @property {boolean} visible - Controls whether draw() are automatically called. * @default */ this.visible = true; @@ -444,7 +444,7 @@ Phaser.TilemapLayer.prototype = { * @param {number} [y] - Y position (in tiles) of block's left-top corner. * @param {number} [width] - width of block. * @param {number} [height] - height of block. - * @param {bool} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). + * @param {boolean} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). */ getTempBlock: function (x, y, width, height, collisionOnly) { diff --git a/src/tilemap/TilemapRenderer.js b/src/tilemap/TilemapRenderer.js index 85ff3328..b37dfbc4 100644 --- a/src/tilemap/TilemapRenderer.js +++ b/src/tilemap/TilemapRenderer.js @@ -111,7 +111,7 @@ Phaser.TilemapRenderer.prototype = { * Render a tilemap to a canvas. * @method render * @param tilemap {Tilemap} The tilemap data to render. - * @return {bool} Description. + * @return {boolean} Description. */ render: function (tilemap) { diff --git a/src/time/Time.js b/src/time/Time.js index 219a42bc..7faa926a 100644 --- a/src/time/Time.js +++ b/src/time/Time.js @@ -149,7 +149,7 @@ Phaser.Time = function (game) { /** * Description. - * @property {bool} _justResumed + * @property {boolean} _justResumed * @default */ this._justResumed = false; diff --git a/src/tween/Tween.js b/src/tween/Tween.js index 4abbad87..9bdfec3c 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -67,14 +67,14 @@ Phaser.Tween = function (object, game) { this._repeat = 0; /** - * @property {bool} _yoyo - Description. + * @property {boolean} _yoyo - Description. * @private * @default */ this._yoyo = false; /** - * @property {bool} _reversed - Description. + * @property {boolean} _reversed - Description. * @private * @default */ @@ -120,7 +120,7 @@ Phaser.Tween = function (object, game) { this._onStartCallback = null; /** - * @property {bool} _onStartCallbackFired - Description. + * @property {boolean} _onStartCallbackFired - Description. * @private * @default */ @@ -148,7 +148,7 @@ Phaser.Tween = function (object, game) { this._pausedTime = 0; /** - * @property {bool} pendingDelete - Description. + * @property {boolean} pendingDelete - Description. * @default */ this.pendingDelete = false; @@ -169,7 +169,7 @@ Phaser.Tween = function (object, game) { this.onComplete = new Phaser.Signal(); /** - * @property {bool} isRunning - Description. + * @property {boolean} isRunning - Description. * @default */ this.isRunning = false; @@ -185,9 +185,9 @@ Phaser.Tween.prototype = { * @param {object} properties - Properties you want to tween. * @param {number} duration - Duration of this tween. * @param {function} ease - Easing function. - * @param {bool} autoStart - Whether this tween will start automatically or not. + * @param {boolean} autoStart - Whether this tween will start automatically or not. * @param {number} delay - Delay before this tween will start, defaults to 0 (no delay). - * @param {bool} repeat - Should the tween automatically restart once complete? (ignores any chained tweens). + * @param {boolean} repeat - Should the tween automatically restart once complete? (ignores any chained tweens). * @param {Phaser.Tween} yoyo - Description. * @return {Phaser.Tween} Itself. */ @@ -471,7 +471,7 @@ Phaser.Tween.prototype = { * * @method update * @param {number} time - Description. - * @return {bool} Description. + * @return {boolean} Description. */ update: function ( time ) { diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index 23cc4b2c..b2227065 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -124,7 +124,7 @@ Phaser.TweenManager.prototype = { * Update all the tween objects you added to this manager. * * @method update - * @returns {bool} Return false if there's no tween to update, otherwise return true. + * @returns {boolean} Return false if there's no tween to update, otherwise return true. */ update: function () { diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 8e5baea4..8e73a009 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -36,7 +36,7 @@ Phaser.Utils.Debug = function (game) { this.lineHeight = 16; /** - * @property {bool} renderShadow - Description. + * @property {boolean} renderShadow - Description. */ this.renderShadow = true; @@ -185,8 +185,8 @@ Phaser.Utils.Debug.prototype = { * Description. * @method renderSpriteCorners * @param {Phaser.Sprite} sprite - The sprite to be rendered. - * @param {bool} showText - Description. - * @param {bool} showBounds - Description. + * @param {boolean} showText - Description. + * @param {boolean} showBounds - Description. * @param {string} color - Description. */ renderSpriteCorners: function (sprite, showText, showBounds, color) { @@ -302,7 +302,7 @@ Phaser.Utils.Debug.prototype = { * Renders the Pointer.circle object onto the stage in green if down or red if up. * @method renderDebug * @param {Description} pointer - Description. - * @param {bool} hideIfUp - Description. + * @param {boolean} hideIfUp - Description. * @param {string} downColor - Description. * @param {string} upColor - Description. * @param {string} color - Description. diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 8fc83814..f47441ef 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -57,7 +57,7 @@ Phaser.Utils = { * This is a slightly modified version of jQuery.isPlainObject. * @method isPlainObject * @param {object} obj - Description. - * @return {bool} - Description. + * @return {boolean} - Description. */ isPlainObject: function (obj) { From 7c7cd8b01dfef8ab98c87daa661287e3ab05977d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Oct 2013 16:56:47 +0100 Subject: [PATCH 035/125] More docs and quick patch to stop the body.allowRotation messing things up. --- Docs/out/Animation-Phaser.Animation.html | 4 +- Docs/out/Animation.html | 4 +- Docs/out/Camera-Phaser.Camera.html | 8 +- Docs/out/Camera.html | 4 +- Docs/out/Game-Phaser.Game.html | 16 +- Docs/out/Game.html | 4 +- Docs/out/Group-Phaser.Group.html | 18 +- Docs/out/Group.html | 2 +- Docs/out/Group_.html | 135 + Docs/out/Phaser.Animation.Frame.html | 10 +- Docs/out/Phaser.Animation.FrameData.html | 8 +- Docs/out/Phaser.Animation.Parser.html | 4 +- Docs/out/Phaser.AnimationManager.html | 4 +- Docs/out/Phaser.Group.html | 5067 ++++++++++++++++++++++ Docs/out/Phaser.html | 7 +- Docs/out/global.html | 107 +- Docs/out/index.html | 4 +- Docs/out/module-Phaser.html | 4 +- src/core/Camera.js | 12 +- src/core/Game.js | 10 +- src/core/Group.js | 60 +- src/core/SignalBinding.js | 2 +- src/physics/arcade/Body.js | 3 +- 23 files changed, 5328 insertions(+), 169 deletions(-) create mode 100644 Docs/out/Group_.html create mode 100644 Docs/out/Phaser.Group.html diff --git a/Docs/out/Animation-Phaser.Animation.html b/Docs/out/Animation-Phaser.Animation.html index c35f1eed..b0ae5081 100644 --- a/Docs/out/Animation-Phaser.Animation.html +++ b/Docs/out/Animation-Phaser.Animation.html @@ -1147,13 +1147,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Animation.html b/Docs/out/Animation.html index 46dd954e..d94b20b4 100644 --- a/Docs/out/Animation.html +++ b/Docs/out/Animation.html @@ -120,13 +120,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Camera-Phaser.Camera.html b/Docs/out/Camera-Phaser.Camera.html index 1ccf8e45..cecb3cf6 100644 --- a/Docs/out/Camera-Phaser.Camera.html +++ b/Docs/out/Camera-Phaser.Camera.html @@ -438,7 +438,7 @@ -bool +boolean @@ -1155,7 +1155,7 @@ -bool +boolean @@ -1330,13 +1330,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Camera.html b/Docs/out/Camera.html index d0d10d17..32a781ae 100644 --- a/Docs/out/Camera.html +++ b/Docs/out/Camera.html @@ -120,13 +120,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Game-Phaser.Game.html b/Docs/out/Game-Phaser.Game.html index 4c2447d6..f040922c 100644 --- a/Docs/out/Game-Phaser.Game.html +++ b/Docs/out/Game-Phaser.Game.html @@ -204,7 +204,7 @@ -bool +boolean @@ -227,7 +227,7 @@ -bool +boolean @@ -461,7 +461,7 @@ -bool +boolean @@ -1492,7 +1492,7 @@ -bool +boolean @@ -1596,7 +1596,7 @@ -bool +boolean @@ -3147,7 +3147,7 @@ -bool +boolean @@ -3527,13 +3527,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Game.html b/Docs/out/Game.html index f5b57424..4fbf90a8 100644 --- a/Docs/out/Game.html +++ b/Docs/out/Game.html @@ -120,13 +120,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Group-Phaser.Group.html b/Docs/out/Group-Phaser.Group.html index 63066302..c1c5e5ed 100644 --- a/Docs/out/Group-Phaser.Group.html +++ b/Docs/out/Group-Phaser.Group.html @@ -30,7 +30,7 @@ Group -
    An Animation instance contains a single animation and the controls to play it. It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.
    +
    A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
    @@ -158,7 +158,7 @@ -bool +boolean @@ -199,7 +199,7 @@
    Source:
    • - core/Group.js, line 19 + core/Group.js, line 18
    @@ -288,7 +288,7 @@ -bool +boolean @@ -329,7 +329,7 @@
    Source:
    • - core/Group.js, line 73 + core/Group.js, line 72
    @@ -430,7 +430,7 @@
    Source:
    • - core/Group.js, line 31 + core/Group.js, line 30
    @@ -531,7 +531,7 @@
    Source:
    • - core/Group.js, line 36 + core/Group.js, line 35
    @@ -632,7 +632,7 @@
    Source:
    • - core/Group.js, line 67 + core/Group.js, line 66
    @@ -671,7 +671,7 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:42:00 GMT+0100 (BST)
    diff --git a/Docs/out/Group.html b/Docs/out/Group.html index e5bb4cc7..1f2da26a 100644 --- a/Docs/out/Group.html +++ b/Docs/out/Group.html @@ -126,7 +126,7 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:42:00 GMT+0100 (BST)
    diff --git a/Docs/out/Group_.html b/Docs/out/Group_.html new file mode 100644 index 00000000..9dd621b3 --- /dev/null +++ b/Docs/out/Group_.html @@ -0,0 +1,135 @@ + + + + + JSDoc: Module: Group + + + + + + + + + + +
    + +

    Module: Group

    + + + + + +
    + +
    +

    + Phaser. + + Group +

    + +
    + +
    +
    + + + + + + +
    + + + + + + + + + + + +
    Author:
    +
    + +
    + + + + + + + + +
    License:
    +
    + + + + + +
    Source:
    +
    • + core/Group.js, line 1 +
    + + + + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:40:52 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.Animation.Frame.html b/Docs/out/Phaser.Animation.Frame.html index 1ae6098f..a23166c3 100644 --- a/Docs/out/Phaser.Animation.Frame.html +++ b/Docs/out/Phaser.Animation.Frame.html @@ -963,7 +963,7 @@ -bool +boolean @@ -1789,7 +1789,7 @@ -bool +boolean @@ -2306,7 +2306,7 @@ -bool +boolean @@ -2526,13 +2526,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.Animation.FrameData.html b/Docs/out/Phaser.Animation.FrameData.html index 150d583f..6a0abe3f 100644 --- a/Docs/out/Phaser.Animation.FrameData.html +++ b/Docs/out/Phaser.Animation.FrameData.html @@ -1359,7 +1359,7 @@
    -

    <static> total() → {Number}

    +

    <static> total() → {number}

    @@ -1436,7 +1436,7 @@
    -Number +number
    @@ -1463,13 +1463,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.Animation.Parser.html b/Docs/out/Phaser.Animation.Parser.html index 0d846933..bd9f4609 100644 --- a/Docs/out/Phaser.Animation.Parser.html +++ b/Docs/out/Phaser.Animation.Parser.html @@ -993,13 +993,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.AnimationManager.html b/Docs/out/Phaser.AnimationManager.html index c5af2ecc..d544bd0a 100644 --- a/Docs/out/Phaser.AnimationManager.html +++ b/Docs/out/Phaser.AnimationManager.html @@ -1679,13 +1679,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:59 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/Phaser.Group.html b/Docs/out/Phaser.Group.html new file mode 100644 index 00000000..342a6e3f --- /dev/null +++ b/Docs/out/Phaser.Group.html @@ -0,0 +1,5067 @@ + + + + + JSDoc: Class: Group + + + + + + + + + + +
    + +

    Class: Group

    + + + + + +
    + +
    +

    + Phaser. + + Group +

    + +
    A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
    + +
    + +
    +
    + + + + +
    +

    new Group(game, parent, name, useStage)

    + + +
    +
    + + +
    + Phaser Group constructor. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running game.
    parent + + +Description + + + + Description.
    name + + +string + + + + The unique name for this animation, used in playback commands.
    useStage + + +boolean + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 18 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    exists

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    exists + + +boolean + + + + Description.
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    • + core/Group.js, line 72 +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + + A reference to the currently running Game.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 30 +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +Phaser.Game + + + + Description.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 35 +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + + Description.
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 66 +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    <static> add(child) → {Description}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 85 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + +
    + + + +
    +

    <static> addAll(property, amount, checkAlive, checkVisible)

    + + +
    +
    + + +
    + Adds the amount to the given property on all children in this Group. Group.addAll('x', 10) will add 10 to the child.x value. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    property + + +string + + + + The property to increment, for example 'body.velocity.x' or 'angle'.
    amount + + +number + + + + The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.
    checkAlive + + +boolean + + + + If true the property will only be changed if the child is alive.
    checkVisible + + +boolean + + + + If true the property will only be changed if the child is visible.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 481 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> addAt(child, index) → {Description}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child + + +Description + + + + Description.
    index + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 111 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + +
    + + + +
    +

    <static> bringToTop(child) → {Description}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 313 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + +
    + + + +
    +

    <static> callAll(callback, parameter)

    + + +
    +
    + + +
    + Calls a function on all of the children regardless if they are dead or alive (see callAllExists if you need control over that) After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    callback + + +function + + + + + + + + + + The function that exists on the children that will be called.
    parameter + + +* + + + + + + + + + + <repeatable>
    + +
    Additional parameters that will be passed to the callback.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 582 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> callAllExists(callback, existsValue, parameter)

    + + +
    +
    + + +
    + Calls a function on all of the children that have exists=true in this Group. After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    callback + + +function + + + + + + + + + + The function that exists on the children that will be called.
    existsValue + + +boolean + + + + + + + + + + Only children with exists=existsValue will be called.
    parameter + + +* + + + + + + + + + + <repeatable>
    + +
    Additional parameters that will be passed to the callback.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 549 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> countDead() → {number}

    + + +
    +
    + + +
    + Call this function to find out how many members of the group are dead. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 845 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The number of children flagged as dead. Returns -1 if Group is empty. +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + +
    + + + +
    +

    <static> countLiving() → {number}

    + + +
    +
    + + +
    + Call this function to find out how many members of the group are alive. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 814 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The number of children flagged as alive. Returns -1 if Group is empty. +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + +
    + + + +
    +

    <static> create(x, y, key, frame, exists) → {Description}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    x + + +number + + + + + + + + + + Description.
    y + + +number + + + + + + + + + + Description.
    key + + +string + + + + + + + + + + Description.
    frame + + +string + + + + + + <optional>
    + + + + + +
    Description.
    exists + + +boolean + + + + + + <optional>
    + + + + + +
    Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 152 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + +
    + + + +
    +

    <static> destroy()

    + + +
    +
    + + +
    + Description. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 968 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> divideAll(property, amount, checkAlive, checkVisible)

    + + +
    +
    + + +
    + Divides the given property by the amount on all children in this Group. Group.divideAll('x', 2) will half the child.x value. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    property + + +string + + + + The property to divide, for example 'body.velocity.x' or 'angle'.
    amount + + +number + + + + The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.
    checkAlive + + +boolean + + + + If true the property will only be changed if the child is alive.
    checkVisible + + +boolean + + + + If true the property will only be changed if the child is visible.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 532 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> dump()

    + + +
    +
    + + +
    + Description. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 988 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> forEach(callback, callbackContext, checkExists)

    + + +
    +
    + + +
    + Description. After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    callback + + +Description + + + + Description.
    callbackContext + + +Description + + + + Description.
    checkExists + + +boolean + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 614 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> forEachAlive(callback, callbackContext)

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    callback + + +Description + + + + Description.
    callbackContext + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 654 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> forEachDead(callback, callbackContext)

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    callback + + +Description + + + + Description.
    callbackContext + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 687 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> getAt(index) → {Description}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    index + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 138 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + +
    + + + +
    +

    <static> getFirstAlive() → {Any}

    + + +
    +
    + + +
    + Call this function to retrieve the first object with alive == true in the group. This is handy for checking if everything's wiped out, or choosing a squad leader, etc. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 754 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The first alive child, or null if none found. +
    + + + +
    +
    + Type +
    +
    + +Any + + +
    +
    + + + + +
    + + + +
    +

    <static> getFirstDead() → {Any}

    + + +
    +
    + + +
    + Call this function to retrieve the first object with alive == false in the group. This is handy for checking if everything's wiped out, or choosing a squad leader, etc. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 784 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The first dead child, or null if none found. +
    + + + +
    +
    + Type +
    +
    + +Any + + +
    +
    + + + + +
    + + + +
    +

    <static> getFirstExists(state) → {Any}

    + + +
    +
    + + +
    + Call this function to retrieve the first object with exists == (the given state) in the group. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    state + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 719 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + The first child, or null if none found. +
    + + + +
    +
    + Type +
    +
    + +Any + + +
    +
    + + + + +
    + + + +
    +

    <static> getIndex(child) → {Description}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 333 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + +
    + + + +
    +

    <static> getRandom(startIndex, length) → {Any}

    + + +
    +
    + + +
    + Returns a member at random from the group. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    startIndex + + +number + + + + Optional offset off the front of the array. Default value is 0, or the beginning of the array.
    length + + +number + + + + Optional restriction on the number of values you want to randomly select from.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 876 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + A random child of this Group. +
    + + + +
    +
    + Type +
    +
    + +Any + + +
    +
    + + + + +
    + + + +
    +

    <static> multiplyAll(property, amount, checkAlive, checkVisible)

    + + +
    +
    + + +
    + Multiplies the given property by the amount on all children in this Group. Group.multiplyAll('x', 2) will x2 the child.x value. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    property + + +string + + + + The property to multiply, for example 'body.velocity.x' or 'angle'.
    amount + + +number + + + + The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.
    checkAlive + + +boolean + + + + If true the property will only be changed if the child is alive.
    checkVisible + + +boolean + + + + If true the property will only be changed if the child is visible.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 515 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> remove(child)

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 899 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> removeAll()

    + + +
    +
    + + +
    + Description. +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 914 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> removeBetween(startIndex, endIndex)

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    startIndex + + +Description + + + + Description.
    endIndex + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 939 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> replace(oldChild, newChild)

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    oldChild + + +Description + + + + Description.
    newChild + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 347 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> setAll(key, value, checkAlive, checkVisible, operation)

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +Description + + + + Description.
    value + + +Description + + + + Description.
    checkAlive + + +Description + + + + Description.
    checkVisible + + +Description + + + + Description.
    operation + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 443 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> setProperty(child, key, value, operation) → {number}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child + + +Description + + + + Description.
    key + + +array + + + + An array of values that will be set.
    value + + +Description + + + + Description.
    operation + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 379 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + An integer value: -1 (Obj1 before Obj2), 0 (same), or 1 (Obj1 after Obj2). (TODO) +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + +
    + + + +
    +

    <static> subAll(property, amount, checkAlive, checkVisible)

    + + +
    +
    + + +
    + Subtracts the amount from the given property on all children in this Group. Group.subAll('x', 10) will minus 10 from the child.x value. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    property + + +string + + + + The property to decrement, for example 'body.velocity.x' or 'angle'.
    amount + + +number + + + + The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.
    checkAlive + + +boolean + + + + If true the property will only be changed if the child is alive.
    checkVisible + + +boolean + + + + If true the property will only be changed if the child is visible.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 498 +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <static> swap(child1, child2) → {boolean}

    + + +
    +
    + + +
    + Description. +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    child1 + + +Description + + + + Description.
    child2 + + +Description + + + + Description.
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    • + core/Group.js, line 184 +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + + + +
    + +
    + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST) +
    + + + + + \ No newline at end of file diff --git a/Docs/out/Phaser.html b/Docs/out/Phaser.html index db2e43d5..5d48469d 100644 --- a/Docs/out/Phaser.html +++ b/Docs/out/Phaser.html @@ -103,6 +103,9 @@
    AnimationManager
    + +
    Group
    +
    @@ -125,13 +128,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/Docs/out/global.html b/Docs/out/global.html index 4e445f3c..31952df2 100644 --- a/Docs/out/global.html +++ b/Docs/out/global.html @@ -91,7 +91,7 @@
    -

    multiplyAll(property, amount, checkAlive, checkVisible)

    +

    add(child) → {Description}

    @@ -99,7 +99,7 @@
    - Multiplies the given property by the amount on all children in this Group. Group.multiplyAll('x', 2) will x2 the child.x value. + Description.
    @@ -133,13 +133,13 @@ - property + child -string +Description @@ -149,76 +149,7 @@ - The property to multiply, for example 'body.velocity.x' or 'angle'. - - - - - - - amount - - - - - -number - - - - - - - - - - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. - - - - - - - checkAlive - - - - - -boolean - - - - - - - - - - If true the property will only be changed if the child is alive. - - - - - - - checkVisible - - - - - -boolean - - - - - - - - - - If true the property will only be changed if the child is visible. + Description. @@ -249,7 +180,7 @@
    Source:
    • - core/Group.js, line 516 + core/Group.js, line 85
    @@ -270,6 +201,28 @@ +
    Returns:
    + + +
    + Description. +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + @@ -290,13 +243,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:30 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:43:48 GMT+0100 (BST)
    diff --git a/Docs/out/index.html b/Docs/out/index.html index bb7dcca2..6552f435 100644 --- a/Docs/out/index.html +++ b/Docs/out/index.html @@ -48,13 +48,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:21 GMT+0100 (BST)
    diff --git a/Docs/out/module-Phaser.html b/Docs/out/module-Phaser.html index 7d5d6aba..c8e09028 100644 --- a/Docs/out/module-Phaser.html +++ b/Docs/out/module-Phaser.html @@ -105,13 +105,13 @@
    - Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:31:58 GMT+0100 (BST) + Documentation generated by JSDoc 3.2.0-dev on Tue Oct 01 2013 16:44:22 GMT+0100 (BST)
    diff --git a/src/core/Camera.js b/src/core/Camera.js index 2ca65f10..f93b2a77 100644 --- a/src/core/Camera.js +++ b/src/core/Camera.js @@ -93,7 +93,7 @@ Phaser.Camera.prototype = { /** * Tells this camera which sprite to follow. * @method follow - * @memberOf Phaser.Camera + * @memberof Phaser.Camera * @param {Phaser.Sprite} target - The object you want the camera to track. Set to null to not follow anything. * @param {number} [style] Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). */ @@ -134,7 +134,7 @@ Phaser.Camera.prototype = { /** * Move the camera focus to a location instantly. * @method focusOnXY - * @memberOf Phaser.Camera + * @memberof Phaser.Camera * @param {number} x - X position. * @param {number} y - Y position. */ @@ -148,7 +148,7 @@ Phaser.Camera.prototype = { /** * Update focusing and scrolling. * @method update - * @memberOf Phaser.Camera + * @memberof Phaser.Camera */ update: function () { @@ -199,7 +199,7 @@ Phaser.Camera.prototype = { /** * Method called to ensure the camera doesn't venture outside of the game world. * @method checkWorldBounds - * @memberOf Phaser.Camera + * @memberof Phaser.Camera */ checkWorldBounds: function () { @@ -240,7 +240,7 @@ Phaser.Camera.prototype = { * without having to use game.camera.x and game.camera.y. * * @method setPosition - * @memberOf Phaser.Camera + * @memberof Phaser.Camera * @param {number} x - X position. * @param {number} y - Y position. */ @@ -256,7 +256,7 @@ Phaser.Camera.prototype = { * Sets the size of the view rectangle given the width and height in parameters. * * @method setSize - * @memberOf Phaser.Camera + * @memberof Phaser.Camera * @param {number} width - The desired width. * @param {number} height - The desired height. */ diff --git a/src/core/Game.js b/src/core/Game.js index 92874a6c..ccf24255 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -253,7 +253,7 @@ Phaser.Game.prototype = { * Initialize engine sub modules and start the game. * * @method boot - * @memberOf Phaser.Game + * @memberof Phaser.Game */ boot: function () { @@ -334,7 +334,7 @@ Phaser.Game.prototype = { * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. * * @method setUpRenderer - * @memberOf Phaser.Game + * @memberof Phaser.Game */ setUpRenderer: function () { @@ -371,7 +371,7 @@ Phaser.Game.prototype = { * Called when the load has finished, after preload was run. * * @method loadComplete - * @memberOf Phaser.Game + * @memberof Phaser.Game */ loadComplete: function () { @@ -385,7 +385,7 @@ Phaser.Game.prototype = { * The core game loop. * * @method update - * @memberOf Phaser.Game + * @memberof Phaser.Game * @param {number} time - The current time as provided by RequestAnimationFrame. */ update: function (time) { @@ -420,7 +420,7 @@ Phaser.Game.prototype = { * Nuke the entire game from orbit * * @method destroy - * @memberOf Phaser.Game + * @memberof Phaser.Game */ destroy: function () { diff --git a/src/core/Group.js b/src/core/Group.js index e7698e8b..7d27d294 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -86,7 +86,7 @@ Phaser.Group.prototype = { * Description. * * @method add - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -112,7 +112,7 @@ Phaser.Group.prototype = { * Description. * * @method addAt - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child - Description. * @param {Description} index - Description. * @return {Description} Description. @@ -139,7 +139,7 @@ Phaser.Group.prototype = { * Description. * * @method getAt - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} index - Description. * @return {Description} Description. */ @@ -153,7 +153,7 @@ Phaser.Group.prototype = { * Description. * * @method create - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {number} x - Description. * @param {number} y - Description. * @param {string} key - Description. @@ -185,7 +185,7 @@ Phaser.Group.prototype = { * Description. * * @method swap - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child1 - Description. * @param {Description} child2 - Description. * @return {boolean} Description. @@ -314,7 +314,7 @@ Phaser.Group.prototype = { * Description. * * @method bringToTop - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -334,7 +334,7 @@ Phaser.Group.prototype = { * Description. * * @method getIndex - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child - Description. * @return {Description} Description. */ @@ -348,7 +348,7 @@ Phaser.Group.prototype = { * Description. * * @method replace - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} oldChild - Description. * @param {Description} newChild - Description. */ @@ -380,7 +380,7 @@ Phaser.Group.prototype = { * Description. * * @method setProperty - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child - Description. * @param {array} key - An array of values that will be set. * @param {Description} value - Description. @@ -444,7 +444,7 @@ Phaser.Group.prototype = { * Description. * * @method setAll - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} key - Description. * @param {Description} value - Description. * @param {Description} checkAlive - Description. @@ -483,7 +483,7 @@ Phaser.Group.prototype = { * Group.addAll('x', 10) will add 10 to the child.x value. * * @method addAll - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {string} property - The property to increment, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -500,7 +500,7 @@ Phaser.Group.prototype = { * Group.subAll('x', 10) will minus 10 from the child.x value. * * @method subAll - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {string} property - The property to decrement, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -517,7 +517,7 @@ Phaser.Group.prototype = { * Group.multiplyAll('x', 2) will x2 the child.x value. * * @method multiplyAll - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {string} property - The property to multiply, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -534,7 +534,7 @@ Phaser.Group.prototype = { * Group.divideAll('x', 2) will half the child.x value. * * @method divideAll - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {string} property - The property to divide, for example 'body.velocity.x' or 'angle'. * @param {number} amount - The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. * @param {boolean} checkAlive - If true the property will only be changed if the child is alive. @@ -551,7 +551,7 @@ Phaser.Group.prototype = { * After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. * * @method callAllExists - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {function} callback - The function that exists on the children that will be called. * @param {boolean} existsValue - Only children with exists=existsValue will be called. * @param {...*} parameter - Additional parameters that will be passed to the callback. @@ -584,7 +584,7 @@ Phaser.Group.prototype = { * After the callback parameter you can add as many extra parameters as you like, which will all be passed to the child. * * @method callAll - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {function} callback - The function that exists on the children that will be called. * @param {...*} parameter - Additional parameters that will be passed to the callback. */ @@ -616,7 +616,7 @@ Phaser.Group.prototype = { * After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child. * * @method forEach - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. * @param {boolean} checkExists - Description. @@ -655,7 +655,7 @@ Phaser.Group.prototype = { * Description. * * @method forEachAlive - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. */ @@ -688,7 +688,7 @@ Phaser.Group.prototype = { * Description. * * @method forEachDead - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} callback - Description. * @param {Description} callbackContext - Description. */ @@ -720,7 +720,7 @@ Phaser.Group.prototype = { * Call this function to retrieve the first object with exists == (the given state) in the group. * * @method getFirstExists - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} state - Description. * @return {Any} The first child, or null if none found. */ @@ -756,7 +756,7 @@ Phaser.Group.prototype = { * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * * @method getFirstAlive - * @memberOf Phaser.Group + * @memberof Phaser.Group * @return {Any} The first alive child, or null if none found. */ getFirstAlive: function () { @@ -786,7 +786,7 @@ Phaser.Group.prototype = { * This is handy for checking if everything's wiped out, or choosing a squad leader, etc. * * @method getFirstDead - * @memberOf Phaser.Group + * @memberof Phaser.Group * @return {Any} The first dead child, or null if none found. */ getFirstDead: function () { @@ -815,7 +815,7 @@ Phaser.Group.prototype = { * Call this function to find out how many members of the group are alive. * * @method countLiving - * @memberOf Phaser.Group + * @memberof Phaser.Group * @return {number} The number of children flagged as alive. Returns -1 if Group is empty. */ countLiving: function () { @@ -846,7 +846,7 @@ Phaser.Group.prototype = { * Call this function to find out how many members of the group are dead. * * @method countDead - * @memberOf Phaser.Group + * @memberof Phaser.Group * @return {number} The number of children flagged as dead. Returns -1 if Group is empty. */ countDead: function () { @@ -877,7 +877,7 @@ Phaser.Group.prototype = { * Returns a member at random from the group. * * @method getRandom - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {number} startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. * @param {number} length - Optional restriction on the number of values you want to randomly select from. * @return {Any} A random child of this Group. @@ -900,7 +900,7 @@ Phaser.Group.prototype = { * Description. * * @method remove - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} child - Description. */ remove: function (child) { @@ -915,7 +915,7 @@ Phaser.Group.prototype = { * Description. * * @method removeAll - * @memberOf Phaser.Group + * @memberof Phaser.Group */ removeAll: function () { @@ -940,7 +940,7 @@ Phaser.Group.prototype = { * Description. * * @method removeBetween - * @memberOf Phaser.Group + * @memberof Phaser.Group * @param {Description} startIndex - Description. * @param {Description} endIndex - Description. */ @@ -969,7 +969,7 @@ Phaser.Group.prototype = { * Description. * * @method destroy - * @memberOf Phaser.Group + * @memberof Phaser.Group */ destroy: function () { @@ -989,7 +989,7 @@ Phaser.Group.prototype = { * Description. * * @method dump - * @memberOf Phaser.Group + * @memberof Phaser.Group */ dump: function (full) { diff --git a/src/core/SignalBinding.js b/src/core/SignalBinding.js index 6864a302..c91876a8 100644 --- a/src/core/SignalBinding.js +++ b/src/core/SignalBinding.js @@ -40,7 +40,7 @@ Phaser.SignalBinding = function (signal, listener, isOnce, listenerContext, prio /** * @property {object|undefined|null} context - Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @memberOf SignalBinding.prototype + * @memberof SignalBinding.prototype */ this.context = listenerContext; diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index dbd6b819..853d8002 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -171,7 +171,8 @@ Phaser.Physics.Arcade.Body.prototype = { if (this.allowRotation) { - this.sprite.angle = this.rotation; + // Needs to use rotation delta + // this.sprite.angle += this.rotation; } }, From e5b1faace60901ad89119ff72159139e7ddf3172 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Oct 2013 01:16:40 +0100 Subject: [PATCH 036/125] Preparing more documentation. --- Docs/conf.json | 25 +- Docs/docstrap-master/.gitignore | 11 + Docs/docstrap-master/.npmignore | 6 + Docs/docstrap-master/Gruntfile.js | 364 + Docs/docstrap-master/LICENSE.md | 22 + Docs/docstrap-master/README.md | 200 + Docs/docstrap-master/bower.json | 12 + Docs/docstrap-master/component.json | 10 + Docs/docstrap-master/fixtures/car.js | 45 + .../fixtures/example.conf.json | 22 + Docs/docstrap-master/fixtures/other.js | 50 + Docs/docstrap-master/fixtures/person.js | 74 + .../fixtures/tutorials/Brush Teeth.md | 21 + .../fixtures/tutorials/Drive Car.md | 10 + Docs/docstrap-master/package.json | 36 + Docs/docstrap-master/styles/bootswatch.less | 180 + Docs/docstrap-master/styles/main.less | 152 + Docs/docstrap-master/styles/variables.less | 301 + Docs/docstrap-master/template/jsdoc.conf.json | 25 + Docs/docstrap-master/template/publish.js | 651 + .../static/img/glyphicons-halflings-white.png | Bin 0 -> 8777 bytes .../static/img/glyphicons-halflings.png | Bin 0 -> 12799 bytes .../template/static/scripts/URI.js | 1429 ++ .../static/scripts/bootstrap-dropdown.js | 165 + .../template/static/scripts/bootstrap-tab.js | 144 + .../static/scripts/jquery.localScroll.js | 130 + .../template/static/scripts/jquery.min.js | 3522 +++++ .../static/scripts/jquery.scrollTo.js | 217 + .../static/scripts/jquery.sunlight.js | 18 + .../scripts/prettify/Apache-License-2.0.txt | 202 + .../static/scripts/prettify/jquery.min.js | 6 + .../static/scripts/prettify/lang-css.js | 21 + .../static/scripts/prettify/prettify.js | 496 + .../scripts/sunlight-plugin.doclinks.js | 91 + .../scripts/sunlight-plugin.linenumbers.js | 104 + .../static/scripts/sunlight-plugin.menu.js | 159 + .../static/scripts/sunlight.javascript.js | 183 + .../template/static/scripts/sunlight.js | 1157 ++ .../template/static/scripts/toc.js | 100 + .../template/static/styles/darkstrap.css | 960 ++ .../static/styles/prettify-tomorrow.css | 132 + .../template/static/styles/site.amelia.css | 6349 +++++++++ .../template/static/styles/site.cerulean.css | 5675 ++++++++ .../template/static/styles/site.cosmo.css | 5910 +++++++++ .../template/static/styles/site.cyborg.css | 6104 +++++++++ .../template/static/styles/site.darkstrap.css | 5638 ++++++++ .../template/static/styles/site.flatly.css | 5949 +++++++++ .../template/static/styles/site.journal.css | 5719 ++++++++ .../template/static/styles/site.readable.css | 5407 ++++++++ .../template/static/styles/site.simplex.css | 5732 ++++++++ .../template/static/styles/site.slate.css | 6178 +++++++++ .../template/static/styles/site.spacelab.css | 5734 ++++++++ .../template/static/styles/site.spruce.css | 5889 +++++++++ .../template/static/styles/site.superhero.css | 6074 +++++++++ .../template/static/styles/site.united.css | 5519 ++++++++ .../template/static/styles/sunlight.dark.css | 345 + .../static/styles/sunlight.default.css | 344 + .../template/tmpl/container.tmpl | 159 + .../template/tmpl/details.tmpl | 98 + .../template/tmpl/example.tmpl | 2 + .../template/tmpl/examples.tmpl | 11 + .../template/tmpl/exceptions.tmpl | 30 + Docs/docstrap-master/template/tmpl/fires.tmpl | 4 + .../docstrap-master/template/tmpl/layout.tmpl | 143 + .../template/tmpl/mainpage.tmpl | 15 + .../template/tmpl/members.tmpl | 34 + .../docstrap-master/template/tmpl/method.tmpl | 90 + .../docstrap-master/template/tmpl/params.tmpl | 112 + .../template/tmpl/properties.tmpl | 107 + .../template/tmpl/returns.tmpl | 19 + .../template/tmpl/sections.tmpl | 5 + .../docstrap-master/template/tmpl/source.tmpl | 8 + .../template/tmpl/tutorial.tmpl | 19 + Docs/docstrap-master/template/tmpl/type.tmpl | 7 + .../out/Animation-Phaser.Animation.Frame.html | 2284 ---- .../Animation-Phaser.Animation.FrameData.html | 154 - Docs/out/Animation-Phaser.Animation.html | 1162 -- Docs/out/Animation.html | 135 - Docs/out/Animation.js.html | 581 + ...mationManager-Phaser.AnimationManager.html | 1319 +- Docs/out/AnimationManager.html | 195 +- Docs/out/AnimationManager.js.html | 529 + Docs/out/Camera-Phaser.Camera.html | 1345 -- Docs/out/Camera.html | 135 - Docs/out/Camera.js.html | 511 + Docs/out/Frame-Phaser.Animation.Frame.html | 2282 ---- Docs/out/Frame.html | 133 - Docs/out/Frame.js.html | 319 + .../FrameData-Phaser.Animation.FrameData.html | 152 - Docs/out/FrameData.html | 133 - Docs/out/FrameData.js.html | 392 + Docs/out/Game.html | 135 - Docs/out/Game.js.html | 634 + Docs/out/Group-Phaser.Group.html | 680 - Docs/out/Group.html | 135 - Docs/out/Group.js.html | 1308 ++ Docs/out/Group_.html | 135 - Docs/out/Parser.html | 133 - Docs/out/Parser.js.html | 477 + Docs/out/Phaser.Animation.Frame.html | 1594 +-- Docs/out/Phaser.Animation.FrameData.html | 3098 ++--- Docs/out/Phaser.Animation.Parser.html | 603 +- Docs/out/Phaser.Animation.html | 3679 ++++-- Docs/out/Phaser.AnimationManager.html | 4022 +++--- Docs/out/Phaser.Camera.html | 2757 ++++ ...Game-Phaser.Game.html => Phaser.Game.html} | 7734 ++++++----- Docs/out/Phaser.Group.html | 10924 +++++++++------- Docs/out/Phaser.html | 143 - Docs/out/Phaser.js.html | 200 + Docs/out/classes.list.html | 254 + Docs/out/global.html | 1259 +- Docs/out/img/glyphicons-halflings-white.png | Bin 0 -> 8777 bytes Docs/out/img/glyphicons-halflings.png | Bin 0 -> 12799 bytes Docs/out/index.html | 177 +- Docs/out/module-Phaser.html | 217 +- Docs/out/modules.list.html | 254 + Docs/out/scripts/URI.js | 1429 ++ Docs/out/scripts/bootstrap-dropdown.js | 165 + Docs/out/scripts/bootstrap-tab.js | 144 + Docs/out/scripts/jquery.localScroll.js | 130 + Docs/out/scripts/jquery.min.js | 3522 +++++ Docs/out/scripts/jquery.scrollTo.js | 217 + Docs/out/scripts/jquery.sunlight.js | 18 + Docs/out/scripts/prettify/jquery.min.js | 6 + Docs/out/scripts/prettify/lang-css.js | 23 +- Docs/out/scripts/prettify/prettify.js | 524 +- Docs/out/scripts/sunlight-plugin.doclinks.js | 91 + .../scripts/sunlight-plugin.linenumbers.js | 104 + Docs/out/scripts/sunlight-plugin.menu.js | 159 + Docs/out/scripts/sunlight.javascript.js | 183 + Docs/out/scripts/sunlight.js | 1157 ++ Docs/out/scripts/toc.js | 100 + Docs/out/styles/darkstrap.css | 960 ++ Docs/out/styles/site.amelia.css | 6349 +++++++++ Docs/out/styles/site.cerulean.css | 5675 ++++++++ Docs/out/styles/site.cosmo.css | 5910 +++++++++ Docs/out/styles/site.cyborg.css | 6104 +++++++++ Docs/out/styles/site.darkstrap.css | 5638 ++++++++ Docs/out/styles/site.flatly.css | 5949 +++++++++ Docs/out/styles/site.journal.css | 5719 ++++++++ Docs/out/styles/site.readable.css | 5407 ++++++++ Docs/out/styles/site.simplex.css | 5732 ++++++++ Docs/out/styles/site.slate.css | 6178 +++++++++ Docs/out/styles/site.spacelab.css | 5734 ++++++++ Docs/out/styles/site.spruce.css | 5889 +++++++++ Docs/out/styles/site.superhero.css | 6074 +++++++++ Docs/out/styles/site.united.css | 5519 ++++++++ Docs/out/styles/sunlight.dark.css | 345 + Docs/out/styles/sunlight.default.css | 344 + src/Phaser.js | 1 - src/animation/Animation.js | 52 +- src/animation/AnimationManager.js | 53 +- src/animation/Frame.js | 4 +- src/animation/FrameData.js | 34 +- src/animation/Parser.js | 13 +- src/core/Camera.js | 76 +- src/core/Game.js | 31 +- src/core/Group.js | 137 +- src/core/LinkedList.js | 4 + src/core/Plugin.js | 11 +- src/core/PluginManager.js | 11 +- src/core/Signal.js | 6 +- src/core/State.js | 16 + 163 files changed, 214647 insertions(+), 24495 deletions(-) create mode 100644 Docs/docstrap-master/.gitignore create mode 100644 Docs/docstrap-master/.npmignore create mode 100644 Docs/docstrap-master/Gruntfile.js create mode 100644 Docs/docstrap-master/LICENSE.md create mode 100644 Docs/docstrap-master/README.md create mode 100644 Docs/docstrap-master/bower.json create mode 100644 Docs/docstrap-master/component.json create mode 100644 Docs/docstrap-master/fixtures/car.js create mode 100644 Docs/docstrap-master/fixtures/example.conf.json create mode 100644 Docs/docstrap-master/fixtures/other.js create mode 100644 Docs/docstrap-master/fixtures/person.js create mode 100644 Docs/docstrap-master/fixtures/tutorials/Brush Teeth.md create mode 100644 Docs/docstrap-master/fixtures/tutorials/Drive Car.md create mode 100644 Docs/docstrap-master/package.json create mode 100644 Docs/docstrap-master/styles/bootswatch.less create mode 100644 Docs/docstrap-master/styles/main.less create mode 100644 Docs/docstrap-master/styles/variables.less create mode 100644 Docs/docstrap-master/template/jsdoc.conf.json create mode 100644 Docs/docstrap-master/template/publish.js create mode 100644 Docs/docstrap-master/template/static/img/glyphicons-halflings-white.png create mode 100644 Docs/docstrap-master/template/static/img/glyphicons-halflings.png create mode 100644 Docs/docstrap-master/template/static/scripts/URI.js create mode 100644 Docs/docstrap-master/template/static/scripts/bootstrap-dropdown.js create mode 100644 Docs/docstrap-master/template/static/scripts/bootstrap-tab.js create mode 100644 Docs/docstrap-master/template/static/scripts/jquery.localScroll.js create mode 100644 Docs/docstrap-master/template/static/scripts/jquery.min.js create mode 100644 Docs/docstrap-master/template/static/scripts/jquery.scrollTo.js create mode 100644 Docs/docstrap-master/template/static/scripts/jquery.sunlight.js create mode 100644 Docs/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt create mode 100644 Docs/docstrap-master/template/static/scripts/prettify/jquery.min.js create mode 100644 Docs/docstrap-master/template/static/scripts/prettify/lang-css.js create mode 100644 Docs/docstrap-master/template/static/scripts/prettify/prettify.js create mode 100644 Docs/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js create mode 100644 Docs/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js create mode 100644 Docs/docstrap-master/template/static/scripts/sunlight-plugin.menu.js create mode 100644 Docs/docstrap-master/template/static/scripts/sunlight.javascript.js create mode 100644 Docs/docstrap-master/template/static/scripts/sunlight.js create mode 100644 Docs/docstrap-master/template/static/scripts/toc.js create mode 100644 Docs/docstrap-master/template/static/styles/darkstrap.css create mode 100644 Docs/docstrap-master/template/static/styles/prettify-tomorrow.css create mode 100644 Docs/docstrap-master/template/static/styles/site.amelia.css create mode 100644 Docs/docstrap-master/template/static/styles/site.cerulean.css create mode 100644 Docs/docstrap-master/template/static/styles/site.cosmo.css create mode 100644 Docs/docstrap-master/template/static/styles/site.cyborg.css create mode 100644 Docs/docstrap-master/template/static/styles/site.darkstrap.css create mode 100644 Docs/docstrap-master/template/static/styles/site.flatly.css create mode 100644 Docs/docstrap-master/template/static/styles/site.journal.css create mode 100644 Docs/docstrap-master/template/static/styles/site.readable.css create mode 100644 Docs/docstrap-master/template/static/styles/site.simplex.css create mode 100644 Docs/docstrap-master/template/static/styles/site.slate.css create mode 100644 Docs/docstrap-master/template/static/styles/site.spacelab.css create mode 100644 Docs/docstrap-master/template/static/styles/site.spruce.css create mode 100644 Docs/docstrap-master/template/static/styles/site.superhero.css create mode 100644 Docs/docstrap-master/template/static/styles/site.united.css create mode 100644 Docs/docstrap-master/template/static/styles/sunlight.dark.css create mode 100644 Docs/docstrap-master/template/static/styles/sunlight.default.css create mode 100644 Docs/docstrap-master/template/tmpl/container.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/details.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/example.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/examples.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/exceptions.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/fires.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/layout.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/mainpage.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/members.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/method.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/params.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/properties.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/returns.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/sections.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/source.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/tutorial.tmpl create mode 100644 Docs/docstrap-master/template/tmpl/type.tmpl delete mode 100644 Docs/out/Animation-Phaser.Animation.Frame.html delete mode 100644 Docs/out/Animation-Phaser.Animation.FrameData.html delete mode 100644 Docs/out/Animation-Phaser.Animation.html delete mode 100644 Docs/out/Animation.html create mode 100644 Docs/out/Animation.js.html create mode 100644 Docs/out/AnimationManager.js.html delete mode 100644 Docs/out/Camera-Phaser.Camera.html delete mode 100644 Docs/out/Camera.html create mode 100644 Docs/out/Camera.js.html delete mode 100644 Docs/out/Frame-Phaser.Animation.Frame.html delete mode 100644 Docs/out/Frame.html create mode 100644 Docs/out/Frame.js.html delete mode 100644 Docs/out/FrameData-Phaser.Animation.FrameData.html delete mode 100644 Docs/out/FrameData.html create mode 100644 Docs/out/FrameData.js.html delete mode 100644 Docs/out/Game.html create mode 100644 Docs/out/Game.js.html delete mode 100644 Docs/out/Group-Phaser.Group.html delete mode 100644 Docs/out/Group.html create mode 100644 Docs/out/Group.js.html delete mode 100644 Docs/out/Group_.html delete mode 100644 Docs/out/Parser.html create mode 100644 Docs/out/Parser.js.html create mode 100644 Docs/out/Phaser.Camera.html rename Docs/out/{Game-Phaser.Game.html => Phaser.Game.html} (66%) delete mode 100644 Docs/out/Phaser.html create mode 100644 Docs/out/Phaser.js.html create mode 100644 Docs/out/classes.list.html create mode 100644 Docs/out/img/glyphicons-halflings-white.png create mode 100644 Docs/out/img/glyphicons-halflings.png create mode 100644 Docs/out/modules.list.html create mode 100644 Docs/out/scripts/URI.js create mode 100644 Docs/out/scripts/bootstrap-dropdown.js create mode 100644 Docs/out/scripts/bootstrap-tab.js create mode 100644 Docs/out/scripts/jquery.localScroll.js create mode 100644 Docs/out/scripts/jquery.min.js create mode 100644 Docs/out/scripts/jquery.scrollTo.js create mode 100644 Docs/out/scripts/jquery.sunlight.js create mode 100644 Docs/out/scripts/prettify/jquery.min.js create mode 100644 Docs/out/scripts/sunlight-plugin.doclinks.js create mode 100644 Docs/out/scripts/sunlight-plugin.linenumbers.js create mode 100644 Docs/out/scripts/sunlight-plugin.menu.js create mode 100644 Docs/out/scripts/sunlight.javascript.js create mode 100644 Docs/out/scripts/sunlight.js create mode 100644 Docs/out/scripts/toc.js create mode 100644 Docs/out/styles/darkstrap.css create mode 100644 Docs/out/styles/site.amelia.css create mode 100644 Docs/out/styles/site.cerulean.css create mode 100644 Docs/out/styles/site.cosmo.css create mode 100644 Docs/out/styles/site.cyborg.css create mode 100644 Docs/out/styles/site.darkstrap.css create mode 100644 Docs/out/styles/site.flatly.css create mode 100644 Docs/out/styles/site.journal.css create mode 100644 Docs/out/styles/site.readable.css create mode 100644 Docs/out/styles/site.simplex.css create mode 100644 Docs/out/styles/site.slate.css create mode 100644 Docs/out/styles/site.spacelab.css create mode 100644 Docs/out/styles/site.spruce.css create mode 100644 Docs/out/styles/site.superhero.css create mode 100644 Docs/out/styles/site.united.css create mode 100644 Docs/out/styles/sunlight.dark.css create mode 100644 Docs/out/styles/sunlight.default.css diff --git a/Docs/conf.json b/Docs/conf.json index dab97499..323aac3a 100644 --- a/Docs/conf.json +++ b/Docs/conf.json @@ -3,21 +3,38 @@ "allowUnknownTags": true }, "source": { + "Xinclude": [ "../src/Phaser.js", "../src/animation/", "../src/core/Camera.js", "../src/core/Game.js", "../src/core/Group.js", "../src/core/LinkedList.js", "../src/core/Plugin.js", "../src/core/PluginManager.js" ], "include": [ "../src/Phaser.js", "../src/animation/", "../src/core/Camera.js", "../src/core/Game.js", "../src/core/Group.js" ], "exclude": [], "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" }, - "plugins": [], + "plugins" : ["plugins/markdown"], "templates": { - "cleverLinks": false, - "monospaceLinks": false + "cleverLinks" : false, + "monospaceLinks" : false, + "default" : { + "outputSourceFiles" : true + }, + "systemName" : "Phaser", + "footer" : "", + "copyright" : "Phaser Copyright © 2012-2013 Photon Storm Ltd.", + "navType" : "vertical", + "theme" : "cerulean", + "linenums" : true, + "collapseSymbols" : false, + "inverseNav" : true + }, + "markdown" : { + "parser" : "gfm", + "hardwrap" : true }, "opts": { + "template": "docstrap-master/template/", "encoding": "utf8", "destination": "./out/", "recurse": true, "private": false, - "lenient": true, + "lenient": true } } \ No newline at end of file diff --git a/Docs/docstrap-master/.gitignore b/Docs/docstrap-master/.gitignore new file mode 100644 index 00000000..85fb5cfa --- /dev/null +++ b/Docs/docstrap-master/.gitignore @@ -0,0 +1,11 @@ +node_modules* +components* +*.map +.idea* +ringojs-0.9* +dox* +testdocs* +themes* + + + diff --git a/Docs/docstrap-master/.npmignore b/Docs/docstrap-master/.npmignore new file mode 100644 index 00000000..c42e1be6 --- /dev/null +++ b/Docs/docstrap-master/.npmignore @@ -0,0 +1,6 @@ +node_modules* +components* +*.map +.idea* +npm-debug.log + diff --git a/Docs/docstrap-master/Gruntfile.js b/Docs/docstrap-master/Gruntfile.js new file mode 100644 index 00000000..6e6ee3bd --- /dev/null +++ b/Docs/docstrap-master/Gruntfile.js @@ -0,0 +1,364 @@ +"use strict"; +/** + * @fileOverview Gruntfile tasks. These tasks are intended to help you when modifying the template. If you are + * just using the template, don't sweat this stuff. To use these tasks, you must install grunt, if you haven't already, + * and install the dependencies. All of this requires node.js, of course. + * + * Install grunt: + * + * npm install -g grunt-cli + * + * Then in the directory where you found this file: + * + * npm install + * + * And you are all set. See the individual tasks for details. + * + * @module Gruntfile + * @requires path + * @requires lodash + * @requires http + * @requires async + * @requires fs + */ +var path = require( "path" ); +var sys = require( "lodash" ); +var http = require( "http" ); +var async = require( "async" ); +var fs = require( "fs" ); + +// this rather odd arrangement of composing tasks like this to make sure this works on both +// windows and linux correctly. We can't depend on Grunt or Node to normalize +// paths for us because we shell out to make this work. So we gather up +// our relative paths here, normalize them later and then pass them into +// the shell to be run by JSDoc3. + +/** + * The definition to run the development test files. This runs the files in `fixtures` with the + * project's `conf.json` file. + * @private + */ +var jsdocTestPages = { + src : ["./fixtures/*.js", "./README.md"], + dest : "./testdocs", + tutorials : "./fixtures/tutorials", + template : "./template", + config : "./template/jsdoc.conf.json", + options : " --lenient --verbose" +}; +/** + * The definition to run the sample files. This runs the files in `fixtures` with the + * sample's `conf.json` file. No task directly exposes this configuration. The `fixtures` task + * modifies this for each swatch it finds and then run the docs command against it. + * @private + */ +var jsdocExamplePages = { + src : ["./fixtures/*.js", "./README.md"], + dest : "./themes", + tutorials : "", + template : "./template", + config : "./fixtures/example.conf.json", + options : " --lenient --verbose --recurse" +}; + +/** + * This definition provides the project's main, published documentation. + * @private + */ +var projectDocs = { + src : ["./Gruntfile*.js", "./README.md", "./template/publish.js"], + dest : "./dox", + tutorials : "", + template : "./template", + config : "./template/jsdoc.conf.json", + options : " --lenient --verbose --recurse --private" +}; + +/** + * Normalizes all paths from a JSDoc task definition and and returns an executable string that can be passed to the shell. + * @param {object} jsdoc A JSDoc definition + * @returns {string} + */ +function jsdocCommand( jsdoc ) { + var cmd = []; + cmd.unshift( jsdoc.options ); + if ( jsdoc.tutorials.length > 0 ) { + cmd.push( "-u " + path.resolve( jsdoc.tutorials ) ); + } + cmd.push( "-d " + path.resolve( jsdoc.dest ) ); + cmd.push( "-t " + path.resolve( jsdoc.template ) ); + cmd.push( "-c " + path.resolve( jsdoc.config ) ); + sys.each( jsdoc.src, function ( src ) { + cmd.push( path.resolve( src ) ); + } ); + cmd.unshift( path.resolve( "./node_modules/jsdoc/jsdoc" ) ); + return cmd.join( " " ); +} + +var tasks = { + shell : { + options : { + stdout : true, + stderr : true + }, + /** + * TASK: Create the a documentation set for testing changes to the template + * @name shell:testdocs + * @memberOf module:Gruntfile + */ + testdocs : { + command : jsdocCommand( jsdocTestPages ) + }, + /** + * TASK: Create project documentation + * @name shell:dox + * @memberOf module:Gruntfile + */ + dox : { + command : jsdocCommand( projectDocs ) + } + }, + /** + * TASK: The less task creates the themed css file from main.less. The file is written to the template styles + * directory as site.[name of theme].css. Later the .conf file will look for the theme to apply based + * on this naming convention. + * @name less + * @memberOf module:Gruntfile + */ + less : { + dev : { + files : { + "template/static/styles/site.<%= jsdocConf.templates.theme %>.css" : "styles/main.less" + } + } + }, + copy : { + docs : { + files : [ + {expand : true, cwd : "dox/", src : ['**'], dest : '../docstrap-dox/'}, + {expand : true, cwd : "themes/", src : ['**'], dest : '../docstrap-dox/themes'} + ] + } + } +}; + +module.exports = function ( grunt ) { + tasks.jsdocConf = grunt.file.readJSON( 'template/jsdoc.conf.json' ); + grunt.initConfig( tasks ); + + grunt.loadNpmTasks( 'grunt-contrib-less' ); + grunt.loadNpmTasks( 'grunt-shell' ); + grunt.loadNpmTasks( 'grunt-contrib-copy' ); + + grunt.registerTask( "default", ["docs"] ); + + /** + * Builds the project's documentation + * @name docs + * @memberof module:Gruntfile + */ + grunt.registerTask( "docs", "Create the project documentation", ["shell:dox"] ); + /** + * Compile the CSS and create the project documentation + * @name dev + * @memberof module:Gruntfile + */ + grunt.registerTask( "dev", "Compile the CSS and create the project documentation", ["less","shell:dox"] ); + /** + * TASK: Builds the main less file and then generates the test documents + * @name testdocs + * @memberof module:Gruntfile + */ + grunt.registerTask( "testdocs", "Builds the main less file and then generates the test documents", ["less:dev", "shell:testdocs"] ); + /** + * TASK: Builds the whole shebang. Which means creating testdocs, the bootswatch fixtures and then resetting the + * styles directory. + * @name build + * @memberof module:Gruntfile + */ + grunt.registerTask( "build", "Builds the whole shebang. Which means creating testdocs, the bootswatch samples and then resetting the styles directory", ["testdocs", "shell:dox", "bootswatch", "examples", "apply", "copy"] ); + /** + * TASK: Applies the theme in the conf file and applies it to the styles directory. + * @name apply + * @memberof module:Gruntfile + */ + grunt.registerTask( "apply", "Applies the theme in the conf file and applies it to the styles directory", function () { + var def = { + less : "http://bootswatch.com/" + tasks.jsdocConf.templates.theme + "/bootswatch.less", + lessVariables : "http://bootswatch.com/" + tasks.jsdocConf.templates.theme + "/variables.less" + }; + grunt.registerTask( "swatch-apply", sys.partial( applyTheme, grunt, def ) ); + grunt.task.run( ["swatch-apply"] ); + } ); + /** + * TASK: Grab all Bootswatch themes and create css from each one based on the main.less in the styles directory. NOTE that this will + * leave the last swatch downloaded in the styles directory, you will want to call "apply" afterwards + * @name bootswatch + * @memberof module:Gruntfile + */ + grunt.registerTask( "bootswatch", "Grab all Bootswatch themes and create css from each one based on the main.less in the styles directory", function () { + var toRun = []; + + var done = this.async(); + getBootSwatchList( function ( err, list ) { + if ( err ) {return done( err );} + + sys.each( list.themes, function ( entry ) { + + toRun.push( "swatch" + entry.name ); + grunt.registerTask( "swatch" + entry.name, sys.partial( applyTheme, grunt, entry ) ); + + var key = "template/static/styles/site." + entry.name.toLowerCase() + ".css"; + var def = {}; + def[key] = "styles/main.less"; + tasks.less["swatch" + entry.name] = { + files : def + }; + toRun.push( "less:swatch" + entry.name ); + } ); + grunt.task.run( toRun ); + done(); + } ); + + } ); + /** + * TASK:Create fixtures from the themes. The files must have been built first from the bootswatch task. + * @name examples + * @memberof module:Gruntfile + */ + grunt.registerTask( "examples", "Create samples from the themes", function () { + var toRun = []; + var done = this.async(); + getBootSwatchList( function ( err, list ) { + if ( err ) {return done( err );} + + sys.each( list.themes, function ( entry ) { + var conf = grunt.file.readJSON( './fixtures/example.conf.json' ); + conf.templates.theme = entry.name.toLowerCase(); + grunt.file.write( "tmp/example.conf." + conf.templates.theme + ".json", JSON.stringify( conf, null, 4 ) ); + + var jsdenv = sys.cloneDeep( jsdocExamplePages ); + jsdenv.config = "./tmp/example.conf." + conf.templates.theme + ".json"; + jsdenv.dest = "./themes/" + conf.templates.theme; + tasks.shell["example" + conf.templates.theme] = { + command : jsdocCommand( jsdenv ) + }; + toRun.push( "shell:example" + conf.templates.theme ); + } ); + + grunt.registerTask( "cleanup", "", function () { + grunt.file["delete"]( "tmp/" ); + } ); + toRun.push( "cleanup" ); + grunt.task.run( toRun ); + done(); + } ); + + } ); +}; + +/** + * Applies one of the Bootswatch themes to the working `styles` directory. When you want to modify a particular theme, this where you + * get the basis for it. The files are written to `./styles/variables.less` and `./styles/bootswatch.less`. The `./styles/main.less` + * file includes them directly, so after you apply the theme, modify `main.less` to your heart's content and then run the `less` task + * as in + * + * grunt less + * + * @param {object} grunt The grunt object reference + * @param {object} definition The swatch definition files + * @param {string} definition.less The url to the `bootswatch.less` file + * @param {string} definition.lessVariables The url to the `variables.less` file + * @private + */ +function applyTheme( grunt, definition ) { + //noinspection JSHint + var done = this.async(); + async.waterfall( [ + function ( cb ) { + getBootSwatchComponent( definition.less, function ( err, swatch ) { + if ( err ) {return cb( err );} + var fullPath = path.join( __dirname, "styles/bootswatch.less" ); + fs.writeFile( fullPath, swatch.replace("http://", "//"), cb ); + } ); + }, + function ( cb ) { + getBootSwatchComponent( definition.lessVariables, function ( err, swatch ) { + if ( err ) {return cb( err );} + var fullPath = path.join( __dirname, "styles/variables.less" ); + fs.writeFile( fullPath, swatch.replace("http://", "//"), cb ); + } ); + } + ], done ); +} + +/** + * Gets the list of available Bootswatches from, well, Bootswatch. + * + * @see http://news.bootswatch.com/post/22193315172/bootswatch-api + * @param {function(err, responseBody)} done The callback when complete + * @param {?object} done.err If an error occurred, you will find it here. + * @param {object} done.responseBody This is a parsed edition of the bootswatch server's response. It's format it defined + * by the return message from [here](http://api.bootswatch.com/) + * @private + */ +function getBootSwatchList( done ) { + var options = { + hostname : 'api.bootswatch.com', + port : 80, + path : '/', + method : 'GET' + }; + var body = ""; + var req = http.request( options, function ( res ) { + res.setEncoding( 'utf8' ); + res.on( 'data', function ( chunk ) { + body += chunk; + } ); + + res.on( 'end', function () { + done( null, JSON.parse( body ) ); + } ); + res.on( 'error', function ( e ) { + done( 'problem with response: ' + e.message ); + } ); + } ); + + req.on( 'error', function ( e ) { + done( 'problem with request: ' + e.message ); + } ); + req.end(); +} + +/** + * This method will get one of the components from Bootswatch, which is generally a `less` file or a `lessVariables` file. + * + * @see http://news.bootswatch.com/post/22193315172/bootswatch-api + * @param {string} url The url to retreive from + * @param {function(err, responseText)} done The callback when complete + * @param {?object} done.err If an error occurred, you will find it here. + * @param {string} done.responseText The body of whatever was returned + * @private + */ +function getBootSwatchComponent( url, done ) { + var body = ""; + var req = http.request( url, function ( res ) { + res.setEncoding( 'utf8' ); + res.on( 'data', function ( chunk ) { + body += chunk; + } ); + + res.on( 'end', function () { + done( null, body ); + } ); + res.on( 'error', function ( e ) { + done( 'problem with response: ' + e.message ); + } ); + } ); + + req.on( 'error', function ( e ) { + done( 'problem with request: ' + e.message ); + } ); + req.end(); +} + diff --git a/Docs/docstrap-master/LICENSE.md b/Docs/docstrap-master/LICENSE.md new file mode 100644 index 00000000..f3cc7238 --- /dev/null +++ b/Docs/docstrap-master/LICENSE.md @@ -0,0 +1,22 @@ +Copyright (c) 2012-13 Terry Weiss. All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Docs/docstrap-master/README.md b/Docs/docstrap-master/README.md new file mode 100644 index 00000000..d47d0974 --- /dev/null +++ b/Docs/docstrap-master/README.md @@ -0,0 +1,200 @@ +# DocStrap # + +DocStrap is [Bootstrap](http://twitter.github.io/bootstrap/index.html) based template for [JSDoc3](http://usejsdoc.org/). +In addition, it includes all of the themes from [Bootswatch](http://bootswatch.com/) giving you a great deal of look +and feel options for your documentation. Additionally, it adds some options to the conf.json file that gives +you even more flexibility to tweak the template to your needs. It will also make your teeth whiter. + +## Features ## +* Fixed navigation at page top +* Right side TOC for navigation in pages +* Themed +* Customizable + +### What It Looks Like ### +Here are examples of this template with the different Bootswatch themes: + ++ [Amelia](http://terryweiss.github.io/docstrap/themes/amelia) ++ [Cerulean](http://terryweiss.github.io/docstrap/themes/cerulean) ++ [Cosmo](http://terryweiss.github.io/docstrap/themes/cosmo) ++ [Cyborg](http://terryweiss.github.io/docstrap/themes/cyborg) ++ [Flatly](http://terryweiss.github.io/docstrap/themes/flatly) ++ [Journal](http://terryweiss.github.io/docstrap/themes/journal) ++ [Readable](http://terryweiss.github.io/docstrap/themes/readable) ++ [Simplex](http://terryweiss.github.io/docstrap/themes/simplex) ++ [Slate](http://terryweiss.github.io/docstrap/themes/slate) ++ [Spacelab](http://terryweiss.github.io/docstrap/themes/spacelab) ++ [Spruce](http://terryweiss.github.io/docstrap/themes/spruce) ++ [Superhero](http://terryweiss.github.io/docstrap/themes/superhero) ++ [United](http://terryweiss.github.io/docstrap/themes/united) + +To change your theme, just change it in the `conf.json` file. See below for details. +## Ooooh, I want it! How do I get it?## +First grab the [zip file from github.](https://github.com/terryweiss/docstrap/archive/master.zip) Unzip it +to your favorite hard drive and ask JSDoc to use it. Like so: + + /jsoc mysourcefiles/* -t /template -c /conf.json -d / + +Also take a gander at [JSDoc's command line options](http://usejsdoc.org/about-commandline.html). + +## Configuring the template ## + +DocStrap ships with a `conf.json` file in the template/ directory. It is just a regular old +[JSDoc configuration file](http://usejsdoc.org/about-configuring-jsdoc.html), but with the following new options: +``` +"templates": { + "systemName" : "{string}", + "footer" : "{string}", + "copyright" : "{string}", + "navType" : "{vertical|inline}", + "theme" : "{theme}", + "linenums" : {boolean}, + "collapseSymbols" : {boolean}, + "inverseNav" : {boolean} +} +``` +### Options ### + +* __systemName__ + The name of the system being documented. This will appear in the page title for each page +* __footer__ + Any markup want to appear in the footer of each page. This is not processed at all, just printed exactly as you enter it +* __copyright__ + You can add a copyright message below the _footer_ and above the JSDoc timestamp at the bottom of the page +* __navType__ + The template uses top level navigation with dropdowns for the contents of each category. On large systems these dropdowns + can get large enough to expand beyond the page. To make the dropdowns render wider and stack the entries vertically, set this + option to `"inline"`. Otherwise set it to `"vertical"` to make them regular stacked dropdowns. +* __theme__ + This is the name of the them you want to use **in all lowercase**. The valid options are + + `amelia` + + `cerulean` + + `cosmo` + + `cyborg` + + `flatly` + + `journal` + + `readable` + + `simplex` + + `slate` + + `spacelab` + + `spruce` + + `superhero` + + `united` +* __linenums__ + When true, line numbers will appear in the source code listing. If you have + [also turned that on](http://usejsdoc.org/about-configuring-jsdoc.html). +* __collapseSymbols__ + If your pages have a large number of symbols, it can be easy to get lost in all the text. If you turn this to `true` + all of the symbols in the page will roll their contents up so that you just get a list of symbols that can be expanded + and collapsed. +* __inverseNav__ + Bootstrap navbars come in two flavors, regular and inverse where inverse is generally higher contrast. Set this to `true` to + use the inverse header. + +## Customizing DocStrap ## +No template can meet every need and customizing templates is a favorite pastime of....well, no-one, but you may need to anyway. +First make sure you have [bower](https://github.com/bower/bower) and [grunt-cli](https://github.com/gruntjs/grunt-cli) installed. +Fetch the source using `git` or grab the [zip file from github.](https://github.com/terryweiss/docstrap/archive/master.zip) and unzip +it somewhere. Everything that follows happens in the unzip directory. + +Next, prepare the environment: + + bower install + +and + + grunt install + +When that is done, you have all of the tools to start modifying the template. The template, like Bootstrap, used [less](http://lesscss.org/). +The way it works is that `./styles/main.less` pulls in the bootstrap files uncompiled so that you have access to all of bootstraps mixins, colors, +etc, that you would want. There are two more files in that directory, `variables.less`, `bootswatch.less`. These are the +theme files and you can modify them, but keep in mind that if you apply a new theme (see below) those files will be overwritten. It is best +to keep your changes to the `main.less` file. + +To compile your changes to `main.less` and any other files it loads up, + + grunt less + +The output is will be put in `./template/static/styles/site..css`. The next time you create your documentation, it +will have the new css file included. + +To apply a different template to the `styles` directory to modify, open up the `conf.json` in the template directory and +change the `theme` option to the theme you want. Then + + grunt apply + +And the new theme will be in `variables.less`, `bootswatch.less`. Don't forget to compile your changes using `grunt apply` to +get that change into the template. + +**NOTE** that these steps are not necessary to just change the theme, this is only to modify the theme. If all you want to do is +change the theme, just update conf.json with the new theme and build your docs! + +## Contributing ## +Yes! Contribute! Test! Share your ideas! Report Bugs! + +## Roadmap ## + +* Integrate Darkstrap +* Make plain old bootstrap an option (doh!) +* ~~Jump to source line numbers~~ +* Document publish.js + + +## History ## + +### v0.2.0 ### + +* Added jump to source linenumers - still a problem scrolling with fixed header +* changed syntax highlighter to [sunlight](http://sunlightjs.com/) +* Modify incoming bootswatch files to make font calls without protocol. + +### v0.1.0 ### +Initial release + + +## Notices ## +If you like DocStrap, be sure and check out these excellent projects and support them! + +[JSDoc3 is licensed under the Apache License](https://github.com/jsdoc3/jsdoc/blob/master/LICENSE.md) + +[So is Bootstrap](https://github.com/twitter/bootstrap/blob/master/LICENSE) + +[And Bootswatch](https://github.com/thomaspark/bootswatch/blob/gh-pages/LICENSE) + +[TOC is licensed under MIT](https://github.com/jgallen23/toc/blob/master/LICENSE) + +[Grunt is also MIT](https://github.com/gruntjs/grunt-cli/blob/master/LICENSE-MIT) + +DocStrap [is licensed under the MIT license.](https://github.com/terryweiss/docstrap/blob/master/LICENSE.md) + +[Sunlight uses the WTFPL](http://sunlightjs.com/) + +## License ## +DocStrap Copyright (c) 2012-2013Terry Weiss. All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + + + + + diff --git a/Docs/docstrap-master/bower.json b/Docs/docstrap-master/bower.json new file mode 100644 index 00000000..316e2488 --- /dev/null +++ b/Docs/docstrap-master/bower.json @@ -0,0 +1,12 @@ +{ + "name": "ink-docstrap", + "version": "0.1.0", + "dependencies": { + "bootstrap": "~2.3.1", + "jquery": "~2.0.0", + "darkstrap": "git://github.com/danneu/darkstrap.git#~0.9.2", + "toc": "~0.1.2", + "sunlight": "https://github.com/tmont/sunlight.git", + "jquery.localScroll": "~1.2.8" + } +} diff --git a/Docs/docstrap-master/component.json b/Docs/docstrap-master/component.json new file mode 100644 index 00000000..6abff80a --- /dev/null +++ b/Docs/docstrap-master/component.json @@ -0,0 +1,10 @@ +{ + "name": "ink-docstrap", + "version": "0.1.0", + "dependencies": { + "bootstrap": "~2.3.1", + "jquery": "~2.0.0", + "darkstrap": "git://github.com/danneu/darkstrap.git#~0.9.2", + "toc": "~0.1.2" + } +} diff --git a/Docs/docstrap-master/fixtures/car.js b/Docs/docstrap-master/fixtures/car.js new file mode 100644 index 00000000..f07c8878 --- /dev/null +++ b/Docs/docstrap-master/fixtures/car.js @@ -0,0 +1,45 @@ +"use strict" +/** + @fileOverview Donec sed sapien enim. Duis elementum arcu id velit mattis sed tincidunt dolor posuere. Cras dapibus varius metus et sollicitudin. Quisque egestas placerat lacus, at lobortis mauris volutpat in. Morbi eleifend, sapien ut lobortis malesuada, nulla arcu blandit risus, quis fringilla nunc leo ac turpis. Donec vitae gravida dolor. Pellentesque accumsan, erat ac rutrum sodales, neque odio pellentesque est, vitae rutrum lorem mauris vitae justo. Sed blandit egestas mi at fringilla. Morbi at metus feugiat magna tempor vulputate. Duis dictum sagittis neque quis tempor. Morbi id est ac orci dictum porta. Phasellus tempus adipiscing convallis. + @module docstrap/car + @author Gloria Swanson + @requires lodash + */ + + +/** + * Integer quis ante ut nulla cursus vehicula id eu dolor. Phasellus ut facilisis felis. Praesent eget metus id massa pretium lobortis a et metus. Aliquam erat volutpat. Nulla ac tortor odio, quis facilisis augue. In hendrerit, lectus mollis elementum vestibulum, velit nisi aliquet orci, vitae luctus risus dui sed nisi. Donec aliquam pretium leo sed ultrices. Duis porttitor pharetra vulputate. Aenean sed neque sit amet arcu auctor placerat eget ac tellus. Proin porttitor fringilla eros quis scelerisque. Aliquam erat volutpat. + * @constructor + * @param {Boolean} hybrid Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + * @example + * // Duis elementum arcu id velit mattis sed tincidunt dolor posuere. + * if (!(key in this.visited)) { + this.visited[key] = true; + + if (this.dependencies[key]) { + Object.keys(this.dependencies[key]).forEach(function(path) { + self.visit(path); + }); + } + + this.sorted.push(key); + } + */ +exports.Car = function (hybrid) { + + /** + * Aenean commodo lorem nec sapien suscipit quis hendrerit dui feugiat. Curabitur pretium congue sollicitudin. Nam eleifend ultricies libero vel iaculis. Maecenas vel elit vel lorem lacinia pellentesque. Vestibulum posuere suscipit lacus, sit amet volutpat erat sagittis vitae. Ut eleifend pretium nulla vitae tempor. + * @type {string} + */ + this.color = null; + +}; + + +/** + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi congue viverra placerat. Mauris mi nibh, pulvinar ut placerat sit amet, aliquam a diam. Maecenas vitae suscipit nulla. Sed at justo nec ante lobortis fermentum. Quisque sodales libero suscipit mi malesuada pretium. Cras a lectus vitae risus semper sagittis. Sed ultrices aliquet tempus. Nulla id nisi metus, sit amet elementum tortor. Nunc tempor sem quis augue tempor sed posuere nulla volutpat. Phasellus fringilla pulvinar lorem quis venenatis. + * @param {integer} speed Phasellus ut facilisis felis. + */ +exports.Car.prototype.drive = function ( speed ) { + +}; diff --git a/Docs/docstrap-master/fixtures/example.conf.json b/Docs/docstrap-master/fixtures/example.conf.json new file mode 100644 index 00000000..ed5b736f --- /dev/null +++ b/Docs/docstrap-master/fixtures/example.conf.json @@ -0,0 +1,22 @@ +{ + "tags": { + "allowUnknownTags": true + }, + "plugins": ["plugins/markdown"], + "templates": { + "cleverLinks": false, + "monospaceLinks": false, + "default": { + "outputSourceFiles": true + }, + "systemName": "DocStrap", + "footer": "", + "copyright": "Copyright © 2012-2103 Terry Weiss, Eery Wrists. All rights reserved.", + "navType": "vertical", + "theme": "cerulean" + } , + "markdown": { + "parser": "gfm", + "hardwrap": true + } +} diff --git a/Docs/docstrap-master/fixtures/other.js b/Docs/docstrap-master/fixtures/other.js new file mode 100644 index 00000000..a37b0175 --- /dev/null +++ b/Docs/docstrap-master/fixtures/other.js @@ -0,0 +1,50 @@ +/** + * Suspendisse orci massa, hendrerit sagittis lacinia consectetur, sagittis vitae purus. Aliquam id eros diam, eget elementum turpis. Nullam tellus magna, mollis in molestie id, venenatis rhoncus est. Proin id diam justo. Nunc tempus gravida justo at lobortis. Nam vitae venenatis nisi. Donec vel odio massa. Quisque interdum metus sit amet est iaculis tincidunt. Donec bibendum blandit purus, id semper orci aliquam quis. Nam tincidunt dolor eu felis ultricies tempor. Nulla non consectetur erat. + */ +function drift() { + +} + +/** + * Suspendisse orci massa, hendrerit sagittis lacinia consectetur, sagittis vitae purus. Aliquam id eros diam, eget elementum turpis. Nullam tellus magna, mollis in molestie id, venenatis rhoncus est. Proin id diam justo. Nunc tempus gravida justo at lobortis. Nam vitae venenatis nisi. Donec vel odio massa. Quisque interdum metus sit amet est iaculis tincidunt. Donec bibendum blandit purus, id semper orci aliquam quis. Nam tincidunt dolor eu felis ultricies tempor. Nulla non consectetur erat. + */ +function trailBrake() { + +} + +/** + * Suspendisse orci massa, hendrerit sagittis lacinia consectetur, sagittis vitae purus. Aliquam id eros diam, eget elementum turpis. Nullam tellus magna, mollis in molestie id, venenatis rhoncus est. Proin id diam justo. Nunc tempus gravida justo at lobortis. Nam vitae venenatis nisi. Donec vel odio massa. Quisque interdum metus sit amet est iaculis tincidunt. Donec bibendum blandit purus, id semper orci aliquam quis. Nam tincidunt dolor eu felis ultricies tempor. Nulla non consectetur erat. + * @param {integer} bias Nulla ultricies justo ac nisi consectetur posuere. Donec ornare pharetra erat, nec facilisis dui cursus quis. Quisque porttitor porttitor orci, sed facilisis urna facilisis sed. Sed tincidunt adipiscing turpis et hendrerit. Cras posuere orci ut mauris ullamcorper vitae laoreet nisi luctus. In rutrum tristique augue. Nam eleifend dignissim dui. + */ +function brakeBias( bias ) { + +} + +/** + * Suspendisse orci massa, hendrerit sagittis lacinia consectetur, sagittis vitae purus. Aliquam id eros diam, eget elementum turpis. Nullam tellus magna, mollis in molestie id, venenatis rhoncus est. Proin id diam justo. Nunc tempus gravida justo at lobortis. Nam vitae venenatis nisi. Donec vel odio massa. Quisque interdum metus sit amet est iaculis tincidunt. Donec bibendum blandit purus, id semper orci aliquam quis. Nam tincidunt dolor eu felis ultricies tempor. Nulla non consectetur erat. + * @param {module:docstrap/car.Car} car Nulla ultricies justo ac nisi consectetur posuere. Donec ornare pharetra erat, nec facilisis dui cursus quis. Quisque porttitor porttitor orci, sed facilisis urna facilisis sed. Sed tincidunt adipiscing turpis et hendrerit. Cras posuere orci ut mauris ullamcorper vitae laoreet nisi luctus. In rutrum tristique augue. Nam eleifend dignissim dui. + * @param {string} tires Donec viverra egestas tellus non viverra. Aenean est ante, egestas sed scelerisque quis, aliquet sed lacus. Praesent non mauris neque, et adipiscing ante. Vestibulum quis quam vitae ipsum aliquet blandit. Vivamus condimentum euismod orci, in tincidunt justo rutrum faucibus. Phasellus nec lorem arcu. Donec tortor dui, facilisis in rutrum sit amet, pulvinar vitae lacus. + * @param {number} fuel Proin sodales, mi at tincidunt ornare, mi dui sagittis velit, sed dictum risus orci eu erat. Sed nunc leo, congue sed rutrum eget, lobortis ac lectus. Etiam non arcu nulla. + */ +function start( car, tires, fuel ) {} + +/** + * Sed id tristique lorem. Ut sodales turpis nec mauris gravida interdum. Cras pellentesque, purus at suscipit euismod, elit nunc cursus nisi, ut venenatis metus sapien id velit. Sed lectus orci, pharetra non pulvinar vel, ullamcorper id lorem. Donec vulputate tincidunt ipsum, ut lacinia tortor sollicitudin id. Nunc nec nibh ut felis venenatis egestas. Proin risus mauris, eleifend eget interdum in, venenatis sed velit. Praesent sodales elit ut odio viverra posuere. Donec sapien lorem, molestie in egestas eget, vulputate sed orci. Aenean elit sapien, pellentesque vitae tempor sit amet, sagittis et ligula. Mauris aliquam sapien sit amet lacus ultrices rutrum. Curabitur nec dolor sed elit varius dignissim a a lacus. Aliquam ac convallis enim. + * @namespace + */ +var teams = {}; + +/** + * Nunc faucibus lacus eget odio ultricies nec ullamcorper risus pharetra. + * @mixin + */ +var insanity = { + /** + * ras ac justo dui, at faucibus urna. Nunc tristique, velit id feugiat fermentum, dolor enim egestas erat, at vestibulum ante ipsum vel orci. Duis quis ante id justo vehicula eleifend sed et urna. Sed sapien tortor, rutrum id ultrices eu, tincidunt tincidunt mi + */ + goCrazy : function () {}, + /** + * Donec viverra egestas tellus non viverra. Aenean est ante, egestas sed scelerisque quis, aliquet sed lacus. Praesent non mauris neque, et adipiscing ante. Vestibulum quis quam vitae ipsum aliquet blandit. + */ + goSane : function () {} +}; diff --git a/Docs/docstrap-master/fixtures/person.js b/Docs/docstrap-master/fixtures/person.js new file mode 100644 index 00000000..ea573a69 --- /dev/null +++ b/Docs/docstrap-master/fixtures/person.js @@ -0,0 +1,74 @@ +"use strict" +/** + @fileOverview Donec sed sapien enim. Duis elementum arcu id velit mattis sed tincidunt dolor posuere. Cras dapibus varius metus et sollicitudin. Quisque egestas placerat lacus, at lobortis mauris volutpat in. Morbi eleifend, sapien ut lobortis malesuada, nulla arcu blandit risus, quis fringilla nunc leo ac turpis. Donec vitae gravida dolor. Pellentesque accumsan, erat ac rutrum sodales, neque odio pellentesque est, vitae rutrum lorem mauris vitae justo. Sed blandit egestas mi at fringilla. Morbi at metus feugiat magna tempor vulputate. Duis dictum sagittis neque quis tempor. Morbi id est ac orci dictum porta. Phasellus tempus adipiscing convallis. + @module docstrap/person + @author Fred Flinstone + @requires lodash + @requires docstrap/person + */ + +/** + * Integer quis ante ut nulla cursus vehicula id eu dolor. Phasellus ut facilisis felis. Praesent eget metus id massa pretium lobortis a et metus. Aliquam erat volutpat. Nulla ac tortor odio, quis facilisis augue. In hendrerit, lectus mollis elementum vestibulum, velit nisi aliquet orci, vitae luctus risus dui sed nisi. Donec aliquam pretium leo sed ultrices. Duis porttitor pharetra vulputate. Aenean sed neque sit amet arcu auctor placerat eget ac tellus. Proin porttitor fringilla eros quis scelerisque. Aliquam erat volutpat. + * @constructor + */ +exports.Person = function () { + + /** + * Aenean commodo lorem nec sapien suscipit quis hendrerit dui feugiat. Curabitur pretium congue sollicitudin. Nam eleifend ultricies libero vel iaculis. Maecenas vel elit vel lorem lacinia pellentesque. Vestibulum posuere suscipit lacus, sit amet volutpat erat sagittis vitae. Ut eleifend pretium nulla vitae tempor. + * @type {number} + */ + this.eyes = 2; + /** + * Donec tempus vestibulum nunc. Fusce at eleifend nisi. Proin nisl odio, ultrices fermentum eleifend nec, pellentesque in massa. Cras id turpis diam, vitae fringilla turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam tempus urna in lacus semper sodales. Etiam a erat in augue rhoncus porta. Aenean nec odio lorem, a tristique dui. + * @type {number} + */ + this.nose = 1; + /** + * Vestibulum viverra magna nec lectus imperdiet in lacinia ante iaculis. Cras nec urna tellus, eget convallis mauris. Fusce volutpat elementum enim, vel fringilla orci elementum vehicula. Nunc in ultrices sem. Sed augue tortor, pellentesque sed suscipit sed, vehicula eu enim. + * @type {number} + */ + this.mouth = 1; +}; + +/** + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi congue viverra placerat. Mauris mi nibh, pulvinar ut placerat sit amet, aliquam a diam. Maecenas vitae suscipit nulla. Sed at justo nec ante lobortis fermentum. Quisque sodales libero suscipit mi malesuada pretium. Cras a lectus vitae risus semper sagittis. Sed ultrices aliquet tempus. Nulla id nisi metus, sit amet elementum tortor. Nunc tempor sem quis augue tempor sed posuere nulla volutpat. Phasellus fringilla pulvinar lorem quis venenatis. + * @param {boolean} speed Phasellus ut facilisis felis. + */ +exports.Person.prototype.walk = function ( speed ) { + +}; + +/** + * Aliquam interdum lectus ac diam tincidunt vitae fringilla justo faucibus. + * @param {Boolean} well Morbi sit amet tellus at justo tempus tristique. + * @param {function(err)} done Curabitur id nulla mauris, id hendrerit magna. + * @param {object=} done.err Sed pulvinar mollis arcu, at tempus dui egestas cursus. + */ +exports.Person.prototype.think = function ( well, done ) { + +}; + +/** + * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi congue viverra placerat. Mauris mi nibh, pulvinar ut placerat sit amet, aliquam a diam. Maecenas vitae suscipit nulla. Sed at justo nec ante lobortis fermentum. Quisque sodales libero suscipit mi malesuada pretium. Cras a lectus vitae risus semper sagittis. Sed ultrices aliquet tempus. Nulla id nisi metus, sit amet elementum tortor. Nunc tempor sem quis augue tempor sed posuere nulla volutpat. Phasellus fringilla pulvinar lorem quis venenatis. + * @returns {boolean} Sed id erat ut ipsum scelerisque venenatis at nec mauris. + * @fires module:docstrap/person.Person#sneeze + */ +exports.Person.prototype.tickle = function () { + +}; + +/** + * Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit. + * + * @event module:docstrap/person.Person#sneeze + * @type {object} + * @property {boolean} tissue Phasellus non justo a neque pharetra sagittis. + */ + +/** + * Nulla ultricies justo ac nisi consectetur posuere. Donec ornare pharetra erat, nec facilisis dui cursus quis. Quisque porttitor porttitor orci, sed facilisis urna facilisis sed. Sed tincidunt adipiscing turpis et hendrerit. Cras posuere orci ut mauris ullamcorper vitae laoreet nisi luctus. In rutrum tristique augue. Nam eleifend dignissim dui. + * @returns {exports.Person} + */ +exports.create = function(){ + +}; diff --git a/Docs/docstrap-master/fixtures/tutorials/Brush Teeth.md b/Docs/docstrap-master/fixtures/tutorials/Brush Teeth.md new file mode 100644 index 00000000..1ff4c061 --- /dev/null +++ b/Docs/docstrap-master/fixtures/tutorials/Brush Teeth.md @@ -0,0 +1,21 @@ +#Lorem ipsum dolor sit amet + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra, tellus et fermentum tincidunt, massa ligula dignissim augue, ut aliquam tortor odio in odio. In faucibus metus metus. Curabitur est mi, fermentum lacinia tincidunt vitae, mattis sit amet neque. Quisque diam nisl, accumsan ac porta tincidunt, iaculis facilisis ipsum. Nulla facilisi. Aenean a metus tortor. Pellentesque congue, mauris vitae viverra varius, elit nunc dictum nisl, rhoncus ultrices nulla sapien at leo. Duis ultricies porttitor diam. Nulla facilisi. Nullam elementum, lorem eu imperdiet laoreet, est turpis sollicitudin velit, in porttitor justo dolor vel urna. Mauris in ante magna. Curabitur vitae lacus in magna mollis commodo. + +Fusce lacinia, mauris ac aliquam consequat, lacus urna feugiat erat, id viverra mi mi sit amet tortor. Etiam ac ornare erat. Pellentesque et neque lacus, quis posuere orci. Fusce molestie blandit velit, sit amet dictum eros pharetra vitae. In erat urna, condimentum ac feugiat id, rutrum et nisi. Cras ac velit lorem. Nulla facilisi. Maecenas dignissim nulla in turpis tempus sed rhoncus augue dapibus. Nulla feugiat, urna non sagittis laoreet, dolor metus rhoncus justo, sed semper ante lacus eget quam. Sed ac ligula magna. Sed tincidunt pulvinar neque in porta. Nullam quis lacus orci. Pellentesque ornare viverra lacus, id aliquam magna venenatis a. + +Sed id tristique lorem. Ut sodales turpis nec mauris gravida interdum. Cras pellentesque, purus at suscipit euismod, elit nunc cursus nisi, ut venenatis metus sapien id velit. Sed lectus orci, pharetra non pulvinar vel, ullamcorper id lorem. Donec vulputate tincidunt ipsum, ut lacinia tortor sollicitudin id. Nunc nec nibh ut felis venenatis egestas. Proin risus mauris, eleifend eget interdum in, venenatis sed velit. Praesent sodales elit ut odio viverra posuere. Donec sapien lorem, molestie in egestas eget, vulputate sed orci. Aenean elit sapien, pellentesque vitae tempor sit amet, sagittis et ligula. Mauris aliquam sapien sit amet lacus ultrices rutrum. Curabitur nec dolor sed elit varius dignissim a a lacus. Aliquam ac convallis enim. + +Suspendisse orci massa, hendrerit sagittis lacinia consectetur, sagittis vitae purus. Aliquam id eros diam, eget elementum turpis. Nullam tellus magna, mollis in molestie id, venenatis rhoncus est. Proin id diam justo. Nunc tempus gravida justo at lobortis. Nam vitae venenatis nisi. Donec vel odio massa. Quisque interdum metus sit amet est iaculis tincidunt. Donec bibendum blandit purus, id semper orci aliquam quis. Nam tincidunt dolor eu felis ultricies tempor. Nulla non consectetur erat. + +Nunc faucibus lacus eget odio ultricies nec ullamcorper risus pharetra. Nunc nec consequat urna. Curabitur condimentum ante vitae erat tristique vitae gravida quam dapibus. Cras ac justo dui, at faucibus urna. Nunc tristique, velit id feugiat fermentum, dolor enim egestas erat, at vestibulum ante ipsum vel orci. Duis quis ante id justo vehicula eleifend sed et urna. Sed sapien tortor, rutrum id ultrices eu, tincidunt tincidunt mi. Etiam blandit, neque eget interdum dignissim, lacus ante facilisis dolor, non viverra dui lorem vitae nibh. Morbi volutpat augue eget nulla luctus eu aliquam sem facilisis. Pellentesque sollicitudin commodo dolor sit amet vestibulum. Nam dictum posuere quam, in tincidunt erat rutrum eu. + +Etiam nec turpis purus, at lacinia sem. In commodo lacinia euismod. Curabitur tincidunt congue leo, eget iaculis orci volutpat pharetra. Fusce dignissim lacus lacus. Integer consectetur lacus rutrum risus malesuada at consectetur erat rutrum. Sed magna ipsum, fringilla eget auctor non, fringilla nec massa. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum nec tortor id nisi luctus aliquam. Maecenas cursus tincidunt ornare. Nulla a vestibulum odio. Mauris malesuada commodo justo quis mattis. Suspendisse mauris ligula, placerat at egestas in, tincidunt quis nibh. Aliquam ullamcorper elit at augue cursus quis pellentesque purus viverra. + +Nulla ultricies justo ac nisi consectetur posuere. Donec ornare pharetra erat, nec facilisis dui cursus quis. Quisque porttitor porttitor orci, sed facilisis urna facilisis sed. Sed tincidunt adipiscing turpis et hendrerit. Cras posuere orci ut mauris ullamcorper vitae laoreet nisi luctus. In rutrum tristique augue. Nam eleifend dignissim dui. + +Donec viverra egestas tellus non viverra. Aenean est ante, egestas sed scelerisque quis, aliquet sed lacus. Praesent non mauris neque, et adipiscing ante. Vestibulum quis quam vitae ipsum aliquet blandit. Vivamus condimentum euismod orci, in tincidunt justo rutrum faucibus. Phasellus nec lorem arcu. Donec tortor dui, facilisis in rutrum sit amet, pulvinar vitae lacus. Nam sodales sem eu nunc scelerisque vitae ullamcorper dolor facilisis. Duis imperdiet nisi in magna tempor convallis. Fusce at metus augue. Quisque dictum tempus mauris, in mattis ligula dignissim ut. + +Proin sodales, mi at tincidunt ornare, mi dui sagittis velit, sed dictum risus orci eu erat. Sed nunc leo, congue sed rutrum eget, lobortis ac lectus. Etiam non arcu nulla. Vestibulum rutrum dolor pulvinar lorem posuere blandit. Sed quis sapien dui. Nunc sagittis erat commodo quam porta cursus in non erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin a molestie neque. Aliquam iaculis lacus sed neque hendrerit at dignissim ligula imperdiet. Suspendisse venenatis, lorem at luctus scelerisque, sem purus pellentesque sapien, vitae ornare ipsum quam nec dui. Mauris neque est, interdum nec pulvinar eget, dapibus eleifend tellus. Fusce non lorem tortor. Nullam eget nunc quis felis aliquam consectetur. Aliquam tristique, turpis in feugiat blandit, lectus erat condimentum tortor, non egestas nisl sapien eget nibh. + +Aliquam elit turpis, faucibus et porta et, egestas nec nibh. Sed nisl est, pharetra a eleifend a, pretium ac eros. Sed leo eros, pulvinar vel faucibus dictum, aliquet ut quam. Maecenas et felis non ligula fringilla pretium fringilla sit amet ante. Nam varius imperdiet interdum. Ut non metus mauris, vel volutpat lorem. Nullam sagittis est quis lacus feugiat fringilla. Quisque orci lorem, semper ac accumsan vitae, blandit quis velit. Proin luctus sodales ultrices. Fusce mauris erat, facilisis ut consectetur at, fringilla feugiat orci. Aliquam a nisi a neque interdum suscipit id eget purus. Pellentesque tincidunt justo ut urna posuere non molestie quam auctor. diff --git a/Docs/docstrap-master/fixtures/tutorials/Drive Car.md b/Docs/docstrap-master/fixtures/tutorials/Drive Car.md new file mode 100644 index 00000000..a1b0eb10 --- /dev/null +++ b/Docs/docstrap-master/fixtures/tutorials/Drive Car.md @@ -0,0 +1,10 @@ +#Lorem ipsum dolor sit amet + +Curabitur est mi, fermentum lacinia tincidunt vitae, mattis sit amet neque. Quisque diam nisl, accumsan ac porta tincidunt, iaculis facilisis ipsum. Nulla facilisi. Aenean a metus tortor. Pellentesque congue, mauris vitae viverra varius, elit nunc dictum nisl, rhoncus ultrices nulla sapien at leo. Duis ultricies porttitor diam. Nulla facilisi. Nullam elementum, lorem eu imperdiet laoreet, est turpis sollicitudin velit, in porttitor justo dolor vel urna. Mauris in ante magna. Curabitur vitae lacus in magna mollis commodo. + +##Fusce lacinia, mauris ac aliquam consequat +Fusce molestie blandit velit, sit amet dictum eros pharetra vitae. In erat urna, condimentum ac feugiat id, rutrum et nisi. Cras ac velit lorem. Nulla facilisi. Maecenas dignissim nulla in turpis tempus sed rhoncus augue dapibus. Nulla feugiat, urna non sagittis laoreet, dolor metus rhoncus justo, sed semper ante lacus eget quam. Sed ac ligula magna. Sed tincidunt pulvinar neque in porta. Nullam quis lacus orci. Pellentesque ornare viverra lacus, id aliquam magna venenatis a. + +Sed id tristique lorem. Ut sodales turpis nec mauris gravida interdum. Cras pellentesque, purus at suscipit euismod, elit nunc cursus nisi, ut venenatis metus sapien id velit. Sed lectus orci, pharetra non pulvinar vel, ullamcorper id lorem. Donec vulputate tincidunt ipsum, ut lacinia tortor sollicitudin id. Nunc nec nibh ut felis venenatis egestas. Proin risus mauris, eleifend eget interdum in, venenatis sed velit. Praesent sodales elit ut odio viverra posuere. Donec sapien lorem, molestie in egestas eget, vulputate sed orci. Aenean elit sapien, pellentesque vitae tempor sit amet, sagittis et ligula. Mauris aliquam sapien sit amet lacus ultrices rutrum. Curabitur nec dolor sed elit varius dignissim a a lacus. Aliquam ac convallis enim. + +Suspendisse orci massa, hendrerit sagittis lacinia consectetur, sagittis vitae purus. Aliquam id eros diam, eget elementum turpis. Nullam tellus magna, mollis in molestie id, venenatis rhoncus est. Proin id diam justo. Nunc tempus gravida justo at lobortis. Nam vitae venenatis nisi. Donec vel odio massa. Quisque interdum metus sit amet est iaculis tincidunt. Donec bibendum blandit purus, id semper orci aliquam quis. Nam tincidunt dolor eu felis ultricies tempor. Nulla non consectetur erat. diff --git a/Docs/docstrap-master/package.json b/Docs/docstrap-master/package.json new file mode 100644 index 00000000..96683c5d --- /dev/null +++ b/Docs/docstrap-master/package.json @@ -0,0 +1,36 @@ +{ + "name": "ink-docstrap", + "version": "0.2.0-0", + "decription": "A template for JSDoc3 based on Bootstrap and Bootswatch", + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-less": "~0.5.1", + "jsdoc": "git://github.com/jsdoc3/jsdoc.git", + "grunt-shell": "~0.2.2", + "async": "~0.2.8", + "lodash": "~1.2.1", + "grunt-contrib-copy": "~0.4.1" + }, + "license": "MIT", + "keywords": [ + "docstrap", + "jsdoc3", + "bootstrap", + "bootswatch", + "theme", + "documentation", + "jsdoc" + ], + "author": { + "name": "Terry Weiss", + "email": "me@terryweiss.net" + }, + "bugs": { + "url": "https://github.com/terryweiss/docstrap/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/terryweiss/docstrap.git" + }, + "main": "./template/publish.js" +} diff --git a/Docs/docstrap-master/styles/bootswatch.less b/Docs/docstrap-master/styles/bootswatch.less new file mode 100644 index 00000000..e4f0e4cf --- /dev/null +++ b/Docs/docstrap-master/styles/bootswatch.less @@ -0,0 +1,180 @@ +// Cerulean 2.3.2 +// Bootswatch +// ----------------------------------------------------- + + +// TYPOGRAPHY +// ----------------------------------------------------- + +@import url(//fonts.googleapis.com/css?family=Telex); + +// SCAFFOLDING +// ----------------------------------------------------- + +// NAVBAR +// ----------------------------------------------------- + +.navbar { + + .brand { + padding: 14px 20px 16px; + font-family: @headingsFontFamily; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); + } + + li { + line-height: 20px; + } + + .nav > li > a { + padding: 16px 10px 14px; + font-family: @headingsFontFamily; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); + } + + .search-query { + border: 1px solid darken(@linkColor, 10%); + line-height: normal; + } + + .navbar-text { + padding: 19px 10px 18px; + line-height: 13px; + color: rgba(0, 0, 0, 0.5); + text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); + } + + &-inverse { + + .navbar-search .search-query { + color: @textColor; + } + } +} + +@media (max-width: @navbarCollapseWidth) { + + .navbar .nav-collapse { + + .nav li > a { + + font-family: @headingsFontFamily; + font-weight: normal; + color: @white; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); + + &:hover { + background-color: #2B7CAC; + } + } + + .nav .active > a { + .box-shadow(none); + background-color: #2B7CAC; + } + + .dropdown-menu li > a:hover, + .dropdown-menu li > a:focus, + .dropdown-submenu:hover > a { + background-image: none; + } + + .navbar-form, + .navbar-search { + border: none; + } + + .nav-header { + color: #2B7CAC; + } + } + + .navbar-inverse .nav-collapse { + + .nav li > a { + color: @navbarInverseLinkColor; + + &:hover { + background-color: rgba(0, 0, 0, 0.1); + } + } + + .nav .active > a, + .nav > li > a:hover, + .dropdown-menu a:hover { + background-color: rgba(0, 0, 0, 0.1) !important; + } + } +} + +div.subnav { + + font-family: @headingsFontFamily; + text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2); + + &-fixed { + top: @navbarHeight + 1; + } +} + +// NAV +// ----------------------------------------------------- + +// BUTTONS +// ----------------------------------------------------- + +.btn { + #gradient > .vertical-three-colors(@white, @white, 5%, darken(@white, 0%)); + @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); + + &:hover { + background-position: 0 0; + } +} + +.btn-primary { + .buttonBackground(lighten(@btnPrimaryBackground, 5%), @btnPrimaryBackground); +} + +.btn-info { + .buttonBackground(lighten(@btnInfoBackground, 5%), @btnInfoBackground); +} + +.btn-success { + .buttonBackground(lighten(@btnSuccessBackground, 5%), @btnSuccessBackground); +} + +.btn-warning { + .buttonBackground(lighten(@btnWarningBackground, 5%), @btnWarningBackground); +} + +.btn-danger { + .buttonBackground(lighten(@btnDangerBackground, 5%), @btnDangerBackground); +} + +.btn-inverse { + .buttonBackground(lighten(@btnInverseBackground, 5%), @btnInverseBackground); +} + +// TABLES +// ----------------------------------------------------- + +// FORMS +// ----------------------------------------------------- + +// DROPDOWNS +// ----------------------------------------------------- + +// ALERTS, LABELS, BADGES +// ----------------------------------------------------- + +// MISC +// ----------------------------------------------------- + +i[class^="icon-"]{ + opacity: 0.8; +} + +// MEDIA QUERIES +// ----------------------------------------------------- diff --git a/Docs/docstrap-master/styles/main.less b/Docs/docstrap-master/styles/main.less new file mode 100644 index 00000000..f1049487 --- /dev/null +++ b/Docs/docstrap-master/styles/main.less @@ -0,0 +1,152 @@ +@import "../components/bootstrap/less/bootstrap.less"; +@import "variables.less"; +@import "bootswatch.less"; + +@headerHeight: 56px; + +#main { + margin-top : @headerHeight; +} + +.navbar-fixed-top { + .navbar-inner { + padding-left : 20px; + padding-right : 20px; + } + +} + +.navbar { + .dropdown-menu { + padding : 20px; + max-height : 300px; + overflow : auto; + width : 300px; + background-color : @navbarInverseBackground; + a, a:visited { + color : @navbarInverseLinkColor; + } + a:hover { + color : @navbarInverseLinkColorHover; + background-color : @navbarInverseLinkBackgroundHover; + } + a:active { + color : @navbarInverseLinkColorActive; + background-color : @navbarInverseLinkBackgroundActive; + } + a { + padding-left : 0; + padding-right : 5px; + font-weight : 500; + font-size : 115%; + } + } + +} + +#toc { + position : fixed; + top : @headerHeight; + width : 29%; + max-height : 90%; + overflow : auto; + .border-radius(5px); + border : 1px @navbarBackground solid; + padding : 5px; + + .toc-active { + background-color : @navbarLinkBackgroundActive; + color : @navbarLinkColorActive; + .border-radius(3px); + a, a:hover, a:active, a:visited { + background-color : @navbarLinkBackgroundActive; + color : @navbarLinkColorActive; + } + } +} + +.toc-shim { + padding-top : @headerHeight; + margin-top : -@headerHeight; + display : block; +} + +.toc-h1 { + margin-left : 2px; + margin-right : 2px; +} + +.toc-h2 { + margin-left : 7px; + margin-right : 7px; +} + +.toc-h3 { + margin-left : 14px; + margin-right : 7px; +} + +.toc-h4 { + margin-left : 21px; + margin-right : 7px; +} + +.copyright { + font-size : 90%; + text-align : center; + color : @navbarInverseBackground; + width : 100%; + display : block; +} + +.jsdoc-message { + font-size : 90%; + text-align : center; + color : @navbarInverseBackground; + width : 100%; + display : block; +} + +.page-title { + font-size : 220%; + color : @navbarInverseBackground; + font-weight : 700; + padding-top : 10px; + display : block; +} + +footer { + border-top : 1px solid @navbarInverseBackgroundHighlight; + padding-top : 15px; +} + +code { + background-color : none; + border : none; + color : @orange; +} + +.buffered-name { + padding-top : @headerHeight; + margin-top : -@headerHeight; +} + + +.member-collapsed { + background-color : @navbarInverseBackground; + color : @navbarInverseText; +} + +.member-open { + background-color : inherit; + color : inherit; +} + +.member { + .transition(background-color 0.5s linear); + .transition(color 0.5s linear); + .border-radius(5px); + padding : 10px; +} + + diff --git a/Docs/docstrap-master/styles/variables.less b/Docs/docstrap-master/styles/variables.less new file mode 100644 index 00000000..4c706d68 --- /dev/null +++ b/Docs/docstrap-master/styles/variables.less @@ -0,0 +1,301 @@ +// Cerulean 2.3.2 +// Variables +// -------------------------------------------------- + + +// GLOBAL VALUES +// -------------------------------------------------- + + +// Grays +// ------------------------- +@black: #000; +@grayDarker: #222; +@grayDark: #333; +@gray: #555; +@grayLight: #999; +@grayLighter: #F5F5F5; +@white: #fff; + + +// Accent colors +// ------------------------- +@blue: #2FA4E7; +@blueDark: #033C73; +@green: #73A839; +@red: #C71C22; +@yellow: #F7B42C; +@orange: #DD5600; +@pink: #F49AC1; +@purple: #9760B3; + + +// Scaffolding +// ------------------------- +@bodyBackground: @white; +@textColor: @gray; + + +// Links +// ------------------------- +@linkColor: @blue; +@linkColorHover: darken(@linkColor, 15%); + + +// Typography +// ------------------------- +@sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; +@serifFontFamily: Georgia, "Times New Roman", Times, serif; +@monoFontFamily: Menlo, Monaco, Consolas, "Courier New", monospace; + +@baseFontSize: 14px; +@baseFontFamily: @sansFontFamily; +@baseLineHeight: 20px; +@altFontFamily: @monoFontFamily; + +@headingsFontFamily: 'Telex', sans-serif; // empty to use BS default, @baseFontFamily +@headingsFontWeight: bold; // instead of browser default, bold +@headingsColor: #317EAC; // empty to use BS default, @textColor + + +// Component sizing +// ------------------------- +// Based on 14px font-size and 20px line-height + +@fontSizeLarge: @baseFontSize * 1.25; // ~18px +@fontSizeSmall: @baseFontSize * 0.85; // ~12px +@fontSizeMini: @baseFontSize * 0.75; // ~11px + +@paddingLarge: 11px 19px; // 44px +@paddingSmall: 2px 10px; // 26px +@paddingMini: 0px 6px; // 22px + +@baseBorderRadius: 4px; +@borderRadiusLarge: 6px; +@borderRadiusSmall: 3px; + + +// Tables +// ------------------------- +@tableBackground: transparent; // overall background-color +@tableBackgroundAccent: #f9f9f9; // for striping +@tableBackgroundHover: #f5f5f5; // for hover +@tableBorder: #ddd; // table and cell border + +// Buttons +// ------------------------- +@btnBackground: @white; +@btnBackgroundHighlight: darken(@white, 10%); +@btnBorder: darken(@white, 20%); + +@btnPrimaryBackground: @linkColor; +@btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 15%); + +@btnInfoBackground: @purple; +@btnInfoBackgroundHighlight: #2f96b4; + +@btnSuccessBackground: @green; +@btnSuccessBackgroundHighlight: #51a351; + +@btnWarningBackground: @orange; +@btnWarningBackgroundHighlight: @orange; + +@btnDangerBackground: @red; +@btnDangerBackgroundHighlight: #bd362f; + +@btnInverseBackground: @blueDark; +@btnInverseBackgroundHighlight: @grayDarker; + + +// Forms +// ------------------------- +@inputBackground: @white; +@inputBorder: #ccc; +@inputBorderRadius: @baseBorderRadius; +@inputDisabledBackground: @grayLighter; +@formActionsBackground: #f5f5f5; +@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border + + +// Dropdowns +// ------------------------- +@dropdownBackground: @white; +@dropdownBorder: rgba(0,0,0,.2); +@dropdownDividerTop: #e5e5e5; +@dropdownDividerBottom: @white; + +@dropdownLinkColor: @grayDark; +@dropdownLinkColorHover: @white; +@dropdownLinkColorActive: @white; + +@dropdownLinkBackgroundActive: @linkColor; +@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive; + + + +// COMPONENT VARIABLES +// -------------------------------------------------- + + +// Z-index master list +// ------------------------- +// Used for a bird's eye view of components dependent on the z-axis +// Try to avoid customizing these :) +@zindexDropdown: 1000; +@zindexPopover: 1010; +@zindexTooltip: 1020; +@zindexFixedNavbar: 1030; +@zindexModalBackdrop: 1040; +@zindexModal: 1050; + + +// Sprite icons path +// ------------------------- +@iconSpritePath: "../img/glyphicons-halflings.png"; +@iconWhiteSpritePath: "../img/glyphicons-halflings-white.png"; + + +// Input placeholder text color +// ------------------------- +@placeholderText: @grayLight; + + +// Hr border color +// ------------------------- +@hrBorder: @grayLighter; + + +// Horizontal forms & lists +// ------------------------- +@horizontalComponentOffset: 180px; + + +// Wells +// ------------------------- +@wellBackground: #f5f5f5; + + +// Navbar +// ------------------------- +@navbarCollapseWidth: 979px; +@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1; + +@navbarHeight: 50px; +@navbarBackgroundHighlight: lighten(@navbarBackground, 8%); +@navbarBackground: @blue; +@navbarBorder: darken(@navbarBackground, 8%); + +@navbarText: @grayLighter; +@navbarLinkColor: @white; +@navbarLinkColorHover: @white; +@navbarLinkColorActive: @navbarLinkColorHover; +@navbarLinkBackgroundHover: darken(@navbarBackground, 12%); +@navbarLinkBackgroundActive: darken(@navbarBackground, 12%); + +@navbarBrandColor: @navbarLinkColor; + +// Inverted navbar +@navbarInverseBackground: @blueDark; +@navbarInverseBackgroundHighlight: lighten(@navbarInverseBackground, 5%); +@navbarInverseBorder: darken(@navbarInverseBackground, 3%); + +@navbarInverseText: @white; +@navbarInverseLinkColor: @white; +@navbarInverseLinkColorHover: @white; +@navbarInverseLinkColorActive: @white; +@navbarInverseLinkBackgroundHover: darken(@navbarInverseBackground, 6%); +@navbarInverseLinkBackgroundActive: darken(@navbarInverseBackground, 6%); + +@navbarInverseSearchBackground: @white; +@navbarInverseSearchBackgroundFocus: @white; +@navbarInverseSearchBorder: @navbarInverseBackground; +@navbarInverseSearchPlaceholderColor: @grayLight; + +@navbarInverseBrandColor: @navbarInverseLinkColor; + + +// Pagination +// ------------------------- +@paginationBackground: #fff; +@paginationBorder: #ddd; +@paginationActiveBackground: #f5f5f5; + + +// Hero unit +// ------------------------- +@heroUnitBackground: @grayLighter; +@heroUnitHeadingColor: inherit; +@heroUnitLeadColor: inherit; + + +// Form states and alerts +// ------------------------- +@warningText: @orange; +@warningBackground: #F1CEAB; +@warningBorder: darken(spin(@warningBackground, -10), 3%); + +@errorText: darken(#C45559, 5%); +@errorBackground: #F2BDB1; +@errorBorder: darken(spin(@errorBackground, -10), 3%); + +@successText: darken(@green, 5%); +@successBackground: #D5ECBF; +@successBorder: darken(spin(@successBackground, -10), 5%); + +@infoText: darken(@blue, 10%); +@infoBackground: #A7DFF1; +@infoBorder: darken(spin(@infoBackground, -10), 7%); + + +// Tooltips and popovers +// ------------------------- +@tooltipColor: #fff; +@tooltipBackground: #000; +@tooltipArrowWidth: 5px; +@tooltipArrowColor: @tooltipBackground; + +@popoverBackground: #fff; +@popoverArrowWidth: 10px; +@popoverArrowColor: #fff; +@popoverTitleBackground: darken(@popoverBackground, 3%); + +// Special enhancement for popovers +@popoverArrowOuterWidth: @popoverArrowWidth + 1; +@popoverArrowOuterColor: rgba(0,0,0,.25); + + + +// GRID +// -------------------------------------------------- + + +// Default 940px grid +// ------------------------- +@gridColumns: 12; +@gridColumnWidth: 60px; +@gridGutterWidth: 20px; +@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); + +// 1200px min +@gridColumnWidth1200: 70px; +@gridGutterWidth1200: 30px; +@gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1)); + +// 768px-979px +@gridColumnWidth768: 42px; +@gridGutterWidth768: 20px; +@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1)); + + +// Fluid grid +// ------------------------- +@fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth); +@fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth); + +// 1200px min +@fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200); +@fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200); + +// 768px-979px +@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768); +@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768); diff --git a/Docs/docstrap-master/template/jsdoc.conf.json b/Docs/docstrap-master/template/jsdoc.conf.json new file mode 100644 index 00000000..a445deed --- /dev/null +++ b/Docs/docstrap-master/template/jsdoc.conf.json @@ -0,0 +1,25 @@ +{ + "tags" : { + "allowUnknownTags" : true + }, + "plugins" : ["plugins/markdown"], + "templates" : { + "cleverLinks" : false, + "monospaceLinks" : false, + "default" : { + "outputSourceFiles" : true + }, + "systemName" : "DocStrap", + "footer" : "", + "copyright" : "DocStrap Copyright © 2012-2013 The contributors to the JSDoc3 and DocStrap projects.", + "navType" : "vertical", + "theme" : "cerulean", + "linenums" : true, + "collapseSymbols" : false, + "inverseNav" : true + }, + "markdown" : { + "parser" : "gfm", + "hardwrap" : true + } +} diff --git a/Docs/docstrap-master/template/publish.js b/Docs/docstrap-master/template/publish.js new file mode 100644 index 00000000..555e7386 --- /dev/null +++ b/Docs/docstrap-master/template/publish.js @@ -0,0 +1,651 @@ +"use strict"; +/** + * @module template/publish + * @type {*} + */ +/*global env: true */ +var template = require( 'jsdoc/template' ), + fs = require( 'jsdoc/fs' ), + _ = require( 'underscore' ), + path = require( 'jsdoc/path' ), + taffy = require( 'taffydb' ).taffy, + handle = require( 'jsdoc/util/error' ).handle, + helper = require( 'jsdoc/util/templateHelper' ), + htmlsafe = helper.htmlsafe, + linkto = helper.linkto, + resolveAuthorLinks = helper.resolveAuthorLinks, + scopeToPunc = helper.scopeToPunc, + hasOwnProp = Object.prototype.hasOwnProperty, + conf = env.conf.templates || {}, + data, + view, + outdir = env.opts.destination; + +var globalUrl = helper.getUniqueFilename( 'global' ); +var indexUrl = helper.getUniqueFilename( 'index' ); + +var navOptions = { + systemName : conf.systemName || "Documentation", + navType : conf.navType || "vertical", + footer : conf.footer || "", + copyright : conf.copyright || "", + theme : conf.theme || "simplex", + linenums : conf.linenums, + collapseSymbols : conf.collapseSymbols || false, + inverseNav : conf.inverseNav +}; + +var navigationMaster = { + index : { + title : navOptions.systemName, + link : indexUrl, + members : [] + }, + namespace : { + title : "Namespaces", + link : helper.getUniqueFilename( "namespaces.list" ), + members : [] + }, + module : { + title : "Modules", + link : helper.getUniqueFilename( "modules.list" ), + members : [] + }, + class : { + title : "Classes", + link : helper.getUniqueFilename( 'classes.list' ), + members : [] + }, + + mixin : { + title : "Mixins", + link : helper.getUniqueFilename( "mixins.list" ), + members : [] + }, + event : { + title : "Events", + link : helper.getUniqueFilename( "events.list" ), + members : [] + }, + tutorial : { + title : "Tutorials", + link : helper.getUniqueFilename( "tutorials.list" ), + members : [] + }, + global : { + title : "Global", + link : globalUrl, + members : [] + + }, + external : { + title : "Externals", + link : helper.getUniqueFilename( "externals.list" ), + members : [] + } +}; + +function find( spec ) { + return helper.find( data, spec ); +} + +function tutoriallink( tutorial ) { + return helper.toTutorial( tutorial, null, { tag : 'em', classname : 'disabled', prefix : 'Tutorial: ' } ); +} + +function getAncestorLinks( doclet ) { + return helper.getAncestorLinks( data, doclet ); +} + +function hashToLink( doclet, hash ) { + if ( !/^(#.+)/.test( hash ) ) { return hash; } + + var url = helper.createLink( doclet ); + + url = url.replace( /(#.+|$)/, hash ); + return '' + hash + ''; +} + +function needsSignature( doclet ) { + var needsSig = false; + + // function and class definitions always get a signature + if ( doclet.kind === 'function' || doclet.kind === 'class' ) { + needsSig = true; + } + // typedefs that contain functions get a signature, too + else if ( doclet.kind === 'typedef' && doclet.type && doclet.type.names && + doclet.type.names.length ) { + for ( var i = 0, l = doclet.type.names.length; i < l; i++ ) { + if ( doclet.type.names[i].toLowerCase() === 'function' ) { + needsSig = true; + break; + } + } + } + + return needsSig; +} + +function addSignatureParams( f ) { + var params = helper.getSignatureParams( f, 'optional' ); + + f.signature = (f.signature || '') + '(' + params.join( ', ' ) + ')'; +} + +function addSignatureReturns( f ) { + var returnTypes = helper.getSignatureReturns( f ); + + f.signature = '' + (f.signature || '') + '' + '' + (returnTypes.length ? ' → {' + returnTypes.join( '|' ) + '}' : '') + ''; +} + +function addSignatureTypes( f ) { + var types = helper.getSignatureTypes( f ); + + f.signature = (f.signature || '') + '' + (types.length ? ' :' + types.join( '|' ) : '') + ''; +} + +function addAttribs( f ) { + var attribs = helper.getAttribs( f ); + + f.attribs = '' + htmlsafe( attribs.length ? '<' + attribs.join( ', ' ) + '> ' : '' ) + ''; +} + +function shortenPaths( files, commonPrefix ) { + // always use forward slashes + var regexp = new RegExp( '\\\\', 'g' ); + + Object.keys( files ).forEach( function ( file ) { + files[file].shortened = files[file].resolved.replace( commonPrefix, '' ) + .replace( regexp, '/' ); + } ); + + return files; +} + +function resolveSourcePath( filepath ) { + return path.resolve( process.cwd(), filepath ); +} + +function getPathFromDoclet( doclet ) { + if ( !doclet.meta ) { + return; + } + + var filepath = doclet.meta.path && doclet.meta.path !== 'null' ? + doclet.meta.path + '/' + doclet.meta.filename : + doclet.meta.filename; + + return filepath; +} + +function generate( docType, title, docs, filename, resolveLinks ) { + resolveLinks = resolveLinks === false ? false : true; + + var docData = { + title : title, + docs : docs, + docType : docType + }; + + var outpath = path.join( outdir, filename ), + html = view.render( 'container.tmpl', docData ); + + if ( resolveLinks ) { + html = helper.resolveLinks( html ); // turn {@link foo} into foo + } + + fs.writeFileSync( outpath, html, 'utf8' ); +} + +function generateSourceFiles( sourceFiles ) { + Object.keys( sourceFiles ).forEach( function ( file ) { + var source; + // links are keyed to the shortened path in each doclet's `meta.filename` property + var sourceOutfile = helper.getUniqueFilename( sourceFiles[file].shortened ); + helper.registerLink( sourceFiles[file].shortened, sourceOutfile ); + + try { + source = { + kind : 'source', + code : helper.htmlsafe( fs.readFileSync( sourceFiles[file].resolved, 'utf8' ) ) + }; + } + catch ( e ) { + handle( e ); + } + + generate( 'source', 'Source: ' + sourceFiles[file].shortened, [source], sourceOutfile, + false ); + } ); +} + +/** + * Look for classes or functions with the same name as modules (which indicates that the module + * exports only that class or function), then attach the classes or functions to the `module` + * property of the appropriate module doclets. The name of each class or function is also updated + * for display purposes. This function mutates the original arrays. + * + * @private + * @param {Array.} doclets - The array of classes and functions to + * check. + * @param {Array.} modules - The array of module doclets to search. + */ +function attachModuleSymbols( doclets, modules ) { + var symbols = {}; + + // build a lookup table + doclets.forEach( function ( symbol ) { + symbols[symbol.longname] = symbol; + } ); + + return modules.map( function ( module ) { + if ( symbols[module.longname] ) { + module.module = symbols[module.longname]; + module.module.name = module.module.name.replace( 'module:', 'require("' ) + '")'; + } + } ); +} + +/** + * Create the navigation sidebar. + * @param {object} members The members that will be used to create the sidebar. + * @param {array} members.classes + * @param {array} members.externals + * @param {array} members.globals + * @param {array} members.mixins + * @param {array} members.modules + * @param {array} members.namespaces + * @param {array} members.tutorials + * @param {array} members.events + * @return {string} The HTML for the navigation sidebar. + */ +function buildNav( members ) { + + var seen = {}; + var nav = navigationMaster; + if ( members.modules.length ) { + + members.modules.forEach( function ( m ) { + if ( !hasOwnProp.call( seen, m.longname ) ) { + + nav.module.members.push( linkto( m.longname, m.name ) ); + } + seen[m.longname] = true; + } ); + } + + if ( members.externals.length ) { + + members.externals.forEach( function ( e ) { + if ( !hasOwnProp.call( seen, e.longname ) ) { + + nav.external.members.push( linkto( e.longname, e.name.replace( /(^"|"$)/g, '' ) ) ); + } + seen[e.longname] = true; + } ); + } + + if ( members.classes.length ) { + + members.classes.forEach( function ( c ) { + if ( !hasOwnProp.call( seen, c.longname ) ) { + + nav.class.members.push( linkto( c.longname, c.name ) ); + } + seen[c.longname] = true; + } ); + + } + + if ( members.events.length ) { + + members.events.forEach( function ( e ) { + if ( !hasOwnProp.call( seen, e.longname ) ) { + + nav.event.members.push( linkto( e.longname, e.name ) ); + } + seen[e.longname] = true; + } ); + + } + + if ( members.namespaces.length ) { + + members.namespaces.forEach( function ( n ) { + if ( !hasOwnProp.call( seen, n.longname ) ) { + + nav.namespace.members.push( linkto( n.longname, n.name ) ); + } + seen[n.longname] = true; + } ); + + } + + if ( members.mixins.length ) { + + members.mixins.forEach( function ( m ) { + if ( !hasOwnProp.call( seen, m.longname ) ) { + + nav.mixin.members.push( linkto( m.longname, m.name ) ); + } + seen[m.longname] = true; + } ); + + } + + if ( members.tutorials.length ) { + + members.tutorials.forEach( function ( t ) { + + nav.tutorial.members.push( tutoriallink( t.name ) ); + } ); + + } + + if ( members.globals.length ) { + members.globals.forEach( function ( g ) { + if ( g.kind !== 'typedef' && !hasOwnProp.call( seen, g.longname ) ) { + + nav.global.members.push( linkto( g.longname, g.name ) ); + } + seen[g.longname] = true; + } ); + } + + var topLevelNav = []; + _.each( nav, function ( entry, name ) { + if ( entry.members.length > 0 && name !== "index" ) { + topLevelNav.push( { + title : entry.title, + link : entry.link, + members : entry.members + } ); + } + } ); + nav.topLevelNav = topLevelNav; +} + +/** + @param {TAFFY} taffyData See . + @param {object} opts + @param {Tutorial} tutorials + */ +exports.publish = function ( taffyData, opts, tutorials ) { + data = taffyData; + + conf['default'] = conf['default'] || {}; + + var templatePath = opts.template; + view = new template.Template( templatePath + '/tmpl' ); + + // claim some special filenames in advance, so the All-Powerful Overseer of Filename Uniqueness + // doesn't try to hand them out later +// var indexUrl = helper.getUniqueFilename( 'index' ); + // don't call registerLink() on this one! 'index' is also a valid longname + +// var globalUrl = helper.getUniqueFilename( 'global' ); + helper.registerLink( 'global', globalUrl ); + + // set up templating + view.layout = 'layout.tmpl'; + + // set up tutorials for helper + helper.setTutorials( tutorials ); + + data = helper.prune( data ); + data.sort( 'longname, version, since' ); + helper.addEventListeners( data ); + + var sourceFiles = {}; + var sourceFilePaths = []; + data().each( function ( doclet ) { + doclet.attribs = ''; + + if ( doclet.examples ) { + doclet.examples = doclet.examples.map( function ( example ) { + var caption, code; + + if ( example.match( /^\s*([\s\S]+?)<\/caption>(\s*[\n\r])([\s\S]+)$/i ) ) { + caption = RegExp.$1; + code = RegExp.$3; + } + + return { + caption : caption || '', + code : code || example + }; + } ); + } + if ( doclet.see ) { + doclet.see.forEach( function ( seeItem, i ) { + doclet.see[i] = hashToLink( doclet, seeItem ); + } ); + } + + // build a list of source files + var sourcePath; + var resolvedSourcePath; + if ( doclet.meta ) { + sourcePath = getPathFromDoclet( doclet ); + resolvedSourcePath = resolveSourcePath( sourcePath ); + sourceFiles[sourcePath] = { + resolved : resolvedSourcePath, + shortened : null + }; + + sourceFilePaths.push( resolvedSourcePath ); + } + } ); + + // update outdir if necessary, then create outdir + var packageInfo = ( find( {kind : 'package'} ) || [] ) [0]; + if ( packageInfo && packageInfo.name ) { + outdir = path.join( outdir, packageInfo.name, packageInfo.version ); + } + fs.mkPath( outdir ); + + // copy static files to outdir + var fromDir = path.join( templatePath, 'static' ), + staticFiles = fs.ls( fromDir, 3 ); + + staticFiles.forEach( function ( fileName ) { + var toDir = fs.toDir( fileName.replace( fromDir, outdir ) ); + fs.mkPath( toDir ); + fs.copyFileSync( fileName, toDir ); + } ); + + if ( sourceFilePaths.length ) { + sourceFiles = shortenPaths( sourceFiles, path.commonPrefix( sourceFilePaths ) ); + } + data().each( function ( doclet ) { + var url = helper.createLink( doclet ); + helper.registerLink( doclet.longname, url ); + + // replace the filename with a shortened version of the full path + var docletPath; + if ( doclet.meta ) { + docletPath = getPathFromDoclet( doclet ); + docletPath = sourceFiles[docletPath].shortened; + if ( docletPath ) { + doclet.meta.filename = docletPath; + } + } + } ); + + data().each( function ( doclet ) { + var url = helper.longnameToUrl[doclet.longname]; + + if ( url.indexOf( '#' ) > -1 ) { + doclet.id = helper.longnameToUrl[doclet.longname].split( /#/ ).pop(); + } + else { + doclet.id = doclet.name; + } + + if ( needsSignature( doclet ) ) { + addSignatureParams( doclet ); + addSignatureReturns( doclet ); + addAttribs( doclet ); + } + } ); + + // do this after the urls have all been generated + data().each( function ( doclet ) { + doclet.ancestors = getAncestorLinks( doclet ); + + if ( doclet.kind === 'member' ) { + addSignatureTypes( doclet ); + addAttribs( doclet ); + } + + if ( doclet.kind === 'constant' ) { + addSignatureTypes( doclet ); + addAttribs( doclet ); + doclet.kind = 'member'; + } + } ); + + var members = helper.getMembers( data ); + members.tutorials = tutorials.children; + + // add template helpers + view.find = find; + view.linkto = linkto; + view.resolveAuthorLinks = resolveAuthorLinks; + view.tutoriallink = tutoriallink; + view.htmlsafe = htmlsafe; + + // once for all + buildNav( members ); + view.nav = navigationMaster; + view.navOptions = navOptions; + attachModuleSymbols( find( { kind : ['class', 'function'], longname : {left : 'module:'} } ), + members.modules ); + + // only output pretty-printed source files if requested; do this before generating any other + // pages, so the other pages can link to the source files + if ( conf['default'].outputSourceFiles ) { + generateSourceFiles( sourceFiles ); + } + + if ( members.globals.length ) { + generate( 'global', 'Global', [ + {kind : 'globalobj'} + ], globalUrl ); + } + + // some browsers can't make the dropdown work + if ( view.nav.module && view.nav.module.members.length ) { + generate( 'module', view.nav.module.title, [ + {kind : 'sectionIndex', contents : view.nav.module} + ], navigationMaster.module.link ); + } + + if ( view.nav.class && view.nav.class.members.length ) { + generate( 'class', view.nav.class.title, [ + {kind : 'sectionIndex', contents : view.nav.class} + ], navigationMaster.class.link ); + } + + if ( view.nav.namespace && view.nav.namespace.members.length ) { + generate( 'namespace', view.nav.namespace.title, [ + {kind : 'sectionIndex', contents : view.nav.namespace} + ], navigationMaster.namespace.link ); + } + + if ( view.nav.mixin && view.nav.mixin.members.length ) { + generate( 'mixin', view.nav.mixin.title, [ + {kind : 'sectionIndex', contents : view.nav.mixin} + ], navigationMaster.mixin.link ); + } + + if ( view.nav.external && view.nav.external.members.length ) { + generate( 'external', view.nav.external.title, [ + {kind : 'sectionIndex', contents : view.nav.external} + ], navigationMaster.external.link ); + } + + if ( view.nav.tutorial && view.nav.tutorial.members.length ) { + generate( 'tutorial', view.nav.tutorial.title, [ + {kind : 'sectionIndex', contents : view.nav.tutorial} + ], navigationMaster.tutorial.link ); + } + + // index page displays information from package.json and lists files + var files = find( {kind : 'file'} ), + packages = find( {kind : 'package'} ); + + generate( 'index', 'Index', + packages.concat( + [ + {kind : 'mainpage', readme : opts.readme, longname : (opts.mainpagetitle) ? opts.mainpagetitle : 'Main Page'} + ] + ).concat( files ), + indexUrl ); + + // set up the lists that we'll use to generate pages + var classes = taffy( members.classes ); + var modules = taffy( members.modules ); + var namespaces = taffy( members.namespaces ); + var mixins = taffy( members.mixins ); + var externals = taffy( members.externals ); + + for ( var longname in helper.longnameToUrl ) { + if ( hasOwnProp.call( helper.longnameToUrl, longname ) ) { + var myClasses = helper.find( classes, {longname : longname} ); + if ( myClasses.length ) { + generate( 'class', 'Class: ' + myClasses[0].name, myClasses, helper.longnameToUrl[longname] ); + } + + var myModules = helper.find( modules, {longname : longname} ); + if ( myModules.length ) { + generate( 'module', 'Module: ' + myModules[0].name, myModules, helper.longnameToUrl[longname] ); + } + + var myNamespaces = helper.find( namespaces, {longname : longname} ); + if ( myNamespaces.length ) { + generate( 'namespace', 'Namespace: ' + myNamespaces[0].name, myNamespaces, helper.longnameToUrl[longname] ); + } + + var myMixins = helper.find( mixins, {longname : longname} ); + if ( myMixins.length ) { + generate( 'mixin', 'Mixin: ' + myMixins[0].name, myMixins, helper.longnameToUrl[longname] ); + } + + var myExternals = helper.find( externals, {longname : longname} ); + if ( myExternals.length ) { + generate( 'external', 'External: ' + myExternals[0].name, myExternals, helper.longnameToUrl[longname] ); + } + } + } + + // TODO: move the tutorial functions to templateHelper.js + function generateTutorial( title, tutorial, filename ) { + var tutorialData = { + title : title, + header : tutorial.title, + content : tutorial.parse(), + children : tutorial.children, + docs : null + }; + + var tutorialPath = path.join( outdir, filename ), + html = view.render( 'tutorial.tmpl', tutorialData ); + + // yes, you can use {@link} in tutorials too! + html = helper.resolveLinks( html ); // turn {@link foo} into foo + + fs.writeFileSync( tutorialPath, html, 'utf8' ); + } + + // tutorials can have only one parent so there is no risk for loops + function saveChildren( node ) { + node.children.forEach( function ( child ) { + generateTutorial( 'tutorial' + child.title, child, helper.tutorialToUrl( child.name ) ); + saveChildren( child ); + } ); + } + + saveChildren( tutorials ); +}; diff --git a/Docs/docstrap-master/template/static/img/glyphicons-halflings-white.png b/Docs/docstrap-master/template/static/img/glyphicons-halflings-white.png new file mode 100644 index 0000000000000000000000000000000000000000..3bf6484a29d8da269f9bc874b25493a45fae3bae GIT binary patch literal 8777 zcmZvC1yGz#v+m*$LXcp=A$ZWB0fL7wNbp_U*$~{_gL`my3oP#L!5tQYy99Ta`+g_q zKlj|KJ2f@c)ARJx{q*bbkhN_!|Wn*Vos8{TEhUT@5e;_WJsIMMcG5%>DiS&dv_N`4@J0cnAQ-#>RjZ z00W5t&tJ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yY8%d9JM zzc3#pD^W_QnWy#rx#;c&N@sqHhrnHRmj#i;s%zLm6SE(n&BWpd&f7>XnjV}OlZntI70fq%8~9<7 zMYaw`E-rp49-oC1N_uZTo)Cu%RR2QWdHpzQIcNsoDp`3xfP+`gI?tVQZ4X={qU?(n zV>0ASES^Xuc;9JBji{)RnFL(Lez;8XbB1uWaMp@p?7xhXk6V#!6B@aP4Rz7-K%a>i z?fvf}va_DGUXlI#4--`A3qK7J?-HwnG7O~H2;zR~RLW)_^#La!=}+>KW#anZ{|^D3 B7G?kd literal 0 HcmV?d00001 diff --git a/Docs/docstrap-master/template/static/img/glyphicons-halflings.png b/Docs/docstrap-master/template/static/img/glyphicons-halflings.png new file mode 100644 index 0000000000000000000000000000000000000000..a9969993201f9cee63cf9f49217646347297b643 GIT binary patch literal 12799 zcma*OWmH^Ivn@*S;K3nSf_t!#;0f+&pm7Po8`nk}2q8f5;M%x$SdAkd9FAvlc$ zx660V9e3Ox@4WZ^?7jZ%QFGU-T~%||Ug4iK6bbQY@zBuF2$hxOw9wF=A)nUSxR_5@ zEX>HBryGrjyuOFFv$Y4<+|3H@gQfEqD<)+}a~mryD|1U9*I_FOG&F%+Ww{SJ-V2BR zjt<81Ek$}Yb*95D4RS0HCps|uLyovt;P05hchQb-u2bzLtmog&f2}1VlNhxXV);S9 zM2buBg~!q9PtF)&KGRgf3#z7B(hm5WlNClaCWFs!-P!4-u*u5+=+D|ZE9e`KvhTHT zJBnLwGM%!u&vlE%1ytJ=!xt~y_YkFLQb6bS!E+s8l7PiPGSt9xrmg?LV&&SL?J~cI zS(e9TF1?SGyh+M_p@o1dyWu7o7_6p;N6hO!;4~ z2B`I;y`;$ZdtBpvK5%oQ^p4eR2L)BH>B$FQeC*t)c`L71gXHPUa|vyu`Bnz)H$ZcXGve(}XvR!+*8a>BLV;+ryG1kt0=)ytl zNJxFUN{V7P?#|Cp85QTa@(*Q3%K-R(Pkv1N8YU*(d(Y}9?PQ(j;NzWoEVWRD-~H$=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+O;REEjQ}X7_YzWLO+Ey3>a_KDe1CjSe| z6arqcEZ)CX!8r(si`dqbF$uu&pnf^Np{1f*TdJ`r2;@SaZ z#hb4xlaCA@Pwqj#LlUEe5L{I$k(Zj$d3(~)u(F%&xb8={N9hKxlZIO1ABsM{Mt|)2 zJ^t9Id;?%4PfR4&Ph9B9cFK~@tG3wlFW-0fXZS_L4U*EiAA%+`h%q2^6BCC;t0iO4V=s4Qug{M|iDV@s zC7|ef-dxiR7T&Mpre!%hiUhHM%3Qxi$Lzw6&(Tvlx9QA_7LhYq<(o~=Y>3ka-zrQa zhGpfFK@)#)rtfz61w35^sN1=IFw&Oc!Nah+8@qhJ0UEGr;JplaxOGI82OVqZHsqfX ze1}r{jy;G?&}Da}a7>SCDsFDuzuseeCKof|Dz2BPsP8? zY;a)Tkr2P~0^2BeO?wnzF_Ul-ekY=-w26VnU%U3f19Z-pj&2 z4J_a|o4Dci+MO)mPQIM>kdPG1xydiR9@#8m zh27D7GF{p|a{8({Q-Pr-;#jV{2zHR>lGoFtIfIpoMo?exuQyX_A;;l0AP4!)JEM$EwMInZkj+8*IHP4vKRd zKx_l-i*>A*C@{u%ct`y~s6MWAfO{@FPIX&sg8H{GMDc{4M3%$@c8&RAlw0-R<4DO3 trJqdc$mBpWeznn?E0M$F`|3v=`3%T2A17h;rxP7$%JLd=6(2u;`(N3pt&so# literal 0 HcmV?d00001 diff --git a/Docs/docstrap-master/template/static/scripts/URI.js b/Docs/docstrap-master/template/static/scripts/URI.js new file mode 100644 index 00000000..91b01ee4 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/URI.js @@ -0,0 +1,1429 @@ +/*! + * URI.js - Mutating URLs + * + * Version: 1.8.3 + * + * Author: Rodney Rehm + * Web: http://medialize.github.com/URI.js/ + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * GPL v3 http://opensource.org/licenses/GPL-3.0 + * + */ +(function(root, factory) { + // https://github.com/umdjs/umd/blob/master/returnExports.js + if (typeof exports === 'object') { + // Node + module.exports = factory(require('./punycode'), require('./IPv6'), require('./SecondLevelDomains')); + } else if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['./punycode', './IPv6', './SecondLevelDomains'], factory); + } else { + // Browser globals (root is window) + root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains); + } +}(this, function(punycode, IPv6, SLD) { + "use strict"; + + function URI(url, base) { + // Allow instantiation without the 'new' keyword + if (!(this instanceof URI)) { + return new URI(url, base); + } + if (url === undefined) { + if (typeof location !== 'undefined') { + url = location.href + ""; + } else { + url = ""; + } + } + this.href(url); + // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor + if (base !== undefined) { + return this.absoluteTo(base); + } + return this; + }; + var p = URI.prototype; + var hasOwn = Object.prototype.hasOwnProperty; + + function escapeRegEx(string) { + // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963 + return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); + } + + function isArray(obj) { + return String(Object.prototype.toString.call(obj)) === "[object Array]"; + } + + function filterArrayValues(data, value) { + var lookup = {}; + var i, length; + if (isArray(value)) { + for (i = 0, length = value.length; i < length; i++) { + lookup[value[i]] = true; + } + } else { + lookup[value] = true; + } + for (i = 0, length = data.length; i < length; i++) { + if (lookup[data[i]] !== undefined) { + data.splice(i, 1); + length--; + i--; + } + } + return data; + } + URI._parts = function() { + return { + protocol: null, + username: null, + password: null, + hostname: null, + urn: null, + port: null, + path: null, + query: null, + fragment: null, + // state + duplicateQueryParameters: URI.duplicateQueryParameters + }; + }; + // state: allow duplicate query parameters (a=1&a=1) + URI.duplicateQueryParameters = false; + // static properties + URI.protocol_expression = /^[a-z][a-z0-9-+-]*$/i; + URI.idn_expression = /[^a-z0-9\.-]/i; + URI.punycode_expression = /(xn--)/i; + // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care? + URI.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + // credits to Rich Brown + // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096 + // specification: http://www.ietf.org/rfc/rfc4291.txt + URI.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/; + // gruber revised expression - http://rodneyrehm.de/t/url-regex.html + URI.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig; + // http://www.iana.org/assignments/uri-schemes.html + // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports + URI.defaultPorts = { + http: "80", + https: "443", + ftp: "21", + gopher: "70", + ws: "80", + wss: "443" + }; + // allowed hostname characters according to RFC 3986 + // ALPHA DIGIT "-" "." "_" "~" "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "=" %encoded + // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . - + URI.invalid_hostname_characters = /[^a-zA-Z0-9\.-]/; + // encoding / decoding according to RFC3986 + + function strictEncodeURIComponent(string) { + // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent + return encodeURIComponent(string).replace(/[!'()*]/g, escape).replace(/\*/g, "%2A"); + } + URI.encode = strictEncodeURIComponent; + URI.decode = decodeURIComponent; + URI.iso8859 = function() { + URI.encode = escape; + URI.decode = unescape; + }; + URI.unicode = function() { + URI.encode = strictEncodeURIComponent; + URI.decode = decodeURIComponent; + }; + URI.characters = { + pathname: { + encode: { + // RFC3986 2.1: For consistency, URI producers and normalizers should + // use uppercase hexadecimal digits for all percent-encodings. + expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig, + map: { + // -._~!'()* + "%24": "$", + "%26": "&", + "%2B": "+", + "%2C": ",", + "%3B": ";", + "%3D": "=", + "%3A": ":", + "%40": "@" + } + }, + decode: { + expression: /[\/\?#]/g, + map: { + "/": "%2F", + "?": "%3F", + "#": "%23" + } + } + }, + reserved: { + encode: { + // RFC3986 2.1: For consistency, URI producers and normalizers should + // use uppercase hexadecimal digits for all percent-encodings. + expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig, + map: { + // gen-delims + "%3A": ":", + "%2F": "/", + "%3F": "?", + "%23": "#", + "%5B": "[", + "%5D": "]", + "%40": "@", + // sub-delims + "%21": "!", + "%24": "$", + "%26": "&", + "%27": "'", + "%28": "(", + "%29": ")", + "%2A": "*", + "%2B": "+", + "%2C": ",", + "%3B": ";", + "%3D": "=" + } + } + } + }; + URI.encodeQuery = function(string) { + return URI.encode(string + "").replace(/%20/g, '+'); + }; + URI.decodeQuery = function(string) { + return URI.decode((string + "").replace(/\+/g, '%20')); + }; + URI.recodePath = function(string) { + var segments = (string + "").split('/'); + for (var i = 0, length = segments.length; i < length; i++) { + segments[i] = URI.encodePathSegment(URI.decode(segments[i])); + } + return segments.join('/'); + }; + URI.decodePath = function(string) { + var segments = (string + "").split('/'); + for (var i = 0, length = segments.length; i < length; i++) { + segments[i] = URI.decodePathSegment(segments[i]); + } + return segments.join('/'); + }; + // generate encode/decode path functions + var _parts = { + 'encode': 'encode', + 'decode': 'decode' + }; + var _part; + var generateAccessor = function(_group, _part) { + return function(string) { + return URI[_part](string + "").replace(URI.characters[_group][_part].expression, function(c) { + return URI.characters[_group][_part].map[c]; + }); + }; + }; + for (_part in _parts) { + URI[_part + "PathSegment"] = generateAccessor("pathname", _parts[_part]); + } + URI.encodeReserved = generateAccessor("reserved", "encode"); + URI.parse = function(string, parts) { + var pos, t; + if (!parts) { + parts = {}; + } + // [protocol"://"[username[":"password]"@"]hostname[":"port]"/"?][path]["?"querystring]["#"fragment] + // extract fragment + pos = string.indexOf('#'); + if (pos > -1) { + // escaping? + parts.fragment = string.substring(pos + 1) || null; + string = string.substring(0, pos); + } + // extract query + pos = string.indexOf('?'); + if (pos > -1) { + // escaping? + parts.query = string.substring(pos + 1) || null; + string = string.substring(0, pos); + } + // extract protocol + if (string.substring(0, 2) === '//') { + // relative-scheme + parts.protocol = ''; + string = string.substring(2); + // extract "user:pass@host:port" + string = URI.parseAuthority(string, parts); + } else { + pos = string.indexOf(':'); + if (pos > -1) { + parts.protocol = string.substring(0, pos); + if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) { + // : may be within the path + parts.protocol = undefined; + } else if (parts.protocol === 'file') { + // the file scheme: does not contain an authority + string = string.substring(pos + 3); + } else if (string.substring(pos + 1, pos + 3) === '//') { + string = string.substring(pos + 3); + // extract "user:pass@host:port" + string = URI.parseAuthority(string, parts); + } else { + string = string.substring(pos + 1); + parts.urn = true; + } + } + } + // what's left must be the path + parts.path = string; + // and we're done + return parts; + }; + URI.parseHost = function(string, parts) { + // extract host:port + var pos = string.indexOf('/'); + var bracketPos; + var t; + if (pos === -1) { + pos = string.length; + } + if (string[0] === "[") { + // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6 + // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts + // IPv6+port in the format [2001:db8::1]:80 (for the time being) + bracketPos = string.indexOf(']'); + parts.hostname = string.substring(1, bracketPos) || null; + parts.port = string.substring(bracketPos + 2, pos) || null; + } else if (string.indexOf(':') !== string.lastIndexOf(':')) { + // IPv6 host contains multiple colons - but no port + // this notation is actually not allowed by RFC 3986, but we're a liberal parser + parts.hostname = string.substring(0, pos) || null; + parts.port = null; + } else { + t = string.substring(0, pos).split(':'); + parts.hostname = t[0] || null; + parts.port = t[1] || null; + } + if (parts.hostname && string.substring(pos)[0] !== '/') { + pos++; + string = "/" + string; + } + return string.substring(pos) || '/'; + }; + URI.parseAuthority = function(string, parts) { + string = URI.parseUserinfo(string, parts); + return URI.parseHost(string, parts); + }; + URI.parseUserinfo = function(string, parts) { + // extract username:password + var pos = string.indexOf('@'); + var firstSlash = string.indexOf('/'); + var t; + // authority@ must come before /path + if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) { + t = string.substring(0, pos).split(':'); + parts.username = t[0] ? URI.decode(t[0]) : null; + t.shift(); + parts.password = t[0] ? URI.decode(t.join(':')) : null; + string = string.substring(pos + 1); + } else { + parts.username = null; + parts.password = null; + } + return string; + }; + URI.parseQuery = function(string) { + if (!string) { + return {}; + } + // throw out the funky business - "?"[name"="value"&"]+ + string = string.replace(/&+/g, '&').replace(/^\?*&*|&+$/g, ''); + if (!string) { + return {}; + } + var items = {}; + var splits = string.split('&'); + var length = splits.length; + var v, name, value; + for (var i = 0; i < length; i++) { + v = splits[i].split('='); + name = URI.decodeQuery(v.shift()); + // no "=" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters + value = v.length ? URI.decodeQuery(v.join('=')) : null; + if (items[name]) { + if (typeof items[name] === "string") { + items[name] = [items[name]]; + } + items[name].push(value); + } else { + items[name] = value; + } + } + return items; + }; + URI.build = function(parts) { + var t = ""; + if (parts.protocol) { + t += parts.protocol + ":"; + } + if (!parts.urn && (t || parts.hostname)) { + t += '//'; + } + t += (URI.buildAuthority(parts) || ''); + if (typeof parts.path === "string") { + if (parts.path[0] !== '/' && typeof parts.hostname === "string") { + t += '/'; + } + t += parts.path; + } + if (typeof parts.query === "string" && parts.query) { + t += '?' + parts.query; + } + if (typeof parts.fragment === "string" && parts.fragment) { + t += '#' + parts.fragment; + } + return t; + }; + URI.buildHost = function(parts) { + var t = ""; + if (!parts.hostname) { + return ""; + } else if (URI.ip6_expression.test(parts.hostname)) { + if (parts.port) { + t += "[" + parts.hostname + "]:" + parts.port; + } else { + // don't know if we should always wrap IPv6 in [] + // the RFC explicitly says SHOULD, not MUST. + t += parts.hostname; + } + } else { + t += parts.hostname; + if (parts.port) { + t += ':' + parts.port; + } + } + return t; + }; + URI.buildAuthority = function(parts) { + return URI.buildUserinfo(parts) + URI.buildHost(parts); + }; + URI.buildUserinfo = function(parts) { + var t = ""; + if (parts.username) { + t += URI.encode(parts.username); + if (parts.password) { + t += ':' + URI.encode(parts.password); + } + t += "@"; + } + return t; + }; + URI.buildQuery = function(data, duplicates) { + // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html + // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed + // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax! + // URI.js treats the query string as being application/x-www-form-urlencoded + // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type + var t = ""; + var unique, key, i, length; + for (key in data) { + if (hasOwn.call(data, key) && key) { + if (isArray(data[key])) { + unique = {}; + for (i = 0, length = data[key].length; i < length; i++) { + if (data[key][i] !== undefined && unique[data[key][i] + ""] === undefined) { + t += "&" + URI.buildQueryParameter(key, data[key][i]); + if (duplicates !== true) { + unique[data[key][i] + ""] = true; + } + } + } + } else if (data[key] !== undefined) { + t += '&' + URI.buildQueryParameter(key, data[key]); + } + } + } + return t.substring(1); + }; + URI.buildQueryParameter = function(name, value) { + // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded + // don't append "=" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization + return URI.encodeQuery(name) + (value !== null ? "=" + URI.encodeQuery(value) : ""); + }; + URI.addQuery = function(data, name, value) { + if (typeof name === "object") { + for (var key in name) { + if (hasOwn.call(name, key)) { + URI.addQuery(data, key, name[key]); + } + } + } else if (typeof name === "string") { + if (data[name] === undefined) { + data[name] = value; + return; + } else if (typeof data[name] === "string") { + data[name] = [data[name]]; + } + if (!isArray(value)) { + value = [value]; + } + data[name] = data[name].concat(value); + } else { + throw new TypeError("URI.addQuery() accepts an object, string as the name parameter"); + } + }; + URI.removeQuery = function(data, name, value) { + var i, length, key; + if (isArray(name)) { + for (i = 0, length = name.length; i < length; i++) { + data[name[i]] = undefined; + } + } else if (typeof name === "object") { + for (key in name) { + if (hasOwn.call(name, key)) { + URI.removeQuery(data, key, name[key]); + } + } + } else if (typeof name === "string") { + if (value !== undefined) { + if (data[name] === value) { + data[name] = undefined; + } else if (isArray(data[name])) { + data[name] = filterArrayValues(data[name], value); + } + } else { + data[name] = undefined; + } + } else { + throw new TypeError("URI.addQuery() accepts an object, string as the first parameter"); + } + }; + URI.commonPath = function(one, two) { + var length = Math.min(one.length, two.length); + var pos; + // find first non-matching character + for (pos = 0; pos < length; pos++) { + if (one[pos] !== two[pos]) { + pos--; + break; + } + } + if (pos < 1) { + return one[0] === two[0] && one[0] === '/' ? '/' : ''; + } + // revert to last / + if (one[pos] !== '/') { + pos = one.substring(0, pos).lastIndexOf('/'); + } + return one.substring(0, pos + 1); + }; + URI.withinString = function(string, callback) { + // expression used is "gruber revised" (@gruber v2) determined to be the best solution in + // a regex sprint we did a couple of ages ago at + // * http://mathiasbynens.be/demo/url-regex + // * http://rodneyrehm.de/t/url-regex.html + return string.replace(URI.find_uri_expression, callback); + }; + URI.ensureValidHostname = function(v) { + // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986) + // they are not part of DNS and therefore ignored by URI.js + if (v.match(URI.invalid_hostname_characters)) { + // test punycode + if (!punycode) { + throw new TypeError("Hostname '" + v + "' contains characters other than [A-Z0-9.-] and Punycode.js is not available"); + } + if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) { + throw new TypeError("Hostname '" + v + "' contains characters other than [A-Z0-9.-]"); + } + } + }; + p.build = function(deferBuild) { + if (deferBuild === true) { + this._deferred_build = true; + } else if (deferBuild === undefined || this._deferred_build) { + this._string = URI.build(this._parts); + this._deferred_build = false; + } + return this; + }; + p.clone = function() { + return new URI(this); + }; + p.valueOf = p.toString = function() { + return this.build(false)._string; + }; + // generate simple accessors + _parts = { + protocol: 'protocol', + username: 'username', + password: 'password', + hostname: 'hostname', + port: 'port' + }; + generateAccessor = function(_part) { + return function(v, build) { + if (v === undefined) { + return this._parts[_part] || ""; + } else { + this._parts[_part] = v; + this.build(!build); + return this; + } + }; + }; + for (_part in _parts) { + p[_part] = generateAccessor(_parts[_part]); + } + // generate accessors with optionally prefixed input + _parts = { + query: '?', + fragment: '#' + }; + generateAccessor = function(_part, _key) { + return function(v, build) { + if (v === undefined) { + return this._parts[_part] || ""; + } else { + if (v !== null) { + v = v + ""; + if (v[0] === _key) { + v = v.substring(1); + } + } + this._parts[_part] = v; + this.build(!build); + return this; + } + }; + }; + for (_part in _parts) { + p[_part] = generateAccessor(_part, _parts[_part]); + } + // generate accessors with prefixed output + _parts = { + search: ['?', 'query'], + hash: ['#', 'fragment'] + }; + generateAccessor = function(_part, _key) { + return function(v, build) { + var t = this[_part](v, build); + return typeof t === "string" && t.length ? (_key + t) : t; + }; + }; + for (_part in _parts) { + p[_part] = generateAccessor(_parts[_part][1], _parts[_part][0]); + } + p.pathname = function(v, build) { + if (v === undefined || v === true) { + var res = this._parts.path || (this._parts.urn ? '' : '/'); + return v ? URI.decodePath(res) : res; + } else { + this._parts.path = v ? URI.recodePath(v) : "/"; + this.build(!build); + return this; + } + }; + p.path = p.pathname; + p.href = function(href, build) { + var key; + if (href === undefined) { + return this.toString(); + } + this._string = ""; + this._parts = URI._parts(); + var _URI = href instanceof URI; + var _object = typeof href === "object" && (href.hostname || href.path); + // window.location is reported to be an object, but it's not the sort + // of object we're looking for: + // * location.protocol ends with a colon + // * location.query != object.search + // * location.hash != object.fragment + // simply serializing the unknown object should do the trick + // (for location, not for everything...) + if (!_URI && _object && Object.prototype.toString.call(href) !== "[object Object]") { + href = href.toString(); + } + if (typeof href === "string") { + this._parts = URI.parse(href, this._parts); + } else if (_URI || _object) { + var src = _URI ? href._parts : href; + for (key in src) { + if (hasOwn.call(this._parts, key)) { + this._parts[key] = src[key]; + } + } + } else { + throw new TypeError("invalid input"); + } + this.build(!build); + return this; + }; + // identification accessors + p.is = function(what) { + var ip = false; + var ip4 = false; + var ip6 = false; + var name = false; + var sld = false; + var idn = false; + var punycode = false; + var relative = !this._parts.urn; + if (this._parts.hostname) { + relative = false; + ip4 = URI.ip4_expression.test(this._parts.hostname); + ip6 = URI.ip6_expression.test(this._parts.hostname); + ip = ip4 || ip6; + name = !ip; + sld = name && SLD && SLD.has(this._parts.hostname); + idn = name && URI.idn_expression.test(this._parts.hostname); + punycode = name && URI.punycode_expression.test(this._parts.hostname); + } + switch (what.toLowerCase()) { + case 'relative': + return relative; + case 'absolute': + return !relative; + // hostname identification + case 'domain': + case 'name': + return name; + case 'sld': + return sld; + case 'ip': + return ip; + case 'ip4': + case 'ipv4': + case 'inet4': + return ip4; + case 'ip6': + case 'ipv6': + case 'inet6': + return ip6; + case 'idn': + return idn; + case 'url': + return !this._parts.urn; + case 'urn': + return !!this._parts.urn; + case 'punycode': + return punycode; + } + return null; + }; + // component specific input validation + var _protocol = p.protocol; + var _port = p.port; + var _hostname = p.hostname; + p.protocol = function(v, build) { + if (v !== undefined) { + if (v) { + // accept trailing :// + v = v.replace(/:(\/\/)?$/, ''); + if (v.match(/[^a-zA-z0-9\.+-]/)) { + throw new TypeError("Protocol '" + v + "' contains characters other than [A-Z0-9.+-]"); + } + } + } + return _protocol.call(this, v, build); + }; + p.scheme = p.protocol; + p.port = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v !== undefined) { + if (v === 0) { + v = null; + } + if (v) { + v += ""; + if (v[0] === ":") { + v = v.substring(1); + } + if (v.match(/[^0-9]/)) { + throw new TypeError("Port '" + v + "' contains characters other than [0-9]"); + } + } + } + return _port.call(this, v, build); + }; + p.hostname = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v !== undefined) { + var x = {}; + URI.parseHost(v, x); + v = x.hostname; + } + return _hostname.call(this, v, build); + }; + // compound accessors + p.host = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v === undefined) { + return this._parts.hostname ? URI.buildHost(this._parts) : ""; + } else { + URI.parseHost(v, this._parts); + this.build(!build); + return this; + } + }; + p.authority = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v === undefined) { + return this._parts.hostname ? URI.buildAuthority(this._parts) : ""; + } else { + URI.parseAuthority(v, this._parts); + this.build(!build); + return this; + } + }; + p.userinfo = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v === undefined) { + if (!this._parts.username) { + return ""; + } + var t = URI.buildUserinfo(this._parts); + return t.substring(0, t.length - 1); + } else { + if (v[v.length - 1] !== '@') { + v += '@'; + } + URI.parseUserinfo(v, this._parts); + this.build(!build); + return this; + } + }; + p.resource = function(v, build) { + var parts; + if (v === undefined) { + return this.path() + this.search() + this.hash(); + } + parts = URI.parse(v); + this._parts.path = parts.path; + this._parts.query = parts.query; + this._parts.fragment = parts.fragment; + this.build(!build); + return this; + }; + // fraction accessors + p.subdomain = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + // convenience, return "www" from "www.example.org" + if (v === undefined) { + if (!this._parts.hostname || this.is('IP')) { + return ""; + } + // grab domain and add another segment + var end = this._parts.hostname.length - this.domain().length - 1; + return this._parts.hostname.substring(0, end) || ""; + } else { + var e = this._parts.hostname.length - this.domain().length; + var sub = this._parts.hostname.substring(0, e); + var replace = new RegExp('^' + escapeRegEx(sub)); + if (v && v[v.length - 1] !== '.') { + v += "."; + } + if (v) { + URI.ensureValidHostname(v); + } + this._parts.hostname = this._parts.hostname.replace(replace, v); + this.build(!build); + return this; + } + }; + p.domain = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (typeof v === 'boolean') { + build = v; + v = undefined; + } + // convenience, return "example.org" from "www.example.org" + if (v === undefined) { + if (!this._parts.hostname || this.is('IP')) { + return ""; + } + // if hostname consists of 1 or 2 segments, it must be the domain + var t = this._parts.hostname.match(/\./g); + if (t && t.length < 2) { + return this._parts.hostname; + } + // grab tld and add another segment + var end = this._parts.hostname.length - this.tld(build).length - 1; + end = this._parts.hostname.lastIndexOf('.', end - 1) + 1; + return this._parts.hostname.substring(end) || ""; + } else { + if (!v) { + throw new TypeError("cannot set domain empty"); + } + URI.ensureValidHostname(v); + if (!this._parts.hostname || this.is('IP')) { + this._parts.hostname = v; + } else { + var replace = new RegExp(escapeRegEx(this.domain()) + "$"); + this._parts.hostname = this._parts.hostname.replace(replace, v); + } + this.build(!build); + return this; + } + }; + p.tld = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (typeof v === 'boolean') { + build = v; + v = undefined; + } + // return "org" from "www.example.org" + if (v === undefined) { + if (!this._parts.hostname || this.is('IP')) { + return ""; + } + var pos = this._parts.hostname.lastIndexOf('.'); + var tld = this._parts.hostname.substring(pos + 1); + if (build !== true && SLD && SLD.list[tld.toLowerCase()]) { + return SLD.get(this._parts.hostname) || tld; + } + return tld; + } else { + var replace; + if (!v) { + throw new TypeError("cannot set TLD empty"); + } else if (v.match(/[^a-zA-Z0-9-]/)) { + if (SLD && SLD.is(v)) { + replace = new RegExp(escapeRegEx(this.tld()) + "$"); + this._parts.hostname = this._parts.hostname.replace(replace, v); + } else { + throw new TypeError("TLD '" + v + "' contains characters other than [A-Z0-9]"); + } + } else if (!this._parts.hostname || this.is('IP')) { + throw new ReferenceError("cannot set TLD on non-domain host"); + } else { + replace = new RegExp(escapeRegEx(this.tld()) + "$"); + this._parts.hostname = this._parts.hostname.replace(replace, v); + } + this.build(!build); + return this; + } + }; + p.directory = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v === undefined || v === true) { + if (!this._parts.path && !this._parts.hostname) { + return ''; + } + if (this._parts.path === '/') { + return '/'; + } + var end = this._parts.path.length - this.filename().length - 1; + var res = this._parts.path.substring(0, end) || (this._parts.hostname ? "/" : ""); + return v ? URI.decodePath(res) : res; + } else { + var e = this._parts.path.length - this.filename().length; + var directory = this._parts.path.substring(0, e); + var replace = new RegExp('^' + escapeRegEx(directory)); + // fully qualifier directories begin with a slash + if (!this.is('relative')) { + if (!v) { + v = '/'; + } + if (v[0] !== '/') { + v = "/" + v; + } + } + // directories always end with a slash + if (v && v[v.length - 1] !== '/') { + v += '/'; + } + v = URI.recodePath(v); + this._parts.path = this._parts.path.replace(replace, v); + this.build(!build); + return this; + } + }; + p.filename = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v === undefined || v === true) { + if (!this._parts.path || this._parts.path === '/') { + return ""; + } + var pos = this._parts.path.lastIndexOf('/'); + var res = this._parts.path.substring(pos + 1); + return v ? URI.decodePathSegment(res) : res; + } else { + var mutatedDirectory = false; + if (v[0] === '/') { + v = v.substring(1); + } + if (v.match(/\.?\//)) { + mutatedDirectory = true; + } + var replace = new RegExp(escapeRegEx(this.filename()) + "$"); + v = URI.recodePath(v); + this._parts.path = this._parts.path.replace(replace, v); + if (mutatedDirectory) { + this.normalizePath(build); + } else { + this.build(!build); + } + return this; + } + }; + p.suffix = function(v, build) { + if (this._parts.urn) { + return v === undefined ? '' : this; + } + if (v === undefined || v === true) { + if (!this._parts.path || this._parts.path === '/') { + return ""; + } + var filename = this.filename(); + var pos = filename.lastIndexOf('.'); + var s, res; + if (pos === -1) { + return ""; + } + // suffix may only contain alnum characters (yup, I made this up.) + s = filename.substring(pos + 1); + res = (/^[a-z0-9%]+$/i).test(s) ? s : ""; + return v ? URI.decodePathSegment(res) : res; + } else { + if (v[0] === '.') { + v = v.substring(1); + } + var suffix = this.suffix(); + var replace; + if (!suffix) { + if (!v) { + return this; + } + this._parts.path += '.' + URI.recodePath(v); + } else if (!v) { + replace = new RegExp(escapeRegEx("." + suffix) + "$"); + } else { + replace = new RegExp(escapeRegEx(suffix) + "$"); + } + if (replace) { + v = URI.recodePath(v); + this._parts.path = this._parts.path.replace(replace, v); + } + this.build(!build); + return this; + } + }; + p.segment = function(segment, v, build) { + var separator = this._parts.urn ? ':' : '/'; + var path = this.path(); + var absolute = path.substring(0, 1) === '/'; + var segments = path.split(separator); + if (typeof segment !== 'number') { + build = v; + v = segment; + segment = undefined; + } + if (segment !== undefined && typeof segment !== 'number') { + throw new Error("Bad segment '" + segment + "', must be 0-based integer"); + } + if (absolute) { + segments.shift(); + } + if (segment < 0) { + // allow negative indexes to address from the end + segment = Math.max(segments.length + segment, 0); + } + if (v === undefined) { + return segment === undefined ? segments : segments[segment]; + } else if (segment === null || segments[segment] === undefined) { + if (isArray(v)) { + segments = v; + } else if (v || (typeof v === "string" && v.length)) { + if (segments[segments.length - 1] === "") { + // empty trailing elements have to be overwritten + // to prefent results such as /foo//bar + segments[segments.length - 1] = v; + } else { + segments.push(v); + } + } + } else { + if (v || (typeof v === "string" && v.length)) { + segments[segment] = v; + } else { + segments.splice(segment, 1); + } + } + if (absolute) { + segments.unshift(""); + } + return this.path(segments.join(separator), build); + }; + // mutating query string + var q = p.query; + p.query = function(v, build) { + if (v === true) { + return URI.parseQuery(this._parts.query); + } else if (v !== undefined && typeof v !== "string") { + this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters); + this.build(!build); + return this; + } else { + return q.call(this, v, build); + } + }; + p.addQuery = function(name, value, build) { + var data = URI.parseQuery(this._parts.query); + URI.addQuery(data, name, value === undefined ? null : value); + this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters); + if (typeof name !== "string") { + build = value; + } + this.build(!build); + return this; + }; + p.removeQuery = function(name, value, build) { + var data = URI.parseQuery(this._parts.query); + URI.removeQuery(data, name, value); + this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters); + if (typeof name !== "string") { + build = value; + } + this.build(!build); + return this; + }; + p.addSearch = p.addQuery; + p.removeSearch = p.removeQuery; + // sanitizing URLs + p.normalize = function() { + if (this._parts.urn) { + return this.normalizeProtocol(false).normalizeQuery(false).normalizeFragment(false).build(); + } + return this.normalizeProtocol(false).normalizeHostname(false).normalizePort(false).normalizePath(false).normalizeQuery(false).normalizeFragment(false).build(); + }; + p.normalizeProtocol = function(build) { + if (typeof this._parts.protocol === "string") { + this._parts.protocol = this._parts.protocol.toLowerCase(); + this.build(!build); + } + return this; + }; + p.normalizeHostname = function(build) { + if (this._parts.hostname) { + if (this.is('IDN') && punycode) { + this._parts.hostname = punycode.toASCII(this._parts.hostname); + } else if (this.is('IPv6') && IPv6) { + this._parts.hostname = IPv6.best(this._parts.hostname); + } + this._parts.hostname = this._parts.hostname.toLowerCase(); + this.build(!build); + } + return this; + }; + p.normalizePort = function(build) { + // remove port of it's the protocol's default + if (typeof this._parts.protocol === "string" && this._parts.port === URI.defaultPorts[this._parts.protocol]) { + this._parts.port = null; + this.build(!build); + } + return this; + }; + p.normalizePath = function(build) { + if (this._parts.urn) { + return this; + } + if (!this._parts.path || this._parts.path === '/') { + return this; + } + var _was_relative; + var _was_relative_prefix; + var _path = this._parts.path; + var _parent, _pos; + // handle relative paths + if (_path[0] !== '/') { + if (_path[0] === '.') { + _was_relative_prefix = _path.substring(0, _path.indexOf('/')); + } + _was_relative = true; + _path = '/' + _path; + } + // resolve simples + _path = _path.replace(/(\/(\.\/)+)|\/{2,}/g, '/'); + // resolve parents + while (true) { + _parent = _path.indexOf('/../'); + if (_parent === -1) { + // no more ../ to resolve + break; + } else if (_parent === 0) { + // top level cannot be relative... + _path = _path.substring(3); + break; + } + _pos = _path.substring(0, _parent).lastIndexOf('/'); + if (_pos === -1) { + _pos = _parent; + } + _path = _path.substring(0, _pos) + _path.substring(_parent + 3); + } + // revert to relative + if (_was_relative && this.is('relative')) { + if (_was_relative_prefix) { + _path = _was_relative_prefix + _path; + } else { + _path = _path.substring(1); + } + } + _path = URI.recodePath(_path); + this._parts.path = _path; + this.build(!build); + return this; + }; + p.normalizePathname = p.normalizePath; + p.normalizeQuery = function(build) { + if (typeof this._parts.query === "string") { + if (!this._parts.query.length) { + this._parts.query = null; + } else { + this.query(URI.parseQuery(this._parts.query)); + } + this.build(!build); + } + return this; + }; + p.normalizeFragment = function(build) { + if (!this._parts.fragment) { + this._parts.fragment = null; + this.build(!build); + } + return this; + }; + p.normalizeSearch = p.normalizeQuery; + p.normalizeHash = p.normalizeFragment; + p.iso8859 = function() { + // expect unicode input, iso8859 output + var e = URI.encode; + var d = URI.decode; + URI.encode = escape; + URI.decode = decodeURIComponent; + this.normalize(); + URI.encode = e; + URI.decode = d; + return this; + }; + p.unicode = function() { + // expect iso8859 input, unicode output + var e = URI.encode; + var d = URI.decode; + URI.encode = strictEncodeURIComponent; + URI.decode = unescape; + this.normalize(); + URI.encode = e; + URI.decode = d; + return this; + }; + p.readable = function() { + var uri = this.clone(); + // removing username, password, because they shouldn't be displayed according to RFC 3986 + uri.username("").password("").normalize(); + var t = ''; + if (uri._parts.protocol) { + t += uri._parts.protocol + '://'; + } + if (uri._parts.hostname) { + if (uri.is('punycode') && punycode) { + t += punycode.toUnicode(uri._parts.hostname); + if (uri._parts.port) { + t += ":" + uri._parts.port; + } + } else { + t += uri.host(); + } + } + if (uri._parts.hostname && uri._parts.path && uri._parts.path[0] !== '/') { + t += '/'; + } + t += uri.path(true); + if (uri._parts.query) { + var q = ''; + for (var i = 0, qp = uri._parts.query.split('&'), l = qp.length; i < l; i++) { + var kv = (qp[i] || "").split('='); + q += '&' + URI.decodeQuery(kv[0]).replace(/&/g, '%26'); + if (kv[1] !== undefined) { + q += "=" + URI.decodeQuery(kv[1]).replace(/&/g, '%26'); + } + } + t += '?' + q.substring(1); + } + t += uri.hash(); + return t; + }; + // resolving relative and absolute URLs + p.absoluteTo = function(base) { + var resolved = this.clone(); + var properties = ['protocol', 'username', 'password', 'hostname', 'port']; + var basedir, i, p; + if (this._parts.urn) { + throw new Error('URNs do not have any generally defined hierachical components'); + } + if (this._parts.hostname) { + return resolved; + } + if (!(base instanceof URI)) { + base = new URI(base); + } + for (i = 0, p; p = properties[i]; i++) { + resolved._parts[p] = base._parts[p]; + } + properties = ['query', 'path']; + for (i = 0, p; p = properties[i]; i++) { + if (!resolved._parts[p] && base._parts[p]) { + resolved._parts[p] = base._parts[p]; + } + } + if (resolved.path()[0] !== '/') { + basedir = base.directory(); + resolved._parts.path = (basedir ? (basedir + '/') : '') + resolved._parts.path; + resolved.normalizePath(); + } + resolved.build(); + return resolved; + }; + p.relativeTo = function(base) { + var relative = this.clone(); + var properties = ['protocol', 'username', 'password', 'hostname', 'port']; + var common, _base, _this, _base_diff, _this_diff; + if (this._parts.urn) { + throw new Error('URNs do not have any generally defined hierachical components'); + } + if (!(base instanceof URI)) { + base = new URI(base); + } + if (this.path()[0] !== '/' || base.path()[0] !== '/') { + throw new Error('Cannot calculate common path from non-relative URLs'); + } + // determine common sub path + common = URI.commonPath(relative.path(), base.path()); + // no relation if there's nothing in common + if (!common || common === '/') { + return relative; + } + // relative paths don't have authority + for (var i = 0, p; p = properties[i]; i++) { + relative._parts[p] = null; + } + _base = base.directory(); + _this = this.directory(); + // base and this are on the same level + if (_base === _this) { + relative._parts.path = './' + relative.filename(); + return relative.build(); + } + _base_diff = _base.substring(common.length); + _this_diff = _this.substring(common.length); + // this is a descendant of base + if (_base + '/' === common) { + if (_this_diff) { + _this_diff += '/'; + } + relative._parts.path = './' + _this_diff + relative.filename(); + return relative.build(); + } + // this is a descendant of base + var parents = '../'; + var _common = new RegExp('^' + escapeRegEx(common)); + var _parents = _base.replace(_common, '/').match(/\//g).length - 1; + while (_parents--) { + parents += '../'; + } + relative._parts.path = relative._parts.path.replace(_common, parents); + return relative.build(); + }; + // comparing URIs + p.equals = function(uri) { + var one = this.clone(); + var two = new URI(uri); + var one_map = {}; + var two_map = {}; + var checked = {}; + var one_query, two_query, key; + one.normalize(); + two.normalize(); + // exact match + if (one.toString() === two.toString()) { + return true; + } + // extract query string + one_query = one.query(); + two_query = two.query(); + one.query(""); + two.query(""); + // definitely not equal if not even non-query parts match + if (one.toString() !== two.toString()) { + return false; + } + // query parameters have the same length, even if they're permutated + if (one_query.length !== two_query.length) { + return false; + } + one_map = URI.parseQuery(one_query); + two_map = URI.parseQuery(two_query); + for (key in one_map) { + if (hasOwn.call(one_map, key)) { + if (!isArray(one_map[key])) { + if (one_map[key] !== two_map[key]) { + return false; + } + } else { + if (!isArray(two_map[key])) { + return false; + } + // arrays can't be equal if they have different amount of content + if (one_map[key].length !== two_map[key].length) { + return false; + } + one_map[key].sort(); + two_map[key].sort(); + for (var i = 0, l = one_map[key].length; i < l; i++) { + if (one_map[key][i] !== two_map[key][i]) { + return false; + } + } + } + checked[key] = true; + } + } + for (key in two_map) { + if (hasOwn.call(two_map, key)) { + if (!checked[key]) { + // two contains a parameter not present in one + return false; + } + } + } + return true; + }; + // state + p.duplicateQueryParameters = function(v) { + this._parts.duplicateQueryParameters = !! v; + return this; + }; + return URI; +})); \ No newline at end of file diff --git a/Docs/docstrap-master/template/static/scripts/bootstrap-dropdown.js b/Docs/docstrap-master/template/static/scripts/bootstrap-dropdown.js new file mode 100644 index 00000000..a1d51519 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/bootstrap-dropdown.js @@ -0,0 +1,165 @@ +/* ============================================================ + * bootstrap-dropdown.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + $parent.toggleClass('open') + } + + $this.focus() + + return false + } + + , keydown: function (e) { + var $this + , $items + , $active + , $parent + , isActive + , index + + if (!/(38|40|27)/.test(e.keyCode)) return + + $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) { + if (e.which == 27) $parent.find(toggle).focus() + return $this.click() + } + + $items = $('[role=menu] li:not(.divider):visible a', $parent) + + if (!$items.length) return + + index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items + .eq(index) + .focus() + } + + } + + function clearMenus() { + $(toggle).each(function () { + getParent($(this)).removeClass('open') + }) + } + + function getParent($this) { + var selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() + + return $parent + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.dropdown + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* DROPDOWN NO CONFLICT + * ==================== */ + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(document) + .on('click.dropdown.data-api', clearMenus) + .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + +}(window.jQuery); diff --git a/Docs/docstrap-master/template/static/scripts/bootstrap-tab.js b/Docs/docstrap-master/template/static/scripts/bootstrap-tab.js new file mode 100644 index 00000000..bd77eb5c --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/bootstrap-tab.js @@ -0,0 +1,144 @@ +/* ======================================================== + * bootstrap-tab.js v2.3.0 + * http://twitter.github.com/bootstrap/javascript.html#tabs + * ======================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TAB CLASS DEFINITION + * ==================== */ + + var Tab = function (element) { + this.element = $(element) + } + + Tab.prototype = { + + constructor: Tab + + , show: function () { + var $this = this.element + , $ul = $this.closest('ul:not(.dropdown-menu)') + , selector = $this.attr('data-target') + , previous + , $target + , e + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + if ( $this.parent('li').hasClass('active') ) return + + previous = $ul.find('.active:last a')[0] + + e = $.Event('show', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + $target = $(selector) + + this.activate($this.parent('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown' + , relatedTarget: previous + }) + }) + } + + , activate: function ( element, container, callback) { + var $active = container.find('> .active') + , transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if ( element.parent('.dropdown-menu') ) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active.one($.support.transition.end, next) : + next() + + $active.removeClass('in') + } + } + + + /* TAB PLUGIN DEFINITION + * ===================== */ + + var old = $.fn.tab + + $.fn.tab = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tab') + if (!data) $this.data('tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tab.Constructor = Tab + + + /* TAB NO CONFLICT + * =============== */ + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + /* TAB DATA-API + * ============ */ + + $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + $(this).tab('show') + }) + +}(window.jQuery); \ No newline at end of file diff --git a/Docs/docstrap-master/template/static/scripts/jquery.localScroll.js b/Docs/docstrap-master/template/static/scripts/jquery.localScroll.js new file mode 100644 index 00000000..ef7cc97d --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/jquery.localScroll.js @@ -0,0 +1,130 @@ +/*! + * jQuery.LocalScroll + * Copyright (c) 2007-2013 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html + * @author Ariel Flesler + * @version 1.2.8 + * + * @id jQuery.fn.localScroll + * @param {Object} settings Hash of settings, it is passed in to jQuery.ScrollTo, none is required. + * @return {jQuery} Returns the same jQuery object, for chaining. + * + * @example $('ul.links').localScroll(); + * + * @example $('ul.links').localScroll({ filter:'.animated', duration:400, axis:'x' }); + * + * @example $.localScroll({ target:'#pane', axis:'xy', queue:true, event:'mouseover' }); + * + * Notes: + * - The plugin requires jQuery.ScrollTo. + * - The hash of settings, is passed to jQuery.ScrollTo, so the settings are valid for that plugin as well. + * - jQuery.localScroll can be used if the desired links, are all over the document, it accepts the same settings. + * - If the setting 'lazy' is set to true, then the binding will still work for later added anchors. + * - If onBefore returns false, the event is ignored. + */ +;(function( $ ){ + var URI = location.href.replace(/#.*/,''); // local url without hash + + var $localScroll = $.localScroll = function( settings ){ + $('body').localScroll( settings ); + }; + + // Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option. + // @see http://flesler.demos.com/jquery/scrollTo/ + // The defaults are public and can be overriden. + $localScroll.defaults = { + duration:1000, // How long to animate. + axis:'y', // Which of top and left should be modified. + event:'click', // On which event to react. + stop:true, // Avoid queuing animations + target: window, // What to scroll (selector or element). The whole window by default. + reset: true // Used by $.localScroll.hash. If true, elements' scroll is resetted before actual scrolling + /* + lock:false, // ignore events if already animating + lazy:false, // if true, links can be added later, and will still work. + filter:null, // filter some anchors out of the matched elements. + hash: false // if true, the hash of the selected link, will appear on the address bar. + */ + }; + + // If the URL contains a hash, it will scroll to the pointed element + $localScroll.hash = function( settings ){ + if( location.hash ){ + settings = $.extend( {}, $localScroll.defaults, settings ); + settings.hash = false; // can't be true + + if( settings.reset ){ + var d = settings.duration; + delete settings.duration; + $(settings.target).scrollTo( 0, settings ); + settings.duration = d; + } + scroll( 0, location, settings ); + } + }; + + $.fn.localScroll = function( settings ){ + settings = $.extend( {}, $localScroll.defaults, settings ); + + return settings.lazy ? + // use event delegation, more links can be added later. + this.bind( settings.event, function( e ){ + // Could use closest(), but that would leave out jQuery -1.3.x + var a = $([e.target, e.target.parentNode]).filter(filter)[0]; + // if a valid link was clicked + if( a ) + scroll( e, a, settings ); // do scroll. + }) : + // bind concretely, to each matching link + this.find('a,area') + .filter( filter ).bind( settings.event, function(e){ + scroll( e, this, settings ); + }).end() + .end(); + + function filter(){// is this a link that points to an anchor and passes a possible filter ? href is checked to avoid a bug in FF. + return !!this.href && !!this.hash && this.href.replace(this.hash,'') == URI && (!settings.filter || $(this).is( settings.filter )); + }; + }; + + function scroll( e, link, settings ){ + var id = link.hash.slice(1), + elem = document.getElementById(id) || document.getElementsByName(id)[0]; + + if ( !elem ) + return; + + if( e ) + e.preventDefault(); + + var $target = $( settings.target ); + + if( settings.lock && $target.is(':animated') || + settings.onBefore && settings.onBefore(e, elem, $target) === false ) + return; + + if( settings.stop ) + $target._scrollable().stop(true); // remove all its animations + + if( settings.hash ){ + var attr = elem.id == id ? 'id' : 'name', + $a = $(' ').attr(attr, id).css({ + position:'absolute', + top: $(window).scrollTop(), + left: $(window).scrollLeft() + }); + + elem[attr] = ''; + $('body').prepend($a); + location = link.hash; + $a.remove(); + elem[attr] = id; + } + + $target + .scrollTo( elem, settings ) // do scroll + .trigger('notify.serialScroll',[elem]); // notify serialScroll about this change + }; + +})( jQuery ); \ No newline at end of file diff --git a/Docs/docstrap-master/template/static/scripts/jquery.min.js b/Docs/docstrap-master/template/static/scripts/jquery.min.js new file mode 100644 index 00000000..c73b79b9 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/jquery.min.js @@ -0,0 +1,3522 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e, t) { + function _(e) { + var t = M[e] = {}; + return v.each(e.split(y), function(e, n) { + t[n] = !0 + }), t + } + + function H(e, n, r) { + if (r === t && e.nodeType === 1) { + var i = "data-" + n.replace(P, "-$1").toLowerCase(); + r = e.getAttribute(i); + if (typeof r == "string") { + try { + r = r === "true" ? !0 : r === "false" ? !1 : r === "null" ? null : +r + "" === r ? +r : D.test(r) ? v.parseJSON(r) : r + } catch (s) {} + v.data(e, n, r) + } else r = t + } + return r + } + + function B(e) { + var t; + for (t in e) { + if (t === "data" && v.isEmptyObject(e[t])) continue; + if (t !== "toJSON") return !1 + } + return !0 + } + + function et() { + return !1 + } + + function tt() { + return !0 + } + + function ut(e) { + return !e || !e.parentNode || e.parentNode.nodeType === 11 + } + + function at(e, t) { + do e = e[t]; + while (e && e.nodeType !== 1); + return e + } + + function ft(e, t, n) { + t = t || 0; + if (v.isFunction(t)) return v.grep(e, function(e, r) { + var i = !! t.call(e, r, e); + return i === n + }); + if (t.nodeType) return v.grep(e, function(e, r) { + return e === t === n + }); + if (typeof t == "string") { + var r = v.grep(e, function(e) { + return e.nodeType === 1 + }); + if (it.test(t)) return v.filter(t, r, !n); + t = v.filter(t, r) + } + return v.grep(e, function(e, r) { + return v.inArray(e, t) >= 0 === n + }) + } + + function lt(e) { + var t = ct.split("|"), + n = e.createDocumentFragment(); + if (n.createElement) while (t.length) n.createElement(t.pop()); + return n + } + + function Lt(e, t) { + return e.getElementsByTagName(t)[0] || e.appendChild(e.ownerDocument.createElement(t)) + } + + function At(e, t) { + if (t.nodeType !== 1 || !v.hasData(e)) return; + var n, r, i, s = v._data(e), + o = v._data(t, s), + u = s.events; + if (u) { + delete o.handle, o.events = {}; + for (n in u) for (r = 0, i = u[n].length; r < i; r++) v.event.add(t, n, u[n][r]) + } + o.data && (o.data = v.extend({}, o.data)) + } + + function Ot(e, t) { + var n; + if (t.nodeType !== 1) return; + t.clearAttributes && t.clearAttributes(), t.mergeAttributes && t.mergeAttributes(e), n = t.nodeName.toLowerCase(), n === "object" ? (t.parentNode && (t.outerHTML = e.outerHTML), v.support.html5Clone && e.innerHTML && !v.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)) : n === "input" && Et.test(e.type) ? (t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)) : n === "option" ? t.selected = e.defaultSelected : n === "input" || n === "textarea" ? t.defaultValue = e.defaultValue : n === "script" && t.text !== e.text && (t.text = e.text), t.removeAttribute(v.expando) + } + + function Mt(e) { + return typeof e.getElementsByTagName != "undefined" ? e.getElementsByTagName("*") : typeof e.querySelectorAll != "undefined" ? e.querySelectorAll("*") : [] + } + + function _t(e) { + Et.test(e.type) && (e.defaultChecked = e.checked) + } + + function Qt(e, t) { + if (t in e) return t; + var n = t.charAt(0).toUpperCase() + t.slice(1), + r = t, + i = Jt.length; + while (i--) { + t = Jt[i] + n; + if (t in e) return t + } + return r + } + + function Gt(e, t) { + return e = t || e, v.css(e, "display") === "none" || !v.contains(e.ownerDocument, e) + } + + function Yt(e, t) { + var n, r, i = [], + s = 0, + o = e.length; + for (; s < o; s++) { + n = e[s]; + if (!n.style) continue; + i[s] = v._data(n, "olddisplay"), t ? (!i[s] && n.style.display === "none" && (n.style.display = ""), n.style.display === "" && Gt(n) && (i[s] = v._data(n, "olddisplay", nn(n.nodeName)))) : (r = Dt(n, "display"), !i[s] && r !== "none" && v._data(n, "olddisplay", r)) + } + for (s = 0; s < o; s++) { + n = e[s]; + if (!n.style) continue; + if (!t || n.style.display === "none" || n.style.display === "") n.style.display = t ? i[s] || "" : "none" + } + return e + } + + function Zt(e, t, n) { + var r = Rt.exec(t); + return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t + } + + function en(e, t, n, r) { + var i = n === (r ? "border" : "content") ? 4 : t === "width" ? 1 : 0, + s = 0; + for (; i < 4; i += 2) n === "margin" && (s += v.css(e, n + $t[i], !0)), r ? (n === "content" && (s -= parseFloat(Dt(e, "padding" + $t[i])) || 0), n !== "margin" && (s -= parseFloat(Dt(e, "border" + $t[i] + "Width")) || 0)) : (s += parseFloat(Dt(e, "padding" + $t[i])) || 0, n !== "padding" && (s += parseFloat(Dt(e, "border" + $t[i] + "Width")) || 0)); + return s + } + + function tn(e, t, n) { + var r = t === "width" ? e.offsetWidth : e.offsetHeight, + i = !0, + s = v.support.boxSizing && v.css(e, "boxSizing") === "border-box"; + if (r <= 0 || r == null) { + r = Dt(e, t); + if (r < 0 || r == null) r = e.style[t]; + if (Ut.test(r)) return r; + i = s && (v.support.boxSizingReliable || r === e.style[t]), r = parseFloat(r) || 0 + } + return r + en(e, t, n || (s ? "border" : "content"), i) + "px" + } + + function nn(e) { + if (Wt[e]) return Wt[e]; + var t = v("<" + e + ">").appendTo(i.body), + n = t.css("display"); + t.remove(); + if (n === "none" || n === "") { + Pt = i.body.appendChild(Pt || v.extend(i.createElement("iframe"), { + frameBorder: 0, + width: 0, + height: 0 + })); + if (!Ht || !Pt.createElement) Ht = (Pt.contentWindow || Pt.contentDocument).document, Ht.write(""), Ht.close(); + t = Ht.body.appendChild(Ht.createElement(e)), n = Dt(t, "display"), i.body.removeChild(Pt) + } + return Wt[e] = n, n + } + + function fn(e, t, n, r) { + var i; + if (v.isArray(t)) v.each(t, function(t, i) { + n || sn.test(e) ? r(e, i) : fn(e + "[" + (typeof i == "object" ? t : "") + "]", i, n, r) + }); + else if (!n && v.type(t) === "object") for (i in t) fn(e + "[" + i + "]", t[i], n, r); + else r(e, t) + } + + function Cn(e) { + return function(t, n) { + typeof t != "string" && (n = t, t = "*"); + var r, i, s, o = t.toLowerCase().split(y), + u = 0, + a = o.length; + if (v.isFunction(n)) for (; u < a; u++) r = o[u], s = /^\+/.test(r), s && (r = r.substr(1) || "*"), i = e[r] = e[r] || [], i[s ? "unshift" : "push"](n) + } + } + + function kn(e, n, r, i, s, o) { + s = s || n.dataTypes[0], o = o || {}, o[s] = !0; + var u, a = e[s], + f = 0, + l = a ? a.length : 0, + c = e === Sn; + for (; f < l && (c || !u); f++) u = a[f](n, r, i), typeof u == "string" && (!c || o[u] ? u = t : (n.dataTypes.unshift(u), u = kn(e, n, r, i, u, o))); + return (c || !u) && !o["*"] && (u = kn(e, n, r, i, "*", o)), u + } + + function Ln(e, n) { + var r, i, s = v.ajaxSettings.flatOptions || {}; + for (r in n) n[r] !== t && ((s[r] ? e : i || (i = {}))[r] = n[r]); + i && v.extend(!0, e, i) + } + + function An(e, n, r) { + var i, s, o, u, a = e.contents, + f = e.dataTypes, + l = e.responseFields; + for (s in l) s in r && (n[l[s]] = r[s]); + while (f[0] === "*") f.shift(), i === t && (i = e.mimeType || n.getResponseHeader("content-type")); + if (i) for (s in a) if (a[s] && a[s].test(i)) { + f.unshift(s); + break + } + if (f[0] in r) o = f[0]; + else { + for (s in r) { + if (!f[0] || e.converters[s + " " + f[0]]) { + o = s; + break + } + u || (u = s) + } + o = o || u + } + if (o) return o !== f[0] && f.unshift(o), r[o] + } + + function On(e, t) { + var n, r, i, s, o = e.dataTypes.slice(), + u = o[0], + a = {}, + f = 0; + e.dataFilter && (t = e.dataFilter(t, e.dataType)); + if (o[1]) for (n in e.converters) a[n.toLowerCase()] = e.converters[n]; + for (; i = o[++f];) if (i !== "*") { + if (u !== "*" && u !== i) { + n = a[u + " " + i] || a["* " + i]; + if (!n) for (r in a) { + s = r.split(" "); + if (s[1] === i) { + n = a[u + " " + s[0]] || a["* " + s[0]]; + if (n) { + n === !0 ? n = a[r] : a[r] !== !0 && (i = s[0], o.splice(f--, 0, i)); + break + } + } + } + if (n !== !0) if (n && e["throws"]) t = n(t); + else try { + t = n(t) + } catch (l) { + return { + state: "parsererror", + error: n ? l : "No conversion from " + u + " to " + i + } + } + } + u = i + } + return { + state: "success", + data: t + } + } + + function Fn() { + try { + return new e.XMLHttpRequest + } catch (t) {} + } + + function In() { + try { + return new e.ActiveXObject("Microsoft.XMLHTTP") + } catch (t) {} + } + + function $n() { + return setTimeout(function() { + qn = t + }, 0), qn = v.now() + } + + function Jn(e, t) { + v.each(t, function(t, n) { + var r = (Vn[t] || []).concat(Vn["*"]), + i = 0, + s = r.length; + for (; i < s; i++) if (r[i].call(e, t, n)) return + }) + } + + function Kn(e, t, n) { + var r, i = 0, + s = 0, + o = Xn.length, + u = v.Deferred().always(function() { + delete a.elem + }), + a = function() { + var t = qn || $n(), + n = Math.max(0, f.startTime + f.duration - t), + r = n / f.duration || 0, + i = 1 - r, + s = 0, + o = f.tweens.length; + for (; s < o; s++) f.tweens[s].run(i); + return u.notifyWith(e, [f, i, n]), i < 1 && o ? n : (u.resolveWith(e, [f]), !1) + }, + f = u.promise({ + elem: e, + props: v.extend({}, t), + opts: v.extend(!0, { + specialEasing: {} + }, n), + originalProperties: t, + originalOptions: n, + startTime: qn || $n(), + duration: n.duration, + tweens: [], + createTween: function(t, n, r) { + var i = v.Tween(e, f.opts, t, n, f.opts.specialEasing[t] || f.opts.easing); + return f.tweens.push(i), i + }, + stop: function(t) { + var n = 0, + r = t ? f.tweens.length : 0; + for (; n < r; n++) f.tweens[n].run(1); + return t ? u.resolveWith(e, [f, t]) : u.rejectWith(e, [f, t]), this + } + }), + l = f.props; + Qn(l, f.opts.specialEasing); + for (; i < o; i++) { + r = Xn[i].call(f, e, l, f.opts); + if (r) return r + } + return Jn(f, l), v.isFunction(f.opts.start) && f.opts.start.call(e, f), v.fx.timer(v.extend(a, { + anim: f, + queue: f.opts.queue, + elem: e + })), f.progress(f.opts.progress).done(f.opts.done, f.opts.complete).fail(f.opts.fail).always(f.opts.always) + } + + function Qn(e, t) { + var n, r, i, s, o; + for (n in e) { + r = v.camelCase(n), i = t[r], s = e[n], v.isArray(s) && (i = s[1], s = e[n] = s[0]), n !== r && (e[r] = s, delete e[n]), o = v.cssHooks[r]; + if (o && "expand" in o) { + s = o.expand(s), delete e[r]; + for (n in s) n in e || (e[n] = s[n], t[n] = i) + } else t[r] = i + } + } + + function Gn(e, t, n) { + var r, i, s, o, u, a, f, l, c, h = this, + p = e.style, + d = {}, + m = [], + g = e.nodeType && Gt(e); + n.queue || (l = v._queueHooks(e, "fx"), l.unqueued == null && (l.unqueued = 0, c = l.empty.fire, l.empty.fire = function() { + l.unqueued || c() + }), l.unqueued++, h.always(function() { + h.always(function() { + l.unqueued--, v.queue(e, "fx").length || l.empty.fire() + }) + })), e.nodeType === 1 && ("height" in t || "width" in t) && (n.overflow = [p.overflow, p.overflowX, p.overflowY], v.css(e, "display") === "inline" && v.css(e, "float") === "none" && (!v.support.inlineBlockNeedsLayout || nn(e.nodeName) === "inline" ? p.display = "inline-block" : p.zoom = 1)), n.overflow && (p.overflow = "hidden", v.support.shrinkWrapBlocks || h.done(function() { + p.overflow = n.overflow[0], p.overflowX = n.overflow[1], p.overflowY = n.overflow[2] + })); + for (r in t) { + s = t[r]; + if (Un.exec(s)) { + delete t[r], a = a || s === "toggle"; + if (s === (g ? "hide" : "show")) continue; + m.push(r) + } + } + o = m.length; + if (o) { + u = v._data(e, "fxshow") || v._data(e, "fxshow", {}), "hidden" in u && (g = u.hidden), a && (u.hidden = !g), g ? v(e).show() : h.done(function() { + v(e).hide() + }), h.done(function() { + var t; + v.removeData(e, "fxshow", !0); + for (t in d) v.style(e, t, d[t]) + }); + for (r = 0; r < o; r++) i = m[r], f = h.createTween(i, g ? u[i] : 0), d[i] = u[i] || v.style(e, i), i in u || (u[i] = f.start, g && (f.end = f.start, f.start = i === "width" || i === "height" ? 1 : 0)) + } + } + + function Yn(e, t, n, r, i) { + return new Yn.prototype.init(e, t, n, r, i) + } + + function Zn(e, t) { + var n, r = { + height: e + }, + i = 0; + t = t ? 1 : 0; + for (; i < 4; i += 2 - t) n = $t[i], r["margin" + n] = r["padding" + n] = e; + return t && (r.opacity = r.width = e), r + } + + function tr(e) { + return v.isWindow(e) ? e : e.nodeType === 9 ? e.defaultView || e.parentWindow : !1 + } + var n, r, i = e.document, + s = e.location, + o = e.navigator, + u = e.jQuery, + a = e.$, + f = Array.prototype.push, + l = Array.prototype.slice, + c = Array.prototype.indexOf, + h = Object.prototype.toString, + p = Object.prototype.hasOwnProperty, + d = String.prototype.trim, + v = function(e, t) { + return new v.fn.init(e, t, n) + }, + m = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, + g = /\S/, + y = /\s+/, + b = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + w = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + E = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + S = /^[\],:{}\s]*$/, + x = /(?:^|:|,)(?:\s*\[)+/g, + T = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + N = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, + C = /^-ms-/, + k = /-([\da-z])/gi, + L = function(e, t) { + return (t + "").toUpperCase() + }, + A = function() { + i.addEventListener ? (i.removeEventListener("DOMContentLoaded", A, !1), v.ready()) : i.readyState === "complete" && (i.detachEvent("onreadystatechange", A), v.ready()) + }, + O = {}; + v.fn = v.prototype = { + constructor: v, + init: function(e, n, r) { + var s, o, u, a; + if (!e) return this; + if (e.nodeType) return this.context = this[0] = e, this.length = 1, this; + if (typeof e == "string") { + e.charAt(0) === "<" && e.charAt(e.length - 1) === ">" && e.length >= 3 ? s = [null, e, null] : s = w.exec(e); + if (s && (s[1] || !n)) { + if (s[1]) return n = n instanceof v ? n[0] : n, a = n && n.nodeType ? n.ownerDocument || n : i, e = v.parseHTML(s[1], a, !0), E.test(s[1]) && v.isPlainObject(n) && this.attr.call(e, n, !0), v.merge(this, e); + o = i.getElementById(s[2]); + if (o && o.parentNode) { + if (o.id !== s[2]) return r.find(e); + this.length = 1, this[0] = o + } + return this.context = i, this.selector = e, this + } + return !n || n.jquery ? (n || r).find(e) : this.constructor(n).find(e) + } + return v.isFunction(e) ? r.ready(e) : (e.selector !== t && (this.selector = e.selector, this.context = e.context), v.makeArray(e, this)) + }, + selector: "", + jquery: "1.8.3", + length: 0, + size: function() { + return this.length + }, + toArray: function() { + return l.call(this) + }, + get: function(e) { + return e == null ? this.toArray() : e < 0 ? this[this.length + e] : this[e] + }, + pushStack: function(e, t, n) { + var r = v.merge(this.constructor(), e); + return r.prevObject = this, r.context = this.context, t === "find" ? r.selector = this.selector + (this.selector ? " " : "") + n : t && (r.selector = this.selector + "." + t + "(" + n + ")"), r + }, + each: function(e, t) { + return v.each(this, e, t) + }, + ready: function(e) { + return v.ready.promise().done(e), this + }, + eq: function(e) { + return e = +e, e === -1 ? this.slice(e) : this.slice(e, e + 1) + }, + first: function() { + return this.eq(0) + }, + last: function() { + return this.eq(-1) + }, + slice: function() { + return this.pushStack(l.apply(this, arguments), "slice", l.call(arguments).join(",")) + }, + map: function(e) { + return this.pushStack(v.map(this, function(t, n) { + return e.call(t, n, t) + })) + }, + end: function() { + return this.prevObject || this.constructor(null) + }, + push: f, + sort: [].sort, + splice: [].splice + }, v.fn.init.prototype = v.fn, v.extend = v.fn.extend = function() { + var e, n, r, i, s, o, u = arguments[0] || {}, + a = 1, + f = arguments.length, + l = !1; + typeof u == "boolean" && (l = u, u = arguments[1] || {}, a = 2), typeof u != "object" && !v.isFunction(u) && (u = {}), f === a && (u = this, --a); + for (; a < f; a++) if ((e = arguments[a]) != null) for (n in e) { + r = u[n], i = e[n]; + if (u === i) continue; + l && i && (v.isPlainObject(i) || (s = v.isArray(i))) ? (s ? (s = !1, o = r && v.isArray(r) ? r : []) : o = r && v.isPlainObject(r) ? r : {}, u[n] = v.extend(l, o, i)) : i !== t && (u[n] = i) + } + return u + }, v.extend({ + noConflict: function(t) { + return e.$ === v && (e.$ = a), t && e.jQuery === v && (e.jQuery = u), v + }, + isReady: !1, + readyWait: 1, + holdReady: function(e) { + e ? v.readyWait++ : v.ready(!0) + }, + ready: function(e) { + if (e === !0 ? --v.readyWait : v.isReady) return; + if (!i.body) return setTimeout(v.ready, 1); + v.isReady = !0; + if (e !== !0 && --v.readyWait > 0) return; + r.resolveWith(i, [v]), v.fn.trigger && v(i).trigger("ready").off("ready") + }, + isFunction: function(e) { + return v.type(e) === "function" + }, + isArray: Array.isArray || + function(e) { + return v.type(e) === "array" + }, + isWindow: function(e) { + return e != null && e == e.window + }, + isNumeric: function(e) { + return !isNaN(parseFloat(e)) && isFinite(e) + }, + type: function(e) { + return e == null ? String(e) : O[h.call(e)] || "object" + }, + isPlainObject: function(e) { + if (!e || v.type(e) !== "object" || e.nodeType || v.isWindow(e)) return !1; + try { + if (e.constructor && !p.call(e, "constructor") && !p.call(e.constructor.prototype, "isPrototypeOf")) return !1 + } catch (n) { + return !1 + } + var r; + for (r in e); + return r === t || p.call(e, r) + }, + isEmptyObject: function(e) { + var t; + for (t in e) return !1; + return !0 + }, + error: function(e) { + throw new Error(e) + }, + parseHTML: function(e, t, n) { + var r; + return !e || typeof e != "string" ? null : (typeof t == "boolean" && (n = t, t = 0), t = t || i, (r = E.exec(e)) ? [t.createElement(r[1])] : (r = v.buildFragment([e], t, n ? null : []), v.merge([], (r.cacheable ? v.clone(r.fragment) : r.fragment).childNodes))) + }, + parseJSON: function(t) { + if (!t || typeof t != "string") return null; + t = v.trim(t); + if (e.JSON && e.JSON.parse) return e.JSON.parse(t); + if (S.test(t.replace(T, "@").replace(N, "]").replace(x, ""))) return (new Function("return " + t))(); + v.error("Invalid JSON: " + t) + }, + parseXML: function(n) { + var r, i; + if (!n || typeof n != "string") return null; + try { + e.DOMParser ? (i = new DOMParser, r = i.parseFromString(n, "text/xml")) : (r = new ActiveXObject("Microsoft.XMLDOM"), r.async = "false", r.loadXML(n)) + } catch (s) { + r = t + } + return (!r || !r.documentElement || r.getElementsByTagName("parsererror").length) && v.error("Invalid XML: " + n), r + }, + noop: function() {}, + globalEval: function(t) { + t && g.test(t) && (e.execScript || + function(t) { + e.eval.call(e, t) + })(t) + }, + camelCase: function(e) { + return e.replace(C, "ms-").replace(k, L) + }, + nodeName: function(e, t) { + return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() + }, + each: function(e, n, r) { + var i, s = 0, + o = e.length, + u = o === t || v.isFunction(e); + if (r) { + if (u) { + for (i in e) if (n.apply(e[i], r) === !1) break + } else for (; s < o;) if (n.apply(e[s++], r) === !1) break + } else if (u) { + for (i in e) if (n.call(e[i], i, e[i]) === !1) break + } else for (; s < o;) if (n.call(e[s], s, e[s++]) === !1) break; + return e + }, + trim: d && !d.call("\ufeff\u00a0") ? + function(e) { + return e == null ? "" : d.call(e) + } : function(e) { + return e == null ? "" : (e + "").replace(b, "") + }, + makeArray: function(e, t) { + var n, r = t || []; + return e != null && (n = v.type(e), e.length == null || n === "string" || n === "function" || n === "regexp" || v.isWindow(e) ? f.call(r, e) : v.merge(r, e)), r + }, + inArray: function(e, t, n) { + var r; + if (t) { + if (c) return c.call(t, e, n); + r = t.length, n = n ? n < 0 ? Math.max(0, r + n) : n : 0; + for (; n < r; n++) if (n in t && t[n] === e) return n + } + return -1 + }, + merge: function(e, n) { + var r = n.length, + i = e.length, + s = 0; + if (typeof r == "number") for (; s < r; s++) e[i++] = n[s]; + else while (n[s] !== t) e[i++] = n[s++]; + return e.length = i, e + }, + grep: function(e, t, n) { + var r, i = [], + s = 0, + o = e.length; + n = !! n; + for (; s < o; s++) r = !! t(e[s], s), n !== r && i.push(e[s]); + return i + }, + map: function(e, n, r) { + var i, s, o = [], + u = 0, + a = e.length, + f = e instanceof v || a !== t && typeof a == "number" && (a > 0 && e[0] && e[a - 1] || a === 0 || v.isArray(e)); + if (f) for (; u < a; u++) i = n(e[u], u, r), i != null && (o[o.length] = i); + else for (s in e) i = n(e[s], s, r), i != null && (o[o.length] = i); + return o.concat.apply([], o) + }, + guid: 1, + proxy: function(e, n) { + var r, i, s; + return typeof n == "string" && (r = e[n], n = e, e = r), v.isFunction(e) ? (i = l.call(arguments, 2), s = function() { + return e.apply(n, i.concat(l.call(arguments))) + }, s.guid = e.guid = e.guid || v.guid++, s) : t + }, + access: function(e, n, r, i, s, o, u) { + var a, f = r == null, + l = 0, + c = e.length; + if (r && typeof r == "object") { + for (l in r) v.access(e, n, l, r[l], 1, o, i); + s = 1 + } else if (i !== t) { + a = u === t && v.isFunction(i), f && (a ? (a = n, n = function(e, t, n) { + return a.call(v(e), n) + }) : (n.call(e, i), n = null)); + if (n) for (; l < c; l++) n(e[l], r, a ? i.call(e[l], l, n(e[l], r)) : i, u); + s = 1 + } + return s ? e : f ? n.call(e) : c ? n(e[0], r) : o + }, + now: function() { + return (new Date).getTime() + } + }), v.ready.promise = function(t) { + if (!r) { + r = v.Deferred(); + if (i.readyState === "complete") setTimeout(v.ready, 1); + else if (i.addEventListener) i.addEventListener("DOMContentLoaded", A, !1), e.addEventListener("load", v.ready, !1); + else { + i.attachEvent("onreadystatechange", A), e.attachEvent("onload", v.ready); + var n = !1; + try { + n = e.frameElement == null && i.documentElement + } catch (s) {} + n && n.doScroll && + function o() { + if (!v.isReady) { + try { + n.doScroll("left") + } catch (e) { + return setTimeout(o, 50) + } + v.ready() + } + }() + } + } + return r.promise(t) + }, v.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(e, t) { + O["[object " + t + "]"] = t.toLowerCase() + }), n = v(i); + var M = {}; + v.Callbacks = function(e) { + e = typeof e == "string" ? M[e] || _(e) : v.extend({}, e); + var n, r, i, s, o, u, a = [], + f = !e.once && [], + l = function(t) { + n = e.memory && t, r = !0, u = s || 0, s = 0, o = a.length, i = !0; + for (; a && u < o; u++) if (a[u].apply(t[0], t[1]) === !1 && e.stopOnFalse) { + n = !1; + break + } + i = !1, a && (f ? f.length && l(f.shift()) : n ? a = [] : c.disable()) + }, + c = { + add: function() { + if (a) { + var t = a.length; + (function r(t) { + v.each(t, function(t, n) { + var i = v.type(n); + i === "function" ? (!e.unique || !c.has(n)) && a.push(n) : n && n.length && i !== "string" && r(n) + }) + })(arguments), i ? o = a.length : n && (s = t, l(n)) + } + return this + }, + remove: function() { + return a && v.each(arguments, function(e, t) { + var n; + while ((n = v.inArray(t, a, n)) > -1) a.splice(n, 1), i && (n <= o && o--, n <= u && u--) + }), this + }, + has: function(e) { + return v.inArray(e, a) > -1 + }, + empty: function() { + return a = [], this + }, + disable: function() { + return a = f = n = t, this + }, + disabled: function() { + return !a + }, + lock: function() { + return f = t, n || c.disable(), this + }, + locked: function() { + return !f + }, + fireWith: function(e, t) { + return t = t || [], t = [e, t.slice ? t.slice() : t], a && (!r || f) && (i ? f.push(t) : l(t)), this + }, + fire: function() { + return c.fireWith(this, arguments), this + }, + fired: function() { + return !!r + } + }; + return c + }, v.extend({ + Deferred: function(e) { + var t = [ + ["resolve", "done", v.Callbacks("once memory"), "resolved"], + ["reject", "fail", v.Callbacks("once memory"), "rejected"], + ["notify", "progress", v.Callbacks("memory")] + ], + n = "pending", + r = { + state: function() { + return n + }, + always: function() { + return i.done(arguments).fail(arguments), this + }, + then: function() { + var e = arguments; + return v.Deferred(function(n) { + v.each(t, function(t, r) { + var s = r[0], + o = e[t]; + i[r[1]](v.isFunction(o) ? + function() { + var e = o.apply(this, arguments); + e && v.isFunction(e.promise) ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[s + "With"](this === i ? n : this, [e]) + } : n[s]) + }), e = null + }).promise() + }, + promise: function(e) { + return e != null ? v.extend(e, r) : r + } + }, + i = {}; + return r.pipe = r.then, v.each(t, function(e, s) { + var o = s[2], + u = s[3]; + r[s[1]] = o.add, u && o.add(function() { + n = u + }, t[e ^ 1][2].disable, t[2][2].lock), i[s[0]] = o.fire, i[s[0] + "With"] = o.fireWith + }), r.promise(i), e && e.call(i, i), i + }, + when: function(e) { + var t = 0, + n = l.call(arguments), + r = n.length, + i = r !== 1 || e && v.isFunction(e.promise) ? r : 0, + s = i === 1 ? e : v.Deferred(), + o = function(e, t, n) { + return function(r) { + t[e] = this, n[e] = arguments.length > 1 ? l.call(arguments) : r, n === u ? s.notifyWith(t, n) : --i || s.resolveWith(t, n) + } + }, + u, a, f; + if (r > 1) { + u = new Array(r), a = new Array(r), f = new Array(r); + for (; t < r; t++) n[t] && v.isFunction(n[t].promise) ? n[t].promise().done(o(t, f, n)).fail(s.reject).progress(o(t, a, u)) : --i + } + return i || s.resolveWith(f, n), s.promise() + } + }), v.support = function() { + var t, n, r, s, o, u, a, f, l, c, h, p = i.createElement("div"); + p.setAttribute("className", "t"), p.innerHTML = "
    a", n = p.getElementsByTagName("*"), r = p.getElementsByTagName("a")[0]; + if (!n || !r || !n.length) return {}; + s = i.createElement("select"), o = s.appendChild(i.createElement("option")), u = p.getElementsByTagName("input")[0], r.style.cssText = "top:1px;float:left;opacity:.5", t = { + leadingWhitespace: p.firstChild.nodeType === 3, + tbody: !p.getElementsByTagName("tbody").length, + htmlSerialize: !! p.getElementsByTagName("link").length, + style: /top/.test(r.getAttribute("style")), + hrefNormalized: r.getAttribute("href") === "/a", + opacity: /^0.5/.test(r.style.opacity), + cssFloat: !! r.style.cssFloat, + checkOn: u.value === "on", + optSelected: o.selected, + getSetAttribute: p.className !== "t", + enctype: !! i.createElement("form").enctype, + html5Clone: i.createElement("nav").cloneNode(!0).outerHTML !== "<:nav>", + boxModel: i.compatMode === "CSS1Compat", + submitBubbles: !0, + changeBubbles: !0, + focusinBubbles: !1, + deleteExpando: !0, + noCloneEvent: !0, + inlineBlockNeedsLayout: !1, + shrinkWrapBlocks: !1, + reliableMarginRight: !0, + boxSizingReliable: !0, + pixelPosition: !1 + }, u.checked = !0, t.noCloneChecked = u.cloneNode(!0).checked, s.disabled = !0, t.optDisabled = !o.disabled; + try { + delete p.test + } catch (d) { + t.deleteExpando = !1 + }!p.addEventListener && p.attachEvent && p.fireEvent && (p.attachEvent("onclick", h = function() { + t.noCloneEvent = !1 + }), p.cloneNode(!0).fireEvent("onclick"), p.detachEvent("onclick", h)), u = i.createElement("input"), u.value = "t", u.setAttribute("type", "radio"), t.radioValue = u.value === "t", u.setAttribute("checked", "checked"), u.setAttribute("name", "t"), p.appendChild(u), a = i.createDocumentFragment(), a.appendChild(p.lastChild), t.checkClone = a.cloneNode(!0).cloneNode(!0).lastChild.checked, t.appendChecked = u.checked, a.removeChild(u), a.appendChild(p); + if (p.attachEvent) for (l in { + submit: !0, + change: !0, + focusin: !0 + }) f = "on" + l, c = f in p, c || (p.setAttribute(f, "return;"), c = typeof p[f] == "function"), t[l + "Bubbles"] = c; + return v(function() { + var n, r, s, o, u = "padding:0;margin:0;border:0;display:block;overflow:hidden;", + a = i.getElementsByTagName("body")[0]; + if (!a) return; + n = i.createElement("div"), n.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px", a.insertBefore(n, a.firstChild), r = i.createElement("div"), n.appendChild(r), r.innerHTML = "
    t
    ", s = r.getElementsByTagName("td"), s[0].style.cssText = "padding:0;margin:0;border:0;display:none", c = s[0].offsetHeight === 0, s[0].style.display = "", s[1].style.display = "none", t.reliableHiddenOffsets = c && s[0].offsetHeight === 0, r.innerHTML = "", r.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", t.boxSizing = r.offsetWidth === 4, t.doesNotIncludeMarginInBodyOffset = a.offsetTop !== 1, e.getComputedStyle && (t.pixelPosition = (e.getComputedStyle(r, null) || {}).top !== "1%", t.boxSizingReliable = (e.getComputedStyle(r, null) || { + width: "4px" + }).width === "4px", o = i.createElement("div"), o.style.cssText = r.style.cssText = u, o.style.marginRight = o.style.width = "0", r.style.width = "1px", r.appendChild(o), t.reliableMarginRight = !parseFloat((e.getComputedStyle(o, null) || {}).marginRight)), typeof r.style.zoom != "undefined" && (r.innerHTML = "", r.style.cssText = u + "width:1px;padding:1px;display:inline;zoom:1", t.inlineBlockNeedsLayout = r.offsetWidth === 3, r.style.display = "block", r.style.overflow = "visible", r.innerHTML = "
    ", r.firstChild.style.width = "5px", t.shrinkWrapBlocks = r.offsetWidth !== 3, n.style.zoom = 1), a.removeChild(n), n = r = s = o = null + }), a.removeChild(p), n = r = s = o = u = a = p = null, t + }(); + var D = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + P = /([A-Z])/g; + v.extend({ + cache: {}, + deletedIds: [], + uuid: 0, + expando: "jQuery" + (v.fn.jquery + Math.random()).replace(/\D/g, ""), + noData: { + embed: !0, + object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + applet: !0 + }, + hasData: function(e) { + return e = e.nodeType ? v.cache[e[v.expando]] : e[v.expando], !! e && !B(e) + }, + data: function(e, n, r, i) { + if (!v.acceptData(e)) return; + var s, o, u = v.expando, + a = typeof n == "string", + f = e.nodeType, + l = f ? v.cache : e, + c = f ? e[u] : e[u] && u; + if ((!c || !l[c] || !i && !l[c].data) && a && r === t) return; + c || (f ? e[u] = c = v.deletedIds.pop() || v.guid++ : c = u), l[c] || (l[c] = {}, f || (l[c].toJSON = v.noop)); + if (typeof n == "object" || typeof n == "function") i ? l[c] = v.extend(l[c], n) : l[c].data = v.extend(l[c].data, n); + return s = l[c], i || (s.data || (s.data = {}), s = s.data), r !== t && (s[v.camelCase(n)] = r), a ? (o = s[n], o == null && (o = s[v.camelCase(n)])) : o = s, o + }, + removeData: function(e, t, n) { + if (!v.acceptData(e)) return; + var r, i, s, o = e.nodeType, + u = o ? v.cache : e, + a = o ? e[v.expando] : v.expando; + if (!u[a]) return; + if (t) { + r = n ? u[a] : u[a].data; + if (r) { + v.isArray(t) || (t in r ? t = [t] : (t = v.camelCase(t), t in r ? t = [t] : t = t.split(" "))); + for (i = 0, s = t.length; i < s; i++) delete r[t[i]]; + if (!(n ? B : v.isEmptyObject)(r)) return + } + } + if (!n) { + delete u[a].data; + if (!B(u[a])) return + } + o ? v.cleanData([e], !0) : v.support.deleteExpando || u != u.window ? delete u[a] : u[a] = null + }, + _data: function(e, t, n) { + return v.data(e, t, n, !0) + }, + acceptData: function(e) { + var t = e.nodeName && v.noData[e.nodeName.toLowerCase()]; + return !t || t !== !0 && e.getAttribute("classid") === t + } + }), v.fn.extend({ + data: function(e, n) { + var r, i, s, o, u, a = this[0], + f = 0, + l = null; + if (e === t) { + if (this.length) { + l = v.data(a); + if (a.nodeType === 1 && !v._data(a, "parsedAttrs")) { + s = a.attributes; + for (u = s.length; f < u; f++) o = s[f].name, o.indexOf("data-") || (o = v.camelCase(o.substring(5)), H(a, o, l[o])); + v._data(a, "parsedAttrs", !0) + } + } + return l + } + return typeof e == "object" ? this.each(function() { + v.data(this, e) + }) : (r = e.split(".", 2), r[1] = r[1] ? "." + r[1] : "", i = r[1] + "!", v.access(this, function(n) { + if (n === t) return l = this.triggerHandler("getData" + i, [r[0]]), l === t && a && (l = v.data(a, e), l = H(a, e, l)), l === t && r[1] ? this.data(r[0]) : l; + r[1] = n, this.each(function() { + var t = v(this); + t.triggerHandler("setData" + i, r), v.data(this, e, n), t.triggerHandler("changeData" + i, r) + }) + }, null, n, arguments.length > 1, null, !1)) + }, + removeData: function(e) { + return this.each(function() { + v.removeData(this, e) + }) + } + }), v.extend({ + queue: function(e, t, n) { + var r; + if (e) return t = (t || "fx") + "queue", r = v._data(e, t), n && (!r || v.isArray(n) ? r = v._data(e, t, v.makeArray(n)) : r.push(n)), r || [] + }, + dequeue: function(e, t) { + t = t || "fx"; + var n = v.queue(e, t), + r = n.length, + i = n.shift(), + s = v._queueHooks(e, t), + o = function() { + v.dequeue(e, t) + }; + i === "inprogress" && (i = n.shift(), r--), i && (t === "fx" && n.unshift("inprogress"), delete s.stop, i.call(e, o, s)), !r && s && s.empty.fire() + }, + _queueHooks: function(e, t) { + var n = t + "queueHooks"; + return v._data(e, n) || v._data(e, n, { + empty: v.Callbacks("once memory").add(function() { + v.removeData(e, t + "queue", !0), v.removeData(e, n, !0) + }) + }) + } + }), v.fn.extend({ + queue: function(e, n) { + var r = 2; + return typeof e != "string" && (n = e, e = "fx", r--), arguments.length < r ? v.queue(this[0], e) : n === t ? this : this.each(function() { + var t = v.queue(this, e, n); + v._queueHooks(this, e), e === "fx" && t[0] !== "inprogress" && v.dequeue(this, e) + }) + }, + dequeue: function(e) { + return this.each(function() { + v.dequeue(this, e) + }) + }, + delay: function(e, t) { + return e = v.fx ? v.fx.speeds[e] || e : e, t = t || "fx", this.queue(t, function(t, n) { + var r = setTimeout(t, e); + n.stop = function() { + clearTimeout(r) + } + }) + }, + clearQueue: function(e) { + return this.queue(e || "fx", []) + }, + promise: function(e, n) { + var r, i = 1, + s = v.Deferred(), + o = this, + u = this.length, + a = function() { + --i || s.resolveWith(o, [o]) + }; + typeof e != "string" && (n = e, e = t), e = e || "fx"; + while (u--) r = v._data(o[u], e + "queueHooks"), r && r.empty && (i++, r.empty.add(a)); + return a(), s.promise(n) + } + }); + var j, F, I, q = /[\t\r\n]/g, + R = /\r/g, + U = /^(?:button|input)$/i, + z = /^(?:button|input|object|select|textarea)$/i, + W = /^a(?:rea|)$/i, + X = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + V = v.support.getSetAttribute; + v.fn.extend({ + attr: function(e, t) { + return v.access(this, v.attr, e, t, arguments.length > 1) + }, + removeAttr: function(e) { + return this.each(function() { + v.removeAttr(this, e) + }) + }, + prop: function(e, t) { + return v.access(this, v.prop, e, t, arguments.length > 1) + }, + removeProp: function(e) { + return e = v.propFix[e] || e, this.each(function() { + try { + this[e] = t, delete this[e] + } catch (n) {} + }) + }, + addClass: function(e) { + var t, n, r, i, s, o, u; + if (v.isFunction(e)) return this.each(function(t) { + v(this).addClass(e.call(this, t, this.className)) + }); + if (e && typeof e == "string") { + t = e.split(y); + for (n = 0, r = this.length; n < r; n++) { + i = this[n]; + if (i.nodeType === 1) if (!i.className && t.length === 1) i.className = e; + else { + s = " " + i.className + " "; + for (o = 0, u = t.length; o < u; o++) s.indexOf(" " + t[o] + " ") < 0 && (s += t[o] + " "); + i.className = v.trim(s) + } + } + } + return this + }, + removeClass: function(e) { + var n, r, i, s, o, u, a; + if (v.isFunction(e)) return this.each(function(t) { + v(this).removeClass(e.call(this, t, this.className)) + }); + if (e && typeof e == "string" || e === t) { + n = (e || "").split(y); + for (u = 0, a = this.length; u < a; u++) { + i = this[u]; + if (i.nodeType === 1 && i.className) { + r = (" " + i.className + " ").replace(q, " "); + for (s = 0, o = n.length; s < o; s++) while (r.indexOf(" " + n[s] + " ") >= 0) r = r.replace(" " + n[s] + " ", " "); + i.className = e ? v.trim(r) : "" + } + } + } + return this + }, + toggleClass: function(e, t) { + var n = typeof e, + r = typeof t == "boolean"; + return v.isFunction(e) ? this.each(function(n) { + v(this).toggleClass(e.call(this, n, this.className, t), t) + }) : this.each(function() { + if (n === "string") { + var i, s = 0, + o = v(this), + u = t, + a = e.split(y); + while (i = a[s++]) u = r ? u : !o.hasClass(i), o[u ? "addClass" : "removeClass"](i) + } else if (n === "undefined" || n === "boolean") this.className && v._data(this, "__className__", this.className), this.className = this.className || e === !1 ? "" : v._data(this, "__className__") || "" + }) + }, + hasClass: function(e) { + var t = " " + e + " ", + n = 0, + r = this.length; + for (; n < r; n++) if (this[n].nodeType === 1 && (" " + this[n].className + " ").replace(q, " ").indexOf(t) >= 0) return !0; + return !1 + }, + val: function(e) { + var n, r, i, s = this[0]; + if (!arguments.length) { + if (s) return n = v.valHooks[s.type] || v.valHooks[s.nodeName.toLowerCase()], n && "get" in n && (r = n.get(s, "value")) !== t ? r : (r = s.value, typeof r == "string" ? r.replace(R, "") : r == null ? "" : r); + return + } + return i = v.isFunction(e), this.each(function(r) { + var s, o = v(this); + if (this.nodeType !== 1) return; + i ? s = e.call(this, r, o.val()) : s = e, s == null ? s = "" : typeof s == "number" ? s += "" : v.isArray(s) && (s = v.map(s, function(e) { + return e == null ? "" : e + "" + })), n = v.valHooks[this.type] || v.valHooks[this.nodeName.toLowerCase()]; + if (!n || !("set" in n) || n.set(this, s, "value") === t) this.value = s + }) + } + }), v.extend({ + valHooks: { + option: { + get: function(e) { + var t = e.attributes.value; + return !t || t.specified ? e.value : e.text + } + }, + select: { + get: function(e) { + var t, n, r = e.options, + i = e.selectedIndex, + s = e.type === "select-one" || i < 0, + o = s ? null : [], + u = s ? i + 1 : r.length, + a = i < 0 ? u : s ? i : 0; + for (; a < u; a++) { + n = r[a]; + if ((n.selected || a === i) && (v.support.optDisabled ? !n.disabled : n.getAttribute("disabled") === null) && (!n.parentNode.disabled || !v.nodeName(n.parentNode, "optgroup"))) { + t = v(n).val(); + if (s) return t; + o.push(t) + } + } + return o + }, + set: function(e, t) { + var n = v.makeArray(t); + return v(e).find("option").each(function() { + this.selected = v.inArray(v(this).val(), n) >= 0 + }), n.length || (e.selectedIndex = -1), n + } + } + }, + attrFn: {}, + attr: function(e, n, r, i) { + var s, o, u, a = e.nodeType; + if (!e || a === 3 || a === 8 || a === 2) return; + if (i && v.isFunction(v.fn[n])) return v(e)[n](r); + if (typeof e.getAttribute == "undefined") return v.prop(e, n, r); + u = a !== 1 || !v.isXMLDoc(e), u && (n = n.toLowerCase(), o = v.attrHooks[n] || (X.test(n) ? F : j)); + if (r !== t) { + if (r === null) { + v.removeAttr(e, n); + return + } + return o && "set" in o && u && (s = o.set(e, r, n)) !== t ? s : (e.setAttribute(n, r + ""), r) + } + return o && "get" in o && u && (s = o.get(e, n)) !== null ? s : (s = e.getAttribute(n), s === null ? t : s) + }, + removeAttr: function(e, t) { + var n, r, i, s, o = 0; + if (t && e.nodeType === 1) { + r = t.split(y); + for (; o < r.length; o++) i = r[o], i && (n = v.propFix[i] || i, s = X.test(i), s || v.attr(e, i, ""), e.removeAttribute(V ? i : n), s && n in e && (e[n] = !1)) + } + }, + attrHooks: { + type: { + set: function(e, t) { + if (U.test(e.nodeName) && e.parentNode) v.error("type property can't be changed"); + else if (!v.support.radioValue && t === "radio" && v.nodeName(e, "input")) { + var n = e.value; + return e.setAttribute("type", t), n && (e.value = n), t + } + } + }, + value: { + get: function(e, t) { + return j && v.nodeName(e, "button") ? j.get(e, t) : t in e ? e.value : null + }, + set: function(e, t, n) { + if (j && v.nodeName(e, "button")) return j.set(e, t, n); + e.value = t + } + } + }, + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + prop: function(e, n, r) { + var i, s, o, u = e.nodeType; + if (!e || u === 3 || u === 8 || u === 2) return; + return o = u !== 1 || !v.isXMLDoc(e), o && (n = v.propFix[n] || n, s = v.propHooks[n]), r !== t ? s && "set" in s && (i = s.set(e, r, n)) !== t ? i : e[n] = r : s && "get" in s && (i = s.get(e, n)) !== null ? i : e[n] + }, + propHooks: { + tabIndex: { + get: function(e) { + var n = e.getAttributeNode("tabindex"); + return n && n.specified ? parseInt(n.value, 10) : z.test(e.nodeName) || W.test(e.nodeName) && e.href ? 0 : t + } + } + } + }), F = { + get: function(e, n) { + var r, i = v.prop(e, n); + return i === !0 || typeof i != "boolean" && (r = e.getAttributeNode(n)) && r.nodeValue !== !1 ? n.toLowerCase() : t + }, + set: function(e, t, n) { + var r; + return t === !1 ? v.removeAttr(e, n) : (r = v.propFix[n] || n, r in e && (e[r] = !0), e.setAttribute(n, n.toLowerCase())), n + } + }, V || (I = { + name: !0, + id: !0, + coords: !0 + }, j = v.valHooks.button = { + get: function(e, n) { + var r; + return r = e.getAttributeNode(n), r && (I[n] ? r.value !== "" : r.specified) ? r.value : t + }, + set: function(e, t, n) { + var r = e.getAttributeNode(n); + return r || (r = i.createAttribute(n), e.setAttributeNode(r)), r.value = t + "" + } + }, v.each(["width", "height"], function(e, t) { + v.attrHooks[t] = v.extend(v.attrHooks[t], { + set: function(e, n) { + if (n === "") return e.setAttribute(t, "auto"), n + } + }) + }), v.attrHooks.contenteditable = { + get: j.get, + set: function(e, t, n) { + t === "" && (t = "false"), j.set(e, t, n) + } + }), v.support.hrefNormalized || v.each(["href", "src", "width", "height"], function(e, n) { + v.attrHooks[n] = v.extend(v.attrHooks[n], { + get: function(e) { + var r = e.getAttribute(n, 2); + return r === null ? t : r + } + }) + }), v.support.style || (v.attrHooks.style = { + get: function(e) { + return e.style.cssText.toLowerCase() || t + }, + set: function(e, t) { + return e.style.cssText = t + "" + } + }), v.support.optSelected || (v.propHooks.selected = v.extend(v.propHooks.selected, { + get: function(e) { + var t = e.parentNode; + return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null + } + })), v.support.enctype || (v.propFix.enctype = "encoding"), v.support.checkOn || v.each(["radio", "checkbox"], function() { + v.valHooks[this] = { + get: function(e) { + return e.getAttribute("value") === null ? "on" : e.value + } + } + }), v.each(["radio", "checkbox"], function() { + v.valHooks[this] = v.extend(v.valHooks[this], { + set: function(e, t) { + if (v.isArray(t)) return e.checked = v.inArray(v(e).val(), t) >= 0 + } + }) + }); + var $ = /^(?:textarea|input|select)$/i, + J = /^([^\.]*|)(?:\.(.+)|)$/, + K = /(?:^|\s)hover(\.\S+|)\b/, + Q = /^key/, + G = /^(?:mouse|contextmenu)|click/, + Y = /^(?:focusinfocus|focusoutblur)$/, + Z = function(e) { + return v.event.special.hover ? e : e.replace(K, "mouseenter$1 mouseleave$1") + }; + v.event = { + add: function(e, n, r, i, s) { + var o, u, a, f, l, c, h, p, d, m, g; + if (e.nodeType === 3 || e.nodeType === 8 || !n || !r || !(o = v._data(e))) return; + r.handler && (d = r, r = d.handler, s = d.selector), r.guid || (r.guid = v.guid++), a = o.events, a || (o.events = a = {}), u = o.handle, u || (o.handle = u = function(e) { + return typeof v == "undefined" || !! e && v.event.triggered === e.type ? t : v.event.dispatch.apply(u.elem, arguments) + }, u.elem = e), n = v.trim(Z(n)).split(" "); + for (f = 0; f < n.length; f++) { + l = J.exec(n[f]) || [], c = l[1], h = (l[2] || "").split(".").sort(), g = v.event.special[c] || {}, c = (s ? g.delegateType : g.bindType) || c, g = v.event.special[c] || {}, p = v.extend({ + type: c, + origType: l[1], + data: i, + handler: r, + guid: r.guid, + selector: s, + needsContext: s && v.expr.match.needsContext.test(s), + namespace: h.join(".") + }, d), m = a[c]; + if (!m) { + m = a[c] = [], m.delegateCount = 0; + if (!g.setup || g.setup.call(e, i, h, u) === !1) e.addEventListener ? e.addEventListener(c, u, !1) : e.attachEvent && e.attachEvent("on" + c, u) + } + g.add && (g.add.call(e, p), p.handler.guid || (p.handler.guid = r.guid)), s ? m.splice(m.delegateCount++, 0, p) : m.push(p), v.event.global[c] = !0 + } + e = null + }, + global: {}, + remove: function(e, t, n, r, i) { + var s, o, u, a, f, l, c, h, p, d, m, g = v.hasData(e) && v._data(e); + if (!g || !(h = g.events)) return; + t = v.trim(Z(t || "")).split(" "); + for (s = 0; s < t.length; s++) { + o = J.exec(t[s]) || [], u = a = o[1], f = o[2]; + if (!u) { + for (u in h) v.event.remove(e, u + t[s], n, r, !0); + continue + } + p = v.event.special[u] || {}, u = (r ? p.delegateType : p.bindType) || u, d = h[u] || [], l = d.length, f = f ? new RegExp("(^|\\.)" + f.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; + for (c = 0; c < d.length; c++) m = d[c], (i || a === m.origType) && (!n || n.guid === m.guid) && (!f || f.test(m.namespace)) && (!r || r === m.selector || r === "**" && m.selector) && (d.splice(c--, 1), m.selector && d.delegateCount--, p.remove && p.remove.call(e, m)); + d.length === 0 && l !== d.length && ((!p.teardown || p.teardown.call(e, f, g.handle) === !1) && v.removeEvent(e, u, g.handle), delete h[u]) + } + v.isEmptyObject(h) && (delete g.handle, v.removeData(e, "events", !0)) + }, + customEvent: { + getData: !0, + setData: !0, + changeData: !0 + }, + trigger: function(n, r, s, o) { + if (!s || s.nodeType !== 3 && s.nodeType !== 8) { + var u, a, f, l, c, h, p, d, m, g, y = n.type || n, + b = []; + if (Y.test(y + v.event.triggered)) return; + y.indexOf("!") >= 0 && (y = y.slice(0, -1), a = !0), y.indexOf(".") >= 0 && (b = y.split("."), y = b.shift(), b.sort()); + if ((!s || v.event.customEvent[y]) && !v.event.global[y]) return; + n = typeof n == "object" ? n[v.expando] ? n : new v.Event(y, n) : new v.Event(y), n.type = y, n.isTrigger = !0, n.exclusive = a, n.namespace = b.join("."), n.namespace_re = n.namespace ? new RegExp("(^|\\.)" + b.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, h = y.indexOf(":") < 0 ? "on" + y : ""; + if (!s) { + u = v.cache; + for (f in u) u[f].events && u[f].events[y] && v.event.trigger(n, r, u[f].handle.elem, !0); + return + } + n.result = t, n.target || (n.target = s), r = r != null ? v.makeArray(r) : [], r.unshift(n), p = v.event.special[y] || {}; + if (p.trigger && p.trigger.apply(s, r) === !1) return; + m = [ + [s, p.bindType || y] + ]; + if (!o && !p.noBubble && !v.isWindow(s)) { + g = p.delegateType || y, l = Y.test(g + y) ? s : s.parentNode; + for (c = s; l; l = l.parentNode) m.push([l, g]), c = l; + c === (s.ownerDocument || i) && m.push([c.defaultView || c.parentWindow || e, g]) + } + for (f = 0; f < m.length && !n.isPropagationStopped(); f++) l = m[f][0], n.type = m[f][1], d = (v._data(l, "events") || {})[n.type] && v._data(l, "handle"), d && d.apply(l, r), d = h && l[h], d && v.acceptData(l) && d.apply && d.apply(l, r) === !1 && n.preventDefault(); + return n.type = y, !o && !n.isDefaultPrevented() && (!p._default || p._default.apply(s.ownerDocument, r) === !1) && (y !== "click" || !v.nodeName(s, "a")) && v.acceptData(s) && h && s[y] && (y !== "focus" && y !== "blur" || n.target.offsetWidth !== 0) && !v.isWindow(s) && (c = s[h], c && (s[h] = null), v.event.triggered = y, s[y](), v.event.triggered = t, c && (s[h] = c)), n.result + } + return + }, + dispatch: function(n) { + n = v.event.fix(n || e.event); + var r, i, s, o, u, a, f, c, h, p, d = (v._data(this, "events") || {})[n.type] || [], + m = d.delegateCount, + g = l.call(arguments), + y = !n.exclusive && !n.namespace, + b = v.event.special[n.type] || {}, + w = []; + g[0] = n, n.delegateTarget = this; + if (b.preDispatch && b.preDispatch.call(this, n) === !1) return; + if (m && (!n.button || n.type !== "click")) for (s = n.target; s != this; s = s.parentNode || this) if (s.disabled !== !0 || n.type !== "click") { + u = {}, f = []; + for (r = 0; r < m; r++) c = d[r], h = c.selector, u[h] === t && (u[h] = c.needsContext ? v(h, this).index(s) >= 0 : v.find(h, this, null, [s]).length), u[h] && f.push(c); + f.length && w.push({ + elem: s, + matches: f + }) + } + d.length > m && w.push({ + elem: this, + matches: d.slice(m) + }); + for (r = 0; r < w.length && !n.isPropagationStopped(); r++) { + a = w[r], n.currentTarget = a.elem; + for (i = 0; i < a.matches.length && !n.isImmediatePropagationStopped(); i++) { + c = a.matches[i]; + if (y || !n.namespace && !c.namespace || n.namespace_re && n.namespace_re.test(c.namespace)) n.data = c.data, n.handleObj = c, o = ((v.event.special[c.origType] || {}).handle || c.handler).apply(a.elem, g), o !== t && (n.result = o, o === !1 && (n.preventDefault(), n.stopPropagation())) + } + } + return b.postDispatch && b.postDispatch.call(this, n), n.result + }, + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + fixHooks: {}, + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function(e, t) { + return e.which == null && (e.which = t.charCode != null ? t.charCode : t.keyCode), e + } + }, + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function(e, n) { + var r, s, o, u = n.button, + a = n.fromElement; + return e.pageX == null && n.clientX != null && (r = e.target.ownerDocument || i, s = r.documentElement, o = r.body, e.pageX = n.clientX + (s && s.scrollLeft || o && o.scrollLeft || 0) - (s && s.clientLeft || o && o.clientLeft || 0), e.pageY = n.clientY + (s && s.scrollTop || o && o.scrollTop || 0) - (s && s.clientTop || o && o.clientTop || 0)), !e.relatedTarget && a && (e.relatedTarget = a === e.target ? n.toElement : a), !e.which && u !== t && (e.which = u & 1 ? 1 : u & 2 ? 3 : u & 4 ? 2 : 0), e + } + }, + fix: function(e) { + if (e[v.expando]) return e; + var t, n, r = e, + s = v.event.fixHooks[e.type] || {}, + o = s.props ? this.props.concat(s.props) : this.props; + e = v.Event(r); + for (t = o.length; t;) n = o[--t], e[n] = r[n]; + return e.target || (e.target = r.srcElement || i), e.target.nodeType === 3 && (e.target = e.target.parentNode), e.metaKey = !! e.metaKey, s.filter ? s.filter(e, r) : e + }, + special: { + load: { + noBubble: !0 + }, + focus: { + delegateType: "focusin" + }, + blur: { + delegateType: "focusout" + }, + beforeunload: { + setup: function(e, t, n) { + v.isWindow(this) && (this.onbeforeunload = n) + }, + teardown: function(e, t) { + this.onbeforeunload === t && (this.onbeforeunload = null) + } + } + }, + simulate: function(e, t, n, r) { + var i = v.extend(new v.Event, n, { + type: e, + isSimulated: !0, + originalEvent: {} + }); + r ? v.event.trigger(i, null, t) : v.event.dispatch.call(t, i), i.isDefaultPrevented() && n.preventDefault() + } + }, v.event.handle = v.event.dispatch, v.removeEvent = i.removeEventListener ? + function(e, t, n) { + e.removeEventListener && e.removeEventListener(t, n, !1) + } : function(e, t, n) { + var r = "on" + t; + e.detachEvent && (typeof e[r] == "undefined" && (e[r] = null), e.detachEvent(r, n)) + }, v.Event = function(e, t) { + if (!(this instanceof v.Event)) return new v.Event(e, t); + e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.returnValue === !1 || e.getPreventDefault && e.getPreventDefault() ? tt : et) : this.type = e, t && v.extend(this, t), this.timeStamp = e && e.timeStamp || v.now(), this[v.expando] = !0 + }, v.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = tt; + var e = this.originalEvent; + if (!e) return; + e.preventDefault ? e.preventDefault() : e.returnValue = !1 + }, + stopPropagation: function() { + this.isPropagationStopped = tt; + var e = this.originalEvent; + if (!e) return; + e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0 + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = tt, this.stopPropagation() + }, + isDefaultPrevented: et, + isPropagationStopped: et, + isImmediatePropagationStopped: et + }, v.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" + }, function(e, t) { + v.event.special[e] = { + delegateType: t, + bindType: t, + handle: function(e) { + var n, r = this, + i = e.relatedTarget, + s = e.handleObj, + o = s.selector; + if (!i || i !== r && !v.contains(r, i)) e.type = s.origType, n = s.handler.apply(this, arguments), e.type = t; + return n + } + } + }), v.support.submitBubbles || (v.event.special.submit = { + setup: function() { + if (v.nodeName(this, "form")) return !1; + v.event.add(this, "click._submit keypress._submit", function(e) { + var n = e.target, + r = v.nodeName(n, "input") || v.nodeName(n, "button") ? n.form : t; + r && !v._data(r, "_submit_attached") && (v.event.add(r, "submit._submit", function(e) { + e._submit_bubble = !0 + }), v._data(r, "_submit_attached", !0)) + }) + }, + postDispatch: function(e) { + e._submit_bubble && (delete e._submit_bubble, this.parentNode && !e.isTrigger && v.event.simulate("submit", this.parentNode, e, !0)) + }, + teardown: function() { + if (v.nodeName(this, "form")) return !1; + v.event.remove(this, "._submit") + } + }), v.support.changeBubbles || (v.event.special.change = { + setup: function() { + if ($.test(this.nodeName)) { + if (this.type === "checkbox" || this.type === "radio") v.event.add(this, "propertychange._change", function(e) { + e.originalEvent.propertyName === "checked" && (this._just_changed = !0) + }), v.event.add(this, "click._change", function(e) { + this._just_changed && !e.isTrigger && (this._just_changed = !1), v.event.simulate("change", this, e, !0) + }); + return !1 + } + v.event.add(this, "beforeactivate._change", function(e) { + var t = e.target; + $.test(t.nodeName) && !v._data(t, "_change_attached") && (v.event.add(t, "change._change", function(e) { + this.parentNode && !e.isSimulated && !e.isTrigger && v.event.simulate("change", this.parentNode, e, !0) + }), v._data(t, "_change_attached", !0)) + }) + }, + handle: function(e) { + var t = e.target; + if (this !== t || e.isSimulated || e.isTrigger || t.type !== "radio" && t.type !== "checkbox") return e.handleObj.handler.apply(this, arguments) + }, + teardown: function() { + return v.event.remove(this, "._change"), !$.test(this.nodeName) + } + }), v.support.focusinBubbles || v.each({ + focus: "focusin", + blur: "focusout" + }, function(e, t) { + var n = 0, + r = function(e) { + v.event.simulate(t, e.target, v.event.fix(e), !0) + }; + v.event.special[t] = { + setup: function() { + n++ === 0 && i.addEventListener(e, r, !0) + }, + teardown: function() { + --n === 0 && i.removeEventListener(e, r, !0) + } + } + }), v.fn.extend({ + on: function(e, n, r, i, s) { + var o, u; + if (typeof e == "object") { + typeof n != "string" && (r = r || n, n = t); + for (u in e) this.on(u, n, r, e[u], s); + return this + } + r == null && i == null ? (i = n, r = n = t) : i == null && (typeof n == "string" ? (i = r, r = t) : (i = r, r = n, n = t)); + if (i === !1) i = et; + else if (!i) return this; + return s === 1 && (o = i, i = function(e) { + return v().off(e), o.apply(this, arguments) + }, i.guid = o.guid || (o.guid = v.guid++)), this.each(function() { + v.event.add(this, e, i, r, n) + }) + }, + one: function(e, t, n, r) { + return this.on(e, t, n, r, 1) + }, + off: function(e, n, r) { + var i, s; + if (e && e.preventDefault && e.handleObj) return i = e.handleObj, v(e.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this; + if (typeof e == "object") { + for (s in e) this.off(s, n, e[s]); + return this + } + if (n === !1 || typeof n == "function") r = n, n = t; + return r === !1 && (r = et), this.each(function() { + v.event.remove(this, e, r, n) + }) + }, + bind: function(e, t, n) { + return this.on(e, null, t, n) + }, + unbind: function(e, t) { + return this.off(e, null, t) + }, + live: function(e, t, n) { + return v(this.context).on(e, this.selector, t, n), this + }, + die: function(e, t) { + return v(this.context).off(e, this.selector || "**", t), this + }, + delegate: function(e, t, n, r) { + return this.on(t, e, n, r) + }, + undelegate: function(e, t, n) { + return arguments.length === 1 ? this.off(e, "**") : this.off(t, e || "**", n) + }, + trigger: function(e, t) { + return this.each(function() { + v.event.trigger(e, t, this) + }) + }, + triggerHandler: function(e, t) { + if (this[0]) return v.event.trigger(e, t, this[0], !0) + }, + toggle: function(e) { + var t = arguments, + n = e.guid || v.guid++, + r = 0, + i = function(n) { + var i = (v._data(this, "lastToggle" + e.guid) || 0) % r; + return v._data(this, "lastToggle" + e.guid, i + 1), n.preventDefault(), t[i].apply(this, arguments) || !1 + }; + i.guid = n; + while (r < t.length) t[r++].guid = n; + return this.click(i) + }, + hover: function(e, t) { + return this.mouseenter(e).mouseleave(t || e) + } + }), v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(e, t) { + v.fn[t] = function(e, n) { + return n == null && (n = e, e = null), arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) + }, Q.test(t) && (v.event.fixHooks[t] = v.event.keyHooks), G.test(t) && (v.event.fixHooks[t] = v.event.mouseHooks) + }), function(e, t) { + function nt(e, t, n, r) { + n = n || [], t = t || g; + var i, s, a, f, l = t.nodeType; + if (!e || typeof e != "string") return n; + if (l !== 1 && l !== 9) return []; + a = o(t); + if (!a && !r) if (i = R.exec(e)) if (f = i[1]) { + if (l === 9) { + s = t.getElementById(f); + if (!s || !s.parentNode) return n; + if (s.id === f) return n.push(s), n + } else if (t.ownerDocument && (s = t.ownerDocument.getElementById(f)) && u(t, s) && s.id === f) return n.push(s), n + } else { + if (i[2]) return S.apply(n, x.call(t.getElementsByTagName(e), 0)), n; + if ((f = i[3]) && Z && t.getElementsByClassName) return S.apply(n, x.call(t.getElementsByClassName(f), 0)), n + } + return vt(e.replace(j, "$1"), t, n, r, a) + } + + function rt(e) { + return function(t) { + var n = t.nodeName.toLowerCase(); + return n === "input" && t.type === e + } + } + + function it(e) { + return function(t) { + var n = t.nodeName.toLowerCase(); + return (n === "input" || n === "button") && t.type === e + } + } + + function st(e) { + return N(function(t) { + return t = +t, N(function(n, r) { + var i, s = e([], n.length, t), + o = s.length; + while (o--) n[i = s[o]] && (n[i] = !(r[i] = n[i])) + }) + }) + } + + function ot(e, t, n) { + if (e === t) return n; + var r = e.nextSibling; + while (r) { + if (r === t) return -1; + r = r.nextSibling + } + return 1 + } + + function ut(e, t) { + var n, r, s, o, u, a, f, l = L[d][e + " "]; + if (l) return t ? 0 : l.slice(0); + u = e, a = [], f = i.preFilter; + while (u) { + if (!n || (r = F.exec(u))) r && (u = u.slice(r[0].length) || u), a.push(s = []); + n = !1; + if (r = I.exec(u)) s.push(n = new m(r.shift())), u = u.slice(n.length), n.type = r[0].replace(j, " "); + for (o in i.filter)(r = J[o].exec(u)) && (!f[o] || (r = f[o](r))) && (s.push(n = new m(r.shift())), u = u.slice(n.length), n.type = o, n.matches = r); + if (!n) break + } + return t ? u.length : u ? nt.error(e) : L(e, a).slice(0) + } + + function at(e, t, r) { + var i = t.dir, + s = r && t.dir === "parentNode", + o = w++; + return t.first ? + function(t, n, r) { + while (t = t[i]) if (s || t.nodeType === 1) return e(t, n, r) + } : function(t, r, u) { + if (!u) { + var a, f = b + " " + o + " ", + l = f + n; + while (t = t[i]) if (s || t.nodeType === 1) { + if ((a = t[d]) === l) return t.sizset; + if (typeof a == "string" && a.indexOf(f) === 0) { + if (t.sizset) return t + } else { + t[d] = l; + if (e(t, r, u)) return t.sizset = !0, t; + t.sizset = !1 + } + } + } else while (t = t[i]) if (s || t.nodeType === 1) if (e(t, r, u)) return t + } + } + + function ft(e) { + return e.length > 1 ? + function(t, n, r) { + var i = e.length; + while (i--) if (!e[i](t, n, r)) return !1; + return !0 + } : e[0] + } + + function lt(e, t, n, r, i) { + var s, o = [], + u = 0, + a = e.length, + f = t != null; + for (; u < a; u++) if (s = e[u]) if (!n || n(s, r, i)) o.push(s), f && t.push(u); + return o + } + + function ct(e, t, n, r, i, s) { + return r && !r[d] && (r = ct(r)), i && !i[d] && (i = ct(i, s)), N(function(s, o, u, a) { + var f, l, c, h = [], + p = [], + d = o.length, + v = s || dt(t || "*", u.nodeType ? [u] : u, []), + m = e && (s || !t) ? lt(v, h, e, u, a) : v, + g = n ? i || (s ? e : d || r) ? [] : o : m; + n && n(m, g, u, a); + if (r) { + f = lt(g, p), r(f, [], u, a), l = f.length; + while (l--) if (c = f[l]) g[p[l]] = !(m[p[l]] = c) + } + if (s) { + if (i || e) { + if (i) { + f = [], l = g.length; + while (l--)(c = g[l]) && f.push(m[l] = c); + i(null, g = [], f, a) + } + l = g.length; + while (l--)(c = g[l]) && (f = i ? T.call(s, c) : h[l]) > -1 && (s[f] = !(o[f] = c)) + } + } else g = lt(g === o ? g.splice(d, g.length) : g), i ? i(null, o, g, a) : S.apply(o, g) + }) + } + + function ht(e) { + var t, n, r, s = e.length, + o = i.relative[e[0].type], + u = o || i.relative[" "], + a = o ? 1 : 0, + f = at(function(e) { + return e === t + }, u, !0), + l = at(function(e) { + return T.call(t, e) > -1 + }, u, !0), + h = [function(e, n, r) { + return !o && (r || n !== c) || ((t = n).nodeType ? f(e, n, r) : l(e, n, r)) + }]; + for (; a < s; a++) if (n = i.relative[e[a].type]) h = [at(ft(h), n)]; + else { + n = i.filter[e[a].type].apply(null, e[a].matches); + if (n[d]) { + r = ++a; + for (; r < s; r++) if (i.relative[e[r].type]) break; + return ct(a > 1 && ft(h), a > 1 && e.slice(0, a - 1).join("").replace(j, "$1"), n, a < r && ht(e.slice(a, r)), r < s && ht(e = e.slice(r)), r < s && e.join("")) + } + h.push(n) + } + return ft(h) + } + + function pt(e, t) { + var r = t.length > 0, + s = e.length > 0, + o = function(u, a, f, l, h) { + var p, d, v, m = [], + y = 0, + w = "0", + x = u && [], + T = h != null, + N = c, + C = u || s && i.find.TAG("*", h && a.parentNode || a), + k = b += N == null ? 1 : Math.E; + T && (c = a !== g && a, n = o.el); + for (; + (p = C[w]) != null; w++) { + if (s && p) { + for (d = 0; v = e[d]; d++) if (v(p, a, f)) { + l.push(p); + break + } + T && (b = k, n = ++o.el) + } + r && ((p = !v && p) && y--, u && x.push(p)) + } + y += w; + if (r && w !== y) { + for (d = 0; v = t[d]; d++) v(x, m, a, f); + if (u) { + if (y > 0) while (w--)!x[w] && !m[w] && (m[w] = E.call(l)); + m = lt(m) + } + S.apply(l, m), T && !u && m.length > 0 && y + t.length > 1 && nt.uniqueSort(l) + } + return T && (b = k, c = N), x + }; + return o.el = 0, r ? N(o) : o + } + + function dt(e, t, n) { + var r = 0, + i = t.length; + for (; r < i; r++) nt(e, t[r], n); + return n + } + + function vt(e, t, n, r, s) { + var o, u, f, l, c, h = ut(e), + p = h.length; + if (!r && h.length === 1) { + u = h[0] = h[0].slice(0); + if (u.length > 2 && (f = u[0]).type === "ID" && t.nodeType === 9 && !s && i.relative[u[1].type]) { + t = i.find.ID(f.matches[0].replace($, ""), t, s)[0]; + if (!t) return n; + e = e.slice(u.shift().length) + } + for (o = J.POS.test(e) ? -1 : u.length - 1; o >= 0; o--) { + f = u[o]; + if (i.relative[l = f.type]) break; + if (c = i.find[l]) if (r = c(f.matches[0].replace($, ""), z.test(u[0].type) && t.parentNode || t, s)) { + u.splice(o, 1), e = r.length && u.join(""); + if (!e) return S.apply(n, x.call(r, 0)), n; + break + } + } + } + return a(e, h)(r, t, s, n, z.test(e)), n + } + + function mt() {} + var n, r, i, s, o, u, a, f, l, c, h = !0, + p = "undefined", + d = ("sizcache" + Math.random()).replace(".", ""), + m = String, + g = e.document, + y = g.documentElement, + b = 0, + w = 0, + E = [].pop, + S = [].push, + x = [].slice, + T = [].indexOf || + function(e) { + var t = 0, + n = this.length; + for (; t < n; t++) if (this[t] === e) return t; + return -1 + }, + N = function(e, t) { + return e[d] = t == null || t, e + }, + C = function() { + var e = {}, + t = []; + return N(function(n, r) { + return t.push(n) > i.cacheLength && delete e[t.shift()], e[n + " "] = r + }, e) + }, + k = C(), + L = C(), + A = C(), + O = "[\\x20\\t\\r\\n\\f]", + M = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", + _ = M.replace("w", "w#"), + D = "([*^$|!~]?=)", + P = "\\[" + O + "*(" + M + ")" + O + "*(?:" + D + O + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + _ + ")|)|)" + O + "*\\]", + H = ":(" + M + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + P + ")|[^:]|\\\\.)*|.*))\\)|)", + B = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + O + "*((?:-\\d)?\\d*)" + O + "*\\)|)(?=[^-]|$)", + j = new RegExp("^" + O + "+|((?:^|[^\\\\])(?:\\\\.)*)" + O + "+$", "g"), + F = new RegExp("^" + O + "*," + O + "*"), + I = new RegExp("^" + O + "*([\\x20\\t\\r\\n\\f>+~])" + O + "*"), + q = new RegExp(H), + R = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, + U = /^:not/, + z = /[\x20\t\r\n\f]*[+~]/, + W = /:not\($/, + X = /h\d/i, + V = /input|select|textarea|button/i, + $ = /\\(?!\\)/g, + J = { + ID: new RegExp("^#(" + M + ")"), + CLASS: new RegExp("^\\.(" + M + ")"), + NAME: new RegExp("^\\[name=['\"]?(" + M + ")['\"]?\\]"), + TAG: new RegExp("^(" + M.replace("w", "w*") + ")"), + ATTR: new RegExp("^" + P), + PSEUDO: new RegExp("^" + H), + POS: new RegExp(B, "i"), + CHILD: new RegExp("^:(only|nth|first|last)-child(?:\\(" + O + "*(even|odd|(([+-]|)(\\d*)n|)" + O + "*(?:([+-]|)" + O + "*(\\d+)|))" + O + "*\\)|)", "i"), + needsContext: new RegExp("^" + O + "*[>+~]|" + B, "i") + }, + K = function(e) { + var t = g.createElement("div"); + try { + return e(t) + } catch (n) { + return !1 + } finally { + t = null + } + }, + Q = K(function(e) { + return e.appendChild(g.createComment("")), !e.getElementsByTagName("*").length + }), + G = K(function(e) { + return e.innerHTML = "", e.firstChild && typeof e.firstChild.getAttribute !== p && e.firstChild.getAttribute("href") === "#" + }), + Y = K(function(e) { + e.innerHTML = ""; + var t = typeof e.lastChild.getAttribute("multiple"); + return t !== "boolean" && t !== "string" + }), + Z = K(function(e) { + return e.innerHTML = "", !e.getElementsByClassName || !e.getElementsByClassName("e").length ? !1 : (e.lastChild.className = "e", e.getElementsByClassName("e").length === 2) + }), + et = K(function(e) { + e.id = d + 0, e.innerHTML = "
    ", y.insertBefore(e, y.firstChild); + var t = g.getElementsByName && g.getElementsByName(d).length === 2 + g.getElementsByName(d + 0).length; + return r = !g.getElementById(d), y.removeChild(e), t + }); + try { + x.call(y.childNodes, 0)[0].nodeType + } catch (tt) { + x = function(e) { + var t, n = []; + for (; t = this[e]; e++) n.push(t); + return n + } + } + nt.matches = function(e, t) { + return nt(e, null, null, t) + }, nt.matchesSelector = function(e, t) { + return nt(t, null, null, [e]).length > 0 + }, s = nt.getText = function(e) { + var t, n = "", + r = 0, + i = e.nodeType; + if (i) { + if (i === 1 || i === 9 || i === 11) { + if (typeof e.textContent == "string") return e.textContent; + for (e = e.firstChild; e; e = e.nextSibling) n += s(e) + } else if (i === 3 || i === 4) return e.nodeValue + } else for (; t = e[r]; r++) n += s(t); + return n + }, o = nt.isXML = function(e) { + var t = e && (e.ownerDocument || e).documentElement; + return t ? t.nodeName !== "HTML" : !1 + }, u = nt.contains = y.contains ? + function(e, t) { + var n = e.nodeType === 9 ? e.documentElement : e, + r = t && t.parentNode; + return e === r || !! (r && r.nodeType === 1 && n.contains && n.contains(r)) + } : y.compareDocumentPosition ? + function(e, t) { + return t && !! (e.compareDocumentPosition(t) & 16) + } : function(e, t) { + while (t = t.parentNode) if (t === e) return !0; + return !1 + }, nt.attr = function(e, t) { + var n, r = o(e); + return r || (t = t.toLowerCase()), (n = i.attrHandle[t]) ? n(e) : r || Y ? e.getAttribute(t) : (n = e.getAttributeNode(t), n ? typeof e[t] == "boolean" ? e[t] ? t : null : n.specified ? n.value : null : null) + }, i = nt.selectors = { + cacheLength: 50, + createPseudo: N, + match: J, + attrHandle: G ? {} : { + href: function(e) { + return e.getAttribute("href", 2) + }, + type: function(e) { + return e.getAttribute("type") + } + }, + find: { + ID: r ? + function(e, t, n) { + if (typeof t.getElementById !== p && !n) { + var r = t.getElementById(e); + return r && r.parentNode ? [r] : [] + } + } : function(e, n, r) { + if (typeof n.getElementById !== p && !r) { + var i = n.getElementById(e); + return i ? i.id === e || typeof i.getAttributeNode !== p && i.getAttributeNode("id").value === e ? [i] : t : [] + } + }, + TAG: Q ? + function(e, t) { + if (typeof t.getElementsByTagName !== p) return t.getElementsByTagName(e) + } : function(e, t) { + var n = t.getElementsByTagName(e); + if (e === "*") { + var r, i = [], + s = 0; + for (; r = n[s]; s++) r.nodeType === 1 && i.push(r); + return i + } + return n + }, + NAME: et && + function(e, t) { + if (typeof t.getElementsByName !== p) return t.getElementsByName(name) + }, + CLASS: Z && + function(e, t, n) { + if (typeof t.getElementsByClassName !== p && !n) return t.getElementsByClassName(e) + } + }, + relative: { + ">": { + dir: "parentNode", + first: !0 + }, + " ": { + dir: "parentNode" + }, + "+": { + dir: "previousSibling", + first: !0 + }, + "~": { + dir: "previousSibling" + } + }, + preFilter: { + ATTR: function(e) { + return e[1] = e[1].replace($, ""), e[3] = (e[4] || e[5] || "").replace($, ""), e[2] === "~=" && (e[3] = " " + e[3] + " "), e.slice(0, 4) + }, + CHILD: function(e) { + return e[1] = e[1].toLowerCase(), e[1] === "nth" ? (e[2] || nt.error(e[0]), e[3] = +(e[3] ? e[4] + (e[5] || 1) : 2 * (e[2] === "even" || e[2] === "odd")), e[4] = +(e[6] + e[7] || e[2] === "odd")) : e[2] && nt.error(e[0]), e + }, + PSEUDO: function(e) { + var t, n; + if (J.CHILD.test(e[0])) return null; + if (e[3]) e[2] = e[3]; + else if (t = e[4]) q.test(t) && (n = ut(t, !0)) && (n = t.indexOf(")", t.length - n) - t.length) && (t = t.slice(0, n), e[0] = e[0].slice(0, n)), e[2] = t; + return e.slice(0, 3) + } + }, + filter: { + ID: r ? + function(e) { + return e = e.replace($, ""), function(t) { + return t.getAttribute("id") === e + } + } : function(e) { + return e = e.replace($, ""), function(t) { + var n = typeof t.getAttributeNode !== p && t.getAttributeNode("id"); + return n && n.value === e + } + }, + TAG: function(e) { + return e === "*" ? + function() { + return !0 + } : (e = e.replace($, "").toLowerCase(), function(t) { + return t.nodeName && t.nodeName.toLowerCase() === e + }) + }, + CLASS: function(e) { + var t = k[d][e + " "]; + return t || (t = new RegExp("(^|" + O + ")" + e + "(" + O + "|$)")) && k(e, function(e) { + return t.test(e.className || typeof e.getAttribute !== p && e.getAttribute("class") || "") + }) + }, + ATTR: function(e, t, n) { + return function(r, i) { + var s = nt.attr(r, e); + return s == null ? t === "!=" : t ? (s += "", t === "=" ? s === n : t === "!=" ? s !== n : t === "^=" ? n && s.indexOf(n) === 0 : t === "*=" ? n && s.indexOf(n) > -1 : t === "$=" ? n && s.substr(s.length - n.length) === n : t === "~=" ? (" " + s + " ").indexOf(n) > -1 : t === "|=" ? s === n || s.substr(0, n.length + 1) === n + "-" : !1) : !0 + } + }, + CHILD: function(e, t, n, r) { + return e === "nth" ? + function(e) { + var t, i, s = e.parentNode; + if (n === 1 && r === 0) return !0; + if (s) { + i = 0; + for (t = s.firstChild; t; t = t.nextSibling) if (t.nodeType === 1) { + i++; + if (e === t) break + } + } + return i -= r, i === n || i % n === 0 && i / n >= 0 + } : function(t) { + var n = t; + switch (e) { + case "only": + case "first": + while (n = n.previousSibling) if (n.nodeType === 1) return !1; + if (e === "first") return !0; + n = t; + case "last": + while (n = n.nextSibling) if (n.nodeType === 1) return !1; + return !0 + } + } + }, + PSEUDO: function(e, t) { + var n, r = i.pseudos[e] || i.setFilters[e.toLowerCase()] || nt.error("unsupported pseudo: " + e); + return r[d] ? r(t) : r.length > 1 ? (n = [e, e, "", t], i.setFilters.hasOwnProperty(e.toLowerCase()) ? N(function(e, n) { + var i, s = r(e, t), + o = s.length; + while (o--) i = T.call(e, s[o]), e[i] = !(n[i] = s[o]) + }) : function(e) { + return r(e, 0, n) + }) : r + } + }, + pseudos: { + not: N(function(e) { + var t = [], + n = [], + r = a(e.replace(j, "$1")); + return r[d] ? N(function(e, t, n, i) { + var s, o = r(e, null, i, []), + u = e.length; + while (u--) if (s = o[u]) e[u] = !(t[u] = s) + }) : function(e, i, s) { + return t[0] = e, r(t, null, s, n), !n.pop() + } + }), + has: N(function(e) { + return function(t) { + return nt(e, t).length > 0 + } + }), + contains: N(function(e) { + return function(t) { + return (t.textContent || t.innerText || s(t)).indexOf(e) > -1 + } + }), + enabled: function(e) { + return e.disabled === !1 + }, + disabled: function(e) { + return e.disabled === !0 + }, + checked: function(e) { + var t = e.nodeName.toLowerCase(); + return t === "input" && !! e.checked || t === "option" && !! e.selected + }, + selected: function(e) { + return e.parentNode && e.parentNode.selectedIndex, e.selected === !0 + }, + parent: function(e) { + return !i.pseudos.empty(e) + }, + empty: function(e) { + var t; + e = e.firstChild; + while (e) { + if (e.nodeName > "@" || (t = e.nodeType) === 3 || t === 4) return !1; + e = e.nextSibling + } + return !0 + }, + header: function(e) { + return X.test(e.nodeName) + }, + text: function(e) { + var t, n; + return e.nodeName.toLowerCase() === "input" && (t = e.type) === "text" && ((n = e.getAttribute("type")) == null || n.toLowerCase() === t) + }, + radio: rt("radio"), + checkbox: rt("checkbox"), + file: rt("file"), + password: rt("password"), + image: rt("image"), + submit: it("submit"), + reset: it("reset"), + button: function(e) { + var t = e.nodeName.toLowerCase(); + return t === "input" && e.type === "button" || t === "button" + }, + input: function(e) { + return V.test(e.nodeName) + }, + focus: function(e) { + var t = e.ownerDocument; + return e === t.activeElement && (!t.hasFocus || t.hasFocus()) && !! (e.type || e.href || ~e.tabIndex) + }, + active: function(e) { + return e === e.ownerDocument.activeElement + }, + first: st(function() { + return [0] + }), + last: st(function(e, t) { + return [t - 1] + }), + eq: st(function(e, t, n) { + return [n < 0 ? n + t : n] + }), + even: st(function(e, t) { + for (var n = 0; n < t; n += 2) e.push(n); + return e + }), + odd: st(function(e, t) { + for (var n = 1; n < t; n += 2) e.push(n); + return e + }), + lt: st(function(e, t, n) { + for (var r = n < 0 ? n + t : n; --r >= 0;) e.push(r); + return e + }), + gt: st(function(e, t, n) { + for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r); + return e + }) + } + }, f = y.compareDocumentPosition ? + function(e, t) { + return e === t ? (l = !0, 0) : (!e.compareDocumentPosition || !t.compareDocumentPosition ? e.compareDocumentPosition : e.compareDocumentPosition(t) & 4) ? -1 : 1 + } : function(e, t) { + if (e === t) return l = !0, 0; + if (e.sourceIndex && t.sourceIndex) return e.sourceIndex - t.sourceIndex; + var n, r, i = [], + s = [], + o = e.parentNode, + u = t.parentNode, + a = o; + if (o === u) return ot(e, t); + if (!o) return -1; + if (!u) return 1; + while (a) i.unshift(a), a = a.parentNode; + a = u; + while (a) s.unshift(a), a = a.parentNode; + n = i.length, r = s.length; + for (var f = 0; f < n && f < r; f++) if (i[f] !== s[f]) return ot(i[f], s[f]); + return f === n ? ot(e, s[f], -1) : ot(i[f], t, 1) + }, [0, 0].sort(f), h = !l, nt.uniqueSort = function(e) { + var t, n = [], + r = 1, + i = 0; + l = h, e.sort(f); + if (l) { + for (; t = e[r]; r++) t === e[r - 1] && (i = n.push(r)); + while (i--) e.splice(n[i], 1) + } + return e + }, nt.error = function(e) { + throw new Error("Syntax error, unrecognized expression: " + e) + }, a = nt.compile = function(e, t) { + var n, r = [], + i = [], + s = A[d][e + " "]; + if (!s) { + t || (t = ut(e)), n = t.length; + while (n--) s = ht(t[n]), s[d] ? r.push(s) : i.push(s); + s = A(e, pt(i, r)) + } + return s + }, g.querySelectorAll && + function() { + var e, t = vt, + n = /'|\\/g, + r = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + i = [":focus"], + s = [":active"], + u = y.matchesSelector || y.mozMatchesSelector || y.webkitMatchesSelector || y.oMatchesSelector || y.msMatchesSelector; + K(function(e) { + e.innerHTML = "", e.querySelectorAll("[selected]").length || i.push("\\[" + O + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), e.querySelectorAll(":checked").length || i.push(":checked") + }), K(function(e) { + e.innerHTML = "

    ", e.querySelectorAll("[test^='']").length && i.push("[*^$]=" + O + "*(?:\"\"|'')"), e.innerHTML = "", e.querySelectorAll(":enabled").length || i.push(":enabled", ":disabled") + }), i = new RegExp(i.join("|")), vt = function(e, r, s, o, u) { + if (!o && !u && !i.test(e)) { + var a, f, l = !0, + c = d, + h = r, + p = r.nodeType === 9 && e; + if (r.nodeType === 1 && r.nodeName.toLowerCase() !== "object") { + a = ut(e), (l = r.getAttribute("id")) ? c = l.replace(n, "\\$&") : r.setAttribute("id", c), c = "[id='" + c + "'] ", f = a.length; + while (f--) a[f] = c + a[f].join(""); + h = z.test(e) && r.parentNode || r, p = a.join(",") + } + if (p) try { + return S.apply(s, x.call(h.querySelectorAll(p), 0)), s + } catch (v) {} finally { + l || r.removeAttribute("id") + } + } + return t(e, r, s, o, u) + }, u && (K(function(t) { + e = u.call(t, "div"); + try { + u.call(t, "[test!='']:sizzle"), s.push("!=", H) + } catch (n) {} + }), s = new RegExp(s.join("|")), nt.matchesSelector = function(t, n) { + n = n.replace(r, "='$1']"); + if (!o(t) && !s.test(n) && !i.test(n)) try { + var a = u.call(t, n); + if (a || e || t.document && t.document.nodeType !== 11) return a + } catch (f) {} + return nt(n, null, null, [t]).length > 0 + }) + }(), i.pseudos.nth = i.pseudos.eq, i.filters = mt.prototype = i.pseudos, i.setFilters = new mt, nt.attr = v.attr, v.find = nt, v.expr = nt.selectors, v.expr[":"] = v.expr.pseudos, v.unique = nt.uniqueSort, v.text = nt.getText, v.isXMLDoc = nt.isXML, v.contains = nt.contains + }(e); + var nt = /Until$/, + rt = /^(?:parents|prev(?:Until|All))/, + it = /^.[^:#\[\.,]*$/, + st = v.expr.match.needsContext, + ot = { + children: !0, + contents: !0, + next: !0, + prev: !0 + }; + v.fn.extend({ + find: function(e) { + var t, n, r, i, s, o, u = this; + if (typeof e != "string") return v(e).filter(function() { + for (t = 0, n = u.length; t < n; t++) if (v.contains(u[t], this)) return !0 + }); + o = this.pushStack("", "find", e); + for (t = 0, n = this.length; t < n; t++) { + r = o.length, v.find(e, this[t], o); + if (t > 0) for (i = r; i < o.length; i++) for (s = 0; s < r; s++) if (o[s] === o[i]) { + o.splice(i--, 1); + break + } + } + return o + }, + has: function(e) { + var t, n = v(e, this), + r = n.length; + return this.filter(function() { + for (t = 0; t < r; t++) if (v.contains(this, n[t])) return !0 + }) + }, + not: function(e) { + return this.pushStack(ft(this, e, !1), "not", e) + }, + filter: function(e) { + return this.pushStack(ft(this, e, !0), "filter", e) + }, + is: function(e) { + return !!e && (typeof e == "string" ? st.test(e) ? v(e, this.context).index(this[0]) >= 0 : v.filter(e, this).length > 0 : this.filter(e).length > 0) + }, + closest: function(e, t) { + var n, r = 0, + i = this.length, + s = [], + o = st.test(e) || typeof e != "string" ? v(e, t || this.context) : 0; + for (; r < i; r++) { + n = this[r]; + while (n && n.ownerDocument && n !== t && n.nodeType !== 11) { + if (o ? o.index(n) > -1 : v.find.matchesSelector(n, e)) { + s.push(n); + break + } + n = n.parentNode + } + } + return s = s.length > 1 ? v.unique(s) : s, this.pushStack(s, "closest", e) + }, + index: function(e) { + return e ? typeof e == "string" ? v.inArray(this[0], v(e)) : v.inArray(e.jquery ? e[0] : e, this) : this[0] && this[0].parentNode ? this.prevAll().length : -1 + }, + add: function(e, t) { + var n = typeof e == "string" ? v(e, t) : v.makeArray(e && e.nodeType ? [e] : e), + r = v.merge(this.get(), n); + return this.pushStack(ut(n[0]) || ut(r[0]) ? r : v.unique(r)) + }, + addBack: function(e) { + return this.add(e == null ? this.prevObject : this.prevObject.filter(e)) + } + }), v.fn.andSelf = v.fn.addBack, v.each({ + parent: function(e) { + var t = e.parentNode; + return t && t.nodeType !== 11 ? t : null + }, + parents: function(e) { + return v.dir(e, "parentNode") + }, + parentsUntil: function(e, t, n) { + return v.dir(e, "parentNode", n) + }, + next: function(e) { + return at(e, "nextSibling") + }, + prev: function(e) { + return at(e, "previousSibling") + }, + nextAll: function(e) { + return v.dir(e, "nextSibling") + }, + prevAll: function(e) { + return v.dir(e, "previousSibling") + }, + nextUntil: function(e, t, n) { + return v.dir(e, "nextSibling", n) + }, + prevUntil: function(e, t, n) { + return v.dir(e, "previousSibling", n) + }, + siblings: function(e) { + return v.sibling((e.parentNode || {}).firstChild, e) + }, + children: function(e) { + return v.sibling(e.firstChild) + }, + contents: function(e) { + return v.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : v.merge([], e.childNodes) + } + }, function(e, t) { + v.fn[e] = function(n, r) { + var i = v.map(this, t, n); + return nt.test(e) || (r = n), r && typeof r == "string" && (i = v.filter(r, i)), i = this.length > 1 && !ot[e] ? v.unique(i) : i, this.length > 1 && rt.test(e) && (i = i.reverse()), this.pushStack(i, e, l.call(arguments).join(",")) + } + }), v.extend({ + filter: function(e, t, n) { + return n && (e = ":not(" + e + ")"), t.length === 1 ? v.find.matchesSelector(t[0], e) ? [t[0]] : [] : v.find.matches(e, t) + }, + dir: function(e, n, r) { + var i = [], + s = e[n]; + while (s && s.nodeType !== 9 && (r === t || s.nodeType !== 1 || !v(s).is(r))) s.nodeType === 1 && i.push(s), s = s[n]; + return i + }, + sibling: function(e, t) { + var n = []; + for (; e; e = e.nextSibling) e.nodeType === 1 && e !== t && n.push(e); + return n + } + }); + var ct = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + ht = / jQuery\d+="(?:null|\d+)"/g, + pt = /^\s+/, + dt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + vt = /<([\w:]+)/, + mt = /]", "i"), + Et = /^(?:checkbox|radio)$/, + St = /checked\s*(?:[^=]|=\s*.checked.)/i, + xt = /\/(java|ecma)script/i, + Tt = /^\s*\s*$/g, + Nt = { + option: [1, ""], + legend: [1, "
    ", "
    "], + thead: [1, "", "
    "], + tr: [2, "", "
    "], + td: [3, "", "
    "], + col: [2, "", "
    "], + area: [1, "", ""], + _default: [0, "", ""] + }, + Ct = lt(i), + kt = Ct.appendChild(i.createElement("div")); + Nt.optgroup = Nt.option, Nt.tbody = Nt.tfoot = Nt.colgroup = Nt.caption = Nt.thead, Nt.th = Nt.td, v.support.htmlSerialize || (Nt._default = [1, "X
    ", "
    "]), v.fn.extend({ + text: function(e) { + return v.access(this, function(e) { + return e === t ? v.text(this) : this.empty().append((this[0] && this[0].ownerDocument || i).createTextNode(e)) + }, null, e, arguments.length) + }, + wrapAll: function(e) { + if (v.isFunction(e)) return this.each(function(t) { + v(this).wrapAll(e.call(this, t)) + }); + if (this[0]) { + var t = v(e, this[0].ownerDocument).eq(0).clone(!0); + this[0].parentNode && t.insertBefore(this[0]), t.map(function() { + var e = this; + while (e.firstChild && e.firstChild.nodeType === 1) e = e.firstChild; + return e + }).append(this) + } + return this + }, + wrapInner: function(e) { + return v.isFunction(e) ? this.each(function(t) { + v(this).wrapInner(e.call(this, t)) + }) : this.each(function() { + var t = v(this), + n = t.contents(); + n.length ? n.wrapAll(e) : t.append(e) + }) + }, + wrap: function(e) { + var t = v.isFunction(e); + return this.each(function(n) { + v(this).wrapAll(t ? e.call(this, n) : e) + }) + }, + unwrap: function() { + return this.parent().each(function() { + v.nodeName(this, "body") || v(this).replaceWith(this.childNodes) + }).end() + }, + append: function() { + return this.domManip(arguments, !0, function(e) { + (this.nodeType === 1 || this.nodeType === 11) && this.appendChild(e) + }) + }, + prepend: function() { + return this.domManip(arguments, !0, function(e) { + (this.nodeType === 1 || this.nodeType === 11) && this.insertBefore(e, this.firstChild) + }) + }, + before: function() { + if (!ut(this[0])) return this.domManip(arguments, !1, function(e) { + this.parentNode.insertBefore(e, this) + }); + if (arguments.length) { + var e = v.clean(arguments); + return this.pushStack(v.merge(e, this), "before", this.selector) + } + }, + after: function() { + if (!ut(this[0])) return this.domManip(arguments, !1, function(e) { + this.parentNode.insertBefore(e, this.nextSibling) + }); + if (arguments.length) { + var e = v.clean(arguments); + return this.pushStack(v.merge(this, e), "after", this.selector) + } + }, + remove: function(e, t) { + var n, r = 0; + for (; + (n = this[r]) != null; r++) if (!e || v.filter(e, [n]).length)!t && n.nodeType === 1 && (v.cleanData(n.getElementsByTagName("*")), v.cleanData([n])), n.parentNode && n.parentNode.removeChild(n); + return this + }, + empty: function() { + var e, t = 0; + for (; + (e = this[t]) != null; t++) { + e.nodeType === 1 && v.cleanData(e.getElementsByTagName("*")); + while (e.firstChild) e.removeChild(e.firstChild) + } + return this + }, + clone: function(e, t) { + return e = e == null ? !1 : e, t = t == null ? e : t, this.map(function() { + return v.clone(this, e, t) + }) + }, + html: function(e) { + return v.access(this, function(e) { + var n = this[0] || {}, + r = 0, + i = this.length; + if (e === t) return n.nodeType === 1 ? n.innerHTML.replace(ht, "") : t; + if (typeof e == "string" && !yt.test(e) && (v.support.htmlSerialize || !wt.test(e)) && (v.support.leadingWhitespace || !pt.test(e)) && !Nt[(vt.exec(e) || ["", ""])[1].toLowerCase()]) { + e = e.replace(dt, "<$1>"); + try { + for (; r < i; r++) n = this[r] || {}, n.nodeType === 1 && (v.cleanData(n.getElementsByTagName("*")), n.innerHTML = e); + n = 0 + } catch (s) {} + } + n && this.empty().append(e) + }, null, e, arguments.length) + }, + replaceWith: function(e) { + return ut(this[0]) ? this.length ? this.pushStack(v(v.isFunction(e) ? e() : e), "replaceWith", e) : this : v.isFunction(e) ? this.each(function(t) { + var n = v(this), + r = n.html(); + n.replaceWith(e.call(this, t, r)) + }) : (typeof e != "string" && (e = v(e).detach()), this.each(function() { + var t = this.nextSibling, + n = this.parentNode; + v(this).remove(), t ? v(t).before(e) : v(n).append(e) + })) + }, + detach: function(e) { + return this.remove(e, !0) + }, + domManip: function(e, n, r) { + e = [].concat.apply([], e); + var i, s, o, u, a = 0, + f = e[0], + l = [], + c = this.length; + if (!v.support.checkClone && c > 1 && typeof f == "string" && St.test(f)) return this.each(function() { + v(this).domManip(e, n, r) + }); + if (v.isFunction(f)) return this.each(function(i) { + var s = v(this); + e[0] = f.call(this, i, n ? s.html() : t), s.domManip(e, n, r) + }); + if (this[0]) { + i = v.buildFragment(e, this, l), o = i.fragment, s = o.firstChild, o.childNodes.length === 1 && (o = s); + if (s) { + n = n && v.nodeName(s, "tr"); + for (u = i.cacheable || c - 1; a < c; a++) r.call(n && v.nodeName(this[a], "table") ? Lt(this[a], "tbody") : this[a], a === u ? o : v.clone(o, !0, !0)) + } + o = s = null, l.length && v.each(l, function(e, t) { + t.src ? v.ajax ? v.ajax({ + url: t.src, + type: "GET", + dataType: "script", + async: !1, + global: !1, + "throws": !0 + }) : v.error("no ajax") : v.globalEval((t.text || t.textContent || t.innerHTML || "").replace(Tt, "")), t.parentNode && t.parentNode.removeChild(t) + }) + } + return this + } + }), v.buildFragment = function(e, n, r) { + var s, o, u, a = e[0]; + return n = n || i, n = !n.nodeType && n[0] || n, n = n.ownerDocument || n, e.length === 1 && typeof a == "string" && a.length < 512 && n === i && a.charAt(0) === "<" && !bt.test(a) && (v.support.checkClone || !St.test(a)) && (v.support.html5Clone || !wt.test(a)) && (o = !0, s = v.fragments[a], u = s !== t), s || (s = n.createDocumentFragment(), v.clean(e, n, s, r), o && (v.fragments[a] = u && s)), { + fragment: s, + cacheable: o + } + }, v.fragments = {}, v.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, function(e, t) { + v.fn[e] = function(n) { + var r, i = 0, + s = [], + o = v(n), + u = o.length, + a = this.length === 1 && this[0].parentNode; + if ((a == null || a && a.nodeType === 11 && a.childNodes.length === 1) && u === 1) return o[t](this[0]), this; + for (; i < u; i++) r = (i > 0 ? this.clone(!0) : this).get(), v(o[i])[t](r), s = s.concat(r); + return this.pushStack(s, e, o.selector) + } + }), v.extend({ + clone: function(e, t, n) { + var r, i, s, o; + v.support.html5Clone || v.isXMLDoc(e) || !wt.test("<" + e.nodeName + ">") ? o = e.cloneNode(!0) : (kt.innerHTML = e.outerHTML, kt.removeChild(o = kt.firstChild)); + if ((!v.support.noCloneEvent || !v.support.noCloneChecked) && (e.nodeType === 1 || e.nodeType === 11) && !v.isXMLDoc(e)) { + Ot(e, o), r = Mt(e), i = Mt(o); + for (s = 0; r[s]; ++s) i[s] && Ot(r[s], i[s]) + } + if (t) { + At(e, o); + if (n) { + r = Mt(e), i = Mt(o); + for (s = 0; r[s]; ++s) At(r[s], i[s]) + } + } + return r = i = null, o + }, + clean: function(e, t, n, r) { + var s, o, u, a, f, l, c, h, p, d, m, g, y = t === i && Ct, + b = []; + if (!t || typeof t.createDocumentFragment == "undefined") t = i; + for (s = 0; + (u = e[s]) != null; s++) { + typeof u == "number" && (u += ""); + if (!u) continue; + if (typeof u == "string") if (!gt.test(u)) u = t.createTextNode(u); + else { + y = y || lt(t), c = t.createElement("div"), y.appendChild(c), u = u.replace(dt, "<$1>"), a = (vt.exec(u) || ["", ""])[1].toLowerCase(), f = Nt[a] || Nt._default, l = f[0], c.innerHTML = f[1] + u + f[2]; + while (l--) c = c.lastChild; + if (!v.support.tbody) { + h = mt.test(u), p = a === "table" && !h ? c.firstChild && c.firstChild.childNodes : f[1] === "" && !h ? c.childNodes : []; + for (o = p.length - 1; o >= 0; --o) v.nodeName(p[o], "tbody") && !p[o].childNodes.length && p[o].parentNode.removeChild(p[o]) + }!v.support.leadingWhitespace && pt.test(u) && c.insertBefore(t.createTextNode(pt.exec(u)[0]), c.firstChild), u = c.childNodes, c.parentNode.removeChild(c) + } + u.nodeType ? b.push(u) : v.merge(b, u) + } + c && (u = c = y = null); + if (!v.support.appendChecked) for (s = 0; + (u = b[s]) != null; s++) v.nodeName(u, "input") ? _t(u) : typeof u.getElementsByTagName != "undefined" && v.grep(u.getElementsByTagName("input"), _t); + if (n) { + m = function(e) { + if (!e.type || xt.test(e.type)) return r ? r.push(e.parentNode ? e.parentNode.removeChild(e) : e) : n.appendChild(e) + }; + for (s = 0; + (u = b[s]) != null; s++) if (!v.nodeName(u, "script") || !m(u)) n.appendChild(u), typeof u.getElementsByTagName != "undefined" && (g = v.grep(v.merge([], u.getElementsByTagName("script")), m), b.splice.apply(b, [s + 1, 0].concat(g)), s += g.length) + } + return b + }, + cleanData: function(e, t) { + var n, r, i, s, o = 0, + u = v.expando, + a = v.cache, + f = v.support.deleteExpando, + l = v.event.special; + for (; + (i = e[o]) != null; o++) if (t || v.acceptData(i)) { + r = i[u], n = r && a[r]; + if (n) { + if (n.events) for (s in n.events) l[s] ? v.event.remove(i, s) : v.removeEvent(i, s, n.handle); + a[r] && (delete a[r], f ? delete i[u] : i.removeAttribute ? i.removeAttribute(u) : i[u] = null, v.deletedIds.push(r)) + } + } + } + }), function() { + var e, t; + v.uaMatch = function(e) { + e = e.toLowerCase(); + var t = /(chrome)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || e.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || []; + return { + browser: t[1] || "", + version: t[2] || "0" + } + }, e = v.uaMatch(o.userAgent), t = {}, e.browser && (t[e.browser] = !0, t.version = e.version), t.chrome ? t.webkit = !0 : t.webkit && (t.safari = !0), v.browser = t, v.sub = function() { + function e(t, n) { + return new e.fn.init(t, n) + } + v.extend(!0, e, this), e.superclass = this, e.fn = e.prototype = this(), e.fn.constructor = e, e.sub = this.sub, e.fn.init = function(r, i) { + return i && i instanceof v && !(i instanceof e) && (i = e(i)), v.fn.init.call(this, r, i, t) + }, e.fn.init.prototype = e.fn; + var t = e(i); + return e + } + }(); + var Dt, Pt, Ht, Bt = /alpha\([^)]*\)/i, + jt = /opacity=([^)]*)/, + Ft = /^(top|right|bottom|left)$/, + It = /^(none|table(?!-c[ea]).+)/, + qt = /^margin/, + Rt = new RegExp("^(" + m + ")(.*)$", "i"), + Ut = new RegExp("^(" + m + ")(?!px)[a-z%]+$", "i"), + zt = new RegExp("^([-+])=(" + m + ")", "i"), + Wt = { + BODY: "block" + }, + Xt = { + position: "absolute", + visibility: "hidden", + display: "block" + }, + Vt = { + letterSpacing: 0, + fontWeight: 400 + }, + $t = ["Top", "Right", "Bottom", "Left"], + Jt = ["Webkit", "O", "Moz", "ms"], + Kt = v.fn.toggle; + v.fn.extend({ + css: function(e, n) { + return v.access(this, function(e, n, r) { + return r !== t ? v.style(e, n, r) : v.css(e, n) + }, e, n, arguments.length > 1) + }, + show: function() { + return Yt(this, !0) + }, + hide: function() { + return Yt(this) + }, + toggle: function(e, t) { + var n = typeof e == "boolean"; + return v.isFunction(e) && v.isFunction(t) ? Kt.apply(this, arguments) : this.each(function() { + (n ? e : Gt(this)) ? v(this).show() : v(this).hide() + }) + } + }), v.extend({ + cssHooks: { + opacity: { + get: function(e, t) { + if (t) { + var n = Dt(e, "opacity"); + return n === "" ? "1" : n + } + } + } + }, + cssNumber: { + fillOpacity: !0, + fontWeight: !0, + lineHeight: !0, + opacity: !0, + orphans: !0, + widows: !0, + zIndex: !0, + zoom: !0 + }, + cssProps: { + "float": v.support.cssFloat ? "cssFloat" : "styleFloat" + }, + style: function(e, n, r, i) { + if (!e || e.nodeType === 3 || e.nodeType === 8 || !e.style) return; + var s, o, u, a = v.camelCase(n), + f = e.style; + n = v.cssProps[a] || (v.cssProps[a] = Qt(f, a)), u = v.cssHooks[n] || v.cssHooks[a]; + if (r === t) return u && "get" in u && (s = u.get(e, !1, i)) !== t ? s : f[n]; + o = typeof r, o === "string" && (s = zt.exec(r)) && (r = (s[1] + 1) * s[2] + parseFloat(v.css(e, n)), o = "number"); + if (r == null || o === "number" && isNaN(r)) return; + o === "number" && !v.cssNumber[a] && (r += "px"); + if (!u || !("set" in u) || (r = u.set(e, r, i)) !== t) try { + f[n] = r + } catch (l) {} + }, + css: function(e, n, r, i) { + var s, o, u, a = v.camelCase(n); + return n = v.cssProps[a] || (v.cssProps[a] = Qt(e.style, a)), u = v.cssHooks[n] || v.cssHooks[a], u && "get" in u && (s = u.get(e, !0, i)), s === t && (s = Dt(e, n)), s === "normal" && n in Vt && (s = Vt[n]), r || i !== t ? (o = parseFloat(s), r || v.isNumeric(o) ? o || 0 : s) : s + }, + swap: function(e, t, n) { + var r, i, s = {}; + for (i in t) s[i] = e.style[i], e.style[i] = t[i]; + r = n.call(e); + for (i in t) e.style[i] = s[i]; + return r + } + }), e.getComputedStyle ? Dt = function(t, n) { + var r, i, s, o, u = e.getComputedStyle(t, null), + a = t.style; + return u && (r = u.getPropertyValue(n) || u[n], r === "" && !v.contains(t.ownerDocument, t) && (r = v.style(t, n)), Ut.test(r) && qt.test(n) && (i = a.width, s = a.minWidth, o = a.maxWidth, a.minWidth = a.maxWidth = a.width = r, r = u.width, a.width = i, a.minWidth = s, a.maxWidth = o)), r + } : i.documentElement.currentStyle && (Dt = function(e, t) { + var n, r, i = e.currentStyle && e.currentStyle[t], + s = e.style; + return i == null && s && s[t] && (i = s[t]), Ut.test(i) && !Ft.test(t) && (n = s.left, r = e.runtimeStyle && e.runtimeStyle.left, r && (e.runtimeStyle.left = e.currentStyle.left), s.left = t === "fontSize" ? "1em" : i, i = s.pixelLeft + "px", s.left = n, r && (e.runtimeStyle.left = r)), i === "" ? "auto" : i + }), v.each(["height", "width"], function(e, t) { + v.cssHooks[t] = { + get: function(e, n, r) { + if (n) return e.offsetWidth === 0 && It.test(Dt(e, "display")) ? v.swap(e, Xt, function() { + return tn(e, t, r) + }) : tn(e, t, r) + }, + set: function(e, n, r) { + return Zt(e, n, r ? en(e, t, r, v.support.boxSizing && v.css(e, "boxSizing") === "border-box") : 0) + } + } + }), v.support.opacity || (v.cssHooks.opacity = { + get: function(e, t) { + return jt.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : "" + }, + set: function(e, t) { + var n = e.style, + r = e.currentStyle, + i = v.isNumeric(t) ? "alpha(opacity=" + t * 100 + ")" : "", + s = r && r.filter || n.filter || ""; + n.zoom = 1; + if (t >= 1 && v.trim(s.replace(Bt, "")) === "" && n.removeAttribute) { + n.removeAttribute("filter"); + if (r && !r.filter) return + } + n.filter = Bt.test(s) ? s.replace(Bt, i) : s + " " + i + } + }), v(function() { + v.support.reliableMarginRight || (v.cssHooks.marginRight = { + get: function(e, t) { + return v.swap(e, { + display: "inline-block" + }, function() { + if (t) return Dt(e, "marginRight") + }) + } + }), !v.support.pixelPosition && v.fn.position && v.each(["top", "left"], function(e, t) { + v.cssHooks[t] = { + get: function(e, n) { + if (n) { + var r = Dt(e, t); + return Ut.test(r) ? v(e).position()[t] + "px" : r + } + } + } + }) + }), v.expr && v.expr.filters && (v.expr.filters.hidden = function(e) { + return e.offsetWidth === 0 && e.offsetHeight === 0 || !v.support.reliableHiddenOffsets && (e.style && e.style.display || Dt(e, "display")) === "none" + }, v.expr.filters.visible = function(e) { + return !v.expr.filters.hidden(e) + }), v.each({ + margin: "", + padding: "", + border: "Width" + }, function(e, t) { + v.cssHooks[e + t] = { + expand: function(n) { + var r, i = typeof n == "string" ? n.split(" ") : [n], + s = {}; + for (r = 0; r < 4; r++) s[e + $t[r] + t] = i[r] || i[r - 2] || i[0]; + return s + } + }, qt.test(e) || (v.cssHooks[e + t].set = Zt) + }); + var rn = /%20/g, + sn = /\[\]$/, + on = /\r?\n/g, + un = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, + an = /^(?:select|textarea)/i; + v.fn.extend({ + serialize: function() { + return v.param(this.serializeArray()) + }, + serializeArray: function() { + return this.map(function() { + return this.elements ? v.makeArray(this.elements) : this + }).filter(function() { + return this.name && !this.disabled && (this.checked || an.test(this.nodeName) || un.test(this.type)) + }).map(function(e, t) { + var n = v(this).val(); + return n == null ? null : v.isArray(n) ? v.map(n, function(e, n) { + return { + name: t.name, + value: e.replace(on, "\r\n") + } + }) : { + name: t.name, + value: n.replace(on, "\r\n") + } + }).get() + } + }), v.param = function(e, n) { + var r, i = [], + s = function(e, t) { + t = v.isFunction(t) ? t() : t == null ? "" : t, i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t) + }; + n === t && (n = v.ajaxSettings && v.ajaxSettings.traditional); + if (v.isArray(e) || e.jquery && !v.isPlainObject(e)) v.each(e, function() { + s(this.name, this.value) + }); + else for (r in e) fn(r, e[r], n, s); + return i.join("&").replace(rn, "+") + }; + var ln, cn, hn = /#.*$/, + pn = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, + dn = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, + vn = /^(?:GET|HEAD)$/, + mn = /^\/\//, + gn = /\?/, + yn = /)<[^<]*)*<\/script>/gi, + bn = /([?&])_=[^&]*/, + wn = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + En = v.fn.load, + Sn = {}, + xn = {}, + Tn = ["*/"] + ["*"]; + try { + cn = s.href + } catch (Nn) { + cn = i.createElement("a"), cn.href = "", cn = cn.href + } + ln = wn.exec(cn.toLowerCase()) || [], v.fn.load = function(e, n, r) { + if (typeof e != "string" && En) return En.apply(this, arguments); + if (!this.length) return this; + var i, s, o, u = this, + a = e.indexOf(" "); + return a >= 0 && (i = e.slice(a, e.length), e = e.slice(0, a)), v.isFunction(n) ? (r = n, n = t) : n && typeof n == "object" && (s = "POST"), v.ajax({ + url: e, + type: s, + dataType: "html", + data: n, + complete: function(e, t) { + r && u.each(r, o || [e.responseText, t, e]) + } + }).done(function(e) { + o = arguments, u.html(i ? v("
    ").append(e.replace(yn, "")).find(i) : e) + }), this + }, v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(e, t) { + v.fn[t] = function(e) { + return this.on(t, e) + } + }), v.each(["get", "post"], function(e, n) { + v[n] = function(e, r, i, s) { + return v.isFunction(r) && (s = s || i, i = r, r = t), v.ajax({ + type: n, + url: e, + data: r, + success: i, + dataType: s + }) + } + }), v.extend({ + getScript: function(e, n) { + return v.get(e, t, n, "script") + }, + getJSON: function(e, t, n) { + return v.get(e, t, n, "json") + }, + ajaxSetup: function(e, t) { + return t ? Ln(e, v.ajaxSettings) : (t = e, e = v.ajaxSettings), Ln(e, t), e + }, + ajaxSettings: { + url: cn, + isLocal: dn.test(ln[1]), + global: !0, + type: "GET", + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + processData: !0, + async: !0, + accepts: { + xml: "application/xml, text/xml", + html: "text/html", + text: "text/plain", + json: "application/json, text/javascript", + "*": Tn + }, + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + responseFields: { + xml: "responseXML", + text: "responseText" + }, + converters: { + "* text": e.String, + "text html": !0, + "text json": v.parseJSON, + "text xml": v.parseXML + }, + flatOptions: { + context: !0, + url: !0 + } + }, + ajaxPrefilter: Cn(Sn), + ajaxTransport: Cn(xn), + ajax: function(e, n) { + function T(e, n, s, a) { + var l, y, b, w, S, T = n; + if (E === 2) return; + E = 2, u && clearTimeout(u), o = t, i = a || "", x.readyState = e > 0 ? 4 : 0, s && (w = An(c, x, s)); + if (e >= 200 && e < 300 || e === 304) c.ifModified && (S = x.getResponseHeader("Last-Modified"), S && (v.lastModified[r] = S), S = x.getResponseHeader("Etag"), S && (v.etag[r] = S)), e === 304 ? (T = "notmodified", l = !0) : (l = On(c, w), T = l.state, y = l.data, b = l.error, l = !b); + else { + b = T; + if (!T || e) T = "error", e < 0 && (e = 0) + } + x.status = e, x.statusText = (n || T) + "", l ? d.resolveWith(h, [y, T, x]) : d.rejectWith(h, [x, T, b]), x.statusCode(g), g = t, f && p.trigger("ajax" + (l ? "Success" : "Error"), [x, c, l ? y : b]), m.fireWith(h, [x, T]), f && (p.trigger("ajaxComplete", [x, c]), --v.active || v.event.trigger("ajaxStop")) + } + typeof e == "object" && (n = e, e = t), n = n || {}; + var r, i, s, o, u, a, f, l, c = v.ajaxSetup({}, n), + h = c.context || c, + p = h !== c && (h.nodeType || h instanceof v) ? v(h) : v.event, + d = v.Deferred(), + m = v.Callbacks("once memory"), + g = c.statusCode || {}, + b = {}, + w = {}, + E = 0, + S = "canceled", + x = { + readyState: 0, + setRequestHeader: function(e, t) { + if (!E) { + var n = e.toLowerCase(); + e = w[n] = w[n] || e, b[e] = t + } + return this + }, + getAllResponseHeaders: function() { + return E === 2 ? i : null + }, + getResponseHeader: function(e) { + var n; + if (E === 2) { + if (!s) { + s = {}; + while (n = pn.exec(i)) s[n[1].toLowerCase()] = n[2] + } + n = s[e.toLowerCase()] + } + return n === t ? null : n + }, + overrideMimeType: function(e) { + return E || (c.mimeType = e), this + }, + abort: function(e) { + return e = e || S, o && o.abort(e), T(0, e), this + } + }; + d.promise(x), x.success = x.done, x.error = x.fail, x.complete = m.add, x.statusCode = function(e) { + if (e) { + var t; + if (E < 2) for (t in e) g[t] = [g[t], e[t]]; + else t = e[x.status], x.always(t) + } + return this + }, c.url = ((e || c.url) + "").replace(hn, "").replace(mn, ln[1] + "//"), c.dataTypes = v.trim(c.dataType || "*").toLowerCase().split(y), c.crossDomain == null && (a = wn.exec(c.url.toLowerCase()), c.crossDomain = !(!a || a[1] === ln[1] && a[2] === ln[2] && (a[3] || (a[1] === "http:" ? 80 : 443)) == (ln[3] || (ln[1] === "http:" ? 80 : 443)))), c.data && c.processData && typeof c.data != "string" && (c.data = v.param(c.data, c.traditional)), kn(Sn, c, n, x); + if (E === 2) return x; + f = c.global, c.type = c.type.toUpperCase(), c.hasContent = !vn.test(c.type), f && v.active++ === 0 && v.event.trigger("ajaxStart"); + if (!c.hasContent) { + c.data && (c.url += (gn.test(c.url) ? "&" : "?") + c.data, delete c.data), r = c.url; + if (c.cache === !1) { + var N = v.now(), + C = c.url.replace(bn, "$1_=" + N); + c.url = C + (C === c.url ? (gn.test(c.url) ? "&" : "?") + "_=" + N : "") + } + }(c.data && c.hasContent && c.contentType !== !1 || n.contentType) && x.setRequestHeader("Content-Type", c.contentType), c.ifModified && (r = r || c.url, v.lastModified[r] && x.setRequestHeader("If-Modified-Since", v.lastModified[r]), v.etag[r] && x.setRequestHeader("If-None-Match", v.etag[r])), x.setRequestHeader("Accept", c.dataTypes[0] && c.accepts[c.dataTypes[0]] ? c.accepts[c.dataTypes[0]] + (c.dataTypes[0] !== "*" ? ", " + Tn + "; q=0.01" : "") : c.accepts["*"]); + for (l in c.headers) x.setRequestHeader(l, c.headers[l]); + if (!c.beforeSend || c.beforeSend.call(h, x, c) !== !1 && E !== 2) { + S = "abort"; + for (l in { + success: 1, + error: 1, + complete: 1 + }) x[l](c[l]); + o = kn(xn, c, n, x); + if (!o) T(-1, "No Transport"); + else { + x.readyState = 1, f && p.trigger("ajaxSend", [x, c]), c.async && c.timeout > 0 && (u = setTimeout(function() { + x.abort("timeout") + }, c.timeout)); + try { + E = 1, o.send(b, T) + } catch (k) { + if (!(E < 2)) throw k; + T(-1, k) + } + } + return x + } + return x.abort() + }, + active: 0, + lastModified: {}, + etag: {} + }); + var Mn = [], + _n = /\?/, + Dn = /(=)\?(?=&|$)|\?\?/, + Pn = v.now(); + v.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var e = Mn.pop() || v.expando + "_" + Pn++; + return this[e] = !0, e + } + }), v.ajaxPrefilter("json jsonp", function(n, r, i) { + var s, o, u, a = n.data, + f = n.url, + l = n.jsonp !== !1, + c = l && Dn.test(f), + h = l && !c && typeof a == "string" && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Dn.test(a); + if (n.dataTypes[0] === "jsonp" || c || h) return s = n.jsonpCallback = v.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, o = e[s], c ? n.url = f.replace(Dn, "$1" + s) : h ? n.data = a.replace(Dn, "$1" + s) : l && (n.url += (_n.test(f) ? "&" : "?") + n.jsonp + "=" + s), n.converters["script json"] = function() { + return u || v.error(s + " was not called"), u[0] + }, n.dataTypes[0] = "json", e[s] = function() { + u = arguments + }, i.always(function() { + e[s] = o, n[s] && (n.jsonpCallback = r.jsonpCallback, Mn.push(s)), u && v.isFunction(o) && o(u[0]), u = o = t + }), "script" + }), v.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /javascript|ecmascript/ + }, + converters: { + "text script": function(e) { + return v.globalEval(e), e + } + } + }), v.ajaxPrefilter("script", function(e) { + e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1) + }), v.ajaxTransport("script", function(e) { + if (e.crossDomain) { + var n, r = i.head || i.getElementsByTagName("head")[0] || i.documentElement; + return { + send: function(s, o) { + n = i.createElement("script"), n.async = "async", e.scriptCharset && (n.charset = e.scriptCharset), n.src = e.url, n.onload = n.onreadystatechange = function(e, i) { + if (i || !n.readyState || /loaded|complete/.test(n.readyState)) n.onload = n.onreadystatechange = null, r && n.parentNode && r.removeChild(n), n = t, i || o(200, "success") + }, r.insertBefore(n, r.firstChild) + }, + abort: function() { + n && n.onload(0, 1) + } + } + } + }); + var Hn, Bn = e.ActiveXObject ? + function() { + for (var e in Hn) Hn[e](0, 1) + } : !1, + jn = 0; + v.ajaxSettings.xhr = e.ActiveXObject ? + function() { + return !this.isLocal && Fn() || In() + } : Fn, function(e) { + v.extend(v.support, { + ajax: !! e, + cors: !! e && "withCredentials" in e + }) + }(v.ajaxSettings.xhr()), v.support.ajax && v.ajaxTransport(function(n) { + if (!n.crossDomain || v.support.cors) { + var r; + return { + send: function(i, s) { + var o, u, a = n.xhr(); + n.username ? a.open(n.type, n.url, n.async, n.username, n.password) : a.open(n.type, n.url, n.async); + if (n.xhrFields) for (u in n.xhrFields) a[u] = n.xhrFields[u]; + n.mimeType && a.overrideMimeType && a.overrideMimeType(n.mimeType), !n.crossDomain && !i["X-Requested-With"] && (i["X-Requested-With"] = "XMLHttpRequest"); + try { + for (u in i) a.setRequestHeader(u, i[u]) + } catch (f) {} + a.send(n.hasContent && n.data || null), r = function(e, i) { + var u, f, l, c, h; + try { + if (r && (i || a.readyState === 4)) { + r = t, o && (a.onreadystatechange = v.noop, Bn && delete Hn[o]); + if (i) a.readyState !== 4 && a.abort(); + else { + u = a.status, l = a.getAllResponseHeaders(), c = {}, h = a.responseXML, h && h.documentElement && (c.xml = h); + try { + c.text = a.responseText + } catch (p) {} + try { + f = a.statusText + } catch (p) { + f = "" + }!u && n.isLocal && !n.crossDomain ? u = c.text ? 200 : 404 : u === 1223 && (u = 204) + } + } + } catch (d) { + i || s(-1, d) + } + c && s(u, f, c, l) + }, n.async ? a.readyState === 4 ? setTimeout(r, 0) : (o = ++jn, Bn && (Hn || (Hn = {}, v(e).unload(Bn)), Hn[o] = r), a.onreadystatechange = r) : r() + }, + abort: function() { + r && r(0, 1) + } + } + } + }); + var qn, Rn, Un = /^(?:toggle|show|hide)$/, + zn = new RegExp("^(?:([-+])=|)(" + m + ")([a-z%]*)$", "i"), + Wn = /queueHooks$/, + Xn = [Gn], + Vn = { + "*": [function(e, t) { + var n, r, i = this.createTween(e, t), + s = zn.exec(t), + o = i.cur(), + u = +o || 0, + a = 1, + f = 20; + if (s) { + n = +s[2], r = s[3] || (v.cssNumber[e] ? "" : "px"); + if (r !== "px" && u) { + u = v.css(i.elem, e, !0) || n || 1; + do a = a || ".5", u /= a, v.style(i.elem, e, u + r); + while (a !== (a = i.cur() / o) && a !== 1 && --f) + } + i.unit = r, i.start = u, i.end = s[1] ? u + (s[1] + 1) * n : n + } + return i + }] + }; + v.Animation = v.extend(Kn, { + tweener: function(e, t) { + v.isFunction(e) ? (t = e, e = ["*"]) : e = e.split(" "); + var n, r = 0, + i = e.length; + for (; r < i; r++) n = e[r], Vn[n] = Vn[n] || [], Vn[n].unshift(t) + }, + prefilter: function(e, t) { + t ? Xn.unshift(e) : Xn.push(e) + } + }), v.Tween = Yn, Yn.prototype = { + constructor: Yn, + init: function(e, t, n, r, i, s) { + this.elem = e, this.prop = n, this.easing = i || "swing", this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = s || (v.cssNumber[n] ? "" : "px") + }, + cur: function() { + var e = Yn.propHooks[this.prop]; + return e && e.get ? e.get(this) : Yn.propHooks._default.get(this) + }, + run: function(e) { + var t, n = Yn.propHooks[this.prop]; + return this.options.duration ? this.pos = t = v.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : Yn.propHooks._default.set(this), this + } + }, Yn.prototype.init.prototype = Yn.prototype, Yn.propHooks = { + _default: { + get: function(e) { + var t; + return e.elem[e.prop] == null || !! e.elem.style && e.elem.style[e.prop] != null ? (t = v.css(e.elem, e.prop, !1, ""), !t || t === "auto" ? 0 : t) : e.elem[e.prop] + }, + set: function(e) { + v.fx.step[e.prop] ? v.fx.step[e.prop](e) : e.elem.style && (e.elem.style[v.cssProps[e.prop]] != null || v.cssHooks[e.prop]) ? v.style(e.elem, e.prop, e.now + e.unit) : e.elem[e.prop] = e.now + } + } + }, Yn.propHooks.scrollTop = Yn.propHooks.scrollLeft = { + set: function(e) { + e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) + } + }, v.each(["toggle", "show", "hide"], function(e, t) { + var n = v.fn[t]; + v.fn[t] = function(r, i, s) { + return r == null || typeof r == "boolean" || !e && v.isFunction(r) && v.isFunction(i) ? n.apply(this, arguments) : this.animate(Zn(t, !0), r, i, s) + } + }), v.fn.extend({ + fadeTo: function(e, t, n, r) { + return this.filter(Gt).css("opacity", 0).show().end().animate({ + opacity: t + }, e, n, r) + }, + animate: function(e, t, n, r) { + var i = v.isEmptyObject(e), + s = v.speed(t, n, r), + o = function() { + var t = Kn(this, v.extend({}, e), s); + i && t.stop(!0) + }; + return i || s.queue === !1 ? this.each(o) : this.queue(s.queue, o) + }, + stop: function(e, n, r) { + var i = function(e) { + var t = e.stop; + delete e.stop, t(r) + }; + return typeof e != "string" && (r = n, n = e, e = t), n && e !== !1 && this.queue(e || "fx", []), this.each(function() { + var t = !0, + n = e != null && e + "queueHooks", + s = v.timers, + o = v._data(this); + if (n) o[n] && o[n].stop && i(o[n]); + else for (n in o) o[n] && o[n].stop && Wn.test(n) && i(o[n]); + for (n = s.length; n--;) s[n].elem === this && (e == null || s[n].queue === e) && (s[n].anim.stop(r), t = !1, s.splice(n, 1)); + (t || !r) && v.dequeue(this, e) + }) + } + }), v.each({ + slideDown: Zn("show"), + slideUp: Zn("hide"), + slideToggle: Zn("toggle"), + fadeIn: { + opacity: "show" + }, + fadeOut: { + opacity: "hide" + }, + fadeToggle: { + opacity: "toggle" + } + }, function(e, t) { + v.fn[e] = function(e, n, r) { + return this.animate(t, e, n, r) + } + }), v.speed = function(e, t, n) { + var r = e && typeof e == "object" ? v.extend({}, e) : { + complete: n || !n && t || v.isFunction(e) && e, + duration: e, + easing: n && t || t && !v.isFunction(t) && t + }; + r.duration = v.fx.off ? 0 : typeof r.duration == "number" ? r.duration : r.duration in v.fx.speeds ? v.fx.speeds[r.duration] : v.fx.speeds._default; + if (r.queue == null || r.queue === !0) r.queue = "fx"; + return r.old = r.complete, r.complete = function() { + v.isFunction(r.old) && r.old.call(this), r.queue && v.dequeue(this, r.queue) + }, r + }, v.easing = { + linear: function(e) { + return e + }, + swing: function(e) { + return.5 - Math.cos(e * Math.PI) / 2 + } + }, v.timers = [], v.fx = Yn.prototype.init, v.fx.tick = function() { + var e, n = v.timers, + r = 0; + qn = v.now(); + for (; r < n.length; r++) e = n[r], !e() && n[r] === e && n.splice(r--, 1); + n.length || v.fx.stop(), qn = t + }, v.fx.timer = function(e) { + e() && v.timers.push(e) && !Rn && (Rn = setInterval(v.fx.tick, v.fx.interval)) + }, v.fx.interval = 13, v.fx.stop = function() { + clearInterval(Rn), Rn = null + }, v.fx.speeds = { + slow: 600, + fast: 200, + _default: 400 + }, v.fx.step = {}, v.expr && v.expr.filters && (v.expr.filters.animated = function(e) { + return v.grep(v.timers, function(t) { + return e === t.elem + }).length + }); + var er = /^(?:body|html)$/i; + v.fn.offset = function(e) { + if (arguments.length) return e === t ? this : this.each(function(t) { + v.offset.setOffset(this, e, t) + }); + var n, r, i, s, o, u, a, f = { + top: 0, + left: 0 + }, + l = this[0], + c = l && l.ownerDocument; + if (!c) return; + return (r = c.body) === l ? v.offset.bodyOffset(l) : (n = c.documentElement, v.contains(n, l) ? (typeof l.getBoundingClientRect != "undefined" && (f = l.getBoundingClientRect()), i = tr(c), s = n.clientTop || r.clientTop || 0, o = n.clientLeft || r.clientLeft || 0, u = i.pageYOffset || n.scrollTop, a = i.pageXOffset || n.scrollLeft, { + top: f.top + u - s, + left: f.left + a - o + }) : f) + }, v.offset = { + bodyOffset: function(e) { + var t = e.offsetTop, + n = e.offsetLeft; + return v.support.doesNotIncludeMarginInBodyOffset && (t += parseFloat(v.css(e, "marginTop")) || 0, n += parseFloat(v.css(e, "marginLeft")) || 0), { + top: t, + left: n + } + }, + setOffset: function(e, t, n) { + var r = v.css(e, "position"); + r === "static" && (e.style.position = "relative"); + var i = v(e), + s = i.offset(), + o = v.css(e, "top"), + u = v.css(e, "left"), + a = (r === "absolute" || r === "fixed") && v.inArray("auto", [o, u]) > -1, + f = {}, + l = {}, + c, h; + a ? (l = i.position(), c = l.top, h = l.left) : (c = parseFloat(o) || 0, h = parseFloat(u) || 0), v.isFunction(t) && (t = t.call(e, n, s)), t.top != null && (f.top = t.top - s.top + c), t.left != null && (f.left = t.left - s.left + h), "using" in t ? t.using.call(e, f) : i.css(f) + } + }, v.fn.extend({ + position: function() { + if (!this[0]) return; + var e = this[0], + t = this.offsetParent(), + n = this.offset(), + r = er.test(t[0].nodeName) ? { + top: 0, + left: 0 + } : t.offset(); + return n.top -= parseFloat(v.css(e, "marginTop")) || 0, n.left -= parseFloat(v.css(e, "marginLeft")) || 0, r.top += parseFloat(v.css(t[0], "borderTopWidth")) || 0, r.left += parseFloat(v.css(t[0], "borderLeftWidth")) || 0, { + top: n.top - r.top, + left: n.left - r.left + } + }, + offsetParent: function() { + return this.map(function() { + var e = this.offsetParent || i.body; + while (e && !er.test(e.nodeName) && v.css(e, "position") === "static") e = e.offsetParent; + return e || i.body + }) + } + }), v.each({ + scrollLeft: "pageXOffset", + scrollTop: "pageYOffset" + }, function(e, n) { + var r = /Y/.test(n); + v.fn[e] = function(i) { + return v.access(this, function(e, i, s) { + var o = tr(e); + if (s === t) return o ? n in o ? o[n] : o.document.documentElement[i] : e[i]; + o ? o.scrollTo(r ? v(o).scrollLeft() : s, r ? s : v(o).scrollTop()) : e[i] = s + }, e, i, arguments.length, null) + } + }), v.each({ + Height: "height", + Width: "width" + }, function(e, n) { + v.each({ + padding: "inner" + e, + content: n, + "": "outer" + e + }, function(r, i) { + v.fn[i] = function(i, s) { + var o = arguments.length && (r || typeof i != "boolean"), + u = r || (i === !0 || s === !0 ? "margin" : "border"); + return v.access(this, function(n, r, i) { + var s; + return v.isWindow(n) ? n.document.documentElement["client" + e] : n.nodeType === 9 ? (s = n.documentElement, Math.max(n.body["scroll" + e], s["scroll" + e], n.body["offset" + e], s["offset" + e], s["client" + e])) : i === t ? v.css(n, r, i, u) : v.style(n, r, i, u) + }, n, o ? i : t, o, null) + } + }) + }), e.jQuery = e.$ = v, typeof define == "function" && define.amd && define.amd.jQuery && define("jquery", [], function() { + return v + }) +})(window); \ No newline at end of file diff --git a/Docs/docstrap-master/template/static/scripts/jquery.scrollTo.js b/Docs/docstrap-master/template/static/scripts/jquery.scrollTo.js new file mode 100644 index 00000000..33d36157 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/jquery.scrollTo.js @@ -0,0 +1,217 @@ +/*! + * jQuery.ScrollTo + * Copyright (c) 2007-2013 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * + * @projectDescription Easy element scrolling using jQuery. + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html + * @author Ariel Flesler + * @version 1.4.5 + * + * @id jQuery.scrollTo + * @id jQuery.fn.scrollTo + * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. + * The different options for target are: + * - A number position (will be applied to all axes). + * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes + * - A jQuery/DOM element ( logically, child of the element to scroll ) + * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) + * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. + * - A percentage of the container's dimension/s, for example: 50% to go to the middle. + * - The string 'max' for go-to-end. + * @param {Number, Function} duration The OVERALL length of the animation, this argument can be the settings object instead. + * @param {Object,Function} settings Optional set of settings or the onAfter callback. + * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. + * @option {Number, Function} duration The OVERALL length of the animation. + * @option {String} easing The easing method for the animation. + * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. + * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. + * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. + * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. + * @option {Function} onAfter Function to be called after the scrolling ends. + * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. + * @return {jQuery} Returns the same jQuery object, for chaining. + * + * @desc Scroll to a fixed position + * @example $('div').scrollTo( 340 ); + * + * @desc Scroll relatively to the actual position + * @example $('div').scrollTo( '+=340px', { axis:'y' } ); + * + * @desc Scroll using a selector (relative to the scrolled element) + * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); + * + * @desc Scroll to a DOM element (same for jQuery object) + * @example var second_child = document.getElementById('container').firstChild.nextSibling; + * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ + * alert('scrolled!!'); + * }}); + * + * @desc Scroll on both axes, to different values + * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); + */ + +;(function( $ ){ + + var $scrollTo = $.scrollTo = function( target, duration, settings ){ + $(window).scrollTo( target, duration, settings ); + }; + + $scrollTo.defaults = { + axis:'xy', + duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1, + limit:true + }; + + // Returns the element that needs to be animated to scroll the window. + // Kept for backwards compatibility (specially for localScroll & serialScroll) + $scrollTo.window = function( scope ){ + return $(window)._scrollable(); + }; + + // Hack, hack, hack :) + // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) + $.fn._scrollable = function(){ + return this.map(function(){ + var elem = this, + isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1; + + if( !isWin ) + return elem; + + var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; + + return /webkit/i.test(navigator.userAgent) || doc.compatMode == 'BackCompat' ? + doc.body : + doc.documentElement; + }); + }; + + $.fn.scrollTo = function( target, duration, settings ){ + if( typeof duration == 'object' ){ + settings = duration; + duration = 0; + } + if( typeof settings == 'function' ) + settings = { onAfter:settings }; + + if( target == 'max' ) + target = 9e9; + + settings = $.extend( {}, $scrollTo.defaults, settings ); + // Speed is still recognized for backwards compatibility + duration = duration || settings.duration; + // Make sure the settings are given right + settings.queue = settings.queue && settings.axis.length > 1; + + if( settings.queue ) + // Let's keep the overall duration + duration /= 2; + settings.offset = both( settings.offset ); + settings.over = both( settings.over ); + + return this._scrollable().each(function(){ + // Null target yields nothing, just like jQuery does + if (target == null) return; + + var elem = this, + $elem = $(elem), + targ = target, toff, attr = {}, + win = $elem.is('html,body'); + + switch( typeof targ ){ + // A number will pass the regex + case 'number': + case 'string': + if( /^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ) ){ + targ = both( targ ); + // We are done + break; + } + // Relative selector, no break! + targ = $(targ,this); + if (!targ.length) return; + case 'object': + // DOMElement / jQuery + if( targ.is || targ.style ) + // Get the real position of the target + toff = (targ = $(targ)).offset(); + } + $.each( settings.axis.split(''), function( i, axis ){ + var Pos = axis == 'x' ? 'Left' : 'Top', + pos = Pos.toLowerCase(), + key = 'scroll' + Pos, + old = elem[key], + max = $scrollTo.max(elem, axis); + + if( toff ){// jQuery / DOMElement + attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); + + // If it's a dom element, reduce the margin + if( settings.margin ){ + attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; + attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; + } + + attr[key] += settings.offset[pos] || 0; + + if( settings.over[pos] ) + // Scroll to a fraction of its width/height + attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos]; + }else{ + var val = targ[pos]; + // Handle percentage values + attr[key] = val.slice && val.slice(-1) == '%' ? + parseFloat(val) / 100 * max + : val; + } + + // Number or 'number' + if( settings.limit && /^\d+$/.test(attr[key]) ) + // Check the limits + attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max ); + + // Queueing axes + if( !i && settings.queue ){ + // Don't waste time animating, if there's no need. + if( old != attr[key] ) + // Intermediate animation + animate( settings.onAfterFirst ); + // Don't animate this axis again in the next iteration. + delete attr[key]; + } + }); + + animate( settings.onAfter ); + + function animate( callback ){ + $elem.animate( attr, duration, settings.easing, callback && function(){ + callback.call(this, target, settings); + }); + }; + + }).end(); + }; + + // Max scrolling position, works on quirks mode + // It only fails (not too badly) on IE, quirks mode. + $scrollTo.max = function( elem, axis ){ + var Dim = axis == 'x' ? 'Width' : 'Height', + scroll = 'scroll'+Dim; + + if( !$(elem).is('html,body') ) + return elem[scroll] - $(elem)[Dim.toLowerCase()](); + + var size = 'client' + Dim, + html = elem.ownerDocument.documentElement, + body = elem.ownerDocument.body; + + return Math.max( html[scroll], body[scroll] ) + - Math.min( html[size] , body[size] ); + }; + + function both( val ){ + return typeof val == 'object' ? val : { top:val, left:val }; + }; + +})( jQuery ); \ No newline at end of file diff --git a/Docs/docstrap-master/template/static/scripts/jquery.sunlight.js b/Docs/docstrap-master/template/static/scripts/jquery.sunlight.js new file mode 100644 index 00000000..03e3bfb8 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/jquery.sunlight.js @@ -0,0 +1,18 @@ +/** + * jQuery plugin for Sunlight http://sunlightjs.com/ + * + * by Tommy Montgomery http://tmont.com/ + * licensed under WTFPL http://sam.zoy.org/wtfpl/ + */ +(function($, window){ + + $.fn.sunlight = function(options) { + var highlighter = new window.Sunlight.Highlighter(options); + this.each(function() { + highlighter.highlightNode(this); + }); + + return this; + }; + +}(jQuery, this)); \ No newline at end of file diff --git a/Docs/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt b/Docs/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Docs/docstrap-master/template/static/scripts/prettify/jquery.min.js b/Docs/docstrap-master/template/static/scripts/prettify/jquery.min.js new file mode 100644 index 00000000..b18e05a9 --- /dev/null +++ b/Docs/docstrap-master/template/static/scripts/prettify/jquery.min.js @@ -0,0 +1,6 @@ +/*! jQuery v2.0.0 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery.min.map +*/ +(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],f="2.0.0",p=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=f.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return p.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,f,p,h,d,g,m,y="sizzle"+-new Date,v=e.document,b={},w=0,T=0,C=ot(),k=ot(),N=ot(),E=!1,S=function(){return 0},j=typeof undefined,D=1<<31,A=[],L=A.pop,q=A.push,H=A.push,O=A.slice,F=A.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=M.replace("w","w#"),$="\\["+R+"*("+M+")"+R+"*(?:([*^$|!~]?=)"+R+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+R+"*\\]",B=":("+M+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",I=RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),z=RegExp("^"+R+"*,"+R+"*"),_=RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),X=RegExp(R+"*[+~]"),U=RegExp("="+R+"*([^\\]'\"]*)"+R+"*\\]","g"),Y=RegExp(B),V=RegExp("^"+W+"$"),G={ID:RegExp("^#("+M+")"),CLASS:RegExp("^\\.("+M+")"),TAG:RegExp("^("+M.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+B),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),"boolean":RegExp("^(?:"+P+")$","i"),needsContext:RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,et=/'|\\/g,tt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,nt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{H.apply(A=O.call(v.childNodes),v.childNodes),A[v.childNodes.length].nodeType}catch(rt){H={apply:A.length?function(e,t){q.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function it(e){return J.test(e+"")}function ot(){var e,t=[];return e=function(n,i){return t.push(n+=" ")>r.cacheLength&&delete e[t.shift()],e[n]=i}}function st(e){return e[y]=!0,e}function at(e){var t=c.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ut(e,t,n,r){var i,o,s,a,u,f,d,g,x,w;if((t?t.ownerDocument||t:v)!==c&&l(t),t=t||c,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(p&&!r){if(i=Q.exec(e))if(s=i[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&m(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return H.apply(n,t.getElementsByTagName(e)),n;if((s=i[3])&&b.getElementsByClassName&&t.getElementsByClassName)return H.apply(n,t.getElementsByClassName(s)),n}if(b.qsa&&(!h||!h.test(e))){if(g=d=y,x=t,w=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(d=t.getAttribute("id"))?g=d.replace(et,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=f.length;while(u--)f[u]=g+mt(f[u]);x=X.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return H.apply(n,x.querySelectorAll(w)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(I,"$1"),t,n,r)}o=ut.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},l=ut.setDocument=function(e){var t=e?e.ownerDocument||e:v;return t!==c&&9===t.nodeType&&t.documentElement?(c=t,f=t.documentElement,p=!o(t),b.getElementsByTagName=at(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),b.attributes=at(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByClassName=at(function(e){return e.innerHTML="
    ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),b.sortDetached=at(function(e){return 1&e.compareDocumentPosition(c.createElement("div"))}),b.getById=at(function(e){return f.appendChild(e).id=y,!t.getElementsByName||!t.getElementsByName(y).length}),b.getById?(r.find.ID=function(e,t){if(typeof t.getElementById!==j&&p){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(tt,nt);return function(e){return e.getAttribute("id")===t}}):(r.find.ID=function(e,t){if(typeof t.getElementById!==j&&p){var n=t.getElementById(e);return n?n.id===e||typeof n.getAttributeNode!==j&&n.getAttributeNode("id").value===e?[n]:undefined:[]}},r.filter.ID=function(e){var t=e.replace(tt,nt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=b.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=b.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&p?t.getElementsByClassName(e):undefined},d=[],h=[],(b.qsa=it(t.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+R+"*(?:value|"+P+")"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){var t=c.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&h.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(b.matchesSelector=it(g=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){b.disconnectedMatch=g.call(e,"div"),g.call(e,"[s!='']:x"),d.push("!=",B)}),h=h.length&&RegExp(h.join("|")),d=d.length&&RegExp(d.join("|")),m=it(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,n){if(e===n)return E=!0,0;var r=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);return r?1&r||!b.sortDetached&&n.compareDocumentPosition(e)===r?e===t||m(v,e)?-1:n===t||m(v,n)?1:u?F.call(u,e)-F.call(u,n):0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],l=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:u?F.call(u,e)-F.call(u,n):0;if(o===s)return lt(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)l.unshift(r);while(a[i]===l[i])i++;return i?lt(a[i],l[i]):a[i]===v?-1:l[i]===v?1:0},c):c},ut.matches=function(e,t){return ut(e,null,null,t)},ut.matchesSelector=function(e,t){if((e.ownerDocument||e)!==c&&l(e),t=t.replace(U,"='$1']"),!(!b.matchesSelector||!p||d&&d.test(t)||h&&h.test(t)))try{var n=g.call(e,t);if(n||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return ut(t,c,null,[e]).length>0},ut.contains=function(e,t){return(e.ownerDocument||e)!==c&&l(e),m(e,t)},ut.attr=function(e,t){(e.ownerDocument||e)!==c&&l(e);var n=r.attrHandle[t.toLowerCase()],i=n&&n(e,t,!p);return i===undefined?b.attributes||!p?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null:i},ut.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ut.uniqueSort=function(e){var t,n=[],r=0,i=0;if(E=!b.detectDuplicates,u=!b.sortStable&&e.slice(0),e.sort(S),E){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return e};function lt(e,t){var n=t&&e,r=n&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ct(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}function ft(e,t,n){var r;return n?undefined:r=e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function dt(e){return st(function(t){return t=+t,st(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}i=ut.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r];r++)n+=i(t);return n},r=ut.selectors={cacheLength:50,createPseudo:st,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(tt,nt),e[3]=(e[4]||e[5]||"").replace(tt,nt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ut.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ut.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return G.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&Y.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(tt,nt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ut.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){f=t;while(f=f[g])if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[y]||(m[y]={}),l=c[e]||[],h=l[0]===w&&l[1],p=l[0]===w&&l[2],f=h&&m.childNodes[h];while(f=++h&&f&&f[g]||(p=h=0)||d.pop())if(1===f.nodeType&&++p&&f===t){c[e]=[w,h,p];break}}else if(x&&(l=(t[y]||(t[y]={}))[e])&&l[0]===w)p=l[1];else while(f=++h&&f&&f[g]||(p=h=0)||d.pop())if((a?f.nodeName.toLowerCase()===v:1===f.nodeType)&&++p&&(x&&((f[y]||(f[y]={}))[e]=[w,p]),f===t))break;return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ut.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?st(function(e,n){var r,o=i(e,t),s=o.length;while(s--)r=F.call(e,o[s]),e[r]=!(n[r]=o[s])}):function(e){return i(e,0,n)}):i}},pseudos:{not:st(function(e){var t=[],n=[],r=s(e.replace(I,"$1"));return r[y]?st(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:st(function(e){return function(t){return ut(e,t).length>0}}),contains:st(function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:st(function(e){return V.test(e||"")||ut.error("unsupported lang: "+e),e=e.replace(tt,nt).toLowerCase(),function(t){var n;do if(n=p?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===c.activeElement&&(!c.hasFocus||c.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[0>n?n+t:n]}),even:dt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:dt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ht(t);function gt(e,t){var n,i,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=r.preFilter;while(a){(!n||(i=z.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),n=!1,(i=_.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(I," ")}),a=a.slice(n.length));for(s in r.filter)!(i=G[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ut.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,r){var i=t.dir,o=r&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,r,a){var u,l,c,f=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,r,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[y]||(t[y]={}),(l=c[i])&&l[0]===f){if((u=l[1])===!0||u===n)return u===!0}else if(l=c[i]=[f],l[1]=e(t,r,a)||n,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[y]&&(r=bt(r)),i&&!i[y]&&(i=bt(i,o)),st(function(o,s,a,u){var l,c,f,p=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,p,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(f=l[c])&&(y[h[c]]=!(m[h[c]]=f))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(f=y[c])&&l.push(m[c]=f);i(null,y=[],l,u)}c=y.length;while(c--)(f=y[c])&&(l=i?F.call(o,f):p[c])>-1&&(o[l]=!(s[l]=f))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):H.apply(s,y)})}function wt(e){var t,n,i,o=e.length,s=r.relative[e[0].type],u=s||r.relative[" "],l=s?1:0,c=yt(function(e){return e===t},u,!0),f=yt(function(e){return F.call(t,e)>-1},u,!0),p=[function(e,n,r){return!s&&(r||n!==a)||((t=n).nodeType?c(e,n,r):f(e,n,r))}];for(;o>l;l++)if(n=r.relative[e[l].type])p=[yt(vt(p),n)];else{if(n=r.filter[e[l].type].apply(null,e[l].matches),n[y]){for(i=++l;o>i;i++)if(r.relative[e[i].type])break;return bt(l>1&&vt(p),l>1&&mt(e.slice(0,l-1)).replace(I,"$1"),n,i>l&&wt(e.slice(l,i)),o>i&&wt(e=e.slice(i)),o>i&&mt(e))}p.push(n)}return vt(p)}function Tt(e,t){var i=0,o=t.length>0,s=e.length>0,u=function(u,l,f,p,h){var d,g,m,y=[],v=0,x="0",b=u&&[],T=null!=h,C=a,k=u||s&&r.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(a=l!==c&&l,n=i);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,f)){p.push(d);break}T&&(w=N,n=++i)}o&&((d=!m&&d)&&v--,u&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,f);if(u){if(v>0)while(x--)b[x]||y[x]||(y[x]=L.call(p));y=xt(y)}H.apply(p,y),T&&!u&&y.length>0&&v+t.length>1&&ut.uniqueSort(p)}return T&&(w=N,a=C),b};return o?st(u):u}s=ut.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[y]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ut(e,t[r],n);return n}function kt(e,t,n,i){var o,a,u,l,c,f=gt(e);if(!i&&1===f.length){if(a=f[0]=f[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&p&&r.relative[a[1].type]){if(t=(r.find.ID(u.matches[0].replace(tt,nt),t)||[])[0],!t)return n;e=e.slice(a.shift().value.length)}o=G.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],r.relative[l=u.type])break;if((c=r.find[l])&&(i=c(u.matches[0].replace(tt,nt),X.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=i.length&&mt(a),!e)return H.apply(n,i),n;break}}}return s(e,f)(i,t,!p,n,X.test(e)),n}r.pseudos.nth=r.pseudos.eq;function Nt(){}Nt.prototype=r.filters=r.pseudos,r.setFilters=new Nt,b.sortStable=y.split("").sort(S).join("")===y,l(),[0,0].sort(S),b.detectDuplicates=E,at(function(e){if(e.innerHTML="
    ","#"!==e.firstChild.getAttribute("href")){var t="type|href|height|width".split("|"),n=t.length;while(n--)r.attrHandle[t[n]]=ft}}),at(function(e){if(null!=e.getAttribute("disabled")){var t=P.split("|"),n=t.length;while(n--)r.attrHandle[t[n]]=ct}}),x.find=ut,x.expr=ut.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ut.uniqueSort,x.text=ut.getText,x.isXMLDoc=ut.isXML,x.contains=ut.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(f){for(t=e.memory&&f,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(f[0],f[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!a||n&&!u||(r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))this.cache[i]=t;else for(r in t)o[r]=t[r]},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){return t===undefined||t&&"string"==typeof t&&n===undefined?this.get(e,t):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i=this.key(e),o=this.cache[i];if(t===undefined)this.cache[i]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):t in o?r=[t]:(r=x.camelCase(t),r=r in o?[r]:r.match(w)||[]),n=r.length;while(n--)delete o[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){delete this.cache[this.key(e)]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.substring(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t); +x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,i="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,s=0,a=x(this),u=t,l=e.match(w)||[];while(o=l[s++])u=i?u:!a.hasClass(o),a[u?"addClass":"removeClass"](o)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i,o=x(this);1===this.nodeType&&(i=r?e.call(this,n,o.val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.boolean.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.boolean.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.boolean.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,f,p,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(p=x.event.special[d]||{},d=(o?p.delegateType:p.bindType)||d,p=x.event.special[d]||{},f=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,p.setup&&p.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,f):h.push(f),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){f=x.event.special[h]||{},h=(r?f.delegateType:f.bindType)||h,p=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,f,p,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),p=x.event.special[d]||{},i||!p.trigger||p.trigger.apply(r,n)!==!1)){if(!i&&!p.noBubble&&!x.isWindow(r)){for(l=p.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:p.bindType||d,f=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),f&&f.apply(a,n),f=c&&a[c],f&&x.acceptData(a)&&f.apply&&f.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||p._default&&p._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return 3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=x.expr.match.needsContext,Q={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return t=this,this.pushStack(x(e).filter(function(){for(r=0;i>r;r++)if(x.contains(t[r],this))return!0}));for(n=[],r=0;i>r;r++)x.find(e,this[r],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(Z(this,e||[],!0))},filter:function(e){return this.pushStack(Z(this,e||[],!1))},is:function(e){return!!e&&("string"==typeof e?J.test(e)?x(e,this.context).index(this[0])>=0:x.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],s=J.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function K(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return K(e,"nextSibling")},prev:function(e){return K(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(Q[e]||x.unique(i),"p"===e[0]&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function Z(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,tt=/<([\w:]+)/,nt=/<|&#?\w+;/,rt=/<(?:script|style|link)/i,it=/^(?:checkbox|radio)$/i,ot=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^$|\/(?:java|ecma)script/i,at=/^true\/(.*)/,ut=/^\s*\s*$/g,lt={option:[1,""],thead:[1,"
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};lt.optgroup=lt.option,lt.tbody=lt.tfoot=lt.colgroup=lt.caption=lt.col=lt.thead,lt.th=lt.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ct(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ct(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(gt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&ht(gt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(gt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!rt.test(e)&&!lt[(tt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(et,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(gt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=p.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,f=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&ot.test(d))return this.each(function(r){var i=f.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(gt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,gt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,pt),l=0;s>l;l++)a=o[l],st.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(ut,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=gt(a),o=gt(e),r=0,i=o.length;i>r;r++)mt(o[r],s[r]);if(t)if(n)for(o=o||gt(e),s=s||gt(a),r=0,i=o.length;i>r;r++)dt(o[r],s[r]);else dt(e,a);return s=gt(a,"script"),s.length>0&&ht(s,!u&>(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,f=e.length,p=t.createDocumentFragment(),h=[];for(;f>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(nt.test(i)){o=o||p.appendChild(t.createElement("div")),s=(tt.exec(i)||["",""])[1].toLowerCase(),a=lt[s]||lt._default,o.innerHTML=a[1]+i.replace(et,"<$1>")+a[2],l=a[0];while(l--)o=o.firstChild;x.merge(h,o.childNodes),o=p.firstChild,o.textContent=""}else h.push(t.createTextNode(i));p.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=gt(p.appendChild(i),"script"),u&&ht(o),n)){l=0;while(i=o[l++])st.test(i.type||"")&&n.push(i)}return p},cleanData:function(e){var t,n,r,i=e.length,o=0,s=x.event.special;for(;i>o;o++){if(n=e[o],x.acceptData(n)&&(t=q.access(n)))for(r in t.events)s[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);L.discard(n),q.discard(n)}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"text",async:!1,global:!1,success:x.globalEval})}});function ct(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function pt(e){var t=at.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ht(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function dt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=x.extend({},o),l=o.events,q.set(t,s),l)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function gt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function mt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&it.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var yt,vt,xt=/^(none|table(?!-c[ea]).+)/,bt=/^margin/,wt=RegExp("^("+b+")(.*)$","i"),Tt=RegExp("^("+b+")(?!px)[a-z%]+$","i"),Ct=RegExp("^([+-])=("+b+")","i"),kt={BODY:"block"},Nt={position:"absolute",visibility:"hidden",display:"block"},Et={letterSpacing:0,fontWeight:400},St=["Top","Right","Bottom","Left"],jt=["Webkit","O","Moz","ms"];function Dt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=jt.length;while(i--)if(t=jt[i]+n,t in e)return t;return r}function At(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function Lt(t){return e.getComputedStyle(t,null)}function qt(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&At(r)&&(o[s]=q.access(r,"olddisplay",Pt(r.nodeName)))):o[s]||(i=At(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=Lt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return qt(this,!0)},hide:function(){return qt(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:At(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=yt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=Dt(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=Ct.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=Dt(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=yt(e,t,r)),"normal"===i&&t in Et&&(i=Et[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),yt=function(e,t,n){var r,i,o,s=n||Lt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Tt.test(a)&&bt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ht(e,t,n){var r=wt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ot(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+St[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+St[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+St[o]+"Width",!0,i))):(s+=x.css(e,"padding"+St[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+St[o]+"Width",!0,i)));return s}function Ft(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Lt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=yt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Tt.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ot(e,t,n||(s?"border":"content"),r,o)+"px"}function Pt(e){var t=o,n=kt[e];return n||(n=Rt(e,t),"none"!==n&&n||(vt=(vt||x(" + + + \ No newline at end of file diff --git a/examples/loader/loading multiple files.php b/examples/loader/loading multiple files.php deleted file mode 100644 index 1594a2ab..00000000 --- a/examples/loader/loading multiple files.php +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/examples/loader/pick images from cache.js b/examples/loader/pick images from cache.js new file mode 100644 index 00000000..071bbf70 --- /dev/null +++ b/examples/loader/pick images from cache.js @@ -0,0 +1,35 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render }); + +function preload() { + + game.load.image('atari1', 'assets/sprites/atari130xe.png'); + game.load.image('atari2', 'assets/sprites/atari800xl.png'); + game.load.image('atari4', 'assets/sprites/atari800.png'); + game.load.image('sonic', 'assets/sprites/sonic_havok_sanity.png'); + game.load.image('duck', 'assets/sprites/darkwing_crazy.png'); + game.load.image('firstaid', 'assets/sprites/firstaid.png'); + game.load.image('diamond', 'assets/sprites/diamond.png'); + game.load.image('mushroom', 'assets/sprites/mushroom2.png'); + +} + +function create() { + + // This returns an array of all the image keys in the cache + var images = game.cache.getImageKeys(); + + // Now let's create some random sprites and enable them all for drag and 'bring to top' + for (var i = 0; i < 20; i++) + { + var img = game.rnd.pick(images); + var tempSprite = game.add.sprite(game.world.randomX, game.world.randomY, img); + tempSprite.inputEnabled = true; + tempSprite.input.enableDrag(false, true); + } + +} + +function render() { + game.debug.renderInputInfo(32, 32); +} diff --git a/examples/loader/pick images from cache.php b/examples/loader/pick images from cache.php deleted file mode 100644 index 732ed414..00000000 --- a/examples/loader/pick images from cache.php +++ /dev/null @@ -1,50 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/loader/preloadSprite.php b/examples/loader/preloadSprite.php deleted file mode 100644 index 0b22a34e..00000000 --- a/examples/loader/preloadSprite.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/loader/spritesheet loading.php b/examples/loader/spritesheet loading.php deleted file mode 100644 index 2338df05..00000000 --- a/examples/loader/spritesheet loading.php +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/examples/misc/net.js b/examples/misc/net.js new file mode 100644 index 00000000..5110a88f --- /dev/null +++ b/examples/misc/net.js @@ -0,0 +1,17 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { render: render }); + +function render () { + + game.debug.renderText('Host Name:'+game.net.getHostName(),game.world.centerX-300,20); + game.debug.renderText('Host Name contains 192:'+game.net.checkDomainName('192'),game.world.centerX-300,40); + game.debug.renderText('Host Name contains google.com:'+game.net.checkDomainName('google.com'),game.world.centerX-300,60); + + // Add some values to the query string + game.debug.renderText('Query string with new values : '+game.net.updateQueryString('atari', '520'),game.world.centerX-400,80); + game.debug.renderText('Query string with new values : '+game.net.updateQueryString('amiga', '1200'),game.world.centerX-400,100); + + console.log('Query String: '+game.net.getQueryString(),game.world.centerX-300,140); + console.log('Query String Param: '+game.net.getQueryString('atari'),game.world.centerX-300,160); + +} diff --git a/examples/misc/net.php b/examples/misc/net.php deleted file mode 100644 index 2d9c2ee3..00000000 --- a/examples/misc/net.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - -Reload with query string - - - diff --git a/examples/misc/random generators.js b/examples/misc/random generators.js new file mode 100644 index 00000000..7e1a6c0d --- /dev/null +++ b/examples/misc/random generators.js @@ -0,0 +1,15 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', {create: create }); + +function create() { + + game.stage.backgroundColor = '#454645'; + + var style = { font: "14px Arial", fill: "#ff0044", align: "center" }; + + game.add.text(10, 20, game.rnd.integer()); + game.add.text(10, 40, game.rnd.frac()); + game.add.text(10, 60, game.rnd.real()); + game.add.text(10, 80, game.rnd.integerInRange(100, 200)); + +} diff --git a/examples/misc/random generators.php b/examples/misc/random generators.php deleted file mode 100644 index ac755537..00000000 --- a/examples/misc/random generators.php +++ /dev/null @@ -1,32 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/misc/repeatable random numbers.js b/examples/misc/repeatable random numbers.js new file mode 100644 index 00000000..f97168c1 --- /dev/null +++ b/examples/misc/repeatable random numbers.js @@ -0,0 +1,35 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create, update: update, render: render }); + +function create() { + + game.rnd.sow([123]); + console.log('A'); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + + game.rnd.sow([0]); + console.log('B'); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + + game.rnd.sow([123]); + console.log('C'); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); + console.log(game.rnd.integer()); +} + +function update() { +} + +function render() { +} diff --git a/examples/misc/rnd.php b/examples/misc/rnd.php deleted file mode 100644 index 55f2c30c..00000000 --- a/examples/misc/rnd.php +++ /dev/null @@ -1,47 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/click burst.js b/examples/particles/click burst.js new file mode 100644 index 00000000..955dfdd2 --- /dev/null +++ b/examples/particles/click burst.js @@ -0,0 +1,37 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +var emitter; + +function preload() { + + game.load.image('diamond', 'assets/sprites/diamond.png'); + +} + +function create() { + + game.stage.backgroundColor = 0x337799; + + emitter = game.add.emitter(0, 0, 200); + + emitter.makeParticles('diamond'); + emitter.gravity = 10; + + game.input.onDown.add(particleBurst, this); + +} + +function particleBurst() { + + // Position the emitter where the mouse/touch event was + emitter.x = game.input.x; + emitter.y = game.input.y; + + // The first parameter sets the effect to "explode" which means all particles are emitted at once + // The second gives each particle a 2000ms lifespan + // The third is ignored when using burst/explode mode + // The final parameter (10) is how many particles will be emitted in this single burst + emitter.start(true, 2000, null, 10); + +} diff --git a/examples/particles/click burst.php b/examples/particles/click burst.php deleted file mode 100644 index 41b77b42..00000000 --- a/examples/particles/click burst.php +++ /dev/null @@ -1,49 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/collision.js b/examples/particles/collision.js new file mode 100644 index 00000000..a2dab06a --- /dev/null +++ b/examples/particles/collision.js @@ -0,0 +1,33 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update }); + +var emitter; + +function preload() { + + game.load.spritesheet('veggies', 'assets/sprites/fruitnveg32wh37.png', 32, 32); + +} + +function create() { + + emitter = game.add.emitter(game.world.centerX, game.world.centerY, 250); + + emitter.makeParticles('veggies', [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20], 200, true, true); + + emitter.minParticleSpeed.setTo(-200, -300); + emitter.maxParticleSpeed.setTo(200, -400); + emitter.gravity = 8; + emitter.bounce.setTo(0.5, 0.5); + emitter.particleDrag.x = 10; + emitter.angularDrag = 30; + + emitter.start(false, 8000, 400); + +} + +function update() { + + game.physics.collide(emitter, emitter); + +} diff --git a/examples/particles/collision.php b/examples/particles/collision.php deleted file mode 100644 index eabe9ada..00000000 --- a/examples/particles/collision.php +++ /dev/null @@ -1,48 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/diamond burst.js b/examples/particles/diamond burst.js new file mode 100644 index 00000000..b0dc9882 --- /dev/null +++ b/examples/particles/diamond burst.js @@ -0,0 +1,22 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +var p; + +function preload() { + + game.load.image('diamond', 'assets/sprites/diamond.png'); + +} + +function create() { + + game.stage.backgroundColor = '#337799'; + + p = game.add.emitter(game.world.centerX, 200, 200); + + p.makeParticles('diamond'); + + p.start(false, 5000, 20); + +} diff --git a/examples/particles/diamond burst.php b/examples/particles/diamond burst.php deleted file mode 100644 index 17693982..00000000 --- a/examples/particles/diamond burst.php +++ /dev/null @@ -1,77 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/no rotation.js b/examples/particles/no rotation.js new file mode 100644 index 00000000..b99368a6 --- /dev/null +++ b/examples/particles/no rotation.js @@ -0,0 +1,25 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('alien', 'assets/sprites/space-baddie.png'); + +} + +function create() { + + var emitter = game.add.emitter(game.world.centerX, game.world.centerY, 250); + + emitter.makeParticles('alien'); + + emitter.minParticleSpeed.setTo(-300, -300); + emitter.maxParticleSpeed.setTo(300, 300); + + // By setting the min and max rotation to zero, you disable rotation on the particles fully + emitter.minRotation = 0; + emitter.maxRotation = 0; + + emitter.start(false, 4000, 15); + +} diff --git a/examples/particles/no rotation.php b/examples/particles/no rotation.php deleted file mode 100644 index 4960c2c2..00000000 --- a/examples/particles/no rotation.php +++ /dev/null @@ -1,40 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/random sprite.js b/examples/particles/random sprite.js new file mode 100644 index 00000000..0c566635 --- /dev/null +++ b/examples/particles/random sprite.js @@ -0,0 +1,25 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +var emitter; + +function preload() { + + game.load.image('carrot', 'assets/sprites/carrot.png'); + game.load.image('star', 'assets/misc/star_particle.png'); + game.load.image('diamond', 'assets/sprites/diamond.png'); + +} + +function create() { + + game.stage.backgroundColor = 0x337799; + + emitter = game.add.emitter(game.world.centerX, 200, 200); + + // Here we're passing an array of image keys. It will pick one at random when emitting a new particle. + emitter.makeParticles(['diamond', 'carrot', 'star']); + + emitter.start(false, 5000, 20); + +} diff --git a/examples/particles/random sprite.php b/examples/particles/random sprite.php deleted file mode 100644 index de96a50f..00000000 --- a/examples/particles/random sprite.php +++ /dev/null @@ -1,46 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/when particles collide.js b/examples/particles/when particles collide.js new file mode 100644 index 00000000..55f49c25 --- /dev/null +++ b/examples/particles/when particles collide.js @@ -0,0 +1,36 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update }); + +var leftEmitter; +var rightEmitter; + +function preload() { + + game.load.image('ball1', 'assets/sprites/red_ball.png'); + game.load.image('ball2', 'assets/sprites/blue_ball.png'); + +} + +function create() { + + leftEmitter = game.add.emitter(50, game.world.centerY - 200); + leftEmitter.bounce.setTo(0.5, 0.5); + leftEmitter.setXSpeed(100, 200); + leftEmitter.setYSpeed(-50, 50); + leftEmitter.makeParticles('ball1', 0, 250, 1, true); + + rightEmitter = game.add.emitter(game.world.width - 50, game.world.centerY - 200); + rightEmitter.bounce.setTo(0.5, 0.5); + rightEmitter.setXSpeed(-100, -200); + rightEmitter.setYSpeed(-50, 50); + rightEmitter.makeParticles('ball2', 0, 250, 1, true); + + // explode, lifespan, frequency, quantity + leftEmitter.start(false, 5000, 20); + rightEmitter.start(false, 5000, 20); + +} + +function update() { + game.physics.collide(leftEmitter, rightEmitter); +} diff --git a/examples/particles/when particles collide.php b/examples/particles/when particles collide.php deleted file mode 100644 index 78e17cbe..00000000 --- a/examples/particles/when particles collide.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/particles/zero gravity.js b/examples/particles/zero gravity.js new file mode 100644 index 00000000..ac12c842 --- /dev/null +++ b/examples/particles/zero gravity.js @@ -0,0 +1,21 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.spritesheet('balls', 'assets/sprites/balls.png', 17, 17); + +} + +function create() { + + var emitter = game.add.emitter(game.world.centerX, game.world.centerY, 250); + + emitter.makeParticles('balls', [0, 1, 2, 3, 4, 5]); + + emitter.minParticleSpeed.setTo(-400, -400); + emitter.maxParticleSpeed.setTo(400, 400); + emitter.gravity = 0; + emitter.start(false, 4000, 15); + +} diff --git a/examples/particles/zero gravity.php b/examples/particles/zero gravity.php deleted file mode 100644 index 72bf3b16..00000000 --- a/examples/particles/zero gravity.php +++ /dev/null @@ -1,36 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/js.php b/examples/phaser-debug-js.php similarity index 100% rename from examples/js.php rename to examples/phaser-debug-js.php diff --git a/examples/phaser-mobile.css b/examples/phaser-mobile.css deleted file mode 100644 index 8d6a8eaa..00000000 --- a/examples/phaser-mobile.css +++ /dev/null @@ -1,22 +0,0 @@ -body -{ - background: #000000; - color: white; - font: 1em/2em Arial, Helvetica; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - padding: 0; -} - -* { - user-select: none; - -webkit-tap-highlight-color: rgb(0, 0, 0, 0); - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; -} diff --git a/examples/phaser.css b/examples/phaser.css deleted file mode 100644 index 26ec25a0..00000000 --- a/examples/phaser.css +++ /dev/null @@ -1,209 +0,0 @@ -body -{ - background: url(assets/suite/background.png); - color: white; - font: 1em/2em Arial, Helvetica; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - padding: 16px; -} - -* { - user-select: none; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; -} - -#links { - padding: 16px; -} - -:-webkit-full-screen { - width: 100%; - height: 100%; -} - -h1 { - font-family: 'Arial', sans-serif; - font-size: 30pt; - margin: 0; - padding: 16px; - text-shadow: 0px 4px 3px rgba(0,0,0,0.4), 0px 8px 13px rgba(0,0,0,0.1), 0px 18px 23px rgba(0,0,0,0.1); -} - -h2 { - font-family: 'Arial', sans-serif; - font-size: 20pt; - margin: 16px 0px 16px 0px; - text-shadow: 0px 4px 3px rgba(0,0,0,0.4), 0px 8px 13px rgba(0,0,0,0.1), 0px 18px 23px rgba(0,0,0,0.1); -} - -h3 { - font-family: 'Arial', sans-serif; - font-size: 30px; - margin: 16px 0px 16px 16px; - text-shadow: 0px 4px 3px rgba(0,0,0,0.4), 0px 8px 13px rgba(0,0,0,0.1), 0px 18px 23px rgba(0,0,0,0.1); -} - -a { - color: yellow; - text-decoration: none; -} - -a:Hover { - color: #ffffff; -} - -.button -{ - display: inline-block; - white-space: nowrap; - background-color: #ccc; - border: 1px solid #777; - padding: 0 1.5em; - margin: 0.5em; - font: bold 1em/2em Arial, Helvetica; - text-decoration: none; - color: #333; - text-shadow: 0 1px 0 rgba(255, 255, 255, .8); - -moz-border-radius: .2em; - -webkit-border-radius: .2em; - border-radius: .2em; - -moz-box-shadow: 0 0 1px 1px rgba(255, 255, 255, .8) inset, 0 1px 0 rgba(0, 0, 0, .3); - -webkit-box-shadow: 0 0 1px 1px rgba(255, 255, 255, .8) inset, 0 1px 0 rgba(0, 0, 0, .3); - box-shadow: 0 0 1px 1px rgba(255, 255, 255, .8) inset, 0 1px 0 rgba(0, 0, 0, .3); - background-image: linear-gradient(top, #eee, #ccc); -} - -.button:hover -{ - background-color: #ddd; - background-image: linear-gradient(top, #fafafa, #ddd); -} - -.button:active -{ - -moz-box-shadow: 0 0 4px 2px rgba(0,0,0,.3) inset; - -webkit-box-shadow: 0 0 4px 2px rgba(0,0,0,.3) inset; - box-shadow: 0 0 4px 2px rgba(0,0,0,.3) inset; - position: relative; - top: 1px; -} - -.button:focus -{ - outline: 0; - background: #fafafa; -} - -.button:before -{ - background: #ccc; - background: rgba(0,0,0,.1); - float: left; - width: 1em; - text-align: center; - font-size: 1.5em; - margin: 0 1em 0 -1em; - padding: 0 .2em; - -moz-box-shadow: 1px 0 0 rgba(0,0,0,.5), 2px 0 0 rgba(255,255,255,.5); - -webkit-box-shadow: 1px 0 0 rgba(0,0,0,.5), 2px 0 0 rgba(255,255,255,.5); - box-shadow: 1px 0 0 rgba(0,0,0,.5), 2px 0 0 rgba(255,255,255,.5); - -moz-border-radius: .15em 0 0 .15em; - -webkit-border-radius: .15em 0 0 .15em; - border-radius: .15em 0 0 .15em; - pointer-events: none; -} - -/* Hexadecimal entities for the icons */ - -.add:before -{ - content: "\271A"; -} - -.edit:before -{ - content: "\270E"; -} - -.delete:before -{ - content: "\2718"; -} - -.save:before -{ - content: "\2714"; -} - -.email:before -{ - content: "\2709"; -} - -.like:before -{ - content: "\2764"; -} - -.next:before -{ - content: "\279C"; -} - -.star:before -{ - content: "\2605"; -} - -.spark:before -{ - content: "\2737"; -} - -.play:before -{ - content: "\25B6"; -} - -/* Buttons and inputs */ -button.button, input.button -{ - cursor: pointer; - overflow: visible; /* removes extra side spacing in IE */ -} - -/* removes extra inner spacing in Firefox */ -button::-moz-focus-inner -{ - border: 0; - padding: 0; -} - -/* If line-height can't be modified, then fix Firefox spacing with padding */ - input::-moz-focus-inner -{ - padding: .4em; -} - -/* The disabled styles */ -.button[disabled], .button[disabled]:hover, .button.disabled, .button.disabled:hover -{ - background: #eee; - color: #aaa; - border-color: #aaa; - cursor: default; - text-shadow: none; - position: static; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} diff --git a/examples/physics/accelerate to pointer.js b/examples/physics/accelerate to pointer.js new file mode 100644 index 00000000..fd7a8493 --- /dev/null +++ b/examples/physics/accelerate to pointer.js @@ -0,0 +1,29 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('arrow', 'assets/sprites/arrow.png'); +} + +var sprite; + +function create() { + + game.stage.backgroundColor = '#0072bc'; + + sprite = game.add.sprite(400, 300, 'arrow'); + sprite.anchor.setTo(0.5, 0.5); + +} + +function update() { + + sprite.rotation = game.physics.accelerateToPointer(sprite, this.game.input.activePointer, 500, 500, 500); + +} + +function render() { + + game.debug.renderSpriteInfo(sprite, 32, 32); + +} diff --git a/examples/physics/accelerate to pointer.php b/examples/physics/accelerate to pointer.php deleted file mode 100644 index 1ad9ecdc..00000000 --- a/examples/physics/accelerate to pointer.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/angle between.js b/examples/physics/angle between.js new file mode 100644 index 00000000..84b80969 --- /dev/null +++ b/examples/physics/angle between.js @@ -0,0 +1,39 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.image('arrow', 'assets/sprites/longarrow.png'); + game.load.image('ball', 'assets/sprites/pangball.png'); + +} + +var arrow; +var target; + +function create() { + + game.stage.backgroundColor = '#0072bc'; + + arrow = game.add.sprite(200, 250, 'arrow'); + arrow.anchor.setTo(0.1, 0.5); + + target = game.add.sprite(600, 400, 'ball'); + target.anchor.setTo(0.5, 0.5); + target.inputEnabled = true; + target.input.enableDrag(true); + +} + +function update() { + + arrow.rotation = game.physics.angleBetween(arrow, target); + +} + +function render() { + + game.debug.renderText("Drag the ball", 32, 32); + game.debug.renderSpriteInfo(arrow, 32, 100); + +} diff --git a/examples/physics/angle between.php b/examples/physics/angle between.php deleted file mode 100644 index 8794d7a9..00000000 --- a/examples/physics/angle between.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/angle to pointer.js b/examples/physics/angle to pointer.js new file mode 100644 index 00000000..0c8ff2ec --- /dev/null +++ b/examples/physics/angle to pointer.js @@ -0,0 +1,31 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('arrow', 'assets/sprites/arrow.png'); +} + +var sprite; + +function create() { + + game.stage.backgroundColor = '#0072bc'; + + sprite = game.add.sprite(400, 300, 'arrow'); + sprite.anchor.setTo(0.5, 0.5); + +} + +function update() { + + // This will update the sprite.rotation so that it points to the currently active pointer + // On a Desktop that is the mouse, on mobile the most recent finger press. + sprite.rotation = game.physics.angleToPointer(sprite); + +} + +function render() { + + game.debug.renderSpriteInfo(sprite, 32, 32); + +} diff --git a/examples/physics/angle to pointer.php b/examples/physics/angle to pointer.php deleted file mode 100644 index 0977ac8b..00000000 --- a/examples/physics/angle to pointer.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/angular acceleration.js b/examples/physics/angular acceleration.js new file mode 100644 index 00000000..4186548c --- /dev/null +++ b/examples/physics/angular acceleration.js @@ -0,0 +1,50 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('arrow', 'assets/sprites/arrow.png'); +} + +var sprite; + +function create() { + + game.stage.backgroundColor = '#0072bc'; + + sprite = game.add.sprite(400, 300, 'arrow'); + sprite.anchor.setTo(0.5, 0.5); + + // We'll set a lower max angular velocity here to keep it from going totally nuts + sprite.body.maxAngular = 500; + + // Apply a drag otherwise the sprite will just spin and never slow down + sprite.body.angularDrag = 50; + +} + +function update() { + + // Reset the acceleration + sprite.body.angularAcceleration = 0; + + // Apply acceleration if the left/right arrow keys are held down + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + sprite.body.angularAcceleration -= 200; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + sprite.body.angularAcceleration += 200; + } + +} + +function render() { + + game.debug.renderSpriteInfo(sprite, 32, 32); + game.debug.renderText('angularVelocity: ' + sprite.body.angularVelocity, 32, 200); + game.debug.renderText('angularAcceleration: ' + sprite.body.angularAcceleration, 32, 232); + game.debug.renderText('angularDrag: ' + sprite.body.angularDrag, 32, 264); + game.debug.renderText('deltaZ: ' + sprite.body.deltaZ(), 32, 296); + +} diff --git a/examples/physics/angular acceleration.php b/examples/physics/angular acceleration.php deleted file mode 100644 index 2e28e123..00000000 --- a/examples/physics/angular acceleration.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/angular velocity.js b/examples/physics/angular velocity.js new file mode 100644 index 00000000..7c3bf6b3 --- /dev/null +++ b/examples/physics/angular velocity.js @@ -0,0 +1,49 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('arrow', 'assets/sprites/arrow.png'); +} + +var sprite; + +function create() { + + game.stage.backgroundColor = '#0072bc'; + + sprite = game.add.sprite(400, 300, 'arrow'); + sprite.anchor.setTo(0.5, 0.5); + +} + +function update() { + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + sprite.body.angularVelocity = 0; + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + sprite.body.angularVelocity = -200; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + sprite.body.angularVelocity = 200; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + game.physics.velocityFromAngle(sprite.angle, 300, sprite.body.velocity); + } + +} + +function render() { + + game.debug.renderSpriteInfo(sprite, 32, 32); + game.debug.renderText('angularVelocity: ' + sprite.body.angularVelocity, 32, 200); + game.debug.renderText('angularAcceleration: ' + sprite.body.angularAcceleration, 32, 232); + game.debug.renderText('angularDrag: ' + sprite.body.angularDrag, 32, 264); + game.debug.renderText('deltaZ: ' + sprite.body.deltaZ(), 32, 296); + +} diff --git a/examples/physics/angular velocity.php b/examples/physics/angular velocity.php deleted file mode 100644 index 5877517b..00000000 --- a/examples/physics/angular velocity.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/mass velocity test.js b/examples/physics/mass velocity test.js new file mode 100644 index 00000000..400716d9 --- /dev/null +++ b/examples/physics/mass velocity test.js @@ -0,0 +1,63 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.image('car', 'assets/sprites/car90.png'); + game.load.image('baddie', 'assets/sprites/space-baddie.png'); + +} + +var car; +var aliens; + +function create() { + + aliens = game.add.group(); + + for (var i = 0; i < 50; i++) + { + var s = aliens.create(game.world.randomX, game.world.randomY, 'baddie'); + s.name = 'alien' + s; + s.body.collideWorldBounds = true; + s.body.bounce.setTo(0.8, 0.8); + s.body.velocity.setTo(10 + Math.random() * 40, 10 + Math.random() * 40); + } + + car = game.add.sprite(400, 300, 'car'); + car.anchor.setTo(0.5, 0.5); + car.body.collideWorldBounds = true; + car.body.bounce.setTo(0.8, 0.8); + car.body.allowRotation = true; + +} + +function update() { + + car.body.velocity.x = 0; + car.body.velocity.y = 0; + car.body.angularVelocity = 0; + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + car.body.angularVelocity = -200; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + car.body.angularVelocity = 200; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + car.body.velocity.copyFrom(game.physics.velocityFromAngle(car.angle, 300)); + } + + game.physics.collide(car, aliens); + +} + +function render() { + + game.debug.renderSpriteInfo(car, 32, 32); + +} diff --git a/examples/physics/mass velocity test.php b/examples/physics/mass velocity test.php deleted file mode 100644 index 9707a9d4..00000000 --- a/examples/physics/mass velocity test.php +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - diff --git a/examples/physics/move towards object.js b/examples/physics/move towards object.js new file mode 100644 index 00000000..94b5fde3 --- /dev/null +++ b/examples/physics/move towards object.js @@ -0,0 +1,37 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + + game.load.image('ball', 'assets/sprites/shinyball.png'); + +} + +var balls; + +function create() { + + balls = game.add.group(); + + for (var i = 0; i < 50; i++) + { + balls.create(game.world.randomX, game.world.randomY, 'ball'); + } + +} + +function update() { + + if (game.input.mousePointer.isDown) + { + // First is the callback + // Second is the context in which the callback runs, in this case game.physics + // Third is the parameter the callback expects - it is always sent the Group child as the first parameter + balls.forEach(game.physics.moveToPointer, game.physics, false, 200); + } + else + { + balls.setAll('body.velocity.x', 0); + balls.setAll('body.velocity.y', 0); + } +} diff --git a/examples/physics/move towards object.php b/examples/physics/move towards object.php deleted file mode 100644 index cc33d73e..00000000 --- a/examples/physics/move towards object.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/multi angle to pointer.js b/examples/physics/multi angle to pointer.js new file mode 100644 index 00000000..cddc8476 --- /dev/null +++ b/examples/physics/multi angle to pointer.js @@ -0,0 +1,41 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + game.load.image('arrow', 'assets/sprites/longarrow.png'); +} + +var sprite1; +var sprite2; +var sprite3; +var sprite4; + +function create() { + + game.stage.backgroundColor = '#363636'; + + sprite1 = game.add.sprite(150, 150, 'arrow'); + sprite1.anchor.setTo(0.1, 0.5); + + sprite2 = game.add.sprite(200, 500, 'arrow'); + sprite2.anchor.setTo(0.1, 0.5); + + sprite3 = game.add.sprite(400, 200, 'arrow'); + sprite3.anchor.setTo(0.1, 0.5); + + sprite4 = game.add.sprite(600, 400, 'arrow'); + sprite4.anchor.setTo(0.1, 0.5); + +} + +function update() { + + // This will update the sprite.rotation so that it points to the currently active pointer + // On a Desktop that is the mouse, on mobile the most recent finger press. + + sprite1.rotation = game.physics.angleToPointer(sprite1); + sprite2.rotation = game.physics.angleToPointer(sprite2); + sprite3.rotation = game.physics.angleToPointer(sprite3); + sprite4.rotation = game.physics.angleToPointer(sprite4); + +} diff --git a/examples/physics/multi angle to pointer.php b/examples/physics/multi angle to pointer.php deleted file mode 100644 index 45154c9e..00000000 --- a/examples/physics/multi angle to pointer.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/quadtree - collision infos.js b/examples/physics/quadtree - collision infos.js new file mode 100644 index 00000000..82325fca --- /dev/null +++ b/examples/physics/quadtree - collision infos.js @@ -0,0 +1,67 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('ship', 'assets/sprites/xenon2_ship.png'); + game.load.image('baddie', 'assets/sprites/space-baddie.png'); +} + +var ship; +var aliens; + +function create() { + + aliens = game.add.group(); + + for (var i = 0; i < 50; i++) + { + var s = aliens.create(game.world.randomX, game.world.randomY, 'baddie') + s.name = 'alien' + s; + s.body.collideWorldBounds = true; + s.body.bounce.setTo(1, 1); + s.body.velocity.setTo(10 + Math.random() * 40, 10 + Math.random() * 40); + } + + ship = game.add.sprite(400, 400, 'ship'); + ship.body.collideWorldBounds = true; + ship.body.bounce.setTo(1, 1); + +} + +function update() { + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + ship.body.velocity.x -= 2; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + ship.body.velocity.x += 2; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + ship.body.velocity.y -= 2; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + ship.body.velocity.y += 2; + } + + game.physics.collide(ship, aliens); + +} + +function render() { + + game.debug.renderQuadTree(game.physics.quadTree); + game.debug.renderRectangle(ship.body); + + // game.debug.renderText('total: ' + total.length, 32, 50); + + game.debug.renderText('up: ' + ship.body.touching.up, 32, 70); + game.debug.renderText('down: ' + ship.body.touching.down, 32, 90); + game.debug.renderText('left: ' + ship.body.touching.left, 32, 110); + game.debug.renderText('right: ' + ship.body.touching.right, 32, 130); + +} diff --git a/examples/physics/quadtree - ids.js b/examples/physics/quadtree - ids.js new file mode 100644 index 00000000..0ee1d373 --- /dev/null +++ b/examples/physics/quadtree - ids.js @@ -0,0 +1,90 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('ship', 'assets/sprites/xenon2_ship.png'); + game.load.image('baddie', 'assets/sprites/space-baddie.png'); +} + +var ship; +var total; +var aliens; + +function create() { + + game.world.setBounds(0,0,2000, 2000); + + aliens = []; + + for (var i = 0; i < 1000; i++) + { + var s = game.add.sprite(game.world.randomX, game.world.randomY, 'baddie'); + s.name = 'alien' + s; + s.body.collideWorldBounds = true; + s.body.bounce.setTo(1, 1); + s.body.velocity.setTo(10 + Math.random() * 10, 10 + Math.random() * 10); + aliens.push(s); + } + + ship = game.add.sprite(400, 400, 'ship'); + ship.body.collideWorldBounds = true; + ship.body.bounce.setTo(0.5, 0.5); + +} + +function update() { + + for (var i = 0; i < aliens.length; i++) + { + aliens[i].alpha = 0.3; + } + + total = game.physics.quadTree.retrieve(ship); + + // Get the ships top-most ID. If the length of that ID is 1 then we can ignore every other result, + // it's simply not colliding with anything :) + + for (var i = 0; i < total.length; i++) + { + total[i].sprite.alpha = 1; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + ship.body.velocity.x -= 2; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + ship.body.velocity.x += 2; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + ship.body.velocity.y -= 2; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + ship.body.velocity.y += 2; + } + +} + +function render() { + + for (var i = 0; i < aliens.length; i++) + { + // game.debug.renderRectangle(aliens[i].bounds); + } + + game.debug.renderText(total.length, 32, 32); + game.debug.renderQuadTree(game.physics.quadTree); + // game.debug.renderRectangle(ship); + + game.debug.renderText('Index: ' + ship.body.quadTreeIndex, 32, 80); + + for (var i = 0; i < ship.body.quadTreeIDs.length; i++) + { + game.debug.renderText('ID: ' + ship.body.quadTreeIDs[i], 32, 100 + (i * 20)); + } + +} diff --git a/examples/physics/shoot the pointer.js b/examples/physics/shoot the pointer.js new file mode 100644 index 00000000..0cd41985 --- /dev/null +++ b/examples/physics/shoot the pointer.js @@ -0,0 +1,63 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.image('arrow', 'assets/sprites/arrow.png'); + game.load.image('bullet', 'assets/sprites/purple_ball.png'); + +} + +var sprite; +var bullets; + +var fireRate = 100; +var nextFire = 0; + +function create() { + + game.stage.backgroundColor = '#313131'; + + bullets = game.add.group(); + bullets.createMultiple(50, 'bullet'); + bullets.setAll('anchor.x', 0.5); + bullets.setAll('anchor.y', 0.5); + bullets.setAll('outOfBoundsKill', true); + + sprite = game.add.sprite(400, 300, 'arrow'); + sprite.anchor.setTo(0.5, 0.5); + +} + +function update() { + + sprite.rotation = game.physics.angleToPointer(sprite); + + if (game.input.activePointer.isDown) + { + fire(); + } + +} + +function fire() { + + if (game.time.now > nextFire && bullets.countDead() > 0) + { + nextFire = game.time.now + fireRate; + + var bullet = bullets.getFirstDead(); + + bullet.reset(sprite.x, sprite.y); + + bullet.rotation = game.physics.moveToPointer(bullet, 300); + } + +} + +function render() { + + game.debug.renderText('Active Bullets: ' + bullets.countLiving() + ' / ' + bullets.total, 32, 32); + game.debug.renderSpriteInfo(sprite, 32, 450); + +} diff --git a/examples/physics/shoot the pointer.php b/examples/physics/shoot the pointer.php deleted file mode 100644 index f2374faa..00000000 --- a/examples/physics/shoot the pointer.php +++ /dev/null @@ -1,75 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/physics/sprite bounds.js b/examples/physics/sprite bounds.js new file mode 100644 index 00000000..9cc744fc --- /dev/null +++ b/examples/physics/sprite bounds.js @@ -0,0 +1,46 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('fuji', 'assets/pics/atari_fujilogo.png'); +} + +var fuji; +var b; + +function create() { + + game.stage.backgroundColor = 'rgb(0,0,100)'; + + fuji = game.add.sprite(game.world.centerX, game.world.centerY, 'fuji'); + fuji.anchor.setTo(0, 0.5); + // fuji.angle = 34; + + b = new Phaser.Rectangle(fuji.center.x, fuji.center.y, fuji.width, fuji.height); + + //Remember that the sprite is rotating around its anchor + game.add.tween(fuji).to({ angle: 360 }, 20000, Phaser.Easing.Linear.None, true, 0, true); + +} + +function update() { + + if (game.input.activePointer.justPressed()) + { + fuji.centerOn(game.input.x, game.input.y); + } + + b.x = fuji.center.x - fuji.halfWidth; + b.y = fuji.center.y - fuji.halfHeight; + +} + +function render() { + + //Phaser.DebugUtils.renderSpriteWorldViewBounds(fuji); + //Phaser.DebugUtils.renderSpriteBounds(fuji); + game.debug.renderSpriteCorners(fuji); + //Phaser.DebugUtils.renderSpriteWorldView(fuji, 32, 32); + game.debug.renderRectangle(b, 'rgba(0,20,91,1)'); + +} diff --git a/examples/physics/sprite bounds.php b/examples/physics/sprite bounds.php deleted file mode 100644 index 20dafc70..00000000 --- a/examples/physics/sprite bounds.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - diff --git a/examples/quadtree/quadtree - collision infos.php b/examples/quadtree/quadtree - collision infos.php deleted file mode 100644 index b83d1250..00000000 --- a/examples/quadtree/quadtree - collision infos.php +++ /dev/null @@ -1,83 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/quadtree/quadtree - ids.php b/examples/quadtree/quadtree - ids.php deleted file mode 100644 index ddb3c76f..00000000 --- a/examples/quadtree/quadtree - ids.php +++ /dev/null @@ -1,106 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/add a sprite.js b/examples/sprites/add a sprite.js new file mode 100644 index 00000000..142af540 --- /dev/null +++ b/examples/sprites/add a sprite.js @@ -0,0 +1,15 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('mushroom', 'assets/sprites/mushroom2.png'); + +} + +function create() { + + // This simply creates a sprite using the mushroom image we loaded above and positions it at 200 x 200 + var test = game.add.sprite(200, 200, 'mushroom'); + +} diff --git a/examples/sprites/add a sprite.php b/examples/sprites/add a sprite.php deleted file mode 100644 index cb889eb7..00000000 --- a/examples/sprites/add a sprite.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/add several sprites.js b/examples/sprites/add several sprites.js new file mode 100644 index 00000000..685e83f9 --- /dev/null +++ b/examples/sprites/add several sprites.js @@ -0,0 +1,49 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +var timer = 0; +var total = 0; + +function preload() { + + // 37x45 is the size of each frame + // There are 18 frames in the PNG - you can leave this value blank if the frames fill up the entire PNG, but in this case there are some + // blank frames at the end, so we tell the loader how many to load + game.load.spritesheet('mummy', 'assets/sprites/metalslug_mummy37x45.png', 37, 45, 18); + +} + +function create() { + + releaseMummy(); + +} + +function releaseMummy() { + + var mummy = game.add.sprite(-(Math.random() * 800), game.world.randomY, 'mummy'); + + mummy.scale.setTo(2, 2); + + // If you prefer to work in degrees rather than radians then you can use Phaser.Sprite.angle + // otherwise use Phaser.Sprite.rotation + mummy.angle = game.rnd.angle(); + + mummy.animations.add('walk'); + mummy.animations.play('walk', 20, true); + + game.add.tween(mummy).to({ x: game.width + (1600 + mummy.x) }, 20000, Phaser.Easing.Linear.None, true); + + total++; + timer = game.time.now + 100; + +} + +function update() { + + if (total < 200 && game.time.now > timer) + { + releaseMummy(); + } + +} diff --git a/examples/sprites/add several sprites.php b/examples/sprites/add several sprites.php deleted file mode 100644 index 1263b99d..00000000 --- a/examples/sprites/add several sprites.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/collide world bounds.js b/examples/sprites/collide world bounds.js new file mode 100644 index 00000000..48b10333 --- /dev/null +++ b/examples/sprites/collide world bounds.js @@ -0,0 +1,26 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + game.load.image('pineapple', 'assets/sprites/pineapple.png'); + +} + +var pineapples; + +function create() { + + pineapples = game.add.group(); + + for (var i = 0; i < 10; i++) + { + var pineapple = pineapples.create(200 + i * 48,50, 'pineapple'); + + //This allows your sprite to collide with the world bounds like they were rigid objects + pineapple.body.collideWorldBounds=true; + pineapple.body.gravity.x = game.rnd.integerInRange(-5,5); + pineapple.body.gravity.y = 5 + Math.random() * 10; + pineapple.body.bounce.setTo(0.7,0.4); + } + +} diff --git a/examples/sprites/collide world bounds.php b/examples/sprites/collide world bounds.php deleted file mode 100644 index 35dbf284..00000000 --- a/examples/sprites/collide world bounds.php +++ /dev/null @@ -1,40 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/destroy.js b/examples/sprites/destroy.js new file mode 100644 index 00000000..38d65a18 --- /dev/null +++ b/examples/sprites/destroy.js @@ -0,0 +1,31 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('plane', 'assets/misc/boss1.png'); + game.load.image('sky', 'assets/tests/sky-2x.png'); + +} + +function create() { + + game.add.sprite(0, 0, 'sky'); + + for (var i = 0; i < 15; i++) + { + var sprite = game.add.sprite(game.world.randomX, game.world.randomY, 'plane'); + + sprite.inputEnabled = true; + + sprite.input.useHandCursor = true; + + sprite.events.onInputDown.add(destoyIt, this); + } + +} + +function destoyIt (sprite) { + + sprite.destroy(); +} diff --git a/examples/sprites/destroy.php b/examples/sprites/destroy.php deleted file mode 100644 index 2a611f91..00000000 --- a/examples/sprites/destroy.php +++ /dev/null @@ -1,39 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/dynamic crop.js b/examples/sprites/dynamic crop.js new file mode 100644 index 00000000..7707aedc --- /dev/null +++ b/examples/sprites/dynamic crop.js @@ -0,0 +1,29 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + game.load.image('trsi', 'assets/pics/trsipic1_lazur.jpg'); +} + +var r; +var pic; + +function create() { + + pic = game.add.sprite(0, 0, 'trsi'); + + r = new Phaser.Rectangle(0, 0, 200, 200); + +} + +function update() { + + r.x = game.input.x; + r.y = game.input.y; + pic.x = game.input.x; + pic.y = game.input.y; + + // Apply the new crop Rectangle to the sprite + pic.crop = r; + +} diff --git a/examples/sprites/sprite extended 2.php b/examples/sprites/extending sprite object demo 2.js similarity index 62% rename from examples/sprites/sprite extended 2.php rename to examples/sprites/extending sprite object demo 2.js index b750c049..20a2583f 100644 --- a/examples/sprites/sprite extended 2.php +++ b/examples/sprites/extending sprite object demo 2.js @@ -1,9 +1,3 @@ - - - - - \ No newline at end of file +} diff --git a/examples/sprites/extending sprite object.js b/examples/sprites/extending sprite object.js new file mode 100644 index 00000000..2d0da102 --- /dev/null +++ b/examples/sprites/extending sprite object.js @@ -0,0 +1,42 @@ + +// Here is a custom game object +MonsterBunny = function (game, x, y, rotateSpeed) { + + Phaser.Sprite.call(this, game, x, y, 'bunny'); + + this.rotateSpeed = rotateSpeed; + +}; + +MonsterBunny.prototype = Object.create(Phaser.Sprite.prototype); +MonsterBunny.prototype.constructor = MonsterBunny; + +/** + * Automatically called by World.update + */ +MonsterBunny.prototype.update = function() { + + this.angle += this.rotateSpeed; + +}; + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('bunny', 'assets/sprites/bunny.png'); + +} + +function create() { + + var wabbit = new MonsterBunny(game, 200, 300, 1); + wabbit.anchor.setTo(0.5, 0.5); + + var wabbit2 = new MonsterBunny(game, 600, 300, 0.5); + wabbit2.anchor.setTo(0.5, 0.5); + + game.add.existing(wabbit); + game.add.existing(wabbit2); + +} diff --git a/examples/sprites/horizontal crop.js b/examples/sprites/horizontal crop.js new file mode 100644 index 00000000..74dcdd02 --- /dev/null +++ b/examples/sprites/horizontal crop.js @@ -0,0 +1,27 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + game.load.image('trsi', 'assets/pics/trsipic1_lazur.jpg'); +} + +var r; +var pic; + +function create() { + + pic = game.add.sprite(game.world.centerX, 550, 'trsi'); + pic.anchor.setTo(0.5, 1); + + r = new Phaser.Rectangle(0, 0, 200, pic.height); + + game.add.tween(r).to( { x: pic.width - 200 }, 3000, Phaser.Easing.Bounce.Out, true, 0, 1000, true); + +} + +function update() { + + // Apply the new crop Rectangle to the sprite + pic.crop = r; + +} diff --git a/examples/sprites/move a sprite.js b/examples/sprites/move a sprite.js new file mode 100644 index 00000000..1d784c94 --- /dev/null +++ b/examples/sprites/move a sprite.js @@ -0,0 +1,48 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.atlasJSONHash('bot', 'assets/sprites/running_bot.png', 'assets/sprites/running_bot.json'); +} + +var s; + +function create() { + + s = game.add.sprite(game.world.centerX, game.world.centerY, 'bot'); + // s.anchor.setTo(0.5, 0.5); + s.scale.setTo(2, 2); + + s.animations.add('run'); + s.animations.play('run', 10, true); + +} + +function update() { + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + s.x -= 4; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + s.x += 4; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + s.y -= 4; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + s.y += 4; + } + +} + +function render() { + + game.debug.renderSpriteCorners(s, false, false); + game.debug.renderSpriteInfo(s, 20, 32); + +} diff --git a/examples/sprites/move a sprite.php b/examples/sprites/move a sprite.php deleted file mode 100644 index 13b8fceb..00000000 --- a/examples/sprites/move a sprite.php +++ /dev/null @@ -1,64 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/out of bounds.js b/examples/sprites/out of bounds.js new file mode 100644 index 00000000..94ffc31f --- /dev/null +++ b/examples/sprites/out of bounds.js @@ -0,0 +1,42 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('alien', 'assets/sprites/space-baddie.png'); + game.load.image('ship', 'assets/sprites/shmup-ship.png'); + +} + +var player; +var aliens; + +function create() { + + player = game.add.sprite(400, 500, 'ship'); + player.anchor.setTo(0.5, 0.5); + + aliens = game.add.group(); + + for (var y = 0; y < 4; y++) + { + for (var x = 0; x < 10; x++) + { + var alien = aliens.create(200 + x * 48, y * 50, 'alien'); + alien.name = 'alien' + x.toString() + y.toString(); + alien.events.onOutOfBounds.add(alienOut, this); + alien.body.velocity.y = 50 + Math.random() * 200; + } + } + +} + +function alienOut(alien) { + + // Move the alien to the top of the screen again + alien.reset(alien.x, -32); + + // And give it a new random velocity + alien.body.velocity.y = 50 + Math.random() * 200; + +} diff --git a/examples/sprites/outOfBounds.php b/examples/sprites/outOfBounds.php deleted file mode 100644 index 3f63d195..00000000 --- a/examples/sprites/outOfBounds.php +++ /dev/null @@ -1,54 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/scale a sprite.js b/examples/sprites/scale a sprite.js new file mode 100644 index 00000000..acf38dc2 --- /dev/null +++ b/examples/sprites/scale a sprite.js @@ -0,0 +1,29 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create}); + +function preload() { + + game.load.image('disk', 'assets/sprites/darkwing_crazy.png'); + +} + +function create() { + + for (var i = 0; i < 15; i++) + { + // Create 15 sprites at random x/y locations + var sprite = game.add.sprite(game.world.randomX, game.world.randomY, 'disk'); + + // Pick a random number between -2 and 6 + var rand = game.rnd.realInRange(-2, 6); + + // Set the scale of the sprite to the random value + sprite.scale.setTo(rand, rand); + + // You can also scale sprites like this: + // sprite.scale.x = value; + // sprite.scale.y = value; + + } + +} diff --git a/examples/sprites/scale a sprite.php b/examples/sprites/scale a sprite.php deleted file mode 100644 index ccfa8852..00000000 --- a/examples/sprites/scale a sprite.php +++ /dev/null @@ -1,33 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/shared sprite textures.js b/examples/sprites/shared sprite textures.js new file mode 100644 index 00000000..294d0f0d --- /dev/null +++ b/examples/sprites/shared sprite textures.js @@ -0,0 +1,41 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + // We load a TexturePacker JSON file and image and show you how to make several unique sprites from the same file + game.load.atlas('atlas', 'assets/pics/texturepacker_test.png', 'assets/pics/texturepacker_test.json'); + +} + +var chick; +var car; +var mech; +var robot; +var cop; + +function create() { + + game.stage.backgroundColor = '#404040'; + + chick = game.add.sprite(64, 64, 'atlas'); + + // You can set the frame based on the frame name (which TexturePacker usually sets to be the filename of the image itself) + chick.frameName = 'budbrain_chick.png'; + + // Or by setting the frame index + //chick.frame = 0; + + cop = game.add.sprite(600, 64, 'atlas'); + cop.frameName = 'ladycop.png'; + + robot = game.add.sprite(50, 300, 'atlas'); + robot.frameName = 'robot.png'; + + car = game.add.sprite(100, 400, 'atlas'); + car.frameName = 'supercars_parsec.png'; + + mech = game.add.sprite(250, 100, 'atlas'); + mech.frameName = 'titan_mech.png'; + +} diff --git a/examples/sprites/shared sprite textures.php b/examples/sprites/shared sprite textures.php deleted file mode 100644 index 0d8158da..00000000 --- a/examples/sprites/shared sprite textures.php +++ /dev/null @@ -1,59 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/sprite rotation.js b/examples/sprites/sprite rotation.js new file mode 100644 index 00000000..5ee44391 --- /dev/null +++ b/examples/sprites/sprite rotation.js @@ -0,0 +1,37 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + game.load.image('arrow', 'assets/sprites/arrow.png'); +} + +var sprite; + +function create() { + + game.stage.backgroundColor = '#0072bc'; + + sprite = game.add.sprite(400, 300, 'arrow'); + sprite.anchor.setTo(0.5, 0.5); + +} + +function update() { + + sprite.angle += 1; + + // Note: Due to a bug in Chrome the following doesn't work atm: + // sprite.angle++; + // See: https://code.google.com/p/chromium/issues/detail?id=306851 + +} + +function render() { + + game.debug.renderSpriteInfo(sprite, 32, 32); + game.debug.renderText('angularVelocity: ' + sprite.body.angularVelocity, 32, 200); + game.debug.renderText('angularAcceleration: ' + sprite.body.angularAcceleration, 32, 232); + game.debug.renderText('angularDrag: ' + sprite.body.angularDrag, 32, 264); + game.debug.renderText('deltaZ: ' + sprite.body.deltaZ(), 32, 296); + +} diff --git a/examples/sprites/sprite rotation.php b/examples/sprites/sprite rotation.php deleted file mode 100644 index 237da936..00000000 --- a/examples/sprites/sprite rotation.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/sprite_extend.php b/examples/sprites/sprite_extend.php deleted file mode 100644 index 9fe0fb26..00000000 --- a/examples/sprites/sprite_extend.php +++ /dev/null @@ -1,57 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/spritesheet.js b/examples/sprites/spritesheet.js new file mode 100644 index 00000000..6039a2f3 --- /dev/null +++ b/examples/sprites/spritesheet.js @@ -0,0 +1,37 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +var sprite; + +function preload() { + + // 37x45 is the size of each frame + // There are 18 frames in the PNG - you can leave this value blank if the frames fill up the entire PNG, but in this case there are some + // blank frames at the end, so we tell the loader how many to load + game.load.spritesheet('ms', 'assets/sprites/metalslug_mummy37x45.png', 37, 45, 18); + +} + +function create() { + + sprite = game.add.sprite(40, 100, 'ms'); + + sprite.animations.add('walk'); + + sprite.animations.play('walk', 50, true); + + game.add.tween(sprite).to({ x: game.width }, 10000, Phaser.Easing.Linear.None, true); + +} + +// update isn't called until 'create' has completed. If you need to process stuff before that point (i.e. while the preload is still happening) +// then create a function called loadUpdate() and use that +function update() { + + if (sprite.x >= 300) + { + sprite.scale.x += 0.01; + sprite.scale.y += 0.01; + } + +} diff --git a/examples/sprites/spritesheet.php b/examples/sprites/spritesheet.php deleted file mode 100644 index da79fd3f..00000000 --- a/examples/sprites/spritesheet.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/vertical crop.js b/examples/sprites/vertical crop.js new file mode 100644 index 00000000..83590cc1 --- /dev/null +++ b/examples/sprites/vertical crop.js @@ -0,0 +1,27 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + game.load.image('trsi', 'assets/pics/trsipic1_lazur.jpg'); +} + +var r; +var pic; + +function create() { + + pic = game.add.sprite(game.world.centerX, 550, 'trsi'); + pic.anchor.setTo(0.5, 1); + + r = new Phaser.Rectangle(0, 0, pic.width, 0); + + game.add.tween(r).to( { height: pic.height }, 3000, Phaser.Easing.Bounce.Out, true, 0, 1000, true); + +} + +function update() { + + // Apply the new crop Rectangle to the sprite + pic.crop = r; + +} diff --git a/examples/html/css/stylesheet.css b/examples/stylesheet.css similarity index 57% rename from examples/html/css/stylesheet.css rename to examples/stylesheet.css index d34dec2d..c205af54 100644 --- a/examples/html/css/stylesheet.css +++ b/examples/stylesheet.css @@ -8,37 +8,38 @@ blockquote, q {quotes: none;} blockquote:before, blockquote:after, q:before, q:after {content: ''; content: none;} table {border-collapse: collapse; border-spacing: 0;} /* reset css ends */ -@font-face{font-family: 'HelveticaBd'; src: url('../fonts/HelveticaNeueLTStd-Bd.otf');} +@font-face{font-family: 'HelveticaBd'; src: url('assets/html/HelveticaNeueLTStd-Bd.otf');} -body{margin:0;padding:0; overflow-x:hidden; font-family: 'HelveticaBd', Helvetica, Arial, Tahoma, Verdana !important; background: #e0e4f1;} +body { margin:0; padding:0; overflow-x: hidden; font-family: Arial, Tahoma, Verdana !important; background: #e0e4f1;} a{color:#fff; text-decoration: none;} a:hover{text-decoration: underline;} -.helvetica{font-family: 'HelveticaBd', Helvetica, Arial, Tahoma, Verdana !important;} -.header{background: #e0e4f1 url('../img/header-bg.jpg') no-repeat; width:100%; margin:0; padding:0; background-size: cover; height: 910px; display: block; clear:both; margin-bottom: -400px} +.helvetica{font-family: Arial, Tahoma, Verdana !important;} +.header{background: #e0e4f1 url('assets/html/header-bg2.jpg') no-repeat; width:100%; margin:0; padding:0; background-size: cover; height: 530px; display: block; clear:both; margin-bottom: -400px} .main-container{display: block; clear:both; width: 1125px; height: auto; margin:0 auto;} -ul.nav-links{margin:0;padding:0;display: inline-block; float: right; list-style-type: none; color: #fff; font-size: 15px; line-height: 2em; margin-top: 50px; min-width: 180px;} + +ul.nav-links{ margin:0; padding:0; display: inline-block; float: right; list-style-type: none; color: #fff; font-size: 15px; line-height: 2em; margin-top: 50px; min-width: 180px;} ul.nav-links > li{margin:0; padding:0; list-style-type: none; padding-left: 55px;} ul.nav-links > li > a{color: #fff; text-decoration: none;} ul.nav-links > li > a:hover{text-decoration: underline;} -.link-home, .link-latest, .link-forum, .link-docs, .link-twitter{background-image: url('../img/nav-icons.png'); background-repeat: no-repeat;} +.link-home, .link-latest, .link-forum, .link-docs, .link-twitter{background-image: url('assets/html/nav-icons.png'); background-repeat: no-repeat;} -.main-title{font-size:55px;color:#fff;text-shadow:0 0 15px #b643e6; text-align: center; display: block; text-transform: uppercase; margin: 40px auto 0 auto;} +.main-title{font-family: 'HelveticaBd', Helvetica, Arial;font-size:55px;color:#fff;text-shadow:0 0 15px #b643e6; text-align: center; display: block; text-transform: xuppercase; margin: 40px auto 0 auto;} .link-home{background-position: 0 -9px;} .link-latest{background-position: 0 -37px;} .link-forum{background-position: 0 -67px;} .link-docs{background-position: 0 -97px;} .link-twitter{background-position: 0 -127px;} -.phaser-examples{background: url('../img/phaser-examples.png') no-repeat; display: block; width: 485px; height: 205px; margin: 20px auto;} -.phaser-version{float: right; background: url('../img/phaser-version.png') no-repeat; display: block; width: 345px; height: 30px; color: #fff; font-size: 11px; text-shadow: 1px 1px #000; right:0; top:0; } +.phaser-examples{background: url('assets/html/phaser-examples.png') no-repeat; display: block; width: 485px; height: 205px; margin: 20px auto;} +.phaser-version{float: right; background: url('assets/html/phaser-version.png') no-repeat; display: block; width: 345px; height: 30px; color: #fff; font-size: 11px; text-shadow: 1px 1px #000; right:0; top:0; } .phaser-version > span{margin-top: 10px; display: inline-block; margin-left: 60px; margin-right: 25px;} -.phaser-version > a{color: #fff; text-decoration: none; background: url('../img/version-button.png') no-repeat; background-size: cover; display: inline-block; width: 123px; height: 10px; vertical-align: middle; text-align: center;padding-top:11px; padding-bottom: 11px} +.phaser-version > a{color: #fff; text-decoration: none; background: url('assets/html/version-button.png') no-repeat; background-size: cover; display: inline-block; width: 123px; height: 10px; vertical-align: middle; text-align: center;padding-top:11px; padding-bottom: 11px} .phaser-version > a:hover{text-decoration: underline;} -.phaser-logo{display: block; float: right; width: 168px;height: 144px; background: url('../img/phaser-logo.png') no-repeat; margin-top: 40px; margin-right: 40px;} +.phaser-logo{display: block; float: right; width: 168px;height: 144px; background: url('assets/html/phaser-logo.png') no-repeat; margin-top: 40px; margin-right: 40px;} .line{display:block;clear:both; width:100%; margin:0;padding:0; float:left; background-color: transparent;} -.go-top{margin-top: -200px;} +.xxgo-top{margin-top: -200px;} .box5, .box10, .box15 .box20, .box25, .box30, .box35, .box40, .box45, .box50, .box55, .box60, .box65, .box70, .box75, .box80, .box85, .box90, .box95, .box100{position: relative;display: inline-block; box-sizing: border-box; padding: 5px 10px; -moz-box-sizing: border-box; vertical-align: top; margin:0;} .float-right{float:right !important;} @@ -74,68 +75,68 @@ ul.nav-links > li > a:hover{text-decoration: underline;} .box-center{float: none !important; margin-left: auto !important; margin-right: auto !important;} .txt-center{text-align: center !important;} -p.title{font-size: 30px; color: #fff; text-shadow: 0 1px 3px #9e6ce8; text-align: right;} +p.title{font-family: 'HelveticaBd', Helvetica, Arial; font-size: 30px; color: #fff; text-shadow: 0 1px 3px #9e6ce8; text-align: right;} p.count-examples{font-size: 12px; color: #676773; text-align: right;} -ul.group-items{background-image: url('../img/laser1.png'); background-repeat: no-repeat; background-position: left top 5px; padding-left: 125px; width: 875px !important;} -ul.group-items > li{width: 213px; padding-top: 15px; height: 35px; background: url('../img/group-item.png') no-repeat; text-align: center; display: inline-block; margin-bottom: 15px} +ul.group-items{background-image: url('assets/html/laser1.png'); background-repeat: no-repeat; background-position: left top 5px; padding-left: 125px; width: 875px !important;} +ul.group-items > li{width: 213px; padding-top: 15px; height: 35px; background: url('assets/html/group-item.png') no-repeat; text-align: center; display: inline-block; margin-bottom: 15px} ul.group-items > li a{display:block; width:100%; height: 100%; padding: 20px 0; margin-top: -20px; color:#333;} ul.group-items > li a:hover{cursor: pointer; text-decoration: underline;} ul.group-items > li a span.mark{display:inline-block;width: 1px; height: 25px; vertical-align: middle;} -ul.group-items > li a:visited span.mark{background: url('../img/group-item-hover.png') no-repeat; background-position: center center;width:25px; padding-left:4px;} +ul.group-items > li a:visited span.mark{background: url('assets/html/group-item-hover.png') no-repeat; background-position: center center;width:25px; padding-left:4px;} -.laser2{background-image: url('../img/laser2.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser3{background-image: url('../img/laser3.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser4{background-image: url('../img/laser4.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser5{background-image: url('../img/laser5.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser6{background-image: url('../img/laser6.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser7{background-image: url('../img/laser7.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser8{background-image: url('../img/laser8.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser9{background-image: url('../img/laser9.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser10{background-image: url('../img/laser10.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser2{background-image: url('assets/html/laser2.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser3{background-image: url('assets/html/laser3.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser4{background-image: url('assets/html/laser4.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser5{background-image: url('assets/html/laser5.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser6{background-image: url('assets/html/laser6.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser7{background-image: url('assets/html/laser7.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser8{background-image: url('assets/html/laser8.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser9{background-image: url('assets/html/laser9.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser10{background-image: url('assets/html/laser10.png') !important; background-repeat: no-repeat; background-position: center 20px;} .bright-bg, .dark-bg{border-bottom: 1px solid #d1d1d1; padding:25px 0;} -.bright-bg{background-color: #e0e0ee;} -.dark-bg{background-color:#e0e4f1;} + .border-bottom{border-bottom: 1px solid #d1d1d1;} -.prize-bg{background: url('../img/prize-bg.png') no-repeat; background-size: cover; background-position: center center; height: 326px; width: 100%;} -.gradient{background: url('../img/gradient-bg.jpg') repeat-y; width: 100%;} -.prize-button{text-transform: uppercase; color: #000; text-shadow: 1px 0 #fff; float:right; background: url('../img/prize-button.png') no-repeat; width: 300px; height: 70px; padding-top:135px; font-size: 16px; padding-left: 75px; margin-top: 25px; margin-right: 145px;} +.prize-bg{background: url('assets/html/prize-bg.png') no-repeat; background-size: cover; background-position: center center; height: 326px; width: 100%;} +.prize-button{text-transform: uppercase; color: #000; text-shadow: 1px 0 #fff; float:right; background: url('assets/html/prize-button.png') no-repeat; width: 300px; height: 70px; padding-top:135px; font-size: 16px; padding-left: 75px; margin-top: 25px; margin-right: 145px;} -.footer{background: #e0e4f1 url('../img/footer-bg.jpg') no-repeat; background-size: cover; width:100%; height: 425px; bottom:0; color:#fff; text-shadow: 1px 1px 0 #000; line-height: 1.25em; font-size: 15px;} -.photonstorm-logo{background: url('../img/photonstorm-logo.png') no-repeat; background-size: cover; display: block;clear:both; width:113px;height:15px; margin-bottom: 6px;} -.flixel-logo{display:block; clear:both; width:26px; height:50px; background: url('../img/flixel-logo.png') no-repeat;} -.forums-icon, .twitter-icon, .github-icon{background: url('../img/forums-icon.png') no-repeat; vertical-align: middle; padding-left: 68px; height: 35px; display: inline-block; padding-top: 25px;} -.twitter-icon{background: url('../img/twitter-icon.png') no-repeat;} -.github-icon{background: url('../img/github-icon.png') no-repeat;} +.footer{ background: #e0e4f1 url('assets/html/footer-bg2.jpg') no-repeat; background-size: cover; width:100%; height: 592px; bottom:0; } +.photonstorm-logo{background: url('assets/html/photonstorm-logo.png') no-repeat; background-size: cover; display: block;clear:both; width:113px;height:15px; margin-bottom: 6px;} +.flixel-logo{display:block; clear:both; width:26px; height:50px; background: url('assets/html/flixel-logo.png') no-repeat;} +.forums-icon, .twitter-icon, .github-icon{background: url('assets/html/forums-icon.png') no-repeat; vertical-align: middle; padding-left: 68px; height: 35px; display: inline-block; padding-top: 25px;} +.twitter-icon{background: url('assets/html/twitter-icon.png') no-repeat;} +.github-icon{background: url('assets/html/github-icon.png') no-repeat;} -.footer > .main-container > .line{margin-top: 270px;} +#footer .main-container .line { + margin-top: 130px; + color:#fff; text-shadow: 1px 1px 0 #000; line-height: 1.25em; font-size: 15px; +} ul.footer-links{list-style-type: none; width:100%; clear:both; padding:0; margin:0; float:right; margin-top: -20px;} ul.footer-links > li{display: inline-block; padding:0; margin:0; float:right;} - .game-panel{width:800px; height: 680px; overflow: hidden; display:block; clear:both;box-shadow: 0 0 15px #6ac8f8; margin:-150px auto 0 auto; border-radius: 10px; position: relative; z-index: 10;} .game-screen{display:block; clear:both; width:800px;height:600px;margin:0;} -.game-controls{display:block; width:100%; height:80px; margin:0; padding:0;background: url('../img/game-controls-bg.jpg') repeat-x;} +.game-controls{display:block; width:100%; height:80px; margin:0; padding:0;background: url('assets/html/game-controls-bg.jpg') repeat-x;} ul.left-controls{float:left; list-style-type: none; margin:30px 0 0 25px;padding:0; display: inline-block;} ul.left-controls > li{margin:0;padding:0; display: inline-block; vertical-align: middle;} -.controls-label{display:inline-block; width:80px; height:9px; background: url('../img/controls-label.png') no-repeat;} -.up-label{display: inline-block; width:11px; height: 11px; background: url('../img/up-label.png') no-repeat;} -.down-label{display: inline-block; width:11px; height: 11px; background: url('../img/down-label.png') no-repeat;} -.left-label{display: inline-block; width:13px; height: 11px; background: url('../img/left-label.png') no-repeat;} -.right-label{display: inline-block; width:12px; height: 11px; background: url('../img/right-label.png') no-repeat;} -.space-label{display: inline-block; width:64px; height: 18px; background: url('../img/space-label.png') no-repeat;} +.controls-label{display:inline-block; width:80px; height:9px; background: url('assets/html/controls-label.png') no-repeat;} +.up-label{display: inline-block; width:11px; height: 11px; background: url('assets/html/up-label.png') no-repeat;} +.down-label{display: inline-block; width:11px; height: 11px; background: url('assets/html/down-label.png') no-repeat;} +.left-label{display: inline-block; width:13px; height: 11px; background: url('assets/html/left-label.png') no-repeat;} +.right-label{display: inline-block; width:12px; height: 11px; background: url('assets/html/right-label.png') no-repeat;} +.space-label{display: inline-block; width:64px; height: 18px; background: url('assets/html/space-label.png') no-repeat;} ul.right-controls{float:right;list-style-type: none; padding:0; display: inline-block; margin: 15px 25px 0 0;} ul.right-controls > li{margin:0;padding:0; display: inline-block; vertical-align: middle;} -.pause-button{width: 121px; height:52px; display:inline-block; background: url('../img/pause-button.png') no-repeat;} -.mute-button{width: 121px; height:52px; display:inline-block; background: url('../img/mute-button.png') no-repeat;} -.reset-button{width: 121px; height:52px; display:inline-block; background: url('../img/reset-button.png') no-repeat;} +.pause-button{width: 121px; height:52px; display:inline-block; background: url('assets/html/pause-button.png') no-repeat;} +.mute-button{width: 121px; height:52px; display:inline-block; background: url('assets/html/mute-button.png') no-repeat;} +.reset-button{width: 121px; height:52px; display:inline-block; background: url('assets/html/reset-button.png') no-repeat;} .pause-button:hover, .mute-button:hover, .reset-button:hover{cursor: pointer;} -.filler{height: 420px;} -.code-block{width:750px; height:auto; overflow: hidden;margin:0 auto;border-radius: 10px;background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} +.filler{height: 720px;} +.code-block{font-family: Courier; font-size: 14px; width:750px; height:auto; overflow: hidden; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} .px800{width:800px; clear:both; display: block; margin:0 auto; line-height: 1.5em;} .gradient p{color:#333;} diff --git a/examples/template.php b/examples/template.php deleted file mode 100644 index 1cef04ec..00000000 --- a/examples/template.php +++ /dev/null @@ -1,32 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/text/bitmap fonts.js b/examples/text/bitmap fonts.js new file mode 100644 index 00000000..4a819604 --- /dev/null +++ b/examples/text/bitmap fonts.js @@ -0,0 +1,22 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + + game.load.bitmapFont('desyrel', 'assets/fonts/desyrel.png', 'assets/fonts/desyrel.xml'); + +} + +var text; + +function create() { + + text = game.add.bitmapText(200, 100, 'Phaser & Pixi\nrocking!', { font: '64px Desyrel', align: 'center' }); + +} + +function update() { + + text.setText('Phaser & Pixi\nrocking!\n' + Math.round(game.time.now)); + +} diff --git a/examples/text/bitmap fonts.php b/examples/text/bitmap fonts.php deleted file mode 100644 index 89083832..00000000 --- a/examples/text/bitmap fonts.php +++ /dev/null @@ -1,37 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/text/hello arial.js b/examples/text/hello arial.js new file mode 100644 index 00000000..bd6e9934 --- /dev/null +++ b/examples/text/hello arial.js @@ -0,0 +1,13 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create }); + +function create() { + + var text = "- phaser -\nwith a sprinkle of\npixi dust"; + var style = { font: "65px Arial", fill: "#ff0044", align: "center" }; + + var t = game.add.text(game.world.centerX, game.world.centerY, text, style); + + t.anchor.setTo(0.5, 0.5); + +} diff --git a/examples/text/hello arial.php b/examples/text/hello arial.php deleted file mode 100644 index bd91da7c..00000000 --- a/examples/text/hello arial.php +++ /dev/null @@ -1,24 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/text/kern of duty.js b/examples/text/kern of duty.js new file mode 100644 index 00000000..5d0d6d86 --- /dev/null +++ b/examples/text/kern of duty.js @@ -0,0 +1,62 @@ + +var game = new Phaser.Game(800, 480, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +var content = [ + " ", + "photon storm presents", + "a phaser production", + " ", + "Kern of Duty", + " ", + "directed by rich davey", + "rendering by mat groves", + " ", + "03:45, November 4th, 2014", + "somewhere in the north pacific", + "mission control bravo ...", +]; + +var t = 0; +var s; +var index = 0; +var line = ''; + +function preload() { + game.load.image('cod', 'assets/pics/cod.jpg'); +} + +function create() { + + game.add.sprite(0, 0, 'cod'); + + var style = { font: "30pt Courier", fill: "#19cb65", stroke: "#119f4e", strokeThickness: 2 }; + + s = game.add.text(32, 380, '', style); + t = game.time.now + 80; + +} + +function update() { + + if (game.time.now > t && index < content.length) + { + // get the next character in the line + if (line.length < content[index].length) + { + line = content[index].substr(0, line.length + 1); + s.setText(line); + t = game.time.now + 80; + } + else + { + t = game.time.now + 2000; + + if (index < content.length) + { + index++; + line = ''; + } + } + } + +} diff --git a/examples/text/kern of duty.php b/examples/text/kern of duty.php deleted file mode 100644 index a674e228..00000000 --- a/examples/text/kern of duty.php +++ /dev/null @@ -1,78 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/text/remove text.js b/examples/text/remove text.js new file mode 100644 index 00000000..dd58c1d3 --- /dev/null +++ b/examples/text/remove text.js @@ -0,0 +1,19 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create }); + +var text; + +function create() { + + text = game.add.text(game.world.centerX, game.world.centerY, "- phaser -\nclick to remove", { font: "65px Arial", fill: "#ff0044", align: "center" }); + text.anchor.setTo(0.5, 0.5); + + game.input.onDown.addOnce(removeText, this); + +} + +function removeText() { + + text.destroy(); + +} diff --git a/examples/text/remove text.php b/examples/text/remove text.php deleted file mode 100644 index b24e3a5a..00000000 --- a/examples/text/remove text.php +++ /dev/null @@ -1,32 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/text/text stroke.js b/examples/text/text stroke.js new file mode 100644 index 00000000..5922c82c --- /dev/null +++ b/examples/text/text stroke.js @@ -0,0 +1,18 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create, update: update }); + +var s; + +function create() { + + var text = "--- phaser ---\nwith a sprinkle of\npixi dust"; + var style = { font: "bold 40pt Arial", fill: "#ffffff", align: "center", stroke: "#258acc", strokeThickness: 8 }; + + s = game.add.text(game.world.centerX, game.world.centerY, text, style); + s.anchor.setTo(0.5, 0.5); + +} + +function update() { + s.angle += 1; +} diff --git a/examples/text/text stroke.php b/examples/text/text stroke.php deleted file mode 100644 index f9d1ff18..00000000 --- a/examples/text/text stroke.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/texture crop/crop - horizontal tween.php b/examples/texture crop/crop - horizontal tween.php deleted file mode 100644 index f4daeb7e..00000000 --- a/examples/texture crop/crop - horizontal tween.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/texture crop/crop - vertical tween.php b/examples/texture crop/crop - vertical tween.php deleted file mode 100644 index 0ca156e1..00000000 --- a/examples/texture crop/crop - vertical tween.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/texture crop/to see part of an image.php b/examples/texture crop/to see part of an image.php deleted file mode 100644 index 31cbd4c7..00000000 --- a/examples/texture crop/to see part of an image.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tile sprites/animated tiling sprite.js b/examples/tile sprites/animated tiling sprite.js new file mode 100644 index 00000000..9977d266 --- /dev/null +++ b/examples/tile sprites/animated tiling sprite.js @@ -0,0 +1,43 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + game.load.image('disk', 'assets/sprites/p2.jpeg'); +} + +var s; +var count = 0; + +function create() { + s = game.add.tileSprite(0, 0, 512, 512, 'disk'); +} + +function update() { + + count += 0.005 + + s.tileScale.x = 2 + Math.sin(count); + s.tileScale.y = 2 + Math.cos(count); + + s.tilePosition.x += 1; + s.tilePosition.y += 1; + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + s.x -= 4; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + s.x += 4; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + s.y -= 4; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + s.y += 4; + } + +} diff --git a/examples/tile sprites/tilesprite inside crop rect.php b/examples/tile sprites/tilesprite inside crop rect.php deleted file mode 100644 index f7decb09..00000000 --- a/examples/tile sprites/tilesprite inside crop rect.php +++ /dev/null @@ -1,59 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tile sprites/tilesprite.php b/examples/tile sprites/tilesprite.php deleted file mode 100644 index b7094c5c..00000000 --- a/examples/tile sprites/tilesprite.php +++ /dev/null @@ -1,50 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tile sprites/tiling sprite.js b/examples/tile sprites/tiling sprite.js new file mode 100644 index 00000000..97485825 --- /dev/null +++ b/examples/tile sprites/tiling sprite.js @@ -0,0 +1,34 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +var s; + +function preload() { + game.load.image('starfield', 'assets/misc/starfield.jpg'); +} + +function create() { + s = game.add.tileSprite(0, 0, 800, 600, 'starfield'); +} + +function update() { + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + s.tilePosition.x += 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + s.tilePosition.x -= 8; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + s.tilePosition.y += 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + s.tilePosition.y -= 8; + } + +} diff --git a/examples/tilemaps/Sci-Fly.js b/examples/tilemaps/Sci-Fly.js new file mode 100644 index 00000000..e5de4111 --- /dev/null +++ b/examples/tilemaps/Sci-Fly.js @@ -0,0 +1,109 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + + game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/maps/cybernoid.png', 16, 16); + game.load.image('phaser', 'assets/sprites/phaser-ship.png'); + game.load.image('diamond', 'assets/sprites/chunk.png'); + +} + +var map; +var tileset; +var layer; +var cursors; +var overlap; +var sprite; +var emitter; + +function create() { + + game.stage.backgroundColor = '#3d3d3d'; + + // A Tilemap object just holds the data needed to describe the map (i.e. the json exported from Tiled, or the CSV exported from elsewhere). + // You can add your own data or manipulate the data (swap tiles around, etc) but in order to display it you need to create a TilemapLayer. + map = game.add.tilemap('level3'); + + // A Tileset is a single image containing a strip of tiles. Each tile is broken down into its own Phaser.Tile object on import. + // You can set properties on the Tile objects, such as collision, n-way movement and meta data. + // A Tilemap uses a Tileset to render. The indexes in the map corresponding to the Tileset indexes. + // This way multiple levels can share the same single Tileset without requiring one each. + tileset = game.add.tileset('tiles'); + + // Basically this sets EVERY SINGLE tile to fully collide on all faces + tileset.setCollisionRange(0, tileset.total - 1, true, true, true, true); + + // And this turns off collision on the only tile we don't want collision on :) + tileset.setCollision(6, false, false, false, false); + tileset.setCollision(31, false, false, false, false); + tileset.setCollision(34, false, false, false, false); + tileset.setCollision(35, false, false, false, false); + tileset.setCollision(46, false, false, false, false); + + // A TilemapLayer consists of an x,y coordinate (position), a width and height, a Tileset and a Tilemap which it uses for map data. + // The x/y coordinates are in World space and you can place the tilemap layer anywhere in the world. + // The width/height is the rendered size of the layer in pixels, not the size of the map data itself. + + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); + + layer.resizeWorld(); + + sprite = game.add.sprite(450, 80, 'phaser'); + sprite.anchor.setTo(0.5, 0.5); + + game.camera.follow(sprite); + game.camera.deadzone = new Phaser.Rectangle(160, 160, layer.renderWidth-320, layer.renderHeight-320); + + cursors = game.input.keyboard.createCursorKeys(); + + emitter = game.add.emitter(0, 0, 200); + + emitter.makeParticles('diamond'); + emitter.minRotation = 0; + emitter.maxRotation = 0; + emitter.gravity = 5; + emitter.bounce.setTo(0.5, 0.5); + + game.input.onDown.add(particleBurst, this); + +} + +function particleBurst() { + + emitter.x = game.input.worldX; + emitter.y = game.input.worldY; + emitter.start(true, 4000, null, 10); + +} + +function update() { + + game.physics.collide(sprite, layer); + game.physics.collide(emitter, layer); + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + + if (cursors.up.isDown) + { + sprite.body.velocity.y = -150; + } + else if (cursors.down.isDown) + { + sprite.body.velocity.y = 150; + } + + if (cursors.left.isDown) + { + sprite.body.velocity.x = -150; + sprite.scale.x = -1; + } + else if (cursors.right.isDown) + { + sprite.body.velocity.x = 150; + sprite.scale.x = 1; + } + +} diff --git a/examples/tilemaps/Sci-Fly.php b/examples/tilemaps/Sci-Fly.php deleted file mode 100644 index 70d50317..00000000 --- a/examples/tilemaps/Sci-Fly.php +++ /dev/null @@ -1,122 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/fill tiles.js b/examples/tilemaps/fill tiles.js new file mode 100644 index 00000000..9670ce19 --- /dev/null +++ b/examples/tilemaps/fill tiles.js @@ -0,0 +1,76 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('desert', 'assets/maps/desert.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/tiles/tmw_desert_spacing.png', 32, 32, -1, 1, 1); + game.load.image('car', 'assets/sprites/car90.png'); + +} + +var map; +var tileset; +var layer; + +var cursors; +var sprite; + +function create() { + + map = game.add.tilemap('desert'); + + tileset = game.add.tileset('tiles'); + + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); + + layer.resizeWorld(); + + sprite = game.add.sprite(450, 80, 'car'); + sprite.anchor.setTo(0.5, 0.5); + + game.camera.follow(sprite); + + cursors = game.input.keyboard.createCursorKeys(); + + game.input.onDown.add(fillTiles, this); + +} + +function fillTiles() { + + map.fill(31, layer.getTileX(sprite.x), layer.getTileY(sprite.y), 6, 6); + +} + +function update() { + + game.physics.collide(sprite, layer); + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + sprite.body.angularVelocity = 0; + + if (cursors.left.isDown) + { + sprite.body.angularVelocity = -200; + } + else if (cursors.right.isDown) + { + sprite.body.angularVelocity = 200; + } + + if (cursors.up.isDown) + { + sprite.body.velocity.copyFrom(game.physics.velocityFromAngle(sprite.angle, 300)); + } + +} + +function render() { + + game.debug.renderText('Click to fill tiles', 32, 32, 'rgb(0,0,0)'); + game.debug.renderText('Tile X: ' + layer.getTileX(sprite.x), 32, 48, 'rgb(0,0,0)'); + game.debug.renderText('Tile Y: ' + layer.getTileY(sprite.y), 32, 64, 'rgb(0,0,0)'); + +} diff --git a/examples/tilemaps/fill tiles.php b/examples/tilemaps/fill tiles.php deleted file mode 100644 index c69d07b9..00000000 --- a/examples/tilemaps/fill tiles.php +++ /dev/null @@ -1,88 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/mapcollide.js b/examples/tilemaps/mapcollide.js new file mode 100644 index 00000000..1a426d3e --- /dev/null +++ b/examples/tilemaps/mapcollide.js @@ -0,0 +1,76 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('mario', 'assets/maps/mario1.png', 'assets/maps/mario1.json', null, Phaser.Tilemap.JSON); + game.load.image('player', 'assets/sprites/phaser-dude.png'); + +} + +var map; +var p; +var cursors; + +function create() { + + game.stage.backgroundColor = '#787878'; + + map = game.add.tilemap(0, 0, 'mario'); + + // floor + map.setCollisionRange(80, 97, true, true, true, true); + + // one-ways + map.setCollisionRange(15, 17, true, true, false, true); + + p = game.add.sprite(32, 32, 'player'); + + p.body.gravity.y = 10; + p.body.bounce.y = 0.4; + p.body.collideWorldBounds = true; + + game.world.setBounds(0, 0, map.width, 600); + + game.camera.follow(p); + + cursors = game.input.keyboard.createCursorKeys(); + +} + +function update() { + + map.collide(p); + + p.body.velocity.x = 0; + + if (cursors.up.isDown) + { + if (p.body.touching.down) + { + p.body.velocity.y = -400; + } + } + else if (cursors.down.isDown) + { + // game.camera.y += 4; + } + + if (cursors.left.isDown) + { + p.body.velocity.x = -150; + } + else if (cursors.right.isDown) + { + p.body.velocity.x = 150; + } + +} + +function render() { + + game.debug.renderCameraInfo(game.camera, 32, 32); + // game.debug.renderSpriteCorners(p); + game.debug.renderSpriteCollision(p, 32, 320); + +} diff --git a/examples/tilemaps/mapcollide.php b/examples/tilemaps/mapcollide.php deleted file mode 100644 index 1d71a887..00000000 --- a/examples/tilemaps/mapcollide.php +++ /dev/null @@ -1,89 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/mario.js b/examples/tilemaps/mario.js new file mode 100644 index 00000000..cc06313c --- /dev/null +++ b/examples/tilemaps/mario.js @@ -0,0 +1,41 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('mario', 'assets/maps/mario1.png', 'assets/maps/mario1.json', null, Phaser.Tilemap.JSON); + +} + +function create() { + + game.stage.backgroundColor = '#787878'; + + game.add.tilemap(0, 0, 'mario'); + +} + +function update() { + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + game.camera.x -= 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + game.camera.x += 8; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + game.camera.y -= 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + game.camera.y += 8; + } + +} + +function render() { +} diff --git a/examples/tilemaps/mario.php b/examples/tilemaps/mario.php deleted file mode 100644 index b1753f75..00000000 --- a/examples/tilemaps/mario.php +++ /dev/null @@ -1,56 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/mariotogether.js b/examples/tilemaps/mariotogether.js new file mode 100644 index 00000000..ccddc3e1 --- /dev/null +++ b/examples/tilemaps/mariotogether.js @@ -0,0 +1,26 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.tilemap('nes', 'assets/maps/mario1.png', 'assets/maps/mario1.json', null, Phaser.Tilemap.JSON); + game.load.tilemap('snes', 'assets/maps/smb_tiles.png', 'assets/maps/smb_level1.json', null, Phaser.Tilemap.JSON); + +} + +function create() { + + game.stage.backgroundColor = '#5c94fc'; + + game.add.tilemap(0, 0, 'nes'); + game.add.tilemap(0, 168, 'snes'); + + game.add.tween(game.camera).to( { x: 5120-800 }, 30000, Phaser.Easing.Linear.None, true, 0, 1000, true); + + game.input.onDown.add(goFull, this); + +} + +function goFull() { + game.stage.scale.startFullScreen(); +} diff --git a/examples/tilemaps/mariotogether.php b/examples/tilemaps/mariotogether.php deleted file mode 100644 index d94edf73..00000000 --- a/examples/tilemaps/mariotogether.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/paint tiles.js b/examples/tilemaps/paint tiles.js new file mode 100644 index 00000000..65bc94c0 --- /dev/null +++ b/examples/tilemaps/paint tiles.js @@ -0,0 +1,61 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('desert', 'assets/maps/desert.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/tiles/tmw_desert_spacing.png', 32, 32, -1, 1, 1); + +} + +var map; +var tileset; +var layer; + +var marker; +var currentTile = 0; + +function create() { + + map = game.add.tilemap('desert'); + + tileset = game.add.tileset('tiles'); + + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); + + layer.resizeWorld(); + + marker = game.add.graphics(); + marker.lineStyle(2, 0x000000, 1); + marker.drawRect(0, 0, 32, 32); + +} + +function update() { + + marker.x = layer.getTileX(game.input.activePointer.worldX) * 32; + marker.y = layer.getTileY(game.input.activePointer.worldY) * 32; + + if (game.input.mousePointer.isDown) + { + if (game.input.keyboard.isDown(Phaser.Keyboard.SHIFT)) + { + currentTile = map.getTile(layer.getTileX(marker.x), layer.getTileY(marker.y)); + } + else + { + if (map.getTile(layer.getTileX(marker.x), layer.getTileY(marker.y)) != currentTile) + { + map.putTile(currentTile, layer.getTileX(marker.x), layer.getTileY(marker.y)) + } + } + } + +} + +function render() { + + game.debug.renderText('Left-click to paint. Shift + Left-click to select tile.', 32, 32, 'rgb(0,0,0)'); + game.debug.renderText('Tile: ' + map.getTile(layer.getTileX(marker.x), layer.getTileY(marker.y)), 32, 48, 'rgb(0,0,0)'); + +} diff --git a/examples/tilemaps/paint tiles.php b/examples/tilemaps/paint tiles.php deleted file mode 100644 index c6409760..00000000 --- a/examples/tilemaps/paint tiles.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/randomise tiles.js b/examples/tilemaps/randomise tiles.js new file mode 100644 index 00000000..1adf705e --- /dev/null +++ b/examples/tilemaps/randomise tiles.js @@ -0,0 +1,81 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('desert', 'assets/maps/desert.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/tiles/tmw_desert_spacing.png', 32, 32, -1, 1, 1); + game.load.image('car', 'assets/sprites/car90.png'); + +} + +var map; +var tileset; +var layer; + +var cursors; +var sprite; + +function create() { + + map = game.add.tilemap('desert'); + + tileset = game.add.tileset('tiles'); + + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); + + layer.resizeWorld(); + + sprite = game.add.sprite(450, 80, 'car'); + sprite.anchor.setTo(0.5, 0.5); + + game.camera.follow(sprite); + + cursors = game.input.keyboard.createCursorKeys(); + + game.input.onDown.add(randomiseTiles, this); + +} + +function randomiseTiles() { + + // This will replace every instance of tile 31 (cactus plant) with tile 46 (the sign post). + // It does this across the whole layer of the map unless a region is specified. + + // You can also pass in x, y, width, height values to control the area in which the replace happens + + map.shuffle(layer.getTileX(sprite.x), layer.getTileY(sprite.y), 6, 6); + +} + +function update() { + + game.physics.collide(sprite, layer); + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + sprite.body.angularVelocity = 0; + + if (cursors.left.isDown) + { + sprite.body.angularVelocity = -200; + } + else if (cursors.right.isDown) + { + sprite.body.angularVelocity = 200; + } + + if (cursors.up.isDown) + { + sprite.body.velocity.copyFrom(game.physics.velocityFromAngle(sprite.angle, 300)); + } + +} + +function render() { + + game.debug.renderText('Click to randomise tiles', 32, 32, 'rgb(0,0,0)'); + game.debug.renderText('Tile X: ' + layer.getTileX(sprite.x), 32, 48, 'rgb(0,0,0)'); + game.debug.renderText('Tile Y: ' + layer.getTileY(sprite.y), 32, 64, 'rgb(0,0,0)'); + +} diff --git a/examples/tilemaps/randomise tiles.php b/examples/tilemaps/randomise tiles.php deleted file mode 100644 index 88d6da9b..00000000 --- a/examples/tilemaps/randomise tiles.php +++ /dev/null @@ -1,93 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/replace tiles.js b/examples/tilemaps/replace tiles.js new file mode 100644 index 00000000..45dd75cb --- /dev/null +++ b/examples/tilemaps/replace tiles.js @@ -0,0 +1,81 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('desert', 'assets/maps/desert.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/tiles/tmw_desert_spacing.png', 32, 32, -1, 1, 1); + game.load.image('car', 'assets/sprites/car90.png'); + +} + +var map; +var tileset; +var layer; + +var cursors; +var sprite; + +function create() { + + map = game.add.tilemap('desert'); + + tileset = game.add.tileset('tiles'); + + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); + + layer.resizeWorld(); + + sprite = game.add.sprite(450, 80, 'car'); + sprite.anchor.setTo(0.5, 0.5); + + game.camera.follow(sprite); + + cursors = game.input.keyboard.createCursorKeys(); + + game.input.onDown.addOnce(replaceTiles, this); + +} + +function replaceTiles() { + + // This will replace every instance of tile 31 (cactus plant) with tile 46 (the sign post). + // It does this across the whole layer of the map unless a region is specified. + + // You can also pass in x, y, width, height values to control the area in which the replace happens + + map.replace(31, 46); + +} + +function update() { + + game.physics.collide(sprite, layer); + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + sprite.body.angularVelocity = 0; + + if (cursors.left.isDown) + { + sprite.body.angularVelocity = -200; + } + else if (cursors.right.isDown) + { + sprite.body.angularVelocity = 200; + } + + if (cursors.up.isDown) + { + sprite.body.velocity.copyFrom(game.physics.velocityFromAngle(sprite.angle, 300)); + } + +} + +function render() { + + game.debug.renderText('Click to replace tiles', 32, 32, 'rgb(0,0,0)'); + game.debug.renderText('Tile X: ' + layer.getTileX(sprite.x), 32, 48, 'rgb(0,0,0)'); + game.debug.renderText('Tile Y: ' + layer.getTileY(sprite.y), 32, 64, 'rgb(0,0,0)'); + +} diff --git a/examples/tilemaps/replace tiles.php b/examples/tilemaps/replace tiles.php deleted file mode 100644 index 27bf4ecd..00000000 --- a/examples/tilemaps/replace tiles.php +++ /dev/null @@ -1,93 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/supermario.js b/examples/tilemaps/supermario.js new file mode 100644 index 00000000..04a67023 --- /dev/null +++ b/examples/tilemaps/supermario.js @@ -0,0 +1,43 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('background', 'assets/maps/smb_bg.png', 'assets/maps/smb_bg.json', null, Phaser.Tilemap.JSON); + game.load.tilemap('level1', 'assets/maps/smb_tiles.png', 'assets/maps/smb_level1.json', null, Phaser.Tilemap.JSON); + +} + +function create() { + + game.stage.backgroundColor = '#787878'; + + game.add.tilemap(0, 0, 'background'); + game.add.tilemap(0, 0, 'level1'); + +} + +function update() { + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + game.camera.x -= 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + game.camera.x += 8; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + game.camera.y -= 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + game.camera.y += 8; + } + +} + +function render() { +} diff --git a/examples/tilemaps/supermario.php b/examples/tilemaps/supermario.php deleted file mode 100644 index 911aac85..00000000 --- a/examples/tilemaps/supermario.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/supermario2.js b/examples/tilemaps/supermario2.js new file mode 100644 index 00000000..bb960ea2 --- /dev/null +++ b/examples/tilemaps/supermario2.js @@ -0,0 +1,58 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + + game.load.tilemap('background', 'assets/maps/smb_bg.png', 'assets/maps/smb_bg.json', null, Phaser.Tilemap.JSON); + game.load.tilemap('level1', 'assets/maps/smb_tiles.png', 'assets/maps/smb_level1.json', null, Phaser.Tilemap.JSON); + game.load.spritesheet('balls', 'assets/sprites/balls.png', 17, 17); + +} + +var balls; +var map; + +function create() { + + game.stage.backgroundColor = '#787878'; + + game.add.tilemap(0, 0, 'background'); + + map = game.add.tilemap(0, 0, 'level1'); + map.setCollisionByIndex([9,10,11,14,15,16,18,19,22,23,24,32,37,38], true, true, true, true); + + balls = game.add.emitter(300, 50, 500); + balls.bounce = 0.5; + balls.makeParticles('balls', [0,1,2,3,4,5], 500, 1); + balls.minParticleSpeed.setTo(-150, 150); + balls.maxParticleSpeed.setTo(100, 100); + balls.gravity = 8; + balls.start(false, 5000, 50); + + game.add.tween(balls).to({ x: 4000 }, 7500, Phaser.Easing.Sinusoidal.InOut, true, 0, 1000, true); + +} + +function update() { + + game.physics.collide(balls, map); + + if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) + { + game.camera.x -= 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) + { + game.camera.x += 8; + } + + if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) + { + game.camera.y -= 8; + } + else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) + { + game.camera.y += 8; + } + +} diff --git a/examples/tilemaps/supermario2.php b/examples/tilemaps/supermario2.php deleted file mode 100644 index 6a91ea85..00000000 --- a/examples/tilemaps/supermario2.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/swap tiles.js b/examples/tilemaps/swap tiles.js new file mode 100644 index 00000000..55c2bdd2 --- /dev/null +++ b/examples/tilemaps/swap tiles.js @@ -0,0 +1,81 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('desert', 'assets/maps/desert.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/tiles/tmw_desert_spacing.png', 32, 32, -1, 1, 1); + game.load.image('car', 'assets/sprites/car90.png'); + +} + +var map; +var tileset; +var layer; + +var cursors; +var sprite; + +function create() { + + map = game.add.tilemap('desert'); + + tileset = game.add.tileset('tiles'); + + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); + + layer.resizeWorld(); + + sprite = game.add.sprite(450, 80, 'car'); + sprite.anchor.setTo(0.5, 0.5); + + game.camera.follow(sprite); + + cursors = game.input.keyboard.createCursorKeys(); + + game.input.onDown.addOnce(swapTiles, this); + +} + +function swapTiles() { + + // This will swap every instance of tile 30 (empty ground) with tile 31 (the cactus plant), it also does the opposite, + // so tile 31 (cactus plants) will become empty ground (tile 30). It does this across the whole layer of the map. + + // You can also pass in x, y, width, height values to control the area in which the swap happens + + map.swap(30, 31); + +} + +function update() { + + game.physics.collide(sprite, layer); + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + sprite.body.angularVelocity = 0; + + if (cursors.left.isDown) + { + sprite.body.angularVelocity = -200; + } + else if (cursors.right.isDown) + { + sprite.body.angularVelocity = 200; + } + + if (cursors.up.isDown) + { + sprite.body.velocity.copyFrom(game.physics.velocityFromAngle(sprite.angle, 300)); + } + +} + +function render() { + + game.debug.renderText('Click to swap tiles', 32, 32, 'rgb(0,0,0)'); + game.debug.renderText('Tile X: ' + layer.getTileX(sprite.x), 32, 48, 'rgb(0,0,0)'); + game.debug.renderText('Tile Y: ' + layer.getTileY(sprite.y), 32, 64, 'rgb(0,0,0)'); + +} diff --git a/examples/tilemaps/swap tiles.php b/examples/tilemaps/swap tiles.php deleted file mode 100644 index 82627c98..00000000 --- a/examples/tilemaps/swap tiles.php +++ /dev/null @@ -1,93 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/wip1.js b/examples/tilemaps/wip1.js new file mode 100644 index 00000000..28c2593f --- /dev/null +++ b/examples/tilemaps/wip1.js @@ -0,0 +1,158 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/maps/cybernoid.png', 16, 16); + +} + +var map; +var tileset; +var layer; +var cursors; +var sprite2; +var overlap; + +function create() { + + game.stage.backgroundColor = '#3d3d3d'; + + // A Tilemap object just holds the data needed to describe the map (i.e. the json exported from Tiled, or the CSV exported from elsewhere). + // You can add your own data or manipulate the data (swap tiles around, etc) but in order to display it you need to create a TilemapLayer. + map = new Phaser.Tilemap(game, 'level3'); + + // A Tileset is a single image containing a strip of tiles. Each tile is broken down into its own Phaser.Tile object on import. + // You can set properties on the Tile objects, such as collision, n-way movement and meta data. + // A Tilemap uses a Tileset to render. The indexes in the map corresponding to the Tileset indexes. + // This way multiple levels can share the same single Tileset without requiring one each. + tileset = game.cache.getTileset('tiles'); + + // Basically this sets EVERY SINGLE tile to fully collide on all faces + tileset.setCollisionRange(0, tileset.total - 1, true, true, true, true); + + // And this turns off collision on the only tile we don't want collision on :) + tileset.setCollision(6, false, false, false, false); + + // A TilemapLayer consists of an x,y coordinate (position), a width and height, a Tileset and a Tilemap which it uses for map data. + // The x/y coordinates are in World space and you can place the tilemap layer anywhere in the world. + // The width/height is the rendered size of the layer in pixels, not the size of the map data itself. + + // This one gives tileset as a string, the other an object + // layer = new Phaser.TilemapLayer(game, 0, 0, 640, 400, 'tiles', map, 0); + layer = new Phaser.TilemapLayer(game, 0, 0, 640, 400, tileset, map, 0); + + // To set tiles for collision you need to modify the Tileset, which is a property of the layer + + // Task now + // + // 1) Get tiles that will collide with sprites new position (hullX and hullY) + // 2) Separate x/y + + + // Collision is based on the layer.x/y value + + // layer.sprite.anchor.setTo(0.5, 0.5); + + game.world.add(layer.sprite); + + // This is a bit nuts, ought to find a way to automate it, but it looks cool :) + map.debugMap = [ '#000000', + '#e40058', '#e40058', '#e40058', '#80d010', '#bcbcbc', '#e40058', '#000000', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc', '#e40058', '#e40058', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#80d010', '#80d010', '#80d010', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#80d010', '#0070ec', + '#0070ec', '#24188c', '#24188c', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#80d010', '#80d010', '#80d010', '#e40058', + '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#80d010', '#bcbcbc', '#80d010', '#000000', '#80d010', + '#80d010', '#80d010', '#bcbcbc', '#e40058', '#80d010', '#80d010', '#e40058', '#e40058', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc' + ]; + + // map.dump(); + + // layer.sprite.scale.setTo(2, 2); + + // Works a treat :) + // game.add.sprite(320, 0, layer.texture, layer.frame); + // game.add.sprite(0, 200, layer.texture, layer.frame); + // game.add.sprite(320, 200, layer.texture, layer.frame); + + // game.world.setBounds(0, 0, 2000, 2000); + // game.camera.x = 400; + + cursors = game.input.keyboard.createCursorKeys(); +} + +function update() { + + // layer.sprite.angle += 0.5; + + if (cursors.up.isDown) + { + layer.y -= 4; + } + else if (cursors.down.isDown) + { + layer.y += 4; + } + + if (cursors.left.isDown) + { + layer.x -= 4; + } + else if (cursors.right.isDown) + { + layer.x += 4; + } + + // getTiles: function (x, y, width, height, collides, layer) { + overlap = layer.getTiles(layer.x, layer.y, 128, 128); + +} + +function render() { + + layer.render(); + + game.context.save(); + game.context.setTransform(1, 0, 0, 1, 0, 0); + game.context.fillStyle = 'rgba(255, 0, 0, 0.5)'; + + if (overlap.length > 1) + { + var x = 0; + var y = 0; + + for (var i = 1; i < overlap.length; i++) + { + game.context.drawImage( + overlap[i].tile.tileset.image, + overlap[i].tile.x, + overlap[i].tile.y, + overlap[i].tile.width, + overlap[i].tile.height, + 0 + (x * overlap[i].tile.width), + 420 + (y * overlap[i].tile.height), + overlap[i].tile.width, + overlap[i].tile.height + ); + + if (overlap[i].tile.collideNone == false) + { + game.context.fillRect(0 + (x * overlap[i].tile.width), 420 + (y * overlap[i].tile.height), overlap[i].tile.width, overlap[i].tile.height); + } + + x++; + + if (x == overlap[0].tw) + { + x = 0; + y++; + } + } + } + + game.context.restore(); + +} diff --git a/examples/tilemaps/wip1.php b/examples/tilemaps/wip1.php deleted file mode 100644 index 536460ac..00000000 --- a/examples/tilemaps/wip1.php +++ /dev/null @@ -1,171 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/wip2.js b/examples/tilemaps/wip2.js new file mode 100644 index 00000000..1e9e7400 --- /dev/null +++ b/examples/tilemaps/wip2.js @@ -0,0 +1,189 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/maps/cybernoid.png', 16, 16); + // game.load.image('phaser', 'assets/sprites/phaser-dude.png'); + game.load.image('phaser', 'assets/sprites/space-baddie.png'); + +} + +var map; +var tileset; +var layer; +var cursors; +var overlap; +var sprite; + +function create() { + + game.stage.backgroundColor = '#3d3d3d'; + + // A Tilemap object just holds the data needed to describe the map (i.e. the json exported from Tiled, or the CSV exported from elsewhere). + // You can add your own data or manipulate the data (swap tiles around, etc) but in order to display it you need to create a TilemapLayer. + map = new Phaser.Tilemap(game, 'level3'); + + // A Tileset is a single image containing a strip of tiles. Each tile is broken down into its own Phaser.Tile object on import. + // You can set properties on the Tile objects, such as collision, n-way movement and meta data. + // A Tilemap uses a Tileset to render. The indexes in the map corresponding to the Tileset indexes. + // This way multiple levels can share the same single Tileset without requiring one each. + tileset = game.cache.getTileset('tiles'); + + // Basically this sets EVERY SINGLE tile to fully collide on all faces + tileset.setCollisionRange(0, tileset.total - 1, true, true, true, true); + + // And this turns off collision on the only tile we don't want collision on :) + tileset.setCollision(6, false, false, false, false); + tileset.setCollision(34, false, false, false, false); + tileset.setCollision(35, false, false, false, false); + + // A TilemapLayer consists of an x,y coordinate (position), a width and height, a Tileset and a Tilemap which it uses for map data. + // The x/y coordinates are in World space and you can place the tilemap layer anywhere in the world. + // The width/height is the rendered size of the layer in pixels, not the size of the map data itself. + + // This one gives tileset as a string, the other an object + // layer = new Phaser.TilemapLayer(game, 0, 0, 640, 400, 'tiles', map, 0); + layer = new Phaser.TilemapLayer(game, 0, 0, 800, 400, tileset, map, 0); + + // To set tiles for collision you need to modify the Tileset, which is a property of the layer + + // Task now + // + // 1) Get tiles that will collide with sprites new position (hullX and hullY) + // 2) Separate x/y + + + // Collision is based on the layer.x/y value + + // layer.sprite.anchor.setTo(0.5, 0.5); + + game.world.add(layer.sprite); + + // This is a bit nuts, ought to find a way to automate it, but it looks cool :) + map.debugMap = [ '#000000', + '#e40058', '#e40058', '#e40058', '#80d010', '#bcbcbc', '#e40058', '#000000', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc', '#e40058', '#e40058', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#80d010', '#80d010', '#80d010', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#80d010', '#0070ec', + '#0070ec', '#24188c', '#24188c', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#80d010', '#80d010', '#80d010', '#e40058', + '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#80d010', '#bcbcbc', '#80d010', '#000000', '#80d010', + '#80d010', '#80d010', '#bcbcbc', '#e40058', '#80d010', '#80d010', '#e40058', '#e40058', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc' + ]; + + // map.dump(); + + // layer.sprite.scale.setTo(2, 2); + + // Works a treat :) + // game.add.sprite(320, 0, layer.texture, layer.frame); + // game.add.sprite(0, 200, layer.texture, layer.frame); + // game.add.sprite(320, 200, layer.texture, layer.frame); + + // game.world.setBounds(0, 0, 2000, 2000); + // game.camera.x = 400; + + sprite = game.add.sprite(200, 80, 'phaser'); + + cursors = game.input.keyboard.createCursorKeys(); + +} + +function update() { + + sprite.body.velocity.setTo(0, 0); + + // layer.sprite.angle += 0.5; + + if (cursors.up.isDown) + { + sprite.body.velocity.y = -100; + // layer.y -= 4; + } + else if (cursors.down.isDown) + { + sprite.body.velocity.y = 100; + // layer.y += 4; + } + + if (cursors.left.isDown) + { + sprite.body.velocity.x = -100; + // layer.x -= 4; + } + else if (cursors.right.isDown) + { + sprite.body.velocity.x = 100; + // layer.x += 4; + } + + // getTiles: function (x, y, width, height, collides, layer) { + overlap = layer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true); + + if (overlap.length > 1) + { + // console.log('%c ', 'background: #000000') + for (var i = 1; i < overlap.length; i++) + { + game.physics.separateTile(sprite.body, overlap[i]); + } + } + +} + +function render() { + + layer.render(); + + game.debug.renderSpriteInfo(sprite, 32, 450); + // game.debug.renderCameraInfo(game.camera, 32, 32); + + /* + game.context.save(); + game.context.setTransform(1, 0, 0, 1, 0, 0); + + + game.context.fillStyle = 'rgba(255, 0, 0, 0.5)'; + + if (overlap.length > 1) + { + var x = 0; + var y = 0; + + for (var i = 1; i < overlap.length; i++) + { + game.context.drawImage( + overlap[i].tile.tileset.image, + overlap[i].tile.x, + overlap[i].tile.y, + overlap[i].tile.width, + overlap[i].tile.height, + 0 + (x * overlap[i].tile.width), + 420 + (y * overlap[i].tile.height), + overlap[i].tile.width, + overlap[i].tile.height + ); + + if (overlap[i].tile.collideNone == false) + { + game.context.fillRect(0 + (x * overlap[i].tile.width), 420 + (y * overlap[i].tile.height), overlap[i].tile.width, overlap[i].tile.height); + } + + x++; + + if (x == overlap[0].tw) + { + x = 0; + y++; + } + } + } + + game.context.restore(); + */ + + // game.debug.renderRectangle(sprite.body.hullX); + +} diff --git a/examples/tilemaps/wip2.php b/examples/tilemaps/wip2.php deleted file mode 100644 index 09a51064..00000000 --- a/examples/tilemaps/wip2.php +++ /dev/null @@ -1,202 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/wip3.js b/examples/tilemaps/wip3.js new file mode 100644 index 00000000..663964cc --- /dev/null +++ b/examples/tilemaps/wip3.js @@ -0,0 +1,188 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/maps/cybernoid.png', 16, 16); + // game.load.image('phaser', 'assets/sprites/phaser-dude.png'); + game.load.image('phaser', 'assets/sprites/space-baddie.png'); + +} + +var map; +var tileset; +var layer; +var cursors; +var overlap; +var sprite; + +function create() { + + game.stage.backgroundColor = '#3d3d3d'; + + // A Tilemap object just holds the data needed to describe the map (i.e. the json exported from Tiled, or the CSV exported from elsewhere). + // You can add your own data or manipulate the data (swap tiles around, etc) but in order to display it you need to create a TilemapLayer. + map = new Phaser.Tilemap(game, 'level3'); + + // A Tileset is a single image containing a strip of tiles. Each tile is broken down into its own Phaser.Tile object on import. + // You can set properties on the Tile objects, such as collision, n-way movement and meta data. + // A Tilemap uses a Tileset to render. The indexes in the map corresponding to the Tileset indexes. + // This way multiple levels can share the same single Tileset without requiring one each. + tileset = game.cache.getTileset('tiles'); + + // Basically this sets EVERY SINGLE tile to fully collide on all faces + tileset.setCollisionRange(0, tileset.total - 1, true, true, true, true); + + // And this turns off collision on the only tile we don't want collision on :) + tileset.setCollision(6, false, false, false, false); + tileset.setCollision(34, false, false, false, false); + tileset.setCollision(35, false, false, false, false); + + // A TilemapLayer consists of an x,y coordinate (position), a width and height, a Tileset and a Tilemap which it uses for map data. + // The x/y coordinates are in World space and you can place the tilemap layer anywhere in the world. + // The width/height is the rendered size of the layer in pixels, not the size of the map data itself. + + // This one gives tileset as a string, the other an object + // layer = new Phaser.TilemapLayer(game, 0, 0, 800, 400, tileset, map, 0); + layer = new Phaser.TilemapLayer(game, 0, 0, 400, 200, tileset, map, 0); + layer.sprite.scale.setTo(2, 2); + + // layer.sprite.anchor.setTo(0.5, 0.5); + + game.world.add(layer.sprite); + + // This is a bit nuts, ought to find a way to automate it, but it looks cool :) + map.debugMap = [ '#000000', + '#e40058', '#e40058', '#e40058', '#80d010', '#bcbcbc', '#e40058', '#000000', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc', '#e40058', '#e40058', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#80d010', '#80d010', '#80d010', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#80d010', '#0070ec', + '#0070ec', '#24188c', '#24188c', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#80d010', '#80d010', '#80d010', '#e40058', + '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#80d010', '#bcbcbc', '#80d010', '#000000', '#80d010', + '#80d010', '#80d010', '#bcbcbc', '#e40058', '#80d010', '#80d010', '#e40058', '#e40058', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc' + ]; + + // map.dump(); + + // layer.sprite.scale.setTo(2, 2); + + // Works a treat :) + // game.add.sprite(320, 0, layer.texture, layer.frame); + // game.add.sprite(0, 200, layer.texture, layer.frame); + // game.add.sprite(320, 200, layer.texture, layer.frame); + + // game.world.setBounds(0, 0, 2000, 2000); + // game.camera.x = 400; + + sprite = game.add.sprite(200, 80, 'phaser'); + // sprite.x = 140; + // sprite.y = 40; + + //sprite.scale.setTo(2, 2); + + + + cursors = game.input.keyboard.createCursorKeys(); + +} + +function update() { + + sprite.body.velocity.setTo(0, 0); + + // layer.sprite.angle += 0.5; + + if (cursors.up.isDown) + { + sprite.body.velocity.y = -100; + // layer.y -= 4; + } + else if (cursors.down.isDown) + { + sprite.body.velocity.y = 100; + // layer.y += 4; + } + + if (cursors.left.isDown) + { + sprite.body.velocity.x = -100; + // layer.x -= 4; + } + else if (cursors.right.isDown) + { + sprite.body.velocity.x = 100; + // layer.x += 4; + } + + // getTiles: function (x, y, width, height, collides, layer) { + overlap = layer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true); + + if (overlap.length > 1) + { + // console.log('%c ', 'background: #000000') + for (var i = 1; i < overlap.length; i++) + { + game.physics.separateTile(sprite.body, overlap[i]); + } + } + +} + +function render() { + + layer.render(); + + game.debug.renderSpriteBody(sprite); + + game.debug.renderSpriteInfo(sprite, 32, 450); + // game.debug.renderCameraInfo(game.camera, 32, 32); + + /* + game.context.save(); + game.context.setTransform(1, 0, 0, 1, 0, 0); + + + game.context.fillStyle = 'rgba(255, 0, 0, 0.5)'; + + if (overlap.length > 1) + { + var x = 0; + var y = 0; + + for (var i = 1; i < overlap.length; i++) + { + game.context.drawImage( + overlap[i].tile.tileset.image, + overlap[i].tile.x, + overlap[i].tile.y, + overlap[i].tile.width, + overlap[i].tile.height, + 0 + (x * overlap[i].tile.width), + 420 + (y * overlap[i].tile.height), + overlap[i].tile.width, + overlap[i].tile.height + ); + + if (overlap[i].tile.collideNone == false) + { + game.context.fillRect(0 + (x * overlap[i].tile.width), 420 + (y * overlap[i].tile.height), overlap[i].tile.width, overlap[i].tile.height); + } + + x++; + + if (x == overlap[0].tw) + { + x = 0; + y++; + } + } + } + + game.context.restore(); + */ + + // game.debug.renderRectangle(sprite.body.hullX); + +} diff --git a/examples/tilemaps/wip3.php b/examples/tilemaps/wip3.php deleted file mode 100644 index 7054db72..00000000 --- a/examples/tilemaps/wip3.php +++ /dev/null @@ -1,201 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/wip4.js b/examples/tilemaps/wip4.js new file mode 100644 index 00000000..6810c596 --- /dev/null +++ b/examples/tilemaps/wip4.js @@ -0,0 +1,197 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', 'assets/maps/cybernoid.png', 16, 16); + game.load.image('phaser', 'assets/sprites/phaser-ship.png'); + +} + +var map; +var tileset; +var layer; +var cursors; +var overlap; +var sprite; + +function create() { + + game.stage.backgroundColor = '#3d3d3d'; + + // A Tilemap object just holds the data needed to describe the map (i.e. the json exported from Tiled, or the CSV exported from elsewhere). + // You can add your own data or manipulate the data (swap tiles around, etc) but in order to display it you need to create a TilemapLayer. + map = new Phaser.Tilemap(game, 'level3'); + + // A Tileset is a single image containing a strip of tiles. Each tile is broken down into its own Phaser.Tile object on import. + // You can set properties on the Tile objects, such as collision, n-way movement and meta data. + // A Tilemap uses a Tileset to render. The indexes in the map corresponding to the Tileset indexes. + // This way multiple levels can share the same single Tileset without requiring one each. + tileset = game.cache.getTileset('tiles'); + + // Basically this sets EVERY SINGLE tile to fully collide on all faces + tileset.setCollisionRange(0, tileset.total - 1, true, true, true, true); + + // And this turns off collision on the only tile we don't want collision on :) + tileset.setCollision(6, false, false, false, false); + tileset.setCollision(31, false, false, false, false); + tileset.setCollision(34, false, false, false, false); + tileset.setCollision(35, false, false, false, false); + tileset.setCollision(46, false, false, false, false); + + // A TilemapLayer consists of an x,y coordinate (position), a width and height, a Tileset and a Tilemap which it uses for map data. + // The x/y coordinates are in World space and you can place the tilemap layer anywhere in the world. + // The width/height is the rendered size of the layer in pixels, not the size of the map data itself. + + // This one gives tileset as a string, the other an object + layer = new Phaser.TilemapLayer(game, 0, 0, 800, 600, tileset, map, 0); + // layer = new Phaser.TilemapLayer(game, 0, 0, 400, 200, tileset, map, 0); + // layer.sprite.scale.setTo(2, 2); + + // layer.sprite.anchor.setTo(0.5, 0.5); + + layer.resizeWorld(); + + game.world.add(layer.sprite); + + // This is a bit nuts, ought to find a way to automate it, but it looks cool :) + map.debugMap = [ '#000000', + '#e40058', '#e40058', '#e40058', '#80d010', '#bcbcbc', '#e40058', '#000000', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc', '#e40058', '#e40058', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#80d010', '#80d010', '#80d010', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#80d010', '#0070ec', + '#0070ec', '#24188c', '#24188c', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#80d010', '#80d010', '#80d010', '#e40058', + '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#80d010', '#bcbcbc', '#80d010', '#000000', '#80d010', + '#80d010', '#80d010', '#bcbcbc', '#e40058', '#80d010', '#80d010', '#e40058', '#e40058', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', + '#bcbcbc', '#bcbcbc' + ]; + + // map.dump(); + + // layer.sprite.scale.setTo(2, 2); + + // Works a treat :) + // game.add.sprite(320, 0, layer.texture, layer.frame); + // game.add.sprite(0, 200, layer.texture, layer.frame); + // game.add.sprite(320, 200, layer.texture, layer.frame); + + // game.world.setBounds(0, 0, 2000, 2000); + // game.camera.x = 400; + + sprite = game.add.sprite(450, 80, 'phaser'); + sprite.anchor.setTo(0.5, 0.5); + // sprite.x = 140; + // sprite.y = 40; + + //sprite.scale.setTo(2, 2); + + // sprite.body.gravity.y = 100; + // sprite.body.bounce.x = 0.5; + // sprite.body.bounce.y = 0.2; + + game.camera.follow(sprite); + game.camera.deadzone = new Phaser.Rectangle(160, 160, layer.renderWidth-320, layer.renderHeight-320); + + cursors = game.input.keyboard.createCursorKeys(); + +} + +function update() { + + layer.update(); + + // getTiles: function (x, y, width, height, collides, layer) { + overlap = layer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true); + + if (overlap.length > 1) + { + for (var i = 1; i < overlap.length; i++) + { + game.physics.separateTile(sprite.body, overlap[i]); + } + } + + sprite.body.velocity.x = 0; + sprite.body.velocity.y = 0; + + if (cursors.up.isDown) + { + sprite.body.velocity.y = -150; + } + else if (cursors.down.isDown) + { + sprite.body.velocity.y = 150; + } + + if (cursors.left.isDown) + { + sprite.body.velocity.x = -150; + sprite.scale.x = -1; + } + else if (cursors.right.isDown) + { + sprite.body.velocity.x = 150; + sprite.scale.x = 1; + } + + +} + +function render() { + + layer.render(); + + // game.debug.renderSpriteBody(sprite); + + // game.debug.renderSpriteInfo(sprite, 32, 450); + + // game.debug.renderCameraInfo(game.camera, 32, 32); + + /* + game.context.save(); + game.context.setTransform(1, 0, 0, 1, 0, 0); + + + game.context.fillStyle = 'rgba(255, 0, 0, 0.5)'; + + if (overlap.length > 1) + { + var x = 0; + var y = 0; + + for (var i = 1; i < overlap.length; i++) + { + game.context.drawImage( + overlap[i].tile.tileset.image, + overlap[i].tile.x, + overlap[i].tile.y, + overlap[i].tile.width, + overlap[i].tile.height, + 0 + (x * overlap[i].tile.width), + 420 + (y * overlap[i].tile.height), + overlap[i].tile.width, + overlap[i].tile.height + ); + + if (overlap[i].tile.collideNone == false) + { + game.context.fillRect(0 + (x * overlap[i].tile.width), 420 + (y * overlap[i].tile.height), overlap[i].tile.width, overlap[i].tile.height); + } + + x++; + + if (x == overlap[0].tw) + { + x = 0; + y++; + } + } + } + + game.context.restore(); + */ + + // game.debug.renderRectangle(game.camera.deadzone, 'rgba(0,200,0,0.5)'); + +} diff --git a/examples/tilemaps/wip4.php b/examples/tilemaps/wip4.php deleted file mode 100644 index acf5807d..00000000 --- a/examples/tilemaps/wip4.php +++ /dev/null @@ -1,210 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/bounce.js b/examples/tweens/bounce.js new file mode 100644 index 00000000..cbb7185e --- /dev/null +++ b/examples/tweens/bounce.js @@ -0,0 +1,29 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('ball', 'assets/sprites/yellow_ball.png'); + +} + +var ball; + +function create() { + + ball = game.add.sprite(300, 0, 'ball'); + + startBounceTween(); +} + +function startBounceTween() { + + ball.y = 0; + + var bounce=game.add.tween(ball); + + bounce.to({ y: game.world.height-ball.height }, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.In); + bounce.onComplete.add(startBounceTween, this); + bounce.start(); + +} diff --git a/examples/tweens/bounce.php b/examples/tweens/bounce.php deleted file mode 100644 index 92a6663e..00000000 --- a/examples/tweens/bounce.php +++ /dev/null @@ -1,48 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/bubbles.js b/examples/tweens/bubbles.js new file mode 100644 index 00000000..e71f967d --- /dev/null +++ b/examples/tweens/bubbles.js @@ -0,0 +1,26 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('space', 'assets/misc/starfield.png', 138, 15); + game.load.image('ball', 'assets/sprites/shinyball.png'); + +} + +function create() { + + game.add.tileSprite(0, 0, 800, 600, 'space'); + + for (var i = 0; i < 30; i++) + { + var sprite = game.add.sprite(game.world.randomX,game.world.randomY,'ball'); + + // Fade in a sprite + game.add.tween(sprite).to({ y: -50 }, Math.random() * 4500, Phaser.Easing.Cubic.Out, true); + + // This tween starts with a random length delay + game.add.tween(sprite).to({ alpha: 0 }, Math.random() * 4500, Phaser.Easing.Quadratic.InOut, true, Math.random() * 500); + } + +} diff --git a/examples/tweens/bubbles.php b/examples/tweens/bubbles.php deleted file mode 100644 index cee5199d..00000000 --- a/examples/tweens/bubbles.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/chained tweens.js b/examples/tweens/chained tweens.js new file mode 100644 index 00000000..e324d043 --- /dev/null +++ b/examples/tweens/chained tweens.js @@ -0,0 +1,24 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('diamond', 'assets/sprites/diamond.png'); + +} + +function create() { + + game.stage.backgroundColor = 0x2d2d2d; + + var sprite = game.add.sprite(100, 100, 'diamond'); + + // Here we'll chain 4 different tweens together and play through them all in a loop + var tween = game.add.tween(sprite).to({ x: 600 }, 2000, Phaser.Easing.Linear.None) + .to({ y: 300 }, 1000, Phaser.Easing.Linear.None) + .to({ x: 100 }, 2000, Phaser.Easing.Linear.None) + .to({ y: 100 }, 1000, Phaser.Easing.Linear.None) + .loop() + .start(); + +} diff --git a/examples/tweens/chained tweens.php b/examples/tweens/chained tweens.php deleted file mode 100644 index 8b2acf68..00000000 --- a/examples/tweens/chained tweens.php +++ /dev/null @@ -1,54 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/combined tweens.js b/examples/tweens/combined tweens.js new file mode 100644 index 00000000..b228b1c9 --- /dev/null +++ b/examples/tweens/combined tweens.js @@ -0,0 +1,52 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', {preload:preload,create: create }); + +function preload() { + + game.load.spritesheet('pig', 'assets/sprites/invaderpig.png', 124, 104); + game.load.image('starfield', 'assets/misc/starfield.jpg'); + game.load.image('mushroom', 'assets/sprites/mushroom2.png'); + +} + +var mushroom; +var pig; +var pigArrives; +var s; + +function create() { + + game.add.tileSprite(0, 0, 800, 600, 'starfield'); + + pig = game.add.sprite(-50, 200, 'pig', 1); + + pig.scale.setTo(0.5, 0.5); + + mushroom = game.add.sprite(380, 200, 'mushroom'); + mushroom.anchor.setTo(0.5, 0.5); + + pigArrives = game.add.tween(pig); + + pigArrives.to({x:150}, 1000, Phaser.Easing.Bounce.Out); + pigArrives.onComplete.add(firstTween, this); + pigArrives.start(); + +} + +function firstTween() { + + s = game.add.tween(mushroom.scale); + s.to({x: 2, y:2}, 1000, Phaser.Easing.Linear.None); + s.onComplete.addOnce(theEnd, this); + s.start(); + +} + +function theEnd() { + + e = game.add.tween(pig); + + e.to({ x: -150 }, 1000, Phaser.Easing.Bounce.Out); + e.start(); + +} diff --git a/examples/tweens/combined tweens.php b/examples/tweens/combined tweens.php deleted file mode 100644 index 7afd42e8..00000000 --- a/examples/tweens/combined tweens.php +++ /dev/null @@ -1,73 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/easing spritesheets.js b/examples/tweens/easing spritesheets.js new file mode 100644 index 00000000..02d93b80 --- /dev/null +++ b/examples/tweens/easing spritesheets.js @@ -0,0 +1,25 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', {preload:preload,create: create }); + +function preload() { + + game.load.spritesheet('phaser', 'assets/tests/tween/phaser.png', 70, 90); + game.load.image('starfield', 'assets/misc/starfield.jpg'); + +} + +function create() { + + var item; + + game.add.tileSprite(0, 0, 800, 600, 'starfield'); + + for (var i = 0; i < 6; i++) + { + item = game.add.sprite(190 + 69 * i, -90, 'phaser', i); + + // Add a simple bounce tween to each character's position. + game.add.tween(item).to({y: 240}, 2400, Phaser.Easing.Bounce.Out, true, 1000 + 400 * i, false); + } + +} diff --git a/examples/tweens/easing spritesheets.php b/examples/tweens/easing spritesheets.php deleted file mode 100644 index 18f0ae62..00000000 --- a/examples/tweens/easing spritesheets.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/easing.js b/examples/tweens/easing.js new file mode 100644 index 00000000..c3a2174b --- /dev/null +++ b/examples/tweens/easing.js @@ -0,0 +1,46 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.spritesheet('shadow', 'assets/tests/tween/shadow.png', 138, 15); + game.load.spritesheet('phaser', 'assets/tests/tween/phaser.png', 70, 90); + +} + +function create() { + + var item; + var shadow; + var tween; + + // Sets background color to white. + game.stage.backgroundColor = '#ffffff'; + + for (var i = 0; i < 6; i++) + { + // Add a shadow to the location which characters will land on. + // And tween their size to make them look like a real shadow. + // Put the following code before items to give shadow a lower + // render order. + shadow = game.add.sprite(190 + 69 * i, 284, 'shadow'); + + // Set shadow's size 0 so that it'll be invisible at the beginning. + shadow.scale.setTo(0.0, 0.0); + + // Also set the origin to the center since we don't want to + // see the shadow scale to the left top. + shadow.anchor.setTo(0.5, 0.5); + game.add.tween(shadow.scale).to({x: 1.0, y: 1.0}, 2400, Phaser.Easing.Bounce.Out); + + // Add characters on top of shadows. + item = game.add.sprite(190 + 69 * i, -100, 'phaser', i); + + // Set origin to the center to make the rotation look better. + item.anchor.setTo(0.5, 0.5); + + // Add a simple bounce tween to each character's position. + tween = game.add.tween(item).to({y: 240}, 2400, Phaser.Easing.Bounce.Out); + } + +} diff --git a/examples/tweens/easing.php b/examples/tweens/easing.php deleted file mode 100644 index 6dc369f2..00000000 --- a/examples/tweens/easing.php +++ /dev/null @@ -1,54 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/fading in a sprite.js b/examples/tweens/fading in a sprite.js new file mode 100644 index 00000000..5b43a76e --- /dev/null +++ b/examples/tweens/fading in a sprite.js @@ -0,0 +1,22 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('space', 'assets/misc/starfield.png', 138, 15); + game.load.image('logo', 'assets/sprites/phaser2.png'); + +} + +function create() { + + game.add.tileSprite(0, 0, 800, 600, 'space'); + + var sprite = game.add.sprite(game.world.centerX, game.world.centerY, 'logo'); + + sprite.anchor.setTo(0.5, 0.5); + sprite.alpha = 0; + + game.add.tween(sprite).to( { alpha: 1 }, 2000, Phaser.Easing.Linear.None, true, 0, 1000, true); + +} diff --git a/examples/tweens/fading in a sprite.php b/examples/tweens/fading in a sprite.php deleted file mode 100644 index ca4f11f0..00000000 --- a/examples/tweens/fading in a sprite.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tweens/pause tween.js b/examples/tweens/pause tween.js new file mode 100644 index 00000000..c6689e95 --- /dev/null +++ b/examples/tweens/pause tween.js @@ -0,0 +1,41 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +var p; +var tween; +var button; +var flag = true; + +function preload() { + + game.load.image('diamond', 'assets/sprites/diamond.png'); + game.load.spritesheet('button', 'assets/buttons/button_sprite_sheet.png', 193, 71); + +} + +function create() { + + game.stage.backgroundColor = 0x2d2d2d; + + p = game.add.sprite(100, 100, 'diamond'); + + tween = game.add.tween(p).to({ x: 600 }, 4000, Phaser.Easing.Linear.None, true, 0, 1000, true) + + button = game.add.button(game.world.centerX, 400, 'button', actionOnClick, this, 2, 1, 0); + +} + +function actionOnClick() { + + if (flag) + { + tween.pause(); + } + else + { + tween.resume(); + } + + flag = !flag; + +} diff --git a/examples/tweens/tween several properties.js b/examples/tweens/tween several properties.js new file mode 100644 index 00000000..ff72610e --- /dev/null +++ b/examples/tweens/tween several properties.js @@ -0,0 +1,29 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('sky', 'assets/skies/sky4.png'); + game.load.spritesheet('phaser', 'assets/tests/tween/phaser.png', 70, 90); + +} + +function create() { + + game.add.sprite(0, 0, 'sky'); + + var item; + + for (var i = 0; i < 6; i++) + { + item = game.add.sprite(190 + 69 * i, -100, 'phaser', i); + item.anchor.setTo(0.5,0.5); + + // Add a simple bounce tween to each character's position. + game.add.tween(item).to({y: 240}, 2400, Phaser.Easing.Bounce.Out, true, 1000 + 400 * i, false); + + // Add another rotation tween to the same character. + game.add.tween(item).to({angle: 360}, 2400, Phaser.Easing.Cubic.In, true, 1000 + 400 * i, false); + } + +} diff --git a/examples/tweens/tween several properties.php b/examples/tweens/tween several properties.php deleted file mode 100644 index 4d6c8a58..00000000 --- a/examples/tweens/tween several properties.php +++ /dev/null @@ -1,40 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/view_full.php b/examples/view_full.php new file mode 100644 index 00000000..57a1f847 --- /dev/null +++ b/examples/view_full.php @@ -0,0 +1,103 @@ + + + + + + phaser - <?php echo $title?> + + + + + + + + + +
    +
    +
    + Phaser Version: 1.1 + +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    +
      +
    • +
    • +
    • +
    +
    +
    +
    + +
    +

    Source code:

    +
    +        
    +        
    + + +
    + + + \ No newline at end of file diff --git a/examples/view_lite.php b/examples/view_lite.php new file mode 100644 index 00000000..ec29f7f3 --- /dev/null +++ b/examples/view_lite.php @@ -0,0 +1,28 @@ + + + + + + phaser - <?php echo $title?> + + + + + + +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/examples/view_plain.php b/examples/view_plain.php new file mode 100644 index 00000000..7c7a4218 --- /dev/null +++ b/examples/view_plain.php @@ -0,0 +1,27 @@ + + + + + + <?php echo $title?> + + + + + + +
    + + + \ No newline at end of file diff --git a/examples/world/fixed to camera.js b/examples/world/fixed to camera.js new file mode 100644 index 00000000..a49b4e7c --- /dev/null +++ b/examples/world/fixed to camera.js @@ -0,0 +1,66 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render : render }); + +function preload() { + + game.stage.backgroundColor = '#007236'; + + game.load.image('mushroom', 'assets/sprites/mushroom2.png'); + game.load.image('sonic', 'assets/sprites/sonic_havok_sanity.png'); + game.load.image('phaser', 'assets/sprites/phaser1.png'); + +} + +var cursors; +var logo1; +var logo2; + +function create() { + + // Modify the world and camera bounds + game.world.setBounds(-1000, -1000, 2000, 2000); + + for (var i = 0; i < 200; i++) + { + game.add.sprite(game.world.randomX, game.world.randomY, 'mushroom'); + } + + logo1 = game.add.sprite(100, 100, 'phaser'); + logo1.fixedToCamera = true; + + logo2 = game.add.sprite(500, 100, 'phaser'); + logo2.fixedToCamera = true; + + game.add.tween(logo2).to( { y: 400 }, 2000, Phaser.Easing.Back.InOut, true, 0, 2000, true); + + cursors = game.input.keyboard.createCursorKeys(); + +} + +function update() { + + if (cursors.up.isDown) + { + game.camera.y -= 4; + } + else if (cursors.down.isDown) + { + game.camera.y += 4; + } + + if (cursors.left.isDown) + { + game.camera.x -= 4; + } + else if (cursors.right.isDown) + { + game.camera.x += 4; + } + +} + +function render() { + + game.debug.renderCameraInfo(game.camera, 32, 32); + +} diff --git a/examples/world/fixed to camera.php b/examples/world/fixed to camera.php deleted file mode 100644 index a3ab8dfe..00000000 --- a/examples/world/fixed to camera.php +++ /dev/null @@ -1,83 +0,0 @@ - - - - - diff --git a/examples/world/move around world.js b/examples/world/move around world.js new file mode 100644 index 00000000..52573551 --- /dev/null +++ b/examples/world/move around world.js @@ -0,0 +1,95 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render : render }); + +function preload() { + + game.stage.backgroundColor = '#007236'; + + game.load.image('mushroom', 'assets/sprites/mushroom2.png'); + game.load.image('phaser', 'assets/sprites/sonic_havok_sanity.png'); + +} + +var cursors; +var d; + +function create() { + + // Modify the world and camera bounds + game.world.setBounds(-1000, -1000, 2000, 2000); + + for (var i = 0; i < 100; i++) + { + game.add.sprite(game.world.randomX, game.world.randomY, 'mushroom'); + } + + game.add.text(600, 800, "- phaser -", { font: "32px Arial", fill: "#330088", align: "center" }); + + d = game.add.sprite(0, 0, 'phaser'); + d.anchor.setTo(0.5, 0.5); + + cursors = game.input.keyboard.createCursorKeys(); + +} + +function update() { + + d.angle += 1; + + if (cursors.up.isDown) + { + if (cursors.up.shiftKey) + { + d.angle++; + } + else + { + game.camera.y -= 4; + } + } + else if (cursors.down.isDown) + { + if (cursors.down.shiftKey) + { + d.angle--; + } + else + { + game.camera.y += 4; + } + } + + if (cursors.left.isDown) + { + if (cursors.left.shiftKey) + { + game.world.rotation -= 0.05; + } + else + { + game.camera.x -= 4; + } + } + else if (cursors.right.isDown) + { + if (cursors.right.shiftKey) + { + game.world.rotation += 0.05; + } + else + { + game.camera.x += 4; + } + } + +} + +function render() { + + game.debug.renderCameraInfo(game.camera, 32, 32); + game.debug.renderSpriteInfo(d, 32, 200); + // game.debug.renderWorldTransformInfo(d, 32, 200); + // game.debug.renderLocalTransformInfo(d, 32, 400); + game.debug.renderSpriteCorners(d, false, true); + +} diff --git a/examples/world/move around world.php b/examples/world/move around world.php deleted file mode 100644 index 66f5d7c2..00000000 --- a/examples/world/move around world.php +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - From 77fd15bf3c763b359df772a7b99935512adbf5d9 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Tue, 22 Oct 2013 14:59:43 +0100 Subject: [PATCH 092/125] Preparing new static examples viewer. --- README.md | 9 +- examples/{ => _site}/build.php | 0 .../css/phaser-examples.css} | 83 +++++++------- examples/{ => _site}/examples.json | 0 .../fonts}/HelveticaNeueLTStd-Bd.otf | Bin .../html => _site/fonts}/inconsolata.woff | Bin examples/{ => _site}/funcs.php | 0 .../html => _site/images}/bg-footer.jpg | Bin .../html => _site/images}/controls-label.png | Bin .../html => _site/images}/down-label.png | Bin .../html => _site/images}/flixel-logo.png | Bin .../html => _site/images}/footer-bg.jpg | Bin .../html => _site/images}/footer-bg2.jpg | Bin .../html => _site/images}/forums-icon.png | Bin .../images}/game-controls-bg.jpg | Bin .../html => _site/images}/github-icon.png | Bin .../html => _site/images}/gradient-bg.jpg | Bin .../images}/group-item-hover.png | Bin .../html => _site/images}/group-item.png | Bin .../html => _site/images}/header-bg.jpg | Bin .../html => _site/images}/header-bg2.jpg | Bin .../{assets/html => _site/images}/laser1.png | Bin .../{assets/html => _site/images}/laser10.png | Bin .../{assets/html => _site/images}/laser2.png | Bin .../{assets/html => _site/images}/laser3.png | Bin .../{assets/html => _site/images}/laser4.png | Bin .../{assets/html => _site/images}/laser5.png | Bin .../{assets/html => _site/images}/laser6.png | Bin .../{assets/html => _site/images}/laser7.png | Bin .../{assets/html => _site/images}/laser8.png | Bin .../{assets/html => _site/images}/laser9.png | Bin .../html => _site/images}/left-label.png | Bin .../html => _site/images}/lite_footer.jpg | Bin .../html => _site/images}/lite_header.jpg | Bin .../html => _site/images}/lite_header_2.jpg | Bin .../html => _site/images}/mute-button.png | Bin .../html => _site/images}/nav-icons.png | Bin .../html => _site/images}/pause-button.png | Bin .../html => _site/images}/phaser-examples.png | Bin .../html => _site/images}/phaser-logo.png | Bin .../html => _site/images}/phaser-version.png | Bin .../images}/photonstorm-logo.png | Bin .../html => _site/images}/prize-bg.png | Bin .../html => _site/images}/prize-button.png | Bin .../html => _site/images}/reset-button.png | Bin .../html => _site/images}/right-label.png | Bin .../html => _site/images}/space-label.png | Bin .../html => _site/images}/twitter-icon.png | Bin .../html => _site/images}/up-label.png | Bin .../html => _site/images}/version-button.png | Bin examples/{ => _site}/index.php | 0 .../{assets/html => _site/js}/application.js | 0 examples/_site/js/phaser-examples.js | 77 +++++++++++++ examples/{ => _site}/lite.php | 0 examples/{ => _site}/phaser-debug-js.php | 0 .../html => _site/templates}/demo.html | 0 .../html => _site/templates}/index.html | 0 .../{view_full.php => _site/view_full.html} | 0 examples/_site/view_full.php | 103 ++++++++++++++++++ examples/{ => _site}/view_lite.php | 0 examples/{ => _site}/view_plain.php | 0 examples/assets/bd/back.png | Bin 248 -> 0 bytes examples/assets/bd/back2.png | Bin 399 -> 0 bytes examples/assets/bd/burd.png | Bin 675 -> 0 bytes examples/assets/bd/scroller.png | Bin 1369 -> 0 bytes examples/assets/fonts/tiw_font.png | Bin 0 -> 9861 bytes examples/assets/suite/background.png | Bin 3300 -> 0 bytes examples/index.html | 73 +++++++++++++ 68 files changed, 301 insertions(+), 44 deletions(-) rename examples/{ => _site}/build.php (100%) rename examples/{stylesheet.css => _site/css/phaser-examples.css} (63%) rename examples/{ => _site}/examples.json (100%) rename examples/{assets/html => _site/fonts}/HelveticaNeueLTStd-Bd.otf (100%) rename examples/{assets/html => _site/fonts}/inconsolata.woff (100%) rename examples/{ => _site}/funcs.php (100%) rename examples/{assets/html => _site/images}/bg-footer.jpg (100%) rename examples/{assets/html => _site/images}/controls-label.png (100%) rename examples/{assets/html => _site/images}/down-label.png (100%) rename examples/{assets/html => _site/images}/flixel-logo.png (100%) rename examples/{assets/html => _site/images}/footer-bg.jpg (100%) rename examples/{assets/html => _site/images}/footer-bg2.jpg (100%) rename examples/{assets/html => _site/images}/forums-icon.png (100%) rename examples/{assets/html => _site/images}/game-controls-bg.jpg (100%) rename examples/{assets/html => _site/images}/github-icon.png (100%) rename examples/{assets/html => _site/images}/gradient-bg.jpg (100%) rename examples/{assets/html => _site/images}/group-item-hover.png (100%) rename examples/{assets/html => _site/images}/group-item.png (100%) rename examples/{assets/html => _site/images}/header-bg.jpg (100%) rename examples/{assets/html => _site/images}/header-bg2.jpg (100%) rename examples/{assets/html => _site/images}/laser1.png (100%) rename examples/{assets/html => _site/images}/laser10.png (100%) rename examples/{assets/html => _site/images}/laser2.png (100%) rename examples/{assets/html => _site/images}/laser3.png (100%) rename examples/{assets/html => _site/images}/laser4.png (100%) rename examples/{assets/html => _site/images}/laser5.png (100%) rename examples/{assets/html => _site/images}/laser6.png (100%) rename examples/{assets/html => _site/images}/laser7.png (100%) rename examples/{assets/html => _site/images}/laser8.png (100%) rename examples/{assets/html => _site/images}/laser9.png (100%) rename examples/{assets/html => _site/images}/left-label.png (100%) rename examples/{assets/html => _site/images}/lite_footer.jpg (100%) rename examples/{assets/html => _site/images}/lite_header.jpg (100%) rename examples/{assets/html => _site/images}/lite_header_2.jpg (100%) rename examples/{assets/html => _site/images}/mute-button.png (100%) rename examples/{assets/html => _site/images}/nav-icons.png (100%) rename examples/{assets/html => _site/images}/pause-button.png (100%) rename examples/{assets/html => _site/images}/phaser-examples.png (100%) rename examples/{assets/html => _site/images}/phaser-logo.png (100%) rename examples/{assets/html => _site/images}/phaser-version.png (100%) rename examples/{assets/html => _site/images}/photonstorm-logo.png (100%) rename examples/{assets/html => _site/images}/prize-bg.png (100%) rename examples/{assets/html => _site/images}/prize-button.png (100%) rename examples/{assets/html => _site/images}/reset-button.png (100%) rename examples/{assets/html => _site/images}/right-label.png (100%) rename examples/{assets/html => _site/images}/space-label.png (100%) rename examples/{assets/html => _site/images}/twitter-icon.png (100%) rename examples/{assets/html => _site/images}/up-label.png (100%) rename examples/{assets/html => _site/images}/version-button.png (100%) rename examples/{ => _site}/index.php (100%) rename examples/{assets/html => _site/js}/application.js (100%) create mode 100644 examples/_site/js/phaser-examples.js rename examples/{ => _site}/lite.php (100%) rename examples/{ => _site}/phaser-debug-js.php (100%) rename examples/{assets/html => _site/templates}/demo.html (100%) rename examples/{assets/html => _site/templates}/index.html (100%) rename examples/{view_full.php => _site/view_full.html} (100%) create mode 100644 examples/_site/view_full.php rename examples/{ => _site}/view_lite.php (100%) rename examples/{ => _site}/view_plain.php (100%) delete mode 100644 examples/assets/bd/back.png delete mode 100644 examples/assets/bd/back2.png delete mode 100644 examples/assets/bd/burd.png delete mode 100644 examples/assets/bd/scroller.png create mode 100644 examples/assets/fonts/tiw_font.png delete mode 100644 examples/assets/suite/background.png create mode 100644 examples/index.html diff --git a/README.md b/README.md index 58e9d07e..67a34ccc 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,11 @@ By Richard Davey, [Photon Storm](http://www.photonstorm.com) View the [Official Website](http://phaser.io)
    Follow on [Twitter](https://twitter.com/photonstorm)
    Read the [Development Blog](http://www.photonstorm.com)
    -Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/) +Join the [Forum](http://www.html5gamedevs.com/forum/14-phaser/)
    Try out the [Phaser Test Suite](http://gametest.mobi/phaser/) +[Un-official Getting Started with Phaser](http://www.antonoffplus.com/coding-an-html5-game-for-30-minutes-or-an-introduction-to-the-phaser-framework) + "Being negative is not how we make progress" - Larry Page, Google Welcome to Phaser @@ -35,7 +37,7 @@ Phaser is everything we ever wanted from an HTML5 game framework. It will power Change Log ---------- -Version 1.0.7 (in progress in the dev branch) +Version 1.1 (in progress in the dev branch) * JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. * Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. @@ -303,7 +305,6 @@ Known Issues ------------ * The TypeScript definition file isn't yet complete. -* The JSDOCS are not yet complete. Future Plans ------------ @@ -322,8 +323,6 @@ The following list is not exhaustive and is subject to change: * Flash CC html output support. * Game parameters read from Google Docs. -Right now however our main focus is on documentation and examples, we won't be touching any of the above features until the docs are finished. - Test Suite ---------- diff --git a/examples/build.php b/examples/_site/build.php similarity index 100% rename from examples/build.php rename to examples/_site/build.php diff --git a/examples/stylesheet.css b/examples/_site/css/phaser-examples.css similarity index 63% rename from examples/stylesheet.css rename to examples/_site/css/phaser-examples.css index c205af54..7b77cc1f 100644 --- a/examples/stylesheet.css +++ b/examples/_site/css/phaser-examples.css @@ -8,7 +8,7 @@ blockquote, q {quotes: none;} blockquote:before, blockquote:after, q:before, q:after {content: ''; content: none;} table {border-collapse: collapse; border-spacing: 0;} /* reset css ends */ -@font-face{font-family: 'HelveticaBd'; src: url('assets/html/HelveticaNeueLTStd-Bd.otf');} +@font-face{font-family: 'HelveticaBd'; src: url('../../_site/fonts/HelveticaNeueLTStd-Bd.otf');} body { margin:0; padding:0; overflow-x: hidden; font-family: Arial, Tahoma, Verdana !important; background: #e0e4f1;} @@ -16,30 +16,35 @@ a{color:#fff; text-decoration: none;} a:hover{text-decoration: underline;} .helvetica{font-family: Arial, Tahoma, Verdana !important;} -.header{background: #e0e4f1 url('assets/html/header-bg2.jpg') no-repeat; width:100%; margin:0; padding:0; background-size: cover; height: 530px; display: block; clear:both; margin-bottom: -400px} +.header{background: #e0e4f1 url('../../_site/images/header-bg2.jpg') no-repeat; width:100%; margin:0; padding:0; background-size: cover; height: 530px; display: block; clear:both; margin-bottom: -400px} .main-container{display: block; clear:both; width: 1125px; height: auto; margin:0 auto;} ul.nav-links{ margin:0; padding:0; display: inline-block; float: right; list-style-type: none; color: #fff; font-size: 15px; line-height: 2em; margin-top: 50px; min-width: 180px;} ul.nav-links > li{margin:0; padding:0; list-style-type: none; padding-left: 55px;} ul.nav-links > li > a{color: #fff; text-decoration: none;} ul.nav-links > li > a:hover{text-decoration: underline;} -.link-home, .link-latest, .link-forum, .link-docs, .link-twitter{background-image: url('assets/html/nav-icons.png'); background-repeat: no-repeat;} +.link-home, .link-latest, .link-forum, .link-docs, .link-twitter{background-image: url('../../_site/images/nav-icons.png'); background-repeat: no-repeat;} -.main-title{font-family: 'HelveticaBd', Helvetica, Arial;font-size:55px;color:#fff;text-shadow:0 0 15px #b643e6; text-align: center; display: block; text-transform: xuppercase; margin: 40px auto 0 auto;} +.main-title{font-family: 'HelveticaBd', Helvetica, Arial;font-size:55px;color:#fff;text-shadow:0 0 15px #b643e6; text-align: center; display: block; margin: 40px auto 0 auto;} .link-home{background-position: 0 -9px;} .link-latest{background-position: 0 -37px;} .link-forum{background-position: 0 -67px;} .link-docs{background-position: 0 -97px;} .link-twitter{background-position: 0 -127px;} -.phaser-examples{background: url('assets/html/phaser-examples.png') no-repeat; display: block; width: 485px; height: 205px; margin: 20px auto;} -.phaser-version{float: right; background: url('assets/html/phaser-version.png') no-repeat; display: block; width: 345px; height: 30px; color: #fff; font-size: 11px; text-shadow: 1px 1px #000; right:0; top:0; } +.phaser-examples{background: url('../../_site/images/phaser-examples.png') no-repeat; display: block; width: 485px; height: 205px; margin: 20px auto;} +.phaser-version{float: right; background: url('../../_site/images/phaser-version.png') no-repeat; display: block; width: 345px; height: 30px; color: #fff; font-size: 11px; text-shadow: 1px 1px #000; right:0; top:0; } .phaser-version > span{margin-top: 10px; display: inline-block; margin-left: 60px; margin-right: 25px;} -.phaser-version > a{color: #fff; text-decoration: none; background: url('assets/html/version-button.png') no-repeat; background-size: cover; display: inline-block; width: 123px; height: 10px; vertical-align: middle; text-align: center;padding-top:11px; padding-bottom: 11px} +.phaser-version > a{color: #fff; text-decoration: none; background: url('../../_site/images/version-button.png') no-repeat; background-size: cover; display: inline-block; width: 123px; height: 10px; vertical-align: middle; text-align: center;padding-top:11px; padding-bottom: 11px} .phaser-version > a:hover{text-decoration: underline;} -.phaser-logo{display: block; float: right; width: 168px;height: 144px; background: url('assets/html/phaser-logo.png') no-repeat; margin-top: 40px; margin-right: 40px;} +.phaser-logo{display: block; float: right; width: 168px;height: 144px; background: url('../../_site/images/phaser-logo.png') no-repeat; margin-top: 40px; margin-right: 40px;} + +.error { margin-left: 48px; width: 700px; background-color: rgb(150,25,25); color:#fff; text-shadow: 1px 1px 0 #000; line-height: 24px } + +.error p { + padding: 16px 24px; +} .line{display:block;clear:both; width:100%; margin:0;padding:0; float:left; background-color: transparent;} -.xxgo-top{margin-top: -200px;} .box5, .box10, .box15 .box20, .box25, .box30, .box35, .box40, .box45, .box50, .box55, .box60, .box65, .box70, .box75, .box80, .box85, .box90, .box95, .box100{position: relative;display: inline-block; box-sizing: border-box; padding: 5px 10px; -moz-box-sizing: border-box; vertical-align: top; margin:0;} .float-right{float:right !important;} @@ -78,36 +83,36 @@ ul.nav-links > li > a:hover{text-decoration: underline;} p.title{font-family: 'HelveticaBd', Helvetica, Arial; font-size: 30px; color: #fff; text-shadow: 0 1px 3px #9e6ce8; text-align: right;} p.count-examples{font-size: 12px; color: #676773; text-align: right;} -ul.group-items{background-image: url('assets/html/laser1.png'); background-repeat: no-repeat; background-position: left top 5px; padding-left: 125px; width: 875px !important;} -ul.group-items > li{width: 213px; padding-top: 15px; height: 35px; background: url('assets/html/group-item.png') no-repeat; text-align: center; display: inline-block; margin-bottom: 15px} +ul.group-items{background-image: url('../../_site/images/laser1.png'); background-repeat: no-repeat; background-position: left top 5px; padding-left: 125px; width: 875px !important;} +ul.group-items > li{width: 213px; padding-top: 15px; height: 35px; background: url('../../_site/images/group-item.png') no-repeat; text-align: center; display: inline-block; margin-bottom: 15px} ul.group-items > li a{display:block; width:100%; height: 100%; padding: 20px 0; margin-top: -20px; color:#333;} ul.group-items > li a:hover{cursor: pointer; text-decoration: underline;} ul.group-items > li a span.mark{display:inline-block;width: 1px; height: 25px; vertical-align: middle;} -ul.group-items > li a:visited span.mark{background: url('assets/html/group-item-hover.png') no-repeat; background-position: center center;width:25px; padding-left:4px;} +ul.group-items > li a:visited span.mark{background: url('../../_site/images/group-item-hover.png') no-repeat; background-position: center center;width:25px; padding-left:4px;} -.laser2{background-image: url('assets/html/laser2.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser3{background-image: url('assets/html/laser3.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser4{background-image: url('assets/html/laser4.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser5{background-image: url('assets/html/laser5.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser6{background-image: url('assets/html/laser6.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser7{background-image: url('assets/html/laser7.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser8{background-image: url('assets/html/laser8.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser9{background-image: url('assets/html/laser9.png') !important; background-repeat: no-repeat; background-position: center 20px;} -.laser10{background-image: url('assets/html/laser10.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser2{background-image: url('../../_site/images/laser2.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser3{background-image: url('../../_site/images/laser3.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser4{background-image: url('../../_site/images/laser4.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser5{background-image: url('../../_site/images/laser5.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser6{background-image: url('../../_site/images/laser6.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser7{background-image: url('../../_site/images/laser7.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser8{background-image: url('../../_site/images/laser8.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser9{background-image: url('../../_site/images/laser9.png') !important; background-repeat: no-repeat; background-position: center 20px;} +.laser10{background-image: url('../../_site/images/laser10.png') !important; background-repeat: no-repeat; background-position: center 20px;} .bright-bg, .dark-bg{border-bottom: 1px solid #d1d1d1; padding:25px 0;} .border-bottom{border-bottom: 1px solid #d1d1d1;} -.prize-bg{background: url('assets/html/prize-bg.png') no-repeat; background-size: cover; background-position: center center; height: 326px; width: 100%;} -.prize-button{text-transform: uppercase; color: #000; text-shadow: 1px 0 #fff; float:right; background: url('assets/html/prize-button.png') no-repeat; width: 300px; height: 70px; padding-top:135px; font-size: 16px; padding-left: 75px; margin-top: 25px; margin-right: 145px;} +.prize-bg{background: url('../../_site/images/prize-bg.png') no-repeat; background-size: cover; background-position: center center; height: 326px; width: 100%;} +.prize-button{text-transform: uppercase; color: #000; text-shadow: 1px 0 #fff; float:right; background: url('../../_site/images/prize-button.png') no-repeat; width: 300px; height: 70px; padding-top:135px; font-size: 16px; padding-left: 75px; margin-top: 25px; margin-right: 145px;} -.footer{ background: #e0e4f1 url('assets/html/footer-bg2.jpg') no-repeat; background-size: cover; width:100%; height: 592px; bottom:0; } -.photonstorm-logo{background: url('assets/html/photonstorm-logo.png') no-repeat; background-size: cover; display: block;clear:both; width:113px;height:15px; margin-bottom: 6px;} -.flixel-logo{display:block; clear:both; width:26px; height:50px; background: url('assets/html/flixel-logo.png') no-repeat;} -.forums-icon, .twitter-icon, .github-icon{background: url('assets/html/forums-icon.png') no-repeat; vertical-align: middle; padding-left: 68px; height: 35px; display: inline-block; padding-top: 25px;} -.twitter-icon{background: url('assets/html/twitter-icon.png') no-repeat;} -.github-icon{background: url('assets/html/github-icon.png') no-repeat;} +.footer{ background: #e0e4f1 url('../../_site/images/footer-bg2.jpg') no-repeat; background-size: cover; width:100%; height: 592px; bottom:0; } +.photonstorm-logo{background: url('../../_site/images/photonstorm-logo.png') no-repeat; background-size: cover; display: block;clear:both; width:113px;height:15px; margin-bottom: 6px;} +.flixel-logo{display:block; clear:both; width:26px; height:50px; background: url('../../_site/images/flixel-logo.png') no-repeat;} +.forums-icon, .twitter-icon, .github-icon{background: url('../../_site/images/forums-icon.png') no-repeat; vertical-align: middle; padding-left: 68px; height: 35px; display: inline-block; padding-top: 25px;} +.twitter-icon{background: url('../../_site/images/twitter-icon.png') no-repeat;} +.github-icon{background: url('../../_site/images/github-icon.png') no-repeat;} #footer .main-container .line { margin-top: 130px; @@ -119,21 +124,21 @@ ul.footer-links > li{display: inline-block; padding:0; margin:0; float:right;} .game-panel{width:800px; height: 680px; overflow: hidden; display:block; clear:both;box-shadow: 0 0 15px #6ac8f8; margin:-150px auto 0 auto; border-radius: 10px; position: relative; z-index: 10;} .game-screen{display:block; clear:both; width:800px;height:600px;margin:0;} -.game-controls{display:block; width:100%; height:80px; margin:0; padding:0;background: url('assets/html/game-controls-bg.jpg') repeat-x;} +.game-controls{display:block; width:100%; height:80px; margin:0; padding:0;background: url('../../_site/images/game-controls-bg.jpg') repeat-x;} ul.left-controls{float:left; list-style-type: none; margin:30px 0 0 25px;padding:0; display: inline-block;} ul.left-controls > li{margin:0;padding:0; display: inline-block; vertical-align: middle;} -.controls-label{display:inline-block; width:80px; height:9px; background: url('assets/html/controls-label.png') no-repeat;} -.up-label{display: inline-block; width:11px; height: 11px; background: url('assets/html/up-label.png') no-repeat;} -.down-label{display: inline-block; width:11px; height: 11px; background: url('assets/html/down-label.png') no-repeat;} -.left-label{display: inline-block; width:13px; height: 11px; background: url('assets/html/left-label.png') no-repeat;} -.right-label{display: inline-block; width:12px; height: 11px; background: url('assets/html/right-label.png') no-repeat;} -.space-label{display: inline-block; width:64px; height: 18px; background: url('assets/html/space-label.png') no-repeat;} +.controls-label{display:inline-block; width:80px; height:9px; background: url('../../_site/images/controls-label.png') no-repeat;} +.up-label{display: inline-block; width:11px; height: 11px; background: url('../../_site/images/up-label.png') no-repeat;} +.down-label{display: inline-block; width:11px; height: 11px; background: url('../../_site/images/down-label.png') no-repeat;} +.left-label{display: inline-block; width:13px; height: 11px; background: url('../../_site/images/left-label.png') no-repeat;} +.right-label{display: inline-block; width:12px; height: 11px; background: url('../../_site/images/right-label.png') no-repeat;} +.space-label{display: inline-block; width:64px; height: 18px; background: url('../../_site/images/space-label.png') no-repeat;} ul.right-controls{float:right;list-style-type: none; padding:0; display: inline-block; margin: 15px 25px 0 0;} ul.right-controls > li{margin:0;padding:0; display: inline-block; vertical-align: middle;} -.pause-button{width: 121px; height:52px; display:inline-block; background: url('assets/html/pause-button.png') no-repeat;} -.mute-button{width: 121px; height:52px; display:inline-block; background: url('assets/html/mute-button.png') no-repeat;} -.reset-button{width: 121px; height:52px; display:inline-block; background: url('assets/html/reset-button.png') no-repeat;} +.pause-button{width: 121px; height:52px; display:inline-block; background: url('../../_site/images/pause-button.png') no-repeat;} +.mute-button{width: 121px; height:52px; display:inline-block; background: url('../../_site/images/mute-button.png') no-repeat;} +.reset-button{width: 121px; height:52px; display:inline-block; background: url('../../_site/images/reset-button.png') no-repeat;} .pause-button:hover, .mute-button:hover, .reset-button:hover{cursor: pointer;} .filler{height: 720px;} .code-block{font-family: Courier; font-size: 14px; width:750px; height:auto; overflow: hidden; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} diff --git a/examples/examples.json b/examples/_site/examples.json similarity index 100% rename from examples/examples.json rename to examples/_site/examples.json diff --git a/examples/assets/html/HelveticaNeueLTStd-Bd.otf b/examples/_site/fonts/HelveticaNeueLTStd-Bd.otf similarity index 100% rename from examples/assets/html/HelveticaNeueLTStd-Bd.otf rename to examples/_site/fonts/HelveticaNeueLTStd-Bd.otf diff --git a/examples/assets/html/inconsolata.woff b/examples/_site/fonts/inconsolata.woff similarity index 100% rename from examples/assets/html/inconsolata.woff rename to examples/_site/fonts/inconsolata.woff diff --git a/examples/funcs.php b/examples/_site/funcs.php similarity index 100% rename from examples/funcs.php rename to examples/_site/funcs.php diff --git a/examples/assets/html/bg-footer.jpg b/examples/_site/images/bg-footer.jpg similarity index 100% rename from examples/assets/html/bg-footer.jpg rename to examples/_site/images/bg-footer.jpg diff --git a/examples/assets/html/controls-label.png b/examples/_site/images/controls-label.png similarity index 100% rename from examples/assets/html/controls-label.png rename to examples/_site/images/controls-label.png diff --git a/examples/assets/html/down-label.png b/examples/_site/images/down-label.png similarity index 100% rename from examples/assets/html/down-label.png rename to examples/_site/images/down-label.png diff --git a/examples/assets/html/flixel-logo.png b/examples/_site/images/flixel-logo.png similarity index 100% rename from examples/assets/html/flixel-logo.png rename to examples/_site/images/flixel-logo.png diff --git a/examples/assets/html/footer-bg.jpg b/examples/_site/images/footer-bg.jpg similarity index 100% rename from examples/assets/html/footer-bg.jpg rename to examples/_site/images/footer-bg.jpg diff --git a/examples/assets/html/footer-bg2.jpg b/examples/_site/images/footer-bg2.jpg similarity index 100% rename from examples/assets/html/footer-bg2.jpg rename to examples/_site/images/footer-bg2.jpg diff --git a/examples/assets/html/forums-icon.png b/examples/_site/images/forums-icon.png similarity index 100% rename from examples/assets/html/forums-icon.png rename to examples/_site/images/forums-icon.png diff --git a/examples/assets/html/game-controls-bg.jpg b/examples/_site/images/game-controls-bg.jpg similarity index 100% rename from examples/assets/html/game-controls-bg.jpg rename to examples/_site/images/game-controls-bg.jpg diff --git a/examples/assets/html/github-icon.png b/examples/_site/images/github-icon.png similarity index 100% rename from examples/assets/html/github-icon.png rename to examples/_site/images/github-icon.png diff --git a/examples/assets/html/gradient-bg.jpg b/examples/_site/images/gradient-bg.jpg similarity index 100% rename from examples/assets/html/gradient-bg.jpg rename to examples/_site/images/gradient-bg.jpg diff --git a/examples/assets/html/group-item-hover.png b/examples/_site/images/group-item-hover.png similarity index 100% rename from examples/assets/html/group-item-hover.png rename to examples/_site/images/group-item-hover.png diff --git a/examples/assets/html/group-item.png b/examples/_site/images/group-item.png similarity index 100% rename from examples/assets/html/group-item.png rename to examples/_site/images/group-item.png diff --git a/examples/assets/html/header-bg.jpg b/examples/_site/images/header-bg.jpg similarity index 100% rename from examples/assets/html/header-bg.jpg rename to examples/_site/images/header-bg.jpg diff --git a/examples/assets/html/header-bg2.jpg b/examples/_site/images/header-bg2.jpg similarity index 100% rename from examples/assets/html/header-bg2.jpg rename to examples/_site/images/header-bg2.jpg diff --git a/examples/assets/html/laser1.png b/examples/_site/images/laser1.png similarity index 100% rename from examples/assets/html/laser1.png rename to examples/_site/images/laser1.png diff --git a/examples/assets/html/laser10.png b/examples/_site/images/laser10.png similarity index 100% rename from examples/assets/html/laser10.png rename to examples/_site/images/laser10.png diff --git a/examples/assets/html/laser2.png b/examples/_site/images/laser2.png similarity index 100% rename from examples/assets/html/laser2.png rename to examples/_site/images/laser2.png diff --git a/examples/assets/html/laser3.png b/examples/_site/images/laser3.png similarity index 100% rename from examples/assets/html/laser3.png rename to examples/_site/images/laser3.png diff --git a/examples/assets/html/laser4.png b/examples/_site/images/laser4.png similarity index 100% rename from examples/assets/html/laser4.png rename to examples/_site/images/laser4.png diff --git a/examples/assets/html/laser5.png b/examples/_site/images/laser5.png similarity index 100% rename from examples/assets/html/laser5.png rename to examples/_site/images/laser5.png diff --git a/examples/assets/html/laser6.png b/examples/_site/images/laser6.png similarity index 100% rename from examples/assets/html/laser6.png rename to examples/_site/images/laser6.png diff --git a/examples/assets/html/laser7.png b/examples/_site/images/laser7.png similarity index 100% rename from examples/assets/html/laser7.png rename to examples/_site/images/laser7.png diff --git a/examples/assets/html/laser8.png b/examples/_site/images/laser8.png similarity index 100% rename from examples/assets/html/laser8.png rename to examples/_site/images/laser8.png diff --git a/examples/assets/html/laser9.png b/examples/_site/images/laser9.png similarity index 100% rename from examples/assets/html/laser9.png rename to examples/_site/images/laser9.png diff --git a/examples/assets/html/left-label.png b/examples/_site/images/left-label.png similarity index 100% rename from examples/assets/html/left-label.png rename to examples/_site/images/left-label.png diff --git a/examples/assets/html/lite_footer.jpg b/examples/_site/images/lite_footer.jpg similarity index 100% rename from examples/assets/html/lite_footer.jpg rename to examples/_site/images/lite_footer.jpg diff --git a/examples/assets/html/lite_header.jpg b/examples/_site/images/lite_header.jpg similarity index 100% rename from examples/assets/html/lite_header.jpg rename to examples/_site/images/lite_header.jpg diff --git a/examples/assets/html/lite_header_2.jpg b/examples/_site/images/lite_header_2.jpg similarity index 100% rename from examples/assets/html/lite_header_2.jpg rename to examples/_site/images/lite_header_2.jpg diff --git a/examples/assets/html/mute-button.png b/examples/_site/images/mute-button.png similarity index 100% rename from examples/assets/html/mute-button.png rename to examples/_site/images/mute-button.png diff --git a/examples/assets/html/nav-icons.png b/examples/_site/images/nav-icons.png similarity index 100% rename from examples/assets/html/nav-icons.png rename to examples/_site/images/nav-icons.png diff --git a/examples/assets/html/pause-button.png b/examples/_site/images/pause-button.png similarity index 100% rename from examples/assets/html/pause-button.png rename to examples/_site/images/pause-button.png diff --git a/examples/assets/html/phaser-examples.png b/examples/_site/images/phaser-examples.png similarity index 100% rename from examples/assets/html/phaser-examples.png rename to examples/_site/images/phaser-examples.png diff --git a/examples/assets/html/phaser-logo.png b/examples/_site/images/phaser-logo.png similarity index 100% rename from examples/assets/html/phaser-logo.png rename to examples/_site/images/phaser-logo.png diff --git a/examples/assets/html/phaser-version.png b/examples/_site/images/phaser-version.png similarity index 100% rename from examples/assets/html/phaser-version.png rename to examples/_site/images/phaser-version.png diff --git a/examples/assets/html/photonstorm-logo.png b/examples/_site/images/photonstorm-logo.png similarity index 100% rename from examples/assets/html/photonstorm-logo.png rename to examples/_site/images/photonstorm-logo.png diff --git a/examples/assets/html/prize-bg.png b/examples/_site/images/prize-bg.png similarity index 100% rename from examples/assets/html/prize-bg.png rename to examples/_site/images/prize-bg.png diff --git a/examples/assets/html/prize-button.png b/examples/_site/images/prize-button.png similarity index 100% rename from examples/assets/html/prize-button.png rename to examples/_site/images/prize-button.png diff --git a/examples/assets/html/reset-button.png b/examples/_site/images/reset-button.png similarity index 100% rename from examples/assets/html/reset-button.png rename to examples/_site/images/reset-button.png diff --git a/examples/assets/html/right-label.png b/examples/_site/images/right-label.png similarity index 100% rename from examples/assets/html/right-label.png rename to examples/_site/images/right-label.png diff --git a/examples/assets/html/space-label.png b/examples/_site/images/space-label.png similarity index 100% rename from examples/assets/html/space-label.png rename to examples/_site/images/space-label.png diff --git a/examples/assets/html/twitter-icon.png b/examples/_site/images/twitter-icon.png similarity index 100% rename from examples/assets/html/twitter-icon.png rename to examples/_site/images/twitter-icon.png diff --git a/examples/assets/html/up-label.png b/examples/_site/images/up-label.png similarity index 100% rename from examples/assets/html/up-label.png rename to examples/_site/images/up-label.png diff --git a/examples/assets/html/version-button.png b/examples/_site/images/version-button.png similarity index 100% rename from examples/assets/html/version-button.png rename to examples/_site/images/version-button.png diff --git a/examples/index.php b/examples/_site/index.php similarity index 100% rename from examples/index.php rename to examples/_site/index.php diff --git a/examples/assets/html/application.js b/examples/_site/js/application.js similarity index 100% rename from examples/assets/html/application.js rename to examples/_site/js/application.js diff --git a/examples/_site/js/phaser-examples.js b/examples/_site/js/phaser-examples.js new file mode 100644 index 00000000..453feff4 --- /dev/null +++ b/examples/_site/js/phaser-examples.js @@ -0,0 +1,77 @@ +$(document).ready(function(){ + + $.getJSON("_site/examples.json") + + .done(function(data) { + + var i = 0; + var len = 0; + var node = ''; + var laser = ''; + + $.each(data, function(dir, files) + { + len = files.length / 4; + + if (len > 9) + { + laser = 'laser10'; + } + else + { + laser = 'laser' + (len + 1); + } + + if (i == 1) + { + node = '
    '; + } + else if (i == 2) + { + node = '
    '; + } + + node += '

    ' + dir + '

    '; + node += '

    ' + files.length + ' examples

    '; + node += '
    '; + + $("#examples-list").append(node); + + i++; + + if (i == 3) + { + i = 1; + } + + }); + + }) + + .fail(function() { + + var node = '
    '; + + node += '

    Error!

    '; + node += '

    :(

    '; + + node += '

    Unable to load examples.json data file

    '; + node += '

    Did you open this html file locally?

    '; + node += '

    It needs to be opened via a web server, or due to browser security permissions
    it will be unable to load local resources such as images and json data.

    '; + node += '

    Please see our Getting Started guide for details.

    '; + + node += '
    '; + node += '
    '; + + $("#examples-list").append(node); + + }); + +}); diff --git a/examples/lite.php b/examples/_site/lite.php similarity index 100% rename from examples/lite.php rename to examples/_site/lite.php diff --git a/examples/phaser-debug-js.php b/examples/_site/phaser-debug-js.php similarity index 100% rename from examples/phaser-debug-js.php rename to examples/_site/phaser-debug-js.php diff --git a/examples/assets/html/demo.html b/examples/_site/templates/demo.html similarity index 100% rename from examples/assets/html/demo.html rename to examples/_site/templates/demo.html diff --git a/examples/assets/html/index.html b/examples/_site/templates/index.html similarity index 100% rename from examples/assets/html/index.html rename to examples/_site/templates/index.html diff --git a/examples/view_full.php b/examples/_site/view_full.html similarity index 100% rename from examples/view_full.php rename to examples/_site/view_full.html diff --git a/examples/_site/view_full.php b/examples/_site/view_full.php new file mode 100644 index 00000000..57a1f847 --- /dev/null +++ b/examples/_site/view_full.php @@ -0,0 +1,103 @@ + + + + + + phaser - <?php echo $title?> + + + + + + + + + +
    +
    +
    + Phaser Version: 1.1 + +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    +
      +
    • +
    • +
    • +
    +
    +
    +
    + +
    +

    Source code:

    +
    +        
    +        
    +
    + +
    + + + \ No newline at end of file diff --git a/examples/view_lite.php b/examples/_site/view_lite.php similarity index 100% rename from examples/view_lite.php rename to examples/_site/view_lite.php diff --git a/examples/view_plain.php b/examples/_site/view_plain.php similarity index 100% rename from examples/view_plain.php rename to examples/_site/view_plain.php diff --git a/examples/assets/bd/back.png b/examples/assets/bd/back.png deleted file mode 100644 index 45e439b7ae26ac4b7114bd3661d49e3dccdf5da8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^MnEjb!2~298sAzCq$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~-c70vQ=aSW-r^=6tSUyFeN%k5(c3WnNm{~x`4!b8#V(GAw# zdWSG4p9fyiOTXP%m+$X+TC&-IM_BE1va_DwFd)#yx8xE-{w^OoU6uP^sb w#Ta%f{q~jVm0lJtx+|KqLU83aJw`T$>t`g(r_NoN1#~5Yr>mdKI;Vst01v%nIRF3v diff --git a/examples/assets/bd/back2.png b/examples/assets/bd/back2.png deleted file mode 100644 index 47167d4b0d0fb0afd844ff93a7033f25b1ea34fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 399 zcmV;A0dW3_P)_iDh^PzZ tt;&8RWo<=r%G)2CbZ^;@q~!G%U;u>wHK$|4K)L_`002ovPDHLkV1g2)vVQ;o diff --git a/examples/assets/bd/burd.png b/examples/assets/bd/burd.png deleted file mode 100644 index f469cf8ecbbc1da6d88532998be0beae4aa0e20b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 675 zcmV;U0$lxxP)U(5 zG+=?d>FmypK*oo~_ZT_~2i#>$41*G|z@tyKbOVsQ-5s!(p&uAvc=XUAEE%0me4lkJ zeQwAjdHxHKfBniUO&u{H31kbzDq(5>#&YGVPJ-qd7r9d!S|Fz|FaTW!WNX4)24p|S zrU58ry`056eHBBZ08Udc{HV&N$Z?FooCu7>PkM=`_4FV@&Pxg*$-kc)i-yD*_x|&l z<8u=T++nyN1Ei|5y~uMJG$$gv3Ft&negwJzn+8w}PUQeuj2{?q4AYzl%2`NR4>{x@ z4CE+2_3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$%PW<1OtHELVwtpUn#-F&W+MdZBEN&~g2W{S-{ z`jq%>J*Uah{Ur>h9!nKNPmCZS;Eu>X%Mb z-1R12kg)up35NV=_V<=`jkANaB@I+gi6gkQB6;SjS|qZNil`s(fe*LE-Yz)`8~7xb z$&cP|lqJqH{R(CLM$ua#@wh9f7jfd~{$@fVDV4qAEu zt_W<8ZN9uP{_ApF{#!p}IIT!NgtWP`Txe}hPK8V(^Q^w>bW>q7S1P4(I8`1z(5XpeX zY$=}?dngNsk%jG{7vopn#v%L@*rp<0%%p{O%FK&$R;48tI*n3tPCsaYNXOFGs^~1o z>ol^~aBA#Urw{P80X@9}{(TWkopVWLtoL53h?!D!CdnRfG}%77rF@mJMR(gvS-s!K zgoVprGBvb@C41_7(L2E#aaYGp(9`7OQZWi~|7Efwoy+SrapFY9mPEDT z%GQ?LU*wG!a zajejy{T&|T$Ua{-;d)*O>gVtj=}DO4#lZ=Z4oMbWhNn@|t~^N>uw2=`*`K!()dDW_ z5c)7v1?jRmzD}o?jKxlDJu99#zjPU|6<78cM2Xx^9j$dFMUb)4=B=yW#NP>GvOSxG zXem~zc$mttbFGZFJ6)nUb1rH21ed9)ihqy7j|N*%tciXw|J?iKzE^4caCu~DcV&y} z$8g=a+O{Y$3l~$CnI^u$YAL4>82i=~F0Kx0v-B$5jl)ZyMBQYxJI>w)R|fUM*%mEiS{|_9!9_4~VA0IQ~*Fe2&-ba<=R_j({C^xFlpX*8 literal 0 HcmV?d00001 diff --git a/examples/assets/suite/background.png b/examples/assets/suite/background.png deleted file mode 100644 index 4a496b8c113717ad853a9537f717bcb7fb5601ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3300 zcmb_f2~ZPP7+$3HV1TNXI)d75q>h5*z>q*BawU}11~EcNji@16AVPLSvY3E^jQ26r z8>dw(UbP;PLnO#iDk6^HSqBs$P_Py$N)#2Pc=T<;qO{VPLNm$i+c)oh|M&jy`~Tf+ z3=93j!OqzZf*=P$2u}n-Hc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#s^)FZ{C^LwCL0=$sDIf%$isqqg&B|?@}Yx&g~7TL0@(Q1m0!%yz6` zh2WlAnn75nN<6QiQ#w2=pv94t%4&K`$&gcU$5g0ab)}<+kM7pFL(CXGcSURI$)p`Q zwe=U<2o-i24kp|)+WW7rm_$m|>j|Pp$tnK^Aw;5E1DZnim>TV#OR_UB-mG&ZZ~_y& z!q1x78Rwgy#J)CXmJE^cI8#{E;hnF#G^Ldbjz3B}WJ&Cmvk^BOY917?x+!U07JuPw z(GJSv`Kf8u%fHrytG9_N_N@7I@p!UbZB32Lsa5^Fi9JeXDcC{QP=4J*gL=!erOCeg z9xmxE{KEQlz`dhgHNz5YQ{Jv7Psm~Hf9;Lj(h{jn7UO(-^DHxB*t6yg(Qqvt%n5NX zLm+3@j{X(hU%eJ|*gNWi;r-w{54yyK7gNsoet&gY4roeF(I*a6rIsltI_~#-veNk5 z!=W)gbbs9+lp_y}yW72LMQfkCSQ5MRs$moQV@#9N-b#*9>i)K92j}sJPo$02+YhbU zypz)C`tn7QwOxTW0}OKpwH22L;)Ya1S5R#2@{^I(ciR$1^cH@(X*l4nTa3v;Z4SOS zwzb_e*+Cf-7Jbx|Op714(Q*!)tq^xvd zc5bFyNs~3PS~LO=^6EMDE3@{jX~E;Zq8*&aRr{Md7iCU#T6lQeX zO-?71Tyk23fkUdH_q<<>?qCtzds1AghtwPA(#&Eg?(&;q_K<5&MCg>LE%wC!4go)u KcPenns=okF + + + + + + + + + +

    +
    +
    + Phaser Version: 1.1 + 1.2 dev branch +
    +
    + +
    + +
    +
    +
    + +
    +
    + + + + \ No newline at end of file From 84b837f56c84f73fcb8a683f61f0e7b9e76a7cce Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 22 Oct 2013 16:38:40 +0100 Subject: [PATCH 093/125] View --- examples/_site/view_full.html | 114 ++++++++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 12 deletions(-) diff --git a/examples/_site/view_full.html b/examples/_site/view_full.html index 57a1f847..c72a7702 100644 --- a/examples/_site/view_full.html +++ b/examples/_site/view_full.html @@ -1,20 +1,110 @@ - - phaser - <?php echo $title?> - + phaser - title here + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e5c3ca27c5e26fcc100a31667af38d81128ff258 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Tue, 22 Oct 2013 21:29:58 +0100 Subject: [PATCH 094/125] Making dependancies local for offline access to examples. --- examples/_site/css/desert.css | 34 +++ examples/_site/css/phaser-examples.css | 6 +- examples/_site/js/application.js | 25 --- examples/_site/js/jquery-2.0.3.min.js | 6 + examples/_site/js/phaser-examples.js | 2 +- examples/_site/js/phaser-viewer.js | 33 +++ examples/_site/js/prettify.css | 1 + examples/_site/js/prettify.js | 30 +++ examples/_site/js/purl.js | 276 +++++++++++++++++++++++++ examples/_site/js/run_prettify.js | 34 +++ examples/_site/view_full.html | 30 +-- examples/index.html | 6 +- 12 files changed, 439 insertions(+), 44 deletions(-) create mode 100644 examples/_site/css/desert.css delete mode 100644 examples/_site/js/application.js create mode 100644 examples/_site/js/jquery-2.0.3.min.js create mode 100644 examples/_site/js/phaser-viewer.js create mode 100644 examples/_site/js/prettify.css create mode 100644 examples/_site/js/prettify.js create mode 100644 examples/_site/js/purl.js create mode 100644 examples/_site/js/run_prettify.js diff --git a/examples/_site/css/desert.css b/examples/_site/css/desert.css new file mode 100644 index 00000000..89bc279b --- /dev/null +++ b/examples/_site/css/desert.css @@ -0,0 +1,34 @@ +/* desert scheme ported from vim to google prettify */ +pre.prettyprint { display: block; background-color: #333 } +pre .nocode { background-color: none; color: #000 } +pre .str { color: #ffa0a0 } /* string - pink */ +pre .kwd { color: #f0e68c; font-weight: bold } +pre .com { color: #87ceeb } /* comment - skyblue */ +pre .typ { color: #98fb98 } /* type - lightgreen */ +pre .lit { color: #cd5c5c } /* literal - darkred */ +pre .pun { color: #fff } /* punctuation */ +pre .pln { color: #fff } /* plaintext */ +pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */ +pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */ +pre .atv { color: #ffa0a0 } /* attribute value - pink */ +pre .dec { color: #98fb98 } /* decimal - lightgreen */ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */ +li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } +/* Alternate shading for lines */ +li.L1,li.L3,li.L5,li.L7,li.L9 { } + +@media print { + pre.prettyprint { background-color: none } + pre .str, code .str { color: #060 } + pre .kwd, code .kwd { color: #006; font-weight: bold } + pre .com, code .com { color: #600; font-style: italic } + pre .typ, code .typ { color: #404; font-weight: bold } + pre .lit, code .lit { color: #044 } + pre .pun, code .pun { color: #440 } + pre .pln, code .pln { color: #000 } + pre .tag, code .tag { color: #006; font-weight: bold } + pre .atn, code .atn { color: #404 } + pre .atv, code .atv { color: #060 } +} \ No newline at end of file diff --git a/examples/_site/css/phaser-examples.css b/examples/_site/css/phaser-examples.css index 7b77cc1f..faa1e1e1 100644 --- a/examples/_site/css/phaser-examples.css +++ b/examples/_site/css/phaser-examples.css @@ -44,6 +44,10 @@ ul.nav-links > li > a:hover{text-decoration: underline;} padding: 16px 24px; } +#title { + text-transform: capitalize; +} + .line{display:block;clear:both; width:100%; margin:0;padding:0; float:left; background-color: transparent;} .box5, .box10, .box15 .box20, .box25, .box30, .box35, .box40, .box45, .box50, .box55, .box60, .box65, .box70, .box75, .box80, .box85, .box90, .box95, .box100{position: relative;display: inline-block; box-sizing: border-box; padding: 5px 10px; -moz-box-sizing: border-box; vertical-align: top; margin:0;} .float-right{float:right !important;} @@ -141,7 +145,7 @@ ul.right-controls > li{margin:0;padding:0; display: inline-block; vertical-align .reset-button{width: 121px; height:52px; display:inline-block; background: url('../../_site/images/reset-button.png') no-repeat;} .pause-button:hover, .mute-button:hover, .reset-button:hover{cursor: pointer;} .filler{height: 720px;} -.code-block{font-family: Courier; font-size: 14px; width:750px; height:auto; overflow: hidden; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} +.code-block{font-family: Courier; font-size: 12px; width:750px; height:auto; overflow: scroll; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} .px800{width:800px; clear:both; display: block; margin:0 auto; line-height: 1.5em;} .gradient p{color:#333;} diff --git a/examples/_site/js/application.js b/examples/_site/js/application.js deleted file mode 100644 index b28814c0..00000000 --- a/examples/_site/js/application.js +++ /dev/null @@ -1,25 +0,0 @@ -$(document).ready(function(){ - $('ul.group-items').each(function(i){ - var liAmount = $(this).children('li').length; - if ((liAmount/4)>9){ - $(this).addClass('laser10'); - }else if((liAmount/4)>8){ - $(this).addClass('laser9'); - }else if((liAmount/4)>7){ - $(this).addClass('laser8'); - }else if((liAmount/4)>6){ - $(this).addClass('laser7'); - }else if((liAmount/4)>5){ - $(this).addClass('laser6'); - }else if((liAmount/4)>4){ - $(this).addClass('laser5'); - }else if((liAmount/4)>3){ - $(this).addClass('laser4'); - }else if((liAmount/4)>2){ - $(this).addClass('laser3'); - }else if((liAmount/4)>1){ - $(this).addClass('laser2'); - } - // console.log(liAmount/4); - }); -}); \ No newline at end of file diff --git a/examples/_site/js/jquery-2.0.3.min.js b/examples/_site/js/jquery-2.0.3.min.js new file mode 100644 index 00000000..2be209dd --- /dev/null +++ b/examples/_site/js/jquery-2.0.3.min.js @@ -0,0 +1,6 @@ +/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery-2.0.3.min.map +*/ +(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},a=2),"object"==typeof s||x.isFunction(s)||(s={}),u===a&&(s=this,--a);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,o=n&&x.isArray(n)?n:[]):o=n&&x.isPlainObject(n)?n:{},s[t]=x.extend(l,o,r)):r!==undefined&&(s[t]=r));return s},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,s=j(e);if(n){if(s){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(s){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?"":v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],o=0,s=e.length;for(n=!!n;s>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,s=j(e),a=[];if(s)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(a[a.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(a[a.length]=r);return f.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===x.type(n)){i=!0;for(a in n)x.access(e,t,a,n[a],!0,o,s)}else if(r!==undefined&&(i=!0,x.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},now:Date.now,swap:function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded",S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}t=x(o),function(e,undefined){var t,n,r,i,o,s,a,u,l,c,p,f,h,d,g,m,y,v="sizzle"+-new Date,b=e.document,w=0,T=0,C=st(),k=st(),N=st(),E=!1,S=function(e,t){return e===t?(E=!0,0):0},j=typeof undefined,D=1<<31,A={}.hasOwnProperty,L=[],q=L.pop,H=L.push,O=L.push,F=L.slice,P=L.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",$=W.replace("w","w#"),B="\\["+M+"*("+W+")"+M+"*(?:([*^$|!~]?=)"+M+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+$+")|)|)"+M+"*\\]",I=":("+W+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+B.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=RegExp("^"+M+"*,"+M+"*"),X=RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=RegExp(M+"*[+~]"),Y=RegExp("="+M+"*([^\\]'\"]*)"+M+"*\\]","g"),V=RegExp(I),G=RegExp("^"+$+"$"),J={ID:RegExp("^#("+W+")"),CLASS:RegExp("^\\.("+W+")"),TAG:RegExp("^("+W.replace("w","w*")+")"),ATTR:RegExp("^"+B),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:RegExp("^(?:"+R+")$","i"),needsContext:RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/^(?:input|select|textarea|button)$/i,et=/^h\d$/i,tt=/'|\\/g,nt=RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),rt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{O.apply(L=F.call(b.childNodes),b.childNodes),L[b.childNodes.length].nodeType}catch(it){O={apply:L.length?function(e,t){H.apply(e,F.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function ot(e,t,r,i){var o,s,a,u,l,f,g,m,x,w;if((t?t.ownerDocument||t:b)!==p&&c(t),t=t||p,r=r||[],!e||"string"!=typeof e)return r;if(1!==(u=t.nodeType)&&9!==u)return[];if(h&&!i){if(o=K.exec(e))if(a=o[1]){if(9===u){if(s=t.getElementById(a),!s||!s.parentNode)return r;if(s.id===a)return r.push(s),r}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&y(t,s)&&s.id===a)return r.push(s),r}else{if(o[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=o[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&(!d||!d.test(e))){if(m=g=v,x=t,w=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){f=gt(e),(g=t.getAttribute("id"))?m=g.replace(tt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",l=f.length;while(l--)f[l]=m+mt(f[l]);x=U.test(e)&&t.parentNode||t,w=f.join(",")}if(w)try{return O.apply(r,x.querySelectorAll(w)),r}catch(T){}finally{g||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,r,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>i.cacheLength&&delete t[e.shift()],t[n]=r}return t}function at(e){return e[v]=!0,e}function ut(e){var t=p.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)i.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return at(function(t){return t=+t,at(function(n,r){var i,o=e([],n.length,t),s=o.length;while(s--)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}s=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},n=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:b,r=t.defaultView;return t!==p&&9===t.nodeType&&t.documentElement?(p=t,f=t.documentElement,h=!s(t),r&&r.attachEvent&&r!==r.top&&r.attachEvent("onbeforeunload",function(){c()}),n.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ut(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=ut(function(e){return e.innerHTML="
    ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),n.getById=ut(function(e){return f.appendChild(e).id=v,!t.getElementsByName||!t.getElementsByName(v).length}),n.getById?(i.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){return e.getAttribute("id")===t}}):(delete i.find.ID,i.filter.ID=function(e){var t=e.replace(nt,rt);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=n.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):undefined}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==j&&h?t.getElementsByClassName(e):undefined},g=[],d=[],(n.qsa=Q.test(t.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll(":checked").length||d.push(":checked")}),ut(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&d.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||d.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),d.push(",.*:")})),(n.matchesSelector=Q.test(m=f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",I)}),d=d.length&&RegExp(d.join("|")),g=g.length&&RegExp(g.join("|")),y=Q.test(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},S=f.compareDocumentPosition?function(e,r){if(e===r)return E=!0,0;var i=r.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(r);return i?1&i||!n.sortDetached&&r.compareDocumentPosition(e)===i?e===t||y(b,e)?-1:r===t||y(b,r)?1:l?P.call(l,e)-P.call(l,r):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,o=e.parentNode,s=n.parentNode,a=[e],u=[n];if(e===n)return E=!0,0;if(!o||!s)return e===t?-1:n===t?1:o?-1:s?1:l?P.call(l,e)-P.call(l,n):0;if(o===s)return ct(e,n);r=e;while(r=r.parentNode)a.unshift(r);r=n;while(r=r.parentNode)u.unshift(r);while(a[i]===u[i])i++;return i?ct(a[i],u[i]):a[i]===b?-1:u[i]===b?1:0},t):p},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Y,"='$1']"),!(!n.matchesSelector||!h||g&&g.test(t)||d&&d.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return ot(t,p,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},ot.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var r=i.attrHandle[t.toLowerCase()],o=r&&A.call(i.attrHandle,t.toLowerCase())?r(e,t,!h):undefined;return o===undefined?n.attributes||!h?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null:o},ot.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,r=[],i=0,o=0;if(E=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),E){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=ot.selectors={cacheLength:50,createPseudo:at,match:J,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(nt,rt),e[3]=(e[4]||e[5]||"").replace(nt,rt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return J.CHILD.test(e[0])?null:(e[3]&&e[4]!==undefined?e[2]=e[4]:n&&V.test(n)&&(t=gt(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(nt,rt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,h,d,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),x=!u&&!a;if(m){if(o){while(g){p=t;while(p=p[g])if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&x){c=m[v]||(m[v]={}),l=c[e]||[],h=l[0]===w&&l[1],f=l[0]===w&&l[2],p=h&&m.childNodes[h];while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[w,h,f];break}}else if(x&&(l=(t[v]||(t[v]={}))[e])&&l[0]===w)f=l[1];else while(p=++h&&p&&p[g]||(f=h=0)||d.pop())if((a?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(x&&((p[v]||(p[v]={}))[e]=[w,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[v]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,o=r(e,t),s=o.length;while(s--)i=P.call(e,o[s]),e[i]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(z,"$1"));return r[v]?at(function(e,t,n,i){var o,s=r(e,null,i,[]),a=e.length;while(a--)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return G.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(nt,rt).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return et.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},i.pseudos.nth=i.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=pt(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=ft(t);function dt(){}dt.prototype=i.filters=i.pseudos,i.setFilters=new dt;function gt(e,t){var n,r,o,s,a,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);a=e,u=[],l=i.preFilter;while(a){(!n||(r=_.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(z," ")}),a=a.slice(n.length));for(s in i.filter)!(r=J[s].exec(a))||l[s]&&!(r=l[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ot.error(e):k(e,u).slice(0)}function mt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var i=t.dir,o=n&&"parentNode"===i,s=T++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,a){var u,l,c,p=w+" "+s;if(a){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,a))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[v]||(t[v]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,a)||r,l[1]===!0)return!0}}function vt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,s=[],a=0,u=e.length,l=null!=t;for(;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function bt(e,t,n,r,i,o){return r&&!r[v]&&(r=bt(r)),i&&!i[v]&&(i=bt(i,o)),at(function(o,s,a,u){var l,c,p,f=[],h=[],d=s.length,g=o||Ct(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:xt(g,f,e,a,u),y=n?i||(o?e:d||r)?[]:s:m;if(n&&n(m,y,a,u),r){l=xt(y,h),r(l,[],a,u),c=l.length;while(c--)(p=l[c])&&(y[h[c]]=!(m[h[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?P.call(o,p):f[c])>-1&&(o[l]=!(s[l]=p))}}else y=xt(y===s?y.splice(d,y.length):y),i?i(null,s,y,u):O.apply(s,y)})}function wt(e){var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=yt(function(e){return e===t},a,!0),p=yt(function(e){return P.call(t,e)>-1},a,!0),f=[function(e,n,r){return!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>l;l++)if(n=i.relative[e[l].type])f=[yt(vt(f),n)];else{if(n=i.filter[e[l].type].apply(null,e[l].matches),n[v]){for(r=++l;o>r;r++)if(i.relative[e[r].type])break;return bt(l>1&&vt(f),l>1&&mt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&wt(e.slice(l,r)),o>r&&wt(e=e.slice(r)),o>r&&mt(e))}f.push(n)}return vt(f)}function Tt(e,t){var n=0,o=t.length>0,s=e.length>0,a=function(a,l,c,f,h){var d,g,m,y=[],v=0,x="0",b=a&&[],T=null!=h,C=u,k=a||s&&i.find.TAG("*",h&&l.parentNode||l),N=w+=null==C?1:Math.random()||.1;for(T&&(u=l!==p&&l,r=n);null!=(d=k[x]);x++){if(s&&d){g=0;while(m=e[g++])if(m(d,l,c)){f.push(d);break}T&&(w=N,r=++n)}o&&((d=!m&&d)&&v--,a&&b.push(d))}if(v+=x,o&&x!==v){g=0;while(m=t[g++])m(b,y,l,c);if(a){if(v>0)while(x--)b[x]||y[x]||(y[x]=q.call(f));y=xt(y)}O.apply(f,y),T&&!a&&y.length>0&&v+t.length>1&&ot.uniqueSort(f)}return T&&(w=N,u=C),b};return o?at(a):a}a=ot.compile=function(e,t){var n,r=[],i=[],o=N[e+" "];if(!o){t||(t=gt(e)),n=t.length;while(n--)o=wt(t[n]),o[v]?r.push(o):i.push(o);o=N(e,Tt(i,r))}return o};function Ct(e,t,n){var r=0,i=t.length;for(;i>r;r++)ot(e,t[r],n);return n}function kt(e,t,r,o){var s,u,l,c,p,f=gt(e);if(!o&&1===f.length){if(u=f[0]=f[0].slice(0),u.length>2&&"ID"===(l=u[0]).type&&n.getById&&9===t.nodeType&&h&&i.relative[u[1].type]){if(t=(i.find.ID(l.matches[0].replace(nt,rt),t)||[])[0],!t)return r;e=e.slice(u.shift().value.length)}s=J.needsContext.test(e)?0:u.length;while(s--){if(l=u[s],i.relative[c=l.type])break;if((p=i.find[c])&&(o=p(l.matches[0].replace(nt,rt),U.test(u[0].type)&&t.parentNode||t))){if(u.splice(s,1),e=o.length&&mt(u),!e)return O.apply(r,o),r;break}}}return a(e,f)(o,t,!h,r,U.test(e)),r}n.sortStable=v.split("").sort(S).join("")===v,n.detectDuplicates=E,c(),n.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(p.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,t,n){return n?undefined:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?undefined:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||lt(R,function(e,t,n){var r;return n?undefined:(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,o,s,a=[],u=!e.once&&[],l=function(p){for(t=e.memory&&p,n=!0,s=i||0,i=0,o=a.length,r=!0;a&&o>s;s++)if(a[s].apply(p[0],p[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,a&&(u?u.length&&l(u.shift()):t?a=[]:c.disable())},c={add:function(){if(a){var n=a.length;(function s(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==r&&s(n)})})(arguments),r?o=a.length:t&&(i=n,l(t))}return this},remove:function(){return a&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,a,n))>-1)a.splice(n,1),r&&(o>=n&&o--,s>=n&&s--)}),this},has:function(e){return e?x.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=u=t=undefined,this},disabled:function(){return!a},lock:function(){return u=undefined,t||c.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!a||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],r?u.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var s=o[0],a=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),s=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===a?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},a,u,l;if(r>1)for(a=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(s(t,l,n)).fail(o.reject).progress(s(t,u,a)):--i;return i||o.resolveWith(l,n),o.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),a=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=a.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!a.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",a=o.getElementsByTagName("body")[0];a&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),a.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(x.isEmptyObject(o))x.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(t===undefined)this.cache[o]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(w)||[])),n=r.length;while(n--)delete s[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],o=0,s=null;if(e===undefined){if(this.length&&(s=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>o;o++)r=n[o].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,s[r]));q.set(i,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}});function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),s=function(){x.dequeue(e,t) +};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(s--)n=q.get(o[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,o,s=0,a=this.length,u="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,o=x(this),s=e.match(w)||[];while(t=s[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===r||"boolean"===n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;for(;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),s=i.length;while(s--)r=i[s],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,t,n){var i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===r?x.prop(e,t,n):(1===s&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(o=i.get(e,t))?o:(o=x.find.attr(e,t),null==o?undefined:o):null!==n?i&&"set"in i&&(o=i.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!x.isXMLDoc(e),o&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],o=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle[t]=i,o}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}x.event={global:{},add:function(e,t,n,i,o){var s,a,u,l,c,p,f,h,d,g,m,y=q.get(e);if(y){n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=x.guid++),(l=y.events)||(l=y.events={}),(a=y.handle)||(a=y.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(a.elem,arguments)},a.elem=e),t=(t||"").match(w)||[""],c=t.length;while(c--)u=X.exec(t[c])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(f=x.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=x.event.special[d]||{},p=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:g.join(".")},s),(h=l[d])||(h=l[d]=[],h.delegateCount=0,f.setup&&f.setup.call(e,i,g,a)!==!1||e.addEventListener&&e.addEventListener(d,a,!1)),f.add&&(f.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,p):h.push(p),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,f,h,d,g,m=q.hasData(e)&&q.get(e);if(m&&(u=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(a=X.exec(t[l])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){p=x.event.special[h]||{},h=(r?p.delegateType:p.bindType)||h,f=u[h]||[],a=a[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;while(o--)c=f[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,h,m.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,a,u,l,c,p,f,h=[r||o],d=y.call(t,"type")?t.type:t,g=y.call(t,"namespace")?t.namespace.split("."):[];if(a=u=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),c=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),f=x.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!x.isWindow(r)){for(l=f.delegateType||d,_.test(l+d)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||o)&&h.push(u.defaultView||u.parentWindow||e)}s=0;while((a=h[s++])&&!t.isPropagationStopped())t.type=s>1?l:f.bindType||d,p=(q.get(a,"events")||{})[t.type]&&q.get(a,"handle"),p&&p.apply(a,n),p=c&&a[c],p&&x.acceptData(a)&&p.apply&&p.apply(a,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!x.acceptData(r)||c&&x.isFunction(r[d])&&!x.isWindow(r)&&(u=r[c],u&&(r[c]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,u&&(r[c]=u)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,o,s=[],a=d.call(arguments),u=(q.get(this,"events")||{})[e.type]||[],l=x.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),t=0;while((i=s[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((x.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",r[i]===undefined&&(r[i]=o.needsContext?x(i,this).index(u)>=0:x.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return t.length>a&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,a=this.fixHooks[i];a||(this.fixHooks[i]=a=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(s in e)this.on(s,t,n,e[s],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(o=r,r=function(e){return x().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],s=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(s?s.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*\s*$/g,ct={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,o,s,a,u,l=0,c=this.length,p=this,h=c-1,d=e[0],g=x.isFunction(d);if(g||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=p.eq(r);g&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=x.map(mt(r,"script"),ft),s=o.length;c>l;l++)a=r,l!==h&&(a=x.clone(a,!0,!0),s&&x.merge(o,mt(a,"script"))),t.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,x.map(o,ht),l=0;s>l;l++)a=o[l],at.test(a.type||"")&&!q.access(a,"globalEval")&&x.contains(u,a)&&(a.src?x._evalUrl(a.src):x.globalEval(a.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),o=i.length-1,s=0;for(;o>=s;s++)n=s===o?this:this.clone(!0),x(i[s])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=mt(a),o=mt(e),r=0,i=o.length;i>r;r++)yt(o[r],s[r]);if(t)if(n)for(o=o||mt(e),s=s||mt(a),r=0,i=o.length;i>r;r++)gt(o[r],s[r]);else gt(e,a);return s=mt(a,"script"),s.length>0&&dt(s,!u&&mt(e,"script")),a},buildFragment:function(e,t,n,r){var i,o,s,a,u,l,c=0,p=e.length,f=t.createDocumentFragment(),h=[];for(;p>c;c++)if(i=e[c],i||0===i)if("object"===x.type(i))x.merge(h,i.nodeType?[i]:i);else if(rt.test(i)){o=o||f.appendChild(t.createElement("div")),s=(nt.exec(i)||["",""])[1].toLowerCase(),a=ct[s]||ct._default,o.innerHTML=a[1]+i.replace(tt,"<$1>")+a[2],l=a[0];while(l--)o=o.lastChild;x.merge(h,o.childNodes),o=f.firstChild,o.textContent=""}else h.push(t.createTextNode(i));f.textContent="",c=0;while(i=h[c++])if((!r||-1===x.inArray(i,r))&&(u=x.contains(i.ownerDocument,i),o=mt(f.appendChild(i),"script"),u&&dt(o),n)){l=0;while(i=o[l++])at.test(i.type||"")&&n.push(i)}return f},cleanData:function(e){var t,n,r,i,o,s,a=x.event.special,u=0;for(;(n=e[u])!==undefined;u++){if(F.accepts(n)&&(o=n[q.expando],o&&(t=q.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(s=0;(i=r[s])!==undefined;s++)a[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[o]&&delete q.cache[o]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}});function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(q.hasData(e)&&(o=q.access(e),s=q.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)x.event.add(t,i,l[i][n])}L.hasData(e)&&(a=L.access(e),u=x.extend({},a),L.set(t,u))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"];function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n,r,i,o=[],s=0,a=e.length;for(;a>s;s++)r=e[s],r.style&&(o[s]=q.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(o[s]=q.access(r,"olddisplay",Rt(r.nodeName)))):o[s]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,o={},s=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>s;s++)o[t[s]]=x.css(e,t[s],!1,r);return o}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=x.camelCase(t),u=e.style;return t=x.cssProps[a]||(x.cssProps[a]=At(u,a)),s=x.cssHooks[t]||x.cssHooks[a],n===undefined?s&&"get"in s&&(i=s.get(e,!1,r))!==undefined?i:u[t]:(o=typeof n,"string"===o&&(i=kt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(x.css(e,t)),o="number"),null==n||"number"===o&&isNaN(n)||("number"!==o||x.cssNumber[a]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&(n=s.set(e,n,r))===undefined||(u[t]=n)),undefined)}},css:function(e,t,n,r){var i,o,s,a=x.camelCase(t);return t=x.cssProps[a]||(x.cssProps[a]=At(e.style,a)),s=x.cssHooks[t]||x.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===n||n?(o=parseFloat(i),n===!0||x.isNumeric(o)?o||0:i):i}}),vt=function(e,t,n){var r,i,o,s=n||qt(e),a=s?s.getPropertyValue(t)||s[t]:undefined,u=e.style;return s&&(""!==a||x.contains(e.ownerDocument,e)||(a=x.style(e,t)),Ct.test(a)&&wt.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=s.width,u.width=r,u.minWidth=i,u.maxWidth=o)),a};function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Ft(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;for(;4>o;o+=2)"margin"===n&&(s+=x.css(e,n+jt[o],!0,i)),r?("content"===n&&(s-=x.css(e,"padding"+jt[o],!0,i)),"margin"!==n&&(s-=x.css(e,"border"+jt[o]+"Width",!0,i))):(s+=x.css(e,"padding"+jt[o],!0,i),"padding"!==n&&(s+=x.css(e,"border"+jt[o]+"Width",!0,i)));return s}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=qt(e),s=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=vt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=s&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(s?"border":"content"),r,o)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x(" + + + \ No newline at end of file diff --git a/examples/sprites/extending sprite object.js b/examples/sprites/extending sprite demo 1.js similarity index 100% rename from examples/sprites/extending sprite object.js rename to examples/sprites/extending sprite demo 1.js diff --git a/examples/sprites/extending sprite object demo 2.js b/examples/sprites/extending sprite demo 2.js similarity index 100% rename from examples/sprites/extending sprite object demo 2.js rename to examples/sprites/extending sprite demo 2.js From f1f42e4d411ff033dbf02582f4bc0ec402925eb2 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Wed, 23 Oct 2013 04:15:44 +0100 Subject: [PATCH 096/125] New Examples area finished, README updated. Getting closer to 1.1 release. --- README.md | 103 +++------------- changelog.md | 96 +++++++++++++-- examples/_site/build.php | 98 +++++++++++++++- examples/_site/css/phaser-examples.css | 23 +++- examples/_site/examples.json | 19 +-- examples/_site/index.php | 119 ------------------- examples/_site/js/phaser-examples.js | 25 +++- examples/_site/lite.php | 124 -------------------- examples/_site/phaser-debug-js.php | 123 ------------------- examples/_site/view_full.php | 103 ---------------- examples/_site/view_lite.php | 28 ----- examples/_site/view_plain.php | 27 ----- examples/basics/01 - load an image.js | 22 ++++ examples/index.html | 13 +- examples/wip/fiddle.js | 29 +++++ examples/{_site/funcs.php => wip/index.php} | 61 ++++++---- 16 files changed, 351 insertions(+), 662 deletions(-) delete mode 100644 examples/_site/index.php delete mode 100644 examples/_site/lite.php delete mode 100644 examples/_site/phaser-debug-js.php delete mode 100644 examples/_site/view_full.php delete mode 100644 examples/_site/view_lite.php delete mode 100644 examples/_site/view_plain.php create mode 100644 examples/basics/01 - load an image.js create mode 100644 examples/wip/fiddle.js rename examples/{_site/funcs.php => wip/index.php} (66%) diff --git a/README.md b/README.md index 67a34ccc..c78afa77 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ ![Phaser Logo](http://www.photonstorm.com/wp-content/uploads/2013/09/phaser_10_release.jpg) -Phaser 1.0 +Phaser 1.1 ========== Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) internally for fast 2D Canvas and WebGL rendering. -Version: 1.0.6 - Released: September 24th 2013 +Version: 1.1 - Released: October 24th 2013 By Richard Davey, [Photon Storm](http://www.photonstorm.com) @@ -22,24 +22,26 @@ Try out the [Phaser Test Suite](http://gametest.mobi/phaser/) Welcome to Phaser ----------------- -We're very pleased to have finally shipped the 1.0 release of Phaser. This version represents many months of hard work, feedback and refactoring based on the previous 0.5 through to 0.97 releases. You can see the full gory details in our change log. +It's staggering to think just how much has been achieved in the short time the 1.0 branch of Phaser has been available. We've seen literally hundreds of bug fixes and updates. Exciting new features and enhancements have been merged into the core library thanks to contributions from the community. We also completely overhauled the Examples Suite, removed the requirement for PHP, rebuilt it in html+js and filled it with over 150 examples to dig in to and learn from. And more importantly we've got our first pass at the API docs online and ready too. -Sorry but the jsdocs aren't yet finished, but it is now our priority (along with bug fixing). If you run into problems, or just want to chat about how to best use Phaser then please do join our forums. It's an active and inspiring community. +There is still more to be done of course. The API docs, while a good start, still need to be backed up with a proper comprehensive manual. And we desperately need to write some 'best practises' and 'getting started' tutorials. But at least now you don't have to flounder around in the dark and can turn to the examples and docs. -Now 1.0 is released we'll focus on getting the docs and more examples completed. Both of these will be pushed to the master repo on a regular basis. We will tag new releases of Phaser, but changes to the examples or docs won't be release tagged. +There are so many exciting new features and tweaks in this build that we felt it warranted a proper full point release: 1.1. A few things have also changed, so games that were in development in the 1.0 version may need refactoring for 1.1, but we feel those changes have benefitted the framework as a whole. -Thank you to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available: you are our heroes. It's your kind words and enthusiasm, as well as our commercial need for Phaser that has kept us going. Now we're at 1.0 we will continue releasing rapidly and jumping on patches and bug reports quickly. +As before "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available: you are our heroes. It's your kind words and enthusiasm, as well as our commercial need for Phaser that has kept us going. -Phaser is everything we ever wanted from an HTML5 game framework. It will power all our client work going forward and we look forward to you joining us on this journey. +Phaser is everything we ever wanted from an HTML5 game framework. It powers all of our client work in build today and remains our single most important product, and we've only just scratched the surface of what we have planned for it. ![Blasteroids](http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_blaster.png) +(swap for tanks) Change Log ---------- -Version 1.1 (in progress in the dev branch) +Version 1.1 * JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. +* Brand new Example system (no more php!) and over 150 examples to learn from too. * Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. * Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. * Updated ArcadePhysics.separateX/Y to use new body system - much better results now. @@ -133,95 +135,18 @@ Version 1.1 (in progress in the dev branch) * You can now null a Sprite.crop and it will clear down the crop rect area correctly. * The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils. +Outstanding Tasks +----------------- - - - - - +* BUG: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet. * TODO: look at Sprite.crop (http://www.html5gamedevs.com/topic/1617-error-in-spritecrop/) * TODO: d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/) * TODO: more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/) -* TODO: addMarker hh:mm:ss:ms +* TODO: Sound.addMarker hh:mm:ss:ms * TODO: swap state (non-destructive shift) * TODO: rotation offset * TODO: check stage bgc on droid (http://www.html5gamedevs.com/topic/1629-stage-background-color-not-working-on-android-chrome/) - -Version 1.0.6 (September 24th 2013) - -* Added check into Pointer.move to always consider a Sprite that has pixelPerfect enabled, regardless of render ID. -* BUG: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet. -* Fixed issue with anti-alias in the Game constructor not being set correctly (thanks luizbills) -* Added support for the Graphics game object back in and two examples (thanks earok for spotting) -* New: Tweens can now be chained via multiple to() calls + example created (thanks to powerfear for adding) -* Fixed Math.wrap (thanks TheJare) -* New: When loading a Sprite Sheet you can now pass negative values for the frame sizes which specifies the number of rows/columns to load instead (thanks TheJare) -* New: BitmapText now supports anchor and has fixed box dimensions (thanks TheJare) -* Fixed bug where if a State contains an empty Preloader the Update will not be called (thanks TheJare) -* Several new examples added (cameras, tweens, etc) -* Added in extra checks to halt collision if it involves an empty Group (thanks cang) -* Added time smoothing to Animation update to help frames hopefully not get too out of sync during long animations with high frame rates. -* Added frame skip to Animation.update. If it gets too far behind it will now skip frames to try and catch up. - -Version 1.0.5 (September 20th 2013) - -* Fixed issue in FrameData.getFrameIndexes where the input array was being ignored. -* Added Math.numberArray - Returns an Array containing the numbers from min to max (inclusive), useful for animation frame construction. -* Fixed a horrendously sneaky bug: If a new tween was created in the onComplete callback of a tween about to be deleted, it would get automatically spliced. -* Added a pendingDelete property to Tween to stop tweens that were removed during a callback from causing update errors during the TweenManager loop. -* Added Group.length property. -* Added explicit x/y attributes to Phaser.Text to make it work with the camera system (thanks cocoademon). -* Fixed issue stopping multiple animations from playing, only the most recent would play (frames array was being overwritten, thanks Legrandk) -* Updated Debug.renderSpriteBounds() so it doesn't use the deprecated Sprite.worldView any more (thanks MikeMnD) -* Added 2 new properties to the Text object: Text.text and Text.style, both are getter/setters and don't flag dirty unless changed, so safe for core loop use. -* Removed the exists check from Group.callAll, it now runs on all children (as the name implies) -* Added Group.callAllExists - you can now call a function on all children who have exists = the provided boolean. -* Finished off the Breakout example game - now fully playable, proper rebound, scoring, lives, etc. -* Removed Group.sort dummy entry until it's working. -* Removed ArcadePhysics.postUpdate. -* Updated Sprite.update to set renderable to false when the object goes out of Camera, not 'visible' false, otherwise it stops the transform being updated by Pixi. -* BUG: There is a known issue where the wrong rect coordinates are given to the QuadTree if the Sprite is a child of a Group or another Sprite which has an x/y offset. - -Version 1.0.4 (September 18th 2013) - -* Small fix to Phaser.Canvas to stop it from setting overflow hidden if the parent DOM element doesn't exist. -* Added Loader.setPreloadSprite(sprite, direction) - this will automatically apply a crop rect to the Sprite which is updated in line with the load progress. -* A lot of changes inside the StateManager. State functions are now passed through link() which automatically creates the key Game properties (load, input, etc) -* Fixed a bug in getFrameByName that wouldn't return the first frame in the array. -* Updated Phaser.Rectangle.intersects to use x and y instead of left and top so it can be used to check Physics bodies overlapping. -* Fixed issue in Cache where the Frame index wasn't being set correctly (thanks Cameron) -* Fixed issue in Sprite where boundsY wasn't set (thanks Cameron) -* For some reason there were 2 copies of the Canvas class in the build file - fixed, a few KB saved :) - -Version 1.0.3 (September 17th 2013) - -* FrameData.getFrameIndexes and getFrameIndexesByName refactored into a more versatile getFrames function. -* Various fixes to looping parameters in the Sound system. -* Documentation started across most classes. Keep track of progress in the Docs folder. -* Optimised AnimationManager.add so it will only get the required frames rather than all of them and is now faster at parsing the frame data. -* Fixed Phaser.Text and Phaser.BitmapText so they now render correctly and added several Text examples. - -Version 1.0.2 (September 16th 2013) - -* Added optional parameter to Animation.stop: resetFrame. If true the animation will be stopped and then the current frame reset to the first frame in the animation. -* Fixed an issue causing 'explode' particle bursts to ignore the quantity parameter. -* Added 'collideWorldBounds' to Emitter.makeParticles function. -* Added Emitter.angularDrag -* Changed Emitter.bounce from a number to a Point, so now set its x/y properties to control different amounts of bounce per axis. -* Fixed a bug in the AnimationManager where useNumericIndex was always set to true -* Added in lots of Particle examples -* Added in the start of a Breakout game -* Added in the start of a Platformer game - -Version 1.0.1 (September 15th 2013) - -* Added checks into every Group function to ensure that the Group has children before running them. -* Added optional flag to Group.create which allows you to set the default exists state of the Sprites. -* Sprite.animation.stop no longer needs an animation name parameter, will default to stopping the current animation. -* Fixed the license in package.json -* Fixed a logic bug in the separateTileX function that would sometimes cause tunneling of big sprites through small tiles. - Requirements ------------ diff --git a/changelog.md b/changelog.md index e8e555a7..1b6612d0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,81 @@ Change Log ---------- -V0.9.8 +Version 1.0.6 (September 24th 2013) + +* Added check into Pointer.move to always consider a Sprite that has pixelPerfect enabled, regardless of render ID. +* BUG: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet. +* Fixed issue with anti-alias in the Game constructor not being set correctly (thanks luizbills) +* Added support for the Graphics game object back in and two examples (thanks earok for spotting) +* New: Tweens can now be chained via multiple to() calls + example created (thanks to powerfear for adding) +* Fixed Math.wrap (thanks TheJare) +* New: When loading a Sprite Sheet you can now pass negative values for the frame sizes which specifies the number of rows/columns to load instead (thanks TheJare) +* New: BitmapText now supports anchor and has fixed box dimensions (thanks TheJare) +* Fixed bug where if a State contains an empty Preloader the Update will not be called (thanks TheJare) +* Several new examples added (cameras, tweens, etc) +* Added in extra checks to halt collision if it involves an empty Group (thanks cang) +* Added time smoothing to Animation update to help frames hopefully not get too out of sync during long animations with high frame rates. +* Added frame skip to Animation.update. If it gets too far behind it will now skip frames to try and catch up. + +Version 1.0.5 (September 20th 2013) + +* Fixed issue in FrameData.getFrameIndexes where the input array was being ignored. +* Added Math.numberArray - Returns an Array containing the numbers from min to max (inclusive), useful for animation frame construction. +* Fixed a horrendously sneaky bug: If a new tween was created in the onComplete callback of a tween about to be deleted, it would get automatically spliced. +* Added a pendingDelete property to Tween to stop tweens that were removed during a callback from causing update errors during the TweenManager loop. +* Added Group.length property. +* Added explicit x/y attributes to Phaser.Text to make it work with the camera system (thanks cocoademon). +* Fixed issue stopping multiple animations from playing, only the most recent would play (frames array was being overwritten, thanks Legrandk) +* Updated Debug.renderSpriteBounds() so it doesn't use the deprecated Sprite.worldView any more (thanks MikeMnD) +* Added 2 new properties to the Text object: Text.text and Text.style, both are getter/setters and don't flag dirty unless changed, so safe for core loop use. +* Removed the exists check from Group.callAll, it now runs on all children (as the name implies) +* Added Group.callAllExists - you can now call a function on all children who have exists = the provided boolean. +* Finished off the Breakout example game - now fully playable, proper rebound, scoring, lives, etc. +* Removed Group.sort dummy entry until it's working. +* Removed ArcadePhysics.postUpdate. +* Updated Sprite.update to set renderable to false when the object goes out of Camera, not 'visible' false, otherwise it stops the transform being updated by Pixi. +* BUG: There is a known issue where the wrong rect coordinates are given to the QuadTree if the Sprite is a child of a Group or another Sprite which has an x/y offset. + +Version 1.0.4 (September 18th 2013) + +* Small fix to Phaser.Canvas to stop it from setting overflow hidden if the parent DOM element doesn't exist. +* Added Loader.setPreloadSprite(sprite, direction) - this will automatically apply a crop rect to the Sprite which is updated in line with the load progress. +* A lot of changes inside the StateManager. State functions are now passed through link() which automatically creates the key Game properties (load, input, etc) +* Fixed a bug in getFrameByName that wouldn't return the first frame in the array. +* Updated Phaser.Rectangle.intersects to use x and y instead of left and top so it can be used to check Physics bodies overlapping. +* Fixed issue in Cache where the Frame index wasn't being set correctly (thanks Cameron) +* Fixed issue in Sprite where boundsY wasn't set (thanks Cameron) +* For some reason there were 2 copies of the Canvas class in the build file - fixed, a few KB saved :) + +Version 1.0.3 (September 17th 2013) + +* FrameData.getFrameIndexes and getFrameIndexesByName refactored into a more versatile getFrames function. +* Various fixes to looping parameters in the Sound system. +* Documentation started across most classes. Keep track of progress in the Docs folder. +* Optimised AnimationManager.add so it will only get the required frames rather than all of them and is now faster at parsing the frame data. +* Fixed Phaser.Text and Phaser.BitmapText so they now render correctly and added several Text examples. + +Version 1.0.2 (September 16th 2013) + +* Added optional parameter to Animation.stop: resetFrame. If true the animation will be stopped and then the current frame reset to the first frame in the animation. +* Fixed an issue causing 'explode' particle bursts to ignore the quantity parameter. +* Added 'collideWorldBounds' to Emitter.makeParticles function. +* Added Emitter.angularDrag +* Changed Emitter.bounce from a number to a Point, so now set its x/y properties to control different amounts of bounce per axis. +* Fixed a bug in the AnimationManager where useNumericIndex was always set to true +* Added in lots of Particle examples +* Added in the start of a Breakout game +* Added in the start of a Platformer game + +Version 1.0.1 (September 15th 2013) + +* Added checks into every Group function to ensure that the Group has children before running them. +* Added optional flag to Group.create which allows you to set the default exists state of the Sprites. +* Sprite.animation.stop no longer needs an animation name parameter, will default to stopping the current animation. +* Fixed the license in package.json +* Fixed a logic bug in the separateTileX function that would sometimes cause tunneling of big sprites through small tiles. + +Version 0.9.8 * Massive refactoring across the entire codebase. * Removed Basic and GameObject and put Sprite on a diet. 127 properties and methods cut down to 32. @@ -109,7 +183,7 @@ V0.9.8 * Added CanvasUtils class, including ability to set image rendering, add a canvas to the dom and other handy things. -V0.9.6 +Version 0.9.6 * Virtually every class now has documentation - if you spot a typo or something missing please shout (thanks pixelpicosean). * Grunt file updated to produce the new Special FX JS file (thanks HackManiac). @@ -197,7 +271,7 @@ V0.9.6 * Added the GameObjectFactory to Phaser.State * Added new format parameter to Loader.addTextureAtlas defining the format. Currently supported: JSON Array and Starling/Sparrow XML. -V0.9.5 +Version 0.9.5 * Moved the BootScreen and PauseScreen out of Stage into their own classes (system/screens/BootScreen and PauseScreen). * Updated the PauseScreen to show a subtle animation effect, making it easier to create your own interesting pause screens. @@ -231,7 +305,7 @@ V0.9.5 * Added fun new "map draw" test - rebound those carrots! :) * Changed SoundManager class to respect volume on first play (thanks initials and hackmaniac) -V0.9.4 +Version 0.9.4 * Added Tilemap.getTile, getTileFromWorldXY, getTileFromInputXY * Added Tilemap.setCollisionByIndex and setCollisionByRange @@ -261,7 +335,7 @@ V0.9.3 * Removed the need for DynamicTextures to require a key property and updated test cases. * You can now pass an array or a single value to Input.Keyboard.addKeyCapture(). -V0.9.2 +Version 0.9.2 * Fixed issue with create not being called if there was an empty init method. * Added ability to flip a sprite (Sprite.flipped = true) + a test case for it. @@ -269,7 +343,7 @@ V0.9.2 * Sprite animations don't restart if you call play on them when they are already running. * Added Stage.disablePauseScreen. Set to true to stop your game pausing when the tab loses focus. -V0.9.1 +Version 0.9.1 * Added the new align property to GameObjects that controls placement when rendering. * Added an align example to the Sprites test group (click the mouse to change alignment position) @@ -279,7 +353,7 @@ for new collision system. * Game.Input now has 2 signals you can subscribe to for down/up events, see the Sprite align example for use. * Updated the States examples to bring in-line with 0.9 release. -V0.9 +Version 0.9 * Large refactoring. Everything now lives inside the Phaser module, so all code and all tests have been updated to reflect this. Makes coding a tiny bit more verbose but stops the framework from globbing up the global namespace. Also should make code-insight work in WebStorm and similar editors. * Added the new GeomSprite object. This is a sprite that uses a geometry class for display (Circle, Rectangle, Point, Line). It's extremely flexible! @@ -290,27 +364,27 @@ V0.9 * Added new Motion class which contains lots of handy functions like 'moveTowardsObject', 'velocityFromAngle' and more. * Tween Manager added. You can now create tweens via Game.createTween (or for more control game.tweens). All the usual suspects are here: Bounce, * Elastic, Quintic, etc and it's hooked into the core game clock, so if your game pauses and resumes your tweens adjust accordingly. -V0.8 +Version 0.8 * Added ability to set Sprite frame by name (sprite.frameName), useful when you've loaded a Texture Atlas with filename values set rather than using frame indexes. * Updated texture atlas 4 demo to show this. * Fixed a bug that would cause a run-time error if you tried to create a sprite using an invalid texture key. * Added in DynamicTexture support and a test case for it. -V0.7 +Version 0.7 * Renamed FullScreen to StageScaleMode as it's much more fitting. Tested across Android and iOS with the various scale modes. * Added in world x/y coordinates to the input class, and the ability to get world x/y input coordinates from any Camera. * Added the RandomDataGenerator for seeded random number generation. * Setting the game world size now resizes the default camera (optional bool flag) -V0.6 +Version 0.6 * Added in Touch support for mobile devices (and desktops that enable it) and populated x/y coords in Input with common values from touch and mouse. * Added new Circle geometry class (used by Touch) and moved them into a Geom folder. * Added in Device class for device inspection. * Added FullScreen class to enable full-screen support on mobile devices (scrolls URL bar out of the way on iOS and Android) -V0.5 +Version 0.5 * Initial release diff --git a/examples/_site/build.php b/examples/_site/build.php index 262d7eff..a4d3945f 100644 --- a/examples/_site/build.php +++ b/examples/_site/build.php @@ -1,9 +1,105 @@ $value) + { + if (is_array($value) && count($value) > 0) + { + $total += count($value); + } + } + + function getFile() { + + global $files, $dir, $filename, $title, $code; + + if (isset($_GET['d']) && isset($_GET['f'])) + { + $dir = urldecode($_GET['d']); + $filename = urldecode($_GET['d']) . '/' . urldecode($_GET['f']); + $title = urldecode($_GET['t']); + + if (file_exists($filename)) + { + $code = file_get_contents($filename); + $files = dirToArray($dir); + } + } + + } + + function dirToArray($dir) { + + $ignore = array('.', '..', '_site', 'assets', 'states', 'wip', 'games', 'basics'); + $result = array(); + $root = scandir($dir); + $dirs = array_diff($root, $ignore); + + // We want these 2 to appear top of the list + array_unshift($dirs, 'basics', 'games'); + + foreach ($dirs as $key => $value) + { + if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) + { + $result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value); + } + else + { + if (substr($value, -3) == '.js') + { + $result[] = $value; + } + } + } + + return $result; + } + + function printJSLinks($dir, $files, $target) { + + $output = ""; + + foreach ($files as $key => $value) + { + $value2 = substr($value, 0, -3); + $dir = urlencode($dir); + $file = urlencode($value); + $title = urlencode($value2); + + if ($target == 'viewer') + { + $output .= " $value2
    \n"; + } + else if ($target == 'json') + { + $output .= " { \"file\": \"$file\", \"title\": \"$value2\" },\n"; + } + else + { + $output .= "
  • $value2
  • \n"; + } + } + + if ($target == 'json') + { + $output = rtrim($output); + $output = substr($output, 0, -1); + $output .= "\n"; + } + + return $output; + + } + ?> + Phaser Examples JSON Build Script diff --git a/examples/_site/css/phaser-examples.css b/examples/_site/css/phaser-examples.css index faa1e1e1..abd5b211 100644 --- a/examples/_site/css/phaser-examples.css +++ b/examples/_site/css/phaser-examples.css @@ -34,10 +34,31 @@ ul.nav-links > li > a:hover{text-decoration: underline;} .phaser-examples{background: url('../../_site/images/phaser-examples.png') no-repeat; display: block; width: 485px; height: 205px; margin: 20px auto;} .phaser-version{float: right; background: url('../../_site/images/phaser-version.png') no-repeat; display: block; width: 345px; height: 30px; color: #fff; font-size: 11px; text-shadow: 1px 1px #000; right:0; top:0; } .phaser-version > span{margin-top: 10px; display: inline-block; margin-left: 60px; margin-right: 25px;} -.phaser-version > a{color: #fff; text-decoration: none; background: url('../../_site/images/version-button.png') no-repeat; background-size: cover; display: inline-block; width: 123px; height: 10px; vertical-align: middle; text-align: center;padding-top:11px; padding-bottom: 11px} +.phaser-version > a {color: #fff; text-decoration: none; background: url('../../_site/images/version-button.png') no-repeat; background-size: cover; display: inline-block; width: 123px; height: 10px; vertical-align: middle; text-align: center;padding-top:11px; padding-bottom: 11px} .phaser-version > a:hover{text-decoration: underline;} .phaser-logo{display: block; float: right; width: 168px;height: 144px; background: url('../../_site/images/phaser-logo.png') no-repeat; margin-top: 40px; margin-right: 40px;} +#upgrade { + display: none; +} + +#welcome { + position: absolute; + top: 260px; + left: 40%; + width: 200px; + line-height: 28px; +} + +#welcome p { + text-align: center; + text-shadow: 1px 1px 0 #fff; +} + +#welcome a { + color: #7a50c4; +} + .error { margin-left: 48px; width: 700px; background-color: rgb(150,25,25); color:#fff; text-shadow: 1px 1px 0 #000; line-height: 24px } .error p { diff --git a/examples/_site/examples.json b/examples/_site/examples.json index d9f0e44b..b9ad235a 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -1,4 +1,13 @@ { +"basics": [ + { "file": "01+-+load+an+image.js", "title": "01 - load an image" } +], +"games": [ + { "file": "breakout.js", "title": "breakout" }, + { "file": "invaders.js", "title": "invaders" }, + { "file": "starstruck.js", "title": "starstruck" }, + { "file": "tanks.js", "title": "tanks" } +], "animation": [ { "file": "change+texture+on+click.js", "title": "change texture on click" }, { "file": "local+json+object.js", "title": "local json object" }, @@ -40,12 +49,6 @@ { "file": "graphics.js", "title": "graphics" }, { "file": "render+crisp.js", "title": "render crisp" } ], -"games": [ - { "file": "breakout.js", "title": "breakout" }, - { "file": "invaders.js", "title": "invaders" }, - { "file": "starstruck.js", "title": "starstruck" }, - { "file": "tanks.js", "title": "tanks" } -], "geometry": [ { "file": "circle.js", "title": "circle" }, { "file": "line.js", "title": "line" }, @@ -131,8 +134,8 @@ { "file": "collide+world+bounds.js", "title": "collide world bounds" }, { "file": "destroy.js", "title": "destroy" }, { "file": "dynamic+crop.js", "title": "dynamic crop" }, - { "file": "extending+sprite+object+demo+2.js", "title": "extending sprite object demo 2" }, - { "file": "extending+sprite+object.js", "title": "extending sprite object" }, + { "file": "extending+sprite+demo+1.js", "title": "extending sprite demo 1" }, + { "file": "extending+sprite+demo+2.js", "title": "extending sprite demo 2" }, { "file": "horizontal+crop.js", "title": "horizontal crop" }, { "file": "move+a+sprite.js", "title": "move a sprite" }, { "file": "out+of+bounds.js", "title": "out of bounds" }, diff --git a/examples/_site/index.php b/examples/_site/index.php deleted file mode 100644 index 4c15fd2a..00000000 --- a/examples/_site/index.php +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -
    -
    -
    - Phaser Version: 1.1 - -
    -
    -
    - -
    -
    -
    - Total Tests: $total "; - - $i = 0; - - foreach ($files as $key => $value) - { - // If $key is an array, output it as an h2 or something - if (is_array($value) && count($value) > 0) - { - if ($i == 1) - { - ?> -
    -
    - -
    -
    - -
    -

    -

    examples

    -
    -
    -
      - -
    -
    -
    - - -
    - - - \ No newline at end of file diff --git a/examples/_site/js/phaser-examples.js b/examples/_site/js/phaser-examples.js index 7fc8f0e0..6b4034da 100644 --- a/examples/_site/js/phaser-examples.js +++ b/examples/_site/js/phaser-examples.js @@ -5,13 +5,19 @@ $(document).ready(function(){ .done(function(data) { var i = 0; + var t = 0; var len = 0; var node = ''; var laser = ''; $.each(data, function(dir, files) { - len = files.length / 4; + len = Math.floor(files.length / 4) + 1; + + if ((files.length / 4) % 1 == 0) + { + len--; + } if (len > 9) { @@ -19,7 +25,7 @@ $(document).ready(function(){ } else { - laser = 'laser' + (len + 1); + laser = 'laser' + len; } if (i == 1) @@ -38,6 +44,7 @@ $(document).ready(function(){ for (var e = 0; e < files.length; e++) { node += '
  • ' + files[e].title + '
  • '; + t++; } node += '
    '; @@ -53,6 +60,8 @@ $(document).ready(function(){ }); + $("#total").append(t); + }) .fail(function() { @@ -74,4 +83,16 @@ $(document).ready(function(){ }); + $.getJSON("http://phaser.io/version.json") + + .done(function(data) { + + if (data.version !== '1.1') + { + $("#upgrade").append(data.version); + $("#upgrade").css('display', 'inline-block'); + } + + }); + }); diff --git a/examples/_site/lite.php b/examples/_site/lite.php deleted file mode 100644 index 2c165981..00000000 --- a/examples/_site/lite.php +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - -
    -
    - $value) - { - // If $key is an array, output it as an h2 or something - if (is_array($value) && count($value) > 0) - { - echo "

    $key

    "; - - echo printJSLinks($key, $value, 'viewer'); - } - } -?> -
    -
    - - - - - - \ No newline at end of file diff --git a/examples/_site/phaser-debug-js.php b/examples/_site/phaser-debug-js.php deleted file mode 100644 index e41fb353..00000000 --- a/examples/_site/phaser-debug-js.php +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/_site/view_full.php b/examples/_site/view_full.php deleted file mode 100644 index 57a1f847..00000000 --- a/examples/_site/view_full.php +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - phaser - <?php echo $title?> - - - - - - - - - -
    -
    -
    - Phaser Version: 1.1 - -
    -
    -
    -
    - -
    - -
    -
    - -
    -
    -
    -
    -
    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    -
      -
    • -
    • -
    • -
    -
    -
    -
    - -
    -

    Source code:

    -
    -        
    -        
    -
    - -
    - - - \ No newline at end of file diff --git a/examples/_site/view_lite.php b/examples/_site/view_lite.php deleted file mode 100644 index ec29f7f3..00000000 --- a/examples/_site/view_lite.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - phaser - <?php echo $title?> - - - - - - -
    - -
    -
    -
    - - - \ No newline at end of file diff --git a/examples/_site/view_plain.php b/examples/_site/view_plain.php deleted file mode 100644 index 7c7a4218..00000000 --- a/examples/_site/view_plain.php +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - <?php echo $title?> - - - - - - -
    - - - \ No newline at end of file diff --git a/examples/basics/01 - load an image.js b/examples/basics/01 - load an image.js new file mode 100644 index 00000000..ed61ace2 --- /dev/null +++ b/examples/basics/01 - load an image.js @@ -0,0 +1,22 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + // You can fill the preloader with as many assets as your game requires + + // Here we are loading an image. The first parameter is the unique + // string by which we'll identify the image later in our code. + + // The second parameter is the URL of the image (relative) + game.load.image('einstein', 'assets/pics/ra_einstein.png'); + +} + +function create() { + + // This creates a simple sprite that is using our loaded image and + // displays it on-screen + game.add.sprite(0, 0, 'einstein'); + +} diff --git a/examples/index.html b/examples/index.html index 9dc6eaed..0bea009e 100644 --- a/examples/index.html +++ b/examples/index.html @@ -2,6 +2,7 @@ + Phaser Examples @@ -12,7 +13,7 @@
    Phaser Version: 1.1 - 1.2 dev branch + New version:
    @@ -23,7 +24,7 @@ - +
    @@ -37,7 +38,13 @@
    -

    Some stuff here

    +
    + +

    Total Examples:

    + +

    Switch to Side-View mode

    + +
    diff --git a/examples/wip/fiddle.js b/examples/wip/fiddle.js new file mode 100644 index 00000000..cbb7185e --- /dev/null +++ b/examples/wip/fiddle.js @@ -0,0 +1,29 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('ball', 'assets/sprites/yellow_ball.png'); + +} + +var ball; + +function create() { + + ball = game.add.sprite(300, 0, 'ball'); + + startBounceTween(); +} + +function startBounceTween() { + + ball.y = 0; + + var bounce=game.add.tween(ball); + + bounce.to({ y: game.world.height-ball.height }, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.In); + bounce.onComplete.add(startBounceTween, this); + bounce.start(); + +} diff --git a/examples/_site/funcs.php b/examples/wip/index.php similarity index 66% rename from examples/_site/funcs.php rename to examples/wip/index.php index 86af8ce0..3db7c03a 100644 --- a/examples/_site/funcs.php +++ b/examples/wip/index.php @@ -55,40 +55,55 @@ return $result; } - function printJSLinks($dir, $files, $target) { + function printJSLinks($dir, $files) { $output = ""; foreach ($files as $key => $value) { $value2 = substr($value, 0, -3); - $dir = urlencode($dir); $file = urlencode($value); - $title = urlencode($value2); - if ($target == 'viewer') - { - $output .= " $value2
    \n"; - } - else if ($target == 'json') - { - $output .= " { \"file\": \"$file\", \"title\": \"$value2\" },\n"; - } - else - { - $output .= "
  • $value2
  • \n"; - } - } - - if ($target == 'json') - { - $output = rtrim($output); - $output = substr($output, 0, -1); - $output .= "\n"; + $output .= "$value2
    "; } return $output; } +?> + + + + + phaser + + \ No newline at end of file + if (isset($_GET['f'])) + { + $f = $_GET['f']; + ?> + + + + + + +
    + +

    work in progress examples

    + + + + + \ No newline at end of file From 4a51ac46713e854eaedb8c012464318d34778495 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Wed, 23 Oct 2013 13:30:22 +0100 Subject: [PATCH 097/125] Updated README and sorting out folder case issue. --- README.md | 37 +- build/build.php | 2 +- build/phaser.d.ts | 1901 +++++++++++++++++ build/phaser.js | 33 +- build/ts.bat | 1 + {Docs => docs2}/Documentation Checklist.xlsx | Bin {Docs => docs2}/Hello Phaser/index.html | 0 {Docs => docs2}/Hello Phaser/logo.png | Bin {Docs => docs2}/Hello Phaser/phaser-min.js | 0 .../2D Text/Phaser Logo 2D Vector Outline.fla | Bin .../PNG/Phaser Logo Print Quality.png | Bin .../PNG/Phaser Logo Web Quality.png | Bin .../PNG/Phaser Logo iPad Resolution.png | Bin .../Phaser Logo/PNG/Phaser-Logo-Small.png | Bin .../Pixel Art/Phaser-Logo-Sizes.png | Bin .../Pixel Art/phaser_pixel_large_shaded.png | Bin .../Pixel Art/phaser_pixel_medium_flat.png | Bin .../Pixel Art/phaser_pixel_medium_shaded.png | Bin .../Pixel Art/phaser_pixel_small_flat.png | Bin .../Phaser Logo/Vector/Phaser Logo.eps | Bin .../Phaser Logo/Vector/Phaser Logo.fla | Bin {Docs => docs2}/Resources/avoid-digits.png | Bin {Docs => docs2}/Resources/avoid-panel.png | Bin {Docs => docs2}/Resources/avoid-sheet.png | Bin {Docs => docs2}/Resources/avoidmock4x2.png | Bin {Docs => docs2}/Resources/box-01.png | Bin {Docs => docs2}/Resources/box-02.png | Bin {Docs => docs2}/Resources/breakout2c.png | Bin .../Resources/phaser checkboxes.gif | Bin .../Resources/phaser power tools.gif | Bin .../Resources/phaser sprites10.gif | Bin .../Screen Shots/phaser-cybernoid.png | Bin {Docs => docs2}/Screen Shots/phaser_balls.png | Bin .../Screen Shots/phaser_blaster.png | Bin {Docs => docs2}/Screen Shots/phaser_cams.png | Bin .../Screen Shots/phaser_desert.png | Bin .../Screen Shots/phaser_fixed_camera.png | Bin {Docs => docs2}/Screen Shots/phaser_fruit.png | Bin .../Screen Shots/phaser_fruit_particles.png | Bin .../Screen Shots/phaser_mapdraw.png | Bin .../Screen Shots/phaser_mario_combo.png | Bin .../Screen Shots/phaser_particles.png | Bin .../Screen Shots/phaser_platformer.png | Bin .../Screen Shots/phaser_quadtree.png | Bin .../Screen Shots/phaser_rotate4.png | Bin .../Screen Shots/phaser_scrollfactor.png | Bin .../Screen Shots/phaser_sprite_bounds.png | Bin {Docs => docs2}/Screen Shots/phaser_tanks.png | Bin .../Screen Shots/phaser_tilemap.png | Bin .../Screen Shots/phaser_tilemap_collision.png | Bin .../Screen Shots/phaser_tilemap_debug.png | Bin {Docs => docs2}/WIP/01_phaser-arcade.jpg | Bin {Docs => docs2}/WIP/02_phaser-newsletter.jpg | Bin {Docs => docs2}/WIP/Physics Comparison.xlsx | Bin .../WIP/phaser-manual_2013-08-27.pdf | Bin {Docs => docs2}/WIP/phaser_copy.doc | Bin .../WIP/phaser_onscreen-controls_1-arcade.png | Bin .../WIP/phaser_onscreen-controls_2-dpad.png | Bin .../phaser_onscreen-controls_3-generic.png | Bin {Docs => docs2}/conf.json | 0 {Docs => docs2}/docstrap-master/.gitignore | 0 {Docs => docs2}/docstrap-master/.npmignore | 0 {Docs => docs2}/docstrap-master/Gruntfile.js | 0 {Docs => docs2}/docstrap-master/LICENSE.md | 0 {Docs => docs2}/docstrap-master/README.md | 0 {Docs => docs2}/docstrap-master/bower.json | 0 .../docstrap-master/component.json | 0 .../docstrap-master/fixtures/car.js | 0 .../fixtures/example.conf.json | 0 .../docstrap-master/fixtures/other.js | 0 .../docstrap-master/fixtures/person.js | 0 .../fixtures/tutorials/Brush Teeth.md | 0 .../fixtures/tutorials/Drive Car.md | 0 {Docs => docs2}/docstrap-master/package.json | 0 .../docstrap-master/styles/bootswatch.less | 0 .../docstrap-master/styles/main.less | 0 .../docstrap-master/styles/variables.less | 0 .../docstrap-master/template/jsdoc.conf.json | 0 .../docstrap-master/template/publish.js | 0 .../static/img/glyphicons-halflings-white.png | Bin .../static/img/glyphicons-halflings.png | Bin .../template/static/scripts/URI.js | 0 .../static/scripts/bootstrap-dropdown.js | 0 .../template/static/scripts/bootstrap-tab.js | 0 .../static/scripts/jquery.localScroll.js | 0 .../template/static/scripts/jquery.min.js | 0 .../static/scripts/jquery.scrollTo.js | 0 .../static/scripts/jquery.sunlight.js | 0 .../scripts/prettify/Apache-License-2.0.txt | 0 .../static/scripts/prettify/jquery.min.js | 0 .../static/scripts/prettify/lang-css.js | 0 .../static/scripts/prettify/prettify.js | 0 .../scripts/sunlight-plugin.doclinks.js | 0 .../scripts/sunlight-plugin.linenumbers.js | 0 .../static/scripts/sunlight-plugin.menu.js | 0 .../static/scripts/sunlight.javascript.js | 0 .../template/static/scripts/sunlight.js | 0 .../template/static/scripts/toc.js | 0 .../template/static/styles/darkstrap.css | 0 .../static/styles/prettify-tomorrow.css | 0 .../template/static/styles/site.amelia.css | 0 .../template/static/styles/site.cerulean.css | 0 .../template/static/styles/site.cosmo.css | 0 .../template/static/styles/site.cyborg.css | 0 .../template/static/styles/site.darkstrap.css | 0 .../template/static/styles/site.flatly.css | 0 .../template/static/styles/site.journal.css | 0 .../template/static/styles/site.readable.css | 0 .../template/static/styles/site.simplex.css | 0 .../template/static/styles/site.slate.css | 0 .../template/static/styles/site.spacelab.css | 0 .../template/static/styles/site.spruce.css | 0 .../template/static/styles/site.superhero.css | 0 .../template/static/styles/site.united.css | 0 .../template/static/styles/sunlight.dark.css | 0 .../static/styles/sunlight.default.css | 0 .../template/tmpl/container.tmpl | 0 .../template/tmpl/details.tmpl | 0 .../template/tmpl/example.tmpl | 0 .../template/tmpl/examples.tmpl | 0 .../template/tmpl/exceptions.tmpl | 0 .../docstrap-master/template/tmpl/fires.tmpl | 0 .../docstrap-master/template/tmpl/layout.tmpl | 0 .../template/tmpl/mainpage.tmpl | 0 .../template/tmpl/members.tmpl | 0 .../docstrap-master/template/tmpl/method.tmpl | 0 .../docstrap-master/template/tmpl/params.tmpl | 0 .../template/tmpl/properties.tmpl | 0 .../template/tmpl/returns.tmpl | 0 .../template/tmpl/sections.tmpl | 0 .../docstrap-master/template/tmpl/source.tmpl | 0 .../template/tmpl/tutorial.tmpl | 0 .../docstrap-master/template/tmpl/type.tmpl | 0 {Docs => docs2}/jsdoc_work.txt | 0 {Docs => docs2}/out/Animation.js.html | 0 ...mationManager-Phaser.AnimationManager.html | 0 {Docs => docs2}/out/AnimationManager.html | 0 {Docs => docs2}/out/AnimationManager.js.html | 0 {Docs => docs2}/out/AnimationParser.js.html | 0 {Docs => docs2}/out/Back.html | 0 {Docs => docs2}/out/Bounce.html | 0 {Docs => docs2}/out/Cache.js.html | 0 {Docs => docs2}/out/Camera.js.html | 0 {Docs => docs2}/out/Canvas.js.html | 0 {Docs => docs2}/out/Circle.js.html | 0 {Docs => docs2}/out/Circular.html | 0 {Docs => docs2}/out/Color.js.html | 0 {Docs => docs2}/out/Cubic.html | 0 {Docs => docs2}/out/Debug.js.html | 0 {Docs => docs2}/out/Device.js.html | 0 {Docs => docs2}/out/Easing.js.html | 0 {Docs => docs2}/out/Elastic.html | 0 {Docs => docs2}/out/Emitter.js.html | 0 {Docs => docs2}/out/Exponential.html | 0 {Docs => docs2}/out/Frame.js.html | 0 {Docs => docs2}/out/FrameData.js.html | 0 {Docs => docs2}/out/Game.js.html | 0 {Docs => docs2}/out/Group.js.html | 0 {Docs => docs2}/out/Input.js.html | 0 {Docs => docs2}/out/InputHandler.js.html | 0 {Docs => docs2}/out/Intro.js.html | 0 {Docs => docs2}/out/Key.js.html | 0 {Docs => docs2}/out/Keyboard.js.html | 0 {Docs => docs2}/out/Linear.html | 0 {Docs => docs2}/out/LinkedList.js.html | 0 {Docs => docs2}/out/Loader.js.html | 0 {Docs => docs2}/out/LoaderParser.js.html | 0 {Docs => docs2}/out/MSPointer.js.html | 0 {Docs => docs2}/out/Math.js.html | 0 {Docs => docs2}/out/Mouse.js.html | 0 {Docs => docs2}/out/Net.js.html | 0 {Docs => docs2}/out/Parser.js.html | 0 {Docs => docs2}/out/Parser.js_.html | 0 {Docs => docs2}/out/Particles.js.html | 0 .../out/Phaser.Animation.Frame.html | 0 .../out/Phaser.Animation.FrameData.html | 0 .../out/Phaser.Animation.Parser.html | 0 {Docs => docs2}/out/Phaser.Animation.html | 0 .../out/Phaser.AnimationManager.html | 0 .../out/Phaser.AnimationParser.html | 0 {Docs => docs2}/out/Phaser.Cache.html | 0 {Docs => docs2}/out/Phaser.Camera.html | 0 {Docs => docs2}/out/Phaser.Canvas.html | 0 {Docs => docs2}/out/Phaser.Circle.html | 0 {Docs => docs2}/out/Phaser.Color.html | 0 {Docs => docs2}/out/Phaser.Device.html | 0 {Docs => docs2}/out/Phaser.Easing.Back.html | 0 {Docs => docs2}/out/Phaser.Easing.Bounce.html | 0 .../out/Phaser.Easing.Circular.html | 0 {Docs => docs2}/out/Phaser.Easing.Cubic.html | 0 .../out/Phaser.Easing.Elastic.html | 0 .../out/Phaser.Easing.Exponential.html | 0 {Docs => docs2}/out/Phaser.Easing.Linear.html | 0 .../out/Phaser.Easing.Quadratic.html | 0 .../out/Phaser.Easing.Quartic.html | 0 .../out/Phaser.Easing.Quintic.html | 0 .../out/Phaser.Easing.Sinusoidal.html | 0 {Docs => docs2}/out/Phaser.Easing.html | 0 {Docs => docs2}/out/Phaser.Frame.html | 0 {Docs => docs2}/out/Phaser.FrameData.html | 0 {Docs => docs2}/out/Phaser.Game.html | 0 {Docs => docs2}/out/Phaser.Group.html | 0 {Docs => docs2}/out/Phaser.Input.html | 0 {Docs => docs2}/out/Phaser.InputHandler.html | 0 {Docs => docs2}/out/Phaser.Key.html | 0 {Docs => docs2}/out/Phaser.Keyboard.html | 0 {Docs => docs2}/out/Phaser.LinkedList.html | 0 {Docs => docs2}/out/Phaser.Loader.Parser.html | 0 {Docs => docs2}/out/Phaser.Loader.html | 0 {Docs => docs2}/out/Phaser.LoaderParser.html | 0 {Docs => docs2}/out/Phaser.MSPointer.html | 0 {Docs => docs2}/out/Phaser.Math.html | 0 {Docs => docs2}/out/Phaser.Mouse.html | 0 {Docs => docs2}/out/Phaser.Net.html | 0 .../out/Phaser.Particles.Arcade.Emitter.html | 0 {Docs => docs2}/out/Phaser.Particles.html | 0 {Docs => docs2}/out/Phaser.Plugin.html | 0 {Docs => docs2}/out/Phaser.PluginManager.html | 0 {Docs => docs2}/out/Phaser.Point.html | 0 {Docs => docs2}/out/Phaser.Pointer.html | 0 {Docs => docs2}/out/Phaser.QuadTree.html | 0 .../out/Phaser.RandomDataGenerator.html | 0 {Docs => docs2}/out/Phaser.Rectangle.html | 0 .../out/Phaser.RequestAnimationFrame.html | 0 {Docs => docs2}/out/Phaser.Signal.html | 0 {Docs => docs2}/out/Phaser.Sound.html | 0 {Docs => docs2}/out/Phaser.SoundManager.html | 0 {Docs => docs2}/out/Phaser.Stage.html | 0 .../out/Phaser.StageScaleMode.html | 0 {Docs => docs2}/out/Phaser.State.html | 0 {Docs => docs2}/out/Phaser.StateManager.html | 0 {Docs => docs2}/out/Phaser.Time.html | 0 {Docs => docs2}/out/Phaser.Touch.html | 0 {Docs => docs2}/out/Phaser.Tween.html | 0 {Docs => docs2}/out/Phaser.TweenManager.html | 0 {Docs => docs2}/out/Phaser.Utils.Debug.html | 0 {Docs => docs2}/out/Phaser.Utils.html | 0 {Docs => docs2}/out/Phaser.World.html | 0 {Docs => docs2}/out/Phaser.html | 0 {Docs => docs2}/out/Phaser.js.html | 0 {Docs => docs2}/out/Plugin.js.html | 0 .../PluginManager-Phaser.PluginManager.html | 0 {Docs => docs2}/out/PluginManager.html | 0 {Docs => docs2}/out/PluginManager.js.html | 0 {Docs => docs2}/out/Point.js.html | 0 {Docs => docs2}/out/Pointer.js.html | 0 {Docs => docs2}/out/QuadTree.js.html | 0 {Docs => docs2}/out/Quadratic.html | 0 {Docs => docs2}/out/Quartic.html | 0 {Docs => docs2}/out/Quintic.html | 0 .../out/RandomDataGenerator.js.html | 0 {Docs => docs2}/out/Rectangle.js.html | 0 .../out/RequestAnimationFrame.js.html | 0 {Docs => docs2}/out/Signal.js.html | 0 {Docs => docs2}/out/SignalBinding.html | 0 {Docs => docs2}/out/SignalBinding.js.html | 0 {Docs => docs2}/out/Sinusoidal.html | 0 {Docs => docs2}/out/Sound.js.html | 0 {Docs => docs2}/out/SoundManager.js.html | 0 {Docs => docs2}/out/Stage.js.html | 0 {Docs => docs2}/out/StageScaleMode.js.html | 0 {Docs => docs2}/out/State.js.html | 0 {Docs => docs2}/out/StateManager.js.html | 0 {Docs => docs2}/out/Time.js.html | 0 {Docs => docs2}/out/Touch.js.html | 0 {Docs => docs2}/out/Tween.js.html | 0 {Docs => docs2}/out/TweenManager.js.html | 0 {Docs => docs2}/out/Utils.html | 0 {Docs => docs2}/out/Utils.js.html | 0 {Docs => docs2}/out/Utils_.html | 0 {Docs => docs2}/out/World.js.html | 0 {Docs => docs2}/out/classes.list.html | 0 {Docs => docs2}/out/global.html | 0 .../out/img/glyphicons-halflings-white.png | Bin .../out/img/glyphicons-halflings.png | Bin {Docs => docs2}/out/index.html | 0 {Docs => docs2}/out/module-Phaser.html | 0 .../out/module-Tween-Phaser.Tween.html | 0 .../out/module-Tween-Phaser.TweenManager.html | 0 {Docs => docs2}/out/module-Tween.html | 0 {Docs => docs2}/out/modules.list.html | 0 {Docs => docs2}/out/namespaces.list.html | 0 {Docs => docs2}/out/scripts/URI.js | 0 .../out/scripts/bootstrap-dropdown.js | 0 {Docs => docs2}/out/scripts/bootstrap-tab.js | 0 .../out/scripts/jquery.localScroll.js | 0 {Docs => docs2}/out/scripts/jquery.min.js | 0 .../out/scripts/jquery.scrollTo.js | 0 .../out/scripts/jquery.sunlight.js | 0 {Docs => docs2}/out/scripts/linenumber.js | 0 .../scripts/prettify/Apache-License-2.0.txt | 0 .../out/scripts/prettify/jquery.min.js | 0 .../out/scripts/prettify/lang-css.js | 0 .../out/scripts/prettify/prettify.js | 0 .../out/scripts/sunlight-plugin.doclinks.js | 0 .../scripts/sunlight-plugin.linenumbers.js | 0 .../out/scripts/sunlight-plugin.menu.js | 0 .../out/scripts/sunlight.javascript.js | 0 {Docs => docs2}/out/scripts/sunlight.js | 0 {Docs => docs2}/out/scripts/toc.js | 0 {Docs => docs2}/out/styles/darkstrap.css | 0 {Docs => docs2}/out/styles/jsdoc-default.css | 0 {Docs => docs2}/out/styles/prettify-jsdoc.css | 0 .../out/styles/prettify-tomorrow.css | 0 {Docs => docs2}/out/styles/site.amelia.css | 0 {Docs => docs2}/out/styles/site.cerulean.css | 0 {Docs => docs2}/out/styles/site.cosmo.css | 0 {Docs => docs2}/out/styles/site.cyborg.css | 0 {Docs => docs2}/out/styles/site.darkstrap.css | 0 {Docs => docs2}/out/styles/site.flatly.css | 0 {Docs => docs2}/out/styles/site.journal.css | 0 {Docs => docs2}/out/styles/site.readable.css | 0 {Docs => docs2}/out/styles/site.simplex.css | 0 {Docs => docs2}/out/styles/site.slate.css | 0 {Docs => docs2}/out/styles/site.spacelab.css | 0 {Docs => docs2}/out/styles/site.spruce.css | 0 {Docs => docs2}/out/styles/site.superhero.css | 0 {Docs => docs2}/out/styles/site.united.css | 0 {Docs => docs2}/out/styles/sunlight.dark.css | 0 .../out/styles/sunlight.default.css | 0 {Docs => docs2}/tags.txt | 0 {Docs => docs2}/zwoptex-phaser.template | 0 examples/_site/view_full.html | 2 +- examples/assets/sprites/wizball.png | Bin 0 -> 2600 bytes examples/tilemaps/{Sci-Fly.js => sci fly.js} | 0 examples/wip/body test.js | 77 + {Plugins => plugins2}/CSS3Filters.js | 0 {Plugins => plugins2}/ColorHarmony.js | 0 {Plugins => plugins2}/SamplePlugin.js | 0 src/Phaser.js | 2 +- src/gameobjects/Sprite.js | 9 +- src/physics/arcade/ArcadePhysics.js | 19 + src/physics/arcade/Body.js | 1 + 333 files changed, 2058 insertions(+), 26 deletions(-) create mode 100644 build/phaser.d.ts create mode 100644 build/ts.bat rename {Docs => docs2}/Documentation Checklist.xlsx (100%) rename {Docs => docs2}/Hello Phaser/index.html (100%) rename {Docs => docs2}/Hello Phaser/logo.png (100%) rename {Docs => docs2}/Hello Phaser/phaser-min.js (100%) rename {Docs => docs2}/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla (100%) rename {Docs => docs2}/Phaser Logo/PNG/Phaser Logo Print Quality.png (100%) rename {Docs => docs2}/Phaser Logo/PNG/Phaser Logo Web Quality.png (100%) rename {Docs => docs2}/Phaser Logo/PNG/Phaser Logo iPad Resolution.png (100%) rename {Docs => docs2}/Phaser Logo/PNG/Phaser-Logo-Small.png (100%) rename {Docs => docs2}/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png (100%) rename {Docs => docs2}/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png (100%) rename {Docs => docs2}/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png (100%) rename {Docs => docs2}/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png (100%) rename {Docs => docs2}/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png (100%) rename {Docs => docs2}/Phaser Logo/Vector/Phaser Logo.eps (100%) rename {Docs => docs2}/Phaser Logo/Vector/Phaser Logo.fla (100%) rename {Docs => docs2}/Resources/avoid-digits.png (100%) rename {Docs => docs2}/Resources/avoid-panel.png (100%) rename {Docs => docs2}/Resources/avoid-sheet.png (100%) rename {Docs => docs2}/Resources/avoidmock4x2.png (100%) rename {Docs => docs2}/Resources/box-01.png (100%) rename {Docs => docs2}/Resources/box-02.png (100%) rename {Docs => docs2}/Resources/breakout2c.png (100%) rename {Docs => docs2}/Resources/phaser checkboxes.gif (100%) rename {Docs => docs2}/Resources/phaser power tools.gif (100%) rename {Docs => docs2}/Resources/phaser sprites10.gif (100%) rename {Docs => docs2}/Screen Shots/phaser-cybernoid.png (100%) rename {Docs => docs2}/Screen Shots/phaser_balls.png (100%) rename {Docs => docs2}/Screen Shots/phaser_blaster.png (100%) rename {Docs => docs2}/Screen Shots/phaser_cams.png (100%) rename {Docs => docs2}/Screen Shots/phaser_desert.png (100%) rename {Docs => docs2}/Screen Shots/phaser_fixed_camera.png (100%) rename {Docs => docs2}/Screen Shots/phaser_fruit.png (100%) rename {Docs => docs2}/Screen Shots/phaser_fruit_particles.png (100%) rename {Docs => docs2}/Screen Shots/phaser_mapdraw.png (100%) rename {Docs => docs2}/Screen Shots/phaser_mario_combo.png (100%) rename {Docs => docs2}/Screen Shots/phaser_particles.png (100%) rename {Docs => docs2}/Screen Shots/phaser_platformer.png (100%) rename {Docs => docs2}/Screen Shots/phaser_quadtree.png (100%) rename {Docs => docs2}/Screen Shots/phaser_rotate4.png (100%) rename {Docs => docs2}/Screen Shots/phaser_scrollfactor.png (100%) rename {Docs => docs2}/Screen Shots/phaser_sprite_bounds.png (100%) rename {Docs => docs2}/Screen Shots/phaser_tanks.png (100%) rename {Docs => docs2}/Screen Shots/phaser_tilemap.png (100%) rename {Docs => docs2}/Screen Shots/phaser_tilemap_collision.png (100%) rename {Docs => docs2}/Screen Shots/phaser_tilemap_debug.png (100%) rename {Docs => docs2}/WIP/01_phaser-arcade.jpg (100%) rename {Docs => docs2}/WIP/02_phaser-newsletter.jpg (100%) rename {Docs => docs2}/WIP/Physics Comparison.xlsx (100%) rename {Docs => docs2}/WIP/phaser-manual_2013-08-27.pdf (100%) rename {Docs => docs2}/WIP/phaser_copy.doc (100%) rename {Docs => docs2}/WIP/phaser_onscreen-controls_1-arcade.png (100%) rename {Docs => docs2}/WIP/phaser_onscreen-controls_2-dpad.png (100%) rename {Docs => docs2}/WIP/phaser_onscreen-controls_3-generic.png (100%) rename {Docs => docs2}/conf.json (100%) rename {Docs => docs2}/docstrap-master/.gitignore (100%) rename {Docs => docs2}/docstrap-master/.npmignore (100%) rename {Docs => docs2}/docstrap-master/Gruntfile.js (100%) rename {Docs => docs2}/docstrap-master/LICENSE.md (100%) rename {Docs => docs2}/docstrap-master/README.md (100%) rename {Docs => docs2}/docstrap-master/bower.json (100%) rename {Docs => docs2}/docstrap-master/component.json (100%) rename {Docs => docs2}/docstrap-master/fixtures/car.js (100%) rename {Docs => docs2}/docstrap-master/fixtures/example.conf.json (100%) rename {Docs => docs2}/docstrap-master/fixtures/other.js (100%) rename {Docs => docs2}/docstrap-master/fixtures/person.js (100%) rename {Docs => docs2}/docstrap-master/fixtures/tutorials/Brush Teeth.md (100%) rename {Docs => docs2}/docstrap-master/fixtures/tutorials/Drive Car.md (100%) rename {Docs => docs2}/docstrap-master/package.json (100%) rename {Docs => docs2}/docstrap-master/styles/bootswatch.less (100%) rename {Docs => docs2}/docstrap-master/styles/main.less (100%) rename {Docs => docs2}/docstrap-master/styles/variables.less (100%) rename {Docs => docs2}/docstrap-master/template/jsdoc.conf.json (100%) rename {Docs => docs2}/docstrap-master/template/publish.js (100%) rename {Docs => docs2}/docstrap-master/template/static/img/glyphicons-halflings-white.png (100%) rename {Docs => docs2}/docstrap-master/template/static/img/glyphicons-halflings.png (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/URI.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/bootstrap-dropdown.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/bootstrap-tab.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/jquery.localScroll.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/jquery.min.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/jquery.scrollTo.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/jquery.sunlight.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/prettify/jquery.min.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/prettify/lang-css.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/prettify/prettify.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/sunlight-plugin.menu.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/sunlight.javascript.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/sunlight.js (100%) rename {Docs => docs2}/docstrap-master/template/static/scripts/toc.js (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/darkstrap.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/prettify-tomorrow.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.amelia.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.cerulean.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.cosmo.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.cyborg.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.darkstrap.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.flatly.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.journal.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.readable.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.simplex.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.slate.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.spacelab.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.spruce.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.superhero.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/site.united.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/sunlight.dark.css (100%) rename {Docs => docs2}/docstrap-master/template/static/styles/sunlight.default.css (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/container.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/details.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/example.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/examples.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/exceptions.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/fires.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/layout.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/mainpage.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/members.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/method.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/params.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/properties.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/returns.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/sections.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/source.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/tutorial.tmpl (100%) rename {Docs => docs2}/docstrap-master/template/tmpl/type.tmpl (100%) rename {Docs => docs2}/jsdoc_work.txt (100%) rename {Docs => docs2}/out/Animation.js.html (100%) rename {Docs => docs2}/out/AnimationManager-Phaser.AnimationManager.html (100%) rename {Docs => docs2}/out/AnimationManager.html (100%) rename {Docs => docs2}/out/AnimationManager.js.html (100%) rename {Docs => docs2}/out/AnimationParser.js.html (100%) rename {Docs => docs2}/out/Back.html (100%) rename {Docs => docs2}/out/Bounce.html (100%) rename {Docs => docs2}/out/Cache.js.html (100%) rename {Docs => docs2}/out/Camera.js.html (100%) rename {Docs => docs2}/out/Canvas.js.html (100%) rename {Docs => docs2}/out/Circle.js.html (100%) rename {Docs => docs2}/out/Circular.html (100%) rename {Docs => docs2}/out/Color.js.html (100%) rename {Docs => docs2}/out/Cubic.html (100%) rename {Docs => docs2}/out/Debug.js.html (100%) rename {Docs => docs2}/out/Device.js.html (100%) rename {Docs => docs2}/out/Easing.js.html (100%) rename {Docs => docs2}/out/Elastic.html (100%) rename {Docs => docs2}/out/Emitter.js.html (100%) rename {Docs => docs2}/out/Exponential.html (100%) rename {Docs => docs2}/out/Frame.js.html (100%) rename {Docs => docs2}/out/FrameData.js.html (100%) rename {Docs => docs2}/out/Game.js.html (100%) rename {Docs => docs2}/out/Group.js.html (100%) rename {Docs => docs2}/out/Input.js.html (100%) rename {Docs => docs2}/out/InputHandler.js.html (100%) rename {Docs => docs2}/out/Intro.js.html (100%) rename {Docs => docs2}/out/Key.js.html (100%) rename {Docs => docs2}/out/Keyboard.js.html (100%) rename {Docs => docs2}/out/Linear.html (100%) rename {Docs => docs2}/out/LinkedList.js.html (100%) rename {Docs => docs2}/out/Loader.js.html (100%) rename {Docs => docs2}/out/LoaderParser.js.html (100%) rename {Docs => docs2}/out/MSPointer.js.html (100%) rename {Docs => docs2}/out/Math.js.html (100%) rename {Docs => docs2}/out/Mouse.js.html (100%) rename {Docs => docs2}/out/Net.js.html (100%) rename {Docs => docs2}/out/Parser.js.html (100%) rename {Docs => docs2}/out/Parser.js_.html (100%) rename {Docs => docs2}/out/Particles.js.html (100%) rename {Docs => docs2}/out/Phaser.Animation.Frame.html (100%) rename {Docs => docs2}/out/Phaser.Animation.FrameData.html (100%) rename {Docs => docs2}/out/Phaser.Animation.Parser.html (100%) rename {Docs => docs2}/out/Phaser.Animation.html (100%) rename {Docs => docs2}/out/Phaser.AnimationManager.html (100%) rename {Docs => docs2}/out/Phaser.AnimationParser.html (100%) rename {Docs => docs2}/out/Phaser.Cache.html (100%) rename {Docs => docs2}/out/Phaser.Camera.html (100%) rename {Docs => docs2}/out/Phaser.Canvas.html (100%) rename {Docs => docs2}/out/Phaser.Circle.html (100%) rename {Docs => docs2}/out/Phaser.Color.html (100%) rename {Docs => docs2}/out/Phaser.Device.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Back.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Bounce.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Circular.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Cubic.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Elastic.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Exponential.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Linear.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Quadratic.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Quartic.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Quintic.html (100%) rename {Docs => docs2}/out/Phaser.Easing.Sinusoidal.html (100%) rename {Docs => docs2}/out/Phaser.Easing.html (100%) rename {Docs => docs2}/out/Phaser.Frame.html (100%) rename {Docs => docs2}/out/Phaser.FrameData.html (100%) rename {Docs => docs2}/out/Phaser.Game.html (100%) rename {Docs => docs2}/out/Phaser.Group.html (100%) rename {Docs => docs2}/out/Phaser.Input.html (100%) rename {Docs => docs2}/out/Phaser.InputHandler.html (100%) rename {Docs => docs2}/out/Phaser.Key.html (100%) rename {Docs => docs2}/out/Phaser.Keyboard.html (100%) rename {Docs => docs2}/out/Phaser.LinkedList.html (100%) rename {Docs => docs2}/out/Phaser.Loader.Parser.html (100%) rename {Docs => docs2}/out/Phaser.Loader.html (100%) rename {Docs => docs2}/out/Phaser.LoaderParser.html (100%) rename {Docs => docs2}/out/Phaser.MSPointer.html (100%) rename {Docs => docs2}/out/Phaser.Math.html (100%) rename {Docs => docs2}/out/Phaser.Mouse.html (100%) rename {Docs => docs2}/out/Phaser.Net.html (100%) rename {Docs => docs2}/out/Phaser.Particles.Arcade.Emitter.html (100%) rename {Docs => docs2}/out/Phaser.Particles.html (100%) rename {Docs => docs2}/out/Phaser.Plugin.html (100%) rename {Docs => docs2}/out/Phaser.PluginManager.html (100%) rename {Docs => docs2}/out/Phaser.Point.html (100%) rename {Docs => docs2}/out/Phaser.Pointer.html (100%) rename {Docs => docs2}/out/Phaser.QuadTree.html (100%) rename {Docs => docs2}/out/Phaser.RandomDataGenerator.html (100%) rename {Docs => docs2}/out/Phaser.Rectangle.html (100%) rename {Docs => docs2}/out/Phaser.RequestAnimationFrame.html (100%) rename {Docs => docs2}/out/Phaser.Signal.html (100%) rename {Docs => docs2}/out/Phaser.Sound.html (100%) rename {Docs => docs2}/out/Phaser.SoundManager.html (100%) rename {Docs => docs2}/out/Phaser.Stage.html (100%) rename {Docs => docs2}/out/Phaser.StageScaleMode.html (100%) rename {Docs => docs2}/out/Phaser.State.html (100%) rename {Docs => docs2}/out/Phaser.StateManager.html (100%) rename {Docs => docs2}/out/Phaser.Time.html (100%) rename {Docs => docs2}/out/Phaser.Touch.html (100%) rename {Docs => docs2}/out/Phaser.Tween.html (100%) rename {Docs => docs2}/out/Phaser.TweenManager.html (100%) rename {Docs => docs2}/out/Phaser.Utils.Debug.html (100%) rename {Docs => docs2}/out/Phaser.Utils.html (100%) rename {Docs => docs2}/out/Phaser.World.html (100%) rename {Docs => docs2}/out/Phaser.html (100%) rename {Docs => docs2}/out/Phaser.js.html (100%) rename {Docs => docs2}/out/Plugin.js.html (100%) rename {Docs => docs2}/out/PluginManager-Phaser.PluginManager.html (100%) rename {Docs => docs2}/out/PluginManager.html (100%) rename {Docs => docs2}/out/PluginManager.js.html (100%) rename {Docs => docs2}/out/Point.js.html (100%) rename {Docs => docs2}/out/Pointer.js.html (100%) rename {Docs => docs2}/out/QuadTree.js.html (100%) rename {Docs => docs2}/out/Quadratic.html (100%) rename {Docs => docs2}/out/Quartic.html (100%) rename {Docs => docs2}/out/Quintic.html (100%) rename {Docs => docs2}/out/RandomDataGenerator.js.html (100%) rename {Docs => docs2}/out/Rectangle.js.html (100%) rename {Docs => docs2}/out/RequestAnimationFrame.js.html (100%) rename {Docs => docs2}/out/Signal.js.html (100%) rename {Docs => docs2}/out/SignalBinding.html (100%) rename {Docs => docs2}/out/SignalBinding.js.html (100%) rename {Docs => docs2}/out/Sinusoidal.html (100%) rename {Docs => docs2}/out/Sound.js.html (100%) rename {Docs => docs2}/out/SoundManager.js.html (100%) rename {Docs => docs2}/out/Stage.js.html (100%) rename {Docs => docs2}/out/StageScaleMode.js.html (100%) rename {Docs => docs2}/out/State.js.html (100%) rename {Docs => docs2}/out/StateManager.js.html (100%) rename {Docs => docs2}/out/Time.js.html (100%) rename {Docs => docs2}/out/Touch.js.html (100%) rename {Docs => docs2}/out/Tween.js.html (100%) rename {Docs => docs2}/out/TweenManager.js.html (100%) rename {Docs => docs2}/out/Utils.html (100%) rename {Docs => docs2}/out/Utils.js.html (100%) rename {Docs => docs2}/out/Utils_.html (100%) rename {Docs => docs2}/out/World.js.html (100%) rename {Docs => docs2}/out/classes.list.html (100%) rename {Docs => docs2}/out/global.html (100%) rename {Docs => docs2}/out/img/glyphicons-halflings-white.png (100%) rename {Docs => docs2}/out/img/glyphicons-halflings.png (100%) rename {Docs => docs2}/out/index.html (100%) rename {Docs => docs2}/out/module-Phaser.html (100%) rename {Docs => docs2}/out/module-Tween-Phaser.Tween.html (100%) rename {Docs => docs2}/out/module-Tween-Phaser.TweenManager.html (100%) rename {Docs => docs2}/out/module-Tween.html (100%) rename {Docs => docs2}/out/modules.list.html (100%) rename {Docs => docs2}/out/namespaces.list.html (100%) rename {Docs => docs2}/out/scripts/URI.js (100%) rename {Docs => docs2}/out/scripts/bootstrap-dropdown.js (100%) rename {Docs => docs2}/out/scripts/bootstrap-tab.js (100%) rename {Docs => docs2}/out/scripts/jquery.localScroll.js (100%) rename {Docs => docs2}/out/scripts/jquery.min.js (100%) rename {Docs => docs2}/out/scripts/jquery.scrollTo.js (100%) rename {Docs => docs2}/out/scripts/jquery.sunlight.js (100%) rename {Docs => docs2}/out/scripts/linenumber.js (100%) rename {Docs => docs2}/out/scripts/prettify/Apache-License-2.0.txt (100%) rename {Docs => docs2}/out/scripts/prettify/jquery.min.js (100%) rename {Docs => docs2}/out/scripts/prettify/lang-css.js (100%) rename {Docs => docs2}/out/scripts/prettify/prettify.js (100%) rename {Docs => docs2}/out/scripts/sunlight-plugin.doclinks.js (100%) rename {Docs => docs2}/out/scripts/sunlight-plugin.linenumbers.js (100%) rename {Docs => docs2}/out/scripts/sunlight-plugin.menu.js (100%) rename {Docs => docs2}/out/scripts/sunlight.javascript.js (100%) rename {Docs => docs2}/out/scripts/sunlight.js (100%) rename {Docs => docs2}/out/scripts/toc.js (100%) rename {Docs => docs2}/out/styles/darkstrap.css (100%) rename {Docs => docs2}/out/styles/jsdoc-default.css (100%) rename {Docs => docs2}/out/styles/prettify-jsdoc.css (100%) rename {Docs => docs2}/out/styles/prettify-tomorrow.css (100%) rename {Docs => docs2}/out/styles/site.amelia.css (100%) rename {Docs => docs2}/out/styles/site.cerulean.css (100%) rename {Docs => docs2}/out/styles/site.cosmo.css (100%) rename {Docs => docs2}/out/styles/site.cyborg.css (100%) rename {Docs => docs2}/out/styles/site.darkstrap.css (100%) rename {Docs => docs2}/out/styles/site.flatly.css (100%) rename {Docs => docs2}/out/styles/site.journal.css (100%) rename {Docs => docs2}/out/styles/site.readable.css (100%) rename {Docs => docs2}/out/styles/site.simplex.css (100%) rename {Docs => docs2}/out/styles/site.slate.css (100%) rename {Docs => docs2}/out/styles/site.spacelab.css (100%) rename {Docs => docs2}/out/styles/site.spruce.css (100%) rename {Docs => docs2}/out/styles/site.superhero.css (100%) rename {Docs => docs2}/out/styles/site.united.css (100%) rename {Docs => docs2}/out/styles/sunlight.dark.css (100%) rename {Docs => docs2}/out/styles/sunlight.default.css (100%) rename {Docs => docs2}/tags.txt (100%) rename {Docs => docs2}/zwoptex-phaser.template (100%) create mode 100644 examples/assets/sprites/wizball.png rename examples/tilemaps/{Sci-Fly.js => sci fly.js} (100%) create mode 100644 examples/wip/body test.js rename {Plugins => plugins2}/CSS3Filters.js (100%) rename {Plugins => plugins2}/ColorHarmony.js (100%) rename {Plugins => plugins2}/SamplePlugin.js (100%) diff --git a/README.md b/README.md index c78afa77..7662b867 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,13 @@ Try out the [Phaser Test Suite](http://gametest.mobi/phaser/) Welcome to Phaser ----------------- -It's staggering to think just how much has been achieved in the short time the 1.0 branch of Phaser has been available. We've seen literally hundreds of bug fixes and updates. Exciting new features and enhancements have been merged into the core library thanks to contributions from the community. We also completely overhauled the Examples Suite, removed the requirement for PHP, rebuilt it in html+js and filled it with over 150 examples to dig in to and learn from. And more importantly we've got our first pass at the API docs online and ready too. +It's staggering to think just how much has been achieved in the short time Phaser has been alive. We've implemented literally hundreds of bug fixes and updates, thanks to the effort the community puts in to reporting issues they find. Exciting new features have been merged into the core and we revisited old ones and pimped them out. We also completely overhauled the Examples Suite, removed the requirement for PHP, rebuilt it and filled it with over 150 examples to dig in and learn from. And more importantly we've got our first pass at the API docs ready too. -There is still more to be done of course. The API docs, while a good start, still need to be backed up with a proper comprehensive manual. And we desperately need to write some 'best practises' and 'getting started' tutorials. But at least now you don't have to flounder around in the dark and can turn to the examples and docs. +There is still more to be done of course. The API docs, while a good start, are lacking in places and still need to be backed up with a proper comprehensive manual. And we desperately need to write some 'best practises' and 'getting started' tutorials too. But we hope you appreciate the amount of effort that has been put in by the team so far. -There are so many exciting new features and tweaks in this build that we felt it warranted a proper full point release: 1.1. A few things have also changed, so games that were in development in the 1.0 version may need refactoring for 1.1, but we feel those changes have benefitted the framework as a whole. +There are many exciting new features and tweaks in this build that we felt it warranted a proper point release, hence the shift to version 1.1. Because of several core changes games that were in development in a 1.0.x version of Phaser may need refactoring for 1.1, but we feel those changes have helped the framework grow and mature as a whole. -As before "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available: you are our heroes. It's your kind words and enthusiasm, as well as our commercial need for Phaser that has kept us going. +As before we offer a heart-felt "Thank you!" to everyone who has encouraged us along the way. To those of you who worked with Phaser during its various incarnations, and who released full games with it despite there being zero API documentation available: you are our heroes. It's your kind words and enthusiasm that has kept us going. Phaser is everything we ever wanted from an HTML5 game framework. It powers all of our client work in build today and remains our single most important product, and we've only just scratched the surface of what we have planned for it. @@ -42,6 +42,7 @@ Version 1.1 * JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. * Brand new Example system (no more php!) and over 150 examples to learn from too. +* New TypeScript definitions file generated (in the build folder). * Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. * Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. * Updated ArcadePhysics.separateX/Y to use new body system - much better results now. @@ -134,6 +135,10 @@ Version 1.1 * Added AnimationManager.refreshFrame - will reset the texture being used for a Sprite (useful after a crop rect clear) * You can now null a Sprite.crop and it will clear down the crop rect area correctly. * The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils. +* Added Physics.overlap(sprite1, sprite2) for quick body vs. body overlap tests with no separation performed. +* Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events. + + Outstanding Tasks ----------------- @@ -145,14 +150,13 @@ Outstanding Tasks * TODO: Sound.addMarker hh:mm:ss:ms * TODO: swap state (non-destructive shift) * TODO: rotation offset -* TODO: check stage bgc on droid (http://www.html5gamedevs.com/topic/1629-stage-background-color-not-working-on-android-chrome/) Requirements ------------ Games created with Phaser require a modern web browser that supports the canvas tag. This includes Internet Explorer 9+, Firefox, Chrome, Safari and Opera. It also works on mobile web browsers including stock Android 2.x browser and above and iOS5 Mobile Safari and above. -For developing with Phaser you can use either a plain-vanilla JavaScript approach or [TypeScript](https://typescript.codeplex.com/). We made no assumptions about how you like to code your games, and were careful not to impose any form of class/inheritance/structure upon you. +For developing with Phaser you can use either a plain-vanilla JavaScript approach or [TypeScript](https://typescript.codeplex.com/) using the provided TypeScript definitions file. We made no assumptions about how you like to code your games, and were careful not to impose any form of class/inheritance/structure upon you. Phaser is 275 KB minified and 62 KB gzipped. @@ -226,11 +230,6 @@ Although Phaser 1.0 is a brand new release it is born from years of experience b ![Phaser Particles](http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_particles.png) -Known Issues ------------- - -* The TypeScript definition file isn't yet complete. - Future Plans ------------ @@ -248,20 +247,20 @@ The following list is not exhaustive and is subject to change: * Flash CC html output support. * Game parameters read from Google Docs. -Test Suite ----------- +Learn By Example +---------------- -Phaser comes with an ever growing Test Suite. Personally we learn better by looking at small refined code examples, so we create lots of them to test each new feature we add. Inside the Tests folder you'll find the current set. If you write a particularly good test then please send it to us. +Phaser comes with an ever growing suite of Examples. Personally I feel that we learn better by looking at small refined code examples, so we created over 150 of them and create new ones to test every new feature added. Inside the `examples` folder you'll find the current set. If you write a particularly good example then please send it to us. -The tests need running through a local web server (to avoid file access permission errors from your browser). +The examples need running through a local web server (to avoid file access permission errors from your browser). -Make sure you can browse to the Tests folder via your web server. If you've got php installed then launch: +Browse to the examples folder via your web server. - examples/index.php + examples/index.html -Right now the Test Suite requires PHP, but we will remove this requirement soon. +There is a new 'Side View' example viewer as well. This loads all the examples into a left-hand frame for faster navigation. -You can also browse the [Phaser Test Suite](http://gametest.mobi/phaser/) online. +You can also browse all [Phaser Examples](http://gametest.mobi/phaser/) online. Contributing ------------ diff --git a/build/build.php b/build/build.php index d95247e7..e5a4e48f 100644 --- a/build/build.php +++ b/build/build.php @@ -8,7 +8,7 @@ $buildLog = "Building version $version \n\n"; $header = ""; - $js = file(dirname(__FILE__) . 'config.php'); + $js = file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.php'); $output = ""; for ($i = 0; $i < count($js); $i++) diff --git a/build/phaser.d.ts b/build/phaser.d.ts new file mode 100644 index 00000000..5633d524 --- /dev/null +++ b/build/phaser.d.ts @@ -0,0 +1,1901 @@ + + +declare module Phaser { + + + export interface Animation { + + + game: any; + name: any; + delay: any; + looped: any; + killOnComplete: any; + isFinished: any; + isPlaying: any; + isPaused: any; + currentFrame: any; + paused: any; + frameTotal: any; + frame: any; + + static play(frameRate: number, loop: boolean, killOnComplete: boolean): Phaser.Animation; + static restart(): any; + static stop(resetFrame: boolean): any; + static update(): any; + static destroy(): any; + static onComplete(): any; + static generateFrameNames(prefix: string, min: number, max: number, suffix: string, zeroPad: number): any; + } + + export interface AnimationManager { + + + sprite: any; + game: any; + currentFrame: any; + updateIfVisible: any; + isLoaded: any; + frameData: any; + frameTotal: any; + paused: any; + frame: any; + frameName: any; + + add(name: string, frames: Array, frameRate: number, loop: boolean, useNumericIndex: boolean): Phaser.Animation; + validateFrames(frames: Array, useNumericIndex: boolean): boolean; + play(name: string, frameRate: number, loop: boolean, killOnComplete: boolean): Phaser.Animation; + stop(name: string, resetFrame: boolean): any; + update(): boolean; + refreshFrame(): any; + destroy(): any; + } + + export interface AnimationParser { + + + static spriteSheet(game: Phaser.Game, key: string, frameWidth: number, frameHeight: number, frameMax: number): Phaser.FrameData; + static JSONData(game: Phaser.Game, json: Object, cacheKey: string): Phaser.FrameData; + static JSONDataHash(game: Phaser.Game, json: Object, cacheKey: string): Phaser.FrameData; + static XMLData(game: Phaser.Game, xml: Object, cacheKey: string): Phaser.FrameData; + } + + export interface BitmapText { + + + exists: any; + alive: any; + group: any; + name: any; + game: any; + type: any; + anchor: any; + scale: any; + + update(): any; + destroy(): any; + } + + export interface Button { + + + type: any; + onInputOver: any; + onInputOut: any; + onInputDown: any; + onInputUp: any; + + setFrames(overFrame: string|number, outFrame: string|number, downFrame: string|number): any; + onInputOverHandler(pointer: Description): any; + onInputOutHandler(pointer: Description): any; + onInputDownHandler(pointer: Description): any; + onInputUpHandler(pointer: Description): any; + } + + export interface Cache { + + + game: any; + onSoundUnlock: any; + + addCanvas(key: string, canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): any; + addRenderTexture(key: string, textue: Phaser.Texture): any; + addSpriteSheet(key: string, url: string, data: object, frameWidth: number, frameHeight: number, frameMax: number): any; + addTileset(key: string, url: string, data: object, tileWidth: number, tileHeight: number, tileMax: number, tileMargin: number, tileSpacing: number): any; + addTilemap(key: string, url: string, mapData: object, format: number): any; + addTextureAtlas(key: string, url: string, data: object, atlasData: object, format: number): any; + addBitmapFont(key: string, url: string, data: object, xmlData): any; + addDefaultImage(): any; + addText(key: string, url: string, data: object): any; + addImage(key: string, url: string, data: object): any; + addSound(key: string, url: string, data: object, webAudio: boolean, audioTag: boolean): any; + reloadSound(key: string): any; + reloadSoundComplete(key: string): any; + updateSound(key: string, property, value): any; + decodedSound(key: string, data: object): any; + getCanvas(key: string): object; + checkImageKey(key: string): boolean; + getImage(key: string): object; + getTilesetImage(key: string): object; + getTileset(key: string): Phaser.Tileset; + getTilemapData(key: string): Object; + getFrameData(key: string): Phaser.FrameData; + getFrameByIndex(key: string, frame): Phaser.Frame; + getFrameByName(key: string, frame): Phaser.Frame; + getFrame(key: string): Phaser.Frame; + getTextureFrame(key: string): Phaser.Frame; + getTexture(key: string): Phaser.RenderTexture; + getSound(key: string): Phaser.Sound; + getSoundData(key: string): object; + isSoundDecoded(key: string): boolean; + isSoundReady(key: string): boolean; + isSpriteSheet(key: string): boolean; + getText(key: string): object; + getKeys(array: Array): Array; + getImageKeys(): Array; + getSoundKeys(): Array; + getTextKeys(): Array; + removeCanvas(key: string): any; + removeImage(key: string): any; + removeSound(key: string): any; + removeText(key: string): any; + destroy(): any; + } + + export interface Camera { + + + game: any; + world: any; + id: any; + view: any; + screenView: any; + bounds: any; + deadzone: any; + visible: any; + atLimit: any; + target: any; + static FOLLOW_LOCKON: any; + static FOLLOW_PLATFORMER: any; + static FOLLOW_TOPDOWN: any; + static FOLLOW_TOPDOWN_TIGHT: any; + x: any; + y: any; + width: any; + height: any; + + follow(target: Phaser.Sprite, style: number): any; + focusOn(displayObject: any): any; + focusOnXY(x: number, y: number): any; + update(): any; + checkBounds(): any; + setPosition(x: number, y: number): any; + setSize(width: number, height: number): any; + } + + export interface Canvas { + + + static create(width: number, height: number): HTMLCanvasElement; + static getOffset(element: HTMLElement, point: Phaser.Point): Phaser.Point; + static getAspectRatio(canvas: HTMLCanvasElement): number; + static setBackgroundColor(canvas: HTMLCanvasElement, color: string): HTMLCanvasElement; + static setTouchAction(canvas: HTMLCanvasElement, value: String): HTMLCanvasElement; + static setUserSelect(canvas: HTMLCanvasElement, value: String): HTMLCanvasElement; + static addToDOM(canvas: HTMLCanvasElement, parent: string, overflowHidden: boolean): HTMLCanvasElement; + static setTransform(context: CanvasRenderingContext2D, translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): CanvasRenderingContext2D; + static setSmoothingEnabled(context: CanvasRenderingContext2D, value: boolean): CanvasRenderingContext2D; + static setImageRenderingCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement; + static setImageRenderingBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement; + } + + export interface Circle { + + + x: any; + y: any; + diameter: any; + radius: any; + left: any; + right: any; + top: any; + bottom: any; + area: any; + empty: any; + + circumference(): number; + setTo(x: number, y: number, diameter: number): Circle; + copyFrom(source: any): Circle; + copyTo(dest: any): Object; + distance(dest: object, round: boolean): number; + clone(out: Phaser.Circle): Phaser.Circle; + contains(x: number, y: number): boolean; + circumferencePoint(angle: number, asDegrees: boolean, out: Phaser.Point): Phaser.Point; + offset(dx: number, dy: number): Circle; + offsetPoint(point: Point): Circle; + toString(): string; + static contains(a: Phaser.Circle, x: number, y: number): boolean; + static equals(a: Phaser.Circle, b: Phaser.Circle): boolean; + static intersects(a: Phaser.Circle, b: Phaser.Circle): boolean; + static circumferencePoint(a: Phaser.Circle, angle: number, asDegrees: boolean, out: Phaser.Point): Phaser.Point; + static intersectsRectangle(c: Phaser.Circle, r: Phaser.Rectangle): boolean; + } + + export interface Color { + + + static getColor32(alpha: number, red: number, green: number, blue: number): number; + static getColor(red: number, green: number, blue: number): number; + static hexToRGB(h: string): object; + static getColorInfo(color: number): string; + static RGBtoHexstring(color: number): string; + static RGBtoWebstring(color: number): string; + static colorToHexstring(color: number): string; + static interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number; + static interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number; + static interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number; + static getRandomColor(min: number, max: number, alpha: number): number; + static getRGB(color: number): object; + static getWebRGB(color: number): string; + static getAlpha(color: number): number; + static getAlphaFloat(color: number): number; + static getRed(color: number): number; + static getGreen(color: number): number; + static getBlue(color: number): number; + } + + export interface Device { + + + patchAndroidClearRectBug: any; + desktop: any; + iOS: any; + android: any; + chromeOS: any; + linux: any; + macOS: any; + windows: any; + canvas: any; + file: any; + fileSystem: any; + localStorage: any; + webGL: any; + worker: any; + touch: any; + mspointer: any; + css3D: any; + pointerLock: any; + arora: any; + chrome: any; + epiphany: any; + firefox: any; + ie: any; + ieVersion: any; + mobileSafari: any; + midori: any; + opera: any; + safari: any; + audioData: any; + webAudio: any; + ogg: any; + opus: any; + mp3: any; + wav: any; + m4a: any; + webm: any; + iPhone: any; + iPhone4: any; + iPad: any; + pixelRatio: any; + + canPlayAudio(type: string): boolean; + isConsoleOpen(): boolean; + } + + export interface Easing { + + } + + export interface Events { + + } + + export interface Frame { + + + index: any; + x: any; + y: any; + width: any; + height: any; + name: any; + uuid: any; + centerX: any; + centerY: any; + distance: any; + rotated: any; + rotationDirection: any; + trimmed: any; + sourceSizeW: any; + sourceSizeH: any; + spriteSourceSizeX: any; + spriteSourceSizeY: any; + spriteSourceSizeW: any; + spriteSourceSizeH: any; + + setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): any; + } + + export interface FrameData { + + + total: any; + + addFrame(frame: Phaser.Frame): Phaser.Frame; + getFrame(index: number): Phaser.Frame; + getFrameByName(name: string): Phaser.Frame; + checkFrameName(name: string): boolean; + getFrameRange(start: number, end: number, output: Array): Array; + getFrames(frames: Array, useNumericIndex: boolean, output: Array): Array; + getFrameIndexes(frames: Array, useNumericIndex: boolean, output: Array): Array; + } + + export interface Game { + + + id: any; + parent: any; + width: any; + height: any; + transparent: any; + antialias: any; + renderer: any; + state: any; + renderType: any; + isBooted: any; + isRunning: any; + raf: any; + add: any; + cache: any; + input: any; + load: any; + math: any; + net: any; + sound: any; + stage: any; + time: any; + tweens: any; + world: any; + physics: any; + rnd: any; + device: any; + camera: any; + canvas: any; + context: any; + debug: any; + particles: any; + paused: any; + + boot(): any; + setUpRenderer(): any; + loadComplete(): any; + update(time: number): any; + destroy(): any; + } + + export interface GameObjectFactory { + + + game: any; + world: any; + + existing(-: object): boolean; + sprite(x: number, y: number, key: string|RenderTexture, frame: string|number): Description; + child(group: Phaser.Group, x: number, y: number, key: string|RenderTexture, frame: string|number): Description; + tween(obj: object): Description; + group(parent: Description, name: Description): Description; + audio(key: Description, volume: Description, loop: Description): Description; + tileSprite(x: Description, y: Description, width: Description, height: Description, key: Description, frame: Description): Description; + text(x: Description, y: Description, text: Description, style: Description): any; + button(x: Description, y: Description, callback: Description, callbackContext: Description, overFrame: Description, outFrame: Description, downFrame: Description, downFrame): Description; + graphics(x: Description, y: Description): Description; + emitter(x: Description, y: Description, maxParticles: Description): Description; + bitmapText(x: Description, y: Description, text: Description, style: Description): Description; + tilemap(key: Description): Description; + tileset(key: Description): Description; + tilemapLayer(x: Description, y: Description, width: Description, height: Description, key: Description, frame: Description, layer): Description; + renderTexture(key: Description, width: Description, height: Description): Description; + } + + export interface Graphics { + + + type: any; + + destroy(): any; + } + + export interface Group { + + + game: any; + name: any; + type: any; + exists: any; + scale: any; + total: any; + length: any; + x: any; + y: any; + angle: any; + rotation: any; + visible: any; + alpha: any; + + add(child: *): *; + addAt(child: *, index: number): *; + static getAt(index: number): *; + create(x: number, y: number, key: string, frame: number|string, exists: boolean): Phaser.Sprite; + createMultiple(quantity: number, key: string, frame: number|string, exists: boolean): any; + swap(child1: *, child2: *): boolean; + bringToTop(child: *): *; + getIndex(child: *): number; + replace(oldChild: *, newChild: *): any; + setProperty(child: *, key: array, value: *, operation: number): any; + setAll(key: string, value: *, checkAlive: boolean, checkVisible: boolean, operation: number): any; + addAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; + subAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; + multiplyAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; + divideAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; + callAllExists(callback: function, existsValue: boolean, parameter: ...*): any; + callAll(callback: function, parameter: ...*): any; + forEach(callback: function, callbackContext: Object, checkExists: boolean): any; + forEachAlive(callback: function, callbackContext: Object): any; + forEachDead(callback: function, callbackContext: Object): any; + getFirstExists(state: boolean): Any; + getFirstAlive(): Any; + getFirstDead(): Any; + countLiving(): number; + countDead(): number; + getRandom(startIndex: number, length: number): Any; + remove(child: Any): any; + removeAll(): any; + removeBetween(startIndex: number, endIndex: number): any; + destroy(): any; + dump(full: boolean): any; + } + + export interface Input { + + + game: any; + hitCanvas: any; + hitContext: any; + static MOUSE_OVERRIDES_TOUCH: any; + static TOUCH_OVERRIDES_MOUSE: any; + static MOUSE_TOUCH_COMBINE: any; + pollRate: any; + disabled: any; + multiInputOverride: any; + position: any; + speed: any; + circle: any; + scale: any; + maxPointers: any; + currentPointers: any; + tapRate: any; + doubleTapRate: any; + holdRate: any; + justPressedRate: any; + justReleasedRate: any; + recordPointerHistory: any; + recordRate: any; + recordLimit: any; + pointer1: any; + pointer2: any; + pointer3: any; + pointer4: any; + pointer5: any; + pointer6: any; + pointer7: any; + pointer8: any; + pointer9: any; + pointer10: any; + activePointer: any; + mousePointer: any; + mouse: any; + keyboard: any; + touch: any; + mspointer: any; + onDown: any; + onUp: any; + onTap: any; + onHold: any; + interactiveItems: any; + x: any; + y: any; + pollLocked: any; + totalInactivePointers: any; + totalActivePointers: any; + worldX: any; + worldY: any; + + boot(): any; + addPointer(): Phaser.Pointer; + update(): any; + reset(hard: boolean): any; + resetSpeed(x: number, y: number): any; + startPointer(event: Any): Phaser.Pointer; + updatePointer(event: Any): Phaser.Pointer; + stopPointer(event: Any): Phaser.Pointer; + getPointer(state: boolean): Phaser.Pointer; + getPointerFromIdentifier(identifier: number): Phaser.Pointer; + getDistance(pointer1: Pointer, pointer2: Pointer): Description; + getAngle(pointer1: Pointer, pointer2: Pointer): Description; + } + + export interface InputHandler { + + + sprite: any; + game: any; + enabled: any; + parent: any; + next: any; + prev: any; + last: any; + first: any; + priorityID: any; + useHandCursor: any; + isDragged: any; + allowHorizontalDrag: any; + allowVerticalDrag: any; + bringToTop: any; + snapOffset: any; + snapOnDrag: any; + snapOnRelease: any; + snapX: any; + snapY: any; + pixelPerfect: any; + pixelPerfectAlpha: any; + draggable: any; + boundsRect: any; + boundsSprite: any; + consumePointerEvent: any; + + start(priority: number, useHandCursor: boolean): Phaser.Sprite; + reset(): any; + stop(): any; + destroy(): any; + pointerX(pointer: Pointer): number; + pointerY(pointer: Pointer): number; + pointerDown(pointer: Pointer): boolean; + pointerUp(pointer: Pointer): boolean; + pointerTimeDown(pointer: Pointer): number; + pointerTimeUp(pointer: Pointer): number; + pointerOver(pointer: Pointer): {bool; + pointerOut(pointer: Pointer): boolean; + pointerTimeOver(pointer: Pointer): number; + pointerTimeOut(pointer: Pointer): number; + pointerDragged(pointer: Pointer): number; + checkPointerOver(pointer: Pointer): boolean; + checkPixel(x: Description, y: Description): boolean; + update(pointer: Pointer): any; + updateDrag(pointer: Pointer): boolean; + justOver(pointer: Pointer, delay: number): boolean; + justOut(pointer: Pointer, delay: number): boolean; + justPressed(pointer: Pointer, delay: number): boolean; + justReleased(pointer: Pointer, delay: number): boolean; + overDuration(pointer: Pointer): number; + downDuration(pointer: Pointer): number; + enableDrag(lockCenter, bringToTop, pixelPerfect, alphaThreshold, boundsRect, boundsSprite): any; + disableDrag(): any; + startDrag(pointer): any; + stopDrag(pointer): any; + setDragLock(allowHorizontal, allowVertical): any; + enableSnap(snapX, snapY, onDrag, onRelease): any; + disableSnap(): any; + checkBoundsRect(): any; + checkBoundsSprite(): any; + } + + export interface Key { + + + game: any; + isDown: any; + isUp: any; + altKey: any; + ctrlKey: any; + shiftKey: any; + timeDown: any; + duration: any; + timeUp: any; + repeats: any; + keyCode: any; + onDown: any; + onUp: any; + + processKeyDown(event.: KeyboardEvent): any; + processKeyUp(event.: KeyboardEvent): any; + justPressed(duration: number): boolean; + justReleased(duration: number): boolean; + } + + export interface Keyboard { + + + game: any; + disabled: any; + callbackContext: any; + onDownCallback: any; + onUpCallback: any; + + addCallbacks(context: Object, onDown: function, onUp: function): any; + addKey(keycode: number): Phaser.Key; + removeKey(keycode: number): any; + createCursorKeys(): object; + start(): any; + stop(): any; + addKeyCapture(keycode: Any): any; + removeKeyCapture(keycode: number): any; + clearCaptures(): any; + processKeyDown(event: KeyboardEvent): any; + processKeyUp(event: KeyboardEvent): any; + reset(): any; + justPressed(keycode: number, duration: number): boolean; + justReleased(keycode: number, duration: number): boolean; + isDown(keycode: number): boolean; + } + + export interface LinkedList { + + + next: any; + prev: any; + first: any; + last: any; + total: any; + + add(child: object): object; + remove(child: object): any; + callAll(callback: function): any; + } + + export interface Loader { + + + game: any; + queueSize: any; + isLoading: any; + hasLoaded: any; + progress: any; + preloadSprite: any; + crossOrigin: any; + baseURL: any; + onFileComplete: any; + onFileError: any; + onLoadStart: any; + onLoadComplete: any; + static TEXTURE_ATLAS_JSON_ARRAY: any; + static TEXTURE_ATLAS_JSON_HASH: any; + static TEXTURE_ATLAS_XML_STARLING: any; + + setPreloadSprite(sprite: Phaser.Sprite, direction: number): any; + checkKeyExists(key: string): boolean; + reset(): any; + addToFileList(type: Description, key: string, url: string, properties: Description): any; + image(key: string, url: string, overwrite: boolean): any; + text(key: string, url: string, overwrite: boolean): any; + spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax: number): any; + tileset(key: string, url: string, tileWidth: number, tileHeight: number, tileMax: number, tileMargin: number, tileSpacing: number): any; + audio(key: string, urls: Array, autoDecode: boolean): any; + tilemap(key: string, tilesetURL: string, mapDataURL: string, mapData: object, format: string): any; + bitmapFont(key: string, textureURL: string, xmlURL: string, xmlData: object): any; + atlasJSONArray(key: string, atlasURL: Description, atlasData: Description, atlasData): any; + atlasJSONHash(key: string, atlasURL: Description, atlasData: Description, atlasData): any; + atlasXML(key: string, atlasURL: Description, atlasData: Description, atlasData): any; + atlas(key: string, textureURL: string, atlasURL: string, atlasData: object, format: number): any; + removeFile(key): any; + removeAll(): any; + start(): any; + fileError(key: string): any; + fileComplete(key: string): any; + jsonLoadComplete(key: string): any; + csvLoadComplete(key: string): any; + dataLoadError(key: string): any; + xmlLoadComplete(key: string): any; + } + + export interface LoaderParser { + + + static bitmapFont(xml: object, xml, cacheKey): FrameData; + } + + export interface Math { + + + static PI2: any; + static degToRad: function; + static radToDeg: function; + + static fuzzyEqual(a: number, b: number, epsilon: number): boolean; + static fuzzyLessThan(a: number, b: number, epsilon: number): boolean; + static fuzzyGreaterThan(a: number, b: number, epsilon: number): boolean; + static fuzzyCeil(val: number, epsilon: number): boolean; + static fuzzyFloor(val: number, epsilon: number): boolean; + static average(): number; + static truncate(n: number): number; + static shear(n: number): number; + static snapTo(input: number, gap: number, start: number): number; + static snapToFloor(input: number, gap: number, start: number): number; + static snapToCeil(input: number, gap: number, start: number): number; + static snapToInArray(input: number, arr: array, sort: boolean): number; + static roundTo(value: number, place: number, base: number): number; + static floorTo(value: number, place: number, base: number): number; + static ceilTo(value: number, place: number, base: number): number; + static interpolateFloat(a: number, b: number, weight: number): number; + static angleBetween(x1: number, y1: number, x2: number, y2: number): number; + static normalizeAngle(angle: number, radians: boolean): number; + static nearestAngleBetween(a1: number, a2: number, radians: boolean): number; + static interpolateAngles(a1: number, a2: number, weight: number, radians: boolean, ease: Description): number; + static chanceRoll(chance: number): boolean; + static numberArray(min: number, max: number): array; + static maxAdd(value: number, amount: number, max-: number): number; + static minSub(value: number, amount: number, min: number): number; + static wrap(value, min, max): number; + static wrapValue(value: number, amount: number, max: number): number; + static randomSign(): number; + static isOdd(n: number): boolean; + static isEven(n: number): boolean; + static max(): number; + static min(): number; + static wrapAngle(angle: number): number; + static angleLimit(angle: number, min: number, max: number): number; + static linearInterpolation(v: number, k: number): number; + static bezierInterpolation(v: number, k: number): number; + static catmullRomInterpolation(v: number, k: number): number; + static linear(p0: number, p1: number, t: number): number; + static bernstein(n: number, i: number): number; + static catmullRom(p0: number, p1: number, p2: number, p3: number, t: number): number; + static difference(a: number, b: number): number; + static getRandom(objects: array, startIndex: number, length: number): object; + static floor(Value: number): number; + static ceil(value: number): number; + static sinCosGenerator(length: number, sinAmplitude: number, cosAmplitude: number, frequency: number): Array; + static shift(stack: array): any; + static shuffleArray(array: array): array; + static distance(x1: number, y1: number, x2: number, y2: number): number; + static distanceRounded(x1: number, y1: number, x2: number, y2: number): number; + static clamp(x: number, a: number, b: number): number; + static clampBottom(x: number, a: number): number; + static within(a: number, b: number, tolerance: number): boolean; + static mapLinear(x: number, a1: number, a1: number, a2: number, b1: number, b2: number): number; + static smoothstep(x: number, min: number, max: number): number; + static smootherstep(x: number, min: number, max: number): number; + static sign(x: number): number; + } + + export interface Mouse { + + + game: any; + callbackContext: any; + mouseDownCallback: any; + mouseMoveCallback: any; + mouseUpCallback: any; + disabled: any; + locked: any; + static LEFT_BUTTON: any; + static MIDDLE_BUTTON: any; + static RIGHT_BUTTON: any; + + start(): any; + onMouseDown(event: MouseEvent): any; + onMouseMove(event: MouseEvent): any; + onMouseUp(event: MouseEvent): any; + requestPointerLock(): any; + pointerLockChange(event: MouseEvent): any; + releasePointerLock(): any; + stop(): any; + } + + export interface MSPointer { + + + game: any; + callbackContext: any; + mouseDownCallback: any; + mouseMoveCallback: any; + mouseUpCallback: any; + disabled: any; + + start(): any; + onPointerDown(event: Any): any; + onPointerMove(event: Any): any; + onPointerUp(event: Any): any; + stop(): any; + } + + export interface Net { + + + getHostName(): string; + checkDomainName(domain: string): boolean; + updateQueryString(key: string, value: string, redirect: boolean, url: string): string; + getQueryString(parameter: string): string|object; + decodeURI(value: string): string; + } + + export interface Particles { + + + emitters: any; + ID: any; + + add(emitter: Phaser.Emitter): Phaser.Emitter; + remove(emitter: Phaser.Emitter): any; + update(): any; + } + + export interface Plugin { + + + game: any; + parent: any; + active: any; + visible: any; + hasPreUpdate: any; + hasUpdate: any; + hasRender: any; + hasPostRender: any; + + preUpdate(): any; + update(): any; + render(): any; + postRender(): any; + destroy(): any; + } + + export interface PluginManager { + + + game: any; + plugins: any; + + add(plugin: Phaser.Plugin): Phaser.Plugin; + remove(plugin: Phaser.Plugin): any; + preUpdate(): any; + update(): any; + render(): any; + postRender(): any; + destroy(): any; + } + + export interface Point { + + + x: any; + y: any; + + copyFrom(source: any): Point; + invert(): Point; + setTo(x: number, y: number): Point; + add(x: number, y: number): Phaser.Point; + subtract(x: number, y: number): Phaser.Point; + multiply(x: number, y: number): Phaser.Point; + divide(x: number, y: number): Phaser.Point; + clampX(min: number, max: number): Phaser.Point; + clampY(min: number, max: number): Phaser.Point; + clamp(min: number, max: number): Phaser.Point; + clone(output: Phaser.Point): Phaser.Point; + copyTo(dest: any): Object; + distance(dest: object, round: boolean): number; + equals(a: Phaser.Point): boolean; + rotate(x: number, y: number, angle: number, asDegrees: boolean, distance: number): Phaser.Point; + toString(): string; + static add(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; + static subtract(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; + static multiply(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; + static divide(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; + static equals(a: Phaser.Point, b: Phaser.Point): boolean; + static distance(a: object, b: object, round: boolean): number; + static rotate(a: Phaser.Point, x: number, y: number, angle: number, asDegrees: boolean, distance: number): Phaser.Point; + } + + export interface Pointer { + + + game: any; + id: any; + positionDown: any; + position: any; + circle: any; + withinGame: any; + clientX: any; + clientY: any; + pageX: any; + pageY: any; + screenX: any; + screenY: any; + x: any; + y: any; + isMouse: any; + isDown: any; + isUp: any; + timeDown: any; + timeUp: any; + previousTapTime: any; + totalTouches: any; + msSinceLastClick: any; + targetObject: any; + active: any; + duration: any; + worldX: any; + worldY: any; + + start(event: Any): any; + update(): any; + move(event: Any): any; + leave(event: Any): any; + stop(event: Any): any; + justPressed(duration: number): boolean; + justReleased(duration: number): boolean; + reset(): any; + toString(): string; + } + + export interface QuadTree { + + } + + export interface RandomDataGenerator { + + + sow(seeds: array): any; + integer(): number; + frac(): number; + real(): number; + integerInRange(min: number, max: number): number; + realInRange(min: number, max: number): number; + normal(): number; + uuid(): string; + pick(ary: Any): number; + weightedPick(ary: Any): number; + timestamp(min: number, max: number): number; + angle(): number; + } + + export interface Rectangle { + + + x: any; + y: any; + width: any; + height: any; + halfWidth: any; + halfHeight: any; + bottom: any; + left: any; + right: any; + volume: any; + perimeter: any; + centerX: any; + centerY: any; + top: any; + topLeft: any; + empty: any; + + offset(dx: number, dy: number): Rectangle; + offsetPoint(point: Point): Rectangle; + setTo(x: number, y: number, width: number, height: number): Rectangle; + floor(): any; + copyFrom(source: any): Rectangle; + copyTo(source: any): object; + inflate(dx: number, dy: number): Phaser.Rectangle; + size(output: Phaser.Point): Phaser.Point; + clone(output: Phaser.Rectangle): Phaser.Rectangle; + contains(x: number, y: number): boolean; + containsRect(b: Phaser.Rectangle): boolean; + equals(b: Phaser.Rectangle): boolean; + intersection(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + intersects(b: Phaser.Rectangle, tolerance: number): boolean; + intersectsRaw(left: number, right: number, top: number, bottomt: number, tolerance: number): boolean; + union(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + toString(): string; + static inflate(a: Phaser.Rectangle, dx: number, dy: number): Phaser.Rectangle; + static inflatePoint(a: Phaser.Rectangle, point: Phaser.Point): Phaser.Rectangle; + static size(a: Phaser.Rectangle, output: Phaser.Point): Phaser.Point; + static clone(a: Phaser.Rectangle, output: Phaser.Rectangle): Phaser.Rectangle; + static contains(a: Phaser.Rectangle, x: number, y: number): boolean; + static containsPoint(a: Phaser.Rectangle, point: Phaser.Point): boolean; + static containsRect(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; + static equals(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; + static intersection(a: Phaser.Rectangle, b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + static intersects(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; + static intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number, tolerance): boolean; + static union(a: Phaser.Rectangle, b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + } + + export interface RenderTexture { + + + game: any; + name: any; + width: any; + height: any; + indetityMatrix: any; + frame: any; + type: any; + } + + export interface RequestAnimationFrame { + + + game: any; + isRunning: any; + + start(): any; + updateRAF(time: number): any; + updateSetTimeout(): any; + stop(): any; + isSetTimeOut(): boolean; + isRAF(): boolean; + } + + export interface Signal { + + + memorize: any; + active: any; + + dispatch(): any; + has(listener: Function, context: Object): boolean; + add(listener: function, listenerContext: object, priority: number): Phaser.SignalBinding; + addOnce(listener: function, listenerContext: object, priority: number): Phaser.SignalBinding; + remove(listener: function, context: object): function; + removeAll(): any; + getNumListeners(): number; + halt(): any; + forget(): any; + dispose(): any; + toString(): string; + } + + export interface Sound { + + + game: any; + name: any; + key: any; + loop: any; + markers: any; + context: any; + totalDuration: any; + startTime: any; + currentTime: any; + duration: any; + stopTime: any; + paused: any; + isPlaying: any; + currentMarker: any; + pendingPlayback: any; + override: any; + usingWebAudio: any; + usingAudioTag: any; + onDecoded: any; + onPlay: any; + onPause: any; + onResume: any; + onLoop: any; + onStop: any; + onMute: any; + onMarkerComplete: any; + isDecoding: any; + isDecoded: any; + mute: any; + volume: any; + + soundHasUnlocked(key: string): any; + addMarker(name: string, start: number, duration: number, volume: number, loop: boolean): any; + removeMarker(name: string): any; + update(): any; + play(marker: string, position: number, volume: number, loop: boolean, forceRestart: boolean): Sound; + restart(marker: string, position: number, volume: number, loop: boolean): any; + pause(): any; + resume(): any; + stop(): any; + } + + export interface SoundManager { + + + game: any; + onSoundDecode: any; + context: any; + usingWebAudio: any; + usingAudioTag: any; + noAudio: any; + touchLocked: any; + channels: any; + mute: any; + volume: any; + + boot(): any; + unlock(): any; + stopAll(): any; + pauseAll(): any; + resumeAll(): any; + decode(key: string, sound: Phaser.Sound): any; + update(): any; + add(key: string, volume: number, loop: boolean): any; + } + + export interface Sprite { + + + game: any; + exists: any; + alive: any; + group: any; + name: any; + type: any; + renderOrderID: any; + lifespan: any; + events: any; + animations: any; + input: any; + key: any; + anchor: any; + x: any; + y: any; + autoCull: any; + scale: any; + offset: any; + center: any; + topLeft: any; + topRight: any; + bottomRight: any; + bottomLeft: any; + bounds: any; + body: any; + health: any; + inWorld: any; + inWorldThreshold: any; + outOfBoundsKill: any; + fixedToCamera: any; + angle: any; + + preUpdate(): any; + centerOn(x: number, y: number): any; + revive(health): any; + kill(): any; + destroy(): any; + damage(amount): any; + reset(x, y, health): any; + updateBounds(): any; + getLocalPosition(p: Description, x: number, y: number): Description; + getLocalUnmodifiedPosition(p: Description, x: number, y: number): Description; + bringToTop(): any; + play(name: String, frameRate: number, loop: boolean, killOnComplete: boolean): Phaser.Animation; + } + + export interface Stage { + + + game: any; + offset: any; + canvas: any; + scaleMode: any; + scale: any; + aspectRatio: any; + backgroundColor: any; + + visibilityChange(event: Event): any; + } + + export interface StageScaleMode { + + + forceLandscape: any; + forcePortrait: any; + incorrectOrientation: any; + pageAlignHorizontally: any; + pageAlignVertically: any; + minWidth: any; + maxWidth: any; + minHeight: any; + maxHeight: any; + width: any; + height: any; + maxIterations: any; + game: any; + enterLandscape: any; + enterPortrait: any; + scaleFactor: any; + aspectRatio: any; + static EXACT_FIT: any; + static NO_SCALE: any; + static SHOW_ALL: any; + isFullScreen: any; + isPortrait: any; + isLandscape: any; + + startFullScreen(): any; + stopFullScreen(): any; + checkOrientationState(): any; + checkOrientation(event: Event): any; + checkResize(event: Event): any; + refresh(): any; + setScreenSize(force: Description): any; + setSize(): any; + setMaximum(): any; + setShowAll(): any; + setExactFit(): any; + } + + export interface State { + + + game: any; + add: any; + camera: any; + cache: any; + input: any; + load: any; + math: any; + sound: any; + stage: any; + time: any; + tweens: any; + world: any; + particles: any; + physics: any; + + preload(): any; + loadUpdate(): any; + loadRender(): any; + create(): any; + update(): any; + render(): any; + paused(): any; + destroy(): any; + } + + export interface StateManager { + + + game: any; + states: any; + current: any; + onInitCallback: any; + onPreloadCallback: any; + onCreateCallback: any; + onUpdateCallback: any; + onRenderCallback: any; + onPreRenderCallback: any; + onLoadUpdateCallback: any; + onLoadRenderCallback: any; + onPausedCallback: any; + onShutDownCallback: any; + + add(key, state, autoStart): any; + remove(key: string): any; + start(key: string, clearWorld: boolean, clearCache: boolean): any; + checkState(key: string): boolean; + link(key: string): any; + setCurrentState(key: string): any; + loadComplete(): any; + update(): any; + preRender(): any; + render(): any; + destroy(): any; + } + + export interface Text { + + + exists: any; + alive: any; + group: any; + name: any; + game: any; + type: any; + anchor: any; + scale: any; + renderable: any; + + update(): any; + destroy(): any; + } + + export interface Tile { + + + tileset: any; + index: any; + width: any; + height: any; + x: any; + y: any; + mass: any; + collideNone: any; + collideLeft: any; + collideRight: any; + collideUp: any; + collideDown: any; + separateX: any; + separateY: any; + collisionCallback: any; + collisionCallbackContext: any; + + setCollisionCallback(callback: Function, context: object): any; + destroy(): any; + setCollision(left: boolean, right: boolean, up: boolean, down: boolean, reset: boolean, separateX: boolean, separateY: boolean): any; + resetCollision(): any; + } + + export interface TileSprite { + + + texture: any; + type: any; + tileScale: any; + tilePosition: any; + } + + export interface Time { + + + game: any; + physicsElapsed: any; + time: any; + pausedTime: any; + now: any; + elapsed: any; + fps: any; + fpsMin: any; + fpsMax: any; + msMin: any; + msMax: any; + frames: any; + pauseDuration: any; + timeToCall: any; + lastTime: any; + + totalElapsedSeconds(): number; + update(time: number): any; + elapsedSince(since: number): number; + elapsedSecondsSince(since: number): number; + reset(): any; + } + + export interface Touch { + + + game: any; + disabled: boolean; + callbackContext: any; + touchStartCallback: any; + touchMoveCallback: any; + touchEndCallback: any; + touchEnterCallback: any; + touchLeaveCallback: any; + touchCancelCallback: any; + preventDefault: any; + + start(): any; + consumeDocumentTouches(): any; + onTouchStart(event: Any): any; + onTouchCancel(event: Any): any; + onTouchEnter(event: Any): any; + onTouchLeave(event: Any): any; + onTouchMove(event: Any): any; + onTouchEnd(event: Any): any; + stop(): any; + } + + export interface Tween { + + + game: any; + pendingDelete: any; + onStart: any; + onComplete: any; + isRunning: any; + + to(properties: object, duration: number, ease: function, autoStart: boolean, delay: number, repeat: boolean, yoyo: Phaser.Tween): Phaser.Tween; + start(time: number): Phaser.Tween; + stop(): Phaser.Tween; + delay(amount: number): Phaser.Tween; + repeat(times: number): Phaser.Tween; + yoyo(yoyo: boolean): Phaser.Tween; + easing(easing: function): Phaser.Tween; + interpolation(interpolation: function): Phaser.Tween; + chain(): Phaser.Tween; + loop(): Phaser.Tween; + onStartCallback(callback: function): Phaser.Tween; + onUpdateCallback(callback: function): Phaser.Tween; + onCompleteCallback(callback: function): Phaser.Tween; + pause(): any; + resume(): any; + update(time: number): boolean; + } + + export interface TweenManager { + + + game: any; + REVISION: any; + + getAll(): Phaser.Tween[]; + removeAll(): any; + add(tween: Phaser.Tween): Phaser.Tween; + create(object: Object): Phaser.Tween; + remove(tween: Phaser.Tween): any; + update(): boolean; + pauseAll(): any; + resumeAll(): any; + } + + export interface Utils { + + + static pad(str: string, len: number, pad: number, dir: number): string; + static isPlainObject(obj: object): boolean; + static extend(deep: boolean, target: object): object; + } + + export interface World { + + + scale: any; + bounds: any; + camera: any; + currentRenderOrderID: any; + width: any; + height: any; + centerX: any; + centerY: any; + randomX: any; + randomY: any; + + boot(): any; + update(): any; + postUpdate(): any; + setBounds(x: number, y: number, width: number, height: number): any; + destroy(): any; + } + + + } + + + +declare module Phaser.Easing { + + + export interface Back { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Bounce { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Circular { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Cubic { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Elastic { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Exponential { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Linear { + + + static None(k: number): number; + } + + export interface Quadratic { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Quartic { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Quintic { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + export interface Sinusoidal { + + + static In(k: number): number; + static Out(k: number): number; + static InOut(k: number): number; + } + + + } + + + +declare module Phaser.Particles.Arcade { + + + export interface Emitter extends Phaser.Group { + + + maxParticles: any; + name: any; + type: any; + x: any; + y: any; + width: any; + height: any; + minParticleSpeed: any; + maxParticleSpeed: any; + minParticleScale: any; + maxParticleScale: any; + minRotation: any; + maxRotation: any; + gravity: any; + particleClass: any; + particleDrag: any; + angularDrag: any; + frequency: any; + lifespan: any; + bounce: any; + on: any; + exists: any; + emitX: any; + emitY: any; + alpha: any; + visible: any; + left: any; + right: any; + top: any; + bottom: any; + + update(): any; + makeParticles(keys: Description, frames: number, quantity: number, collide: number, collideWorldBounds: boolean): This Emitter instance (nice for chaining stuff together, if you're into that).; + kill(): any; + revive(): any; + start(explode: boolean, lifespan: number, frequency: number, quantity: number): any; + emitParticle(): any; + setSize(width: number, height: number): any; + setXSpeed(min: number, max: number): any; + setYSpeed(min: number, max: number): any; + setRotation(min: number, max: number): any; + at(object: object): any; + } + + + } + + + +declare module Phaser.Utils { + + + export interface Debug { + + + game: any; + context: any; + font: any; + lineHeight: any; + renderShadow: any; + currentX: any; + currentY: any; + currentAlpha: any; + + start(x: number, y: number, color: string): any; + stop(): any; + line(text: string, x: number, y: number): any; + renderQuadTree(quadtree: Phaser.QuadTree, color: string): any; + renderSpriteCorners(sprite: Phaser.Sprite, showText: boolean, showBounds: boolean, color: string): any; + renderSoundInfo(sound: Phaser.Sound, x: number, y: number, color: string): any; + renderCameraInfo(camera: Phaser.Camera, x: number, y: number, color: string): any; + renderPointer(pointer: Phaser.Pointer, hideIfUp: boolean, downColor: string, upColor: string, color: string): any; + renderSpriteInputInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; + renderSpriteCollision(sprite: Phaser.Sprite, x: number, y: number, color: string): any; + renderInputInfo(x: number, y: number, color: string): any; + renderSpriteInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; + renderWorldTransformInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; + renderLocalTransformInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; + renderPointInfo(sprite: Phaser.Point, x: number, y: number, color: string): any; + renderSpriteBody(sprite: Phaser.Sprite, color: string): any; + renderSpriteBounds(sprite: Phaser.Sprite, color: string, fill: boolean): any; + renderPixel(x: number, y: number, color: string): any; + renderPoint(point: Phaser.Point, color: string): any; + renderRectangle(rect: Phaser.Rectangle, color: string): any; + renderCircle(circle: Phaser.Circle, color: string): any; + renderText(text: string, x: number, y: number, color: string, font: string): any; + dumpLinkedList(list: Phaser.LinkedList): any; + } + + + } + + + +declare module PIXI { + + + export interface BaseTexture { + + + width: Number; + height: Number; + hasLoaded: Boolean; + source: Image; + + destroy(): any; + static fromImage(imageUrl, crossorigin): BaseTexture; + } + + export interface BitmapText { + + + setText(text): any; + setStyle(style, style.font, style.align): any; + } + + export interface CanvasGraphics { + + } + + export interface CanvasRenderer { + + + width: Number; + height: Number; + view: Canvas; + context: Canvas 2d Context; + + render(stage): any; + resize(width, height): any; + renderDisplayObject(displayObject): any; + } + + export interface CustomRenderable { + + + renderCanvas(renderer): any; + initWebGL(renderer): any; + renderWebGL(renderer, projectionMatrix): any; + } + + export interface DisplayObject { + + + position: Point; + scale: Point; + pivot: Point; + rotation: Number; + alpha: Number; + visible: Boolean; + hitArea: Rectangle|Circle|Ellipse|Polygon; + buttonMode: Boolean; + renderable: Boolean; + parent: DisplayObjectContainer; + stage: Stage; + worldAlpha: Number; + constructor: any; + + setInteractive(interactive): any; + } + + export interface DisplayObjectContainer { + + + children: Array; + + addChild(child): any; + addChildAt(child, index): any; + getChildAt(index): any; + removeChild(child): any; + } + + export interface EventTarget { + + } + + export interface Graphics { + + + fillAlpha: Number; + lineWidth: Number; + lineColor: String; + + lineStyle(lineWidth, color, alpha): any; + moveTo(x, y): any; + lineTo(x, y): any; + beginFill(color, alpha): any; + endFill(): any; + drawRect(x, y, width, height): any; + drawCircle(x, y, radius): any; + drawElipse(x, y, width, height): any; + clear(): any; + } + + export interface Point { + + + x: Number; + y: Number; + + clone(): Point; + } + + export interface Rectangle { + + + x: Number; + y: Number; + width: Number; + height: Number; + + clone(): Rectangle; + contains(x, y): Boolean; + } + + export interface RenderTexture { + + } + + export interface Sprite { + + + anchor: Point; + texture: Texture; + blendMode: Number; + + setTexture(texture): any; + static fromFrame(frameId): Sprite; + static fromImage(imageId): Sprite; + setText(text: String): any; + } + + export interface Stage { + + + interactive: Boolean; + interactionManager: InteractionManager; + + setBackgroundColor(backgroundColor): any; + getMousePosition(): Point; + } + + export interface Text { + + + setStyle(style, style.font, style.fill, style.align, style.stroke, style.strokeThickness, style.wordWrap, style.wordWrapWidth): any; + destroy(destroyTexture): any; + } + + export interface Texture { + + + baseTexture: BaseTexture; + frame: Rectangle; + trim: Point; + + destroy(destroyBase): any; + setFrame(frame): any; + static fromImage(imageUrl, crossorigin): Texture; + static fromFrame(frameId): Texture; + static fromCanvas(canvas): Texture; + static addTextureToCache(texture, id): any; + static removeTextureFromCache(id): Texture; + } + + export interface TilingSprite { + + + texture: Texture; + width: Number; + height: Number; + tileScale: Point; + tilePosition: Point; + + setTexture(texture): any; + } + + export interface WebGLBatch { + + + clean(): any; + restoreLostContext(gl): any; + init(sprite): any; + insertBefore(sprite, nextSprite): any; + insertAfter(sprite, previousSprite): any; + remove(sprite): any; + split(sprite): WebGLBatch; + merge(batch): any; + growBatch(): any; + refresh(): any; + update(): any; + render(start, end): any; + } + + export interface WebGLGraphics { + + } + + export interface WebGLRenderer { + + + render(stage): any; + resize(width, height): any; + } + + export interface WebGLRenderGroup { + + + render(projection): any; + } + + + } + + + +declare module PIXI.PolyK { + + + export interface Triangulate { + + } + + + } + diff --git a/build/phaser.js b/build/phaser.js index 96ca286c..fe82308e 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -9,7 +9,7 @@ * * Phaser - http://www.phaser.io * -* v1.0.7 - Built at: Tue, 22 Oct 2013 00:54:52 +0100 +* v1.1.0 - Built at: Wed, 23 Oct 2013 13:05:12 +0100 * * By Richard Davey http://www.photonstorm.com @photonstorm * @@ -56,7 +56,7 @@ var PIXI = PIXI || {}; */ var Phaser = Phaser || { - VERSION: '1.0.7-beta', + VERSION: '1.1.0', GAMES: [], AUTO: 0, CANVAS: 1, @@ -15955,6 +15955,9 @@ Phaser.Sprite = function (game, x, y, key, frame) { */ this.scale = new Phaser.Point(1, 1); + // console.log(this.worldTransform); + // this.worldTransform = []; + /** * @property {Phaser.Point} _cache - A mini cache for storing all of the calculated values. * @private @@ -16331,7 +16334,11 @@ Phaser.Sprite.prototype.kill = function() { this.alive = false; this.exists = false; this.visible = false; - this.events.onKilled.dispatch(this); + + if (this.events) + { + this.events.onKilled.dispatch(this); + } } @@ -30380,6 +30387,25 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * Checks if two Sprite objects intersect. + * + * @param object1 The first object to check. Can be an instance of Phaser.Sprite or anything that extends it. + * @param object2 The second object to check. Can be an instance of Phaser.Sprite or anything that extends it. + * @returns {boolean} true if the two objects overlap. + **/ + overlap: function (object1, object2) { + + // Only test valid objects + if (object1 && object2 && object1.exists && object2.exists) + { + return (Phaser.Rectangle.intersects(object1.body, object2.body)); + } + + return false; + + }, + /** * Checks for collision between two game objects. The objects can be Sprites, Groups, Emitters or Tilemaps. * You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap or Group vs. Tilemap collisions. @@ -31527,6 +31553,7 @@ Phaser.Physics.Arcade.Body.prototype = { // this.preX = (this.sprite.localTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; // this.preY = (this.sprite.localTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; + this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; diff --git a/build/ts.bat b/build/ts.bat new file mode 100644 index 00000000..7b415531 --- /dev/null +++ b/build/ts.bat @@ -0,0 +1 @@ +jsdocts -d:phaser.d.ts phaser.js \ No newline at end of file diff --git a/Docs/Documentation Checklist.xlsx b/docs2/Documentation Checklist.xlsx similarity index 100% rename from Docs/Documentation Checklist.xlsx rename to docs2/Documentation Checklist.xlsx diff --git a/Docs/Hello Phaser/index.html b/docs2/Hello Phaser/index.html similarity index 100% rename from Docs/Hello Phaser/index.html rename to docs2/Hello Phaser/index.html diff --git a/Docs/Hello Phaser/logo.png b/docs2/Hello Phaser/logo.png similarity index 100% rename from Docs/Hello Phaser/logo.png rename to docs2/Hello Phaser/logo.png diff --git a/Docs/Hello Phaser/phaser-min.js b/docs2/Hello Phaser/phaser-min.js similarity index 100% rename from Docs/Hello Phaser/phaser-min.js rename to docs2/Hello Phaser/phaser-min.js diff --git a/Docs/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla b/docs2/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla similarity index 100% rename from Docs/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla rename to docs2/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla diff --git a/Docs/Phaser Logo/PNG/Phaser Logo Print Quality.png b/docs2/Phaser Logo/PNG/Phaser Logo Print Quality.png similarity index 100% rename from Docs/Phaser Logo/PNG/Phaser Logo Print Quality.png rename to docs2/Phaser Logo/PNG/Phaser Logo Print Quality.png diff --git a/Docs/Phaser Logo/PNG/Phaser Logo Web Quality.png b/docs2/Phaser Logo/PNG/Phaser Logo Web Quality.png similarity index 100% rename from Docs/Phaser Logo/PNG/Phaser Logo Web Quality.png rename to docs2/Phaser Logo/PNG/Phaser Logo Web Quality.png diff --git a/Docs/Phaser Logo/PNG/Phaser Logo iPad Resolution.png b/docs2/Phaser Logo/PNG/Phaser Logo iPad Resolution.png similarity index 100% rename from Docs/Phaser Logo/PNG/Phaser Logo iPad Resolution.png rename to docs2/Phaser Logo/PNG/Phaser Logo iPad Resolution.png diff --git a/Docs/Phaser Logo/PNG/Phaser-Logo-Small.png b/docs2/Phaser Logo/PNG/Phaser-Logo-Small.png similarity index 100% rename from Docs/Phaser Logo/PNG/Phaser-Logo-Small.png rename to docs2/Phaser Logo/PNG/Phaser-Logo-Small.png diff --git a/Docs/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png b/docs2/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png similarity index 100% rename from Docs/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png rename to docs2/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png diff --git a/Docs/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png b/docs2/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png similarity index 100% rename from Docs/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png rename to docs2/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png diff --git a/Docs/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png b/docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png similarity index 100% rename from Docs/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png rename to docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png diff --git a/Docs/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png b/docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png similarity index 100% rename from Docs/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png rename to docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png diff --git a/Docs/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png b/docs2/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png similarity index 100% rename from Docs/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png rename to docs2/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png diff --git a/Docs/Phaser Logo/Vector/Phaser Logo.eps b/docs2/Phaser Logo/Vector/Phaser Logo.eps similarity index 100% rename from Docs/Phaser Logo/Vector/Phaser Logo.eps rename to docs2/Phaser Logo/Vector/Phaser Logo.eps diff --git a/Docs/Phaser Logo/Vector/Phaser Logo.fla b/docs2/Phaser Logo/Vector/Phaser Logo.fla similarity index 100% rename from Docs/Phaser Logo/Vector/Phaser Logo.fla rename to docs2/Phaser Logo/Vector/Phaser Logo.fla diff --git a/Docs/Resources/avoid-digits.png b/docs2/Resources/avoid-digits.png similarity index 100% rename from Docs/Resources/avoid-digits.png rename to docs2/Resources/avoid-digits.png diff --git a/Docs/Resources/avoid-panel.png b/docs2/Resources/avoid-panel.png similarity index 100% rename from Docs/Resources/avoid-panel.png rename to docs2/Resources/avoid-panel.png diff --git a/Docs/Resources/avoid-sheet.png b/docs2/Resources/avoid-sheet.png similarity index 100% rename from Docs/Resources/avoid-sheet.png rename to docs2/Resources/avoid-sheet.png diff --git a/Docs/Resources/avoidmock4x2.png b/docs2/Resources/avoidmock4x2.png similarity index 100% rename from Docs/Resources/avoidmock4x2.png rename to docs2/Resources/avoidmock4x2.png diff --git a/Docs/Resources/box-01.png b/docs2/Resources/box-01.png similarity index 100% rename from Docs/Resources/box-01.png rename to docs2/Resources/box-01.png diff --git a/Docs/Resources/box-02.png b/docs2/Resources/box-02.png similarity index 100% rename from Docs/Resources/box-02.png rename to docs2/Resources/box-02.png diff --git a/Docs/Resources/breakout2c.png b/docs2/Resources/breakout2c.png similarity index 100% rename from Docs/Resources/breakout2c.png rename to docs2/Resources/breakout2c.png diff --git a/Docs/Resources/phaser checkboxes.gif b/docs2/Resources/phaser checkboxes.gif similarity index 100% rename from Docs/Resources/phaser checkboxes.gif rename to docs2/Resources/phaser checkboxes.gif diff --git a/Docs/Resources/phaser power tools.gif b/docs2/Resources/phaser power tools.gif similarity index 100% rename from Docs/Resources/phaser power tools.gif rename to docs2/Resources/phaser power tools.gif diff --git a/Docs/Resources/phaser sprites10.gif b/docs2/Resources/phaser sprites10.gif similarity index 100% rename from Docs/Resources/phaser sprites10.gif rename to docs2/Resources/phaser sprites10.gif diff --git a/Docs/Screen Shots/phaser-cybernoid.png b/docs2/Screen Shots/phaser-cybernoid.png similarity index 100% rename from Docs/Screen Shots/phaser-cybernoid.png rename to docs2/Screen Shots/phaser-cybernoid.png diff --git a/Docs/Screen Shots/phaser_balls.png b/docs2/Screen Shots/phaser_balls.png similarity index 100% rename from Docs/Screen Shots/phaser_balls.png rename to docs2/Screen Shots/phaser_balls.png diff --git a/Docs/Screen Shots/phaser_blaster.png b/docs2/Screen Shots/phaser_blaster.png similarity index 100% rename from Docs/Screen Shots/phaser_blaster.png rename to docs2/Screen Shots/phaser_blaster.png diff --git a/Docs/Screen Shots/phaser_cams.png b/docs2/Screen Shots/phaser_cams.png similarity index 100% rename from Docs/Screen Shots/phaser_cams.png rename to docs2/Screen Shots/phaser_cams.png diff --git a/Docs/Screen Shots/phaser_desert.png b/docs2/Screen Shots/phaser_desert.png similarity index 100% rename from Docs/Screen Shots/phaser_desert.png rename to docs2/Screen Shots/phaser_desert.png diff --git a/Docs/Screen Shots/phaser_fixed_camera.png b/docs2/Screen Shots/phaser_fixed_camera.png similarity index 100% rename from Docs/Screen Shots/phaser_fixed_camera.png rename to docs2/Screen Shots/phaser_fixed_camera.png diff --git a/Docs/Screen Shots/phaser_fruit.png b/docs2/Screen Shots/phaser_fruit.png similarity index 100% rename from Docs/Screen Shots/phaser_fruit.png rename to docs2/Screen Shots/phaser_fruit.png diff --git a/Docs/Screen Shots/phaser_fruit_particles.png b/docs2/Screen Shots/phaser_fruit_particles.png similarity index 100% rename from Docs/Screen Shots/phaser_fruit_particles.png rename to docs2/Screen Shots/phaser_fruit_particles.png diff --git a/Docs/Screen Shots/phaser_mapdraw.png b/docs2/Screen Shots/phaser_mapdraw.png similarity index 100% rename from Docs/Screen Shots/phaser_mapdraw.png rename to docs2/Screen Shots/phaser_mapdraw.png diff --git a/Docs/Screen Shots/phaser_mario_combo.png b/docs2/Screen Shots/phaser_mario_combo.png similarity index 100% rename from Docs/Screen Shots/phaser_mario_combo.png rename to docs2/Screen Shots/phaser_mario_combo.png diff --git a/Docs/Screen Shots/phaser_particles.png b/docs2/Screen Shots/phaser_particles.png similarity index 100% rename from Docs/Screen Shots/phaser_particles.png rename to docs2/Screen Shots/phaser_particles.png diff --git a/Docs/Screen Shots/phaser_platformer.png b/docs2/Screen Shots/phaser_platformer.png similarity index 100% rename from Docs/Screen Shots/phaser_platformer.png rename to docs2/Screen Shots/phaser_platformer.png diff --git a/Docs/Screen Shots/phaser_quadtree.png b/docs2/Screen Shots/phaser_quadtree.png similarity index 100% rename from Docs/Screen Shots/phaser_quadtree.png rename to docs2/Screen Shots/phaser_quadtree.png diff --git a/Docs/Screen Shots/phaser_rotate4.png b/docs2/Screen Shots/phaser_rotate4.png similarity index 100% rename from Docs/Screen Shots/phaser_rotate4.png rename to docs2/Screen Shots/phaser_rotate4.png diff --git a/Docs/Screen Shots/phaser_scrollfactor.png b/docs2/Screen Shots/phaser_scrollfactor.png similarity index 100% rename from Docs/Screen Shots/phaser_scrollfactor.png rename to docs2/Screen Shots/phaser_scrollfactor.png diff --git a/Docs/Screen Shots/phaser_sprite_bounds.png b/docs2/Screen Shots/phaser_sprite_bounds.png similarity index 100% rename from Docs/Screen Shots/phaser_sprite_bounds.png rename to docs2/Screen Shots/phaser_sprite_bounds.png diff --git a/Docs/Screen Shots/phaser_tanks.png b/docs2/Screen Shots/phaser_tanks.png similarity index 100% rename from Docs/Screen Shots/phaser_tanks.png rename to docs2/Screen Shots/phaser_tanks.png diff --git a/Docs/Screen Shots/phaser_tilemap.png b/docs2/Screen Shots/phaser_tilemap.png similarity index 100% rename from Docs/Screen Shots/phaser_tilemap.png rename to docs2/Screen Shots/phaser_tilemap.png diff --git a/Docs/Screen Shots/phaser_tilemap_collision.png b/docs2/Screen Shots/phaser_tilemap_collision.png similarity index 100% rename from Docs/Screen Shots/phaser_tilemap_collision.png rename to docs2/Screen Shots/phaser_tilemap_collision.png diff --git a/Docs/Screen Shots/phaser_tilemap_debug.png b/docs2/Screen Shots/phaser_tilemap_debug.png similarity index 100% rename from Docs/Screen Shots/phaser_tilemap_debug.png rename to docs2/Screen Shots/phaser_tilemap_debug.png diff --git a/Docs/WIP/01_phaser-arcade.jpg b/docs2/WIP/01_phaser-arcade.jpg similarity index 100% rename from Docs/WIP/01_phaser-arcade.jpg rename to docs2/WIP/01_phaser-arcade.jpg diff --git a/Docs/WIP/02_phaser-newsletter.jpg b/docs2/WIP/02_phaser-newsletter.jpg similarity index 100% rename from Docs/WIP/02_phaser-newsletter.jpg rename to docs2/WIP/02_phaser-newsletter.jpg diff --git a/Docs/WIP/Physics Comparison.xlsx b/docs2/WIP/Physics Comparison.xlsx similarity index 100% rename from Docs/WIP/Physics Comparison.xlsx rename to docs2/WIP/Physics Comparison.xlsx diff --git a/Docs/WIP/phaser-manual_2013-08-27.pdf b/docs2/WIP/phaser-manual_2013-08-27.pdf similarity index 100% rename from Docs/WIP/phaser-manual_2013-08-27.pdf rename to docs2/WIP/phaser-manual_2013-08-27.pdf diff --git a/Docs/WIP/phaser_copy.doc b/docs2/WIP/phaser_copy.doc similarity index 100% rename from Docs/WIP/phaser_copy.doc rename to docs2/WIP/phaser_copy.doc diff --git a/Docs/WIP/phaser_onscreen-controls_1-arcade.png b/docs2/WIP/phaser_onscreen-controls_1-arcade.png similarity index 100% rename from Docs/WIP/phaser_onscreen-controls_1-arcade.png rename to docs2/WIP/phaser_onscreen-controls_1-arcade.png diff --git a/Docs/WIP/phaser_onscreen-controls_2-dpad.png b/docs2/WIP/phaser_onscreen-controls_2-dpad.png similarity index 100% rename from Docs/WIP/phaser_onscreen-controls_2-dpad.png rename to docs2/WIP/phaser_onscreen-controls_2-dpad.png diff --git a/Docs/WIP/phaser_onscreen-controls_3-generic.png b/docs2/WIP/phaser_onscreen-controls_3-generic.png similarity index 100% rename from Docs/WIP/phaser_onscreen-controls_3-generic.png rename to docs2/WIP/phaser_onscreen-controls_3-generic.png diff --git a/Docs/conf.json b/docs2/conf.json similarity index 100% rename from Docs/conf.json rename to docs2/conf.json diff --git a/Docs/docstrap-master/.gitignore b/docs2/docstrap-master/.gitignore similarity index 100% rename from Docs/docstrap-master/.gitignore rename to docs2/docstrap-master/.gitignore diff --git a/Docs/docstrap-master/.npmignore b/docs2/docstrap-master/.npmignore similarity index 100% rename from Docs/docstrap-master/.npmignore rename to docs2/docstrap-master/.npmignore diff --git a/Docs/docstrap-master/Gruntfile.js b/docs2/docstrap-master/Gruntfile.js similarity index 100% rename from Docs/docstrap-master/Gruntfile.js rename to docs2/docstrap-master/Gruntfile.js diff --git a/Docs/docstrap-master/LICENSE.md b/docs2/docstrap-master/LICENSE.md similarity index 100% rename from Docs/docstrap-master/LICENSE.md rename to docs2/docstrap-master/LICENSE.md diff --git a/Docs/docstrap-master/README.md b/docs2/docstrap-master/README.md similarity index 100% rename from Docs/docstrap-master/README.md rename to docs2/docstrap-master/README.md diff --git a/Docs/docstrap-master/bower.json b/docs2/docstrap-master/bower.json similarity index 100% rename from Docs/docstrap-master/bower.json rename to docs2/docstrap-master/bower.json diff --git a/Docs/docstrap-master/component.json b/docs2/docstrap-master/component.json similarity index 100% rename from Docs/docstrap-master/component.json rename to docs2/docstrap-master/component.json diff --git a/Docs/docstrap-master/fixtures/car.js b/docs2/docstrap-master/fixtures/car.js similarity index 100% rename from Docs/docstrap-master/fixtures/car.js rename to docs2/docstrap-master/fixtures/car.js diff --git a/Docs/docstrap-master/fixtures/example.conf.json b/docs2/docstrap-master/fixtures/example.conf.json similarity index 100% rename from Docs/docstrap-master/fixtures/example.conf.json rename to docs2/docstrap-master/fixtures/example.conf.json diff --git a/Docs/docstrap-master/fixtures/other.js b/docs2/docstrap-master/fixtures/other.js similarity index 100% rename from Docs/docstrap-master/fixtures/other.js rename to docs2/docstrap-master/fixtures/other.js diff --git a/Docs/docstrap-master/fixtures/person.js b/docs2/docstrap-master/fixtures/person.js similarity index 100% rename from Docs/docstrap-master/fixtures/person.js rename to docs2/docstrap-master/fixtures/person.js diff --git a/Docs/docstrap-master/fixtures/tutorials/Brush Teeth.md b/docs2/docstrap-master/fixtures/tutorials/Brush Teeth.md similarity index 100% rename from Docs/docstrap-master/fixtures/tutorials/Brush Teeth.md rename to docs2/docstrap-master/fixtures/tutorials/Brush Teeth.md diff --git a/Docs/docstrap-master/fixtures/tutorials/Drive Car.md b/docs2/docstrap-master/fixtures/tutorials/Drive Car.md similarity index 100% rename from Docs/docstrap-master/fixtures/tutorials/Drive Car.md rename to docs2/docstrap-master/fixtures/tutorials/Drive Car.md diff --git a/Docs/docstrap-master/package.json b/docs2/docstrap-master/package.json similarity index 100% rename from Docs/docstrap-master/package.json rename to docs2/docstrap-master/package.json diff --git a/Docs/docstrap-master/styles/bootswatch.less b/docs2/docstrap-master/styles/bootswatch.less similarity index 100% rename from Docs/docstrap-master/styles/bootswatch.less rename to docs2/docstrap-master/styles/bootswatch.less diff --git a/Docs/docstrap-master/styles/main.less b/docs2/docstrap-master/styles/main.less similarity index 100% rename from Docs/docstrap-master/styles/main.less rename to docs2/docstrap-master/styles/main.less diff --git a/Docs/docstrap-master/styles/variables.less b/docs2/docstrap-master/styles/variables.less similarity index 100% rename from Docs/docstrap-master/styles/variables.less rename to docs2/docstrap-master/styles/variables.less diff --git a/Docs/docstrap-master/template/jsdoc.conf.json b/docs2/docstrap-master/template/jsdoc.conf.json similarity index 100% rename from Docs/docstrap-master/template/jsdoc.conf.json rename to docs2/docstrap-master/template/jsdoc.conf.json diff --git a/Docs/docstrap-master/template/publish.js b/docs2/docstrap-master/template/publish.js similarity index 100% rename from Docs/docstrap-master/template/publish.js rename to docs2/docstrap-master/template/publish.js diff --git a/Docs/docstrap-master/template/static/img/glyphicons-halflings-white.png b/docs2/docstrap-master/template/static/img/glyphicons-halflings-white.png similarity index 100% rename from Docs/docstrap-master/template/static/img/glyphicons-halflings-white.png rename to docs2/docstrap-master/template/static/img/glyphicons-halflings-white.png diff --git a/Docs/docstrap-master/template/static/img/glyphicons-halflings.png b/docs2/docstrap-master/template/static/img/glyphicons-halflings.png similarity index 100% rename from Docs/docstrap-master/template/static/img/glyphicons-halflings.png rename to docs2/docstrap-master/template/static/img/glyphicons-halflings.png diff --git a/Docs/docstrap-master/template/static/scripts/URI.js b/docs2/docstrap-master/template/static/scripts/URI.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/URI.js rename to docs2/docstrap-master/template/static/scripts/URI.js diff --git a/Docs/docstrap-master/template/static/scripts/bootstrap-dropdown.js b/docs2/docstrap-master/template/static/scripts/bootstrap-dropdown.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/bootstrap-dropdown.js rename to docs2/docstrap-master/template/static/scripts/bootstrap-dropdown.js diff --git a/Docs/docstrap-master/template/static/scripts/bootstrap-tab.js b/docs2/docstrap-master/template/static/scripts/bootstrap-tab.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/bootstrap-tab.js rename to docs2/docstrap-master/template/static/scripts/bootstrap-tab.js diff --git a/Docs/docstrap-master/template/static/scripts/jquery.localScroll.js b/docs2/docstrap-master/template/static/scripts/jquery.localScroll.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/jquery.localScroll.js rename to docs2/docstrap-master/template/static/scripts/jquery.localScroll.js diff --git a/Docs/docstrap-master/template/static/scripts/jquery.min.js b/docs2/docstrap-master/template/static/scripts/jquery.min.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/jquery.min.js rename to docs2/docstrap-master/template/static/scripts/jquery.min.js diff --git a/Docs/docstrap-master/template/static/scripts/jquery.scrollTo.js b/docs2/docstrap-master/template/static/scripts/jquery.scrollTo.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/jquery.scrollTo.js rename to docs2/docstrap-master/template/static/scripts/jquery.scrollTo.js diff --git a/Docs/docstrap-master/template/static/scripts/jquery.sunlight.js b/docs2/docstrap-master/template/static/scripts/jquery.sunlight.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/jquery.sunlight.js rename to docs2/docstrap-master/template/static/scripts/jquery.sunlight.js diff --git a/Docs/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt b/docs2/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt similarity index 100% rename from Docs/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt rename to docs2/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt diff --git a/Docs/docstrap-master/template/static/scripts/prettify/jquery.min.js b/docs2/docstrap-master/template/static/scripts/prettify/jquery.min.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/prettify/jquery.min.js rename to docs2/docstrap-master/template/static/scripts/prettify/jquery.min.js diff --git a/Docs/docstrap-master/template/static/scripts/prettify/lang-css.js b/docs2/docstrap-master/template/static/scripts/prettify/lang-css.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/prettify/lang-css.js rename to docs2/docstrap-master/template/static/scripts/prettify/lang-css.js diff --git a/Docs/docstrap-master/template/static/scripts/prettify/prettify.js b/docs2/docstrap-master/template/static/scripts/prettify/prettify.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/prettify/prettify.js rename to docs2/docstrap-master/template/static/scripts/prettify/prettify.js diff --git a/Docs/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js b/docs2/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js rename to docs2/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js diff --git a/Docs/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js b/docs2/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js rename to docs2/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js diff --git a/Docs/docstrap-master/template/static/scripts/sunlight-plugin.menu.js b/docs2/docstrap-master/template/static/scripts/sunlight-plugin.menu.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/sunlight-plugin.menu.js rename to docs2/docstrap-master/template/static/scripts/sunlight-plugin.menu.js diff --git a/Docs/docstrap-master/template/static/scripts/sunlight.javascript.js b/docs2/docstrap-master/template/static/scripts/sunlight.javascript.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/sunlight.javascript.js rename to docs2/docstrap-master/template/static/scripts/sunlight.javascript.js diff --git a/Docs/docstrap-master/template/static/scripts/sunlight.js b/docs2/docstrap-master/template/static/scripts/sunlight.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/sunlight.js rename to docs2/docstrap-master/template/static/scripts/sunlight.js diff --git a/Docs/docstrap-master/template/static/scripts/toc.js b/docs2/docstrap-master/template/static/scripts/toc.js similarity index 100% rename from Docs/docstrap-master/template/static/scripts/toc.js rename to docs2/docstrap-master/template/static/scripts/toc.js diff --git a/Docs/docstrap-master/template/static/styles/darkstrap.css b/docs2/docstrap-master/template/static/styles/darkstrap.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/darkstrap.css rename to docs2/docstrap-master/template/static/styles/darkstrap.css diff --git a/Docs/docstrap-master/template/static/styles/prettify-tomorrow.css b/docs2/docstrap-master/template/static/styles/prettify-tomorrow.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/prettify-tomorrow.css rename to docs2/docstrap-master/template/static/styles/prettify-tomorrow.css diff --git a/Docs/docstrap-master/template/static/styles/site.amelia.css b/docs2/docstrap-master/template/static/styles/site.amelia.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.amelia.css rename to docs2/docstrap-master/template/static/styles/site.amelia.css diff --git a/Docs/docstrap-master/template/static/styles/site.cerulean.css b/docs2/docstrap-master/template/static/styles/site.cerulean.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.cerulean.css rename to docs2/docstrap-master/template/static/styles/site.cerulean.css diff --git a/Docs/docstrap-master/template/static/styles/site.cosmo.css b/docs2/docstrap-master/template/static/styles/site.cosmo.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.cosmo.css rename to docs2/docstrap-master/template/static/styles/site.cosmo.css diff --git a/Docs/docstrap-master/template/static/styles/site.cyborg.css b/docs2/docstrap-master/template/static/styles/site.cyborg.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.cyborg.css rename to docs2/docstrap-master/template/static/styles/site.cyborg.css diff --git a/Docs/docstrap-master/template/static/styles/site.darkstrap.css b/docs2/docstrap-master/template/static/styles/site.darkstrap.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.darkstrap.css rename to docs2/docstrap-master/template/static/styles/site.darkstrap.css diff --git a/Docs/docstrap-master/template/static/styles/site.flatly.css b/docs2/docstrap-master/template/static/styles/site.flatly.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.flatly.css rename to docs2/docstrap-master/template/static/styles/site.flatly.css diff --git a/Docs/docstrap-master/template/static/styles/site.journal.css b/docs2/docstrap-master/template/static/styles/site.journal.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.journal.css rename to docs2/docstrap-master/template/static/styles/site.journal.css diff --git a/Docs/docstrap-master/template/static/styles/site.readable.css b/docs2/docstrap-master/template/static/styles/site.readable.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.readable.css rename to docs2/docstrap-master/template/static/styles/site.readable.css diff --git a/Docs/docstrap-master/template/static/styles/site.simplex.css b/docs2/docstrap-master/template/static/styles/site.simplex.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.simplex.css rename to docs2/docstrap-master/template/static/styles/site.simplex.css diff --git a/Docs/docstrap-master/template/static/styles/site.slate.css b/docs2/docstrap-master/template/static/styles/site.slate.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.slate.css rename to docs2/docstrap-master/template/static/styles/site.slate.css diff --git a/Docs/docstrap-master/template/static/styles/site.spacelab.css b/docs2/docstrap-master/template/static/styles/site.spacelab.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.spacelab.css rename to docs2/docstrap-master/template/static/styles/site.spacelab.css diff --git a/Docs/docstrap-master/template/static/styles/site.spruce.css b/docs2/docstrap-master/template/static/styles/site.spruce.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.spruce.css rename to docs2/docstrap-master/template/static/styles/site.spruce.css diff --git a/Docs/docstrap-master/template/static/styles/site.superhero.css b/docs2/docstrap-master/template/static/styles/site.superhero.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.superhero.css rename to docs2/docstrap-master/template/static/styles/site.superhero.css diff --git a/Docs/docstrap-master/template/static/styles/site.united.css b/docs2/docstrap-master/template/static/styles/site.united.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/site.united.css rename to docs2/docstrap-master/template/static/styles/site.united.css diff --git a/Docs/docstrap-master/template/static/styles/sunlight.dark.css b/docs2/docstrap-master/template/static/styles/sunlight.dark.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/sunlight.dark.css rename to docs2/docstrap-master/template/static/styles/sunlight.dark.css diff --git a/Docs/docstrap-master/template/static/styles/sunlight.default.css b/docs2/docstrap-master/template/static/styles/sunlight.default.css similarity index 100% rename from Docs/docstrap-master/template/static/styles/sunlight.default.css rename to docs2/docstrap-master/template/static/styles/sunlight.default.css diff --git a/Docs/docstrap-master/template/tmpl/container.tmpl b/docs2/docstrap-master/template/tmpl/container.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/container.tmpl rename to docs2/docstrap-master/template/tmpl/container.tmpl diff --git a/Docs/docstrap-master/template/tmpl/details.tmpl b/docs2/docstrap-master/template/tmpl/details.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/details.tmpl rename to docs2/docstrap-master/template/tmpl/details.tmpl diff --git a/Docs/docstrap-master/template/tmpl/example.tmpl b/docs2/docstrap-master/template/tmpl/example.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/example.tmpl rename to docs2/docstrap-master/template/tmpl/example.tmpl diff --git a/Docs/docstrap-master/template/tmpl/examples.tmpl b/docs2/docstrap-master/template/tmpl/examples.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/examples.tmpl rename to docs2/docstrap-master/template/tmpl/examples.tmpl diff --git a/Docs/docstrap-master/template/tmpl/exceptions.tmpl b/docs2/docstrap-master/template/tmpl/exceptions.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/exceptions.tmpl rename to docs2/docstrap-master/template/tmpl/exceptions.tmpl diff --git a/Docs/docstrap-master/template/tmpl/fires.tmpl b/docs2/docstrap-master/template/tmpl/fires.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/fires.tmpl rename to docs2/docstrap-master/template/tmpl/fires.tmpl diff --git a/Docs/docstrap-master/template/tmpl/layout.tmpl b/docs2/docstrap-master/template/tmpl/layout.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/layout.tmpl rename to docs2/docstrap-master/template/tmpl/layout.tmpl diff --git a/Docs/docstrap-master/template/tmpl/mainpage.tmpl b/docs2/docstrap-master/template/tmpl/mainpage.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/mainpage.tmpl rename to docs2/docstrap-master/template/tmpl/mainpage.tmpl diff --git a/Docs/docstrap-master/template/tmpl/members.tmpl b/docs2/docstrap-master/template/tmpl/members.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/members.tmpl rename to docs2/docstrap-master/template/tmpl/members.tmpl diff --git a/Docs/docstrap-master/template/tmpl/method.tmpl b/docs2/docstrap-master/template/tmpl/method.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/method.tmpl rename to docs2/docstrap-master/template/tmpl/method.tmpl diff --git a/Docs/docstrap-master/template/tmpl/params.tmpl b/docs2/docstrap-master/template/tmpl/params.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/params.tmpl rename to docs2/docstrap-master/template/tmpl/params.tmpl diff --git a/Docs/docstrap-master/template/tmpl/properties.tmpl b/docs2/docstrap-master/template/tmpl/properties.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/properties.tmpl rename to docs2/docstrap-master/template/tmpl/properties.tmpl diff --git a/Docs/docstrap-master/template/tmpl/returns.tmpl b/docs2/docstrap-master/template/tmpl/returns.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/returns.tmpl rename to docs2/docstrap-master/template/tmpl/returns.tmpl diff --git a/Docs/docstrap-master/template/tmpl/sections.tmpl b/docs2/docstrap-master/template/tmpl/sections.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/sections.tmpl rename to docs2/docstrap-master/template/tmpl/sections.tmpl diff --git a/Docs/docstrap-master/template/tmpl/source.tmpl b/docs2/docstrap-master/template/tmpl/source.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/source.tmpl rename to docs2/docstrap-master/template/tmpl/source.tmpl diff --git a/Docs/docstrap-master/template/tmpl/tutorial.tmpl b/docs2/docstrap-master/template/tmpl/tutorial.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/tutorial.tmpl rename to docs2/docstrap-master/template/tmpl/tutorial.tmpl diff --git a/Docs/docstrap-master/template/tmpl/type.tmpl b/docs2/docstrap-master/template/tmpl/type.tmpl similarity index 100% rename from Docs/docstrap-master/template/tmpl/type.tmpl rename to docs2/docstrap-master/template/tmpl/type.tmpl diff --git a/Docs/jsdoc_work.txt b/docs2/jsdoc_work.txt similarity index 100% rename from Docs/jsdoc_work.txt rename to docs2/jsdoc_work.txt diff --git a/Docs/out/Animation.js.html b/docs2/out/Animation.js.html similarity index 100% rename from Docs/out/Animation.js.html rename to docs2/out/Animation.js.html diff --git a/Docs/out/AnimationManager-Phaser.AnimationManager.html b/docs2/out/AnimationManager-Phaser.AnimationManager.html similarity index 100% rename from Docs/out/AnimationManager-Phaser.AnimationManager.html rename to docs2/out/AnimationManager-Phaser.AnimationManager.html diff --git a/Docs/out/AnimationManager.html b/docs2/out/AnimationManager.html similarity index 100% rename from Docs/out/AnimationManager.html rename to docs2/out/AnimationManager.html diff --git a/Docs/out/AnimationManager.js.html b/docs2/out/AnimationManager.js.html similarity index 100% rename from Docs/out/AnimationManager.js.html rename to docs2/out/AnimationManager.js.html diff --git a/Docs/out/AnimationParser.js.html b/docs2/out/AnimationParser.js.html similarity index 100% rename from Docs/out/AnimationParser.js.html rename to docs2/out/AnimationParser.js.html diff --git a/Docs/out/Back.html b/docs2/out/Back.html similarity index 100% rename from Docs/out/Back.html rename to docs2/out/Back.html diff --git a/Docs/out/Bounce.html b/docs2/out/Bounce.html similarity index 100% rename from Docs/out/Bounce.html rename to docs2/out/Bounce.html diff --git a/Docs/out/Cache.js.html b/docs2/out/Cache.js.html similarity index 100% rename from Docs/out/Cache.js.html rename to docs2/out/Cache.js.html diff --git a/Docs/out/Camera.js.html b/docs2/out/Camera.js.html similarity index 100% rename from Docs/out/Camera.js.html rename to docs2/out/Camera.js.html diff --git a/Docs/out/Canvas.js.html b/docs2/out/Canvas.js.html similarity index 100% rename from Docs/out/Canvas.js.html rename to docs2/out/Canvas.js.html diff --git a/Docs/out/Circle.js.html b/docs2/out/Circle.js.html similarity index 100% rename from Docs/out/Circle.js.html rename to docs2/out/Circle.js.html diff --git a/Docs/out/Circular.html b/docs2/out/Circular.html similarity index 100% rename from Docs/out/Circular.html rename to docs2/out/Circular.html diff --git a/Docs/out/Color.js.html b/docs2/out/Color.js.html similarity index 100% rename from Docs/out/Color.js.html rename to docs2/out/Color.js.html diff --git a/Docs/out/Cubic.html b/docs2/out/Cubic.html similarity index 100% rename from Docs/out/Cubic.html rename to docs2/out/Cubic.html diff --git a/Docs/out/Debug.js.html b/docs2/out/Debug.js.html similarity index 100% rename from Docs/out/Debug.js.html rename to docs2/out/Debug.js.html diff --git a/Docs/out/Device.js.html b/docs2/out/Device.js.html similarity index 100% rename from Docs/out/Device.js.html rename to docs2/out/Device.js.html diff --git a/Docs/out/Easing.js.html b/docs2/out/Easing.js.html similarity index 100% rename from Docs/out/Easing.js.html rename to docs2/out/Easing.js.html diff --git a/Docs/out/Elastic.html b/docs2/out/Elastic.html similarity index 100% rename from Docs/out/Elastic.html rename to docs2/out/Elastic.html diff --git a/Docs/out/Emitter.js.html b/docs2/out/Emitter.js.html similarity index 100% rename from Docs/out/Emitter.js.html rename to docs2/out/Emitter.js.html diff --git a/Docs/out/Exponential.html b/docs2/out/Exponential.html similarity index 100% rename from Docs/out/Exponential.html rename to docs2/out/Exponential.html diff --git a/Docs/out/Frame.js.html b/docs2/out/Frame.js.html similarity index 100% rename from Docs/out/Frame.js.html rename to docs2/out/Frame.js.html diff --git a/Docs/out/FrameData.js.html b/docs2/out/FrameData.js.html similarity index 100% rename from Docs/out/FrameData.js.html rename to docs2/out/FrameData.js.html diff --git a/Docs/out/Game.js.html b/docs2/out/Game.js.html similarity index 100% rename from Docs/out/Game.js.html rename to docs2/out/Game.js.html diff --git a/Docs/out/Group.js.html b/docs2/out/Group.js.html similarity index 100% rename from Docs/out/Group.js.html rename to docs2/out/Group.js.html diff --git a/Docs/out/Input.js.html b/docs2/out/Input.js.html similarity index 100% rename from Docs/out/Input.js.html rename to docs2/out/Input.js.html diff --git a/Docs/out/InputHandler.js.html b/docs2/out/InputHandler.js.html similarity index 100% rename from Docs/out/InputHandler.js.html rename to docs2/out/InputHandler.js.html diff --git a/Docs/out/Intro.js.html b/docs2/out/Intro.js.html similarity index 100% rename from Docs/out/Intro.js.html rename to docs2/out/Intro.js.html diff --git a/Docs/out/Key.js.html b/docs2/out/Key.js.html similarity index 100% rename from Docs/out/Key.js.html rename to docs2/out/Key.js.html diff --git a/Docs/out/Keyboard.js.html b/docs2/out/Keyboard.js.html similarity index 100% rename from Docs/out/Keyboard.js.html rename to docs2/out/Keyboard.js.html diff --git a/Docs/out/Linear.html b/docs2/out/Linear.html similarity index 100% rename from Docs/out/Linear.html rename to docs2/out/Linear.html diff --git a/Docs/out/LinkedList.js.html b/docs2/out/LinkedList.js.html similarity index 100% rename from Docs/out/LinkedList.js.html rename to docs2/out/LinkedList.js.html diff --git a/Docs/out/Loader.js.html b/docs2/out/Loader.js.html similarity index 100% rename from Docs/out/Loader.js.html rename to docs2/out/Loader.js.html diff --git a/Docs/out/LoaderParser.js.html b/docs2/out/LoaderParser.js.html similarity index 100% rename from Docs/out/LoaderParser.js.html rename to docs2/out/LoaderParser.js.html diff --git a/Docs/out/MSPointer.js.html b/docs2/out/MSPointer.js.html similarity index 100% rename from Docs/out/MSPointer.js.html rename to docs2/out/MSPointer.js.html diff --git a/Docs/out/Math.js.html b/docs2/out/Math.js.html similarity index 100% rename from Docs/out/Math.js.html rename to docs2/out/Math.js.html diff --git a/Docs/out/Mouse.js.html b/docs2/out/Mouse.js.html similarity index 100% rename from Docs/out/Mouse.js.html rename to docs2/out/Mouse.js.html diff --git a/Docs/out/Net.js.html b/docs2/out/Net.js.html similarity index 100% rename from Docs/out/Net.js.html rename to docs2/out/Net.js.html diff --git a/Docs/out/Parser.js.html b/docs2/out/Parser.js.html similarity index 100% rename from Docs/out/Parser.js.html rename to docs2/out/Parser.js.html diff --git a/Docs/out/Parser.js_.html b/docs2/out/Parser.js_.html similarity index 100% rename from Docs/out/Parser.js_.html rename to docs2/out/Parser.js_.html diff --git a/Docs/out/Particles.js.html b/docs2/out/Particles.js.html similarity index 100% rename from Docs/out/Particles.js.html rename to docs2/out/Particles.js.html diff --git a/Docs/out/Phaser.Animation.Frame.html b/docs2/out/Phaser.Animation.Frame.html similarity index 100% rename from Docs/out/Phaser.Animation.Frame.html rename to docs2/out/Phaser.Animation.Frame.html diff --git a/Docs/out/Phaser.Animation.FrameData.html b/docs2/out/Phaser.Animation.FrameData.html similarity index 100% rename from Docs/out/Phaser.Animation.FrameData.html rename to docs2/out/Phaser.Animation.FrameData.html diff --git a/Docs/out/Phaser.Animation.Parser.html b/docs2/out/Phaser.Animation.Parser.html similarity index 100% rename from Docs/out/Phaser.Animation.Parser.html rename to docs2/out/Phaser.Animation.Parser.html diff --git a/Docs/out/Phaser.Animation.html b/docs2/out/Phaser.Animation.html similarity index 100% rename from Docs/out/Phaser.Animation.html rename to docs2/out/Phaser.Animation.html diff --git a/Docs/out/Phaser.AnimationManager.html b/docs2/out/Phaser.AnimationManager.html similarity index 100% rename from Docs/out/Phaser.AnimationManager.html rename to docs2/out/Phaser.AnimationManager.html diff --git a/Docs/out/Phaser.AnimationParser.html b/docs2/out/Phaser.AnimationParser.html similarity index 100% rename from Docs/out/Phaser.AnimationParser.html rename to docs2/out/Phaser.AnimationParser.html diff --git a/Docs/out/Phaser.Cache.html b/docs2/out/Phaser.Cache.html similarity index 100% rename from Docs/out/Phaser.Cache.html rename to docs2/out/Phaser.Cache.html diff --git a/Docs/out/Phaser.Camera.html b/docs2/out/Phaser.Camera.html similarity index 100% rename from Docs/out/Phaser.Camera.html rename to docs2/out/Phaser.Camera.html diff --git a/Docs/out/Phaser.Canvas.html b/docs2/out/Phaser.Canvas.html similarity index 100% rename from Docs/out/Phaser.Canvas.html rename to docs2/out/Phaser.Canvas.html diff --git a/Docs/out/Phaser.Circle.html b/docs2/out/Phaser.Circle.html similarity index 100% rename from Docs/out/Phaser.Circle.html rename to docs2/out/Phaser.Circle.html diff --git a/Docs/out/Phaser.Color.html b/docs2/out/Phaser.Color.html similarity index 100% rename from Docs/out/Phaser.Color.html rename to docs2/out/Phaser.Color.html diff --git a/Docs/out/Phaser.Device.html b/docs2/out/Phaser.Device.html similarity index 100% rename from Docs/out/Phaser.Device.html rename to docs2/out/Phaser.Device.html diff --git a/Docs/out/Phaser.Easing.Back.html b/docs2/out/Phaser.Easing.Back.html similarity index 100% rename from Docs/out/Phaser.Easing.Back.html rename to docs2/out/Phaser.Easing.Back.html diff --git a/Docs/out/Phaser.Easing.Bounce.html b/docs2/out/Phaser.Easing.Bounce.html similarity index 100% rename from Docs/out/Phaser.Easing.Bounce.html rename to docs2/out/Phaser.Easing.Bounce.html diff --git a/Docs/out/Phaser.Easing.Circular.html b/docs2/out/Phaser.Easing.Circular.html similarity index 100% rename from Docs/out/Phaser.Easing.Circular.html rename to docs2/out/Phaser.Easing.Circular.html diff --git a/Docs/out/Phaser.Easing.Cubic.html b/docs2/out/Phaser.Easing.Cubic.html similarity index 100% rename from Docs/out/Phaser.Easing.Cubic.html rename to docs2/out/Phaser.Easing.Cubic.html diff --git a/Docs/out/Phaser.Easing.Elastic.html b/docs2/out/Phaser.Easing.Elastic.html similarity index 100% rename from Docs/out/Phaser.Easing.Elastic.html rename to docs2/out/Phaser.Easing.Elastic.html diff --git a/Docs/out/Phaser.Easing.Exponential.html b/docs2/out/Phaser.Easing.Exponential.html similarity index 100% rename from Docs/out/Phaser.Easing.Exponential.html rename to docs2/out/Phaser.Easing.Exponential.html diff --git a/Docs/out/Phaser.Easing.Linear.html b/docs2/out/Phaser.Easing.Linear.html similarity index 100% rename from Docs/out/Phaser.Easing.Linear.html rename to docs2/out/Phaser.Easing.Linear.html diff --git a/Docs/out/Phaser.Easing.Quadratic.html b/docs2/out/Phaser.Easing.Quadratic.html similarity index 100% rename from Docs/out/Phaser.Easing.Quadratic.html rename to docs2/out/Phaser.Easing.Quadratic.html diff --git a/Docs/out/Phaser.Easing.Quartic.html b/docs2/out/Phaser.Easing.Quartic.html similarity index 100% rename from Docs/out/Phaser.Easing.Quartic.html rename to docs2/out/Phaser.Easing.Quartic.html diff --git a/Docs/out/Phaser.Easing.Quintic.html b/docs2/out/Phaser.Easing.Quintic.html similarity index 100% rename from Docs/out/Phaser.Easing.Quintic.html rename to docs2/out/Phaser.Easing.Quintic.html diff --git a/Docs/out/Phaser.Easing.Sinusoidal.html b/docs2/out/Phaser.Easing.Sinusoidal.html similarity index 100% rename from Docs/out/Phaser.Easing.Sinusoidal.html rename to docs2/out/Phaser.Easing.Sinusoidal.html diff --git a/Docs/out/Phaser.Easing.html b/docs2/out/Phaser.Easing.html similarity index 100% rename from Docs/out/Phaser.Easing.html rename to docs2/out/Phaser.Easing.html diff --git a/Docs/out/Phaser.Frame.html b/docs2/out/Phaser.Frame.html similarity index 100% rename from Docs/out/Phaser.Frame.html rename to docs2/out/Phaser.Frame.html diff --git a/Docs/out/Phaser.FrameData.html b/docs2/out/Phaser.FrameData.html similarity index 100% rename from Docs/out/Phaser.FrameData.html rename to docs2/out/Phaser.FrameData.html diff --git a/Docs/out/Phaser.Game.html b/docs2/out/Phaser.Game.html similarity index 100% rename from Docs/out/Phaser.Game.html rename to docs2/out/Phaser.Game.html diff --git a/Docs/out/Phaser.Group.html b/docs2/out/Phaser.Group.html similarity index 100% rename from Docs/out/Phaser.Group.html rename to docs2/out/Phaser.Group.html diff --git a/Docs/out/Phaser.Input.html b/docs2/out/Phaser.Input.html similarity index 100% rename from Docs/out/Phaser.Input.html rename to docs2/out/Phaser.Input.html diff --git a/Docs/out/Phaser.InputHandler.html b/docs2/out/Phaser.InputHandler.html similarity index 100% rename from Docs/out/Phaser.InputHandler.html rename to docs2/out/Phaser.InputHandler.html diff --git a/Docs/out/Phaser.Key.html b/docs2/out/Phaser.Key.html similarity index 100% rename from Docs/out/Phaser.Key.html rename to docs2/out/Phaser.Key.html diff --git a/Docs/out/Phaser.Keyboard.html b/docs2/out/Phaser.Keyboard.html similarity index 100% rename from Docs/out/Phaser.Keyboard.html rename to docs2/out/Phaser.Keyboard.html diff --git a/Docs/out/Phaser.LinkedList.html b/docs2/out/Phaser.LinkedList.html similarity index 100% rename from Docs/out/Phaser.LinkedList.html rename to docs2/out/Phaser.LinkedList.html diff --git a/Docs/out/Phaser.Loader.Parser.html b/docs2/out/Phaser.Loader.Parser.html similarity index 100% rename from Docs/out/Phaser.Loader.Parser.html rename to docs2/out/Phaser.Loader.Parser.html diff --git a/Docs/out/Phaser.Loader.html b/docs2/out/Phaser.Loader.html similarity index 100% rename from Docs/out/Phaser.Loader.html rename to docs2/out/Phaser.Loader.html diff --git a/Docs/out/Phaser.LoaderParser.html b/docs2/out/Phaser.LoaderParser.html similarity index 100% rename from Docs/out/Phaser.LoaderParser.html rename to docs2/out/Phaser.LoaderParser.html diff --git a/Docs/out/Phaser.MSPointer.html b/docs2/out/Phaser.MSPointer.html similarity index 100% rename from Docs/out/Phaser.MSPointer.html rename to docs2/out/Phaser.MSPointer.html diff --git a/Docs/out/Phaser.Math.html b/docs2/out/Phaser.Math.html similarity index 100% rename from Docs/out/Phaser.Math.html rename to docs2/out/Phaser.Math.html diff --git a/Docs/out/Phaser.Mouse.html b/docs2/out/Phaser.Mouse.html similarity index 100% rename from Docs/out/Phaser.Mouse.html rename to docs2/out/Phaser.Mouse.html diff --git a/Docs/out/Phaser.Net.html b/docs2/out/Phaser.Net.html similarity index 100% rename from Docs/out/Phaser.Net.html rename to docs2/out/Phaser.Net.html diff --git a/Docs/out/Phaser.Particles.Arcade.Emitter.html b/docs2/out/Phaser.Particles.Arcade.Emitter.html similarity index 100% rename from Docs/out/Phaser.Particles.Arcade.Emitter.html rename to docs2/out/Phaser.Particles.Arcade.Emitter.html diff --git a/Docs/out/Phaser.Particles.html b/docs2/out/Phaser.Particles.html similarity index 100% rename from Docs/out/Phaser.Particles.html rename to docs2/out/Phaser.Particles.html diff --git a/Docs/out/Phaser.Plugin.html b/docs2/out/Phaser.Plugin.html similarity index 100% rename from Docs/out/Phaser.Plugin.html rename to docs2/out/Phaser.Plugin.html diff --git a/Docs/out/Phaser.PluginManager.html b/docs2/out/Phaser.PluginManager.html similarity index 100% rename from Docs/out/Phaser.PluginManager.html rename to docs2/out/Phaser.PluginManager.html diff --git a/Docs/out/Phaser.Point.html b/docs2/out/Phaser.Point.html similarity index 100% rename from Docs/out/Phaser.Point.html rename to docs2/out/Phaser.Point.html diff --git a/Docs/out/Phaser.Pointer.html b/docs2/out/Phaser.Pointer.html similarity index 100% rename from Docs/out/Phaser.Pointer.html rename to docs2/out/Phaser.Pointer.html diff --git a/Docs/out/Phaser.QuadTree.html b/docs2/out/Phaser.QuadTree.html similarity index 100% rename from Docs/out/Phaser.QuadTree.html rename to docs2/out/Phaser.QuadTree.html diff --git a/Docs/out/Phaser.RandomDataGenerator.html b/docs2/out/Phaser.RandomDataGenerator.html similarity index 100% rename from Docs/out/Phaser.RandomDataGenerator.html rename to docs2/out/Phaser.RandomDataGenerator.html diff --git a/Docs/out/Phaser.Rectangle.html b/docs2/out/Phaser.Rectangle.html similarity index 100% rename from Docs/out/Phaser.Rectangle.html rename to docs2/out/Phaser.Rectangle.html diff --git a/Docs/out/Phaser.RequestAnimationFrame.html b/docs2/out/Phaser.RequestAnimationFrame.html similarity index 100% rename from Docs/out/Phaser.RequestAnimationFrame.html rename to docs2/out/Phaser.RequestAnimationFrame.html diff --git a/Docs/out/Phaser.Signal.html b/docs2/out/Phaser.Signal.html similarity index 100% rename from Docs/out/Phaser.Signal.html rename to docs2/out/Phaser.Signal.html diff --git a/Docs/out/Phaser.Sound.html b/docs2/out/Phaser.Sound.html similarity index 100% rename from Docs/out/Phaser.Sound.html rename to docs2/out/Phaser.Sound.html diff --git a/Docs/out/Phaser.SoundManager.html b/docs2/out/Phaser.SoundManager.html similarity index 100% rename from Docs/out/Phaser.SoundManager.html rename to docs2/out/Phaser.SoundManager.html diff --git a/Docs/out/Phaser.Stage.html b/docs2/out/Phaser.Stage.html similarity index 100% rename from Docs/out/Phaser.Stage.html rename to docs2/out/Phaser.Stage.html diff --git a/Docs/out/Phaser.StageScaleMode.html b/docs2/out/Phaser.StageScaleMode.html similarity index 100% rename from Docs/out/Phaser.StageScaleMode.html rename to docs2/out/Phaser.StageScaleMode.html diff --git a/Docs/out/Phaser.State.html b/docs2/out/Phaser.State.html similarity index 100% rename from Docs/out/Phaser.State.html rename to docs2/out/Phaser.State.html diff --git a/Docs/out/Phaser.StateManager.html b/docs2/out/Phaser.StateManager.html similarity index 100% rename from Docs/out/Phaser.StateManager.html rename to docs2/out/Phaser.StateManager.html diff --git a/Docs/out/Phaser.Time.html b/docs2/out/Phaser.Time.html similarity index 100% rename from Docs/out/Phaser.Time.html rename to docs2/out/Phaser.Time.html diff --git a/Docs/out/Phaser.Touch.html b/docs2/out/Phaser.Touch.html similarity index 100% rename from Docs/out/Phaser.Touch.html rename to docs2/out/Phaser.Touch.html diff --git a/Docs/out/Phaser.Tween.html b/docs2/out/Phaser.Tween.html similarity index 100% rename from Docs/out/Phaser.Tween.html rename to docs2/out/Phaser.Tween.html diff --git a/Docs/out/Phaser.TweenManager.html b/docs2/out/Phaser.TweenManager.html similarity index 100% rename from Docs/out/Phaser.TweenManager.html rename to docs2/out/Phaser.TweenManager.html diff --git a/Docs/out/Phaser.Utils.Debug.html b/docs2/out/Phaser.Utils.Debug.html similarity index 100% rename from Docs/out/Phaser.Utils.Debug.html rename to docs2/out/Phaser.Utils.Debug.html diff --git a/Docs/out/Phaser.Utils.html b/docs2/out/Phaser.Utils.html similarity index 100% rename from Docs/out/Phaser.Utils.html rename to docs2/out/Phaser.Utils.html diff --git a/Docs/out/Phaser.World.html b/docs2/out/Phaser.World.html similarity index 100% rename from Docs/out/Phaser.World.html rename to docs2/out/Phaser.World.html diff --git a/Docs/out/Phaser.html b/docs2/out/Phaser.html similarity index 100% rename from Docs/out/Phaser.html rename to docs2/out/Phaser.html diff --git a/Docs/out/Phaser.js.html b/docs2/out/Phaser.js.html similarity index 100% rename from Docs/out/Phaser.js.html rename to docs2/out/Phaser.js.html diff --git a/Docs/out/Plugin.js.html b/docs2/out/Plugin.js.html similarity index 100% rename from Docs/out/Plugin.js.html rename to docs2/out/Plugin.js.html diff --git a/Docs/out/PluginManager-Phaser.PluginManager.html b/docs2/out/PluginManager-Phaser.PluginManager.html similarity index 100% rename from Docs/out/PluginManager-Phaser.PluginManager.html rename to docs2/out/PluginManager-Phaser.PluginManager.html diff --git a/Docs/out/PluginManager.html b/docs2/out/PluginManager.html similarity index 100% rename from Docs/out/PluginManager.html rename to docs2/out/PluginManager.html diff --git a/Docs/out/PluginManager.js.html b/docs2/out/PluginManager.js.html similarity index 100% rename from Docs/out/PluginManager.js.html rename to docs2/out/PluginManager.js.html diff --git a/Docs/out/Point.js.html b/docs2/out/Point.js.html similarity index 100% rename from Docs/out/Point.js.html rename to docs2/out/Point.js.html diff --git a/Docs/out/Pointer.js.html b/docs2/out/Pointer.js.html similarity index 100% rename from Docs/out/Pointer.js.html rename to docs2/out/Pointer.js.html diff --git a/Docs/out/QuadTree.js.html b/docs2/out/QuadTree.js.html similarity index 100% rename from Docs/out/QuadTree.js.html rename to docs2/out/QuadTree.js.html diff --git a/Docs/out/Quadratic.html b/docs2/out/Quadratic.html similarity index 100% rename from Docs/out/Quadratic.html rename to docs2/out/Quadratic.html diff --git a/Docs/out/Quartic.html b/docs2/out/Quartic.html similarity index 100% rename from Docs/out/Quartic.html rename to docs2/out/Quartic.html diff --git a/Docs/out/Quintic.html b/docs2/out/Quintic.html similarity index 100% rename from Docs/out/Quintic.html rename to docs2/out/Quintic.html diff --git a/Docs/out/RandomDataGenerator.js.html b/docs2/out/RandomDataGenerator.js.html similarity index 100% rename from Docs/out/RandomDataGenerator.js.html rename to docs2/out/RandomDataGenerator.js.html diff --git a/Docs/out/Rectangle.js.html b/docs2/out/Rectangle.js.html similarity index 100% rename from Docs/out/Rectangle.js.html rename to docs2/out/Rectangle.js.html diff --git a/Docs/out/RequestAnimationFrame.js.html b/docs2/out/RequestAnimationFrame.js.html similarity index 100% rename from Docs/out/RequestAnimationFrame.js.html rename to docs2/out/RequestAnimationFrame.js.html diff --git a/Docs/out/Signal.js.html b/docs2/out/Signal.js.html similarity index 100% rename from Docs/out/Signal.js.html rename to docs2/out/Signal.js.html diff --git a/Docs/out/SignalBinding.html b/docs2/out/SignalBinding.html similarity index 100% rename from Docs/out/SignalBinding.html rename to docs2/out/SignalBinding.html diff --git a/Docs/out/SignalBinding.js.html b/docs2/out/SignalBinding.js.html similarity index 100% rename from Docs/out/SignalBinding.js.html rename to docs2/out/SignalBinding.js.html diff --git a/Docs/out/Sinusoidal.html b/docs2/out/Sinusoidal.html similarity index 100% rename from Docs/out/Sinusoidal.html rename to docs2/out/Sinusoidal.html diff --git a/Docs/out/Sound.js.html b/docs2/out/Sound.js.html similarity index 100% rename from Docs/out/Sound.js.html rename to docs2/out/Sound.js.html diff --git a/Docs/out/SoundManager.js.html b/docs2/out/SoundManager.js.html similarity index 100% rename from Docs/out/SoundManager.js.html rename to docs2/out/SoundManager.js.html diff --git a/Docs/out/Stage.js.html b/docs2/out/Stage.js.html similarity index 100% rename from Docs/out/Stage.js.html rename to docs2/out/Stage.js.html diff --git a/Docs/out/StageScaleMode.js.html b/docs2/out/StageScaleMode.js.html similarity index 100% rename from Docs/out/StageScaleMode.js.html rename to docs2/out/StageScaleMode.js.html diff --git a/Docs/out/State.js.html b/docs2/out/State.js.html similarity index 100% rename from Docs/out/State.js.html rename to docs2/out/State.js.html diff --git a/Docs/out/StateManager.js.html b/docs2/out/StateManager.js.html similarity index 100% rename from Docs/out/StateManager.js.html rename to docs2/out/StateManager.js.html diff --git a/Docs/out/Time.js.html b/docs2/out/Time.js.html similarity index 100% rename from Docs/out/Time.js.html rename to docs2/out/Time.js.html diff --git a/Docs/out/Touch.js.html b/docs2/out/Touch.js.html similarity index 100% rename from Docs/out/Touch.js.html rename to docs2/out/Touch.js.html diff --git a/Docs/out/Tween.js.html b/docs2/out/Tween.js.html similarity index 100% rename from Docs/out/Tween.js.html rename to docs2/out/Tween.js.html diff --git a/Docs/out/TweenManager.js.html b/docs2/out/TweenManager.js.html similarity index 100% rename from Docs/out/TweenManager.js.html rename to docs2/out/TweenManager.js.html diff --git a/Docs/out/Utils.html b/docs2/out/Utils.html similarity index 100% rename from Docs/out/Utils.html rename to docs2/out/Utils.html diff --git a/Docs/out/Utils.js.html b/docs2/out/Utils.js.html similarity index 100% rename from Docs/out/Utils.js.html rename to docs2/out/Utils.js.html diff --git a/Docs/out/Utils_.html b/docs2/out/Utils_.html similarity index 100% rename from Docs/out/Utils_.html rename to docs2/out/Utils_.html diff --git a/Docs/out/World.js.html b/docs2/out/World.js.html similarity index 100% rename from Docs/out/World.js.html rename to docs2/out/World.js.html diff --git a/Docs/out/classes.list.html b/docs2/out/classes.list.html similarity index 100% rename from Docs/out/classes.list.html rename to docs2/out/classes.list.html diff --git a/Docs/out/global.html b/docs2/out/global.html similarity index 100% rename from Docs/out/global.html rename to docs2/out/global.html diff --git a/Docs/out/img/glyphicons-halflings-white.png b/docs2/out/img/glyphicons-halflings-white.png similarity index 100% rename from Docs/out/img/glyphicons-halflings-white.png rename to docs2/out/img/glyphicons-halflings-white.png diff --git a/Docs/out/img/glyphicons-halflings.png b/docs2/out/img/glyphicons-halflings.png similarity index 100% rename from Docs/out/img/glyphicons-halflings.png rename to docs2/out/img/glyphicons-halflings.png diff --git a/Docs/out/index.html b/docs2/out/index.html similarity index 100% rename from Docs/out/index.html rename to docs2/out/index.html diff --git a/Docs/out/module-Phaser.html b/docs2/out/module-Phaser.html similarity index 100% rename from Docs/out/module-Phaser.html rename to docs2/out/module-Phaser.html diff --git a/Docs/out/module-Tween-Phaser.Tween.html b/docs2/out/module-Tween-Phaser.Tween.html similarity index 100% rename from Docs/out/module-Tween-Phaser.Tween.html rename to docs2/out/module-Tween-Phaser.Tween.html diff --git a/Docs/out/module-Tween-Phaser.TweenManager.html b/docs2/out/module-Tween-Phaser.TweenManager.html similarity index 100% rename from Docs/out/module-Tween-Phaser.TweenManager.html rename to docs2/out/module-Tween-Phaser.TweenManager.html diff --git a/Docs/out/module-Tween.html b/docs2/out/module-Tween.html similarity index 100% rename from Docs/out/module-Tween.html rename to docs2/out/module-Tween.html diff --git a/Docs/out/modules.list.html b/docs2/out/modules.list.html similarity index 100% rename from Docs/out/modules.list.html rename to docs2/out/modules.list.html diff --git a/Docs/out/namespaces.list.html b/docs2/out/namespaces.list.html similarity index 100% rename from Docs/out/namespaces.list.html rename to docs2/out/namespaces.list.html diff --git a/Docs/out/scripts/URI.js b/docs2/out/scripts/URI.js similarity index 100% rename from Docs/out/scripts/URI.js rename to docs2/out/scripts/URI.js diff --git a/Docs/out/scripts/bootstrap-dropdown.js b/docs2/out/scripts/bootstrap-dropdown.js similarity index 100% rename from Docs/out/scripts/bootstrap-dropdown.js rename to docs2/out/scripts/bootstrap-dropdown.js diff --git a/Docs/out/scripts/bootstrap-tab.js b/docs2/out/scripts/bootstrap-tab.js similarity index 100% rename from Docs/out/scripts/bootstrap-tab.js rename to docs2/out/scripts/bootstrap-tab.js diff --git a/Docs/out/scripts/jquery.localScroll.js b/docs2/out/scripts/jquery.localScroll.js similarity index 100% rename from Docs/out/scripts/jquery.localScroll.js rename to docs2/out/scripts/jquery.localScroll.js diff --git a/Docs/out/scripts/jquery.min.js b/docs2/out/scripts/jquery.min.js similarity index 100% rename from Docs/out/scripts/jquery.min.js rename to docs2/out/scripts/jquery.min.js diff --git a/Docs/out/scripts/jquery.scrollTo.js b/docs2/out/scripts/jquery.scrollTo.js similarity index 100% rename from Docs/out/scripts/jquery.scrollTo.js rename to docs2/out/scripts/jquery.scrollTo.js diff --git a/Docs/out/scripts/jquery.sunlight.js b/docs2/out/scripts/jquery.sunlight.js similarity index 100% rename from Docs/out/scripts/jquery.sunlight.js rename to docs2/out/scripts/jquery.sunlight.js diff --git a/Docs/out/scripts/linenumber.js b/docs2/out/scripts/linenumber.js similarity index 100% rename from Docs/out/scripts/linenumber.js rename to docs2/out/scripts/linenumber.js diff --git a/Docs/out/scripts/prettify/Apache-License-2.0.txt b/docs2/out/scripts/prettify/Apache-License-2.0.txt similarity index 100% rename from Docs/out/scripts/prettify/Apache-License-2.0.txt rename to docs2/out/scripts/prettify/Apache-License-2.0.txt diff --git a/Docs/out/scripts/prettify/jquery.min.js b/docs2/out/scripts/prettify/jquery.min.js similarity index 100% rename from Docs/out/scripts/prettify/jquery.min.js rename to docs2/out/scripts/prettify/jquery.min.js diff --git a/Docs/out/scripts/prettify/lang-css.js b/docs2/out/scripts/prettify/lang-css.js similarity index 100% rename from Docs/out/scripts/prettify/lang-css.js rename to docs2/out/scripts/prettify/lang-css.js diff --git a/Docs/out/scripts/prettify/prettify.js b/docs2/out/scripts/prettify/prettify.js similarity index 100% rename from Docs/out/scripts/prettify/prettify.js rename to docs2/out/scripts/prettify/prettify.js diff --git a/Docs/out/scripts/sunlight-plugin.doclinks.js b/docs2/out/scripts/sunlight-plugin.doclinks.js similarity index 100% rename from Docs/out/scripts/sunlight-plugin.doclinks.js rename to docs2/out/scripts/sunlight-plugin.doclinks.js diff --git a/Docs/out/scripts/sunlight-plugin.linenumbers.js b/docs2/out/scripts/sunlight-plugin.linenumbers.js similarity index 100% rename from Docs/out/scripts/sunlight-plugin.linenumbers.js rename to docs2/out/scripts/sunlight-plugin.linenumbers.js diff --git a/Docs/out/scripts/sunlight-plugin.menu.js b/docs2/out/scripts/sunlight-plugin.menu.js similarity index 100% rename from Docs/out/scripts/sunlight-plugin.menu.js rename to docs2/out/scripts/sunlight-plugin.menu.js diff --git a/Docs/out/scripts/sunlight.javascript.js b/docs2/out/scripts/sunlight.javascript.js similarity index 100% rename from Docs/out/scripts/sunlight.javascript.js rename to docs2/out/scripts/sunlight.javascript.js diff --git a/Docs/out/scripts/sunlight.js b/docs2/out/scripts/sunlight.js similarity index 100% rename from Docs/out/scripts/sunlight.js rename to docs2/out/scripts/sunlight.js diff --git a/Docs/out/scripts/toc.js b/docs2/out/scripts/toc.js similarity index 100% rename from Docs/out/scripts/toc.js rename to docs2/out/scripts/toc.js diff --git a/Docs/out/styles/darkstrap.css b/docs2/out/styles/darkstrap.css similarity index 100% rename from Docs/out/styles/darkstrap.css rename to docs2/out/styles/darkstrap.css diff --git a/Docs/out/styles/jsdoc-default.css b/docs2/out/styles/jsdoc-default.css similarity index 100% rename from Docs/out/styles/jsdoc-default.css rename to docs2/out/styles/jsdoc-default.css diff --git a/Docs/out/styles/prettify-jsdoc.css b/docs2/out/styles/prettify-jsdoc.css similarity index 100% rename from Docs/out/styles/prettify-jsdoc.css rename to docs2/out/styles/prettify-jsdoc.css diff --git a/Docs/out/styles/prettify-tomorrow.css b/docs2/out/styles/prettify-tomorrow.css similarity index 100% rename from Docs/out/styles/prettify-tomorrow.css rename to docs2/out/styles/prettify-tomorrow.css diff --git a/Docs/out/styles/site.amelia.css b/docs2/out/styles/site.amelia.css similarity index 100% rename from Docs/out/styles/site.amelia.css rename to docs2/out/styles/site.amelia.css diff --git a/Docs/out/styles/site.cerulean.css b/docs2/out/styles/site.cerulean.css similarity index 100% rename from Docs/out/styles/site.cerulean.css rename to docs2/out/styles/site.cerulean.css diff --git a/Docs/out/styles/site.cosmo.css b/docs2/out/styles/site.cosmo.css similarity index 100% rename from Docs/out/styles/site.cosmo.css rename to docs2/out/styles/site.cosmo.css diff --git a/Docs/out/styles/site.cyborg.css b/docs2/out/styles/site.cyborg.css similarity index 100% rename from Docs/out/styles/site.cyborg.css rename to docs2/out/styles/site.cyborg.css diff --git a/Docs/out/styles/site.darkstrap.css b/docs2/out/styles/site.darkstrap.css similarity index 100% rename from Docs/out/styles/site.darkstrap.css rename to docs2/out/styles/site.darkstrap.css diff --git a/Docs/out/styles/site.flatly.css b/docs2/out/styles/site.flatly.css similarity index 100% rename from Docs/out/styles/site.flatly.css rename to docs2/out/styles/site.flatly.css diff --git a/Docs/out/styles/site.journal.css b/docs2/out/styles/site.journal.css similarity index 100% rename from Docs/out/styles/site.journal.css rename to docs2/out/styles/site.journal.css diff --git a/Docs/out/styles/site.readable.css b/docs2/out/styles/site.readable.css similarity index 100% rename from Docs/out/styles/site.readable.css rename to docs2/out/styles/site.readable.css diff --git a/Docs/out/styles/site.simplex.css b/docs2/out/styles/site.simplex.css similarity index 100% rename from Docs/out/styles/site.simplex.css rename to docs2/out/styles/site.simplex.css diff --git a/Docs/out/styles/site.slate.css b/docs2/out/styles/site.slate.css similarity index 100% rename from Docs/out/styles/site.slate.css rename to docs2/out/styles/site.slate.css diff --git a/Docs/out/styles/site.spacelab.css b/docs2/out/styles/site.spacelab.css similarity index 100% rename from Docs/out/styles/site.spacelab.css rename to docs2/out/styles/site.spacelab.css diff --git a/Docs/out/styles/site.spruce.css b/docs2/out/styles/site.spruce.css similarity index 100% rename from Docs/out/styles/site.spruce.css rename to docs2/out/styles/site.spruce.css diff --git a/Docs/out/styles/site.superhero.css b/docs2/out/styles/site.superhero.css similarity index 100% rename from Docs/out/styles/site.superhero.css rename to docs2/out/styles/site.superhero.css diff --git a/Docs/out/styles/site.united.css b/docs2/out/styles/site.united.css similarity index 100% rename from Docs/out/styles/site.united.css rename to docs2/out/styles/site.united.css diff --git a/Docs/out/styles/sunlight.dark.css b/docs2/out/styles/sunlight.dark.css similarity index 100% rename from Docs/out/styles/sunlight.dark.css rename to docs2/out/styles/sunlight.dark.css diff --git a/Docs/out/styles/sunlight.default.css b/docs2/out/styles/sunlight.default.css similarity index 100% rename from Docs/out/styles/sunlight.default.css rename to docs2/out/styles/sunlight.default.css diff --git a/Docs/tags.txt b/docs2/tags.txt similarity index 100% rename from Docs/tags.txt rename to docs2/tags.txt diff --git a/Docs/zwoptex-phaser.template b/docs2/zwoptex-phaser.template similarity index 100% rename from Docs/zwoptex-phaser.template rename to docs2/zwoptex-phaser.template diff --git a/examples/_site/view_full.html b/examples/_site/view_full.html index 0bd418b2..83d6c04f 100644 --- a/examples/_site/view_full.html +++ b/examples/_site/view_full.html @@ -121,7 +121,7 @@
    Phaser Version: 1.1 - 1.2 dev branch + New version:
    diff --git a/examples/assets/sprites/wizball.png b/examples/assets/sprites/wizball.png new file mode 100644 index 0000000000000000000000000000000000000000..f471f54996b4ad2a1d6a0b3cd17df5219c60eb27 GIT binary patch literal 2600 zcmV+@3fJ|CP)ib9+K|E&PdLI6Tz0M5Mt|8oG003fXe z46SMa0004WQchCht{rCR96zq)W zqjdB~8BTRNGUdEf+Vy(0_aD~h>aS-w`eeX=(TDsL@BaF*YK}t*R$@5lWQ^;F{r`)s z^xpM=z?h1G1q?eYiV0-@&`|W!zkj>oz1wa0mvZb!VKdRH440jXDk4z-@iUrdk=O8i zc+FHh5d6Mu%&>WiO6v)5l=J7{qj)a-;Jy0p$2ipnJip!8^T8~IZu4~nHa`nHFsuzh1nQ-& zFPLKZ$r%;e5#N=-n{I<6u`0qr3@Zl3yRR-lk>%0heU4+zp=16thmx;(Cf*NZSm{js z5du5gvC84scC?%0zfzzIS?f&vIhbLEGx3%a__2*u#jgi{YCQLP0>k}h;_U13ixE!5u=Gqo zN9DPXeN`f|UNQk@NA~ypxjW9p+v78g5%`GCENV*YZe+gr zVLrt7RgvuKNH&_~OfkA8b6N&g6FN0u__AdPkIe9oC&;^#<*b@(N-6X;jss^{ybt%~ z_p=aA$}lG+G93*+**{blcD%}IEQM!KWl4Q53gcLpPt0O?KP^KwgkPlq78}Lzjk{kN zk)`;m9O0*NCW&?6t#kmF+9)TwhejeJhd~tir&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0*r_i2^VF^OMjy;XUS=ET27JpRhVE1h z%MjcOxlBtwzOAOpii%$Q%xrVSJ^z{3X&9Cxq-zzkns2;o>1RkT>tFqE{Oam^|4Xw| zFx-cbW+%k8f3i;AU;fVUt`_l}oDG=aUW6<=?aXjLLb^K3k8|vI9^p}0dIWsM;_n|{ z10h@Mw(EEzS|nRfC)daT?W0000< KMNUMnLSTZ^ Date: Wed, 23 Oct 2013 14:00:28 +0100 Subject: [PATCH 098/125] Tidying up the repo and adding in new documentation. --- {docs2/out => docs}/Animation.js.html | 23 +- {docs2/out => docs}/AnimationManager.js.html | 48 +- {docs2/out => docs}/AnimationParser.js.html | 2 +- {docs2/out => docs}/Cache.js.html | 125 +- {docs2/out => docs}/Camera.js.html | 168 +- {docs2/out => docs}/Canvas.js.html | 3 +- {docs2/out => docs}/Circle.js.html | 2 +- {docs2/out => docs}/Color.js.html | 2 +- {docs2/out => docs}/Debug.js.html | 85 +- {docs2/out => docs}/Device.js.html | 5 +- {docs2/out => docs}/Easing.js.html | 2 +- {docs2/out => docs}/Emitter.js.html | 2 +- {docs2/out => docs}/Frame.js.html | 2 +- {docs2/out => docs}/FrameData.js.html | 9 +- {docs2/out => docs}/Game.js.html | 12 +- {docs2/out => docs}/Group.js.html | 104 +- {docs2/out => docs}/Input.js.html | 2 +- {docs2/out => docs}/InputHandler.js.html | 10 +- {docs2/out => docs}/Intro.js.html | 2 +- {docs2/out => docs}/Key.js.html | 2 +- {docs2/out => docs}/Keyboard.js.html | 36 +- {docs2/out => docs}/LinkedList.js.html | 2 +- {docs2/out => docs}/Loader.js.html | 129 +- {docs2/out => docs}/LoaderParser.js.html | 2 +- {docs2/out => docs}/MSPointer.js.html | 2 +- {docs2/out => docs}/Math.js.html | 75 +- {docs2/out => docs}/Mouse.js.html | 2 +- {docs2/out => docs}/Net.js.html | 2 +- {docs2/out => docs}/Particles.js.html | 2 +- {docs2/out => docs}/Phaser.Animation.html | 175 +- .../out => docs}/Phaser.AnimationManager.html | 241 +- .../out => docs}/Phaser.AnimationParser.html | 2 +- {docs2/out => docs}/Phaser.Cache.html | 780 ++++- {docs2/out => docs}/Phaser.Camera.html | 278 +- {docs2/out => docs}/Phaser.Canvas.html | 22 +- {docs2/out => docs}/Phaser.Circle.html | 2 +- {docs2/out => docs}/Phaser.Color.html | 2 +- {docs2/out => docs}/Phaser.Device.html | 6 +- {docs2/out => docs}/Phaser.Easing.Back.html | 2 +- {docs2/out => docs}/Phaser.Easing.Bounce.html | 2 +- .../out => docs}/Phaser.Easing.Circular.html | 2 +- {docs2/out => docs}/Phaser.Easing.Cubic.html | 2 +- .../out => docs}/Phaser.Easing.Elastic.html | 2 +- .../Phaser.Easing.Exponential.html | 2 +- {docs2/out => docs}/Phaser.Easing.Linear.html | 2 +- .../out => docs}/Phaser.Easing.Quadratic.html | 2 +- .../out => docs}/Phaser.Easing.Quartic.html | 2 +- .../out => docs}/Phaser.Easing.Quintic.html | 2 +- .../Phaser.Easing.Sinusoidal.html | 2 +- {docs2/out => docs}/Phaser.Easing.html | 2 +- {docs2/out => docs}/Phaser.Frame.html | 2 +- {docs2/out => docs}/Phaser.FrameData.html | 4 +- {docs2/out => docs}/Phaser.Game.html | 76 +- {docs2/out => docs}/Phaser.Group.html | 664 +++- {docs2/out => docs}/Phaser.Input.html | 2 +- {docs2/out => docs}/Phaser.InputHandler.html | 2 +- {docs2/out => docs}/Phaser.Key.html | 2 +- {docs2/out => docs}/Phaser.Keyboard.html | 116 +- {docs2/out => docs}/Phaser.LinkedList.html | 2 +- {docs2/out => docs}/Phaser.Loader.html | 466 ++- {docs2/out => docs}/Phaser.LoaderParser.html | 2 +- {docs2/out => docs}/Phaser.MSPointer.html | 2 +- {docs2/out => docs}/Phaser.Math.html | 251 +- {docs2/out => docs}/Phaser.Mouse.html | 2 +- {docs2/out => docs}/Phaser.Net.html | 2 +- .../Phaser.Particles.Arcade.Emitter.html | 563 +++- {docs2/out => docs}/Phaser.Particles.html | 2 +- {docs2/out => docs}/Phaser.Plugin.html | 2 +- {docs2/out => docs}/Phaser.PluginManager.html | 2 +- {docs2/out => docs}/Phaser.Point.html | 44 +- {docs2/out => docs}/Phaser.Pointer.html | 20 +- {docs2/out => docs}/Phaser.QuadTree.html | 2 +- .../Phaser.RandomDataGenerator.html | 24 +- {docs2/out => docs}/Phaser.Rectangle.html | 31 +- .../Phaser.RequestAnimationFrame.html | 2 +- {docs2/out => docs}/Phaser.Signal.html | 2 +- {docs2/out => docs}/Phaser.Sound.html | 2 +- {docs2/out => docs}/Phaser.SoundManager.html | 2 +- {docs2/out => docs}/Phaser.Stage.html | 2 +- .../out => docs}/Phaser.StageScaleMode.html | 6 +- {docs2/out => docs}/Phaser.State.html | 2 +- {docs2/out => docs}/Phaser.StateManager.html | 2 +- {docs2/out => docs}/Phaser.Time.html | 2 +- {docs2/out => docs}/Phaser.Touch.html | 2 +- {docs2/out => docs}/Phaser.Tween.html | 36 +- {docs2/out => docs}/Phaser.TweenManager.html | 2 +- {docs2/out => docs}/Phaser.Utils.Debug.html | 32 +- {docs2/out => docs}/Phaser.Utils.html | 82 +- {docs2/out => docs}/Phaser.World.html | 385 +-- {docs2/out => docs}/Phaser.html | 2 +- {docs2/out => docs}/Phaser.js.html | 4 +- {docs2/out => docs}/Plugin.js.html | 2 +- {docs2/out => docs}/PluginManager.js.html | 2 +- {docs2/out => docs}/Point.js.html | 4 +- {docs2/out => docs}/Pointer.js.html | 8 +- {docs2/out => docs}/QuadTree.js.html | 2 +- .../out => docs}/RandomDataGenerator.js.html | 9 +- {docs2/out => docs}/Rectangle.js.html | 14 +- .../RequestAnimationFrame.js.html | 2 +- {docs2/out => docs}/Signal.js.html | 2 +- {docs2/out => docs}/SignalBinding.html | 2 +- {docs2/out => docs}/SignalBinding.js.html | 2 +- {docs2/out => docs}/Sound.js.html | 2 +- {docs2/out => docs}/SoundManager.js.html | 2 +- {docs2/out => docs}/Stage.js.html | 2 +- {docs2/out => docs}/StageScaleMode.js.html | 8 +- {docs2/out => docs}/State.js.html | 2 +- {docs2/out => docs}/StateManager.js.html | 2 +- {docs2/out => docs}/Time.js.html | 2 +- {docs2/out => docs}/Touch.js.html | 2 +- {docs2/out => docs}/Tween.js.html | 20 +- {docs2/out => docs}/TweenManager.js.html | 2 +- {docs2/out => docs}/Utils.js.html | 18 +- {docs2/out => docs}/World.js.html | 246 +- docs/build/build dev.bat | 1 + docs/build/build master.bat | 1 + docs/build/conf.json | 58 + docs2/conf.json => docs/build/conf_dev.json | 20 +- .../build}/docstrap-master/.gitignore | 0 .../build}/docstrap-master/.npmignore | 0 .../build}/docstrap-master/Gruntfile.js | 0 .../build}/docstrap-master/LICENSE.md | 0 .../build}/docstrap-master/README.md | 0 .../build}/docstrap-master/bower.json | 0 .../build}/docstrap-master/component.json | 0 .../build}/docstrap-master/fixtures/car.js | 0 .../fixtures/example.conf.json | 0 .../build}/docstrap-master/fixtures/other.js | 0 .../build}/docstrap-master/fixtures/person.js | 0 .../fixtures/tutorials/Brush Teeth.md | 0 .../fixtures/tutorials/Drive Car.md | 0 .../build}/docstrap-master/package.json | 0 .../docstrap-master/styles/bootswatch.less | 0 .../build}/docstrap-master/styles/main.less | 0 .../docstrap-master/styles/variables.less | 0 .../docstrap-master/template/jsdoc.conf.json | 0 .../docstrap-master/template/publish.js | 0 .../static/img/glyphicons-halflings-white.png | Bin .../static/img/glyphicons-halflings.png | Bin .../template/static/scripts/URI.js | 0 .../static/scripts/bootstrap-dropdown.js | 0 .../template/static/scripts/bootstrap-tab.js | 0 .../static/scripts/jquery.localScroll.js | 0 .../template/static/scripts/jquery.min.js | 0 .../static/scripts/jquery.scrollTo.js | 0 .../static/scripts/jquery.sunlight.js | 0 .../scripts/prettify/Apache-License-2.0.txt | 0 .../static/scripts/prettify/jquery.min.js | 0 .../static/scripts/prettify/lang-css.js | 0 .../static/scripts/prettify/prettify.js | 0 .../scripts/sunlight-plugin.doclinks.js | 0 .../scripts/sunlight-plugin.linenumbers.js | 0 .../static/scripts/sunlight-plugin.menu.js | 0 .../static/scripts/sunlight.javascript.js | 0 .../template/static/scripts/sunlight.js | 0 .../template/static/scripts/toc.js | 0 .../template/static/styles/darkstrap.css | 0 .../static/styles/prettify-tomorrow.css | 0 .../template/static/styles/site.amelia.css | 0 .../template/static/styles/site.cerulean.css | 0 .../template/static/styles/site.cosmo.css | 0 .../template/static/styles/site.cyborg.css | 0 .../template/static/styles/site.darkstrap.css | 0 .../template/static/styles/site.flatly.css | 0 .../template/static/styles/site.journal.css | 0 .../template/static/styles/site.readable.css | 0 .../template/static/styles/site.simplex.css | 0 .../template/static/styles/site.slate.css | 0 .../template/static/styles/site.spacelab.css | 0 .../template/static/styles/site.spruce.css | 0 .../template/static/styles/site.superhero.css | 0 .../template/static/styles/site.united.css | 0 .../template/static/styles/sunlight.dark.css | 0 .../static/styles/sunlight.default.css | 0 .../template/tmpl/container.tmpl | 0 .../template/tmpl/details.tmpl | 0 .../template/tmpl/example.tmpl | 0 .../template/tmpl/examples.tmpl | 0 .../template/tmpl/exceptions.tmpl | 0 .../docstrap-master/template/tmpl/fires.tmpl | 0 .../docstrap-master/template/tmpl/layout.tmpl | 0 .../template/tmpl/mainpage.tmpl | 0 .../template/tmpl/members.tmpl | 0 .../docstrap-master/template/tmpl/method.tmpl | 0 .../docstrap-master/template/tmpl/params.tmpl | 0 .../template/tmpl/properties.tmpl | 0 .../template/tmpl/returns.tmpl | 0 .../template/tmpl/sections.tmpl | 0 .../docstrap-master/template/tmpl/source.tmpl | 0 .../template/tmpl/tutorial.tmpl | 0 .../docstrap-master/template/tmpl/type.tmpl | 0 {docs2/out => docs}/classes.list.html | 2 +- {docs2/out => docs}/global.html | 4 +- .../img/glyphicons-halflings-white.png | Bin .../out => docs}/img/glyphicons-halflings.png | Bin {docs2/out => docs}/index.html | 2 +- {docs2/out => docs}/namespaces.list.html | 2 +- {docs2/out => docs}/scripts/URI.js | 0 .../scripts/bootstrap-dropdown.js | 0 {docs2/out => docs}/scripts/bootstrap-tab.js | 0 .../scripts/jquery.localScroll.js | 0 {docs2/out => docs}/scripts/jquery.min.js | 0 .../out => docs}/scripts/jquery.scrollTo.js | 0 .../out => docs}/scripts/jquery.sunlight.js | 0 .../scripts/prettify/Apache-License-2.0.txt | 0 .../scripts/prettify/jquery.min.js | 0 .../out => docs}/scripts/prettify/lang-css.js | 0 .../out => docs}/scripts/prettify/prettify.js | 0 .../scripts/sunlight-plugin.doclinks.js | 0 .../scripts/sunlight-plugin.linenumbers.js | 0 .../scripts/sunlight-plugin.menu.js | 0 .../scripts/sunlight.javascript.js | 0 {docs2/out => docs}/scripts/sunlight.js | 0 {docs2/out => docs}/scripts/toc.js | 0 {docs2/out => docs}/styles/darkstrap.css | 0 .../out => docs}/styles/prettify-tomorrow.css | 0 {docs2/out => docs}/styles/site.amelia.css | 0 {docs2/out => docs}/styles/site.cerulean.css | 0 {docs2/out => docs}/styles/site.cosmo.css | 0 {docs2/out => docs}/styles/site.cyborg.css | 0 {docs2/out => docs}/styles/site.darkstrap.css | 0 {docs2/out => docs}/styles/site.flatly.css | 0 {docs2/out => docs}/styles/site.journal.css | 0 {docs2/out => docs}/styles/site.readable.css | 0 {docs2/out => docs}/styles/site.simplex.css | 0 {docs2/out => docs}/styles/site.slate.css | 0 {docs2/out => docs}/styles/site.spacelab.css | 0 {docs2/out => docs}/styles/site.spruce.css | 0 {docs2/out => docs}/styles/site.superhero.css | 0 {docs2/out => docs}/styles/site.united.css | 0 {docs2/out => docs}/styles/sunlight.dark.css | 0 .../out => docs}/styles/sunlight.default.css | 0 docs2/Documentation Checklist.xlsx | Bin 5746 -> 0 bytes docs2/Hello Phaser/index.html | 37 - docs2/Hello Phaser/logo.png | Bin 180337 -> 0 bytes docs2/Hello Phaser/phaser-min.js | 1 - docs2/jsdoc_work.txt | 74 - ...mationManager-Phaser.AnimationManager.html | 707 ----- docs2/out/AnimationManager.html | 220 -- docs2/out/Back.html | 874 ----- docs2/out/Bounce.html | 874 ----- docs2/out/Circular.html | 874 ----- docs2/out/Cubic.html | 874 ----- docs2/out/Elastic.html | 874 ----- docs2/out/Exponential.html | 874 ----- docs2/out/Linear.html | 592 ---- docs2/out/Parser.js.html | 617 ---- docs2/out/Parser.js_.html | 381 --- docs2/out/Phaser.Animation.Frame.html | 2815 ----------------- docs2/out/Phaser.Animation.FrameData.html | 1762 ----------- docs2/out/Phaser.Animation.Parser.html | 1269 -------- docs2/out/Phaser.Loader.Parser.html | 548 ---- .../PluginManager-Phaser.PluginManager.html | 599 ---- docs2/out/PluginManager.html | 300 -- docs2/out/Quadratic.html | 874 ----- docs2/out/Quartic.html | 874 ----- docs2/out/Quintic.html | 874 ----- docs2/out/Sinusoidal.html | 874 ----- docs2/out/Utils.html | 502 --- docs2/out/Utils_.html | 513 --- docs2/out/module-Phaser.html | 441 --- docs2/out/module-Tween-Phaser.Tween.html | 1070 ------- .../out/module-Tween-Phaser.TweenManager.html | 746 ----- docs2/out/module-Tween.html | 458 --- docs2/out/modules.list.html | 676 ---- docs2/out/scripts/linenumber.js | 17 - docs2/out/styles/jsdoc-default.css | 283 -- docs2/out/styles/prettify-jsdoc.css | 111 - docs2/tags.txt | 47 - {plugins2 => plugins}/CSS3Filters.js | 0 {plugins2 => plugins}/ColorHarmony.js | 0 {plugins2 => plugins}/SamplePlugin.js | 0 .../2D Text/Phaser Logo 2D Vector Outline.fla | Bin .../PNG/Phaser Logo Print Quality.png | Bin .../PNG/Phaser Logo Web Quality.png | Bin .../PNG/Phaser Logo iPad Resolution.png | Bin .../Phaser Logo/PNG/Phaser-Logo-Small.png | Bin .../Pixel Art/Phaser-Logo-Sizes.png | Bin .../Pixel Art/phaser_pixel_large_shaded.png | Bin .../Pixel Art/phaser_pixel_medium_flat.png | Bin .../Pixel Art/phaser_pixel_medium_shaded.png | Bin .../Pixel Art/phaser_pixel_small_flat.png | Bin .../Phaser Logo/Vector/Phaser Logo.eps | Bin .../Phaser Logo/Vector/Phaser Logo.fla | Bin .../Screen Shots/phaser-cybernoid.png | Bin .../Screen Shots/phaser_balls.png | Bin .../Screen Shots/phaser_blaster.png | Bin .../Screen Shots/phaser_cams.png | Bin .../Screen Shots/phaser_desert.png | Bin .../Screen Shots/phaser_fixed_camera.png | Bin .../Screen Shots/phaser_fruit.png | Bin .../Screen Shots/phaser_fruit_particles.png | Bin .../Screen Shots/phaser_mapdraw.png | Bin .../Screen Shots/phaser_mario_combo.png | Bin .../Screen Shots/phaser_particles.png | Bin .../Screen Shots/phaser_platformer.png | Bin .../Screen Shots/phaser_quadtree.png | Bin .../Screen Shots/phaser_rotate4.png | Bin .../Screen Shots/phaser_scrollfactor.png | Bin .../Screen Shots/phaser_sprite_bounds.png | Bin .../Screen Shots/phaser_tanks.png | Bin .../Screen Shots/phaser_tilemap.png | Bin .../Screen Shots/phaser_tilemap_collision.png | Bin .../Screen Shots/phaser_tilemap_debug.png | Bin .../wip}/01_phaser-arcade.jpg | Bin .../wip}/02_phaser-newsletter.jpg | Bin .../wip}/Physics Comparison.xlsx | Bin .../wip}/phaser-manual_2013-08-27.pdf | Bin {docs2/WIP => resources/wip}/phaser_copy.doc | Bin .../phaser_onscreen-controls_1-arcade.png | Bin .../wip}/phaser_onscreen-controls_2-dpad.png | Bin .../phaser_onscreen-controls_3-generic.png | Bin .../wip/sprites}/avoid-digits.png | Bin .../wip/sprites}/avoid-panel.png | Bin .../wip/sprites}/avoid-sheet.png | Bin .../wip/sprites}/avoidmock4x2.png | Bin .../wip/sprites}/box-01.png | Bin .../wip/sprites}/box-02.png | Bin .../wip/sprites}/breakout2c.png | Bin .../wip/sprites}/phaser checkboxes.gif | Bin .../wip/sprites}/phaser power tools.gif | Bin .../wip/sprites}/phaser sprites10.gif | Bin {docs2 => resources}/zwoptex-phaser.template | 0 wip/physics/AdvancedPhysics.js | 269 -- wip/physics/AdvancedPhysics.ts | 386 --- wip/physics/ArcadePhysics.js | 19 - wip/physics/ArcadePhysics.ts | 1121 ------- wip/physics/Body.js | 416 --- wip/physics/Body.ts | 657 ---- wip/physics/BodyUtils.ts | 94 - wip/physics/Bounds.js | 201 -- wip/physics/Bounds.ts | 199 -- wip/physics/Collision.js | 373 --- wip/physics/Collision.ts | 559 ---- wip/physics/Contact.js | 32 - wip/physics/Contact.ts | 62 - wip/physics/ContactSolver.js | 269 -- wip/physics/ContactSolver.ts | 386 --- wip/physics/Manager.js | 67 - wip/physics/Manager.ts | 86 - wip/physics/Plane.js | 23 - wip/physics/Plane.ts | 28 - wip/physics/Space.js | 500 --- wip/physics/Space.ts | 823 ----- wip/physics/Transform.js | 53 - wip/physics/Transform.ts | 83 - wip/physics/TransformUtils.js | 39 - wip/physics/TransformUtils.ts | 43 - wip/physics/joints/IJoint.js | 3 - wip/physics/joints/IJoint.js.map | 1 - wip/physics/joints/IJoint.ts | 43 - wip/physics/joints/Joint.js | 41 - wip/physics/joints/Joint.js.map | 1 - wip/physics/joints/Joint.ts | 64 - wip/physics/shapes/Box.js | 59 - wip/physics/shapes/Box.js.map | 1 - wip/physics/shapes/Box.ts | 45 - wip/physics/shapes/Circle.js | 87 - wip/physics/shapes/Circle.js.map | 1 - wip/physics/shapes/Circle.ts | 105 - wip/physics/shapes/IShape.js | 3 - wip/physics/shapes/IShape.js.map | 1 - wip/physics/shapes/IShape.ts | 47 - wip/physics/shapes/Poly.js | 206 -- wip/physics/shapes/Poly.js.map | 1 - wip/physics/shapes/Poly.ts | 299 -- wip/physics/shapes/Segment.js | 141 - wip/physics/shapes/Segment.js.map | 1 - wip/physics/shapes/Segment.ts | 204 -- wip/physics/shapes/Shape.js | 33 - wip/physics/shapes/Shape.js.map | 1 - wip/physics/shapes/Shape.ts | 62 - wip/physics/shapes/Triangle.js | 51 - wip/physics/shapes/Triangle.js.map | 1 - wip/physics/shapes/Triangle.ts | 32 - 375 files changed, 4617 insertions(+), 32924 deletions(-) rename {docs2/out => docs}/Animation.js.html (96%) rename {docs2/out => docs}/AnimationManager.js.html (92%) rename {docs2/out => docs}/AnimationParser.js.html (99%) rename {docs2/out => docs}/Cache.js.html (88%) rename {docs2/out => docs}/Camera.js.html (81%) rename {docs2/out => docs}/Canvas.js.html (99%) rename {docs2/out => docs}/Circle.js.html (99%) rename {docs2/out => docs}/Color.js.html (99%) rename {docs2/out => docs}/Debug.js.html (94%) rename {docs2/out => docs}/Device.js.html (98%) rename {docs2/out => docs}/Easing.js.html (99%) rename {docs2/out => docs}/Emitter.js.html (99%) rename {docs2/out => docs}/Frame.js.html (99%) rename {docs2/out => docs}/FrameData.js.html (98%) rename {docs2/out => docs}/Game.js.html (99%) rename {docs2/out => docs}/Group.js.html (94%) rename {docs2/out => docs}/Input.js.html (99%) rename {docs2/out => docs}/InputHandler.js.html (99%) rename {docs2/out => docs}/Intro.js.html (99%) rename {docs2/out => docs}/Key.js.html (99%) rename {docs2/out => docs}/Keyboard.js.html (95%) rename {docs2/out => docs}/LinkedList.js.html (99%) rename {docs2/out => docs}/Loader.js.html (91%) rename {docs2/out => docs}/LoaderParser.js.html (99%) rename {docs2/out => docs}/MSPointer.js.html (99%) rename {docs2/out => docs}/Math.js.html (97%) rename {docs2/out => docs}/Mouse.js.html (99%) rename {docs2/out => docs}/Net.js.html (99%) rename {docs2/out => docs}/Particles.js.html (99%) rename {docs2/out => docs}/Phaser.Animation.html (92%) rename {docs2/out => docs}/Phaser.AnimationManager.html (91%) rename {docs2/out => docs}/Phaser.AnimationParser.html (99%) rename {docs2/out => docs}/Phaser.Cache.html (87%) rename {docs2/out => docs}/Phaser.Camera.html (90%) rename {docs2/out => docs}/Phaser.Canvas.html (98%) rename {docs2/out => docs}/Phaser.Circle.html (99%) rename {docs2/out => docs}/Phaser.Color.html (99%) rename {docs2/out => docs}/Phaser.Device.html (99%) rename {docs2/out => docs}/Phaser.Easing.Back.html (99%) rename {docs2/out => docs}/Phaser.Easing.Bounce.html (99%) rename {docs2/out => docs}/Phaser.Easing.Circular.html (99%) rename {docs2/out => docs}/Phaser.Easing.Cubic.html (99%) rename {docs2/out => docs}/Phaser.Easing.Elastic.html (99%) rename {docs2/out => docs}/Phaser.Easing.Exponential.html (99%) rename {docs2/out => docs}/Phaser.Easing.Linear.html (99%) rename {docs2/out => docs}/Phaser.Easing.Quadratic.html (99%) rename {docs2/out => docs}/Phaser.Easing.Quartic.html (99%) rename {docs2/out => docs}/Phaser.Easing.Quintic.html (99%) rename {docs2/out => docs}/Phaser.Easing.Sinusoidal.html (99%) rename {docs2/out => docs}/Phaser.Easing.html (99%) rename {docs2/out => docs}/Phaser.Frame.html (99%) rename {docs2/out => docs}/Phaser.FrameData.html (99%) rename {docs2/out => docs}/Phaser.Game.html (97%) rename {docs2/out => docs}/Phaser.Group.html (89%) rename {docs2/out => docs}/Phaser.Input.html (99%) rename {docs2/out => docs}/Phaser.InputHandler.html (99%) rename {docs2/out => docs}/Phaser.Key.html (99%) rename {docs2/out => docs}/Phaser.Keyboard.html (95%) rename {docs2/out => docs}/Phaser.LinkedList.html (99%) rename {docs2/out => docs}/Phaser.Loader.html (89%) rename {docs2/out => docs}/Phaser.LoaderParser.html (99%) rename {docs2/out => docs}/Phaser.MSPointer.html (99%) rename {docs2/out => docs}/Phaser.Math.html (97%) rename {docs2/out => docs}/Phaser.Mouse.html (99%) rename {docs2/out => docs}/Phaser.Net.html (99%) rename {docs2/out => docs}/Phaser.Particles.Arcade.Emitter.html (94%) rename {docs2/out => docs}/Phaser.Particles.html (99%) rename {docs2/out => docs}/Phaser.Plugin.html (99%) rename {docs2/out => docs}/Phaser.PluginManager.html (99%) rename {docs2/out => docs}/Phaser.Point.html (98%) rename {docs2/out => docs}/Phaser.Pointer.html (99%) rename {docs2/out => docs}/Phaser.QuadTree.html (99%) rename {docs2/out => docs}/Phaser.RandomDataGenerator.html (98%) rename {docs2/out => docs}/Phaser.Rectangle.html (99%) rename {docs2/out => docs}/Phaser.RequestAnimationFrame.html (99%) rename {docs2/out => docs}/Phaser.Signal.html (99%) rename {docs2/out => docs}/Phaser.Sound.html (99%) rename {docs2/out => docs}/Phaser.SoundManager.html (99%) rename {docs2/out => docs}/Phaser.Stage.html (99%) rename {docs2/out => docs}/Phaser.StageScaleMode.html (99%) rename {docs2/out => docs}/Phaser.State.html (99%) rename {docs2/out => docs}/Phaser.StateManager.html (99%) rename {docs2/out => docs}/Phaser.Time.html (99%) rename {docs2/out => docs}/Phaser.Touch.html (99%) rename {docs2/out => docs}/Phaser.Tween.html (97%) rename {docs2/out => docs}/Phaser.TweenManager.html (99%) rename {docs2/out => docs}/Phaser.Utils.Debug.html (99%) rename {docs2/out => docs}/Phaser.Utils.html (92%) rename {docs2/out => docs}/Phaser.World.html (91%) rename {docs2/out => docs}/Phaser.html (99%) rename {docs2/out => docs}/Phaser.js.html (98%) rename {docs2/out => docs}/Plugin.js.html (99%) rename {docs2/out => docs}/PluginManager.js.html (99%) rename {docs2/out => docs}/Point.js.html (99%) rename {docs2/out => docs}/Pointer.js.html (99%) rename {docs2/out => docs}/QuadTree.js.html (99%) rename {docs2/out => docs}/RandomDataGenerator.js.html (98%) rename {docs2/out => docs}/Rectangle.js.html (98%) rename {docs2/out => docs}/RequestAnimationFrame.js.html (99%) rename {docs2/out => docs}/Signal.js.html (99%) rename {docs2/out => docs}/SignalBinding.html (99%) rename {docs2/out => docs}/SignalBinding.js.html (99%) rename {docs2/out => docs}/Sound.js.html (99%) rename {docs2/out => docs}/SoundManager.js.html (99%) rename {docs2/out => docs}/Stage.js.html (99%) rename {docs2/out => docs}/StageScaleMode.js.html (99%) rename {docs2/out => docs}/State.js.html (99%) rename {docs2/out => docs}/StateManager.js.html (99%) rename {docs2/out => docs}/Time.js.html (99%) rename {docs2/out => docs}/Touch.js.html (99%) rename {docs2/out => docs}/Tween.js.html (98%) rename {docs2/out => docs}/TweenManager.js.html (99%) rename {docs2/out => docs}/Utils.js.html (96%) rename {docs2/out => docs}/World.js.html (70%) create mode 100644 docs/build/build dev.bat create mode 100644 docs/build/build master.bat create mode 100644 docs/build/conf.json rename docs2/conf.json => docs/build/conf_dev.json (63%) rename {docs2 => docs/build}/docstrap-master/.gitignore (100%) rename {docs2 => docs/build}/docstrap-master/.npmignore (100%) rename {docs2 => docs/build}/docstrap-master/Gruntfile.js (100%) rename {docs2 => docs/build}/docstrap-master/LICENSE.md (100%) rename {docs2 => docs/build}/docstrap-master/README.md (100%) rename {docs2 => docs/build}/docstrap-master/bower.json (100%) rename {docs2 => docs/build}/docstrap-master/component.json (100%) rename {docs2 => docs/build}/docstrap-master/fixtures/car.js (100%) rename {docs2 => docs/build}/docstrap-master/fixtures/example.conf.json (100%) rename {docs2 => docs/build}/docstrap-master/fixtures/other.js (100%) rename {docs2 => docs/build}/docstrap-master/fixtures/person.js (100%) rename {docs2 => docs/build}/docstrap-master/fixtures/tutorials/Brush Teeth.md (100%) rename {docs2 => docs/build}/docstrap-master/fixtures/tutorials/Drive Car.md (100%) rename {docs2 => docs/build}/docstrap-master/package.json (100%) rename {docs2 => docs/build}/docstrap-master/styles/bootswatch.less (100%) rename {docs2 => docs/build}/docstrap-master/styles/main.less (100%) rename {docs2 => docs/build}/docstrap-master/styles/variables.less (100%) rename {docs2 => docs/build}/docstrap-master/template/jsdoc.conf.json (100%) rename {docs2 => docs/build}/docstrap-master/template/publish.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/img/glyphicons-halflings-white.png (100%) rename {docs2 => docs/build}/docstrap-master/template/static/img/glyphicons-halflings.png (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/URI.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/bootstrap-dropdown.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/bootstrap-tab.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/jquery.localScroll.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/jquery.min.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/jquery.scrollTo.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/jquery.sunlight.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/prettify/jquery.min.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/prettify/lang-css.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/prettify/prettify.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/sunlight-plugin.menu.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/sunlight.javascript.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/sunlight.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/scripts/toc.js (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/darkstrap.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/prettify-tomorrow.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.amelia.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.cerulean.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.cosmo.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.cyborg.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.darkstrap.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.flatly.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.journal.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.readable.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.simplex.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.slate.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.spacelab.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.spruce.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.superhero.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/site.united.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/sunlight.dark.css (100%) rename {docs2 => docs/build}/docstrap-master/template/static/styles/sunlight.default.css (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/container.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/details.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/example.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/examples.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/exceptions.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/fires.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/layout.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/mainpage.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/members.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/method.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/params.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/properties.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/returns.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/sections.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/source.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/tutorial.tmpl (100%) rename {docs2 => docs/build}/docstrap-master/template/tmpl/type.tmpl (100%) rename {docs2/out => docs}/classes.list.html (99%) rename {docs2/out => docs}/global.html (98%) rename {docs2/out => docs}/img/glyphicons-halflings-white.png (100%) rename {docs2/out => docs}/img/glyphicons-halflings.png (100%) rename {docs2/out => docs}/index.html (99%) rename {docs2/out => docs}/namespaces.list.html (99%) rename {docs2/out => docs}/scripts/URI.js (100%) rename {docs2/out => docs}/scripts/bootstrap-dropdown.js (100%) rename {docs2/out => docs}/scripts/bootstrap-tab.js (100%) rename {docs2/out => docs}/scripts/jquery.localScroll.js (100%) rename {docs2/out => docs}/scripts/jquery.min.js (100%) rename {docs2/out => docs}/scripts/jquery.scrollTo.js (100%) rename {docs2/out => docs}/scripts/jquery.sunlight.js (100%) rename {docs2/out => docs}/scripts/prettify/Apache-License-2.0.txt (100%) rename {docs2/out => docs}/scripts/prettify/jquery.min.js (100%) rename {docs2/out => docs}/scripts/prettify/lang-css.js (100%) rename {docs2/out => docs}/scripts/prettify/prettify.js (100%) rename {docs2/out => docs}/scripts/sunlight-plugin.doclinks.js (100%) rename {docs2/out => docs}/scripts/sunlight-plugin.linenumbers.js (100%) rename {docs2/out => docs}/scripts/sunlight-plugin.menu.js (100%) rename {docs2/out => docs}/scripts/sunlight.javascript.js (100%) rename {docs2/out => docs}/scripts/sunlight.js (100%) rename {docs2/out => docs}/scripts/toc.js (100%) rename {docs2/out => docs}/styles/darkstrap.css (100%) rename {docs2/out => docs}/styles/prettify-tomorrow.css (100%) rename {docs2/out => docs}/styles/site.amelia.css (100%) rename {docs2/out => docs}/styles/site.cerulean.css (100%) rename {docs2/out => docs}/styles/site.cosmo.css (100%) rename {docs2/out => docs}/styles/site.cyborg.css (100%) rename {docs2/out => docs}/styles/site.darkstrap.css (100%) rename {docs2/out => docs}/styles/site.flatly.css (100%) rename {docs2/out => docs}/styles/site.journal.css (100%) rename {docs2/out => docs}/styles/site.readable.css (100%) rename {docs2/out => docs}/styles/site.simplex.css (100%) rename {docs2/out => docs}/styles/site.slate.css (100%) rename {docs2/out => docs}/styles/site.spacelab.css (100%) rename {docs2/out => docs}/styles/site.spruce.css (100%) rename {docs2/out => docs}/styles/site.superhero.css (100%) rename {docs2/out => docs}/styles/site.united.css (100%) rename {docs2/out => docs}/styles/sunlight.dark.css (100%) rename {docs2/out => docs}/styles/sunlight.default.css (100%) delete mode 100644 docs2/Documentation Checklist.xlsx delete mode 100644 docs2/Hello Phaser/index.html delete mode 100644 docs2/Hello Phaser/logo.png delete mode 100644 docs2/Hello Phaser/phaser-min.js delete mode 100644 docs2/jsdoc_work.txt delete mode 100644 docs2/out/AnimationManager-Phaser.AnimationManager.html delete mode 100644 docs2/out/AnimationManager.html delete mode 100644 docs2/out/Back.html delete mode 100644 docs2/out/Bounce.html delete mode 100644 docs2/out/Circular.html delete mode 100644 docs2/out/Cubic.html delete mode 100644 docs2/out/Elastic.html delete mode 100644 docs2/out/Exponential.html delete mode 100644 docs2/out/Linear.html delete mode 100644 docs2/out/Parser.js.html delete mode 100644 docs2/out/Parser.js_.html delete mode 100644 docs2/out/Phaser.Animation.Frame.html delete mode 100644 docs2/out/Phaser.Animation.FrameData.html delete mode 100644 docs2/out/Phaser.Animation.Parser.html delete mode 100644 docs2/out/Phaser.Loader.Parser.html delete mode 100644 docs2/out/PluginManager-Phaser.PluginManager.html delete mode 100644 docs2/out/PluginManager.html delete mode 100644 docs2/out/Quadratic.html delete mode 100644 docs2/out/Quartic.html delete mode 100644 docs2/out/Quintic.html delete mode 100644 docs2/out/Sinusoidal.html delete mode 100644 docs2/out/Utils.html delete mode 100644 docs2/out/Utils_.html delete mode 100644 docs2/out/module-Phaser.html delete mode 100644 docs2/out/module-Tween-Phaser.Tween.html delete mode 100644 docs2/out/module-Tween-Phaser.TweenManager.html delete mode 100644 docs2/out/module-Tween.html delete mode 100644 docs2/out/modules.list.html delete mode 100644 docs2/out/scripts/linenumber.js delete mode 100644 docs2/out/styles/jsdoc-default.css delete mode 100644 docs2/out/styles/prettify-jsdoc.css delete mode 100644 docs2/tags.txt rename {plugins2 => plugins}/CSS3Filters.js (100%) rename {plugins2 => plugins}/ColorHarmony.js (100%) rename {plugins2 => plugins}/SamplePlugin.js (100%) rename {docs2 => resources}/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla (100%) rename {docs2 => resources}/Phaser Logo/PNG/Phaser Logo Print Quality.png (100%) rename {docs2 => resources}/Phaser Logo/PNG/Phaser Logo Web Quality.png (100%) rename {docs2 => resources}/Phaser Logo/PNG/Phaser Logo iPad Resolution.png (100%) rename {docs2 => resources}/Phaser Logo/PNG/Phaser-Logo-Small.png (100%) rename {docs2 => resources}/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png (100%) rename {docs2 => resources}/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png (100%) rename {docs2 => resources}/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png (100%) rename {docs2 => resources}/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png (100%) rename {docs2 => resources}/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png (100%) rename {docs2 => resources}/Phaser Logo/Vector/Phaser Logo.eps (100%) rename {docs2 => resources}/Phaser Logo/Vector/Phaser Logo.fla (100%) rename {docs2 => resources}/Screen Shots/phaser-cybernoid.png (100%) rename {docs2 => resources}/Screen Shots/phaser_balls.png (100%) rename {docs2 => resources}/Screen Shots/phaser_blaster.png (100%) rename {docs2 => resources}/Screen Shots/phaser_cams.png (100%) rename {docs2 => resources}/Screen Shots/phaser_desert.png (100%) rename {docs2 => resources}/Screen Shots/phaser_fixed_camera.png (100%) rename {docs2 => resources}/Screen Shots/phaser_fruit.png (100%) rename {docs2 => resources}/Screen Shots/phaser_fruit_particles.png (100%) rename {docs2 => resources}/Screen Shots/phaser_mapdraw.png (100%) rename {docs2 => resources}/Screen Shots/phaser_mario_combo.png (100%) rename {docs2 => resources}/Screen Shots/phaser_particles.png (100%) rename {docs2 => resources}/Screen Shots/phaser_platformer.png (100%) rename {docs2 => resources}/Screen Shots/phaser_quadtree.png (100%) rename {docs2 => resources}/Screen Shots/phaser_rotate4.png (100%) rename {docs2 => resources}/Screen Shots/phaser_scrollfactor.png (100%) rename {docs2 => resources}/Screen Shots/phaser_sprite_bounds.png (100%) rename {docs2 => resources}/Screen Shots/phaser_tanks.png (100%) rename {docs2 => resources}/Screen Shots/phaser_tilemap.png (100%) rename {docs2 => resources}/Screen Shots/phaser_tilemap_collision.png (100%) rename {docs2 => resources}/Screen Shots/phaser_tilemap_debug.png (100%) rename {docs2/WIP => resources/wip}/01_phaser-arcade.jpg (100%) rename {docs2/WIP => resources/wip}/02_phaser-newsletter.jpg (100%) rename {docs2/WIP => resources/wip}/Physics Comparison.xlsx (100%) rename {docs2/WIP => resources/wip}/phaser-manual_2013-08-27.pdf (100%) rename {docs2/WIP => resources/wip}/phaser_copy.doc (100%) rename {docs2/WIP => resources/wip}/phaser_onscreen-controls_1-arcade.png (100%) rename {docs2/WIP => resources/wip}/phaser_onscreen-controls_2-dpad.png (100%) rename {docs2/WIP => resources/wip}/phaser_onscreen-controls_3-generic.png (100%) rename {docs2/Resources => resources/wip/sprites}/avoid-digits.png (100%) rename {docs2/Resources => resources/wip/sprites}/avoid-panel.png (100%) rename {docs2/Resources => resources/wip/sprites}/avoid-sheet.png (100%) rename {docs2/Resources => resources/wip/sprites}/avoidmock4x2.png (100%) rename {docs2/Resources => resources/wip/sprites}/box-01.png (100%) rename {docs2/Resources => resources/wip/sprites}/box-02.png (100%) rename {docs2/Resources => resources/wip/sprites}/breakout2c.png (100%) rename {docs2/Resources => resources/wip/sprites}/phaser checkboxes.gif (100%) rename {docs2/Resources => resources/wip/sprites}/phaser power tools.gif (100%) rename {docs2/Resources => resources/wip/sprites}/phaser sprites10.gif (100%) rename {docs2 => resources}/zwoptex-phaser.template (100%) delete mode 100644 wip/physics/AdvancedPhysics.js delete mode 100644 wip/physics/AdvancedPhysics.ts delete mode 100644 wip/physics/ArcadePhysics.js delete mode 100644 wip/physics/ArcadePhysics.ts delete mode 100644 wip/physics/Body.js delete mode 100644 wip/physics/Body.ts delete mode 100644 wip/physics/BodyUtils.ts delete mode 100644 wip/physics/Bounds.js delete mode 100644 wip/physics/Bounds.ts delete mode 100644 wip/physics/Collision.js delete mode 100644 wip/physics/Collision.ts delete mode 100644 wip/physics/Contact.js delete mode 100644 wip/physics/Contact.ts delete mode 100644 wip/physics/ContactSolver.js delete mode 100644 wip/physics/ContactSolver.ts delete mode 100644 wip/physics/Manager.js delete mode 100644 wip/physics/Manager.ts delete mode 100644 wip/physics/Plane.js delete mode 100644 wip/physics/Plane.ts delete mode 100644 wip/physics/Space.js delete mode 100644 wip/physics/Space.ts delete mode 100644 wip/physics/Transform.js delete mode 100644 wip/physics/Transform.ts delete mode 100644 wip/physics/TransformUtils.js delete mode 100644 wip/physics/TransformUtils.ts delete mode 100644 wip/physics/joints/IJoint.js delete mode 100644 wip/physics/joints/IJoint.js.map delete mode 100644 wip/physics/joints/IJoint.ts delete mode 100644 wip/physics/joints/Joint.js delete mode 100644 wip/physics/joints/Joint.js.map delete mode 100644 wip/physics/joints/Joint.ts delete mode 100644 wip/physics/shapes/Box.js delete mode 100644 wip/physics/shapes/Box.js.map delete mode 100644 wip/physics/shapes/Box.ts delete mode 100644 wip/physics/shapes/Circle.js delete mode 100644 wip/physics/shapes/Circle.js.map delete mode 100644 wip/physics/shapes/Circle.ts delete mode 100644 wip/physics/shapes/IShape.js delete mode 100644 wip/physics/shapes/IShape.js.map delete mode 100644 wip/physics/shapes/IShape.ts delete mode 100644 wip/physics/shapes/Poly.js delete mode 100644 wip/physics/shapes/Poly.js.map delete mode 100644 wip/physics/shapes/Poly.ts delete mode 100644 wip/physics/shapes/Segment.js delete mode 100644 wip/physics/shapes/Segment.js.map delete mode 100644 wip/physics/shapes/Segment.ts delete mode 100644 wip/physics/shapes/Shape.js delete mode 100644 wip/physics/shapes/Shape.js.map delete mode 100644 wip/physics/shapes/Shape.ts delete mode 100644 wip/physics/shapes/Triangle.js delete mode 100644 wip/physics/shapes/Triangle.js.map delete mode 100644 wip/physics/shapes/Triangle.ts diff --git a/docs2/out/Animation.js.html b/docs/Animation.js.html similarity index 96% rename from docs2/out/Animation.js.html rename to docs/Animation.js.html index 10581936..9e79967b 100644 --- a/docs2/out/Animation.js.html +++ b/docs/Animation.js.html @@ -382,6 +382,11 @@ Phaser.Animation = function (game, parent, name, frameData, frames, delay, loope */ this.looped = looped; + /** + * @property {boolean} looped - The loop state of the Animation. + */ + this.killOnComplete = false; + /** * @property {boolean} isFinished - The finished state of the Animation. Set to true once playback completes, false during playback. * @default @@ -443,10 +448,11 @@ Phaser.Animation.prototype = { * @method Phaser.Animation#play * @memberof Phaser.Animation * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. + * @param {boolean} [loop=false] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. + * @param {boolean} [killOnComplete=false] - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. * @return {Phaser.Animation} - A reference to this Animation instance. */ - play: function (frameRate, loop) { + play: function (frameRate, loop, killOnComplete) { if (typeof frameRate === 'number') { @@ -460,6 +466,12 @@ Phaser.Animation.prototype = { this.looped = loop; } + if (typeof killOnComplete !== 'undefined') + { + // Remove the parent sprite once the animation has finished? + this.killOnComplete = killOnComplete; + } + this.isPlaying = true; this.isFinished = false; @@ -621,6 +633,11 @@ Phaser.Animation.prototype = { this._parent.events.onAnimationComplete.dispatch(this._parent, this); } + if (this.killOnComplete) + { + this._parent.kill(); + } + } }; @@ -765,7 +782,7 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/AnimationManager.js.html b/docs/AnimationManager.js.html similarity index 92% rename from docs2/out/AnimationManager.js.html rename to docs/AnimationManager.js.html index 2bc72698..e6f07a55 100644 --- a/docs2/out/AnimationManager.js.html +++ b/docs/AnimationManager.js.html @@ -359,6 +359,12 @@ Phaser.AnimationManager = function (sprite) { */ this.updateIfVisible = true; + /** + * @property {boolean} isLoaded - Set to true once animation data has been loaded. + * @default + */ + this.isLoaded = false; + /** * @property {Phaser.FrameData} _frameData - A temp. var for holding the currently playing Animations FrameData. * @private @@ -394,6 +400,7 @@ Phaser.AnimationManager.prototype = { this._frameData = frameData; this.frame = 0; + this.isLoaded = true; }, @@ -420,7 +427,19 @@ Phaser.AnimationManager.prototype = { frameRate = frameRate || 60; if (typeof loop === 'undefined') { loop = false; } - if (typeof useNumericIndex === 'undefined') { useNumericIndex = true; } + + // If they didn't set the useNumericIndex then let's at least try and guess it + if (typeof useNumericIndex === 'undefined') + { + if (frames && typeof frames[0] === 'number') + { + useNumericIndex = true; + } + else + { + useNumericIndex = false; + } + } // Create the signals the AnimationManager will emit if (this.sprite.events.onAnimationStart == null) @@ -484,10 +503,11 @@ Phaser.AnimationManager.prototype = { * @method Phaser.AnimationManager#play * @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump". * @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - * @param {boolean} [loop=null] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. + * @param {boolean} [loop=false] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. + * @param {boolean} [killOnComplete=false] - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. * @return {Phaser.Animation} A reference to playing Animation instance. */ - play: function (name, frameRate, loop) { + play: function (name, frameRate, loop, killOnComplete) { if (this._anims[name]) { @@ -495,13 +515,13 @@ Phaser.AnimationManager.prototype = { { if (this.currentAnim.isPlaying == false) { - return this.currentAnim.play(frameRate, loop); + return this.currentAnim.play(frameRate, loop, killOnComplete); } } else { this.currentAnim = this._anims[name]; - return this.currentAnim.play(frameRate, loop); + return this.currentAnim.play(frameRate, loop, killOnComplete); } } @@ -562,6 +582,18 @@ Phaser.AnimationManager.prototype = { }, + /** + * Refreshes the current frame data back to the parent Sprite and also resets the texture data. + * + * @method Phaser.AnimationManager#refreshFrame + */ + refreshFrame: function () { + + this.sprite.currentFrame = this.currentFrame; + this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]); + + }, + /** * Destroys all references this AnimationManager contains. Sets the _anims to a new object and nulls the current animation. * @@ -650,7 +682,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frame", { set: function (value) { - if (this._frameData && this._frameData.getFrame(value) !== null) + if (typeof value === 'number' && this._frameData && this._frameData.getFrame(value) !== null) { this.currentFrame = this._frameData.getFrame(value); this._frameIndex = value; @@ -679,7 +711,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { set: function (value) { - if (this._frameData && this._frameData.getFrameByName(value) !== null) + if (typeof value === 'string' && this._frameData && this._frameData.getFrameByName(value) !== null) { this.currentFrame = this._frameData.getFrameByName(value); this._frameIndex = this.currentFrame.index; @@ -714,7 +746,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/AnimationParser.js.html b/docs/AnimationParser.js.html similarity index 99% rename from docs2/out/AnimationParser.js.html rename to docs/AnimationParser.js.html index 7bd92100..ebf468ab 100644 --- a/docs2/out/AnimationParser.js.html +++ b/docs/AnimationParser.js.html @@ -660,7 +660,7 @@ Phaser.AnimationParser = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Cache.js.html b/docs/Cache.js.html similarity index 88% rename from docs2/out/Cache.js.html rename to docs/Cache.js.html index cbdf8a80..07ba77c1 100644 --- a/docs2/out/Cache.js.html +++ b/docs/Cache.js.html @@ -379,6 +379,11 @@ Phaser.Cache = function (game) { */ this._tilemaps = {}; + /** + * @property {object} _tilesets - Tileset key-value container. + * @private + */ + this._tilesets = {}; this.addDefaultImage(); @@ -441,22 +446,44 @@ Phaser.Cache.prototype = { }, + /** + * Add a new tile set in to the cache. + * + * @method Phaser.Cache#addTileset + * @param {string} key - The unique key by which you will reference this object. + * @param {string} url - URL of this tile set file. + * @param {object} data - Extra tile set data. + * @param {number} tileWidth - Width of the sprite sheet. + * @param {number} tileHeight - Height of the sprite sheet. + * @param {number} tileMax - How many tiles stored in the sprite sheet. + * @param {number} [tileMargin=0] - If the tiles have been drawn with a margin, specify the amount here. + * @param {number} [tileSpacing=0] - If the tiles have been drawn with spacing between them, specify the amount here. + */ + addTileset: function (key, url, data, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing) { + + this._tilesets[key] = { url: url, data: data, tileWidth: tileWidth, tileHeight: tileHeight, tileMargin: tileMargin, tileSpacing: tileSpacing }; + + PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); + PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); + + this._tilesets[key].tileData = Phaser.TilemapParser.tileset(this.game, key, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing); + + }, + /** * Add a new tilemap. * * @method Phaser.Cache#addTilemap * @param {string} key - The unique key by which you will reference this object. * @param {string} url - URL of the tilemap image. - * @param {object} data - Tilemap data. * @param {object} mapData - The tilemap data object. * @param {number} format - The format of the tilemap data. */ - addTilemap: function (key, url, data, mapData, format) { + addTilemap: function (key, url, mapData, format) { - this._tilemaps[key] = { url: url, data: data, spriteSheet: true, mapData: mapData, format: format }; + this._tilemaps[key] = { url: url, data: mapData, format: format }; - PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); - PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); + this._tilemaps[key].layers = Phaser.TilemapParser.parse(this.game, mapData, format); }, @@ -520,16 +547,31 @@ Phaser.Cache.prototype = { */ addDefaultImage: function () { - this._images['__default'] = { url: null, data: null, spriteSheet: false }; + var img = new Image(); + img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="; + + this._images['__default'] = { url: null, data: img, spriteSheet: false }; this._images['__default'].frame = new Phaser.Frame(0, 0, 0, 32, 32, '', ''); - var base = new PIXI.BaseTexture(); - base.width = 32; - base.height = 32; - base.hasLoaded = true; // avoids a hanging event listener + PIXI.BaseTextureCache['__default'] = new PIXI.BaseTexture(img); + PIXI.TextureCache['__default'] = new PIXI.Texture(PIXI.BaseTextureCache['__default']); - PIXI.BaseTextureCache['__default'] = base; - PIXI.TextureCache['__default'] = new PIXI.Texture(base); + }, + + /** + * Add a new text data. + * + * @method Phaser.Cache#addText + * @param {string} key - Asset key for the text data. + * @param {string} url - URL of this text data file. + * @param {object} data - Extra text data. + */ + addText: function (key, url, data) { + + this._text[key] = { + url: url, + data: data + }; }, @@ -641,23 +683,6 @@ Phaser.Cache.prototype = { this._sounds[key].decoded = true; this._sounds[key].isDecoding = false; - }, - - /** - * Add a new text data. - * - * @method Phaser.Cache#addText - * @param {string} key - Asset key for the text data. - * @param {string} url - URL of this text data file. - * @param {object} data - Extra text data. - */ - addText: function (key, url, data) { - - this._text[key] = { - url: url, - data: data - }; - }, /** @@ -712,14 +737,50 @@ Phaser.Cache.prototype = { return null; }, + /** + * Get tile set image data by key. + * + * @method Phaser.Cache#getTileSetImage + * @param {string} key - Asset key of the image you want. + * @return {object} The image data you want. + */ + getTilesetImage: function (key) { + + if (this._tilesets[key]) + { + return this._tilesets[key].data; + } + + return null; + + }, + + /** + * Get tile set image data by key. + * + * @method Phaser.Cache#getTileset + * @param {string} key - Asset key of the image you want. + * @return {Phaser.Tileset} The tileset data. The tileset image is in the data property, the tile data in tileData. + */ + getTileset: function (key) { + + if (this._tilesets[key]) + { + return this._tilesets[key].tileData; + } + + return null; + + }, + /** * Get tilemap data by key. * * @method Phaser.Cache#getTilemap * @param {string} key - Asset key of the tilemap you want. - * @return {Phaser.Tilemap} The tilemap data. The tileset image is in the data property, the map data in mapData. + * @return {Object} The tilemap data. The tileset image is in the data property, the map data in mapData. */ - getTilemap: function (key) { + getTilemapData: function (key) { if (this._tilemaps[key]) { @@ -1077,7 +1138,7 @@ Phaser.Cache.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Camera.js.html b/docs/Camera.js.html similarity index 81% rename from docs2/out/Camera.js.html rename to docs/Camera.js.html index b627c6fc..df9a44e3 100644 --- a/docs2/out/Camera.js.html +++ b/docs/Camera.js.html @@ -340,7 +340,6 @@ * @param {number} width - The width of the view rectangle * @param {number} height - The height of the view rectangle */ - Phaser.Camera = function (game, id, x, y, width, height) { /** @@ -373,6 +372,14 @@ Phaser.Camera = function (game, id, x, y, width, height) { */ this.screenView = new Phaser.Rectangle(x, y, width, height); + /** + * The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World. + * The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound + * at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the center of the world. + * @property {Phaser.Rectangle} bounds - The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere. + */ + this.bounds = new Phaser.Rectangle(x, y, width, height); + /** * @property {Phaser.Rectangle} deadzone - Moving inside this Rectangle will not cause camera moving. */ @@ -401,6 +408,8 @@ Phaser.Camera = function (game, id, x, y, width, height) { * @default */ this._edge = 0; + + this.displayObject = null; }; @@ -468,18 +477,28 @@ Phaser.Camera.prototype = { break; } + }, + + /** + * Move the camera focus on a display object instantly. + * @method Phaser.Camera#focusOn + * @param {any} displayObject - The display object to focus the camera on. Must have visible x/y properties. + */ + focusOn: function (displayObject) { + + this.setPosition(Math.round(displayObject.x - this.view.halfWidth), Math.round(displayObject.y - this.view.halfHeight)); + }, /** - * Move the camera focus to a location instantly. + * Move the camera focus on a location instantly. * @method Phaser.Camera#focusOnXY * @param {number} x - X position. * @param {number} y - Y position. */ focusOnXY: function (x, y) { - this.view.x = Math.round(x - this.view.halfWidth); - this.view.y = Math.round(y - this.view.halfHeight); + this.setPosition(Math.round(x - this.view.halfWidth), Math.round(y - this.view.halfHeight)); }, @@ -489,47 +508,70 @@ Phaser.Camera.prototype = { */ update: function () { - // Add dirty flag - - if (this.target !== null) + if (this.target) { - if (this.deadzone) - { - this._edge = this.target.x - this.deadzone.x; - - if (this.view.x > this._edge) - { - this.view.x = this._edge; - } - - this._edge = this.target.x + this.target.width - this.deadzone.x - this.deadzone.width; - - if (this.view.x < this._edge) - { - this.view.x = this._edge; - } - - this._edge = this.target.y - this.deadzone.y; - - if (this.view.y > this._edge) - { - this.view.y = this._edge; - } - - this._edge = this.target.y + this.target.height - this.deadzone.y - this.deadzone.height; - - if (this.view.y < this._edge) - { - this.view.y = this._edge; - } - } - else - { - this.focusOnXY(this.target.x, this.target.y); - } + this.updateTarget(); } - this.checkWorldBounds(); + if (this.bounds) + { + this.checkBounds(); + } + + if (this.view.x !== -this.displayObject.position.x) + { + this.displayObject.position.x = -this.view.x; + } + + if (this.view.y !== -this.displayObject.position.y) + { + this.displayObject.position.y = -this.view.y; + } + + }, + + updateTarget: function () { + + if (this.deadzone) + { + this._edge = this.target.x - this.deadzone.x; + + if (this.view.x > this._edge) + { + this.view.x = this._edge; + } + + this._edge = this.target.x + this.target.width - this.deadzone.x - this.deadzone.width; + + if (this.view.x < this._edge) + { + this.view.x = this._edge; + } + + this._edge = this.target.y - this.deadzone.y; + + if (this.view.y > this._edge) + { + this.view.y = this._edge; + } + + this._edge = this.target.y + this.target.height - this.deadzone.y - this.deadzone.height; + + if (this.view.y < this._edge) + { + this.view.y = this._edge; + } + } + else + { + this.focusOnXY(this.target.x, this.target.y); + } + + }, + + setBoundsToWorld: function () { + + this.bounds.setTo(this.game.world.x, this.game.world.y, this.game.world.width, this.game.world.height); }, @@ -537,34 +579,34 @@ Phaser.Camera.prototype = { * Method called to ensure the camera doesn't venture outside of the game world. * @method Phaser.Camera#checkWorldBounds */ - checkWorldBounds: function () { + checkBounds: function () { this.atLimit.x = false; this.atLimit.y = false; - // Make sure we didn't go outside the cameras worldBounds - if (this.view.x < this.world.bounds.left) + // Make sure we didn't go outside the cameras bounds + if (this.view.x < this.bounds.x) { this.atLimit.x = true; - this.view.x = this.world.bounds.left; + this.view.x = this.bounds.x; } - if (this.view.x > this.world.bounds.right - this.width) + if (this.view.x > this.bounds.right - this.width) { this.atLimit.x = true; - this.view.x = (this.world.bounds.right - this.width) + 1; + this.view.x = (this.bounds.right - this.width) + 1; } - if (this.view.y < this.world.bounds.top) + if (this.view.y < this.bounds.top) { this.atLimit.y = true; - this.view.y = this.world.bounds.top; + this.view.y = this.bounds.top; } - if (this.view.y > this.world.bounds.bottom - this.height) + if (this.view.y > this.bounds.bottom - this.height) { this.atLimit.y = true; - this.view.y = (this.world.bounds.bottom - this.height) + 1; + this.view.y = (this.bounds.bottom - this.height) + 1; } this.view.floor(); @@ -583,7 +625,11 @@ Phaser.Camera.prototype = { this.view.x = x; this.view.y = y; - this.checkWorldBounds(); + + if (this.bounds) + { + this.checkBounds(); + } }, @@ -615,8 +661,13 @@ Object.defineProperty(Phaser.Camera.prototype, "x", { }, set: function (value) { + this.view.x = value; - this.checkWorldBounds(); + + if (this.bounds) + { + this.checkBounds(); + } } }); @@ -633,8 +684,13 @@ Object.defineProperty(Phaser.Camera.prototype, "y", { }, set: function (value) { + this.view.y = value; - this.checkWorldBounds(); + + if (this.bounds) + { + this.checkBounds(); + } } }); @@ -693,7 +749,7 @@ Object.defineProperty(Phaser.Camera.prototype, "height", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Canvas.js.html b/docs/Canvas.js.html similarity index 99% rename from docs2/out/Canvas.js.html rename to docs/Canvas.js.html index 331f0b84..8132f1f0 100644 --- a/docs2/out/Canvas.js.html +++ b/docs/Canvas.js.html @@ -344,6 +344,7 @@ Phaser.Canvas = { * @return {HTMLCanvasElement} The newly created <canvas> tag. */ create: function (width, height) { + width = width || 256; height = height || 256; @@ -597,7 +598,7 @@ Phaser.Canvas = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Circle.js.html b/docs/Circle.js.html similarity index 99% rename from docs2/out/Circle.js.html rename to docs/Circle.js.html index 930cf7fa..e4a6e022 100644 --- a/docs2/out/Circle.js.html +++ b/docs/Circle.js.html @@ -812,7 +812,7 @@ Phaser.Circle.intersectsRectangle = function (c, r) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Color.js.html b/docs/Color.js.html similarity index 99% rename from docs2/out/Color.js.html rename to docs/Color.js.html index d1472e35..6604f3e7 100644 --- a/docs2/out/Color.js.html +++ b/docs/Color.js.html @@ -669,7 +669,7 @@ Phaser.Color = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Debug.js.html b/docs/Debug.js.html similarity index 94% rename from docs2/out/Debug.js.html rename to docs/Debug.js.html index 70765275..b6aa73f6 100644 --- a/docs2/out/Debug.js.html +++ b/docs/Debug.js.html @@ -399,17 +399,14 @@ Phaser.Utils.Debug.prototype = { return; } - x = x || null; - y = y || null; + if (typeof x !== 'number') { x = 0; } + if (typeof y !== 'number') { y = 0; } + color = color || 'rgb(255,255,255)'; - if (x && y) - { - this.currentX = x; - this.currentY = y; - this.currentColor = color; - } - + this.currentX = x; + this.currentY = y; + this.currentColor = color; this.currentAlpha = this.context.globalAlpha; this.context.save(); @@ -426,6 +423,7 @@ Phaser.Utils.Debug.prototype = { */ stop: function () { + this.context.restore(); this.context.globalAlpha = this.currentAlpha; @@ -621,6 +619,8 @@ Phaser.Utils.Debug.prototype = { this.start(x, y, color); this.line('Camera (' + camera.width + ' x ' + camera.height + ')'); this.line('X: ' + camera.x + ' Y: ' + camera.y); + this.line('Bounds x: ' + camera.bounds.x + ' Y: ' + camera.bounds.y + ' w: ' + camera.bounds.width + ' h: ' + camera.bounds.height); + this.line('View x: ' + camera.view.x + ' Y: ' + camera.view.y + ' w: ' + camera.view.width + ' h: ' + camera.view.height); this.stop(); }, @@ -777,9 +777,9 @@ Phaser.Utils.Debug.prototype = { this.start(x, y, color); this.line('Sprite: ' + ' (' + sprite.width + ' x ' + sprite.height + ') anchor: ' + sprite.anchor.x + ' x ' + sprite.anchor.y); - this.line('x: ' + sprite.x.toFixed(1) + ' y: ' + sprite.y.toFixed(1) + ' rotation: ' + sprite.rotation.toFixed(1)); - this.line('visible: ' + sprite.visible); - this.line('in camera: ' + sprite.inCamera); + this.line('x: ' + sprite.x.toFixed(1) + ' y: ' + sprite.y.toFixed(1)); + this.line('angle: ' + sprite.angle.toFixed(1) + ' rotation: ' + sprite.rotation.toFixed(1)); + this.line('visible: ' + sprite.visible + ' in camera: ' + sprite.inCamera); this.line('body x: ' + sprite.body.x.toFixed(1) + ' y: ' + sprite.body.y.toFixed(1)); // 0 = scaleX @@ -789,7 +789,6 @@ Phaser.Utils.Debug.prototype = { // 4 = scaleY // 5 = translateY - // this.line('id: ' + sprite._id); // this.line('scale x: ' + sprite.worldTransform[0]); // this.line('scale y: ' + sprite.worldTransform[4]); @@ -797,12 +796,13 @@ Phaser.Utils.Debug.prototype = { // this.line('ty: ' + sprite.worldTransform[5]); // this.line('skew x: ' + sprite.worldTransform[3]); // this.line('skew y: ' + sprite.worldTransform[1]); - this.line('dx: ' + sprite.body.deltaX()); - this.line('dy: ' + sprite.body.deltaY()); - this.line('sdx: ' + sprite.deltaX()); - this.line('sdy: ' + sprite.deltaY()); + this.line('deltaX: ' + sprite.body.deltaX()); + this.line('deltaY: ' + sprite.body.deltaY()); + // this.line('sdx: ' + sprite.deltaX()); + // this.line('sdy: ' + sprite.deltaY()); // this.line('inCamera: ' + this.game.renderer.spriteRenderer.inCamera(this.game.camera, sprite)); + this.stop(); }, @@ -832,6 +832,7 @@ Phaser.Utils.Debug.prototype = { this.line('scaleY: ' + sprite.worldTransform[4]); this.line('transX: ' + sprite.worldTransform[2]); this.line('transY: ' + sprite.worldTransform[5]); + this.stop(); }, @@ -861,8 +862,49 @@ Phaser.Utils.Debug.prototype = { this.line('scaleY: ' + sprite.localTransform[4]); this.line('transX: ' + sprite.localTransform[2]); this.line('transY: ' + sprite.localTransform[5]); - this.line('sX: ' + sprite._sx); - this.line('sY: ' + sprite._sy); + this.stop(); + + }, + + renderSpriteCoords: function (sprite, x, y, color) { + + if (this.context == null) + { + return; + } + + color = color || 'rgb(255, 255, 255)'; + + this.start(x, y, color); + + this.line(sprite.name); + this.line('x: ' + sprite.x); + this.line('y: ' + sprite.y); + this.line('local x: ' + sprite.localTransform[2]); + this.line('local y: ' + sprite.localTransform[5]); + this.line('world x: ' + sprite.worldTransform[2]); + this.line('world y: ' + sprite.worldTransform[5]); + + this.stop(); + + }, + + renderGroupInfo: function (group, x, y, color) { + + if (this.context == null) + { + return; + } + + color = color || 'rgb(255, 255, 255)'; + + this.start(x, y, color); + + this.line('Group (size: ' + group.length + ')'); + this.line('x: ' + group.x); + this.line('y: ' + group.y); + + this.stop(); }, @@ -907,8 +949,7 @@ Phaser.Utils.Debug.prototype = { this.start(0, 0, color); this.context.fillStyle = color; - // this.context.fillRect(sprite.body.x - sprite.body.deltaX(), sprite.body.y - sprite.body.deltaY(), sprite.body.width, sprite.body.height); - this.context.fillRect(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height); + this.context.fillRect(sprite.body.screenX, sprite.body.screenY, sprite.body.width, sprite.body.height); this.stop(); @@ -1171,7 +1212,7 @@ Phaser.Utils.Debug.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Device.js.html b/docs/Device.js.html similarity index 98% rename from docs2/out/Device.js.html rename to docs/Device.js.html index d098e87b..87b2e6e7 100644 --- a/docs2/out/Device.js.html +++ b/docs/Device.js.html @@ -646,8 +646,7 @@ Phaser.Device.prototype = { this.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; this.fileSystem = !!window['requestFileSystem']; - this.webGL = ( function () { try { return !! window.WebGLRenderingContext && !! document.createElement( 'canvas' ).getContext( 'experimental-webgl' ); } catch( e ) { return false; } } )(); - // this.webGL = !!window['WebGLRenderingContext']; + this.webGL = ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )(); this.worker = !!window['Worker']; if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) { @@ -876,7 +875,7 @@ Phaser.Device.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Easing.js.html b/docs/Easing.js.html similarity index 99% rename from docs2/out/Easing.js.html rename to docs/Easing.js.html index 4f6714d1..d4c4e4b6 100644 --- a/docs2/out/Easing.js.html +++ b/docs/Easing.js.html @@ -903,7 +903,7 @@ Phaser.Easing = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Emitter.js.html b/docs/Emitter.js.html similarity index 99% rename from docs2/out/Emitter.js.html rename to docs/Emitter.js.html index 58892cf8..27495dba 100644 --- a/docs2/out/Emitter.js.html +++ b/docs/Emitter.js.html @@ -1017,7 +1017,7 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Frame.js.html b/docs/Frame.js.html similarity index 99% rename from docs2/out/Frame.js.html rename to docs/Frame.js.html index 50966e30..2eb620b6 100644 --- a/docs2/out/Frame.js.html +++ b/docs/Frame.js.html @@ -502,7 +502,7 @@ Phaser.Frame.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/FrameData.js.html b/docs/FrameData.js.html similarity index 98% rename from docs2/out/FrameData.js.html rename to docs/FrameData.js.html index 7651fbad..28919f5e 100644 --- a/docs2/out/FrameData.js.html +++ b/docs/FrameData.js.html @@ -383,7 +383,7 @@ Phaser.FrameData.prototype = { */ getFrame: function (index) { - if (this._frames[index]) + if (this._frames.length > index) { return this._frames[index]; } @@ -532,7 +532,10 @@ Phaser.FrameData.prototype = { } else { - output.push(this.getFrameByName(frames[i]).index); + if (this.getFrameByName(frames[i])) + { + output.push(this.getFrameByName(frames[i]).index); + } } } } @@ -576,7 +579,7 @@ Object.defineProperty(Phaser.FrameData.prototype, "total", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Game.js.html b/docs/Game.js.html similarity index 99% rename from docs2/out/Game.js.html rename to docs/Game.js.html index e1d8aa56..d0dc6451 100644 --- a/docs2/out/Game.js.html +++ b/docs/Game.js.html @@ -352,8 +352,9 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant renderer = renderer || Phaser.AUTO; parent = parent || ''; state = state || null; + if (typeof transparent == 'undefined') { transparent = false; } - if (typeof antialias == 'undefined') { antialias = false; } + if (typeof antialias == 'undefined') { antialias = true; } /** * @property {number} id - Phaser Game ID (for when Pixi supports multiple instances). @@ -620,14 +621,14 @@ Phaser.Game.prototype = { this.net = new Phaser.Net(this); this.debug = new Phaser.Utils.Debug(this); - this.load.onLoadComplete.add(this.loadComplete, this); - this.stage.boot(); this.world.boot(); this.input.boot(); this.sound.boot(); this.state.boot(); + this.load.onLoadComplete.add(this.loadComplete, this); + if (this.renderType == Phaser.CANVAS) { console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to Canvas', 'color: #ffff33; background: #000000'); @@ -796,6 +797,9 @@ Object.defineProperty(Phaser.Game.prototype, "paused", { }); +/** +* "Deleted code is debugged code." - Jeff Sickel +*/ @@ -817,7 +821,7 @@ Object.defineProperty(Phaser.Game.prototype, "paused", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Group.js.html b/docs/Group.js.html similarity index 94% rename from docs2/out/Group.js.html rename to docs/Group.js.html index a291b5a3..a351026c 100644 --- a/docs2/out/Group.js.html +++ b/docs/Group.js.html @@ -335,13 +335,16 @@ * @param {Phaser.Game} game - A reference to the currently running game. * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. * @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging. -* @param {boolean} [useStage=false] - Only the root World Group should use this value. +* @param {boolean} [useStage=false] - Should the DisplayObjectContainer this Group creates be added to the World (default, false) or direct to the Stage (true). */ Phaser.Group = function (game, parent, name, useStage) { - parent = parent || null; + if (typeof parent === 'undefined') + { + parent = game.world; + } - if (typeof useStage == 'undefined') + if (typeof useStage === 'undefined') { useStage = false; } @@ -393,7 +396,12 @@ Phaser.Group = function (game, parent, name, useStage) { * @default */ this.exists = true; - + + /** + * @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one. + */ + this.scale = new Phaser.Point(1, 1); + }; Phaser.Group.prototype = { @@ -477,7 +485,7 @@ Phaser.Group.prototype = { * @param {number} y - The y coordinate to display the newly created Sprite at. The value is in relation to the Group.y point. * @param {string} key - The Game.cache key of the image that this Sprite will use. * @param {number|string} [frame] - If the Sprite image contains multiple frames you can specify which one to use here. - * @param {boolean} [exists] - The default exists state of the Sprite. + * @param {boolean} [exists=true] - The default exists state of the Sprite. * @return {Phaser.Sprite} The child that was created. */ create: function (x, y, key, frame, exists) { @@ -488,6 +496,8 @@ Phaser.Group.prototype = { child.group = this; child.exists = exists; + child.visible = exists; + child.alive = exists; if (child.events) { @@ -500,6 +510,40 @@ Phaser.Group.prototype = { }, + /** + * Automatically creates multiple Phaser.Sprite objects and adds them to the top of this Group. + * Useful if you need to quickly generate a pool of identical sprites, such as bullets. By default the sprites will be set to not exist + * and will be positioned at 0, 0 (relative to the Group.x/y) + * + * @method Phaser.Group#createMultiple + * @param {number} quantity - The number of Sprites to create. + * @param {string} key - The Game.cache key of the image that this Sprite will use. + * @param {number|string} [frame] - If the Sprite image contains multiple frames you can specify which one to use here. + * @param {boolean} [exists=false] - The default exists state of the Sprite. + */ + createMultiple: function (quantity, key, frame, exists) { + + if (typeof exists == 'undefined') { exists = false; } + + for (var i = 0; i < quantity; i++) + { + var child = new Phaser.Sprite(this.game, 0, 0, key, frame); + + child.group = this; + child.exists = exists; + child.visible = exists; + child.alive = exists; + + if (child.events) + { + child.events.onAddedToGroup.dispatch(child, this); + } + + this._container.addChild(child); + } + + }, + /** * Swaps the position of two children in this Group. * @@ -1125,7 +1169,7 @@ Phaser.Group.prototype = { */ countLiving: function () { - var total = -1; + var total = 0; if (this._container.children.length > 0 && this._container.first._iNext) { @@ -1142,6 +1186,10 @@ Phaser.Group.prototype = { } while (currentNode != this._container.last._iNext); } + else + { + total = -1; + } return total; @@ -1155,7 +1203,7 @@ Phaser.Group.prototype = { */ countDead: function () { - var total = -1; + var total = 0; if (this._container.children.length > 0 && this._container.first._iNext) { @@ -1172,6 +1220,10 @@ Phaser.Group.prototype = { } while (currentNode != this._container.last._iNext); } + else + { + total = -1; + } return total; @@ -1207,8 +1259,13 @@ Phaser.Group.prototype = { */ remove: function (child) { - child.events.onRemovedFromGroup.dispatch(child, this); + if (child.events) + { + child.events.onRemovedFromGroup.dispatch(child, this); + } + this._container.removeChild(child); + child.group = null; }, @@ -1377,6 +1434,19 @@ Phaser.Group.prototype = { }; +/** +* @name Phaser.Group#total +* @property {number} total - The total number of children in this Group, regardless of their alive state. +* @readonly +*/ +Object.defineProperty(Phaser.Group.prototype, "total", { + + get: function () { + return this._container.children.length; + } + +}); + /** * @name Phaser.Group#length * @property {number} length - The number of children in this Group. @@ -1476,6 +1546,22 @@ Object.defineProperty(Phaser.Group.prototype, "visible", { this._container.visible = value; } +}); + +/** +* @name Phaser.Group#alpha +* @property {number} alpha - The alpha value of the Group container. +*/ +Object.defineProperty(Phaser.Group.prototype, "alpha", { + + get: function () { + return this._container.alpha; + }, + + set: function (value) { + this._container.alpha = value; + } + }); @@ -1498,7 +1584,7 @@ Object.defineProperty(Phaser.Group.prototype, "visible", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Input.js.html b/docs/Input.js.html similarity index 99% rename from docs2/out/Input.js.html rename to docs/Input.js.html index 396c2a03..0b479b45 100644 --- a/docs2/out/Input.js.html +++ b/docs/Input.js.html @@ -1163,7 +1163,7 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/InputHandler.js.html b/docs/InputHandler.js.html similarity index 99% rename from docs2/out/InputHandler.js.html rename to docs/InputHandler.js.html index 73c3b1f4..f83af112 100644 --- a/docs2/out/InputHandler.js.html +++ b/docs/InputHandler.js.html @@ -1050,8 +1050,8 @@ Phaser.InputHandler.prototype = { if (this.snapOnDrag) { - this.sprite.x = Math.floor(this.sprite.x / this.snapX) * this.snapX; - this.sprite.y = Math.floor(this.sprite.y / this.snapY) * this.snapY; + this.sprite.x = Math.round(this.sprite.x / this.snapX) * this.snapX; + this.sprite.y = Math.round(this.sprite.y / this.snapY) * this.snapY; } return true; @@ -1264,8 +1264,8 @@ Phaser.InputHandler.prototype = { if (this.snapOnRelease) { - this.sprite.x = Math.floor(this.sprite.x / this.snapX) * this.snapX; - this.sprite.y = Math.floor(this.sprite.y / this.snapY) * this.snapY; + this.sprite.x = Math.round(this.sprite.x / this.snapX) * this.snapX; + this.sprite.y = Math.round(this.sprite.y / this.snapY) * this.snapY; } this.sprite.events.onDragStop.dispatch(this.sprite, pointer); @@ -1394,7 +1394,7 @@ Phaser.InputHandler.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Intro.js.html b/docs/Intro.js.html similarity index 99% rename from docs2/out/Intro.js.html rename to docs/Intro.js.html index 0dc48941..c9eb4020 100644 --- a/docs2/out/Intro.js.html +++ b/docs/Intro.js.html @@ -371,7 +371,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Key.js.html b/docs/Key.js.html similarity index 99% rename from docs2/out/Key.js.html rename to docs/Key.js.html index 95bfed53..606b4622 100644 --- a/docs2/out/Key.js.html +++ b/docs/Key.js.html @@ -513,7 +513,7 @@ Phaser.Key.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Keyboard.js.html b/docs/Keyboard.js.html similarity index 95% rename from docs2/out/Keyboard.js.html rename to docs/Keyboard.js.html index fdde4632..28178681 100644 --- a/docs2/out/Keyboard.js.html +++ b/docs/Keyboard.js.html @@ -446,6 +446,23 @@ Phaser.Keyboard.prototype = { }, + /** + * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right. + * + * @method Phaser.Keyboard#createCursorKeys + * @return {object} An object containing properties: up, down, left and right. Which can be polled like any other Phaser.Key object. + */ + createCursorKeys: function () { + + return { + up: this.addKey(Phaser.Keyboard.UP), + down: this.addKey(Phaser.Keyboard.DOWN), + left: this.addKey(Phaser.Keyboard.LEFT), + right: this.addKey(Phaser.Keyboard.RIGHT) + } + + }, + /** * Starts the Keyboard event listeners running (keydown and keyup). They are attached to the document.body. * This is called automatically by Phaser.Input and should not normally be invoked directly. @@ -609,8 +626,21 @@ Phaser.Keyboard.prototype = { this._hotkeys[event.keyCode].processKeyUp(event); } - this._keys[event.keyCode].isDown = false; - this._keys[event.keyCode].timeUp = this.game.time.now; + if (this._keys[event.keyCode]) + { + this._keys[event.keyCode].isDown = false; + this._keys[event.keyCode].timeUp = this.game.time.now; + } + else + { + // Not used this key before, so register it + this._keys[event.keyCode] = { + isDown: false, + timeDown: this.game.time.now, + timeUp: this.game.time.now, + duration: 0 + }; + } }, @@ -805,7 +835,7 @@ Phaser.Keyboard.NUM_LOCK = 144; Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/LinkedList.js.html b/docs/LinkedList.js.html similarity index 99% rename from docs2/out/LinkedList.js.html rename to docs/LinkedList.js.html index 3f82b5c7..ea65f1cf 100644 --- a/docs2/out/LinkedList.js.html +++ b/docs/LinkedList.js.html @@ -495,7 +495,7 @@ Phaser.LinkedList.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Loader.js.html b/docs/Loader.js.html similarity index 91% rename from docs2/out/Loader.js.html rename to docs/Loader.js.html index 24bcb861..1bbd6580 100644 --- a/docs2/out/Loader.js.html +++ b/docs/Loader.js.html @@ -574,6 +574,8 @@ Phaser.Loader.prototype = { this.addToFileList('image', key, url); } + return this; + }, /** @@ -593,6 +595,8 @@ Phaser.Loader.prototype = { this.addToFileList('text', key, url); } + return this; + }, /** @@ -603,7 +607,7 @@ Phaser.Loader.prototype = { * @param {string} url - URL of the sheet file. * @param {number} frameWidth - Width of each single frame. * @param {number} frameHeight - Height of each single frame. - * @param {number} frameMax - How many frames in this sprite sheet. + * @param {number} [frameMax=-1] - How many frames in this sprite sheet. If not specified it will divide the whole image into frames. */ spritesheet: function (key, url, frameWidth, frameHeight, frameMax) { @@ -614,6 +618,35 @@ Phaser.Loader.prototype = { this.addToFileList('spritesheet', key, url, { frameWidth: frameWidth, frameHeight: frameHeight, frameMax: frameMax }); } + return this; + + }, + + /** + * Add a new tile set to the loader. These are used in the rendering of tile maps. + * + * @method Phaser.Loader#tileset + * @param {string} key - Unique asset key of the tileset file. + * @param {string} url - URL of the tileset. + * @param {number} tileWidth - Width of each single tile in pixels. + * @param {number} tileHeight - Height of each single tile in pixels. + * @param {number} [tileMax=-1] - How many tiles in this tileset. If not specified it will divide the whole image into tiles. + * @param {number} [tileMargin=0] - If the tiles have been drawn with a margin, specify the amount here. + * @param {number} [tileSpacing=0] - If the tiles have been drawn with spacing between them, specify the amount here. + */ + tileset: function (key, url, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing) { + + if (typeof tileMax === "undefined") { tileMax = -1; } + if (typeof tileMargin === "undefined") { tileMargin = 0; } + if (typeof tileSpacing === "undefined") { tileSpacing = 0; } + + if (this.checkKeyExists(key) === false) + { + this.addToFileList('tileset', key, url, { tileWidth: tileWidth, tileHeight: tileHeight, tileMax: tileMax, tileMargin: tileMargin, tileSpacing: tileSpacing }); + } + + return this; + }, /** @@ -633,6 +666,8 @@ Phaser.Loader.prototype = { this.addToFileList('audio', key, urls, { buffer: null, autoDecode: autoDecode }); } + return this; + }, /** @@ -645,18 +680,25 @@ Phaser.Loader.prototype = { * @param {object} [mapData] - An optional JSON data object (can be given in place of a URL). * @param {string} [format] - The format of the map data. */ - tilemap: function (key, tilesetURL, mapDataURL, mapData, format) { + tilemap: function (key, mapDataURL, mapData, format) { if (typeof mapDataURL === "undefined") { mapDataURL = null; } if (typeof mapData === "undefined") { mapData = null; } if (typeof format === "undefined") { format = Phaser.Tilemap.CSV; } + if (mapDataURL == null && mapData == null) + { + console.warn('Phaser.Loader.tilemap - Both mapDataURL and mapData are null. One must be set.'); + + return this; + } + if (this.checkKeyExists(key) === false) { // A URL to a json/csv file has been given if (mapDataURL) { - this.addToFileList('tilemap', key, tilesetURL, { mapDataURL: mapDataURL, format: format }); + this.addToFileList('tilemap', key, mapDataURL, { format: format }); } else { @@ -667,7 +709,7 @@ Phaser.Loader.prototype = { break; // An xml string or object has been given - case Phaser.Tilemap.JSON: + case Phaser.Tilemap.TILED_JSON: if (typeof mapData === 'string') { @@ -676,11 +718,13 @@ Phaser.Loader.prototype = { break; } - this.addToFileList('tilemap', key, tilesetURL, { mapDataURL: null, mapData: mapData, format: format }); + this.game.cache.addTilemap(key, null, mapData, format); } } + return this; + }, /** @@ -741,6 +785,8 @@ Phaser.Loader.prototype = { } } + return this; + }, /** @@ -753,7 +799,7 @@ Phaser.Loader.prototype = { */ atlasJSONArray: function (key, textureURL, atlasURL, atlasData) { - this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY); + return this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY); }, @@ -767,7 +813,7 @@ Phaser.Loader.prototype = { */ atlasJSONHash: function (key, textureURL, atlasURL, atlasData) { - this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_HASH); + return this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_JSON_HASH); }, @@ -781,7 +827,7 @@ Phaser.Loader.prototype = { */ atlasXML: function (key, textureURL, atlasURL, atlasData) { - this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_XML_STARLING); + return this.atlas(key, textureURL, atlasURL, atlasData, Phaser.Loader.TEXTURE_ATLAS_XML_STARLING); }, @@ -864,6 +910,8 @@ Phaser.Loader.prototype = { } + return this; + }, /** @@ -939,7 +987,7 @@ Phaser.Loader.prototype = { case 'spritesheet': case 'textureatlas': case 'bitmapfont': - case 'tilemap': + case 'tileset': file.data = new Image(); file.data.name = file.key; file.data.onload = function () { @@ -1002,6 +1050,29 @@ Phaser.Loader.prototype = { break; + case 'tilemap': + this._xhr.open("GET", this.baseURL + file.url, true); + this._xhr.responseType = "text"; + + if (file.format == Phaser.Tilemap.TILED_JSON) + { + this._xhr.onload = function () { + return _this.jsonLoadComplete(file.key); + }; + } + else if (file.format == Phaser.Tilemap.CSV) + { + this._xhr.onload = function () { + return _this.csvLoadComplete(file.key); + }; + } + + this._xhr.onerror = function () { + return _this.dataLoadError(file.key); + }; + this._xhr.send(); + break; + case 'text': this._xhr.open("GET", this.baseURL + file.url, true); this._xhr.responseType = "text"; @@ -1056,7 +1127,7 @@ Phaser.Loader.prototype = { this.onFileError.dispatch(key); - console.warn("Phaser.Loader error loading file: " + key); + console.warn("Phaser.Loader error loading file: " + key + ' from URL ' + this._fileList[key].url); this.nextFile(key, false); @@ -1094,37 +1165,9 @@ Phaser.Loader.prototype = { this.game.cache.addSpriteSheet(file.key, file.url, file.data, file.frameWidth, file.frameHeight, file.frameMax); break; - case 'tilemap': + case 'tileset': - if (file.mapDataURL == null) - { - this.game.cache.addTilemap(file.key, file.url, file.data, file.mapData, file.format); - } - else - { - // Load the JSON or CSV before carrying on with the next file - loadNext = false; - this._xhr.open("GET", this.baseURL + file.mapDataURL, true); - this._xhr.responseType = "text"; - - if (file.format == Phaser.Tilemap.JSON) - { - this._xhr.onload = function () { - return _this.jsonLoadComplete(file.key); - }; - } - else if (file.format == Phaser.Tilemap.CSV) - { - this._xhr.onload = function () { - return _this.csvLoadComplete(file.key); - }; - } - - this._xhr.onerror = function () { - return _this.dataLoadError(file.key); - }; - this._xhr.send(); - } + this.game.cache.addTileset(file.key, file.url, file.data, file.tileWidth, file.tileHeight, file.tileMax, file.tileMargin, file.tileSpacing); break; case 'textureatlas': @@ -1240,7 +1283,7 @@ Phaser.Loader.prototype = { if (file.type == 'tilemap') { - this.game.cache.addTilemap(file.key, file.url, file.data, data, file.format); + this.game.cache.addTilemap(file.key, file.url, data, file.format); } else { @@ -1262,7 +1305,7 @@ Phaser.Loader.prototype = { var data = this._xhr.response; var file = this._fileList[key]; - this.game.cache.addTilemap(file.key, file.url, file.data, data, file.format); + this.game.cache.addTilemap(file.key, file.url, data, file.format); this.nextFile(key, true); @@ -1405,7 +1448,7 @@ Phaser.Loader.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/LoaderParser.js.html b/docs/LoaderParser.js.html similarity index 99% rename from docs2/out/LoaderParser.js.html rename to docs/LoaderParser.js.html index 954aa275..d3378850 100644 --- a/docs2/out/LoaderParser.js.html +++ b/docs/LoaderParser.js.html @@ -424,7 +424,7 @@ Phaser.LoaderParser = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/MSPointer.js.html b/docs/MSPointer.js.html similarity index 99% rename from docs2/out/MSPointer.js.html rename to docs/MSPointer.js.html index b35087e0..86456654 100644 --- a/docs2/out/MSPointer.js.html +++ b/docs/MSPointer.js.html @@ -524,7 +524,7 @@ Phaser.MSPointer.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Math.js.html b/docs/Math.js.html similarity index 97% rename from docs2/out/Math.js.html rename to docs/Math.js.html index 2e64859e..4bc3ca48 100644 --- a/docs2/out/Math.js.html +++ b/docs/Math.js.html @@ -845,16 +845,21 @@ Phaser.Math = { wrap: function (value, min, max) { var range = max - min; + if (range <= 0) { return 0; } + var result = (value - min) % range; + if (result < 0) { result += range; } + return result + min; + }, /** @@ -1005,13 +1010,20 @@ Phaser.Math = { * @return {number} The new angle value, returns the same as the input angle if it was within bounds */ angleLimit: function (angle, min, max) { + var result = angle; - if (angle > max) { + + if (angle > max) + { result = max; - } else if (angle < min) { + } + else if (angle < min) + { result = min; } + return result; + }, /** @@ -1022,16 +1034,23 @@ Phaser.Math = { * @return {number} */ linearInterpolation: function (v, k) { + var m = v.length - 1; var f = m * k; var i = Math.floor(f); - if (k < 0) { + + if (k < 0) + { return this.linear(v[0], v[1], f); } - if (k > 1) { + + if (k > 1) + { return this.linear(v[m], v[m - 1], m - f); } + return this.linear(v[i], v[i + 1 > m ? m : i + 1], f - i); + }, /** @@ -1042,12 +1061,17 @@ Phaser.Math = { * @return {number} */ bezierInterpolation: function (v, k) { + var b = 0; var n = v.length - 1; - for (var i = 0; i <= n; i++) { + + for (var i = 0; i <= n; i++) + { b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * this.bernstein(n, i); } + return b; + }, /** @@ -1063,20 +1087,31 @@ Phaser.Math = { var f = m * k; var i = Math.floor(f); - if (v[0] === v[m]) { - if (k < 0) { + if (v[0] === v[m]) + { + if (k < 0) + { i = Math.floor(f = m * (1 + k)); } + return this.catmullRom(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i); - } else { - if (k < 0) { + + } + else + { + if (k < 0) + { return v[0] - (this.catmullRom(v[0], v[0], v[1], v[1], -f) - v[0]); } - if (k > 1) { + + if (k > 1) + { return v[m] - (this.catmullRom(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]); } + return this.catmullRom(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i); } + }, /** @@ -1112,8 +1147,11 @@ Phaser.Math = { * @return {number} */ catmullRom: function (p0, p1, p2, p3, t) { + var v0 = (p2 - p0) * 0.5, v1 = (p3 - p1) * 0.5, t2 = t * t, t3 = t * t2; + return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1; + }, /** @@ -1328,6 +1366,21 @@ Phaser.Math = { return x < a ? a : x; }, + + /** + * Checks if two values are within the given tolerance of each other. + * + * @method Phaser.Math#within + * @param {number} a - The first number to check + * @param {number} b - The second number to check + * @param {number} tolerance - The tolerance. Anything equal to or less than this is considered within the range. + * @return {boolean} True if a is <= tolerance of b. + */ + within: function ( a, b, tolerance ) { + + return (Math.abs(a - b) <= tolerance); + + }, /** * Linear mapping from range <a1, a2> to range <b1, b2> @@ -1459,7 +1512,7 @@ Phaser.Math = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Mouse.js.html b/docs/Mouse.js.html similarity index 99% rename from docs2/out/Mouse.js.html rename to docs/Mouse.js.html index 9c2ac90e..9bc49546 100644 --- a/docs2/out/Mouse.js.html +++ b/docs/Mouse.js.html @@ -600,7 +600,7 @@ Phaser.Mouse.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Net.js.html b/docs/Net.js.html similarity index 99% rename from docs2/out/Net.js.html rename to docs/Net.js.html index fdf53fe8..0b179d32 100644 --- a/docs2/out/Net.js.html +++ b/docs/Net.js.html @@ -510,7 +510,7 @@ Phaser.Net.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Particles.js.html b/docs/Particles.js.html similarity index 99% rename from docs2/out/Particles.js.html rename to docs/Particles.js.html index 4b2c691a..32c12ac0 100644 --- a/docs2/out/Particles.js.html +++ b/docs/Particles.js.html @@ -415,7 +415,7 @@ Phaser.Particles.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Animation.html b/docs/Phaser.Animation.html similarity index 92% rename from docs2/out/Phaser.Animation.html rename to docs/Phaser.Animation.html index d2b20340..1e3288db 100644 --- a/docs2/out/Phaser.Animation.html +++ b/docs/Phaser.Animation.html @@ -698,7 +698,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    @@ -902,7 +902,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    @@ -1004,7 +1004,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    @@ -1211,7 +1211,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    @@ -1316,7 +1316,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    @@ -1421,7 +1421,109 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    + + + + + + + + + + + + + + + +
    +

    killOnComplete

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    looped + + +boolean + + + +

    The loop state of the Animation.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -1727,7 +1829,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    Source:
    @@ -2007,7 +2109,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2076,7 +2178,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2145,7 +2247,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2173,7 +2275,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    -

    play(frameRate, loop) → {Phaser.Animation}

    +

    play(frameRate, loop, killOnComplete) → {Phaser.Animation}

    @@ -2285,7 +2387,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat - null + false @@ -2294,6 +2396,45 @@ You could use this function to generate those by doing: Phaser.Animation.generat + + + + killOnComplete + + + + + +boolean + + + + + + + + + <optional>
    + + + + + + + + + + + + false + + + + +

    If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.

    + + + @@ -2322,7 +2463,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2416,7 +2557,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2554,7 +2695,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2623,7 +2764,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    Source:
    @@ -2674,7 +2815,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.AnimationManager.html b/docs/Phaser.AnimationManager.html similarity index 91% rename from docs2/out/Phaser.AnimationManager.html rename to docs/Phaser.AnimationManager.html index 92c33b28..cc33f1bc 100644 --- a/docs2/out/Phaser.AnimationManager.html +++ b/docs/Phaser.AnimationManager.html @@ -662,7 +662,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
    Source:
    @@ -764,7 +764,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
    Source:
    @@ -866,7 +866,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
    Source:
    @@ -968,7 +968,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
    Source:
    @@ -1079,6 +1079,111 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single +
    + + + +
    + + + +
    +

    isLoaded

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    isLoaded + + +boolean + + + +

    Set to true once animation data has been loaded.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + +
    @@ -1172,7 +1277,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single
    Source:
    @@ -1666,7 +1771,7 @@ Animations added in this way are played back with the play function.

    Source:
    @@ -1758,7 +1863,7 @@ Animations added in this way are played back with the play function.

    Source:
    @@ -1786,7 +1891,7 @@ Animations added in this way are played back with the play function.

    -

    play(name, frameRate, loop) → {Phaser.Animation}

    +

    play(name, frameRate, loop, killOnComplete) → {Phaser.Animation}

    @@ -1934,7 +2039,7 @@ If the requested animation is already playing this request will be ignored. If y - null + false @@ -1943,6 +2048,45 @@ If the requested animation is already playing this request will be ignored. If y + + + + killOnComplete + + + + + +boolean + + + + + + + + + <optional>
    + + + + + + + + + + + + false + + + + +

    If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.

    + + + @@ -1971,7 +2115,7 @@ If the requested animation is already playing this request will be ignored. If y
    Source:
    @@ -2017,6 +2161,75 @@ If the requested animation is already playing this request will be ignored. If y + + + + +
    +

    refreshFrame()

    + + +
    +
    + + +
    +

    Refreshes the current frame data back to the parent Sprite and also resets the texture data.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + +
    @@ -2172,7 +2385,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani
    Source:
    @@ -2241,7 +2454,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani
    Source:
    @@ -2437,7 +2650,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani
    Source:
    @@ -2511,7 +2724,7 @@ The currentAnim property of the AnimationManager is automatically set to the ani Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.AnimationParser.html b/docs/Phaser.AnimationParser.html similarity index 99% rename from docs2/out/Phaser.AnimationParser.html rename to docs/Phaser.AnimationParser.html index 0b069c2f..4e3a2f84 100644 --- a/docs2/out/Phaser.AnimationParser.html +++ b/docs/Phaser.AnimationParser.html @@ -1308,7 +1308,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Cache.html b/docs/Phaser.Cache.html similarity index 87% rename from docs2/out/Phaser.Cache.html rename to docs/Phaser.Cache.html index e3e38b52..475edfe1 100644 --- a/docs2/out/Phaser.Cache.html +++ b/docs/Phaser.Cache.html @@ -659,7 +659,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -842,7 +842,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1006,7 +1006,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1075,7 +1075,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1239,7 +1239,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1380,7 +1380,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1590,7 +1590,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1823,7 +1823,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -1987,7 +1987,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -2197,7 +2197,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -2225,7 +2225,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    -

    addTilemap(key, url, data, mapData, format)

    +

    addTilemap(key, url, mapData, format)

    @@ -2311,29 +2311,6 @@ as images, sounds and data files as a result of Loader calls. Cache items use st - - - data - - - - - -object - - - - - - - - - -

    Tilemap data.

    - - - - mapData @@ -2407,7 +2384,394 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    addTileset(key, url, data, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing)

    + + +
    +
    + + +
    +

    Add a new tile set in to the cache.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    key + + +string + + + + + + + + + + + +

    The unique key by which you will reference this object.

    url + + +string + + + + + + + + + + + +

    URL of this tile set file.

    data + + +object + + + + + + + + + + + +

    Extra tile set data.

    tileWidth + + +number + + + + + + + + + + + +

    Width of the sprite sheet.

    tileHeight + + +number + + + + + + + + + + + +

    Height of the sprite sheet.

    tileMax + + +number + + + + + + + + + + + +

    How many tiles stored in the sprite sheet.

    tileMargin + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    If the tiles have been drawn with a margin, specify the amount here.

    tileSpacing + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    If the tiles have been drawn with spacing between them, specify the amount here.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -2525,7 +2889,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -2689,7 +3053,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -2758,7 +3122,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -2876,7 +3240,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3017,7 +3381,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3158,7 +3522,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3299,7 +3663,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3440,7 +3804,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3581,7 +3945,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3673,7 +4037,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3815,7 +4179,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -3956,7 +4320,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4097,7 +4461,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4189,7 +4553,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4330,7 +4694,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4422,7 +4786,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4563,7 +4927,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4704,7 +5068,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4755,7 +5119,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    -

    getTilemap(key) → {Phaser.Tilemap}

    +

    getTilemap(key) → {Object}

    @@ -4845,7 +5209,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4881,7 +5245,289 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    -Phaser.Tilemap +Object + + +
    +
    + + + + + +
    + + + +
    +

    getTileset(key) → {Phaser.Tileset}

    + + +
    +
    + + +
    +

    Get tile set image data by key.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string + + + +

    Asset key of the image you want.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The tileset data. The tileset image is in the data property, the tile data in tileData.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Tileset + + +
    +
    + + + + + +
    + + + +
    +

    getTileSetImage(key) → {object}

    + + +
    +
    + + +
    +

    Get tile set image data by key.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string + + + +

    Asset key of the image you want.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The image data you want.

    +
    + + + +
    +
    + Type +
    +
    + +object
    @@ -4986,7 +5632,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5127,7 +5773,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5268,7 +5914,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5409,7 +6055,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5527,7 +6173,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5645,7 +6291,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5763,7 +6409,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5881,7 +6527,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5999,7 +6645,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6117,7 +6763,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6168,7 +6814,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Camera.html b/docs/Phaser.Camera.html similarity index 90% rename from docs2/out/Phaser.Camera.html rename to docs/Phaser.Camera.html index 629b1cc2..af7ae150 100644 --- a/docs2/out/Phaser.Camera.html +++ b/docs/Phaser.Camera.html @@ -544,7 +544,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -630,7 +630,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -690,7 +690,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -750,7 +750,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -810,7 +810,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -912,7 +912,115 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    + + + + + + + +
    + + + +
    + + + +
    +

    bounds

    + + +
    +
    + +
    +

    The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World. +The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound +at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the center of the world.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bounds + + +Phaser.Rectangle + + + +

    The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -1014,7 +1122,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -1116,7 +1224,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -1222,7 +1330,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -1327,7 +1435,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -1429,7 +1537,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -1534,7 +1642,7 @@ The game automatically creates a single Stage sized camera on boot. Move the cam
    Source:
    @@ -1643,7 +1751,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -1748,7 +1856,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -1854,7 +1962,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -1956,7 +2064,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -2062,7 +2170,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -2168,7 +2276,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -2233,7 +2341,125 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    focusOn(displayObject)

    + + +
    +
    + + +
    +

    Move the camera focus on a display object instantly.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    displayObject + + +any + + + +

    The display object to focus the camera on. Must have visible x/y properties.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -2269,7 +2495,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    -

    Move the camera focus to a location instantly.

    +

    Move the camera focus on a location instantly.

    @@ -2374,7 +2600,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -2535,7 +2761,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera,
    Source:
    @@ -2677,7 +2903,7 @@ without having to use game.camera.x and game.camera.y.

    Source:
    @@ -2818,7 +3044,7 @@ without having to use game.camera.x and game.camera.y.

    Source:
    @@ -2887,7 +3113,7 @@ without having to use game.camera.x and game.camera.y.

    Source:
    @@ -2938,7 +3164,7 @@ without having to use game.camera.x and game.camera.y.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Canvas.html b/docs/Phaser.Canvas.html similarity index 98% rename from docs2/out/Phaser.Canvas.html rename to docs/Phaser.Canvas.html index 2718c62a..14daba08 100644 --- a/docs2/out/Phaser.Canvas.html +++ b/docs/Phaser.Canvas.html @@ -560,7 +560,7 @@ If no parent is given it will be added as a child of the document.body.

    Source:
    @@ -865,7 +865,7 @@ If no parent is given it will be added as a child of the document.body.

    Source:
    @@ -1049,7 +1049,7 @@ If no parent is given it will be added as a child of the document.body.

    Source:
    @@ -1235,7 +1235,7 @@ If no parent is given it will be added as a child of the document.body.

    Source:
    @@ -1377,7 +1377,7 @@ Note that if this doesn't given the desired result then see the CanvasUtils.setS
    Source:
    @@ -1519,7 +1519,7 @@ Note that if this doesn't given the desired result then see the setSmoothingEnab
    Source:
    @@ -1687,7 +1687,7 @@ patchy on earlier browsers, especially on mobile.

    Source:
    @@ -1871,7 +1871,7 @@ patchy on earlier browsers, especially on mobile.

    Source:
    @@ -2150,7 +2150,7 @@ patchy on earlier browsers, especially on mobile.

    Source:
    @@ -2334,7 +2334,7 @@ patchy on earlier browsers, especially on mobile.

    Source:
    @@ -2408,7 +2408,7 @@ patchy on earlier browsers, especially on mobile.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Circle.html b/docs/Phaser.Circle.html similarity index 99% rename from docs2/out/Phaser.Circle.html rename to docs/Phaser.Circle.html index eee8dab7..46e4a9eb 100644 --- a/docs2/out/Phaser.Circle.html +++ b/docs/Phaser.Circle.html @@ -4188,7 +4188,7 @@ This method checks the radius distances between the two Circle objects to see if Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Color.html b/docs/Phaser.Color.html similarity index 99% rename from docs2/out/Phaser.Color.html rename to docs/Phaser.Color.html index 98a6f65b..484476f6 100644 --- a/docs2/out/Phaser.Color.html +++ b/docs/Phaser.Color.html @@ -3517,7 +3517,7 @@ RGB format information and HSL information. Each section starts on a newline, 3 Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Device.html b/docs/Phaser.Device.html similarity index 99% rename from docs2/out/Phaser.Device.html rename to docs/Phaser.Device.html index 75999d0f..f3bf6fd1 100644 --- a/docs2/out/Phaser.Device.html +++ b/docs/Phaser.Device.html @@ -4727,7 +4727,7 @@
    Source:
    @@ -4819,7 +4819,7 @@
    Source:
    @@ -4893,7 +4893,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Back.html b/docs/Phaser.Easing.Back.html similarity index 99% rename from docs2/out/Phaser.Easing.Back.html rename to docs/Phaser.Easing.Back.html index 2631979f..aea252ef 100644 --- a/docs2/out/Phaser.Easing.Back.html +++ b/docs/Phaser.Easing.Back.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Bounce.html b/docs/Phaser.Easing.Bounce.html similarity index 99% rename from docs2/out/Phaser.Easing.Bounce.html rename to docs/Phaser.Easing.Bounce.html index bcd2ea9f..23715df7 100644 --- a/docs2/out/Phaser.Easing.Bounce.html +++ b/docs/Phaser.Easing.Bounce.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Circular.html b/docs/Phaser.Easing.Circular.html similarity index 99% rename from docs2/out/Phaser.Easing.Circular.html rename to docs/Phaser.Easing.Circular.html index b257f4fe..58fba0c0 100644 --- a/docs2/out/Phaser.Easing.Circular.html +++ b/docs/Phaser.Easing.Circular.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Cubic.html b/docs/Phaser.Easing.Cubic.html similarity index 99% rename from docs2/out/Phaser.Easing.Cubic.html rename to docs/Phaser.Easing.Cubic.html index 26938598..892d2a19 100644 --- a/docs2/out/Phaser.Easing.Cubic.html +++ b/docs/Phaser.Easing.Cubic.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Elastic.html b/docs/Phaser.Easing.Elastic.html similarity index 99% rename from docs2/out/Phaser.Easing.Elastic.html rename to docs/Phaser.Easing.Elastic.html index 874d16c6..a346c298 100644 --- a/docs2/out/Phaser.Easing.Elastic.html +++ b/docs/Phaser.Easing.Elastic.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Exponential.html b/docs/Phaser.Easing.Exponential.html similarity index 99% rename from docs2/out/Phaser.Easing.Exponential.html rename to docs/Phaser.Easing.Exponential.html index cf97a610..6c07b7bf 100644 --- a/docs2/out/Phaser.Easing.Exponential.html +++ b/docs/Phaser.Easing.Exponential.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Linear.html b/docs/Phaser.Easing.Linear.html similarity index 99% rename from docs2/out/Phaser.Easing.Linear.html rename to docs/Phaser.Easing.Linear.html index bec902b2..d9790bea 100644 --- a/docs2/out/Phaser.Easing.Linear.html +++ b/docs/Phaser.Easing.Linear.html @@ -587,7 +587,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Quadratic.html b/docs/Phaser.Easing.Quadratic.html similarity index 99% rename from docs2/out/Phaser.Easing.Quadratic.html rename to docs/Phaser.Easing.Quadratic.html index 762c25e8..b1e44d6f 100644 --- a/docs2/out/Phaser.Easing.Quadratic.html +++ b/docs/Phaser.Easing.Quadratic.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Quartic.html b/docs/Phaser.Easing.Quartic.html similarity index 99% rename from docs2/out/Phaser.Easing.Quartic.html rename to docs/Phaser.Easing.Quartic.html index b5769b92..491b3306 100644 --- a/docs2/out/Phaser.Easing.Quartic.html +++ b/docs/Phaser.Easing.Quartic.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Quintic.html b/docs/Phaser.Easing.Quintic.html similarity index 99% rename from docs2/out/Phaser.Easing.Quintic.html rename to docs/Phaser.Easing.Quintic.html index fe8003c6..64fa5f1f 100644 --- a/docs2/out/Phaser.Easing.Quintic.html +++ b/docs/Phaser.Easing.Quintic.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.Sinusoidal.html b/docs/Phaser.Easing.Sinusoidal.html similarity index 99% rename from docs2/out/Phaser.Easing.Sinusoidal.html rename to docs/Phaser.Easing.Sinusoidal.html index be21a206..61b78478 100644 --- a/docs2/out/Phaser.Easing.Sinusoidal.html +++ b/docs/Phaser.Easing.Sinusoidal.html @@ -869,7 +869,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Easing.html b/docs/Phaser.Easing.html similarity index 99% rename from docs2/out/Phaser.Easing.html rename to docs/Phaser.Easing.html index d3b194c9..9ba392f2 100644 --- a/docs2/out/Phaser.Easing.html +++ b/docs/Phaser.Easing.html @@ -479,7 +479,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Frame.html b/docs/Phaser.Frame.html similarity index 99% rename from docs2/out/Phaser.Frame.html rename to docs/Phaser.Frame.html index 78174ce0..9f0ca9aa 100644 --- a/docs2/out/Phaser.Frame.html +++ b/docs/Phaser.Frame.html @@ -2854,7 +2854,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:46 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.FrameData.html b/docs/Phaser.FrameData.html similarity index 99% rename from docs2/out/Phaser.FrameData.html rename to docs/Phaser.FrameData.html index f1016736..b64379a2 100644 --- a/docs2/out/Phaser.FrameData.html +++ b/docs/Phaser.FrameData.html @@ -507,7 +507,7 @@
    Source:
    @@ -1801,7 +1801,7 @@ The frames are returned in the output array, or if none is provided in a new Arr Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Game.html b/docs/Phaser.Game.html similarity index 97% rename from docs2/out/Phaser.Game.html rename to docs/Phaser.Game.html index bfa2b6bc..704bea9a 100644 --- a/docs2/out/Phaser.Game.html +++ b/docs/Phaser.Game.html @@ -701,7 +701,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -803,7 +803,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -908,7 +908,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1013,7 +1013,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1118,7 +1118,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1223,7 +1223,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1328,7 +1328,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1433,7 +1433,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1535,7 +1535,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1637,7 +1637,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1742,7 +1742,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1847,7 +1847,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -1952,7 +1952,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -2057,7 +2057,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -2162,7 +2162,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -2267,7 +2267,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -2369,7 +2369,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -2474,7 +2474,7 @@ providing quick access to common functions and handling the boot process.

    Source:
    @@ -2581,7 +2581,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -2686,7 +2686,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -2791,7 +2791,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -2896,7 +2896,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -2998,7 +2998,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3103,7 +3103,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3208,7 +3208,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3313,7 +3313,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3415,7 +3415,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3520,7 +3520,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3622,7 +3622,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3727,7 +3727,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3829,7 +3829,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3934,7 +3934,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -3999,7 +3999,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4068,7 +4068,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4137,7 +4137,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4206,7 +4206,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4324,7 +4324,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4375,7 +4375,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Group.html b/docs/Phaser.Group.html similarity index 89% rename from docs2/out/Phaser.Group.html rename to docs/Phaser.Group.html index d6c1443b..2c75ea5e 100644 --- a/docs2/out/Phaser.Group.html +++ b/docs/Phaser.Group.html @@ -525,7 +525,7 @@ -

    Only the root World Group should use this value.

    +

    Should the DisplayObjectContainer this Group creates be added to the World (default, false) or direct to the Stage (true).

    @@ -600,6 +600,108 @@
    +
    +

    alpha

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    alpha + + +number + + + +

    The alpha value of the Group container.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + +

    angle

    @@ -690,7 +792,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -795,7 +897,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -897,7 +999,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -999,7 +1101,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1101,7 +1203,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1208,7 +1310,211 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    + + + + + + + +
    + + + +
    + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    Replaces the PIXI.Point with a slightly more flexible one.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> total

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    total + + +number + + + +

    The total number of children in this Group, regardless of their alive state.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -1310,7 +1616,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1412,7 +1718,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1519,7 +1825,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
    Source:
    @@ -1626,7 +1932,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
    Source:
    @@ -1742,7 +2048,7 @@ that then see the addAt method.

    Source:
    @@ -1962,7 +2268,7 @@ Group.addAll('x', 10) will add 10 to the child.x value.

    Source:
    @@ -2104,7 +2410,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -2245,7 +2551,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -2430,7 +2736,7 @@ After the callback parameter you can add as many extra parameters as you like, w
    Source:
    @@ -2623,7 +2929,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -2692,7 +2998,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -2784,7 +3090,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -2870,6 +3176,8 @@ Useful if you don't need to create the Sprite instances before-hand.

    + Default + Description @@ -2903,6 +3211,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    The x coordinate to display the newly created Sprite at. The value is in relation to the Group.x point.

    @@ -2934,6 +3246,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    The y coordinate to display the newly created Sprite at. The value is in relation to the Group.y point.

    @@ -2965,6 +3281,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    The Game.cache key of the image that this Sprite will use.

    @@ -3001,6 +3321,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    If the Sprite image contains multiple frames you can specify which one to use here.

    @@ -3034,6 +3358,12 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + true + + +

    The default exists state of the Sprite.

    @@ -3067,7 +3397,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    Source:
    @@ -3113,6 +3443,256 @@ Useful if you don't need to create the Sprite instances before-hand.

    +
    + + + +
    +

    createMultiple(quantity, key, frame, exists)

    + + +
    +
    + + +
    +

    Automatically creates multiple Phaser.Sprite objects and adds them to the top of this Group. +Useful if you need to quickly generate a pool of identical sprites, such as bullets. By default the sprites will be set to not exist +and will be positioned at 0, 0 (relative to the Group.x/y)

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    quantity + + +number + + + + + + + + + + + +

    The number of Sprites to create.

    key + + +string + + + + + + + + + + + +

    The Game.cache key of the image that this Sprite will use.

    frame + + +number +| + +string + + + + + + <optional>
    + + + + + +
    + +

    If the Sprite image contains multiple frames you can specify which one to use here.

    exists + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + +

    The default exists state of the Sprite.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + +
    @@ -3159,7 +3739,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    Source:
    @@ -3347,7 +3927,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -3485,7 +4065,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -3651,7 +4231,7 @@ For example: Group.forEach(awardBonusGold, this, true, 100, 500)

    Source:
    @@ -3794,7 +4374,7 @@ For example: Group.forEachAlive(causeDamage, this, 500)

    Source:
    @@ -3937,7 +4517,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -4055,7 +4635,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -4148,7 +4728,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4241,7 +4821,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4382,7 +4962,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4523,7 +5103,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4687,7 +5267,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4898,7 +5478,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -5016,7 +5596,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -5086,7 +5666,7 @@ The Group container remains on the display list.

    Source:
    @@ -5227,7 +5807,7 @@ The Group container remains on the display list.

    Source:
    @@ -5368,7 +5948,7 @@ The Group container remains on the display list.

    Source:
    @@ -5655,7 +6235,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -5898,7 +6478,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -6086,7 +6666,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -6227,7 +6807,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -6301,7 +6881,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Input.html b/docs/Phaser.Input.html similarity index 99% rename from docs2/out/Phaser.Input.html rename to docs/Phaser.Input.html index 4db98bf2..8b99dbb3 100644 --- a/docs2/out/Phaser.Input.html +++ b/docs/Phaser.Input.html @@ -7473,7 +7473,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.InputHandler.html b/docs/Phaser.InputHandler.html similarity index 99% rename from docs2/out/Phaser.InputHandler.html rename to docs/Phaser.InputHandler.html index 3c78611a..d69deb50 100644 --- a/docs2/out/Phaser.InputHandler.html +++ b/docs/Phaser.InputHandler.html @@ -7389,7 +7389,7 @@ This value is only set when the pointer is over this Sprite.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Key.html b/docs/Phaser.Key.html similarity index 99% rename from docs2/out/Phaser.Key.html rename to docs/Phaser.Key.html index d457c4b8..564ecb42 100644 --- a/docs2/out/Phaser.Key.html +++ b/docs/Phaser.Key.html @@ -2436,7 +2436,7 @@ If the key is up it holds the duration of the previous down session.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Keyboard.html b/docs/Phaser.Keyboard.html similarity index 95% rename from docs2/out/Phaser.Keyboard.html rename to docs/Phaser.Keyboard.html index 353ab542..ab37d5cd 100644 --- a/docs2/out/Phaser.Keyboard.html +++ b/docs/Phaser.Keyboard.html @@ -1438,7 +1438,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -1507,7 +1507,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -1530,6 +1530,98 @@ Pass in either a single keycode or an array/hash of keycodes.

    + + + + +
    +

    createCursorKeys() → {object}

    + + +
    +
    + + +
    +

    Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    An object containing properties: up, down, left and right. Which can be polled like any other Phaser.Key object.

    +
    + + + +
    +
    + Type +
    +
    + +object + + +
    +
    + + + + +
    @@ -1625,7 +1717,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -1821,7 +1913,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -2017,7 +2109,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -2158,7 +2250,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -2276,7 +2368,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -2512,7 +2604,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -2581,7 +2673,7 @@ Pass in either a single keycode or an array/hash of keycodes.

    Source:
    @@ -2651,7 +2743,7 @@ This is called automatically by Phaser.Input and should not normally be invoked
    Source:
    @@ -2720,7 +2812,7 @@ This is called automatically by Phaser.Input and should not normally be invoked
    Source:
    @@ -2771,7 +2863,7 @@ This is called automatically by Phaser.Input and should not normally be invoked Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:47 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.LinkedList.html b/docs/Phaser.LinkedList.html similarity index 99% rename from docs2/out/Phaser.LinkedList.html rename to docs/Phaser.LinkedList.html index 05060e49..c67232b5 100644 --- a/docs2/out/Phaser.LinkedList.html +++ b/docs/Phaser.LinkedList.html @@ -1355,7 +1355,7 @@ The function must exist on the member.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Loader.html b/docs/Phaser.Loader.html similarity index 89% rename from docs2/out/Phaser.Loader.html rename to docs/Phaser.Loader.html index c566fd56..000cf34b 100644 --- a/docs2/out/Phaser.Loader.html +++ b/docs/Phaser.Loader.html @@ -2324,7 +2324,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2488,7 +2488,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2652,7 +2652,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2816,7 +2816,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2980,7 +2980,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3205,7 +3205,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3464,7 +3464,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3582,7 +3582,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3700,7 +3700,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3818,7 +3818,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4100,7 +4100,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4169,7 +4169,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4287,7 +4287,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4559,7 +4559,7 @@ This allows you to easily make loading bars for games.

    -

    spritesheet(key, url, frameWidth, frameHeight, frameMax)

    +

    spritesheet(key, url, frameWidth, frameHeight, frameMax)

    @@ -4589,8 +4589,12 @@ This allows you to easily make loading bars for games.

    Type + Argument + + Default + Description @@ -4614,7 +4618,19 @@ This allows you to easily make loading bars for games.

    + + + + + + + + + + + +

    Unique asset key of the sheet file.

    @@ -4637,7 +4653,19 @@ This allows you to easily make loading bars for games.

    + + + + + + + + + + + +

    URL of the sheet file.

    @@ -4660,7 +4688,19 @@ This allows you to easily make loading bars for games.

    + + + + + + + + + + + +

    Width of each single frame.

    @@ -4683,7 +4723,19 @@ This allows you to easily make loading bars for games.

    + + + + + + + + + + + +

    Height of each single frame.

    @@ -4706,10 +4758,26 @@ This allows you to easily make loading bars for games.

    + + + <optional>
    + + + + + -

    How many frames in this sprite sheet.

    + + + + -1 + + + + +

    How many frames in this sprite sheet. If not specified it will divide the whole image into frames.

    @@ -4741,7 +4809,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -4810,7 +4878,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -4974,7 +5042,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5232,7 +5300,363 @@ This allows you to easily make loading bars for games.

    Source:
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    tileset(key, url, tileWidth, tileHeight, tileMax, tileMargin, tileSpacing)

    + + +
    +
    + + +
    +

    Add a new tile set to the loader. These are used in the rendering of tile maps.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    key + + +string + + + + + + + + + + + +

    Unique asset key of the tileset file.

    url + + +string + + + + + + + + + + + +

    URL of the tileset.

    tileWidth + + +number + + + + + + + + + + + +

    Width of each single tile in pixels.

    tileHeight + + +number + + + + + + + + + + + +

    Height of each single tile in pixels.

    tileMax + + +number + + + + + + <optional>
    + + + + + +
    + + -1 + +

    How many tiles in this tileset. If not specified it will divide the whole image into tiles.

    tileMargin + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    If the tiles have been drawn with a margin, specify the amount here.

    tileSpacing + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    If the tiles have been drawn with spacing between them, specify the amount here.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -5350,7 +5774,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5401,7 +5825,7 @@ This allows you to easily make loading bars for games.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.LoaderParser.html b/docs/Phaser.LoaderParser.html similarity index 99% rename from docs2/out/Phaser.LoaderParser.html rename to docs/Phaser.LoaderParser.html index 249b200f..ec747435 100644 --- a/docs2/out/Phaser.LoaderParser.html +++ b/docs/Phaser.LoaderParser.html @@ -587,7 +587,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.MSPointer.html b/docs/Phaser.MSPointer.html similarity index 99% rename from docs2/out/Phaser.MSPointer.html rename to docs/Phaser.MSPointer.html index b0be4c20..d3a56e77 100644 --- a/docs2/out/Phaser.MSPointer.html +++ b/docs/Phaser.MSPointer.html @@ -1620,7 +1620,7 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Math.html b/docs/Phaser.Math.html similarity index 97% rename from docs2/out/Phaser.Math.html rename to docs/Phaser.Math.html index b7bac697..499a808e 100644 --- a/docs2/out/Phaser.Math.html +++ b/docs/Phaser.Math.html @@ -765,7 +765,7 @@
    Source:
    @@ -1017,7 +1017,7 @@
    Source:
    @@ -1177,7 +1177,7 @@
    Source:
    @@ -1406,7 +1406,7 @@
    Source:
    @@ -1566,7 +1566,7 @@
    Source:
    @@ -1703,7 +1703,7 @@
    Source:
    @@ -2215,7 +2215,7 @@ Clamp value to range <a, b>

    Source:
    @@ -2375,7 +2375,7 @@ Clamp value to range <a, b>

    Source:
    @@ -2463,7 +2463,7 @@ Clamp value to range <a, b>

    Source:
    @@ -2619,7 +2619,7 @@ Clamp value to range <a, b>

    Source:
    @@ -2825,7 +2825,7 @@ Clamp value to range <a, b>

    Source:
    @@ -3035,7 +3035,7 @@ Clamp value to range <a, b>

    Source:
    @@ -3176,7 +3176,7 @@ Clamp value to range <a, b>

    Source:
    @@ -4424,7 +4424,7 @@ Will return null if random selection is missing, or array has no entries.

    Source:
    @@ -4977,7 +4977,7 @@ Will return null if random selection is missing, or array has no entries.

    Source:
    @@ -5118,7 +5118,7 @@ Will return null if random selection is missing, or array has no entries.

    Source:
    @@ -5305,7 +5305,7 @@ Will return null if random selection is missing, or array has no entries.

    Source:
    @@ -5465,7 +5465,7 @@ Will return null if random selection is missing, or array has no entries.

    Source:
    @@ -5717,7 +5717,7 @@ Will return null if random selection is missing, or array has no entries.

    Source:
    @@ -5806,7 +5806,7 @@ See http://jsperf.com/m
    Source:
    @@ -6082,7 +6082,7 @@ See http://jsperf.com/m
    Source:
    @@ -6938,7 +6938,7 @@ absolute value the return for exact angle

    Source:
    @@ -7026,7 +7026,7 @@ absolute value the return for exact angle

    Source:
    @@ -7511,7 +7511,7 @@ The original stack is modified in the process. This effectively moves the positi
    Source:
    @@ -7652,7 +7652,7 @@ The original stack is modified in the process. This effectively moves the positi
    Source:
    @@ -7794,7 +7794,7 @@ The original stack is modified in the process. This effectively moves the positi
    Source:
    @@ -8004,7 +8004,7 @@ you should get the results via getSinTable() and getCosTable(). This generator i
    Source:
    @@ -8191,7 +8191,7 @@ you should get the results via getSinTable() and getCosTable(). This generator i
    Source:
    @@ -8374,7 +8374,7 @@ you should get the results via getSinTable() and getCosTable(). This generator i
    Source:
    @@ -9368,6 +9368,193 @@ you should get the results via getSinTable() and getCosTable(). This generator i +
    + + + +
    +

    within(a, b, tolerance) → {boolean}

    + + +
    +
    + + +
    +

    Checks if two values are within the given tolerance of each other.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    a + + +number + + + +

    The first number to check

    b + + +number + + + +

    The second number to check

    tolerance + + +number + + + +

    The tolerance. Anything equal to or less than this is considered within the range.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    True if a is <= tolerance of b.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + +
    @@ -9637,7 +9824,7 @@ Should be called whenever the angle is updated on the Sprite to stop it from goi
    Source:
    @@ -9825,7 +10012,7 @@ Should be called whenever the angle is updated on the Sprite to stop it from goi
    Source:
    @@ -9899,7 +10086,7 @@ Should be called whenever the angle is updated on the Sprite to stop it from goi Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Mouse.html b/docs/Phaser.Mouse.html similarity index 99% rename from docs2/out/Phaser.Mouse.html rename to docs/Phaser.Mouse.html index 59e78675..1527a2b5 100644 --- a/docs2/out/Phaser.Mouse.html +++ b/docs/Phaser.Mouse.html @@ -2166,7 +2166,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Net.html b/docs/Phaser.Net.html similarity index 99% rename from docs2/out/Phaser.Net.html rename to docs/Phaser.Net.html index 2a6eeb0d..368ad77b 100644 --- a/docs2/out/Phaser.Net.html +++ b/docs/Phaser.Net.html @@ -1245,7 +1245,7 @@ Optionally you can redirect to the new url, or just return it as a string.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Particles.Arcade.Emitter.html b/docs/Phaser.Particles.Arcade.Emitter.html similarity index 94% rename from docs2/out/Phaser.Particles.Arcade.Emitter.html rename to docs/Phaser.Particles.Arcade.Emitter.html index ba5e1e19..4851dc76 100644 --- a/docs2/out/Phaser.Particles.Arcade.Emitter.html +++ b/docs/Phaser.Particles.Arcade.Emitter.html @@ -811,7 +811,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1669,7 +1669,7 @@ Emitter.emitX and Emitter.emitY control the emission location relative to the x/
    Source:
    @@ -2092,7 +2092,7 @@ Emitter.emitX and Emitter.emitY control the emission location relative to the x/
    Source:
    @@ -3598,7 +3598,114 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    + + + + + + + + + + + + + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    Replaces the PIXI.Point with a slightly more flexible one.

    +
    + + + + + + + + +
    Inherited From:
    +
    + + + + + + + + + + + + + +
    Source:
    +
    @@ -3709,6 +3816,113 @@ This will have no impact on the rotation value of its children, but it will upda +
    + + + +
    + + + +
    +

    <readonly> total

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    total + + +number + + + +

    The total number of children in this Group, regardless of their alive state.

    +
    + + + + + + + + +
    Inherited From:
    +
    + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + +
    @@ -4548,7 +4762,7 @@ that then see the addAt method.

    Source:
    @@ -4773,7 +4987,7 @@ Group.addAll('x', 10) will add 10 to the child.x value.

    Source:
    @@ -4920,7 +5134,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -5184,7 +5398,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -5374,7 +5588,7 @@ After the callback parameter you can add as many extra parameters as you like, w
    Source:
    @@ -5572,7 +5786,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -5646,7 +5860,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -5743,7 +5957,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -5829,6 +6043,8 @@ Useful if you don't need to create the Sprite instances before-hand.

    + Default + Description @@ -5862,6 +6078,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    The x coordinate to display the newly created Sprite at. The value is in relation to the Group.x point.

    @@ -5893,6 +6113,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    The y coordinate to display the newly created Sprite at. The value is in relation to the Group.y point.

    @@ -5924,6 +6148,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    The Game.cache key of the image that this Sprite will use.

    @@ -5960,6 +6188,10 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + +

    If the Sprite image contains multiple frames you can specify which one to use here.

    @@ -5993,6 +6225,12 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + true + + +

    The default exists state of the Sprite.

    @@ -6031,7 +6269,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    Source:
    @@ -6077,6 +6315,261 @@ Useful if you don't need to create the Sprite instances before-hand.

    + + + + +
    +

    createMultiple(quantity, key, frame, exists)

    + + +
    +
    + + +
    +

    Automatically creates multiple Phaser.Sprite objects and adds them to the top of this Group. +Useful if you need to quickly generate a pool of identical sprites, such as bullets. By default the sprites will be set to not exist +and will be positioned at 0, 0 (relative to the Group.x/y)

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    quantity + + +number + + + + + + + + + + + +

    The number of Sprites to create.

    key + + +string + + + + + + + + + + + +

    The Game.cache key of the image that this Sprite will use.

    frame + + +number +| + +string + + + + + + <optional>
    + + + + + +
    + +

    If the Sprite image contains multiple frames you can specify which one to use here.

    exists + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + +

    The default exists state of the Sprite.

    + + + + +
    + + + + + + + +
    Inherited From:
    +
    + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + +
    @@ -6128,7 +6621,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    Source:
    @@ -6321,7 +6814,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -6464,7 +6957,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -6704,7 +7197,7 @@ For example: Group.forEach(awardBonusGold, this, true, 100, 500)

    Source:
    @@ -6852,7 +7345,7 @@ For example: Group.forEachAlive(causeDamage, this, 500)

    Source:
    @@ -7000,7 +7493,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -7123,7 +7616,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -7221,7 +7714,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -7319,7 +7812,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -7465,7 +7958,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -7611,7 +8104,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -7780,7 +8273,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -8286,7 +8779,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -8409,7 +8902,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -8484,7 +8977,7 @@ The Group container remains on the display list.

    Source:
    @@ -8630,7 +9123,7 @@ The Group container remains on the display list.

    Source:
    @@ -8776,7 +9269,7 @@ The Group container remains on the display list.

    Source:
    @@ -9138,7 +9631,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -9386,7 +9879,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -10330,7 +10823,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -10476,7 +10969,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -10619,7 +11112,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Particles.html b/docs/Phaser.Particles.html similarity index 99% rename from docs2/out/Phaser.Particles.html rename to docs/Phaser.Particles.html index bdc6602f..bbe241c6 100644 --- a/docs2/out/Phaser.Particles.html +++ b/docs/Phaser.Particles.html @@ -1036,7 +1036,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:48 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Plugin.html b/docs/Phaser.Plugin.html similarity index 99% rename from docs2/out/Phaser.Plugin.html rename to docs/Phaser.Plugin.html index 23a58ab1..2366b40d 100644 --- a/docs2/out/Phaser.Plugin.html +++ b/docs/Phaser.Plugin.html @@ -1707,7 +1707,7 @@ It is only called if active is set to true.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.PluginManager.html b/docs/Phaser.PluginManager.html similarity index 99% rename from docs2/out/Phaser.PluginManager.html rename to docs/Phaser.PluginManager.html index c4e1f416..f6c39dea 100644 --- a/docs2/out/Phaser.PluginManager.html +++ b/docs/Phaser.PluginManager.html @@ -1337,7 +1337,7 @@ It only calls plugins who have active=true.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Point.html b/docs/Phaser.Point.html similarity index 98% rename from docs2/out/Phaser.Point.html rename to docs/Phaser.Point.html index ecfa3d57..12cb2824 100644 --- a/docs2/out/Phaser.Point.html +++ b/docs/Phaser.Point.html @@ -869,7 +869,7 @@
    Source:
    @@ -1084,7 +1084,7 @@
    Source:
    @@ -1299,7 +1299,7 @@
    Source:
    @@ -1463,7 +1463,7 @@
    Source:
    @@ -1678,7 +1678,7 @@
    Source:
    @@ -1934,7 +1934,7 @@
    Source:
    @@ -2149,7 +2149,7 @@
    Source:
    @@ -2313,7 +2313,7 @@
    Source:
    @@ -2477,7 +2477,7 @@
    Source:
    @@ -2641,7 +2641,7 @@
    Source:
    @@ -2805,7 +2805,7 @@
    Source:
    @@ -2958,7 +2958,7 @@
    Source:
    @@ -3240,7 +3240,7 @@
    Source:
    @@ -3381,7 +3381,7 @@
    Source:
    @@ -3565,7 +3565,7 @@
    Source:
    @@ -3729,7 +3729,7 @@
    Source:
    @@ -3870,7 +3870,7 @@
    Source:
    @@ -4126,7 +4126,7 @@
    Source:
    @@ -4403,7 +4403,7 @@
    Source:
    @@ -4731,7 +4731,7 @@
    Source:
    @@ -4823,7 +4823,7 @@
    Source:
    @@ -4897,7 +4897,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Pointer.html b/docs/Phaser.Pointer.html similarity index 99% rename from docs2/out/Phaser.Pointer.html rename to docs/Phaser.Pointer.html index 3fa406db..7a88f5b7 100644 --- a/docs2/out/Phaser.Pointer.html +++ b/docs/Phaser.Pointer.html @@ -1120,7 +1120,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -3375,7 +3375,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -3481,7 +3481,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -3819,7 +3819,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -3968,7 +3968,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -4105,7 +4105,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -4292,7 +4292,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -4528,7 +4528,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -4597,7 +4597,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Source:
    @@ -4740,7 +4740,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.QuadTree.html b/docs/Phaser.QuadTree.html similarity index 99% rename from docs2/out/Phaser.QuadTree.html rename to docs/Phaser.QuadTree.html index 671356f3..524130d1 100644 --- a/docs2/out/Phaser.QuadTree.html +++ b/docs/Phaser.QuadTree.html @@ -1206,7 +1206,7 @@ Split the node into 4 subnodes

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.RandomDataGenerator.html b/docs/Phaser.RandomDataGenerator.html similarity index 98% rename from docs2/out/Phaser.RandomDataGenerator.html rename to docs/Phaser.RandomDataGenerator.html index 2dfefa0a..ff2e4bdc 100644 --- a/docs2/out/Phaser.RandomDataGenerator.html +++ b/docs/Phaser.RandomDataGenerator.html @@ -517,7 +517,7 @@ Random number generator from Source:
    @@ -605,7 +605,7 @@ Random number generator from Source:
    @@ -693,7 +693,7 @@ Random number generator from Source:
    @@ -853,7 +853,7 @@ Random number generator from Source:
    @@ -941,7 +941,7 @@ Random number generator from Source:
    @@ -1078,7 +1078,7 @@ Random number generator from Source:
    @@ -1166,7 +1166,7 @@ Random number generator from Source:
    @@ -1326,7 +1326,7 @@ Random number generator from Source:
    @@ -1604,7 +1604,7 @@ Random number generator from Source:
    @@ -1692,7 +1692,7 @@ Random number generator from Source:
    @@ -1829,7 +1829,7 @@ Random number generator from Source:
    @@ -1899,7 +1899,7 @@ Random number generator from Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Rectangle.html b/docs/Phaser.Rectangle.html similarity index 99% rename from docs2/out/Phaser.Rectangle.html rename to docs/Phaser.Rectangle.html index ad97a39e..7f14f162 100644 --- a/docs2/out/Phaser.Rectangle.html +++ b/docs/Phaser.Rectangle.html @@ -3777,7 +3777,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    -

    <static> intersects(a, b, tolerance) → {boolean}

    +

    <static> intersects(a, b) → {boolean}

    @@ -3863,29 +3863,6 @@ This method checks the x, y, width, and height properties of the Rectangles.

    - - - - tolerance - - - - - -number - - - - - - - - - -

    A tolerance value to allow for an intersection test with padding, default to 0

    - - - @@ -4147,7 +4124,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4546,7 +4523,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -7238,7 +7215,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.RequestAnimationFrame.html b/docs/Phaser.RequestAnimationFrame.html similarity index 99% rename from docs2/out/Phaser.RequestAnimationFrame.html rename to docs/Phaser.RequestAnimationFrame.html index 662a17be..1dc5fb53 100644 --- a/docs2/out/Phaser.RequestAnimationFrame.html +++ b/docs/Phaser.RequestAnimationFrame.html @@ -1209,7 +1209,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Signal.html b/docs/Phaser.Signal.html similarity index 99% rename from docs2/out/Phaser.Signal.html rename to docs/Phaser.Signal.html index dc498ed8..e1014a0b 100644 --- a/docs2/out/Phaser.Signal.html +++ b/docs/Phaser.Signal.html @@ -2194,7 +2194,7 @@ already dispatched before.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Sound.html b/docs/Phaser.Sound.html similarity index 99% rename from docs2/out/Phaser.Sound.html rename to docs/Phaser.Sound.html index 5b5f8c1c..0b3a284a 100644 --- a/docs2/out/Phaser.Sound.html +++ b/docs/Phaser.Sound.html @@ -5418,7 +5418,7 @@ This allows you to bundle multiple sounds together into a single audio file and Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.SoundManager.html b/docs/Phaser.SoundManager.html similarity index 99% rename from docs2/out/Phaser.SoundManager.html rename to docs/Phaser.SoundManager.html index 6e62d2b9..475e87b7 100644 --- a/docs2/out/Phaser.SoundManager.html +++ b/docs/Phaser.SoundManager.html @@ -2326,7 +2326,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:49 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Stage.html b/docs/Phaser.Stage.html similarity index 99% rename from docs2/out/Phaser.Stage.html rename to docs/Phaser.Stage.html index ba75184b..5adc7e26 100644 --- a/docs2/out/Phaser.Stage.html +++ b/docs/Phaser.Stage.html @@ -1383,7 +1383,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.StageScaleMode.html b/docs/Phaser.StageScaleMode.html similarity index 99% rename from docs2/out/Phaser.StageScaleMode.html rename to docs/Phaser.StageScaleMode.html index 72c3c1eb..afb56453 100644 --- a/docs2/out/Phaser.StageScaleMode.html +++ b/docs/Phaser.StageScaleMode.html @@ -2470,7 +2470,7 @@ If null it will scale to whatever width the browser can handle.

    -

    pageAlignVeritcally

    +

    pageAlignVertically

    @@ -2509,7 +2509,7 @@ If null it will scale to whatever width the browser can handle.

    - pageAlignVeritcally + pageAlignVertically @@ -3720,7 +3720,7 @@ Please note that this needs to be supported by the web browser and isn't the sam Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.State.html b/docs/Phaser.State.html similarity index 99% rename from docs2/out/Phaser.State.html rename to docs/Phaser.State.html index 1885f076..44b1f3a4 100644 --- a/docs2/out/Phaser.State.html +++ b/docs/Phaser.State.html @@ -2474,7 +2474,7 @@ If you need to use the loader, you may need to use them here.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.StateManager.html b/docs/Phaser.StateManager.html similarity index 99% rename from docs2/out/Phaser.StateManager.html rename to docs/Phaser.StateManager.html index 06fbce89..95db2d55 100644 --- a/docs2/out/Phaser.StateManager.html +++ b/docs/Phaser.StateManager.html @@ -3331,7 +3331,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Time.html b/docs/Phaser.Time.html similarity index 99% rename from docs2/out/Phaser.Time.html rename to docs/Phaser.Time.html index 5f84d403..ef62d104 100644 --- a/docs2/out/Phaser.Time.html +++ b/docs/Phaser.Time.html @@ -2795,7 +2795,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Touch.html b/docs/Phaser.Touch.html similarity index 99% rename from docs2/out/Phaser.Touch.html rename to docs/Phaser.Touch.html index 9250159d..f0030245 100644 --- a/docs2/out/Phaser.Touch.html +++ b/docs/Phaser.Touch.html @@ -2446,7 +2446,7 @@ Doesn't appear to be supported by most browsers on a canvas element yet.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Tween.html b/docs/Phaser.Tween.html similarity index 97% rename from docs2/out/Phaser.Tween.html rename to docs/Phaser.Tween.html index d017c164..43e8bc3b 100644 --- a/docs2/out/Phaser.Tween.html +++ b/docs/Phaser.Tween.html @@ -1060,7 +1060,7 @@ You can pass as many tweens as you like to this function, they will each be chai
    Source:
    @@ -1201,7 +1201,7 @@ You can pass as many tweens as you like to this function, they will each be chai
    Source:
    @@ -1342,7 +1342,7 @@ You can pass as many tweens as you like to this function, they will each be chai
    Source:
    @@ -1483,7 +1483,7 @@ You can pass as many tweens as you like to this function, they will each be chai
    Source:
    @@ -1534,7 +1534,7 @@ You can pass as many tweens as you like to this function, they will each be chai
    -

    loop() → {Tween}

    +

    loop() → {Phaser.Tween}

    @@ -1581,7 +1581,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -1617,7 +1617,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    -Tween +Phaser.Tween
    @@ -1722,7 +1722,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -1863,7 +1863,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2004,7 +2004,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2096,7 +2096,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2214,7 +2214,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2306,7 +2306,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2424,7 +2424,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2516,7 +2516,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -2936,7 +2936,7 @@ game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
    Source:
    @@ -3078,7 +3078,7 @@ Used in combination with repeat you can create endless loops.

    Source:
    @@ -3152,7 +3152,7 @@ Used in combination with repeat you can create endless loops.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.TweenManager.html b/docs/Phaser.TweenManager.html similarity index 99% rename from docs2/out/Phaser.TweenManager.html rename to docs/Phaser.TweenManager.html index 5af078a5..19e57da6 100644 --- a/docs2/out/Phaser.TweenManager.html +++ b/docs/Phaser.TweenManager.html @@ -1508,7 +1508,7 @@ Please see https://github.com/sole/tw Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Utils.Debug.html b/docs/Phaser.Utils.Debug.html similarity index 99% rename from docs2/out/Phaser.Utils.Debug.html rename to docs/Phaser.Utils.Debug.html index fc7a472d..efc59fd1 100644 --- a/docs2/out/Phaser.Utils.Debug.html +++ b/docs/Phaser.Utils.Debug.html @@ -1443,7 +1443,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -1686,7 +1686,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -1847,7 +1847,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2588,7 +2588,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2780,7 +2780,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2941,7 +2941,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3184,7 +3184,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3325,7 +3325,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3486,7 +3486,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3729,7 +3729,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3890,7 +3890,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -4100,7 +4100,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -4594,7 +4594,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -5334,7 +5334,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -5810,7 +5810,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -5861,7 +5861,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.Utils.html b/docs/Phaser.Utils.html similarity index 92% rename from docs2/out/Phaser.Utils.html rename to docs/Phaser.Utils.html index 08a0b7a2..29af7947 100644 --- a/docs2/out/Phaser.Utils.html +++ b/docs/Phaser.Utils.html @@ -426,7 +426,7 @@
    -

    <static> extend() → {object}

    +

    <static> extend(deep, target) → {object}

    @@ -443,6 +443,78 @@ +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    deep + + +boolean + + + +

    Perform a deep copy?

    target + + +object + + + +

    The target object to copy to.

    + +
    @@ -467,7 +539,7 @@
    Source:
    @@ -608,7 +680,7 @@
    Source:
    @@ -878,7 +950,7 @@ dir = 1 (left), 2 (right), 3 (both)

    Source:
    @@ -948,7 +1020,7 @@ dir = 1 (left), 2 (right), 3 (both)

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.World.html b/docs/Phaser.World.html similarity index 91% rename from docs2/out/Phaser.World.html rename to docs/Phaser.World.html index de9146f6..51a398a0 100644 --- a/docs2/out/Phaser.World.html +++ b/docs/Phaser.World.html @@ -347,8 +347,7 @@

    "This world is but a canvas to our imagination." - Henry David Thoreau

    -

    <p> -A game has only one world. The world is an abstract place in which all game objects live. It is not bound +

    A game has only one world. The world is an abstract place in which all game objects live. It is not bound by stage limits and can be any size. You look into the world via cameras. All game objects live within the world at world-based coordinates. By default a world is created the same size as your Stage.

    @@ -482,6 +481,13 @@ the world at world-based coordinates. By default a world is created the same siz
    +
    +

    The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being "in world" and you should use this to clean-up the display list and purge dead objects. +By default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display. +However 0,0 is actually the center of the world, and if you rotate or scale the world all of that will happen from 0,0. +So if you want to make a game in which the world itself will rotate you should adjust the bounds so that 0,0 is the center point, i.e. set them to -1000,-1000,2000,2000 for a 2000x2000 sized world centered around 0,0.

    +
    + @@ -560,7 +566,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    @@ -662,7 +668,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    @@ -968,211 +974,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    - - - - - - - -
    - - - - - - - -
    -

    game

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running Game.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    group

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    group - - -Phaser.Group - - - -

    Object container stores every object created with create* methods.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    @@ -1478,7 +1280,109 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    + + + + + + + +
    + + + +
    + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    Replaces the PIXI.Point with a slightly more flexible one.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -1645,7 +1549,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    @@ -1714,7 +1618,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    @@ -1811,7 +1715,7 @@ the world at world-based coordinates. By default a world is created the same siz
    -

    setSize(width, height)

    +

    setBounds(x, y, width, height)

    @@ -1819,7 +1723,8 @@ the world at world-based coordinates. By default a world is created the same siz
    -

    Updates the size of this world.

    +

    Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height. +If you need to adjust the bounds of the world

    @@ -1851,6 +1756,52 @@ the world at world-based coordinates. By default a world is created the same siz + + + x + + + + + +number + + + + + + + + + +

    Top left most corner of the world.

    + + + + + + + y + + + + + +number + + + + + + + + + +

    Top left most corner of the world.

    + + + + width @@ -1924,7 +1875,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    @@ -1993,7 +1944,7 @@ the world at world-based coordinates. By default a world is created the same siz
    Source:
    @@ -2044,7 +1995,7 @@ the world at world-based coordinates. By default a world is created the same siz Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:50 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.html b/docs/Phaser.html similarity index 99% rename from docs2/out/Phaser.html rename to docs/Phaser.html index 37f7c00c..61ee9adf 100644 --- a/docs2/out/Phaser.html +++ b/docs/Phaser.html @@ -555,7 +555,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:45 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Phaser.js.html b/docs/Phaser.js.html similarity index 98% rename from docs2/out/Phaser.js.html rename to docs/Phaser.js.html index fb8766ac..c2f516bb 100644 --- a/docs2/out/Phaser.js.html +++ b/docs/Phaser.js.html @@ -332,7 +332,7 @@ */ var Phaser = Phaser || { - VERSION: '1.0.7-beta', + VERSION: '1.1.0', GAMES: [], AUTO: 0, CANVAS: 1, @@ -383,7 +383,7 @@ PIXI.InteractionManager = function (dummy) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Plugin.js.html b/docs/Plugin.js.html similarity index 99% rename from docs2/out/Plugin.js.html rename to docs/Plugin.js.html index 25527f23..d781cc54 100644 --- a/docs2/out/Plugin.js.html +++ b/docs/Plugin.js.html @@ -457,7 +457,7 @@ Phaser.Plugin.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/PluginManager.js.html b/docs/PluginManager.js.html similarity index 99% rename from docs2/out/PluginManager.js.html rename to docs/PluginManager.js.html index 35fbc1c0..32e281f1 100644 --- a/docs2/out/PluginManager.js.html +++ b/docs/PluginManager.js.html @@ -574,7 +574,7 @@ Phaser.PluginManager.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Point.js.html b/docs/Point.js.html similarity index 99% rename from docs2/out/Point.js.html rename to docs/Point.js.html index 82b1f646..6c893032 100644 --- a/docs2/out/Point.js.html +++ b/docs/Point.js.html @@ -381,9 +381,11 @@ Phaser.Point.prototype = { * @return {Point} This Point object. Useful for chaining method calls. **/ setTo: function (x, y) { + this.x = x; this.y = y; return this; + }, /** @@ -737,7 +739,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Pointer.js.html b/docs/Pointer.js.html similarity index 99% rename from docs2/out/Pointer.js.html rename to docs/Pointer.js.html index 84fd2bcf..f8a4d99f 100644 --- a/docs2/out/Pointer.js.html +++ b/docs/Pointer.js.html @@ -570,7 +570,7 @@ Phaser.Pointer.prototype = { this.identifier = event.identifier; this.target = event.target; - if (event.button) + if (typeof event.button !== 'undefined') { this.button = event.button; } @@ -674,7 +674,7 @@ Phaser.Pointer.prototype = { return; } - if (event.button) + if (typeof event.button !== 'undefined') { this.button = event.button; } @@ -753,8 +753,6 @@ Phaser.Pointer.prototype = { if (this._highestRenderObject == null) { - // console.log("HRO null"); - // The pointer isn't currently over anything, check if we've got a lingering previous target if (this.targetObject) { @@ -1033,7 +1031,7 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldY", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/QuadTree.js.html b/docs/QuadTree.js.html similarity index 99% rename from docs2/out/QuadTree.js.html rename to docs/QuadTree.js.html index c9dcf1a9..715c8d09 100644 --- a/docs2/out/QuadTree.js.html +++ b/docs/QuadTree.js.html @@ -606,7 +606,7 @@ Phaser.QuadTree.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/RandomDataGenerator.js.html b/docs/RandomDataGenerator.js.html similarity index 98% rename from docs2/out/RandomDataGenerator.js.html rename to docs/RandomDataGenerator.js.html index c224b404..75430b32 100644 --- a/docs2/out/RandomDataGenerator.js.html +++ b/docs/RandomDataGenerator.js.html @@ -403,10 +403,12 @@ Phaser.RandomDataGenerator.prototype = { this.s0 = this.hash(' '); this.s1 = this.hash(this.s0); this.s2 = this.hash(this.s1); + this.c = 1; var seed; - for (var i = 0; seed = seeds[i++]; ) { + for (var i = 0; seed = seeds[i++]; ) + { this.s0 -= this.hash(seed); this.s0 += ~~(this.s0 < 0); this.s1 -= this.hash(seed); @@ -492,9 +494,6 @@ Phaser.RandomDataGenerator.prototype = { */ realInRange: function (min, max) { - min = min || 0; - max = max || 0; - return this.frac() * (max - min) + min; }, @@ -589,7 +588,7 @@ Phaser.RandomDataGenerator.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Rectangle.js.html b/docs/Rectangle.js.html similarity index 98% rename from docs2/out/Rectangle.js.html rename to docs/Rectangle.js.html index 2fa30312..658e1ade 100644 --- a/docs2/out/Rectangle.js.html +++ b/docs/Rectangle.js.html @@ -941,14 +941,16 @@ Phaser.Rectangle.intersection = function (a, b, out) { * @method Phaser.Rectangle.intersects * @param {Phaser.Rectangle} a - The first Rectangle object. * @param {Phaser.Rectangle} b - The second Rectangle object. -* @param {number} tolerance - A tolerance value to allow for an intersection test with padding, default to 0 * @return {boolean} A value of true if the specified object intersects with this Rectangle object; otherwise false. */ -Phaser.Rectangle.intersects = function (a, b, tolerance) { +Phaser.Rectangle.intersects = function (a, b) { - tolerance = tolerance || 0; + return (a.x < b.right && b.x < a.right && a.y < b.bottom && b.y < a.bottom); - return !(a.x > b.right + tolerance || a.right < b.x - tolerance || a.y > b.bottom + tolerance || a.bottom < b.y - tolerance); + // return (a.x <= b.right && b.x <= a.right && a.y <= b.bottom && b.y <= a.bottom); + + // return (a.left <= b.right && b.left <= a.right && a.top <= b.bottom && b.top <= a.bottom); + // return !(a.x > b.right + tolerance || a.right < b.x - tolerance || a.y > b.bottom + tolerance || a.bottom < b.y - tolerance); }; @@ -982,7 +984,7 @@ Phaser.Rectangle.union = function (a, b, out) { if (typeof out === "undefined") { out = new Phaser.Rectangle(); } - return out.setTo(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.max(a.right, b.right), Math.max(a.bottom, b.bottom)); + return out.setTo(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.max(a.right, b.right) - Math.min(a.left, b.left), Math.max(a.bottom, b.bottom) - Math.min(a.top, b.top)); }; @@ -1006,7 +1008,7 @@ Phaser.Rectangle.union = function (a, b, out) { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/RequestAnimationFrame.js.html b/docs/RequestAnimationFrame.js.html similarity index 99% rename from docs2/out/RequestAnimationFrame.js.html rename to docs/RequestAnimationFrame.js.html index 0442a6d6..1c29f775 100644 --- a/docs2/out/RequestAnimationFrame.js.html +++ b/docs/RequestAnimationFrame.js.html @@ -494,7 +494,7 @@ Phaser.RequestAnimationFrame.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Signal.js.html b/docs/Signal.js.html similarity index 99% rename from docs2/out/Signal.js.html rename to docs/Signal.js.html index 2e7088d9..9fbe233d 100644 --- a/docs2/out/Signal.js.html +++ b/docs/Signal.js.html @@ -639,7 +639,7 @@ Phaser.Signal.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/SignalBinding.html b/docs/SignalBinding.html similarity index 99% rename from docs2/out/SignalBinding.html rename to docs/SignalBinding.html index 43738708..c8bb1cf0 100644 --- a/docs2/out/SignalBinding.html +++ b/docs/SignalBinding.html @@ -639,7 +639,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:51 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/SignalBinding.js.html b/docs/SignalBinding.js.html similarity index 99% rename from docs2/out/SignalBinding.js.html rename to docs/SignalBinding.js.html index 09bf658a..2f5557d3 100644 --- a/docs2/out/SignalBinding.js.html +++ b/docs/SignalBinding.js.html @@ -504,7 +504,7 @@ Phaser.SignalBinding.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Sound.js.html b/docs/Sound.js.html similarity index 99% rename from docs2/out/Sound.js.html rename to docs/Sound.js.html index a7a0c4f5..94c710f3 100644 --- a/docs2/out/Sound.js.html +++ b/docs/Sound.js.html @@ -1148,7 +1148,7 @@ Object.defineProperty(Phaser.Sound.prototype, "volume", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/SoundManager.js.html b/docs/SoundManager.js.html similarity index 99% rename from docs2/out/SoundManager.js.html rename to docs/SoundManager.js.html index fb3a6ba9..df2a0748 100644 --- a/docs2/out/SoundManager.js.html +++ b/docs/SoundManager.js.html @@ -791,7 +791,7 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Stage.js.html b/docs/Stage.js.html similarity index 99% rename from docs2/out/Stage.js.html rename to docs/Stage.js.html index ec57fcf1..eeb07873 100644 --- a/docs2/out/Stage.js.html +++ b/docs/Stage.js.html @@ -488,7 +488,7 @@ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/StageScaleMode.js.html b/docs/StageScaleMode.js.html similarity index 99% rename from docs2/out/StageScaleMode.js.html rename to docs/StageScaleMode.js.html index cf64c588..6bcc2c42 100644 --- a/docs2/out/StageScaleMode.js.html +++ b/docs/StageScaleMode.js.html @@ -373,12 +373,12 @@ Phaser.StageScaleMode = function (game, width, height) { this.pageAlignHorizontally = false; /** - * @property {boolean} pageAlignVeritcally - If you wish to align your game in the middle of the page then you can set this value to true. + * @property {boolean} pageAlignVertically - If you wish to align your game in the middle of the page then you can set this value to true. <ul><li>It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing. <li>It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.</li></ul> * @default */ - this.pageAlignVeritcally = false; + this.pageAlignVertically = false; /** * @property {number} minWidth - Minimum width the canvas should be scaled to (in pixels). @@ -767,7 +767,7 @@ Phaser.StageScaleMode.prototype = { } } - if (this.pageAlignVeritcally) + if (this.pageAlignVertically) { if (this.height < window.innerHeight && this.incorrectOrientation == false) { @@ -913,7 +913,7 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isLandscape", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/State.js.html b/docs/State.js.html similarity index 99% rename from docs2/out/State.js.html rename to docs/State.js.html index 3b440932..14226299 100644 --- a/docs2/out/State.js.html +++ b/docs/State.js.html @@ -511,7 +511,7 @@ Phaser.State.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/StateManager.js.html b/docs/StateManager.js.html similarity index 99% rename from docs2/out/StateManager.js.html rename to docs/StateManager.js.html index 78442321..eef04b6b 100644 --- a/docs2/out/StateManager.js.html +++ b/docs/StateManager.js.html @@ -867,7 +867,7 @@ Phaser.StateManager.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Time.js.html b/docs/Time.js.html similarity index 99% rename from docs2/out/Time.js.html rename to docs/Time.js.html index fca332d6..1748e42f 100644 --- a/docs2/out/Time.js.html +++ b/docs/Time.js.html @@ -607,7 +607,7 @@ Phaser.Time.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Touch.js.html b/docs/Touch.js.html similarity index 99% rename from docs2/out/Touch.js.html rename to docs/Touch.js.html index 74e26b48..1a8af421 100644 --- a/docs2/out/Touch.js.html +++ b/docs/Touch.js.html @@ -675,7 +675,7 @@ Phaser.Touch.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Tween.js.html b/docs/Tween.js.html similarity index 98% rename from docs2/out/Tween.js.html rename to docs/Tween.js.html index a7520358..2bc8905d 100644 --- a/docs2/out/Tween.js.html +++ b/docs/Tween.js.html @@ -526,13 +526,14 @@ Phaser.Tween.prototype = { if (this._parent) { self = this._manager.create(this._object); - self._parent = this._parent; - this.chain(self); + this._lastChild.chain(self); + this._lastChild = self; } else { self = this; - self._parent = self; + this._parent = this; + this._lastChild = this; } self._repeat = repeat; @@ -552,9 +553,9 @@ Phaser.Tween.prototype = { self._yoyo = yoyo; if (autoStart) { - return self.start(); + return this.start(); } else { - return self; + return this; } }, @@ -722,11 +723,11 @@ Phaser.Tween.prototype = { * .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) * .loop(); * @method Phaser.Tween#loop - * @return {Tween} Itself. + * @return {Phaser.Tween} Itself. */ loop: function() { - if (this._parent) this.chain(this._parent); + this._lastChild.chain(this); return this; }, @@ -780,6 +781,7 @@ Phaser.Tween.prototype = { */ pause: function () { this._paused = true; + this._pausedTime = this.game.time.now; }, /** @@ -789,7 +791,7 @@ Phaser.Tween.prototype = { */ resume: function () { this._paused = false; - this._startTime += this.game.time.pauseDuration; + this._startTime += (this.game.time.now - this._pausedTime); }, /** @@ -949,7 +951,7 @@ Phaser.Tween.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/TweenManager.js.html b/docs/TweenManager.js.html similarity index 99% rename from docs2/out/TweenManager.js.html rename to docs/TweenManager.js.html index ee805c09..fd001a9f 100644 --- a/docs2/out/TweenManager.js.html +++ b/docs/TweenManager.js.html @@ -528,7 +528,7 @@ Phaser.TweenManager.prototype = { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/Utils.js.html b/docs/Utils.js.html similarity index 96% rename from docs2/out/Utils.js.html rename to docs/Utils.js.html index 29698418..64a886ee 100644 --- a/docs2/out/Utils.js.html +++ b/docs/Utils.js.html @@ -333,6 +333,20 @@ */ Phaser.Utils = { + shuffle: function (array) { + + for (var i = array.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = array[i]; + array[i] = array[j]; + array[j] = temp; + } + + return array; + + }, + /** * Javascript string pad http://www.webtoolkit.info/. * pad = the string to pad it out with (defaults to a space)<br> @@ -419,6 +433,8 @@ Phaser.Utils = { /** * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ * @method Phaser.Utils.extend + * @param {boolean} deep - Perform a deep copy? + * @param {object} target - The target object to copy to. * @return {object} The extended object. */ extend: function () { @@ -553,7 +569,7 @@ if (typeof Function.prototype.bind != 'function') { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/World.js.html b/docs/World.js.html similarity index 70% rename from docs2/out/World.js.html rename to docs/World.js.html index a3a6d123..8e0f1301 100644 --- a/docs2/out/World.js.html +++ b/docs/World.js.html @@ -328,24 +328,30 @@ */ /** - * "This world is but a canvas to our imagination." - Henry David Thoreau - * <p> - * A game has only one world. The world is an abstract place in which all game objects live. It is not bound - * by stage limits and can be any size. You look into the world via cameras. All game objects live within - * the world at world-based coordinates. By default a world is created the same size as your Stage. - * - * @class Phaser.World - * @constructor - * @param {Phaser.Game} game - Reference to the current game instance. - */ +* "This world is but a canvas to our imagination." - Henry David Thoreau +* +* A game has only one world. The world is an abstract place in which all game objects live. It is not bound +* by stage limits and can be any size. You look into the world via cameras. All game objects live within +* the world at world-based coordinates. By default a world is created the same size as your Stage. +* +* @class Phaser.World +* @constructor +* @param {Phaser.Game} game - Reference to the current game instance. +*/ Phaser.World = function (game) { - /** - * @property {Phaser.Game} game - A reference to the currently running Game. - */ - this.game = game; + Phaser.Group.call(this, game, null, '__world', false); /** + * @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one. + */ + this.scale = new Phaser.Point(1, 1); + + /** + * The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being "in world" and you should use this to clean-up the display list and purge dead objects. + * By default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display. + * However 0,0 is actually the center of the world, and if you rotate or scale the world all of that will happen from 0,0. + * So if you want to make a game in which the world itself will rotate you should adjust the bounds so that 0,0 is the center point, i.e. set them to -1000,-1000,2000,2000 for a 2000x2000 sized world centered around 0,0. * @property {Phaser.Rectangle} bounds - Bound of this world that objects can not escape from. */ this.bounds = new Phaser.Rectangle(0, 0, game.width, game.height); @@ -360,125 +366,119 @@ Phaser.World = function (game) { */ this.currentRenderOrderID = 0; - /** - * @property {Phaser.Group} group - Object container stores every object created with `create*` methods. - */ - this.group = null; - }; -Phaser.World.prototype = { +Phaser.World.prototype = Object.create(Phaser.Group.prototype); +Phaser.World.prototype.constructor = Phaser.World; - /** - * Initialises the game world. - * - * @method Phaser.World#boot - * @protected - */ - boot: function () { +/** +* Initialises the game world. +* +* @method Phaser.World#boot +* @protected +*/ +Phaser.World.prototype.boot = function () { - this.camera = new Phaser.Camera(this.game, 0, 0, 0, this.game.width, this.game.height); + this.camera = new Phaser.Camera(this.game, 0, 0, 0, this.game.width, this.game.height); - this.game.camera = this.camera; + this.camera.displayObject = this._container; - this.group = new Phaser.Group(this.game, null, '__world', true); + this.game.camera = this.camera; - }, +} - /** - * This is called automatically every frame, and is where main logic happens. - * - * @method Phaser.World#update - */ - update: function () { +/** +* This is called automatically every frame, and is where main logic happens. +* +* @method Phaser.World#update +*/ +Phaser.World.prototype.update = function () { - this.camera.update(); + this.currentRenderOrderID = 0; - this.currentRenderOrderID = 0; - - if (this.game.stage._stage.first._iNext) + if (this.game.stage._stage.first._iNext) + { + var currentNode = this.game.stage._stage.first._iNext; + + do { - var currentNode = this.game.stage._stage.first._iNext; - - do + if (currentNode['preUpdate']) { - if (currentNode['preUpdate']) - { - currentNode.preUpdate(); - } - - if (currentNode['update']) - { - currentNode.update(); - } - - currentNode = currentNode._iNext; + currentNode.preUpdate(); } - while (currentNode != this.game.stage._stage.last._iNext) + + if (currentNode['update']) + { + currentNode.update(); + } + + currentNode = currentNode._iNext; } + while (currentNode != this.game.stage._stage.last._iNext) + } - }, +} - /** - * This is called automatically every frame, and is where main logic happens. - * @method Phaser.World#postUpdate - */ - postUpdate: function () { +/** +* This is called automatically every frame, and is where main logic happens. +* @method Phaser.World#postUpdate +*/ +Phaser.World.prototype.postUpdate = function () { - if (this.game.stage._stage.first._iNext) + this.camera.update(); + + if (this.game.stage._stage.first._iNext) + { + var currentNode = this.game.stage._stage.first._iNext; + + do { - var currentNode = this.game.stage._stage.first._iNext; - - do + if (currentNode['postUpdate']) { - if (currentNode['postUpdate']) - { - currentNode.postUpdate(); - } - - currentNode = currentNode._iNext; + currentNode.postUpdate(); } - while (currentNode != this.game.stage._stage.last._iNext) + + currentNode = currentNode._iNext; } - - }, - - /** - * Updates the size of this world. - * @method Phaser.World#setSize - * @param {number} width - New width of the world. - * @param {number} height - New height of the world. - */ - setSize: function (width, height) { - - if (width >= this.game.width) - { - this.bounds.width = width; - } - - if (height >= this.game.height) - { - this.bounds.height = height; - } - - }, - - /** - * Destroyer of worlds. - * @method Phaser.World#destroy - */ - destroy: function () { - - this.camera.x = 0; - this.camera.y = 0; - - this.game.input.reset(true); - - this.group.removeAll(); - + while (currentNode != this.game.stage._stage.last._iNext) } - -}; + +} + +/** +* Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height. +* If you need to adjust the bounds of the world +* @method Phaser.World#setBounds +* @param {number} x - Top left most corner of the world. +* @param {number} y - Top left most corner of the world. +* @param {number} width - New width of the world. +* @param {number} height - New height of the world. +*/ +Phaser.World.prototype.setBounds = function (x, y, width, height) { + + this.bounds.setTo(x, y, width, height); + + if (this.camera.bounds) + { + this.camera.bounds.setTo(x, y, width, height); + } + +} + +/** +* Destroyer of worlds. +* @method Phaser.World#destroy +*/ +Phaser.World.prototype.destroy = function () { + + this.camera.x = 0; + this.camera.y = 0; + + this.game.input.reset(true); + + this.removeAll(); + +} /** * @name Phaser.World#width @@ -546,7 +546,16 @@ Object.defineProperty(Phaser.World.prototype, "centerY", { Object.defineProperty(Phaser.World.prototype, "randomX", { get: function () { - return Math.round(Math.random() * this.bounds.width); + + if (this.bounds.x < 0) + { + return this.game.rnd.integerInRange(this.bounds.x, (this.bounds.width - Math.abs(this.bounds.x))); + } + else + { + return this.game.rnd.integerInRange(this.bounds.x, this.bounds.width); + } + } }); @@ -559,7 +568,16 @@ Object.defineProperty(Phaser.World.prototype, "randomX", { Object.defineProperty(Phaser.World.prototype, "randomY", { get: function () { - return Math.round(Math.random() * this.bounds.height); + + if (this.bounds.y < 0) + { + return this.game.rnd.integerInRange(this.bounds.y, (this.bounds.height - Math.abs(this.bounds.y))); + } + else + { + return this.game.rnd.integerInRange(this.bounds.y, this.bounds.height); + } + } }); @@ -584,7 +602,7 @@ Object.defineProperty(Phaser.World.prototype, "randomY", { Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/build/build dev.bat b/docs/build/build dev.bat new file mode 100644 index 00000000..144602f1 --- /dev/null +++ b/docs/build/build dev.bat @@ -0,0 +1 @@ +jsdoc -c conf_dev.json \ No newline at end of file diff --git a/docs/build/build master.bat b/docs/build/build master.bat new file mode 100644 index 00000000..25b9d2c4 --- /dev/null +++ b/docs/build/build master.bat @@ -0,0 +1 @@ +jsdoc -c conf.json \ No newline at end of file diff --git a/docs/build/conf.json b/docs/build/conf.json new file mode 100644 index 00000000..6bd6894c --- /dev/null +++ b/docs/build/conf.json @@ -0,0 +1,58 @@ +{ + "tags": { + "allowUnknownTags": true + }, + "source": { + "include": [ + "../../src/Phaser.js", + "../../src/Intro.js", + "../../src/animation/", + "../../src/core/", + "../../src/gameobjects/", + "../../src/geom/", + "../../src/input/", + "../../src/loader/", + "../../src/math/", + "../../src/net/", + "../../src/particles/", + "../../src/physics/", + "../../src/sound/", + "../../src/system/", + "../../src/tilemap/", + "../../src/time/", + "../../src/tween/", + "../../src/utils/" + ], + "exclude": [], + "includePattern": ".+\\.js(doc)?$", + "excludePattern": "(^|\\/|\\\\)_" + }, + "plugins" : ["plugins/markdown"], + "templates": { + "cleverLinks" : false, + "monospaceLinks" : false, + "default" : { + "outputSourceFiles" : true + }, + "systemName" : "Phaser", + "footer" : "", + "copyright" : "Phaser Copyright © 2012-2013 Photon Storm Ltd.", + "navType" : "vertical", + "theme" : "cerulean", + "linenums" : true, + "collapseSymbols" : false, + "inverseNav" : true + }, + "markdown" : { + "parser" : "gfm", + "hardwrap" : true + }, + "opts": { + "template": "docstrap-master/template/", + "encoding": "utf8", + "destination": "../", + "recurse": true, + "private": false, + "lenient": true + } +} \ No newline at end of file diff --git a/docs2/conf.json b/docs/build/conf_dev.json similarity index 63% rename from docs2/conf.json rename to docs/build/conf_dev.json index 92674fb8..2a8fc1b4 100644 --- a/docs2/conf.json +++ b/docs/build/conf_dev.json @@ -3,7 +3,23 @@ "allowUnknownTags": true }, "source": { - "include": [ "../src/Phaser.js", "../src/Intro.js", "../src/animation/", "../src/core/", "../src/geom/", "../src/input/", "../src/loader/", "../src/math/", "../src/net/", "../src/particles/", "../src/sound/", "../src/system/", "../src/time/", "../src/tween/", "../src/utils/" ], + "include": [ + "../../src/Phaser.js", + "../../src/Intro.js", + "../../src/animation/", + "../../src/core/", + "../../src/geom/", + "../../src/input/", + "../../src/loader/", + "../../src/math/", + "../../src/net/", + "../../src/particles/", + "../../src/sound/", + "../../src/system/", + "../../src/time/", + "../../src/tween/", + "../../src/utils/" + ], "exclude": [], "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" @@ -31,7 +47,7 @@ "opts": { "template": "docstrap-master/template/", "encoding": "utf8", - "destination": "./out/", + "destination": "../", "recurse": true, "private": false, "lenient": true diff --git a/docs2/docstrap-master/.gitignore b/docs/build/docstrap-master/.gitignore similarity index 100% rename from docs2/docstrap-master/.gitignore rename to docs/build/docstrap-master/.gitignore diff --git a/docs2/docstrap-master/.npmignore b/docs/build/docstrap-master/.npmignore similarity index 100% rename from docs2/docstrap-master/.npmignore rename to docs/build/docstrap-master/.npmignore diff --git a/docs2/docstrap-master/Gruntfile.js b/docs/build/docstrap-master/Gruntfile.js similarity index 100% rename from docs2/docstrap-master/Gruntfile.js rename to docs/build/docstrap-master/Gruntfile.js diff --git a/docs2/docstrap-master/LICENSE.md b/docs/build/docstrap-master/LICENSE.md similarity index 100% rename from docs2/docstrap-master/LICENSE.md rename to docs/build/docstrap-master/LICENSE.md diff --git a/docs2/docstrap-master/README.md b/docs/build/docstrap-master/README.md similarity index 100% rename from docs2/docstrap-master/README.md rename to docs/build/docstrap-master/README.md diff --git a/docs2/docstrap-master/bower.json b/docs/build/docstrap-master/bower.json similarity index 100% rename from docs2/docstrap-master/bower.json rename to docs/build/docstrap-master/bower.json diff --git a/docs2/docstrap-master/component.json b/docs/build/docstrap-master/component.json similarity index 100% rename from docs2/docstrap-master/component.json rename to docs/build/docstrap-master/component.json diff --git a/docs2/docstrap-master/fixtures/car.js b/docs/build/docstrap-master/fixtures/car.js similarity index 100% rename from docs2/docstrap-master/fixtures/car.js rename to docs/build/docstrap-master/fixtures/car.js diff --git a/docs2/docstrap-master/fixtures/example.conf.json b/docs/build/docstrap-master/fixtures/example.conf.json similarity index 100% rename from docs2/docstrap-master/fixtures/example.conf.json rename to docs/build/docstrap-master/fixtures/example.conf.json diff --git a/docs2/docstrap-master/fixtures/other.js b/docs/build/docstrap-master/fixtures/other.js similarity index 100% rename from docs2/docstrap-master/fixtures/other.js rename to docs/build/docstrap-master/fixtures/other.js diff --git a/docs2/docstrap-master/fixtures/person.js b/docs/build/docstrap-master/fixtures/person.js similarity index 100% rename from docs2/docstrap-master/fixtures/person.js rename to docs/build/docstrap-master/fixtures/person.js diff --git a/docs2/docstrap-master/fixtures/tutorials/Brush Teeth.md b/docs/build/docstrap-master/fixtures/tutorials/Brush Teeth.md similarity index 100% rename from docs2/docstrap-master/fixtures/tutorials/Brush Teeth.md rename to docs/build/docstrap-master/fixtures/tutorials/Brush Teeth.md diff --git a/docs2/docstrap-master/fixtures/tutorials/Drive Car.md b/docs/build/docstrap-master/fixtures/tutorials/Drive Car.md similarity index 100% rename from docs2/docstrap-master/fixtures/tutorials/Drive Car.md rename to docs/build/docstrap-master/fixtures/tutorials/Drive Car.md diff --git a/docs2/docstrap-master/package.json b/docs/build/docstrap-master/package.json similarity index 100% rename from docs2/docstrap-master/package.json rename to docs/build/docstrap-master/package.json diff --git a/docs2/docstrap-master/styles/bootswatch.less b/docs/build/docstrap-master/styles/bootswatch.less similarity index 100% rename from docs2/docstrap-master/styles/bootswatch.less rename to docs/build/docstrap-master/styles/bootswatch.less diff --git a/docs2/docstrap-master/styles/main.less b/docs/build/docstrap-master/styles/main.less similarity index 100% rename from docs2/docstrap-master/styles/main.less rename to docs/build/docstrap-master/styles/main.less diff --git a/docs2/docstrap-master/styles/variables.less b/docs/build/docstrap-master/styles/variables.less similarity index 100% rename from docs2/docstrap-master/styles/variables.less rename to docs/build/docstrap-master/styles/variables.less diff --git a/docs2/docstrap-master/template/jsdoc.conf.json b/docs/build/docstrap-master/template/jsdoc.conf.json similarity index 100% rename from docs2/docstrap-master/template/jsdoc.conf.json rename to docs/build/docstrap-master/template/jsdoc.conf.json diff --git a/docs2/docstrap-master/template/publish.js b/docs/build/docstrap-master/template/publish.js similarity index 100% rename from docs2/docstrap-master/template/publish.js rename to docs/build/docstrap-master/template/publish.js diff --git a/docs2/docstrap-master/template/static/img/glyphicons-halflings-white.png b/docs/build/docstrap-master/template/static/img/glyphicons-halflings-white.png similarity index 100% rename from docs2/docstrap-master/template/static/img/glyphicons-halflings-white.png rename to docs/build/docstrap-master/template/static/img/glyphicons-halflings-white.png diff --git a/docs2/docstrap-master/template/static/img/glyphicons-halflings.png b/docs/build/docstrap-master/template/static/img/glyphicons-halflings.png similarity index 100% rename from docs2/docstrap-master/template/static/img/glyphicons-halflings.png rename to docs/build/docstrap-master/template/static/img/glyphicons-halflings.png diff --git a/docs2/docstrap-master/template/static/scripts/URI.js b/docs/build/docstrap-master/template/static/scripts/URI.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/URI.js rename to docs/build/docstrap-master/template/static/scripts/URI.js diff --git a/docs2/docstrap-master/template/static/scripts/bootstrap-dropdown.js b/docs/build/docstrap-master/template/static/scripts/bootstrap-dropdown.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/bootstrap-dropdown.js rename to docs/build/docstrap-master/template/static/scripts/bootstrap-dropdown.js diff --git a/docs2/docstrap-master/template/static/scripts/bootstrap-tab.js b/docs/build/docstrap-master/template/static/scripts/bootstrap-tab.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/bootstrap-tab.js rename to docs/build/docstrap-master/template/static/scripts/bootstrap-tab.js diff --git a/docs2/docstrap-master/template/static/scripts/jquery.localScroll.js b/docs/build/docstrap-master/template/static/scripts/jquery.localScroll.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/jquery.localScroll.js rename to docs/build/docstrap-master/template/static/scripts/jquery.localScroll.js diff --git a/docs2/docstrap-master/template/static/scripts/jquery.min.js b/docs/build/docstrap-master/template/static/scripts/jquery.min.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/jquery.min.js rename to docs/build/docstrap-master/template/static/scripts/jquery.min.js diff --git a/docs2/docstrap-master/template/static/scripts/jquery.scrollTo.js b/docs/build/docstrap-master/template/static/scripts/jquery.scrollTo.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/jquery.scrollTo.js rename to docs/build/docstrap-master/template/static/scripts/jquery.scrollTo.js diff --git a/docs2/docstrap-master/template/static/scripts/jquery.sunlight.js b/docs/build/docstrap-master/template/static/scripts/jquery.sunlight.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/jquery.sunlight.js rename to docs/build/docstrap-master/template/static/scripts/jquery.sunlight.js diff --git a/docs2/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt b/docs/build/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt similarity index 100% rename from docs2/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt rename to docs/build/docstrap-master/template/static/scripts/prettify/Apache-License-2.0.txt diff --git a/docs2/docstrap-master/template/static/scripts/prettify/jquery.min.js b/docs/build/docstrap-master/template/static/scripts/prettify/jquery.min.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/prettify/jquery.min.js rename to docs/build/docstrap-master/template/static/scripts/prettify/jquery.min.js diff --git a/docs2/docstrap-master/template/static/scripts/prettify/lang-css.js b/docs/build/docstrap-master/template/static/scripts/prettify/lang-css.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/prettify/lang-css.js rename to docs/build/docstrap-master/template/static/scripts/prettify/lang-css.js diff --git a/docs2/docstrap-master/template/static/scripts/prettify/prettify.js b/docs/build/docstrap-master/template/static/scripts/prettify/prettify.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/prettify/prettify.js rename to docs/build/docstrap-master/template/static/scripts/prettify/prettify.js diff --git a/docs2/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js b/docs/build/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js rename to docs/build/docstrap-master/template/static/scripts/sunlight-plugin.doclinks.js diff --git a/docs2/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js b/docs/build/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js rename to docs/build/docstrap-master/template/static/scripts/sunlight-plugin.linenumbers.js diff --git a/docs2/docstrap-master/template/static/scripts/sunlight-plugin.menu.js b/docs/build/docstrap-master/template/static/scripts/sunlight-plugin.menu.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/sunlight-plugin.menu.js rename to docs/build/docstrap-master/template/static/scripts/sunlight-plugin.menu.js diff --git a/docs2/docstrap-master/template/static/scripts/sunlight.javascript.js b/docs/build/docstrap-master/template/static/scripts/sunlight.javascript.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/sunlight.javascript.js rename to docs/build/docstrap-master/template/static/scripts/sunlight.javascript.js diff --git a/docs2/docstrap-master/template/static/scripts/sunlight.js b/docs/build/docstrap-master/template/static/scripts/sunlight.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/sunlight.js rename to docs/build/docstrap-master/template/static/scripts/sunlight.js diff --git a/docs2/docstrap-master/template/static/scripts/toc.js b/docs/build/docstrap-master/template/static/scripts/toc.js similarity index 100% rename from docs2/docstrap-master/template/static/scripts/toc.js rename to docs/build/docstrap-master/template/static/scripts/toc.js diff --git a/docs2/docstrap-master/template/static/styles/darkstrap.css b/docs/build/docstrap-master/template/static/styles/darkstrap.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/darkstrap.css rename to docs/build/docstrap-master/template/static/styles/darkstrap.css diff --git a/docs2/docstrap-master/template/static/styles/prettify-tomorrow.css b/docs/build/docstrap-master/template/static/styles/prettify-tomorrow.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/prettify-tomorrow.css rename to docs/build/docstrap-master/template/static/styles/prettify-tomorrow.css diff --git a/docs2/docstrap-master/template/static/styles/site.amelia.css b/docs/build/docstrap-master/template/static/styles/site.amelia.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.amelia.css rename to docs/build/docstrap-master/template/static/styles/site.amelia.css diff --git a/docs2/docstrap-master/template/static/styles/site.cerulean.css b/docs/build/docstrap-master/template/static/styles/site.cerulean.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.cerulean.css rename to docs/build/docstrap-master/template/static/styles/site.cerulean.css diff --git a/docs2/docstrap-master/template/static/styles/site.cosmo.css b/docs/build/docstrap-master/template/static/styles/site.cosmo.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.cosmo.css rename to docs/build/docstrap-master/template/static/styles/site.cosmo.css diff --git a/docs2/docstrap-master/template/static/styles/site.cyborg.css b/docs/build/docstrap-master/template/static/styles/site.cyborg.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.cyborg.css rename to docs/build/docstrap-master/template/static/styles/site.cyborg.css diff --git a/docs2/docstrap-master/template/static/styles/site.darkstrap.css b/docs/build/docstrap-master/template/static/styles/site.darkstrap.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.darkstrap.css rename to docs/build/docstrap-master/template/static/styles/site.darkstrap.css diff --git a/docs2/docstrap-master/template/static/styles/site.flatly.css b/docs/build/docstrap-master/template/static/styles/site.flatly.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.flatly.css rename to docs/build/docstrap-master/template/static/styles/site.flatly.css diff --git a/docs2/docstrap-master/template/static/styles/site.journal.css b/docs/build/docstrap-master/template/static/styles/site.journal.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.journal.css rename to docs/build/docstrap-master/template/static/styles/site.journal.css diff --git a/docs2/docstrap-master/template/static/styles/site.readable.css b/docs/build/docstrap-master/template/static/styles/site.readable.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.readable.css rename to docs/build/docstrap-master/template/static/styles/site.readable.css diff --git a/docs2/docstrap-master/template/static/styles/site.simplex.css b/docs/build/docstrap-master/template/static/styles/site.simplex.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.simplex.css rename to docs/build/docstrap-master/template/static/styles/site.simplex.css diff --git a/docs2/docstrap-master/template/static/styles/site.slate.css b/docs/build/docstrap-master/template/static/styles/site.slate.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.slate.css rename to docs/build/docstrap-master/template/static/styles/site.slate.css diff --git a/docs2/docstrap-master/template/static/styles/site.spacelab.css b/docs/build/docstrap-master/template/static/styles/site.spacelab.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.spacelab.css rename to docs/build/docstrap-master/template/static/styles/site.spacelab.css diff --git a/docs2/docstrap-master/template/static/styles/site.spruce.css b/docs/build/docstrap-master/template/static/styles/site.spruce.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.spruce.css rename to docs/build/docstrap-master/template/static/styles/site.spruce.css diff --git a/docs2/docstrap-master/template/static/styles/site.superhero.css b/docs/build/docstrap-master/template/static/styles/site.superhero.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.superhero.css rename to docs/build/docstrap-master/template/static/styles/site.superhero.css diff --git a/docs2/docstrap-master/template/static/styles/site.united.css b/docs/build/docstrap-master/template/static/styles/site.united.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/site.united.css rename to docs/build/docstrap-master/template/static/styles/site.united.css diff --git a/docs2/docstrap-master/template/static/styles/sunlight.dark.css b/docs/build/docstrap-master/template/static/styles/sunlight.dark.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/sunlight.dark.css rename to docs/build/docstrap-master/template/static/styles/sunlight.dark.css diff --git a/docs2/docstrap-master/template/static/styles/sunlight.default.css b/docs/build/docstrap-master/template/static/styles/sunlight.default.css similarity index 100% rename from docs2/docstrap-master/template/static/styles/sunlight.default.css rename to docs/build/docstrap-master/template/static/styles/sunlight.default.css diff --git a/docs2/docstrap-master/template/tmpl/container.tmpl b/docs/build/docstrap-master/template/tmpl/container.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/container.tmpl rename to docs/build/docstrap-master/template/tmpl/container.tmpl diff --git a/docs2/docstrap-master/template/tmpl/details.tmpl b/docs/build/docstrap-master/template/tmpl/details.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/details.tmpl rename to docs/build/docstrap-master/template/tmpl/details.tmpl diff --git a/docs2/docstrap-master/template/tmpl/example.tmpl b/docs/build/docstrap-master/template/tmpl/example.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/example.tmpl rename to docs/build/docstrap-master/template/tmpl/example.tmpl diff --git a/docs2/docstrap-master/template/tmpl/examples.tmpl b/docs/build/docstrap-master/template/tmpl/examples.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/examples.tmpl rename to docs/build/docstrap-master/template/tmpl/examples.tmpl diff --git a/docs2/docstrap-master/template/tmpl/exceptions.tmpl b/docs/build/docstrap-master/template/tmpl/exceptions.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/exceptions.tmpl rename to docs/build/docstrap-master/template/tmpl/exceptions.tmpl diff --git a/docs2/docstrap-master/template/tmpl/fires.tmpl b/docs/build/docstrap-master/template/tmpl/fires.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/fires.tmpl rename to docs/build/docstrap-master/template/tmpl/fires.tmpl diff --git a/docs2/docstrap-master/template/tmpl/layout.tmpl b/docs/build/docstrap-master/template/tmpl/layout.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/layout.tmpl rename to docs/build/docstrap-master/template/tmpl/layout.tmpl diff --git a/docs2/docstrap-master/template/tmpl/mainpage.tmpl b/docs/build/docstrap-master/template/tmpl/mainpage.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/mainpage.tmpl rename to docs/build/docstrap-master/template/tmpl/mainpage.tmpl diff --git a/docs2/docstrap-master/template/tmpl/members.tmpl b/docs/build/docstrap-master/template/tmpl/members.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/members.tmpl rename to docs/build/docstrap-master/template/tmpl/members.tmpl diff --git a/docs2/docstrap-master/template/tmpl/method.tmpl b/docs/build/docstrap-master/template/tmpl/method.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/method.tmpl rename to docs/build/docstrap-master/template/tmpl/method.tmpl diff --git a/docs2/docstrap-master/template/tmpl/params.tmpl b/docs/build/docstrap-master/template/tmpl/params.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/params.tmpl rename to docs/build/docstrap-master/template/tmpl/params.tmpl diff --git a/docs2/docstrap-master/template/tmpl/properties.tmpl b/docs/build/docstrap-master/template/tmpl/properties.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/properties.tmpl rename to docs/build/docstrap-master/template/tmpl/properties.tmpl diff --git a/docs2/docstrap-master/template/tmpl/returns.tmpl b/docs/build/docstrap-master/template/tmpl/returns.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/returns.tmpl rename to docs/build/docstrap-master/template/tmpl/returns.tmpl diff --git a/docs2/docstrap-master/template/tmpl/sections.tmpl b/docs/build/docstrap-master/template/tmpl/sections.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/sections.tmpl rename to docs/build/docstrap-master/template/tmpl/sections.tmpl diff --git a/docs2/docstrap-master/template/tmpl/source.tmpl b/docs/build/docstrap-master/template/tmpl/source.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/source.tmpl rename to docs/build/docstrap-master/template/tmpl/source.tmpl diff --git a/docs2/docstrap-master/template/tmpl/tutorial.tmpl b/docs/build/docstrap-master/template/tmpl/tutorial.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/tutorial.tmpl rename to docs/build/docstrap-master/template/tmpl/tutorial.tmpl diff --git a/docs2/docstrap-master/template/tmpl/type.tmpl b/docs/build/docstrap-master/template/tmpl/type.tmpl similarity index 100% rename from docs2/docstrap-master/template/tmpl/type.tmpl rename to docs/build/docstrap-master/template/tmpl/type.tmpl diff --git a/docs2/out/classes.list.html b/docs/classes.list.html similarity index 99% rename from docs2/out/classes.list.html rename to docs/classes.list.html index 5dee7711..2d5f8a17 100644 --- a/docs2/out/classes.list.html +++ b/docs/classes.list.html @@ -599,7 +599,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/global.html b/docs/global.html similarity index 98% rename from docs2/out/global.html rename to docs/global.html index 1841e238..10ffb391 100644 --- a/docs2/out/global.html +++ b/docs/global.html @@ -476,7 +476,7 @@
    Source:
    @@ -546,7 +546,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/img/glyphicons-halflings-white.png b/docs/img/glyphicons-halflings-white.png similarity index 100% rename from docs2/out/img/glyphicons-halflings-white.png rename to docs/img/glyphicons-halflings-white.png diff --git a/docs2/out/img/glyphicons-halflings.png b/docs/img/glyphicons-halflings.png similarity index 100% rename from docs2/out/img/glyphicons-halflings.png rename to docs/img/glyphicons-halflings.png diff --git a/docs2/out/index.html b/docs/index.html similarity index 99% rename from docs2/out/index.html rename to docs/index.html index 53a62a9e..a0ec9616 100644 --- a/docs2/out/index.html +++ b/docs/index.html @@ -453,7 +453,7 @@ and my love of game development originate.

    Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/namespaces.list.html b/docs/namespaces.list.html similarity index 99% rename from docs2/out/namespaces.list.html rename to docs/namespaces.list.html index 47164408..7bdb5b06 100644 --- a/docs2/out/namespaces.list.html +++ b/docs/namespaces.list.html @@ -599,7 +599,7 @@ Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:35:44 GMT+0100 (BST) using the DocStrap template. + on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. diff --git a/docs2/out/scripts/URI.js b/docs/scripts/URI.js similarity index 100% rename from docs2/out/scripts/URI.js rename to docs/scripts/URI.js diff --git a/docs2/out/scripts/bootstrap-dropdown.js b/docs/scripts/bootstrap-dropdown.js similarity index 100% rename from docs2/out/scripts/bootstrap-dropdown.js rename to docs/scripts/bootstrap-dropdown.js diff --git a/docs2/out/scripts/bootstrap-tab.js b/docs/scripts/bootstrap-tab.js similarity index 100% rename from docs2/out/scripts/bootstrap-tab.js rename to docs/scripts/bootstrap-tab.js diff --git a/docs2/out/scripts/jquery.localScroll.js b/docs/scripts/jquery.localScroll.js similarity index 100% rename from docs2/out/scripts/jquery.localScroll.js rename to docs/scripts/jquery.localScroll.js diff --git a/docs2/out/scripts/jquery.min.js b/docs/scripts/jquery.min.js similarity index 100% rename from docs2/out/scripts/jquery.min.js rename to docs/scripts/jquery.min.js diff --git a/docs2/out/scripts/jquery.scrollTo.js b/docs/scripts/jquery.scrollTo.js similarity index 100% rename from docs2/out/scripts/jquery.scrollTo.js rename to docs/scripts/jquery.scrollTo.js diff --git a/docs2/out/scripts/jquery.sunlight.js b/docs/scripts/jquery.sunlight.js similarity index 100% rename from docs2/out/scripts/jquery.sunlight.js rename to docs/scripts/jquery.sunlight.js diff --git a/docs2/out/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt similarity index 100% rename from docs2/out/scripts/prettify/Apache-License-2.0.txt rename to docs/scripts/prettify/Apache-License-2.0.txt diff --git a/docs2/out/scripts/prettify/jquery.min.js b/docs/scripts/prettify/jquery.min.js similarity index 100% rename from docs2/out/scripts/prettify/jquery.min.js rename to docs/scripts/prettify/jquery.min.js diff --git a/docs2/out/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js similarity index 100% rename from docs2/out/scripts/prettify/lang-css.js rename to docs/scripts/prettify/lang-css.js diff --git a/docs2/out/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js similarity index 100% rename from docs2/out/scripts/prettify/prettify.js rename to docs/scripts/prettify/prettify.js diff --git a/docs2/out/scripts/sunlight-plugin.doclinks.js b/docs/scripts/sunlight-plugin.doclinks.js similarity index 100% rename from docs2/out/scripts/sunlight-plugin.doclinks.js rename to docs/scripts/sunlight-plugin.doclinks.js diff --git a/docs2/out/scripts/sunlight-plugin.linenumbers.js b/docs/scripts/sunlight-plugin.linenumbers.js similarity index 100% rename from docs2/out/scripts/sunlight-plugin.linenumbers.js rename to docs/scripts/sunlight-plugin.linenumbers.js diff --git a/docs2/out/scripts/sunlight-plugin.menu.js b/docs/scripts/sunlight-plugin.menu.js similarity index 100% rename from docs2/out/scripts/sunlight-plugin.menu.js rename to docs/scripts/sunlight-plugin.menu.js diff --git a/docs2/out/scripts/sunlight.javascript.js b/docs/scripts/sunlight.javascript.js similarity index 100% rename from docs2/out/scripts/sunlight.javascript.js rename to docs/scripts/sunlight.javascript.js diff --git a/docs2/out/scripts/sunlight.js b/docs/scripts/sunlight.js similarity index 100% rename from docs2/out/scripts/sunlight.js rename to docs/scripts/sunlight.js diff --git a/docs2/out/scripts/toc.js b/docs/scripts/toc.js similarity index 100% rename from docs2/out/scripts/toc.js rename to docs/scripts/toc.js diff --git a/docs2/out/styles/darkstrap.css b/docs/styles/darkstrap.css similarity index 100% rename from docs2/out/styles/darkstrap.css rename to docs/styles/darkstrap.css diff --git a/docs2/out/styles/prettify-tomorrow.css b/docs/styles/prettify-tomorrow.css similarity index 100% rename from docs2/out/styles/prettify-tomorrow.css rename to docs/styles/prettify-tomorrow.css diff --git a/docs2/out/styles/site.amelia.css b/docs/styles/site.amelia.css similarity index 100% rename from docs2/out/styles/site.amelia.css rename to docs/styles/site.amelia.css diff --git a/docs2/out/styles/site.cerulean.css b/docs/styles/site.cerulean.css similarity index 100% rename from docs2/out/styles/site.cerulean.css rename to docs/styles/site.cerulean.css diff --git a/docs2/out/styles/site.cosmo.css b/docs/styles/site.cosmo.css similarity index 100% rename from docs2/out/styles/site.cosmo.css rename to docs/styles/site.cosmo.css diff --git a/docs2/out/styles/site.cyborg.css b/docs/styles/site.cyborg.css similarity index 100% rename from docs2/out/styles/site.cyborg.css rename to docs/styles/site.cyborg.css diff --git a/docs2/out/styles/site.darkstrap.css b/docs/styles/site.darkstrap.css similarity index 100% rename from docs2/out/styles/site.darkstrap.css rename to docs/styles/site.darkstrap.css diff --git a/docs2/out/styles/site.flatly.css b/docs/styles/site.flatly.css similarity index 100% rename from docs2/out/styles/site.flatly.css rename to docs/styles/site.flatly.css diff --git a/docs2/out/styles/site.journal.css b/docs/styles/site.journal.css similarity index 100% rename from docs2/out/styles/site.journal.css rename to docs/styles/site.journal.css diff --git a/docs2/out/styles/site.readable.css b/docs/styles/site.readable.css similarity index 100% rename from docs2/out/styles/site.readable.css rename to docs/styles/site.readable.css diff --git a/docs2/out/styles/site.simplex.css b/docs/styles/site.simplex.css similarity index 100% rename from docs2/out/styles/site.simplex.css rename to docs/styles/site.simplex.css diff --git a/docs2/out/styles/site.slate.css b/docs/styles/site.slate.css similarity index 100% rename from docs2/out/styles/site.slate.css rename to docs/styles/site.slate.css diff --git a/docs2/out/styles/site.spacelab.css b/docs/styles/site.spacelab.css similarity index 100% rename from docs2/out/styles/site.spacelab.css rename to docs/styles/site.spacelab.css diff --git a/docs2/out/styles/site.spruce.css b/docs/styles/site.spruce.css similarity index 100% rename from docs2/out/styles/site.spruce.css rename to docs/styles/site.spruce.css diff --git a/docs2/out/styles/site.superhero.css b/docs/styles/site.superhero.css similarity index 100% rename from docs2/out/styles/site.superhero.css rename to docs/styles/site.superhero.css diff --git a/docs2/out/styles/site.united.css b/docs/styles/site.united.css similarity index 100% rename from docs2/out/styles/site.united.css rename to docs/styles/site.united.css diff --git a/docs2/out/styles/sunlight.dark.css b/docs/styles/sunlight.dark.css similarity index 100% rename from docs2/out/styles/sunlight.dark.css rename to docs/styles/sunlight.dark.css diff --git a/docs2/out/styles/sunlight.default.css b/docs/styles/sunlight.default.css similarity index 100% rename from docs2/out/styles/sunlight.default.css rename to docs/styles/sunlight.default.css diff --git a/docs2/Documentation Checklist.xlsx b/docs2/Documentation Checklist.xlsx deleted file mode 100644 index 292dcd33ea46be15c4cd9a1269bd9b444751bd79..0000000000000000000000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3#e7J$;yoKs?yaS2Mfd2rRICZFOs%j711W>s=8`3jg3(d zNNmw44gch}J)9fcedq`XBL5q=k)or(25zn80(U|HES;RL5_tNcFkyfYDb50_MXu7` zAsEQ936w&X&&s>lwazHJP@NyE-};1FT59X|EHXWh6CllEf74aLqks$Tkz%ylTX#HB zu!+8HBts@AARdwhBi>|&K5r$qO1KtQLz}#&@*b-ARf@Xs-KTGqO{{c>E zYD>$ze4%6NtbKhlh$zRp#)(2nYmOyTKuQrcj?_wxvo&CjWN;;xCnR^oWuMs7S%JLq zbEZxvNOsZq8zwtL4%-XH8s2Y_FMGxzBeNLgA`LvJlf$7U3Uk%2M%X@&T z3FY{G<@8;Vz+w$-4_l2G9j7YqkF#p*@=~VDo=FWon>Nnq}&kR@SlzOig&7=1o@>g^y&?AiH z;f}6gM^|%QcPB8y^a>wToVw;uDdvm{R9Z0b4wLnhBOXVD&m_r( zgOXPWY^sw}kFsTVX+rzG;e5>`ebgIdd=jN~^s|vUgSw*5kww84>Z*+b69+7WBB6x2Qwlzh-Luk76zgmQN;F!japAf7+K4r&J46~Rg&;C-B3bWt zy!Ke&nf36kt)oL$M^{Mu+~Z z|1PHeInVDU{gv4C%S6!}fu868m7e~b<@b8&s{H?DYxqBB`9B{6f6nlGZoaCke%TNj zmw&C}-&NM1&c9RIRr>yAdFUqE8S$TF{-^8jWO2oLzw8aV`6mPZ>HT{!T@lJJ3r9Eq r - - - phaser - hello world - - - - - - - - \ No newline at end of file diff --git a/docs2/Hello Phaser/logo.png b/docs2/Hello Phaser/logo.png deleted file mode 100644 index a37a23af62a9a2f7ad6c0676d6b64810eba89af8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 180337 zcmbTcWmMf<*DeeccX!>mySr@M-DTtM?#11UyA^kLhvHJCxD+W~3hbgE_apCje!S!S zI2p-EvNG+Ol4Q*!Mpan`1(6UD0s;a>PF6}C0s=DVV^e^K{TNwvJURH-5qJP~Jv5xH zJiN`^EFr`#oI#f4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IeLo+}>Wcv=Y{kH1d z8KB?4p(~h|?7S%R{FVa$A;?vl*9sq~-18i43rRjGHt<_{x)UNe-O+XxgSHej_G0+EK2p&>BK7=v=7 zWe~7ZwHhhDEF*4^x0(fI&9)L~fe^IIG2seax49BIy`=KitYpqn%T~mLbUdc8sOacr zK2yo86ms+p;9HQs!0538Hd?$Cf9`z@^hK0B@JjPq!JuC(&pdUG+?rlFND!J66jQ9mB^SlWBFKC=UNYdPm`}ICc4e}ls z>u;BQ7J7WKb`JZm_b(m%XBq(6A_gFg0l)x6OWY=n5ugcU1gPBz$M# zF$Sm_R#8JRpD_p*9!KyP%Wtie%SM4OvC6zk&1K0*VTvvTz&#!DAY8)Sg9y7%wpK|l zD}29R%M*1}HOrC~%4lwl#&o=t0sEq)>9|2Q84oBZv;}Md_5}d`gocYC9H3$V9}Iu8 z8NhWGkai+JmX}gtRc^byLvu3yknIEXk6)Wm&js5*Br?zQoW}X0)bku$go7UB-MsVz z`9K4`i%C8UZhIDPlSFI|B{))CTwtb$f0L@cDX| z0sZi&s)OzK&erpX4d|bCYO4dMfc`)`)1Mdg4*}ahQe_@&|4)Dc02e>2)bf}6o&W#< M07*qoM6N<$f|g~m$p8QV diff --git a/docs2/Hello Phaser/phaser-min.js b/docs2/Hello Phaser/phaser-min.js deleted file mode 100644 index 048fae73..00000000 --- a/docs2/Hello Phaser/phaser-min.js +++ /dev/null @@ -1 +0,0 @@ -var PIXI=PIXI||{};var Phaser=Phaser||{VERSION:"1.0.0",GAMES:[],AUTO:0,CANVAS:1,WEBGL:2,SPRITE:0,BUTTON:1,BULLET:2,GRAPHICS:3,TEXT:4,TILESPRITE:5,BITMAPTEXT:6,GROUP:7,RENDERTEXTURE:8,TILEMAP:9,TILEMAPLAYER:10,EMITTER:11};PIXI.InteractionManager=function(b){};Phaser.Utils={pad:function(g,b,f,c){if(typeof(b)=="undefined"){var b=0}if(typeof(f)=="undefined"){var f=" "}if(typeof(c)=="undefined"){var c=3}if(b+1>=g.length){switch(c){case 1:g=Array(b+1-g.length).join(f)+g;break;case 3:var d=Math.ceil((padlen=b-g.length)/2);var e=padlen-d;g=Array(e+1).join(f)+g+Array(d+1).join(f);break;default:g=g+Array(b+1-g.length).join(f);break}}return g},isPlainObject:function(c){if(typeof(c)!=="object"||c.nodeType||c===c.window){return false}try{if(c.constructor&&!hasOwn.call(c.constructor.prototype,"isPrototypeOf")){return false}}catch(b){return false}return true},extend:function(){var l,d,b,c,h,j,g=arguments[0]||{},f=1,e=arguments.length,k=false;if(typeof g==="boolean"){k=g;g=arguments[1]||{};f=2}if(e===f){g=this;--f}for(;f>16&255)/255,(b>>8&255)/255,(b&255)/255]}if(typeof Function.prototype.bind!="function"){Function.prototype.bind=(function(){var b=Array.prototype.slice;return function(c){var f=this,g=b.call(arguments,1);if(typeof f!="function"){throw new TypeError()}function d(){var h=g.concat(b.call(arguments));f.apply(this instanceof d?this:c,h)}d.prototype=(function e(h){h&&(e.prototype=h);if(!(this instanceof e)){return new e}})(f.prototype);return d}})()}function determineMatrixArrayType(){PIXI.Matrix=(typeof Float32Array!=="undefined")?Float32Array:Array;return PIXI.Matrix}determineMatrixArrayType();PIXI.mat3={};PIXI.mat3.create=function(){var b=new PIXI.Matrix(9);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=1;b[5]=0;b[6]=0;b[7]=0;b[8]=1;return b};PIXI.mat3.identity=function(b){b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=1;b[5]=0;b[6]=0;b[7]=0;b[8]=1;return b};PIXI.mat4={};PIXI.mat4.create=function(){var b=new PIXI.Matrix(16);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};PIXI.mat3.multiply=function(q,h,i){if(!i){i=q}var v=q[0],u=q[1],t=q[2],g=q[3],f=q[4],e=q[5],o=q[6],n=q[7],m=q[8],l=h[0],k=h[1],j=h[2],s=h[3],r=h[4],p=h[5],d=h[6],c=h[7],b=h[8];i[0]=l*v+k*g+j*o;i[1]=l*u+k*f+j*n;i[2]=l*t+k*e+j*m;i[3]=s*v+r*g+p*o;i[4]=s*u+r*f+p*n;i[5]=s*t+r*e+p*m;i[6]=d*v+c*g+b*o;i[7]=d*u+c*f+b*n;i[8]=d*t+c*e+b*m;return i};PIXI.mat3.clone=function(c){var b=new PIXI.Matrix(9);b[0]=c[0];b[1]=c[1];b[2]=c[2];b[3]=c[3];b[4]=c[4];b[5]=c[5];b[6]=c[6];b[7]=c[7];b[8]=c[8];return b};PIXI.mat3.transpose=function(d,c){if(!c||d===c){var f=d[1],e=d[2],b=d[5];d[1]=d[3];d[2]=d[6];d[3]=f;d[5]=d[7];d[6]=e;d[7]=b;return d}c[0]=d[0];c[1]=d[3];c[2]=d[6];c[3]=d[1];c[4]=d[4];c[5]=d[7];c[6]=d[2];c[7]=d[5];c[8]=d[8];return c};PIXI.mat3.toMat4=function(c,b){if(!b){b=PIXI.mat4.create()}b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=c[8];b[9]=c[7];b[8]=c[6];b[7]=0;b[6]=c[5];b[5]=c[4];b[4]=c[3];b[3]=0;b[2]=c[2];b[1]=c[1];b[0]=c[0];return b};PIXI.mat4.create=function(){var b=new PIXI.Matrix(16);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};PIXI.mat4.transpose=function(e,d){if(!d||e===d){var i=e[1],g=e[2],f=e[3],b=e[6],h=e[7],c=e[11];e[1]=e[4];e[2]=e[8];e[3]=e[12];e[4]=i;e[6]=e[9];e[7]=e[13];e[8]=g;e[9]=b;e[11]=e[14];e[12]=f;e[13]=h;e[14]=c;return e}d[0]=e[0];d[1]=e[4];d[2]=e[8];d[3]=e[12];d[4]=e[1];d[5]=e[5];d[6]=e[9];d[7]=e[13];d[8]=e[2];d[9]=e[6];d[10]=e[10];d[11]=e[14];d[12]=e[3];d[13]=e[7];d[14]=e[11];d[15]=e[15];return d};PIXI.mat4.multiply=function(p,i,k){if(!k){k=p}var v=p[0],u=p[1],s=p[2],q=p[3];var h=p[4],f=p[5],d=p[6],b=p[7];var o=p[8],n=p[9],m=p[10],l=p[11];var z=p[12],w=p[13],t=p[14],r=p[15];var j=i[0],g=i[1],e=i[2],c=i[3];k[0]=j*v+g*h+e*o+c*z;k[1]=j*u+g*f+e*n+c*w;k[2]=j*s+g*d+e*m+c*t;k[3]=j*q+g*b+e*l+c*r;j=i[4];g=i[5];e=i[6];c=i[7];k[4]=j*v+g*h+e*o+c*z;k[5]=j*u+g*f+e*n+c*w;k[6]=j*s+g*d+e*m+c*t;k[7]=j*q+g*b+e*l+c*r;j=i[8];g=i[9];e=i[10];c=i[11];k[8]=j*v+g*h+e*o+c*z;k[9]=j*u+g*f+e*n+c*w;k[10]=j*s+g*d+e*m+c*t;k[11]=j*q+g*b+e*l+c*r;j=i[12];g=i[13];e=i[14];c=i[15];k[12]=j*v+g*h+e*o+c*z;k[13]=j*u+g*f+e*n+c*w;k[14]=j*s+g*d+e*m+c*t;k[15]=j*q+g*b+e*l+c*r;return k};PIXI.Point=function(b,c){this.x=b||0;this.y=c||0};PIXI.Point.prototype.clone=function(){return new PIXI.Point(this.x,this.y)};PIXI.Point.prototype.constructor=PIXI.Point;PIXI.Rectangle=function(c,e,d,b){this.x=c||0;this.y=e||0;this.width=d||0;this.height=b||0};PIXI.Rectangle.prototype.clone=function(){return new PIXI.Rectangle(this.x,this.y,this.width,this.height)};PIXI.Rectangle.prototype.contains=function(b,e){if(this.width<=0||this.height<=0){return false}var c=this.x;if(b>=c&&b<=c+this.width){var d=this.y;if(e>=d&&e<=d+this.height){return true}}return false};PIXI.Rectangle.prototype.constructor=PIXI.Rectangle;PIXI.DisplayObject=function(){this.last=this;this.first=this;this.position=new PIXI.Point();this.scale=new PIXI.Point(1,1);this.pivot=new PIXI.Point(0,0);this.rotation=0;this.alpha=1;this.visible=true;this.hitArea=null;this.buttonMode=false;this.renderable=false;this.parent=null;this.stage=null;this.worldAlpha=1;this._interactive=false;this.worldTransform=PIXI.mat3.create();this.localTransform=PIXI.mat3.create();this.color=[];this.dynamic=true;this._sr=0;this._cr=1};PIXI.DisplayObject.prototype.constructor=PIXI.DisplayObject;PIXI.DisplayObject.prototype.setInteractive=function(b){this.interactive=b};Object.defineProperty(PIXI.DisplayObject.prototype,"interactive",{get:function(){return this._interactive},set:function(b){this._interactive=b;if(this.stage){this.stage.dirty=true}}});Object.defineProperty(PIXI.DisplayObject.prototype,"mask",{get:function(){return this._mask},set:function(b){this._mask=b;if(b){this.addFilter(b)}else{this.removeFilter()}}});PIXI.DisplayObject.prototype.addFilter=function(j){if(this.filter){return}this.filter=true;var b=new PIXI.FilterBlock();var e=new PIXI.FilterBlock();b.mask=j;e.mask=j;b.first=b.last=this;e.first=e.last=this;b.open=true;var d=b;var f=b;var i;var h;h=this.first._iPrev;if(h){i=h._iNext;d._iPrev=h;h._iNext=d}else{i=this}if(i){i._iPrev=f;f._iNext=i}var d=e;var f=e;var i=null;var h=null;h=this.last;i=h._iNext;if(i){i._iPrev=f;f._iNext=i}d._iPrev=h;h._iNext=d;var c=this;var g=this.last;while(c){if(c.last==g){c.last=e}c=c.parent}this.first=b;if(this.__renderGroup){this.__renderGroup.addFilterBlocks(b,e)}j.renderable=false};PIXI.DisplayObject.prototype.removeFilter=function(){if(!this.filter){return}this.filter=false;var d=this.first;var g=d._iNext;var h=d._iPrev;if(g){g._iPrev=h}if(h){h._iNext=g}this.first=d._iNext;var e=this.last;var g=e._iNext;var h=e._iPrev;if(g){g._iPrev=h}h._iNext=g;var f=e._iPrev;var c=this;while(c.last==e){c.last=f;c=c.parent;if(!c){break}}var b=d.mask;b.renderable=true;if(this.__renderGroup){this.__renderGroup.removeFilterBlocks(d,e)}};PIXI.DisplayObject.prototype.updateTransform=function(){if(this.rotation!==this.rotationCache){this.rotationCache=this.rotation;this._sr=Math.sin(this.rotation);this._cr=Math.cos(this.rotation)}var r=this.localTransform;var f=this.parent.worldTransform;var b=this.worldTransform;r[0]=this._cr*this.scale.x;r[1]=-this._sr*this.scale.y;r[3]=this._sr*this.scale.x;r[4]=this._cr*this.scale.y;var n=this.pivot.x;var m=this.pivot.y;var i=r[0],h=r[1],g=this.position.x-r[0]*n-m*r[1],q=r[3],p=r[4],o=this.position.y-r[4]*m-n*r[3],l=f[0],k=f[1],j=f[2],e=f[3],d=f[4],c=f[5];r[2]=g;r[5]=o;b[0]=l*i+k*q;b[1]=l*h+k*p;b[2]=l*g+k*o+j;b[3]=e*i+d*q;b[4]=e*h+d*p;b[5]=e*g+d*o+c;this.worldAlpha=this.alpha*this.parent.worldAlpha;this.vcount=PIXI.visibleCount};PIXI.visibleCount=0;PIXI.DisplayObjectContainer=function(){PIXI.DisplayObject.call(this);this.children=[]};PIXI.DisplayObjectContainer.prototype=Object.create(PIXI.DisplayObject.prototype);PIXI.DisplayObjectContainer.prototype.constructor=PIXI.DisplayObjectContainer;PIXI.DisplayObjectContainer.prototype.addChild=function(i){if(i.parent!=undefined){i.parent.removeChild(i)}i.parent=this;this.children.push(i);if(this.stage){var f=i;do{if(f.interactive){this.stage.dirty=true}f.stage=this.stage;f=f._iNext}while(f)}var e=i.first;var d=i.last;var g;var h;if(this.filter){h=this.last._iPrev}else{h=this.last}g=h._iNext;var c=this;var b=h;while(c){if(c.last==b){c.last=i.last}c=c.parent}if(g){g._iPrev=d;d._iNext=g}e._iPrev=h;h._iNext=e;if(this.__renderGroup){if(i.__renderGroup){i.__renderGroup.removeDisplayObjectAndChildren(i)}this.__renderGroup.addDisplayObjectAndChildren(i)}};PIXI.DisplayObjectContainer.prototype.addChildAt=function(c,f){if(f>=0&&f<=this.children.length){if(c.parent!=undefined){c.parent.removeChild(c)}c.parent=this;if(this.stage){var e=c;do{if(e.interactive){this.stage.dirty=true}e.stage=this.stage;e=e._iNext}while(e)}var d=c.first;var g=c.last;var j;var i;if(f==this.children.length){i=this.last;var b=this;var h=this.last;while(b){if(b.last==h){b.last=c.last}b=b.parent}}else{if(f==0){i=this}else{i=this.children[f-1].last}}j=i._iNext;if(j){j._iPrev=g;g._iNext=j}d._iPrev=i;i._iNext=d;this.children.splice(f,0,c);if(this.__renderGroup){if(c.__renderGroup){c.__renderGroup.removeDisplayObjectAndChildren(c)}this.__renderGroup.addDisplayObjectAndChildren(c)}}else{throw new Error(c+" The index "+f+" supplied is out of bounds "+this.children.length)}};PIXI.DisplayObjectContainer.prototype.swapChildren=function(c,b){return};PIXI.DisplayObjectContainer.prototype.getChildAt=function(b){if(b>=0&&b1){h=1}var d=Math.sqrt(c.x*c.x+c.y*c.y);var f=this.texture.height/2;c.x/=d;c.y/=d;c.x*=f;c.y*=f;b[g]=m.x+c.x;b[g+1]=m.y+c.y;b[g+2]=m.x-c.x;b[g+3]=m.y-c.y;l=m}PIXI.DisplayObjectContainer.prototype.updateTransform.call(this)};PIXI.Rope.prototype.setTexture=function(b){this.texture=b;this.updateFrame=true};PIXI.TilingSprite=function(d,c,b){PIXI.DisplayObjectContainer.call(this);this.texture=d;this.width=c;this.height=b;this.tileScale=new PIXI.Point(1,1);this.tilePosition=new PIXI.Point(0,0);this.renderable=true;this.blendMode=PIXI.blendModes.NORMAL};PIXI.TilingSprite.prototype=Object.create(PIXI.DisplayObjectContainer.prototype);PIXI.TilingSprite.prototype.constructor=PIXI.TilingSprite;PIXI.TilingSprite.prototype.setTexture=function(b){this.texture=b;this.updateFrame=true};PIXI.TilingSprite.prototype.onTextureUpdate=function(b){this.updateFrame=true};PIXI.FilterBlock=function(b){this.graphics=b;this.visible=true;this.renderable=true};PIXI.MaskFilter=function(b){this.graphics};PIXI.Graphics=function(){PIXI.DisplayObjectContainer.call(this);this.renderable=true;this.fillAlpha=1;this.lineWidth=0;this.lineColor="black";this.graphicsData=[];this.currentPath={points:[]}};PIXI.Graphics.prototype=Object.create(PIXI.DisplayObjectContainer.prototype);PIXI.Graphics.prototype.constructor=PIXI.Graphics;PIXI.Graphics.prototype.lineStyle=function(b,c,d){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.lineWidth=b||0;this.lineColor=c||0;this.lineAlpha=(d==undefined)?1:d;this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[],type:PIXI.Graphics.POLY};this.graphicsData.push(this.currentPath)};PIXI.Graphics.prototype.moveTo=function(b,c){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath=this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[],type:PIXI.Graphics.POLY};this.currentPath.points.push(b,c);this.graphicsData.push(this.currentPath)};PIXI.Graphics.prototype.lineTo=function(b,c){this.currentPath.points.push(b,c);this.dirty=true};PIXI.Graphics.prototype.beginFill=function(b,c){this.filling=true;this.fillColor=b||0;this.fillAlpha=(c==undefined)?1:c};PIXI.Graphics.prototype.endFill=function(){this.filling=false;this.fillColor=null;this.fillAlpha=1};PIXI.Graphics.prototype.drawRect=function(c,e,d,b){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[c,e,d,b],type:PIXI.Graphics.RECT};this.graphicsData.push(this.currentPath);this.dirty=true};PIXI.Graphics.prototype.drawCircle=function(c,d,b){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[c,d,b,b],type:PIXI.Graphics.CIRC};this.graphicsData.push(this.currentPath);this.dirty=true};PIXI.Graphics.prototype.drawElipse=function(c,e,d,b){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[c,e,d,b],type:PIXI.Graphics.ELIP};this.graphicsData.push(this.currentPath);this.dirty=true};PIXI.Graphics.prototype.clear=function(){this.lineWidth=0;this.filling=false;this.dirty=true;this.clearDirty=true;this.graphicsData=[]};PIXI.Graphics.POLY=0;PIXI.Graphics.RECT=1;PIXI.Graphics.CIRC=2;PIXI.Graphics.ELIP=3;PIXI.CanvasGraphics=function(){};PIXI.CanvasGraphics.renderGraphics=function(u,c){var p=u.worldAlpha;for(var s=0;s1){t=1;console.log("Pixi.js warning: masks in canvas can only mask using the first path in the graphics object")}for(var s=0;s<1;s++){var A=v.graphicsData[s];var r=A.points;if(A.type==PIXI.Graphics.POLY){c.beginPath();c.moveTo(r[0],r[1]);for(var q=1;q0){PIXI.Texture.frameUpdates=[]}};PIXI.CanvasRenderer.prototype.resize=function(c,b){this.width=c;this.height=b;this.view.width=c;this.view.height=b};PIXI.CanvasRenderer.prototype.renderDisplayObject=function(h){var e;var f=this.context;f.globalCompositeOperation="source-over";var d=h.last._iNext;h=h.first;do{e=h.worldTransform;if(!h.visible){h=h.last._iNext;continue}if(!h.renderable){h=h._iNext;continue}if(h instanceof PIXI.Sprite){var g=h.texture.frame;if(g){f.globalAlpha=h.worldAlpha;f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);f.drawImage(h.texture.baseTexture.source,g.x,g.y,g.width,g.height,(h.anchor.x)*-g.width,(h.anchor.y)*-g.height,g.width,g.height)}}else{if(h instanceof PIXI.Strip){f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);this.renderStrip(h)}else{if(h instanceof PIXI.TilingSprite){f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);this.renderTilingSprite(h)}else{if(h instanceof PIXI.CustomRenderable){h.renderCanvas(this)}else{if(h instanceof PIXI.Graphics){f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);PIXI.CanvasGraphics.renderGraphics(h,f)}else{if(h instanceof PIXI.FilterBlock){if(h.open){f.save();var c=h.mask.alpha;var b=h.mask.worldTransform;f.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]);h.mask.worldAlpha=0.5;f.worldAlpha=0;PIXI.CanvasGraphics.renderGraphicsMask(h.mask,f);f.clip();h.mask.worldAlpha=c}else{f.restore()}}}}}}}h=h._iNext}while(h!=d)};PIXI.CanvasRenderer.prototype.renderStripFlat=function(d){var e=this.context;var f=d.verticies;var j=d.uvs;var g=f.length/2;this.count++;e.beginPath();for(var k=1;k3){PIXI.WebGLGraphics.buildPoly(d,b._webGL)}}if(d.lineWidth>0){PIXI.WebGLGraphics.buildLine(d,b._webGL)}}else{if(d.type==PIXI.Graphics.RECT){PIXI.WebGLGraphics.buildRectangle(d,b._webGL)}else{if(d.type==PIXI.Graphics.CIRC||d.type==PIXI.Graphics.ELIP){PIXI.WebGLGraphics.buildCircle(d,b._webGL)}}}}b._webGL.lastIndex=b.graphicsData.length;var e=PIXI.gl;b._webGL.glPoints=new Float32Array(b._webGL.points);e.bindBuffer(e.ARRAY_BUFFER,b._webGL.buffer);e.bufferData(e.ARRAY_BUFFER,b._webGL.glPoints,e.STATIC_DRAW);b._webGL.glIndicies=new Uint16Array(b._webGL.indices);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b._webGL.indexBuffer);e.bufferData(e.ELEMENT_ARRAY_BUFFER,b._webGL.glIndicies,e.STATIC_DRAW)};PIXI.WebGLGraphics.buildRectangle=function(s,i){var f=s.points;var n=f[0];var m=f[1];var d=f[2];var q=f[3];if(s.fill){var h=HEXtoRGB(s.fillColor);var e=s.fillAlpha;var c=h[0]*e;var j=h[1]*e;var l=h[2]*e;var o=i.points;var p=i.indices;var k=o.length/6;o.push(n,m);o.push(c,j,l,e);o.push(n+d,m);o.push(c,j,l,e);o.push(n,m+q);o.push(c,j,l,e);o.push(n+d,m+q);o.push(c,j,l,e);p.push(k,k,k+1,k+2,k+3,k+3)}if(s.lineWidth){s.points=[n,m,n+d,m,n+d,m+q,n,m+q,n,m];PIXI.WebGLGraphics.buildLine(s,i)}};PIXI.WebGLGraphics.buildCircle=function(k,w){var f=k.points;var j=f[0];var h=f[1];var o=f[2];var n=f[3];var l=40;var t=(Math.PI*2)/l;if(k.fill){var p=HEXtoRGB(k.fillColor);var d=k.fillAlpha;var m=p[0]*d;var s=p[1]*d;var u=p[2]*d;var v=w.points;var e=w.indices;var c=v.length/6;e.push(c);for(var q=0;q140*140){h=L-z;f=K-w;m=Math.sqrt(h*h+f*f);h/=m;f/=m;h*=c;f*=c;S.push(B-h,A-f);S.push(M,T,W,Q);S.push(B+h,A+f);S.push(M,T,W,Q);S.push(B-h,A-f);S.push(M,T,W,Q);q++}else{S.push(px,py);S.push(M,T,W,Q);S.push(B-(px-B),A-(py-A));S.push(M,T,W,Q)}}J=H[(u-2)*2];I=H[(u-2)*2+1];B=H[(u-1)*2];A=H[(u-1)*2+1];L=-(I-A);K=J-B;m=Math.sqrt(L*L+K*K);L/=m;K/=m;L*=c;K*=c;S.push(B-L,A-K);S.push(M,T,W,Q);S.push(B+L,A+K);S.push(M,T,W,Q);l.push(U);for(var R=0;R>16&255)/255,(b>>8&255)/255,(b&255)/255]}PIXI._defaultFrame=new PIXI.Rectangle(0,0,1,1);PIXI.gl;PIXI.WebGLRenderer=function(g,b,d,j,c){this.transparent=!!j;this.width=g||800;this.height=b||600;this.view=d||document.createElement("canvas");this.view.width=this.width;this.view.height=this.height;var f=this;this.view.addEventListener("webglcontextlost",function(e){f.handleContextLost(e)},false);this.view.addEventListener("webglcontextrestored",function(e){f.handleContextRestored(e)},false);this.batchs=[];try{PIXI.gl=this.gl=this.view.getContext("experimental-webgl",{alpha:this.transparent,antialias:!!c,premultipliedAlpha:false,stencil:true})}catch(h){throw new Error(" This browser does not support webGL. Try using the canvas renderer"+this)}PIXI.initPrimitiveShader();PIXI.initDefaultShader();PIXI.initDefaultStripShader();PIXI.activateDefaultShader();var i=this.gl;PIXI.WebGLRenderer.gl=i;this.batch=new PIXI.WebGLBatch(i);i.disable(i.DEPTH_TEST);i.disable(i.CULL_FACE);i.enable(i.BLEND);i.colorMask(true,true,true,this.transparent);PIXI.projection=new PIXI.Point(400,300);this.resize(this.width,this.height);this.contextLost=false;this.stageRenderGroup=new PIXI.WebGLRenderGroup(this.gl)};PIXI.WebGLRenderer.prototype.constructor=PIXI.WebGLRenderer;PIXI.WebGLRenderer.getBatch=function(){if(PIXI._batchs.length==0){return new PIXI.WebGLBatch(PIXI.WebGLRenderer.gl)}else{return PIXI._batchs.pop()}};PIXI.WebGLRenderer.returnBatch=function(b){b.clean();PIXI._batchs.push(b)};PIXI.WebGLRenderer.prototype.render=function(b){if(this.contextLost){return}if(this.__stage!==b){this.__stage=b;this.stageRenderGroup.setRenderable(b)}PIXI.WebGLRenderer.updateTextures();PIXI.visibleCount++;b.updateTransform();var d=this.gl;d.colorMask(true,true,true,this.transparent);d.viewport(0,0,this.width,this.height);d.bindFramebuffer(d.FRAMEBUFFER,null);d.clearColor(b.backgroundColorSplit[0],b.backgroundColorSplit[1],b.backgroundColorSplit[2],!this.transparent);d.clear(d.COLOR_BUFFER_BIT);this.stageRenderGroup.backgroundColor=b.backgroundColorSplit;this.stageRenderGroup.render(PIXI.projection);if(b.interactive){if(!b._interactiveEventsAdded){b._interactiveEventsAdded=true;b.interactionManager.setTarget(this)}}if(PIXI.Texture.frameUpdates.length>0){for(var c=0;c0){n=n.children[n.children.length-1];if(n.renderable){b=n}}if(b instanceof PIXI.Sprite){c=b.batch;var l=c.head;if(l==b){h=0}else{h=1;while(l.__next!=b){h++;l=l.__next}}}else{c=b}if(m==c){if(m instanceof PIXI.WebGLBatch){m.render(p,h+1)}else{this.renderSpecial(m,j)}return}d=this.batchs.indexOf(m);q=this.batchs.indexOf(c);if(m instanceof PIXI.WebGLBatch){m.render(p)}else{this.renderSpecial(m,j)}for(var e=d+1;e=2?parseInt(b[b.length-2],10):PIXI.BitmapText.fonts[this.fontName].size;this.dirty=true};PIXI.BitmapText.prototype.updateText=function(){var h=PIXI.BitmapText.fonts[this.fontName];var m=new PIXI.Point();var j=null;var l=[];var q=0;var e=[];var p=0;var f=this.fontSize/h.size;for(var g=0;g0){this.removeChild(this.getChildAt(0))}this.updateText();this.dirty=false}PIXI.DisplayObjectContainer.prototype.updateTransform.call(this)};PIXI.BitmapText.fonts={};PIXI.Text=function(c,b){this.canvas=document.createElement("canvas");this.context=this.canvas.getContext("2d");PIXI.Sprite.call(this,PIXI.Texture.fromCanvas(this.canvas));this.setText(c);this.setStyle(b);this.updateText();this.dirty=false};PIXI.Text.prototype=Object.create(PIXI.Sprite.prototype);PIXI.Text.prototype.constructor=PIXI.Text;PIXI.Text.prototype.setStyle=function(b){b=b||{};b.font=b.font||"bold 20pt Arial";b.fill=b.fill||"black";b.align=b.align||"left";b.stroke=b.stroke||"black";b.strokeThickness=b.strokeThickness||0;b.wordWrap=b.wordWrap||false;b.wordWrapWidth=b.wordWrapWidth||100;this.style=b;this.dirty=true};PIXI.Sprite.prototype.setText=function(b){this.text=b.toString()||" ";this.dirty=true};PIXI.Text.prototype.updateText=function(){this.context.font=this.style.font;var g=this.text;if(this.style.wordWrap){g=this.wordWrap(this.text)}var f=g.split(/(?:\r\n|\r|\n)/);var d=[];var c=0;for(var h=0;hj){return k}else{return arguments.callee(i,l,k,h,j)}}else{return arguments.callee(i,l,m,k,j)}};var f=function(h,j,i){if(h.measureText(j).width<=i||j.length<1){return j}var k=e(h,j,0,j.length,i);return j.substring(0,k)+"\n"+arguments.callee(h,j.substring(k),i)};var b="";var c=g.split("\n");for(var d=0;dthis.baseTexture.width||b.y+b.height>this.baseTexture.height){throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this)}this.updateFrame=true;PIXI.Texture.frameUpdates.push(this)};PIXI.Texture.fromImage=function(c,b){var d=PIXI.TextureCache[c];if(!d){d=new PIXI.Texture(PIXI.BaseTexture.fromImage(c,b));PIXI.TextureCache[c]=d}return d};PIXI.Texture.fromFrame=function(c){var b=PIXI.TextureCache[c];if(!b){throw new Error("The frameId '"+c+"' does not exist in the texture cache "+this)}return b};PIXI.Texture.fromCanvas=function(b){var c=new PIXI.BaseTexture(b);return new PIXI.Texture(c)};PIXI.Texture.addTextureToCache=function(b,c){PIXI.TextureCache[c]=b};PIXI.Texture.removeTextureFromCache=function(c){var b=PIXI.TextureCache[c];PIXI.TextureCache[c]=null;return b};PIXI.Texture.frameUpdates=[];PIXI.RenderTexture=function(c,b){PIXI.EventTarget.call(this);this.width=c||100;this.height=b||100;this.indetityMatrix=PIXI.mat3.create();this.frame=new PIXI.Rectangle(0,0,this.width,this.height);if(PIXI.gl){this.initWebGL()}else{this.initCanvas()}};PIXI.RenderTexture.prototype=Object.create(PIXI.Texture.prototype);PIXI.RenderTexture.prototype.constructor=PIXI.RenderTexture;PIXI.RenderTexture.prototype.initWebGL=function(){var b=PIXI.gl;this.glFramebuffer=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,this.glFramebuffer);this.glFramebuffer.width=this.width;this.glFramebuffer.height=this.height;this.baseTexture=new PIXI.BaseTexture();this.baseTexture.width=this.width;this.baseTexture.height=this.height;this.baseTexture._glTexture=b.createTexture();b.bindTexture(b.TEXTURE_2D,this.baseTexture._glTexture);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,this.width,this.height,0,b.RGBA,b.UNSIGNED_BYTE,null);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);this.baseTexture.isRender=true;b.bindFramebuffer(b.FRAMEBUFFER,this.glFramebuffer);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.baseTexture._glTexture,0);this.projection=new PIXI.Point(this.width/2,this.height/2);this.render=this.renderWebGL};PIXI.RenderTexture.prototype.resize=function(c,b){this.width=c;this.height=b;if(PIXI.gl){this.projection.x=this.width/2;this.projection.y=this.height/2;var d=PIXI.gl;d.bindTexture(d.TEXTURE_2D,this.baseTexture._glTexture);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.width,this.height,0,d.RGBA,d.UNSIGNED_BYTE,null)}else{this.frame.width=this.width;this.frame.height=this.height;this.renderer.resize(this.width,this.height)}};PIXI.RenderTexture.prototype.initCanvas=function(){this.renderer=new PIXI.CanvasRenderer(this.width,this.height,null,0);this.baseTexture=new PIXI.BaseTexture(this.renderer.view);this.frame=new PIXI.Rectangle(0,0,this.width,this.height);this.render=this.renderCanvas};PIXI.RenderTexture.prototype.renderWebGL=function(k,g,h){var f=PIXI.gl;f.colorMask(true,true,true,true);f.viewport(0,0,this.width,this.height);f.bindFramebuffer(f.FRAMEBUFFER,this.glFramebuffer);if(h){f.clearColor(0,0,0,0);f.clear(f.COLOR_BUFFER_BIT)}var c=k.children;var b=k.worldTransform;k.worldTransform=PIXI.mat3.create();k.worldTransform[4]=-1;k.worldTransform[5]=this.projection.y*2;if(g){k.worldTransform[2]=g.x;k.worldTransform[5]-=g.y}PIXI.visibleCount++;k.vcount=PIXI.visibleCount;for(var e=0,d=c.length;e>1;if(k<3){return[]}var u=[];var g=[];for(var s=0;s3){var q=g[(s+0)%o];var m=g[(s+1)%o];var l=g[(s+2)%o];var f=h[2*q],d=h[2*q+1];var v=h[2*m],t=h[2*m+1];var c=h[2*l],b=h[2*l+1];var e=false;if(PIXI.PolyK._convex(f,d,v,t,c,b,z)){e=true;for(var r=0;r3*o){if(z){var u=[];g=[];for(var s=0;s=0)&&(m>=0)&&(n+m<1)};PIXI.PolyK._convex=function(e,d,g,f,b,h,c){return((d-f)*(b-g)+(g-e)*(h-f)>=0)==c};Phaser.Camera=function(d,g,c,f,e,b){this.game=d;this.world=d.world;this.id=0;this.view=new Phaser.Rectangle(c,f,e,b);this.screenView=new Phaser.Rectangle(c,f,e,b);this.deadzone=null;this.visible=true;this.atLimit={x:false,y:false};this.target=null;this._edge=0};Phaser.Camera.FOLLOW_LOCKON=0;Phaser.Camera.FOLLOW_PLATFORMER=1;Phaser.Camera.FOLLOW_TOPDOWN=2;Phaser.Camera.FOLLOW_TOPDOWN_TIGHT=3;Phaser.Camera.prototype={follow:function(f,d){if(typeof d==="undefined"){d=Phaser.Camera.FOLLOW_LOCKON}this.target=f;var e;switch(d){case Phaser.Camera.FOLLOW_PLATFORMER:var b=this.width/8;var c=this.height/3;this.deadzone=new Phaser.Rectangle((this.width-b)/2,(this.height-c)/2-c*0.25,b,c);break;case Phaser.Camera.FOLLOW_TOPDOWN:e=Math.max(this.width,this.height)/4;this.deadzone=new Phaser.Rectangle((this.width-e)/2,(this.height-e)/2,e,e);break;case Phaser.Camera.FOLLOW_TOPDOWN_TIGHT:e=Math.max(this.width,this.height)/8;this.deadzone=new Phaser.Rectangle((this.width-e)/2,(this.height-e)/2,e,e);break;case Phaser.Camera.FOLLOW_LOCKON:default:this.deadzone=null;break}},focusOnXY:function(b,c){this.view.x=Math.round(b-this.view.halfWidth);this.view.y=Math.round(c-this.view.halfHeight)},update:function(){if(this.target!==null){if(this.deadzone){this._edge=this.target.x-this.deadzone.x;if(this.view.x>this._edge){this.view.x=this._edge}this._edge=this.target.x+this.target.width-this.deadzone.x-this.deadzone.width;if(this.view.xthis._edge){this.view.y=this._edge}this._edge=this.target.y+this.target.height-this.deadzone.y-this.deadzone.height;if(this.view.ythis.world.bounds.right-this.width){this.atLimit.x=true;this.view.x=(this.world.bounds.right-this.width)+1}if(this.view.ythis.world.bounds.bottom-this.height){this.atLimit.y=true;this.view.y=(this.world.bounds.bottom-this.height)+1}this.view.floor()},setPosition:function(b,c){this.view.x=b;this.view.y=c;this.checkWorldBounds()},setSize:function(c,b){this.view.width=c;this.view.height=b}};Object.defineProperty(Phaser.Camera.prototype,"x",{get:function(){return this.view.x},set:function(b){this.view.x=b;this.checkWorldBounds()}});Object.defineProperty(Phaser.Camera.prototype,"y",{get:function(){return this.view.y},set:function(b){this.view.y=b;this.checkWorldBounds()}});Object.defineProperty(Phaser.Camera.prototype,"width",{get:function(){return this.view.width},set:function(b){this.view.width=b}});Object.defineProperty(Phaser.Camera.prototype,"height",{get:function(){return this.view.height},set:function(b){this.view.height=b}});Phaser.State=function(){this.game=null;this.add=null;this.camera=null;this.cache=null;this.input=null;this.load=null;this.sound=null;this.stage=null;this.time=null;this.tweens=null;this.world=null;this.particles=null;this.physics=null};Phaser.State.prototype={link:function(b){this.game=b;this.add=b.add;this.camera=b.camera;this.cache=b.cache;this.input=b.input;this.load=b.load;this.sound=b.sound;this.stage=b.stage;this.time=b.time;this.tweens=b.tweens;this.world=b.world;this.particles=b.particles;this.physics=b.physics},preload:function(){},create:function(){},update:function(){},render:function(){},paused:function(){},destroy:function(){}};Phaser.StateManager=function(c,b){this.game=c;this.states={};if(b!==null){this._pendingState=b}};Phaser.StateManager.prototype={game:null,_pendingState:null,_created:false,states:{},current:"",onInitCallback:null,onPreloadCallback:null,onCreateCallback:null,onUpdateCallback:null,onRenderCallback:null,onPreRenderCallback:null,onLoadUpdateCallback:null,onLoadRenderCallback:null,onPausedCallback:null,onShutDownCallback:null,boot:function(){if(this._pendingState!==null){if(typeof this._pendingState==="string"){this.start(this._pendingState,false,false)}else{this.add("default",this._pendingState,true)}}},add:function(c,d,b){if(typeof b==="undefined"){b=false}var e;if(d instanceof Phaser.State){e=d;e.link(this.game)}else{if(typeof d==="object"){e=d}else{if(typeof d==="function"){e=new d(this.game)}}}this.states[c]=e;if(b){if(this.game.isBooted){this.start(c)}else{this._pendingState=c}}return e},remove:function(b){if(this.current==b){this.callbackContext=null;this.onInitCallback=null;this.onShutDownCallback=null;this.onPreloadCallback=null;this.onLoadRenderCallback=null;this.onLoadUpdateCallback=null;this.onCreateCallback=null;this.onUpdateCallback=null;this.onRenderCallback=null;this.onPausedCallback=null;this.onDestroyCallback=null}delete this.states[b]},start:function(c,b,d){if(typeof b==="undefined"){b=true}if(typeof d==="undefined"){d=false}if(this.game.isBooted==false){this._pendingState=c;return}if(this.checkState(c)==false){return}else{if(this.current){this.onShutDownCallback.call(this.callbackContext)}if(b){if(d==true){this.game.cache.destroy()}}this.setCurrentState(c)}if(this.onPreloadCallback){this.game.load.reset();this.onPreloadCallback.call(this.callbackContext);if(this.game.load.queueSize==0){this.game.loadComplete();if(this.onCreateCallback){this.onCreateCallback.call(this.callbackContext)}this._created=true}else{this.game.load.start()}}else{if(this.onCreateCallback){this.onCreateCallback.call(this.callbackContext)}this._created=true;this.game.loadComplete()}},dummy:function(){},checkState:function(b){if(this.states[b]){var c=false;if(this.states[b]["preload"]){c=true}if(c==false&&this.states[b]["loadRender"]){c=true}if(c==false&&this.states[b]["loadUpdate"]){c=true}if(c==false&&this.states[b]["create"]){c=true}if(c==false&&this.states[b]["update"]){c=true}if(c==false&&this.states[b]["preRender"]){c=true}if(c==false&&this.states[b]["render"]){c=true}if(c==false&&this.states[b]["paused"]){c=true}if(c==false){console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions.");return false}return true}else{console.warn("Phaser.StateManager - No state found with the key: "+b);return false}},setCurrentState:function(b){this.callbackContext=this.states[b];this.onInitCallback=this.states[b]["init"]||this.dummy;this.onPreloadCallback=this.states[b]["preload"]||null;this.onLoadRenderCallback=this.states[b]["loadRender"]||null;this.onLoadUpdateCallback=this.states[b]["loadUpdate"]||null;this.onCreateCallback=this.states[b]["create"]||null;this.onUpdateCallback=this.states[b]["update"]||null;this.onPreRenderCallback=this.states[b]["preRender"]||null;this.onRenderCallback=this.states[b]["render"]||null;this.onPausedCallback=this.states[b]["paused"]||null;this.onShutDownCallback=this.states[b]["shutdown"]||this.dummy;this.current=b;this._created=false;this.onInitCallback.call(this.callbackContext)},loadComplete:function(){if(this._created==false&&this.onCreateCallback){this.onCreateCallback.call(this.callbackContext);this._created=true}},update:function(){if(this._created&&this.onUpdateCallback){this.onUpdateCallback.call(this.callbackContext)}else{if(this.onLoadUpdateCallback){this.onLoadUpdateCallback.call(this.callbackContext)}}},preRender:function(){if(this.onPreRenderCallback){this.onPreRenderCallback.call(this.callbackContext)}},render:function(){if(this._created&&this.onRenderCallback){this.onRenderCallback.call(this.callbackContext)}else{if(this.onLoadRenderCallback){this.onLoadRenderCallback.call(this.callbackContext)}}},destroy:function(){this.callbackContext=null;this.onInitCallback=null;this.onShutDownCallback=null;this.onPreloadCallback=null;this.onLoadRenderCallback=null;this.onLoadUpdateCallback=null;this.onCreateCallback=null;this.onUpdateCallback=null;this.onRenderCallback=null;this.onPausedCallback=null;this.onDestroyCallback=null;this.game=null;this.states={};this._pendingState=null}};Phaser.LinkedList=function(){this.next=null;this.prev=null;this.first=null;this.last=null;this.total=0};Phaser.LinkedList.prototype={add:function(b){if(this.total==0&&this.first==null&&this.last==null){this.first=b;this.last=b;this.next=b;b.prev=this;this.total++;return}this.last.next=b;b.prev=this.last;this.last=b;this.total++;return b},remove:function(c){if(this.first==null&&this.last==null){return}this.total--;if(this.first==c&&this.last==c){this.first=null;this.last=null;this.next=null;c.next=null;c.prev=null;return}var b=c.prev;if(c.next){c.next.prev=c.prev}b.next=c.next},callAll:function(c){var b=this.first;do{if(b[c]){b[c].call(b)}b=b.next}while(b!=this.last.next)},dump:function(){var j=20;var e="\n"+Phaser.Utils.pad("Node",j)+"|"+Phaser.Utils.pad("Next",j)+"|"+Phaser.Utils.pad("Previous",j)+"|"+Phaser.Utils.pad("First",j)+"|"+Phaser.Utils.pad("Last",j);console.log(e);var e=Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j);console.log(e);var g=this;var c=g.last.next;g=g.first;do{var d=g.sprite.name||"*";var f="-";var b="-";var h="-";var i="-";if(g.next){f=g.next.sprite.name}if(g.prev){b=g.prev.sprite.name}if(g.first){h=g.first.sprite.name}if(g.last){i=g.last.sprite.name}if(typeof f==="undefined"){f="-"}if(typeof b==="undefined"){b="-"}if(typeof h==="undefined"){h="-"}if(typeof i==="undefined"){i="-"}var e=Phaser.Utils.pad(d,j)+"|"+Phaser.Utils.pad(f,j)+"|"+Phaser.Utils.pad(b,j)+"|"+Phaser.Utils.pad(h,j)+"|"+Phaser.Utils.pad(i,j);console.log(e);g=g.next}while(g!=c)}};Phaser.Signal=function(){this._bindings=[];this._prevParams=null;var b=this;this.dispatch=function(){Phaser.Signal.prototype.dispatch.apply(b,arguments)}};Phaser.Signal.prototype={memorize:false,_shouldPropagate:true,active:true,validateListener:function(b,c){if(typeof b!=="function"){throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",c))}},_registerListener:function(f,d,e,c){var b=this._indexOfListener(f,e),g;if(b!==-1){g=this._bindings[b];if(g.isOnce()!==d){throw new Error("You cannot add"+(d?"":"Once")+"() then add"+(!d?"":"Once")+"() the same listener without removing the relationship first.")}}else{g=new Phaser.SignalBinding(this,f,d,e,c);this._addBinding(g)}if(this.memorize&&this._prevParams){g.execute(this._prevParams)}return g},_addBinding:function(b){var c=this._bindings.length;do{--c}while(this._bindings[c]&&b._priority<=this._bindings[c]._priority);this._bindings.splice(c+1,0,b)},_indexOfListener:function(c,b){var e=this._bindings.length,d;while(e--){d=this._bindings[e];if(d._listener===c&&d.context===b){return e}}return -1},has:function(c,b){return this._indexOfListener(c,b)!==-1},add:function(d,c,b){this.validateListener(d,"add");return this._registerListener(d,false,c,b)},addOnce:function(d,c,b){this.validateListener(d,"addOnce");return this._registerListener(d,true,c,b)},remove:function(d,c){this.validateListener(d,"remove");var b=this._indexOfListener(d,c);if(b!==-1){this._bindings[b]._destroy();this._bindings.splice(b,1)}return d},removeAll:function(){var b=this._bindings.length;while(b--){this._bindings[b]._destroy()}this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=false},dispatch:function(c){if(!this.active){return}var b=Array.prototype.slice.call(arguments),e=this._bindings.length,d;if(this.memorize){this._prevParams=b}if(!e){return}d=this._bindings.slice();this._shouldPropagate=true;do{e--}while(d[e]&&this._shouldPropagate&&d[e].execute(b)!==false)},forget:function(){this._prevParams=null},dispose:function(){this.removeAll();delete this._bindings;delete this._prevParams},toString:function(){return"[Phaser.Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};Phaser.SignalBinding=function(f,e,c,d,b){this._listener=e;this._isOnce=c;this.context=d;this._signal=f;this._priority=b||0};Phaser.SignalBinding.prototype={active:true,params:null,execute:function(b){var d,c;if(this.active&&!!this._listener){c=this.params?this.params.concat(b):b;d=this._listener.apply(this.context,c);if(this._isOnce){this.detach()}}return d},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return(!!this._signal&&!!this._listener)},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal;delete this._listener;delete this.context},toString:function(){return"[Phaser.SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}};Phaser.Plugin=function(b,c){this.game=b;this.parent=c;this.active=false;this.visible=false;this.hasPreUpdate=false;this.hasUpdate=false;this.hasRender=false;this.hasPostRender=false};Phaser.Plugin.prototype={preUpdate:function(){},update:function(){},render:function(){},postRender:function(){},destroy:function(){this.game=null;this.parent=null;this.active=false;this.visible=false}};Phaser.PluginManager=function(b,c){this.game=b;this._parent=c;this.plugins=[];this._pluginsLength=0};Phaser.PluginManager.prototype={add:function(c){var b=false;if(typeof c==="function"){c=new c(this.game,this._parent)}else{c.game=this.game;c.parent=this._parent}if(typeof c.preUpdate==="function"){c.hasPreUpdate=true;b=true}if(typeof c.update==="function"){c.hasUpdate=true;b=true}if(typeof c.render==="function"){c.hasRender=true;b=true}if(typeof c.postRender==="function"){c.hasPostRender=true;b=true}if(b){if(c.hasPreUpdate||c.hasUpdate){c.active=true}if(c.hasRender||c.hasPostRender){c.visible=true}this._pluginsLength=this.plugins.push(c);return c}else{return null}},remove:function(b){this._pluginsLength--},preUpdate:function(){if(this._pluginsLength==0){return}for(this._p=0;this._p0)},removeBetween:function(d,c){if(d>c||d<0||c>this._container.children.length){return false}for(var b=d;b=this.game.width){this.bounds.width=c}if(b>=this.game.height){this.bounds.height=b}}};Object.defineProperty(Phaser.World.prototype,"width",{get:function(){return this.bounds.width},set:function(b){this.bounds.width=b}});Object.defineProperty(Phaser.World.prototype,"height",{get:function(){return this.bounds.height},set:function(b){this.bounds.height=b}});Object.defineProperty(Phaser.World.prototype,"centerX",{get:function(){return this.bounds.halfWidth}});Object.defineProperty(Phaser.World.prototype,"centerY",{get:function(){return this.bounds.halfHeight}});Object.defineProperty(Phaser.World.prototype,"randomX",{get:function(){return Math.round(Math.random()*this.bounds.width)}});Object.defineProperty(Phaser.World.prototype,"randomY",{get:function(){return Math.round(Math.random()*this.bounds.height)}});Phaser.Game=function(e,b,g,d,f,h,c){e=e||800;b=b||600;g=g||Phaser.AUTO;d=d||"";f=f||null;h=h||false;c=c||true;this.id=Phaser.GAMES.push(this)-1;this.parent=d;this.width=e;this.height=b;this.transparent=h;this.antialias=c;this.renderer=null;this.state=new Phaser.StateManager(this,f);this._paused=false;this.renderType=g;this._loadComplete=false;this.isBooted=false;this.isRunning=false;this.raf=null;this.add=null;this.cache=null;this.input=null;this.load=null;this.math=null;this.net=null;this.sound=null;this.stage=null;this.time=null;this.tweens=null;this.world=null;this.physics=null;this.rnd=null;this.device=null;this.camera=null;this.canvas=null;this.context=null;this.debug=null;this.particles=null;var i=this;this._onBoot=function(){return i.boot()};if(document.readyState==="complete"||document.readyState==="interactive"){window.setTimeout(this._onBoot,0)}else{document.addEventListener("DOMContentLoaded",this._onBoot,false);window.addEventListener("load",this._onBoot,false)}return this};Phaser.Game.prototype={boot:function(){if(this.isBooted){return}if(!document.body){window.setTimeout(this._onBoot,20)}else{document.removeEventListener("DOMContentLoaded",this._onBoot);window.removeEventListener("load",this._onBoot);this.onPause=new Phaser.Signal;this.onResume=new Phaser.Signal;this.isBooted=true;this.device=new Phaser.Device();this.math=Phaser.Math;this.rnd=new Phaser.RandomDataGenerator([(Date.now()*Math.random()).toString()]);this.stage=new Phaser.Stage(this,this.width,this.height);this.setUpRenderer();this.world=new Phaser.World(this);this.add=new Phaser.GameObjectFactory(this);this.cache=new Phaser.Cache(this);this.load=new Phaser.Loader(this);this.time=new Phaser.Time(this);this.tweens=new Phaser.TweenManager(this);this.input=new Phaser.Input(this);this.sound=new Phaser.SoundManager(this);this.physics=new Phaser.Physics.Arcade(this);this.particles=new Phaser.Particles(this);this.plugins=new Phaser.PluginManager(this,this);this.net=new Phaser.Net(this);this.debug=new Phaser.Utils.Debug(this);this.load.onLoadComplete.add(this.loadComplete,this);this.stage.boot();this.world.boot();this.state.boot();this.input.boot();this.sound.boot();if(this.renderType==Phaser.CANVAS){console.log("%cPhaser "+Phaser.VERSION+" initialized. Rendering to Canvas","color: #ffff33; background: #000000")}else{console.log("%cPhaser "+Phaser.VERSION+" initialized. Rendering to WebGL","color: #ffff33; background: #000000")}this.isRunning=true;this._loadComplete=false;this.raf=new Phaser.RequestAnimationFrame(this);this.raf.start()}},setUpRenderer:function(){if(this.renderType===Phaser.CANVAS||(this.renderType===Phaser.AUTO&&this.device.webGL==false)){if(this.device.canvas){this.renderType=Phaser.CANVAS;this.renderer=new PIXI.CanvasRenderer(this.width,this.height,this.stage.canvas,this.transparent);Phaser.Canvas.setSmoothingEnabled(this.renderer.context,this.antialias);this.canvas=this.renderer.view;this.context=this.renderer.context}else{throw new Error("Phaser.Game - cannot create Canvas or WebGL context, aborting.")}}else{this.renderType=Phaser.WEBGL;this.renderer=new PIXI.WebGLRenderer(this.width,this.height,this.stage.canvas,this.transparent,this.antialias);this.canvas=this.renderer.view;this.context=null}Phaser.Canvas.addToDOM(this.renderer.view,this.parent,true);Phaser.Canvas.setTouchAction(this.renderer.view)},loadComplete:function(){this._loadComplete=true;this.state.loadComplete()},update:function(b){this.time.update(b);if(!this._paused){this.plugins.preUpdate();this.physics.preUpdate();this.input.update();this.tweens.update();this.sound.update();this.world.update();this.particles.update();this.state.update();this.plugins.update();this.renderer.render(this.stage._stage);this.plugins.render();this.state.render();this.plugins.postRender()}},destroy:function(){this.state.destroy();this.state=null;this.cache=null;this.input=null;this.load=null;this.sound=null;this.stage=null;this.time=null;this.world=null;this.isBooted=false}};Object.defineProperty(Phaser.Game.prototype,"paused",{get:function(){return this._paused},set:function(b){if(b===true){if(this._paused==false){this._paused=true;this.onPause.dispatch(this)}}else{if(this._paused){this._paused=false;this.onResume.dispatch(this)}}}});Phaser.Input=function(b){this.game=b;this.hitCanvas=null;this.hitContext=null};Phaser.Input.MOUSE_OVERRIDES_TOUCH=0;Phaser.Input.TOUCH_OVERRIDES_MOUSE=1;Phaser.Input.MOUSE_TOUCH_COMBINE=2;Phaser.Input.prototype={game:null,pollRate:0,_pollCounter:0,_oldPosition:null,_x:0,_y:0,disabled:false,multiInputOverride:Phaser.Input.MOUSE_TOUCH_COMBINE,position:null,speed:null,circle:null,scale:null,maxPointers:10,currentPointers:0,tapRate:200,doubleTapRate:300,holdRate:2000,justPressedRate:200,justReleasedRate:200,recordPointerHistory:false,recordRate:100,recordLimit:100,pointer1:null,pointer2:null,pointer3:null,pointer4:null,pointer5:null,pointer6:null,pointer7:null,pointer8:null,pointer9:null,pointer10:null,activePointer:null,mousePointer:null,mouse:null,keyboard:null,touch:null,mspointer:null,onDown:null,onUp:null,onTap:null,onHold:null,interactiveItems:new Phaser.LinkedList(),boot:function(){this.mousePointer=new Phaser.Pointer(this.game,0);this.pointer1=new Phaser.Pointer(this.game,1);this.pointer2=new Phaser.Pointer(this.game,2);this.mouse=new Phaser.Mouse(this.game);this.keyboard=new Phaser.Keyboard(this.game);this.touch=new Phaser.Touch(this.game);this.mspointer=new Phaser.MSPointer(this.game);this.onDown=new Phaser.Signal();this.onUp=new Phaser.Signal();this.onTap=new Phaser.Signal();this.onHold=new Phaser.Signal();this.scale=new Phaser.Point(1,1);this.speed=new Phaser.Point();this.position=new Phaser.Point();this._oldPosition=new Phaser.Point();this.circle=new Phaser.Circle(0,0,44);this.activePointer=this.mousePointer;this.currentPointers=0;this.hitCanvas=document.createElement("canvas");this.hitCanvas.width=1;this.hitCanvas.height=1;this.hitContext=this.hitCanvas.getContext("2d");this.mouse.start();this.keyboard.start();this.touch.start();this.mspointer.start();this.mousePointer.active=true},addPointer:function(){var c=0;for(var b=10;b>0;b--){if(this["pointer"+b]===null){c=b}}if(c==0){console.warn("You can only have 10 Pointer objects");return null}else{this["pointer"+c]=new Phaser.Pointer(this.game,c);return this["pointer"+c]}},update:function(){if(this.pollRate>0&&this._pollCounter0&&this._pollCounter=this.game.input.holdRate){if(this.game.input.multiInputOverride==Phaser.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==Phaser.Input.MOUSE_TOUCH_COMBINE||(this.game.input.multiInputOverride==Phaser.Input.TOUCH_OVERRIDES_MOUSE&&this.game.input.currentPointers==0)){this.game.input.onHold.dispatch(this)}this._holdSent=true}if(this.game.input.recordPointerHistory&&this.game.time.now>=this._nextDrop){this._nextDrop=this.game.time.now+this.game.input.recordRate;this._history.push({x:this.position.x,y:this.position.y});if(this._history.length>this.game.input.recordLimit){this._history.shift()}}}},move:function(c){if(this.game.input.pollLocked){return}if(c.button){this.button=c.button}this.clientX=c.clientX;this.clientY=c.clientY;this.pageX=c.pageX;this.pageY=c.pageY;this.screenX=c.screenX;this.screenY=c.screenY;this.x=(this.pageX-this.game.stage.offset.x)*this.game.input.scale.x;this.y=(this.pageY-this.game.stage.offset.y)*this.game.input.scale.y;this.position.setTo(this.x,this.y);this.circle.x=this.x;this.circle.y=this.y;if(this.game.input.multiInputOverride==Phaser.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==Phaser.Input.MOUSE_TOUCH_COMBINE||(this.game.input.multiInputOverride==Phaser.Input.TOUCH_OVERRIDES_MOUSE&&this.game.input.currentPointers==0)){this.game.input.activePointer=this;this.game.input.x=this.x;this.game.input.y=this.y;this.game.input.position.setTo(this.game.input.x,this.game.input.y);this.game.input.circle.x=this.game.input.x;this.game.input.circle.y=this.game.input.y}if(this.game.paused){return this}if(this.targetObject!==null&&this.targetObject.isDragged==true){if(this.targetObject.update(this)==false){this.targetObject=null}return this}this._highestRenderOrderID=-1;this._highestRenderObject=null;this._highestInputPriorityID=-1;if(this.game.input.interactiveItems.total>0){var b=this.game.input.interactiveItems.next;do{if(b.priorityID>this._highestInputPriorityID||(b.priorityID==this._highestInputPriorityID&&b.sprite.renderOrderID>this._highestRenderOrderID)){if(b.checkPointerOver(this)){this._highestRenderOrderID=b.sprite.renderOrderID;this._highestInputPriorityID=b.priorityID;this._highestRenderObject=b}}b=b.next}while(b!=null)}if(this._highestRenderObject==null){if(this.targetObject){this.targetObject._pointerOutHandler(this);this.targetObject=null}}else{if(this.targetObject==null){this.targetObject=this._highestRenderObject;this._highestRenderObject._pointerOverHandler(this)}else{if(this.targetObject==this._highestRenderObject){if(this._highestRenderObject.update(this)==false){this.targetObject=null}}else{this.targetObject._pointerOutHandler(this);this.targetObject=this._highestRenderObject;this.targetObject._pointerOverHandler(this)}}}return this},leave:function(b){this.withinGame=false;this.move(b)},stop:function(c){if(this._stateReset){c.preventDefault();return}this.timeUp=this.game.time.now;if(this.game.input.multiInputOverride==Phaser.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==Phaser.Input.MOUSE_TOUCH_COMBINE||(this.game.input.multiInputOverride==Phaser.Input.TOUCH_OVERRIDES_MOUSE&&this.game.input.currentPointers==0)){this.game.input.onUp.dispatch(this);if(this.duration>=0&&this.duration<=this.game.input.tapRate){if(this.timeUp-this.previousTapTime0){this.active=false}this.withinGame=false;this.isDown=false;this.isUp=true;if(this.isMouse==false){this.game.input.currentPointers--}if(this.game.input.interactiveItems.total>0){var b=this.game.input.interactiveItems.next;do{if(b){b._releasedHandler(this)}b=b.next}while(b!=null)}if(this.targetObject){this.targetObject._releasedHandler(this)}this.targetObject=null;return this},justPressed:function(b){b=b||this.game.input.justPressedRate;return(this.isDown===true&&(this.timeDown+b)>this.game.time.now)},justReleased:function(b){b=b||this.game.input.justReleasedRate;return(this.isUp===true&&(this.timeUp+b)>this.game.time.now)},reset:function(){if(this.isMouse==false){this.active=false}this.identifier=null;this.isDown=false;this.isUp=true;this.totalTouches=0;this._holdSent=false;this._history.length=0;this._stateReset=true;if(this.targetObject){this.targetObject._releasedHandler(this)}this.targetObject=null},toString:function(){return"[{Pointer (id="+this.id+" identifer="+this.identifier+" active="+this.active+" duration="+this.duration+" withinGame="+this.withinGame+" x="+this.x+" y="+this.y+" clientX="+this.clientX+" clientY="+this.clientY+" screenX="+this.screenX+" screenY="+this.screenY+" pageX="+this.pageX+" pageY="+this.pageY+")}]"}};Object.defineProperty(Phaser.Pointer.prototype,"duration",{get:function(){if(this.isUp){return -1}return this.game.time.now-this.timeDown}});Object.defineProperty(Phaser.Pointer.prototype,"worldX",{get:function(){return this.game.world.camera.x+this.x}});Object.defineProperty(Phaser.Pointer.prototype,"worldY",{get:function(){return this.game.world.camera.y+this.y}});Phaser.Touch=function(b){this.game=b;this.callbackContext=this.game;this.touchStartCallback=null;this.touchMoveCallback=null;this.touchEndCallback=null;this.touchEnterCallback=null;this.touchLeaveCallback=null;this.touchCancelCallback=null;this.preventDefault=true};Phaser.Touch.prototype={game:null,disabled:false,_onTouchStart:null,_onTouchMove:null,_onTouchEnd:null,_onTouchEnter:null,_onTouchLeave:null,_onTouchCancel:null,_onTouchMove:null,start:function(){var b=this;if(this.game.device.touch){this._onTouchStart=function(c){return b.onTouchStart(c)};this._onTouchMove=function(c){return b.onTouchMove(c)};this._onTouchEnd=function(c){return b.onTouchEnd(c)};this._onTouchEnter=function(c){return b.onTouchEnter(c)};this._onTouchLeave=function(c){return b.onTouchLeave(c)};this._onTouchCancel=function(c){return b.onTouchCancel(c)};this.game.renderer.view.addEventListener("touchstart",this._onTouchStart,false);this.game.renderer.view.addEventListener("touchmove",this._onTouchMove,false);this.game.renderer.view.addEventListener("touchend",this._onTouchEnd,false);this.game.renderer.view.addEventListener("touchenter",this._onTouchEnter,false);this.game.renderer.view.addEventListener("touchleave",this._onTouchLeave,false);this.game.renderer.view.addEventListener("touchcancel",this._onTouchCancel,false)}},consumeDocumentTouches:function(){this._documentTouchMove=function(b){b.preventDefault()};document.addEventListener("touchmove",this._documentTouchMove,false)},onTouchStart:function(c){if(this.touchStartCallback){this.touchStartCallback.call(this.callbackContext,c)}if(this.game.input.disabled||this.disabled){return}if(this.preventDefault){c.preventDefault()}for(var b=0;bb&&this._tempPoint.xc&&this._tempPoint.y=this.pixelPerfectAlpha){return true}}return false},update:function(b){if(this.enabled==false||this.sprite.visible==false){this._pointerOutHandler(b);return false}if(this.draggable&&this._draggedPointerID==b.id){return this.updateDrag(b)}else{if(this._pointerData[b.id].isOver==true){if(this.checkPointerOver(b)){this._pointerData[b.id].x=b.x-this.sprite.x;this._pointerData[b.id].y=b.y-this.sprite.y;return true}else{this._pointerOutHandler(b);return false}}}},_pointerOverHandler:function(b){if(this._pointerData[b.id].isOver==false){this._pointerData[b.id].isOver=true;this._pointerData[b.id].isOut=false;this._pointerData[b.id].timeOver=this.game.time.now;this._pointerData[b.id].x=b.x-this.sprite.x;this._pointerData[b.id].y=b.y-this.sprite.y;if(this.useHandCursor&&this._pointerData[b.id].isDragged==false){this.game.stage.canvas.style.cursor="pointer"}this.sprite.events.onInputOver.dispatch(this.sprite,b)}},_pointerOutHandler:function(b){this._pointerData[b.id].isOver=false;this._pointerData[b.id].isOut=true;this._pointerData[b.id].timeOut=this.game.time.now;if(this.useHandCursor&&this._pointerData[b.id].isDragged==false){this.game.stage.canvas.style.cursor="default"}this.sprite.events.onInputOut.dispatch(this.sprite,b)},_touchedHandler:function(b){if(this._pointerData[b.id].isDown==false&&this._pointerData[b.id].isOver==true){this._pointerData[b.id].isDown=true;this._pointerData[b.id].isUp=false;this._pointerData[b.id].timeDown=this.game.time.now;this.sprite.events.onInputDown.dispatch(this.sprite,b);if(this.draggable&&this.isDragged==false){this.startDrag(b)}if(this.bringToTop){this.sprite.bringToTop()}}return this.consumePointerEvent},_releasedHandler:function(b){if(this._pointerData[b.id].isDown&&b.isUp){this._pointerData[b.id].isDown=false;this._pointerData[b.id].isUp=true;this._pointerData[b.id].timeUp=this.game.time.now;this._pointerData[b.id].downDuration=this._pointerData[b.id].timeUp-this._pointerData[b.id].timeDown;if(this.checkPointerOver(b)){this.sprite.events.onInputUp.dispatch(this.sprite,b)}else{if(this.useHandCursor){this.game.stage.canvas.style.cursor="default"}}if(this.draggable&&this.isDragged&&this._draggedPointerID==b.id){this.stopDrag(b)}}},updateDrag:function(b){if(b.isUp){this.stopDrag(b);return false}if(this.allowHorizontalDrag){this.sprite.x=b.x+this._dragPoint.x+this.dragOffset.x}if(this.allowVerticalDrag){this.sprite.y=b.y+this._dragPoint.y+this.dragOffset.y}if(this.boundsRect){this.checkBoundsRect()}if(this.boundsSprite){this.checkBoundsSprite()}if(this.snapOnDrag){this.sprite.x=Math.floor(this.sprite.x/this.snapX)*this.snapX;this.sprite.y=Math.floor(this.sprite.y/this.snapY)*this.snapY}return true},justOver:function(c,b){c=c||0;b=b||500;return(this._pointerData[c].isOver&&this.overDuration(c)this.boundsRect.right){this.sprite.x=this.boundsRect.right-this.sprite.width}}if(this.sprite.ythis.boundsRect.bottom){this.sprite.y=this.boundsRect.bottom-this.sprite.height}}},checkBoundsSprite:function(){if(this.sprite.x(this.boundsSprite.x+this.boundsSprite.width)){this.sprite.x=(this.boundsSprite.x+this.boundsSprite.width)-this.sprite.width}}if(this.sprite.y(this.boundsSprite.y+this.boundsSprite.height)){this.sprite.y=(this.boundsSprite.y+this.boundsSprite.height)-this.sprite.height}}}};Phaser.Canvas={create:function(d,b){d=d||256;b=b||256;var c=document.createElement("canvas");c.width=d;c.height=b;c.style.display="block";return c},getOffset:function(c,b){b=b||new Phaser.Point;var d=c.getBoundingClientRect();var h=c.clientTop||document.body.clientTop||0;var g=c.clientLeft||document.body.clientLeft||0;var e=window.pageYOffset||c.scrollTop||document.body.scrollTop;var f=window.pageXOffset||c.scrollLeft||document.body.scrollLeft;b.x=d.left+f-g;b.y=d.top+e-h;return b},getAspectRatio:function(b){return b.width/b.height},setBackgroundColor:function(c,b){b=b||"rgb(0,0,0)";c.style.backgroundColor=b;return c},setTouchAction:function(b,c){c=c||"none";b.style.msTouchAction=c;b.style["ms-touch-action"]=c;b.style["touch-action"]=c;return b},addToDOM:function(b,c,d){c=c||"";d=d||true;if(c!==""){if(document.getElementById(c)){document.getElementById(c).appendChild(b)}else{document.body.appendChild(b)}if(d){document.getElementById(c).style.overflow="hidden"}}else{document.body.appendChild(b)}return b},setTransform:function(f,h,g,d,b,e,c){f.setTransform(d,e,c,b,h,g);return f},setSmoothingEnabled:function(b,c){b.imageSmoothingEnabled=c;b.mozImageSmoothingEnabled=c;b.oImageSmoothingEnabled=c;b.webkitImageSmoothingEnabled=c;b.msImageSmoothingEnabled=c;return b},setImageRenderingCrisp:function(b){b.style["image-rendering"]="crisp-edges";b.style["image-rendering"]="-moz-crisp-edges";b.style["image-rendering"]="-webkit-optimize-contrast";b.style.msInterpolationMode="nearest-neighbor";return b},setImageRenderingBicubic:function(b){b.style["image-rendering"]="auto";b.style.msInterpolationMode="bicubic";return b}};Phaser.Events=function(b){this.parent=b;this.onAddedToGroup=new Phaser.Signal;this.onRemovedFromGroup=new Phaser.Signal;this.onKilled=new Phaser.Signal;this.onRevived=new Phaser.Signal;this.onOutOfBounds=new Phaser.Signal;this.onInputOver=null;this.onInputOut=null;this.onInputDown=null;this.onInputUp=null;this.onDragStart=null;this.onDragStop=null;this.onAnimationStart=null;this.onAnimationComplete=null;this.onAnimationLoop=null};Phaser.GameObjectFactory=function(b){this.game=b;this.world=this.game.world};Phaser.GameObjectFactory.prototype={game:null,world:null,existing:function(b){return this.world.group.add(b)},sprite:function(b,e,c,d){return this.world.group.add(new Phaser.Sprite(this.game,b,e,c,d))},child:function(d,b,g,c,e){var f=this.world.group.add(new Phaser.Sprite(this.game,b,g,c,e));d.addChild(f);return f},tween:function(b){return this.game.tweens.create(b)},group:function(c,b){return new Phaser.Group(this.game,c,b)},audio:function(c,d,b){return this.game.sound.add(c,d,b)},tileSprite:function(c,g,e,b,d,f){return this.world.group.add(new Phaser.TileSprite(this.game,c,g,e,b,d,f))},text:function(b,e,d,c){return this.world.group.add(new Phaser.Text(this.game,b,e,d,c))},button:function(b,i,g,h,e,d,f,c){return this.world.group.add(new Phaser.Button(this.game,b,i,g,h,e,d,f,c))},graphics:function(b,c){return this.world.group.add(new Phaser.Graphics(this.game,b,c))},emitter:function(b,d,c){return this.game.particles.add(new Phaser.Particles.Arcade.Emitter(this.game,b,d,c))},bitmapText:function(b,e,d,c){return this.world.group.add(new Phaser.BitmapText(this.game,b,e,d,c))},tilemap:function(b,g,d,e,f,c){return this.world.group.add(new Phaser.Tilemap(this.game,d,b,g,e,f,c))},renderTexture:function(c,d,b){var e=new Phaser.RenderTexture(this.game,c,d,b);this.game.cache.addRenderTexture(c,e);return e}};Phaser.Sprite=function(c,b,f,d,e){b=b||0;f=f||0;d=d||null;e=e||null;this.game=c;this.exists=true;this.alive=true;this.group=null;this.name="";this.type=Phaser.SPRITE;this.renderOrderID=-1;this.lifespan=0;this.events=new Phaser.Events(this);this.animations=new Phaser.AnimationManager(this);this.input=new Phaser.InputHandler(this);this.key=d;if(d instanceof Phaser.RenderTexture){PIXI.Sprite.call(this,d);this.currentFrame=this.game.cache.getTextureFrame(d.name)}else{if(d==null||this.game.cache.checkImageKey(d)==false){d="__default"}PIXI.Sprite.call(this,PIXI.TextureCache[d]);if(this.game.cache.isSpriteSheet(d)){this.animations.loadFrameData(this.game.cache.getFrameData(d));if(e!==null){if(typeof e==="string"){this.frameName=e}else{this.frame=e}}}else{this.currentFrame=this.game.cache.getFrame(d)}}this.anchor=new Phaser.Point();this._cropUUID=null;this._cropRect=null;this.x=b;this.y=f;this.position.x=b;this.position.y=f;this.autoCull=false;this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:f,id:1,i01:0,i10:0,idi:1,left:null,right:null,top:null,bottom:null,x:-1,y:-1,scaleX:1,scaleY:1,width:this.currentFrame.sourceSizeW,height:this.currentFrame.sourceSizeH,halfWidth:Math.floor(this.currentFrame.sourceSizeW/2),halfHeight:Math.floor(this.currentFrame.sourceSizeH/2),frameID:this.currentFrame.uuid,frameWidth:this.currentFrame.width,frameHeight:this.currentFrame.height,boundsX:0,boundsY:0,cameraVisible:true};this.offset=new Phaser.Point;this.center=new Phaser.Point(b+Math.floor(this._cache.width/2),f+Math.floor(this._cache.height/2));this.topLeft=new Phaser.Point(b,f);this.topRight=new Phaser.Point(b+this._cache.width,f);this.bottomRight=new Phaser.Point(b+this._cache.width,f+this._cache.height);this.bottomLeft=new Phaser.Point(b,f+this._cache.height);this.bounds=new Phaser.Rectangle(b,f,this._cache.width,this._cache.height);this.body=new Phaser.Physics.Arcade.Body(this);this.velocity=this.body.velocity;this.acceleration=this.body.acceleration;this.inWorld=Phaser.Rectangle.intersects(this.bounds,this.game.world.bounds);this.inWorldThreshold=0;this._outOfBoundsFired=false};Phaser.Sprite.prototype=Object.create(PIXI.Sprite.prototype);Phaser.Sprite.prototype.constructor=Phaser.Sprite;Phaser.Sprite.prototype.preUpdate=function(){if(!this.exists){this.renderOrderID=-1;return}if(this.lifespan>0){this.lifespan-=this.game.time.elapsed;if(this.lifespan<=0){this.kill();return}}this._cache.dirty=false;if(this.animations.update()){this._cache.dirty=true}this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}if(this.visible){this.renderOrderID=this.game.world.currentRenderOrderID++;if(this.worldTransform[0]!=this._cache.a00||this.worldTransform[1]!=this._cache.a01){this._cache.a00=this.worldTransform[0];this._cache.a01=this.worldTransform[1];this._cache.i01=this.worldTransform[1];this._cache.scaleX=Math.sqrt((this._cache.a00*this._cache.a00)+(this._cache.a01*this._cache.a01));this._cache.a01*=-1;this._cache.dirty=true}if(this.worldTransform[3]!=this._cache.a10||this.worldTransform[4]!=this._cache.a11){this._cache.a10=this.worldTransform[3];this._cache.i10=this.worldTransform[3];this._cache.a11=this.worldTransform[4];this._cache.scaleY=Math.sqrt((this._cache.a10*this._cache.a10)+(this._cache.a11*this._cache.a11));this._cache.a10*=-1;this._cache.dirty=true}if(this.worldTransform[2]!=this._cache.a02||this.worldTransform[5]!=this._cache.a12){this._cache.a02=this.worldTransform[2];this._cache.a12=this.worldTransform[5];this._cache.dirty=true}if(this.currentFrame.uuid!=this._cache.frameID){this._cache.frameWidth=this.texture.frame.width;this._cache.frameHeight=this.texture.frame.height;this._cache.frameID=this.currentFrame.uuid;this._cache.dirty=true}if(this._cache.dirty){this._cache.width=Math.floor(this.currentFrame.sourceSizeW*this._cache.scaleX);this._cache.height=Math.floor(this.currentFrame.sourceSizeH*this._cache.scaleY);this._cache.halfWidth=Math.floor(this._cache.width/2);this._cache.halfHeight=Math.floor(this._cache.height/2);this._cache.id=1/(this._cache.a00*this._cache.a11+this._cache.a01*-this._cache.a10);this._cache.idi=1/(this._cache.a00*this._cache.a11+this._cache.i01*-this._cache.i10);this.updateBounds()}}else{if(this._cache.dirty&&this.visible==false){this.bounds.x-=this._cache.boundsX-this._cache.x;this._cache.boundsX=this._cache.x;this.bounds.y-=this._cache.boundsy-this._cache.y;this._cache.boundsY=this._cache.y}}if(this._cache.dirty){this._cache.cameraVisible=Phaser.Rectangle.intersects(this.game.world.camera.screenView,this.bounds,0);if(this.autoCull==true){this.visible=this._cache.cameraVisible}this.body.updateBounds(this.center.x,this.center.y,this._cache.scaleX,this._cache.scaleY)}this.body.update()};Phaser.Sprite.prototype.revive=function(){this.alive=true;this.exists=true;this.visible=true;this.events.onRevived.dispatch(this)};Phaser.Sprite.prototype.kill=function(){this.alive=false;this.exists=false;this.visible=false;this.events.onKilled.dispatch(this)};Phaser.Sprite.prototype.reset=function(b,c){this.x=b;this.y=c;this.position.x=b;this.position.y=c;this.alive=true;this.exists=true;this.visible=true;this._outOfBoundsFired=false;this.body.reset()};Phaser.Sprite.prototype.updateBounds=function(){this.offset.setTo(this._cache.a02-(this.anchor.x*this._cache.width),this._cache.a12-(this.anchor.y*this._cache.height));this.getLocalPosition(this.center,this.offset.x+this._cache.halfWidth,this.offset.y+this._cache.halfHeight);this.getLocalPosition(this.topLeft,this.offset.x,this.offset.y);this.getLocalPosition(this.topRight,this.offset.x+this._cache.width,this.offset.y);this.getLocalPosition(this.bottomLeft,this.offset.x,this.offset.y+this._cache.height);this.getLocalPosition(this.bottomRight,this.offset.x+this._cache.width,this.offset.y+this._cache.height);this._cache.left=Phaser.Math.min(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);this._cache.right=Phaser.Math.max(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);this._cache.top=Phaser.Math.min(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);this._cache.bottom=Phaser.Math.max(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);this.bounds.setTo(this._cache.left,this._cache.top,this._cache.right-this._cache.left,this._cache.bottom-this._cache.top);this._cache.boundsX=this._cache.x;this._cache.boundsY=this._cache.y;if(this.inWorld==false){this.inWorld=Phaser.Rectangle.intersects(this.bounds,this.game.world.bounds,this.inWorldThreshold);if(this.inWorld){this._outOfBoundsFired=false}}else{this.inWorld=Phaser.Rectangle.intersects(this.bounds,this.game.world.bounds,this.inWorldThreshold);if(this.inWorld==false){this.events.onOutOfBounds.dispatch(this);this._outOfBoundsFired=true}}};Phaser.Sprite.prototype.getLocalPosition=function(c,b,d){c.x=((this._cache.a11*this._cache.id*b+-this._cache.a01*this._cache.id*d+(this._cache.a12*this._cache.a01-this._cache.a02*this._cache.a11)*this._cache.id)*this._cache.scaleX)+this._cache.a02;c.y=((this._cache.a00*this._cache.id*d+-this._cache.a10*this._cache.id*b+(-this._cache.a12*this._cache.a00+this._cache.a02*this._cache.a10)*this._cache.id)*this._cache.scaleY)+this._cache.a12;return c};Phaser.Sprite.prototype.getLocalUnmodifiedPosition=function(c,b,d){c.x=this._cache.a11*this._cache.idi*b+-this._cache.i01*this._cache.idi*d+(this._cache.a12*this._cache.i01-this._cache.a02*this._cache.a11)*this._cache.idi;c.y=this._cache.a00*this._cache.idi*d+-this._cache.i10*this._cache.idi*b+(-this._cache.a12*this._cache.a00+this._cache.a02*this._cache.i10)*this._cache.idi;return c};Phaser.Sprite.prototype.bringToTop=function(){if(this.group){this.group.bringToTop(this)}else{this.game.world.bringToTop(this)}};Phaser.Sprite.prototype.getBounds=function(d){d=d||new Phaser.Rectangle;var f=Phaser.Math.min(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);var c=Phaser.Math.max(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);var e=Phaser.Math.min(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);var b=Phaser.Math.max(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);d.x=f;d.y=e;d.width=c-f;d.height=b-e;return d};Object.defineProperty(Phaser.Sprite.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.Sprite.prototype,"frame",{get:function(){return this.animations.frame},set:function(b){this.animations.frame=b}});Object.defineProperty(Phaser.Sprite.prototype,"frameName",{get:function(){return this.animations.frameName},set:function(b){this.animations.frameName=b}});Object.defineProperty(Phaser.Sprite.prototype,"inCamera",{get:function(){return this._cache.cameraVisible}});Object.defineProperty(Phaser.Sprite.prototype,"crop",{get:function(){return this._cropRect},set:function(b){if(b instanceof Phaser.Rectangle){if(this._cropUUID==null){this._cropUUID=this.game.rnd.uuid();PIXI.TextureCache[this._cropUUID]=new PIXI.Texture(PIXI.BaseTextureCache[this.key],{x:b.x,y:b.y,width:b.width,height:b.height})}else{PIXI.TextureCache[this._cropUUID].frame=b}this._cropRect=b;this.setTexture(PIXI.TextureCache[this._cropUUID])}}});Object.defineProperty(Phaser.Sprite.prototype,"inputEnabled",{get:function(){return(this.input.enabled)},set:function(b){if(b){if(this.input.enabled==false){this.input.start()}}else{if(this.input.enabled){this.input.stop()}}}});Phaser.TileSprite=function(d,c,h,f,b,e,g){c=c||0;h=h||0;f=f||256;b=b||256;e=e||null;g=g||null;Phaser.Sprite.call(this,d,c,h,e,g);this.texture=PIXI.TextureCache[e];PIXI.TilingSprite.call(this,this.texture,f,b);this.type=Phaser.TILESPRITE;this.tileScale=new Phaser.Point(1,1);this.tilePosition=new Phaser.Point(0,0)};Phaser.TileSprite.prototype=Phaser.Utils.extend(true,PIXI.TilingSprite.prototype,Phaser.Sprite.prototype);Phaser.TileSprite.prototype.constructor=Phaser.TileSprite;Phaser.Text=function(c,b,g,f,d){b=b||0;g=g||0;f=f||"";d=d||"";this.canvas=document.createElement("canvas");this.context=this.canvas.getContext("2d");var e=c.rnd.uuid();PIXI.TextureCache[e]=new PIXI.Texture(new PIXI.BaseTexture(this.canvas));Phaser.Sprite.call(this,c,b,g,e);this.type=Phaser.TEXT;this.setText(f);this.setStyle(d);this.updateText();this.dirty=false};Phaser.Text.prototype=Phaser.Utils.extend(true,Phaser.Sprite.prototype,PIXI.Text.prototype);Phaser.Text.prototype.constructor=Phaser.Text;Phaser.Button=function(j,g,f,h,i,c,d,b,e){g=g||0;f=f||0;h=h||null;i=i||null;c=c||this;Phaser.Sprite.call(this,j,g,f,h,b);this.type=Phaser.BUTTON;this._onOverFrameName=null;this._onOutFrameName=null;this._onDownFrameName=null;this._onUpFrameName=null;this._onOverFrameID=null;this._onOutFrameID=null;this._onDownFrameID=null;this._onUpFrameID=null;this.onInputOver=new Phaser.Signal;this.onInputOut=new Phaser.Signal;this.onInputDown=new Phaser.Signal;this.onInputUp=new Phaser.Signal;this.setFrames(d,b,e);if(i!==null){this.onInputUp.add(i,c)}this.input.start(0,false,true);this.events.onInputOver.add(this.onInputOverHandler,this);this.events.onInputOut.add(this.onInputOutHandler,this);this.events.onInputDown.add(this.onInputDownHandler,this);this.events.onInputUp.add(this.onInputUpHandler,this)};Phaser.Button.prototype=Phaser.Utils.extend(true,Phaser.Sprite.prototype,PIXI.Sprite.prototype);Phaser.Button.prototype.constructor=Phaser.Button;Phaser.Button.prototype.setFrames=function(c,d,b){if(c!==null){if(typeof c==="string"){this._onOverFrameName=c}else{this._onOverFrameID=c}}if(d!==null){if(typeof d==="string"){this._onOutFrameName=d;this._onUpFrameName=d}else{this._onOutFrameID=d;this._onUpFrameID=d}}if(b!==null){if(typeof b==="string"){this._onDownFrameName=b}else{this._onDownFrameID=b}}};Phaser.Button.prototype.onInputOverHandler=function(b){if(this._onOverFrameName!=null){this.frameName=this._onOverFrameName}else{if(this._onOverFrameID!=null){this.frame=this._onOverFrameID}}if(this.onInputOver){this.onInputOver.dispatch(this,b)}};Phaser.Button.prototype.onInputOutHandler=function(b){if(this._onOutFrameName!=null){this.frameName=this._onOutFrameName}else{if(this._onOutFrameID!=null){this.frame=this._onOutFrameID}}if(this.onInputOut){this.onInputOut.dispatch(this,b)}};Phaser.Button.prototype.onInputDownHandler=function(b){if(this._onDownFrameName!=null){this.frameName=this._onDownFrameName}else{if(this._onDownFrameID!=null){this.frame=this._onDownFrameID}}if(this.onInputDown){this.onInputDown.dispatch(this,b)}};Phaser.Button.prototype.onInputUpHandler=function(b){if(this._onUpFrameName!=null){this.frameName=this._onUpFrameName}else{if(this._onUpFrameID!=null){this.frame=this._onUpFrameID}}if(this.onInputUp){this.onInputUp.dispatch(this,b)}};Phaser.Graphics=function(c,b,d){this.exists=true;this.alive=true;this.group=null;this.name="";this.game=c;PIXI.DisplayObjectContainer.call(this);this.type=Phaser.GRAPHICS;this.position.x=b;this.position.y=d;this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:d,id:1,x:-1,y:-1,scaleX:1,scaleY:1};this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);this.renderable=true;this.fillAlpha=1;this.lineWidth=0;this.lineColor="black";this.graphicsData=[];this.currentPath={points:[]}};Phaser.Graphics.prototype=Phaser.Utils.extend(true,PIXI.Graphics.prototype,PIXI.DisplayObjectContainer.prototype,Phaser.Sprite.prototype);Phaser.Graphics.prototype.constructor=Phaser.Graphics;Phaser.Graphics.prototype.update=function(){if(!this.exists){return}this._cache.dirty=false;this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}};Object.defineProperty(Phaser.Graphics.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.Graphics.prototype,"x",{get:function(){return this.position.x},set:function(b){this.position.x=b}});Object.defineProperty(Phaser.Graphics.prototype,"y",{get:function(){return this.position.y},set:function(b){this.position.y=b}});Phaser.RenderTexture=function(c,d,e,b){this.game=c;this.name=d;PIXI.EventTarget.call(this);this.width=e||100;this.height=b||100;this.indetityMatrix=PIXI.mat3.create();this.frame=new PIXI.Rectangle(0,0,this.width,this.height);this.type=Phaser.RENDERTEXTURE;if(PIXI.gl){this.initWebGL()}else{this.initCanvas()}};Phaser.RenderTexture.prototype=Phaser.Utils.extend(true,PIXI.RenderTexture.prototype);Phaser.RenderTexture.prototype.constructor=Phaser.RenderTexture;Phaser.BitmapText=function(c,b,f,e,d){b=b||0;f=f||0;e=e||"";d=d||"";this.exists=true;this.alive=true;this.group=null;this.name="";this.game=c;PIXI.BitmapText.call(this,e,d);this.position.x=b;this.position.y=f;this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:f,id:1,x:-1,y:-1,scaleX:1,scaleY:1};this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);this.renderable=true};Phaser.BitmapText.prototype=Phaser.Utils.extend(true,PIXI.BitmapText.prototype);Phaser.BitmapText.prototype.constructor=Phaser.BitmapText;Phaser.BitmapText.prototype.update=function(){if(!this.exists){return}this._cache.dirty=false;this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}};Object.defineProperty(Phaser.BitmapText.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.BitmapText.prototype,"x",{get:function(){return this.position.x},set:function(b){this.position.x=b}});Object.defineProperty(Phaser.BitmapText.prototype,"y",{get:function(){return this.position.y},set:function(b){this.position.y=b}});Phaser.Canvas={create:function(d,b){d=d||256;b=b||256;var c=document.createElement("canvas");c.width=d;c.height=b;c.style.display="block";return c},getOffset:function(c,b){b=b||new Phaser.Point;var d=c.getBoundingClientRect();var h=c.clientTop||document.body.clientTop||0;var g=c.clientLeft||document.body.clientLeft||0;var e=window.pageYOffset||c.scrollTop||document.body.scrollTop;var f=window.pageXOffset||c.scrollLeft||document.body.scrollLeft;b.x=d.left+f-g;b.y=d.top+e-h;return b},getAspectRatio:function(b){return b.width/b.height},setBackgroundColor:function(c,b){b=b||"rgb(0,0,0)";c.style.backgroundColor=b;return c},setTouchAction:function(b,c){c=c||"none";b.style.msTouchAction=c;b.style["ms-touch-action"]=c;b.style["touch-action"]=c;return b},addToDOM:function(b,c,d){c=c||"";d=d||true;if(c!==""){if(document.getElementById(c)){document.getElementById(c).appendChild(b)}else{document.body.appendChild(b)}if(d){document.getElementById(c).style.overflow="hidden"}}else{document.body.appendChild(b)}return b},setTransform:function(f,h,g,d,b,e,c){f.setTransform(d,e,c,b,h,g);return f},setSmoothingEnabled:function(b,c){b.imageSmoothingEnabled=c;b.mozImageSmoothingEnabled=c;b.oImageSmoothingEnabled=c;b.webkitImageSmoothingEnabled=c;b.msImageSmoothingEnabled=c;return b},setImageRenderingCrisp:function(b){b.style["image-rendering"]="crisp-edges";b.style["image-rendering"]="-moz-crisp-edges";b.style["image-rendering"]="-webkit-optimize-contrast";b.style.msInterpolationMode="nearest-neighbor";return b},setImageRenderingBicubic:function(b){b.style["image-rendering"]="auto";b.style.msInterpolationMode="bicubic";return b}};Phaser.StageScaleMode=function(c,d,b){this._startHeight=0;this.forceLandscape=false;this.forcePortrait=false;this.incorrectOrientation=false;this.pageAlignHorizontally=false;this.pageAlignVeritcally=false;this.minWidth=null;this.maxWidth=null;this.minHeight=null;this.maxHeight=null;this.width=0;this.height=0;this.maxIterations=5;this.game=c;this.enterLandscape=new Phaser.Signal();this.enterPortrait=new Phaser.Signal();if(window.orientation){this.orientation=window.orientation}else{if(window.outerWidth>window.outerHeight){this.orientation=90}else{this.orientation=0}}this.scaleFactor=new Phaser.Point(1,1);this.aspectRatio=0;var e=this;window.addEventListener("orientationchange",function(f){return e.checkOrientation(f)},false);window.addEventListener("resize",function(f){return e.checkResize(f)},false)};Phaser.StageScaleMode.EXACT_FIT=0;Phaser.StageScaleMode.NO_SCALE=1;Phaser.StageScaleMode.SHOW_ALL=2;Phaser.StageScaleMode.prototype={startFullScreen:function(){if(this.isFullScreen){return}var b=this.game.canvas;if(b.requestFullScreen){b.requestFullScreen()}else{if(b.mozRequestFullScreen){b.mozRequestFullScreen()}else{if(b.webkitRequestFullScreen){b.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}}}this.game.stage.canvas.style.width="100%";this.game.stage.canvas.style.height="100%"},stopFullScreen:function(){if(document.cancelFullScreen){document.cancelFullScreen()}else{if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else{if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}}}},checkOrientationState:function(){if(this.incorrectOrientation){if((this.forceLandscape&&window.innerWidth>window.innerHeight)||(this.forcePortrait&&window.innerHeight>window.innerWidth)){this.game.paused=false;this.incorrectOrientation=false;this.refresh()}}else{if((this.forceLandscape&&window.innerWidthwindow.outerHeight){this.orientation=90}else{this.orientation=0}if(this.isLandscape){this.enterLandscape.dispatch(this.orientation,true,false)}else{this.enterPortrait.dispatch(this.orientation,false,true)}if(this.game.stage.scaleMode!==Phaser.StageScaleMode.NO_SCALE){this.refresh()}},refresh:function(){var b=this;if(this.game.device.iPad==false&&this.game.device.webApp==false&&this.game.device.desktop==false){if(this.game.device.android&&this.game.device.chrome==false){window.scrollTo(0,1)}else{window.scrollTo(0,0)}}if(this._check==null&&this.maxIterations>0){this._iterations=this.maxIterations;this._check=window.setInterval(function(){return b.setScreenSize()},10);this.setScreenSize()}},setScreenSize:function(b){if(typeof b=="undefined"){b=false}if(this.game.device.iPad==false&&this.game.device.webApp==false&&this.game.device.desktop==false){if(this.game.device.android&&this.game.device.chrome==false){window.scrollTo(0,1)}else{window.scrollTo(0,0)}}this._iterations--;if(b||window.innerHeight>this._startHeight||this._iterations<0){document.documentElement.style.minHeight=window.innerHeight+"px";if(this.incorrectOrientation==true){this.setMaximum()}else{if(this.game.stage.scaleMode==Phaser.StageScaleMode.EXACT_FIT){this.setExactFit()}else{if(this.game.stage.scaleMode==Phaser.StageScaleMode.SHOW_ALL){this.setShowAll()}}}this.setSize();clearInterval(this._check);this._check=null}},setSize:function(){if(this.incorrectOrientation==false){if(this.maxWidth&&this.width>this.maxWidth){this.width=this.maxWidth}if(this.maxHeight&&this.height>this.maxHeight){this.height=this.maxHeight}if(this.minWidth&&this.widththis.maxWidth){this.width=this.maxWidth}else{this.width=b}if(this.maxHeight&&c>this.maxHeight){this.height=this.maxHeight}else{this.height=c}console.log("setExactFit",this.width,this.height,this.game.stage.offset)}};Object.defineProperty(Phaser.StageScaleMode.prototype,"isFullScreen",{get:function(){if(document.fullscreenElement===null||document.mozFullScreenElement===null||document.webkitFullscreenElement===null){return false}return true}});Object.defineProperty(Phaser.StageScaleMode.prototype,"isPortrait",{get:function(){return this.orientation==0||this.orientation==180}});Object.defineProperty(Phaser.StageScaleMode.prototype,"isLandscape",{get:function(){return this.orientation===90||this.orientation===-90}});Phaser.Device=function(){this.patchAndroidClearRectBug=false;this.desktop=false;this.iOS=false;this.android=false;this.chromeOS=false;this.linux=false;this.macOS=false;this.windows=false;this.canvas=false;this.file=false;this.fileSystem=false;this.localStorage=false;this.webGL=false;this.worker=false;this.touch=false;this.mspointer=false;this.css3D=false;this.pointerLock=false;this.arora=false;this.chrome=false;this.epiphany=false;this.firefox=false;this.ie=false;this.ieVersion=0;this.mobileSafari=false;this.midori=false;this.opera=false;this.safari=false;this.webApp=false;this.audioData=false;this.webAudio=false;this.ogg=false;this.opus=false;this.mp3=false;this.wav=false;this.m4a=false;this.webm=false;this.iPhone=false;this.iPhone4=false;this.iPad=false;this.pixelRatio=0;this._checkAudio();this._checkBrowser();this._checkCSS3D();this._checkDevice();this._checkFeatures();this._checkOS()};Phaser.Device.prototype={_checkOS:function(){var b=navigator.userAgent;if(/Android/.test(b)){this.android=true}else{if(/CrOS/.test(b)){this.chromeOS=true}else{if(/iP[ao]d|iPhone/i.test(b)){this.iOS=true}else{if(/Linux/.test(b)){this.linux=true}else{if(/Mac OS/.test(b)){this.macOS=true}else{if(/Windows/.test(b)){this.windows=true}}}}}}if(this.windows||this.macOS||this.linux){this.desktop=true}},_checkFeatures:function(){this.canvas=!!window.CanvasRenderingContext2D;try{this.localStorage=!!localStorage.getItem}catch(b){this.localStorage=false}this.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob;this.fileSystem=!!window.requestFileSystem;this.webGL=(function(){try{return !!window.WebGLRenderingContext&&!!document.createElement("canvas").getContext("experimental-webgl")}catch(c){return false}})();this.worker=!!window.Worker;if("ontouchstart" in document.documentElement||window.navigator.msPointerEnabled){this.touch=true}if(window.navigator.msPointerEnabled){this.mspointer=true}this.pointerLock="pointerLockElement" in document||"mozPointerLockElement" in document||"webkitPointerLockElement" in document},_checkBrowser:function(){var b=navigator.userAgent;if(/Arora/.test(b)){this.arora=true}else{if(/Chrome/.test(b)){this.chrome=true}else{if(/Epiphany/.test(b)){this.epiphany=true}else{if(/Firefox/.test(b)){this.firefox=true}else{if(/Mobile Safari/.test(b)){this.mobileSafari=true}else{if(/MSIE (\d+\.\d+);/.test(b)){this.ie=true;this.ieVersion=parseInt(RegExp.$1)}else{if(/Midori/.test(b)){this.midori=true}else{if(/Opera/.test(b)){this.opera=true}else{if(/Safari/.test(b)){this.safari=true}}}}}}}}}if(navigator.standalone){this.webApp=true}},_checkAudio:function(){this.audioData=!!(window.Audio);this.webAudio=!!(window.webkitAudioContext||window.AudioContext);var d=document.createElement("audio");var b=false;try{if(b=!!d.canPlayType){if(d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")){this.ogg=true}if(d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")){this.opus=true}if(d.canPlayType("audio/mpeg;").replace(/^no$/,"")){this.mp3=true}if(d.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")){this.wav=true}if(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/aac;").replace(/^no$/,"")){this.m4a=true}if(d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")){this.webm=true}}}catch(c){}},_checkDevice:function(){this.pixelRatio=window.devicePixelRatio||1;this.iPhone=navigator.userAgent.toLowerCase().indexOf("iphone")!=-1;this.iPhone4=(this.pixelRatio==2&&this.iPhone);this.iPad=navigator.userAgent.toLowerCase().indexOf("ipad")!=-1},_checkCSS3D:function(){var d=document.createElement("p");var e;var c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(d,null);for(var b in c){if(d.style[b]!==undefined){d.style[b]="translate3d(1px,1px,1px)";e=window.getComputedStyle(d).getPropertyValue(c[b])}}document.body.removeChild(d);this.css3D=(e!==undefined&&e.length>0&&e!=="none")},canPlayAudio:function(b){if(b=="mp3"&&this.mp3){return true}else{if(b=="ogg"&&(this.ogg||this.opus)){return true}else{if(b=="m4a"&&this.m4a){return true}else{if(b=="wav"&&this.wav){return true}else{if(b=="webm"&&this.webm){return true}}}}}return false},isConsoleOpen:function(){if(window.console&&window.console.firebug){return true}if(window.console){console.profile();console.profileEnd();if(console.clear){console.clear()}return console.profiles.length>0}return false}};Phaser.RequestAnimationFrame=function(c){this.game=c;this._isSetTimeOut=false;this.isRunning=false;var d=["ms","moz","webkit","o"];for(var b=0;b>>0;c-=e;c*=e;e=c>>>0;c-=e;e+=c*4294967296}return(e>>>0)*2.3283064365386963e-10},integer:function(){return this.rnd.apply(this)*4294967296},frac:function(){return this.rnd.apply(this)+(this.rnd.apply(this)*2097152|0)*1.1102230246251565e-16},real:function(){return this.integer()+this.frac()},integerInRange:function(c,b){return Math.floor(this.realInRange(c,b))},realInRange:function(c,b){c=c||0;b=b||0;return this.frac()*(b-c)+c},normal:function(){return 1-2*this.frac()},uuid:function(){var d,c;for(c=d="";d++<36;c+=~d%5|d*3&4?(d^15?8^this.frac()*(d^20?16:4):4).toString(16):"-"){}return c},pick:function(b){return b[this.integerInRange(0,b.length)]},weightedPick:function(b){return b[~~(Math.pow(this.frac(),2)*b.length)]},timestamp:function(d,c){return this.realInRange(d||946684800000,c||1577862000000)},angle:function(){return this.integerInRange(-180,180)}};Phaser.Math={PI2:Math.PI*2,fuzzyEqual:function(d,c,e){if(typeof e==="undefined"){e=0.0001}return Math.abs(d-c)c-e},fuzzyCeil:function(b,c){if(typeof c==="undefined"){c=0.0001}return Math.ceil(b-c)},fuzzyFloor:function(b,c){if(typeof c==="undefined"){c=0.0001}return Math.floor(b+c)},average:function(){var b=[];for(var d=0;d<(arguments.length-0);d++){b[d]=arguments[d+0]}var e=0;for(var c=0;c0)?Math.floor(b):Math.ceil(b)},shear:function(b){return b%1},snapTo:function(b,d,c){if(typeof c==="undefined"){c=0}if(d==0){return b}b-=c;b=d*Math.round(b/d);return c+b},snapToFloor:function(b,d,c){if(typeof c==="undefined"){c=0}if(d==0){return b}b-=c;b=d*Math.floor(b/d);return c+b},snapToCeil:function(b,d,c){if(typeof c==="undefined"){c=0}if(d==0){return b}b-=c;b=d*Math.ceil(b/d);return c+b},snapToInArray:function(d,c,f){if(typeof f==="undefined"){f=true}if(f){c.sort()}if(dd/2){c+=d*2}if(b<-d/2&&c>d/2){b+=d*2}return b-c},interpolateAngles:function(c,b,d,e,f){if(typeof e==="undefined"){e=true}if(typeof f==="undefined"){f=null}c=this.normalizeAngle(c,e);b=this.normalizeAngleToAnother(b,c,e);return(typeof f==="function")?f(d,c,b-c,1):this.interpolateFloat(c,b,d)},chanceRoll:function(b){if(typeof b==="undefined"){b=50}if(b<=0){return false}else{if(b>=100){return true}else{if(Math.random()*100>=b){return false}else{return true}}}},maxAdd:function(d,c,b){d+=c;if(d>b){d=b}return d},minSub:function(d,c,b){d-=c;if(d0.5)?1:-1},isOdd:function(b){return(b&1)},isEven:function(b){if(b&1){return false}else{return true}},max:function(){for(var d=1,c=0,b=arguments.length;d=-180&&c<=180){return c}b=(c+180)%360;if(b<0){b+=360}return b-180},angleLimit:function(e,d,c){var b=e;if(e>c){b=c}else{if(e1){return this.linear(d[b],d[b-1],b-g)}return this.linear(d[e],d[e+1>b?b:e+1],g-e)},bezierInterpolation:function(e,d){var c=0;var g=e.length-1;for(var f=0;f<=g;f++){c+=Math.pow(1-d,g-f)*Math.pow(d,f)*e[f]*this.bernstein(g,f)}return c},catmullRomInterpolation:function(d,c){var b=d.length-1;var g=b*c;var e=Math.floor(g);if(d[0]===d[b]){if(c<0){e=Math.floor(g=b*(1+c))}return this.catmullRom(d[(e-1+b)%b],d[e],d[(e+1)%b],d[(e+2)%b],g-e)}else{if(c<0){return d[0]-(this.catmullRom(d[0],d[0],d[1],d[1],-g)-d[0])}if(c>1){return d[b]-(this.catmullRom(d[b],d[b],d[b-1],d[b-1],g-b)-d[b])}return this.catmullRom(d[e?e-1:0],d[e],d[bd.length-e)){b=d.length-e}if(b>0){return d[e+Math.floor(Math.random()*b)]}}return null},floor:function(b){var c=b|0;return(b>0)?(c):((c!=b)?(c-1):(c))},ceil:function(b){var c=b|0;return(b>0)?((c!=b)?(c+1):(c)):(c)},sinCosGenerator:function(b,j,d,h){if(typeof j==="undefined"){j=1}if(typeof d==="undefined"){d=1}if(typeof h==="undefined"){h=1}var i=j;var l=d;var f=h*Math.PI/b;var e=[];var k=[];for(var g=0;g0;d--){var c=Math.floor(Math.random()*(d+1));var b=e[d];e[d]=e[c];e[c]=b}return e},distance:function(e,g,d,f){var c=e-d;var b=g-f;return Math.sqrt(c*c+b*b)},distanceRounded:function(c,e,b,d){return Math.round(Phaser.Math.distance(c,e,b,d))},clamp:function(d,e,c){return(dc)?c:d)},clampBottom:function(b,c){return b=b){return 1}c=(c-d)/(b-d);return c*c*(3-2*c)},smootherstep:function(c,d,b){if(c<=d){return 0}if(c>=b){return 1}c=(c-d)/(b-d);return c*c*c*(c*(c*6-15)+10)},sign:function(b){return(b<0)?-1:((b>0)?1:0)},degToRad:function(){var b=Math.PI/180;return function(c){return c*b}}(),radToDeg:function(){var b=180/Math.PI;return function(c){return c*b}}()};Phaser.QuadTree=function(g,c,i,f,b,e,d,h){this.physicsManager=g;this.ID=g.quadTreeID;g.quadTreeID++;this.maxObjects=e||10;this.maxLevels=d||4;this.level=h||0;this.bounds={x:Math.round(c),y:Math.round(i),width:f,height:b,subWidth:Math.floor(f/2),subHeight:Math.floor(b/2),right:Math.round(c)+Math.floor(f/2),bottom:Math.round(i)+Math.floor(b/2)};this.objects=[];this.nodes=[]};Phaser.QuadTree.prototype={split:function(){this.level++;this.nodes[0]=new Phaser.QuadTree(this.physicsManager,this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level);this.nodes[1]=new Phaser.QuadTree(this.physicsManager,this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level);this.nodes[2]=new Phaser.QuadTree(this.physicsManager,this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level);this.nodes[3]=new Phaser.QuadTree(this.physicsManager,this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level)},insert:function(b){var d=0;var c;if(this.nodes[0]!=null){c=this.getIndex(b);if(c!==-1){this.nodes[c].insert(b);return}}this.objects.push(b);if(this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom)){b=2}}}else{if(c.x>this.bounds.right){if((c.ythis.bounds.bottom)){b=3}}}}return b},retrieve:function(b){var c=this.objects;b.body.quadTreeIndex=this.getIndex(b.body);b.body.quadTreeIDs.push(this.ID);if(this.nodes[0]){if(b.body.quadTreeIndex!==-1){c=c.concat(this.nodes[b.body.quadTreeIndex].retrieve(b))}else{c=c.concat(this.nodes[0].retrieve(b));c=c.concat(this.nodes[1].retrieve(b));c=c.concat(this.nodes[2].retrieve(b));c=c.concat(this.nodes[3].retrieve(b))}}return c},clear:function(){this.objects=[];for(var c=0,b=this.nodes.length;c0){this._radius=c*0.5}else{this._radius=0}};Phaser.Circle.prototype={circumference:function(){return 2*(Math.PI*this._radius)},setTo:function(b,d,c){this.x=b;this.y=d;this._diameter=c;this._radius=c*0.5;return this},copyFrom:function(b){return this.setTo(b.x,b.y,b.diameter)},copyTo:function(b){b[x]=this.x;b[y]=this.y;b[diameter]=this._diameter;return b},distance:function(c,b){if(typeof b==="undefined"){b=false}if(b){return Phaser.Math.distanceRound(this.x,this.y,c.x,c.y)}else{return Phaser.Math.distance(this.x,this.y,c.x,c.y)}},clone:function(b){if(typeof b==="undefined"){b=new Phaser.Circle()}return b.setTo(a.x,a.y,a.diameter)},contains:function(b,c){return Phaser.Circle.contains(this,b,c)},circumferencePoint:function(d,c,b){return Phaser.Circle.circumferencePoint(this,d,c,b)},offset:function(c,b){this.x+=c;this.y+=b;return this},offsetPoint:function(b){return this.offset(b.x,b.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}};Object.defineProperty(Phaser.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(b){if(b>0){this._diameter=b;this._radius=b*0.5}}});Object.defineProperty(Phaser.Circle.prototype,"radius",{get:function(){return this._radius},set:function(b){if(b>0){this._radius=b;this._diameter=b*2}}});Object.defineProperty(Phaser.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(b){if(b>this.x){this._radius=0;this._diameter=0}else{this.radius=this.x-b}}});Object.defineProperty(Phaser.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(b){if(bthis.y){this._radius=0;this._diameter=0}else{this.radius=this.y-b}}});Object.defineProperty(Phaser.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(b){if(b0){return Math.PI*this._radius*this._radius}else{return 0}}});Object.defineProperty(Phaser.Circle.prototype,"empty",{get:function(){return(this._diameter==0)},set:function(b){this.setTo(0,0,0)}});Phaser.Circle.contains=function(d,b,f){if(b>=d.left&&b<=d.right&&f>=d.top&&f<=d.bottom){var e=(d.x-b)*(d.x-b);var c=(d.y-f)*(d.y-f);return(e+c)<=(d.radius*d.radius)}return false};Phaser.Circle.equals=function(d,c){return(d.x==c.x&&d.y==c.y&&d.diameter==c.diameter)};Phaser.Circle.intersects=function(d,c){return(Phaser.Math.distance(d.x,d.y,c.x,c.y)<=(d.radius+c.radius))};Phaser.Circle.circumferencePoint=function(b,e,d,c){if(typeof d==="undefined"){d=false}if(typeof c==="undefined"){c=new Phaser.Point()}if(d===true){e=Phaser.Math.radToDeg(e)}c.x=b.x+b.radius*Math.cos(e);c.y=b.y+b.radius*Math.sin(e);return c};Phaser.Circle.intersectsRectangle=function(m,d){var g=Math.abs(m.x-d.x-d.halfWidth);var l=d.halfWidth+m.radius;if(g>l){return false}var f=Math.abs(m.y-d.y-d.halfHeight);var j=d.halfHeight+m.radius;if(f>j){return false}if(g<=d.halfWidth||f<=d.halfHeight){return true}var h=g-d.halfWidth;var e=f-d.halfHeight;var k=h*h;var b=e*e;var i=m.radius*m.radius;return k+b<=i};Phaser.Point=function(b,c){b=b||0;c=c||0;this.x=b;this.y=c};Phaser.Point.prototype={copyFrom:function(b){return this.setTo(b.x,b.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(b,c){this.x=b;this.y=c;return this},add:function(b,c){this.x+=b;this.y+=c;return this},subtract:function(b,c){this.x-=b;this.y-=c;return this},multiply:function(b,c){this.x*=b;this.y*=c;return this},divide:function(b,c){this.x/=b;this.y/=c;return this},clampX:function(c,b){this.x=Phaser.Math.clamp(this.x,c,b);return this},clampY:function(c,b){this.y=Phaser.Math.clamp(this.y,c,b);return this},clamp:function(c,b){this.x=Phaser.Math.clamp(this.x,c,b);this.y=Phaser.Math.clamp(this.y,c,b);return this},clone:function(b){if(typeof b==="undefined"){b=new Phaser.Point}return b.setTo(this.x,this.y)},copyFrom:function(b){return this.setTo(b.x,b.y)},copyTo:function(b){b[x]=this.x;b[y]=this.y;return b},distance:function(c,b){return Phaser.Point.distance(this,c,b)},equals:function(b){return(b.x==this.x&&b.y==this.y)},rotate:function(b,f,d,c,e){return Phaser.Point.rotate(this,b,f,d,c,e)},toString:function(){return"[{Point (x="+this.x+" y="+this.y+")}]"}};Phaser.Point.add=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x+c.x;e.y=d.y+c.y;return e};Phaser.Point.subtract=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x-c.x;e.y=d.y-c.y;return e};Phaser.Point.multiply=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x*c.x;e.y=d.y*c.y;return e};Phaser.Point.divide=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x/c.x;e.y=d.y/c.y;return e};Phaser.Point.equals=function(d,c){return(d.x==c.x&&d.y==c.y)};Phaser.Point.distance=function(d,c,e){if(typeof e==="undefined"){e=false}if(e){return Phaser.Math.distanceRound(d.x,d.y,c.x,c.y)}else{return Phaser.Math.distance(d.x,d.y,c.x,c.y)}},Phaser.Point.rotate=function(c,b,g,e,d,f){d=d||false;f=f||null;if(d){e=Phaser.Math.radToDeg(e)}if(f===null){f=Math.sqrt(((b-c.x)*(b-c.x))+((g-c.y)*(g-c.y)))}return c.setTo(b+f*Math.cos(e),g+f*Math.sin(e))};Phaser.Rectangle=function(c,e,d,b){c=c||0;e=e||0;d=d||0;b=b||0;this.x=c;this.y=e;this.width=d;this.height=b};Phaser.Rectangle.prototype={offset:function(c,b){this.x+=c;this.y+=b;return this},offsetPoint:function(b){return this.offset(b.x,b.y)},setTo:function(c,e,d,b){this.x=c;this.y=e;this.width=d;this.height=b;return this},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y)},copyFrom:function(b){return this.setTo(b.x,b.y,b.width,b.height)},copyTo:function(b){b.x=this.x;b.y=this.y;b.width=this.width;b.height=this.height;return b},inflate:function(c,b){return Phaser.Rectangle.inflate(this,c,b)},size:function(b){return Phaser.Rectangle.size(this,b)},clone:function(b){return Phaser.Rectangle.clone(this,b)},contains:function(b,c){return Phaser.Rectangle.contains(this,b,c)},containsRect:function(c){return Phaser.Rectangle.containsRect(this,c)},equals:function(c){return Phaser.Rectangle.equals(this,c)},intersection:function(c,d){return Phaser.Rectangle.intersection(this,c,output)},intersects:function(c,d){return Phaser.Rectangle.intersects(this,c,d)},intersectsRaw:function(f,d,e,c,b){return Phaser.Rectangle.intersectsRaw(this,f,d,e,c,b)},union:function(c,d){return Phaser.Rectangle.union(this,c,d)},toString:function(){return"[{Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+" empty="+this.empty+")}]"}};Object.defineProperty(Phaser.Rectangle.prototype,"halfWidth",{get:function(){return Math.round(this.width/2)}});Object.defineProperty(Phaser.Rectangle.prototype,"halfHeight",{get:function(){return Math.round(this.height/2)}});Object.defineProperty(Phaser.Rectangle.prototype,"bottom",{get:function(){return this.y+this.height},set:function(b){if(b<=this.y){this.height=0}else{this.height=(this.y-b)}}});Object.defineProperty(Phaser.Rectangle.prototype,"bottomRight",{get:function(){return new Phaser.Point(this.right,this.bottom)},set:function(b){this.right=b.x;this.bottom=b.y}});Object.defineProperty(Phaser.Rectangle.prototype,"left",{get:function(){return this.x},set:function(b){if(b>=this.right){this.width=0}else{this.width=this.right-b}this.x=b}});Object.defineProperty(Phaser.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(b){if(b<=this.x){this.width=0}else{this.width=this.x+b}}});Object.defineProperty(Phaser.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}});Object.defineProperty(Phaser.Rectangle.prototype,"perimeter",{get:function(){return(this.width*2)+(this.height*2)}});Object.defineProperty(Phaser.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(b){this.x=b-this.halfWidth}});Object.defineProperty(Phaser.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(b){this.y=b-this.halfHeight}});Object.defineProperty(Phaser.Rectangle.prototype,"top",{get:function(){return this.y},set:function(b){if(b>=this.bottom){this.height=0;this.y=b}else{this.height=(this.bottom-b)}}});Object.defineProperty(Phaser.Rectangle.prototype,"topLeft",{get:function(){return new Phaser.Point(this.x,this.y)},set:function(b){this.x=b.x;this.y=b.y}});Object.defineProperty(Phaser.Rectangle.prototype,"empty",{get:function(){return(!this.width||!this.height)},set:function(b){this.setTo(0,0,0,0)}});Phaser.Rectangle.inflate=function(c,d,b){c.x-=d;c.width+=2*d;c.y-=b;c.height+=2*b;return c};Phaser.Rectangle.inflatePoint=function(c,b){return Phaser.Phaser.Rectangle.inflate(c,b.x,b.y)};Phaser.Rectangle.size=function(b,c){if(typeof c==="undefined"){c=new Phaser.Point()}return c.setTo(b.width,b.height)};Phaser.Rectangle.clone=function(b,c){if(typeof c==="undefined"){c=new Phaser.Rectangle()}return c.setTo(b.x,b.y,b.width,b.height)};Phaser.Rectangle.contains=function(c,b,d){return(b>=c.x&&b<=c.right&&d>=c.y&&d<=c.bottom)};Phaser.Rectangle.containsPoint=function(c,b){return Phaser.Phaser.Rectangle.contains(c,b.x,b.y)};Phaser.Rectangle.containsRect=function(d,c){if(d.volume>c.volume){return false}return(d.x>=c.x&&d.y>=c.y&&d.right<=c.right&&d.bottom<=c.bottom)};Phaser.Rectangle.equals=function(d,c){return(d.x==c.x&&d.y==c.y&&d.width==c.width&&d.height==c.height)};Phaser.Rectangle.intersection=function(d,c,e){e=e||new Phaser.Rectangle;if(Phaser.Rectangle.intersects(d,c)){e.x=Math.max(d.x,c.x);e.y=Math.max(d.y,c.y);e.width=Math.min(d.right,c.right)-e.x;e.height=Math.min(d.bottom,c.bottom)-e.y}return e};Phaser.Rectangle.intersects=function(d,c,e){e=e||0;return !(d.left>c.right+e||d.rightc.bottom+e||d.bottomb.right+c||eb.bottom+c||d1){if(f&&f==this.decodeURI(d[0])){return this.decodeURI(d[1])}else{c[this.decodeURI(d[0])]=this.decodeURI(d[1])}}}return c},decodeURI:function(b){return decodeURIComponent(b.replace(/\+/g," "))}};Phaser.TweenManager=function(b){this.game=b;this._tweens=[];this.game.onPause.add(this.pauseAll,this);this.game.onResume.add(this.resumeAll,this)};Phaser.TweenManager.prototype={REVISION:"11dev",getAll:function(){return this._tweens},removeAll:function(){this._tweens=[]},add:function(b){this._tweens.push(b)},create:function(b){return new Phaser.Tween(b,this.game)},remove:function(c){var b=this._tweens.indexOf(c);if(b!==-1){this._tweens.splice(b,1)}},update:function(){if(this._tweens.length===0){return false}var b=0,c=this._tweens.length;while(b=0;b--){this._tweens[b].pause()}},resumeAll:function(){for(var b=this._tweens.length-1;b>=0;b--){this._tweens[b].resume()}}};Phaser.Tween=function(c,b){this._object=c;this.game=b;this._manager=this.game.tweens;this._valuesStart={};this._valuesEnd={};this._valuesStartRepeat={};this._duration=1000;this._repeat=0;this._yoyo=false;this._reversed=false;this._delayTime=0;this._startTime=null;this._easingFunction=Phaser.Easing.Linear.None;this._interpolationFunction=Phaser.Math.linearInterpolation;this._chainedTweens=[];this._onStartCallback=null;this._onStartCallbackFired=false;this._onUpdateCallback=null;this._onCompleteCallback=null;this._pausedTime=0;for(var d in c){this._valuesStart[d]=parseFloat(c[d],10)}this.onStart=new Phaser.Signal();this.onComplete=new Phaser.Signal();this.isRunning=false};Phaser.Tween.prototype={to:function(d,g,h,c,b,f,e){g=g||1000;h=h||null;c=c||false;b=b||0;f=f||0;e=e||false;this._repeat=f;this._duration=g;this._valuesEnd=d;if(h!==null){this._easingFunction=h}if(b>0){this._delayTime=b}this._yoyo=e;if(c){return this.start()}else{return this}},start:function(c){if(this.game===null||this._object===null){return}this._manager.add(this);this.onStart.dispatch(this._object);this.isRunning=true;this._onStartCallbackFired=false;this._startTime=this.game.time.now+this._delayTime;for(var b in this._valuesEnd){if(this._valuesEnd[b] instanceof Array){if(this._valuesEnd[b].length===0){continue}this._valuesEnd[b]=[this._object[b]].concat(this._valuesEnd[b])}this._valuesStart[b]=this._object[b];if((this._valuesStart[b] instanceof Array)===false){this._valuesStart[b]*=1}this._valuesStartRepeat[b]=this._valuesStart[b]||0}return this},stop:function(){this._manager.remove(this);this.isRunning=false;return this},delay:function(b){this._delayTime=b;return this},repeat:function(b){this._repeat=b;return this},yoyo:function(b){this._yoyo=b;return this},easing:function(b){this._easingFunction=b;return this},interpolation:function(b){this._interpolationFunction=b;return this},chain:function(){this._chainedTweens=arguments;return this},onStart:function(b){this._onStartCallback=b;return this},onUpdate:function(b){this._onUpdateCallback=b;return this},onComplete:function(b){this._onCompleteCallback=b;return this},pause:function(){this._paused=true},resume:function(){this._paused=false;this._startTime+=this.game.time.pauseDuration},update:function(c){if(this._paused||c1?1:k;var h=this._easingFunction(k);for(j in this._valuesEnd){var b=this._valuesStart[j]||0;var d=this._valuesEnd[j];if(d instanceof Array){this._object[j]=this._interpolationFunction(d,h)}else{if(typeof(d)==="string"){d=b+parseFloat(d,10)}if(typeof(d)==="number"){this._object[j]=b+(d-b)*h}}}if(this._onUpdateCallback!==null){this._onUpdateCallback.call(this._object,h)}if(k==1){if(this._repeat>0){if(isFinite(this._repeat)){this._repeat--}for(j in this._valuesStartRepeat){if(typeof(this._valuesEnd[j])==="string"){this._valuesStartRepeat[j]=this._valuesStartRepeat[j]+parseFloat(this._valuesEnd[j],10)}if(this._yoyo){var e=this._valuesStartRepeat[j];this._valuesStartRepeat[j]=this._valuesEnd[j];this._valuesEnd[j]=e;this._reversed=!this._reversed}this._valuesStart[j]=this._valuesStartRepeat[j]}this._startTime=c+this._delayTime;this.onComplete.dispatch(this._object);if(this._onCompleteCallback!==null){this._onCompleteCallback.call(this._object)}return true}else{this.onComplete.dispatch(this._object);if(this._onCompleteCallback!==null){this._onCompleteCallback.call(this._object)}for(var f=0,g=this._chainedTweens.length;fthis._timeLastSecond+1000){this.fps=Math.round((this.frames*1000)/(this.now-this._timeLastSecond));this.fpsMin=this.game.math.min(this.fpsMin,this.fps);this.fpsMax=this.game.math.max(this.fpsMax,this.fps);this._timeLastSecond=this.now;this.frames=0}this.time=this.now;this.lastTime=b+this.timeToCall;this.physicsElapsed=1*(this.elapsed/1000);if(this.game.paused){this.pausedTime=this.now-this._pauseStarted}},gamePaused:function(){this._pauseStarted=this.now},gameResumed:function(){this.time=Date.now();this.pauseDuration=this.pausedTime;this._justResumed=true},elapsedSince:function(b){return this.now-b},elapsedSecondsSince:function(b){return(this.now-b)*0.001},reset:function(){this._started=this.now}};Phaser.AnimationManager=function(b){this._frameData=null;this.currentFrame=null;this.sprite=b;this.game=b.game;this._anims={};this.updateIfVisible=true};Phaser.AnimationManager.prototype={loadFrameData:function(b){this._frameData=b;this.frame=0},add:function(e,f,d,c,b){f=f||null;d=d||60;c=c||false;b=b||true;if(this._frameData==null){console.warn("No frameData available for Phaser.Animation "+e);return}if(this.sprite.events.onAnimationStart==null){this.sprite.events.onAnimationStart=new Phaser.Signal();this.sprite.events.onAnimationComplete=new Phaser.Signal();this.sprite.events.onAnimationLoop=new Phaser.Signal()}if(f==null){f=this._frameData.getFrameIndexes()}else{if(this.validateFrames(f,b)==false){console.warn("Invalid frames given to Phaser.Animation "+e);return}}if(b==false){f=this._frameData.getFrameIndexesByName(f)}this._anims[e]=new Phaser.Animation(this.game,this.sprite,this._frameData,e,f,d,c);this.currentAnim=this._anims[e];this.currentFrame=this.currentAnim.currentFrame;this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);return this._anims[e]},validateFrames:function(d,b){for(var c=0;cthis._frameData.total){return false}}else{if(this._frameData.checkFrameName(d[c])==false){return false}}}return true},play:function(d,c,b){c=c||null;b=b||null;if(this._anims[d]){if(this.currentAnim==this._anims[d]){if(this.currentAnim.isPlaying==false){return this.currentAnim.play(c,b)}}else{this.currentAnim=this._anims[d];return this.currentAnim.play(c,b)}}},stop:function(b){if(this._anims[b]){this.currentAnim=this._anims[b];this.currentAnim.stop()}},update:function(){if(this.updateIfVisible&&this.sprite.visible==false){return false}if(this.currentAnim&&this.currentAnim.update()==true){this.currentFrame=this.currentAnim.currentFrame;this.sprite.currentFrame=this.currentFrame;return true}return false},destroy:function(){this._anims={};this._frameData=null;this._frameIndex=0;this.currentAnim=null;this.currentFrame=null}};Object.defineProperty(Phaser.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}});Object.defineProperty(Phaser.AnimationManager.prototype,"frameTotal",{get:function(){if(this._frameData){return this._frameData.total}else{return -1}}});Object.defineProperty(Phaser.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame){return this._frameIndex}},set:function(b){if(this._frameData&&this._frameData.getFrame(b)!==null){this.currentFrame=this._frameData.getFrame(b);this._frameIndex=b;this.sprite.currentFrame=this.currentFrame;this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}}});Object.defineProperty(Phaser.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame){return this.currentFrame.name}},set:function(b){if(this._frameData&&this._frameData.getFrameByName(b)){this.currentFrame=this._frameData.getFrameByName(b);this._frameIndex=this.currentFrame.index;this.sprite.currentFrame=this.currentFrame;this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}else{console.warn("Cannot set frameName: "+b)}}});Phaser.Animation=function(c,g,f,e,h,d,b){this.game=c;this._parent=g;this._frames=h;this._frameData=f;this.name=e;this.delay=1000/d;this.looped=b;this.isFinished=false;this.isPlaying=false;this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])};Phaser.Animation.prototype={play:function(c,b){c=c||null;b=b||null;if(c!==null){this.delay=1000/c}if(b!==null){this.looped=b}this.isPlaying=true;this.isFinished=false;this._timeLastFrame=this.game.time.now;this._timeNextFrame=this.game.time.now+this.delay;this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]);this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);this._parent.events.onAnimationStart.dispatch(this._parent,this);return this},restart:function(){this.isPlaying=true;this.isFinished=false;this._timeLastFrame=this.game.time.now;this._timeNextFrame=this.game.time.now+this.delay;this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])},stop:function(){this.isPlaying=false;this.isFinished=true},update:function(){if(this.isPlaying==true&&this.game.time.now>=this._timeNextFrame){this._frameIndex++;if(this._frameIndex==this._frames.length){if(this.looped){this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]);this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);this._parent.events.onAnimationLoop.dispatch(this._parent,this)}else{this.onComplete()}}else{this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]);this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}this._timeLastFrame=this.game.time.now;this._timeNextFrame=this.game.time.now+this.delay;return true}return false},destroy:function(){this.game=null;this._parent=null;this._frames=null;this._frameData=null;this.currentFrame=null;this.isPlaying=false},onComplete:function(){this.isPlaying=false;this.isFinished=true;this._parent.events.onAnimationComplete.dispatch(this._parent,this)}};Object.defineProperty(Phaser.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}});Object.defineProperty(Phaser.Animation.prototype,"frame",{get:function(){if(this.currentFrame!==null){return this.currentFrame.index}else{return this._frameIndex}},set:function(b){this.currentFrame=this._frameData.getFrame(b);if(this.currentFrame!==null){this._frameIndex=b;this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}}});Phaser.Animation.Frame=function(c,g,f,b,d,e){this.x=c;this.y=g;this.width=f;this.height=b;this.centerX=Math.floor(f/2);this.centerY=Math.floor(b/2);this.index=0;this.name=d;this.uuid=e;this.distance=Phaser.Math.distance(0,0,f,b);this.rotated=false;this.rotationDirection="cw";this.trimmed=false;this.sourceSizeW=f;this.sourceSizeH=b;this.spriteSourceSizeX=0;this.spriteSourceSizeY=0;this.spriteSourceSizeW=0;this.spriteSourceSizeH=0};Phaser.Animation.Frame.prototype={setTrim:function(f,e,h,c,b,d,g){this.trimmed=f;if(f){this.width=e;this.height=h;this.sourceSizeW=e;this.sourceSizeH=h;this.centerX=Math.floor(e/2);this.centerY=Math.floor(h/2);this.spriteSourceSizeX=c;this.spriteSourceSizeY=b;this.spriteSourceSizeW=d;this.spriteSourceSizeH=g}}};Phaser.Animation.FrameData=function(){this._frames=[];this._frameNames=[]};Phaser.Animation.FrameData.prototype={addFrame:function(b){b.index=this._frames.length;this._frames.push(b);if(b.name!==""){this._frameNames[b.name]=b.index}return b},getFrame:function(b){if(this._frames[b]){return this._frames[b]}return null},getFrameByName:function(b){if(this._frameNames[b]!==""){return this._frames[this._frameNames[b]]}return null},checkFrameName:function(b){if(this._frameNames[b]==null){return false}return true},getFrameRange:function(e,b,c){if(typeof c==="undefined"){c=[]}for(var d=e;d<=b;d++){c.push(this._frames[d])}return c},getFrameIndexes:function(b){if(typeof b==="undefined"){b=[]}for(var c=0;c tag");return}var d=new Phaser.Animation.FrameData();var j=g.getElementsByTagName("SubTexture");var f;for(var e=0;e0){this._progressChunk=100/this._keys.length;this.loadFile()}else{this.progress=100;this.hasLoaded=true;this.onLoadComplete.dispatch()}},loadFile:function(){var b=this._fileList[this._keys.shift()];var c=this;switch(b.type){case"image":case"spritesheet":case"textureatlas":case"bitmapfont":case"tilemap":b.data=new Image();b.data.name=b.key;b.data.onload=function(){return c.fileComplete(b.key)};b.data.onerror=function(){return c.fileError(b.key)};b.data.crossOrigin=this.crossOrigin;b.data.src=this.baseURL+b.url;break;case"audio":b.url=this.getAudioURL(b.url);if(b.url!==null){if(this.game.sound.usingWebAudio){this._xhr.open("GET",this.baseURL+b.url,true);this._xhr.responseType="arraybuffer";this._xhr.onload=function(){return c.fileComplete(b.key)};this._xhr.onerror=function(){return c.fileError(b.key)};this._xhr.send()}else{if(this.game.sound.usingAudioTag){if(this.game.sound.touchLocked){b.data=new Audio();b.data.name=b.key;b.data.preload="auto";b.data.src=this.baseURL+b.url;this.fileComplete(b.key)}else{b.data=new Audio();b.data.name=b.key;b.data.onerror=function(){return c.fileError(b.key)};b.data.preload="auto";b.data.src=this.baseURL+b.url;b.data.addEventListener("canplaythrough",Phaser.GAMES[this.game.id].load.fileComplete(b.key),false);b.data.load()}}}}else{this.fileError(b.key)}break;case"text":this._xhr.open("GET",this.baseURL+b.url,true);this._xhr.responseType="text";this._xhr.onload=function(){return c.fileComplete(b.key)};this._xhr.onerror=function(){return c.fileError(b.key)};this._xhr.send();break}},getAudioURL:function(c){var d;for(var b=0;b100){this.progress=100}this.onFileComplete.dispatch(this.progress,b,c,this.queueSize-this._keys.length,this.queueSize);if(this._keys.length>0){this.loadFile()}else{this.hasLoaded=true;this.isLoading=false;this.removeAll();this.onLoadComplete.dispatch()}}};Phaser.Loader.Parser={bitmapFont:function(q,h,l){if(!h.getElementsByTagName("font")){console.warn("Phaser.Loader.Parser.bitmapFont: Invalid XML given, missing tag");return}var m=PIXI.TextureCache[l];var e={};var c=h.getElementsByTagName("info")[0];var j=h.getElementsByTagName("common")[0];e.font=c.attributes.getNamedItem("face").nodeValue;e.size=parseInt(c.attributes.getNamedItem("size").nodeValue,10);e.lineHeight=parseInt(j.attributes.getNamedItem("lineHeight").nodeValue,10);e.chars={};var k=h.getElementsByTagName("char");for(var d=0;d=this.duration){if(this.usingWebAudio){if(this.loop){this.onLoop.dispatch(this);if(this.currentMarker==""){this.currentTime=0;this.startTime=this.game.time.now}else{this.play(this.currentMarker,0,this.volume,true,true)}}else{this.stop()}}else{if(this.loop){this.onLoop.dispatch(this);this.play(this.currentMarker,0,this.volume,true,true)}else{this.stop()}}}}},play:function(d,b,f,c,e){d=d||"";b=b||0;f=f||1;c=c||false;e=e||false;if(this.isPlaying==true&&e==false&&this.override==false){return}if(this.isPlaying&&this.override){if(this.usingWebAudio){if(typeof this._sound.stop==="undefined"){this._sound.noteOff(0)}else{this._sound.stop(0)}}else{if(this.usingAudioTag){this._sound.pause();this._sound.currentTime=0}}}this.currentMarker=d;if(d!==""&&this.markers[d]){this.position=this.markers[d].start;this.volume=this.markers[d].volume;this.loop=this.markers[d].loop;this.duration=this.markers[d].duration*1000;this._tempMarker=d;this._tempPosition=this.position;this._tempVolume=this.volume;this._tempLoop=this.loop}else{this.position=b;this.volume=f;this.loop=c;this.duration=0;this._tempMarker=d;this._tempPosition=b;this._tempVolume=f;this._tempLoop=c}if(this.usingWebAudio){if(this.game.cache.isSoundDecoded(this.key)){if(this._buffer==null){this._buffer=this.game.cache.getSoundData(this.key)}this._sound=this.context.createBufferSource();this._sound.buffer=this._buffer;this._sound.connect(this.gainNode);this.totalDuration=this._sound.buffer.duration;if(this.duration==0){this.duration=this.totalDuration*1000}if(this.loop&&d==""){this._sound.loop=true}if(typeof this._sound.start==="undefined"){this._sound.noteGrainOn(0,this.position,this.duration/1000)}else{this._sound.start(0,this.position,this.duration/1000)}this.isPlaying=true;this.startTime=this.game.time.now;this.currentTime=0;this.stopTime=this.startTime+this.duration;this.onPlay.dispatch(this)}else{this.pendingPlayback=true;if(this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).isDecoding==false){this.game.sound.decode(this.key,this)}}}else{if(this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked){this.game.cache.reloadSound(this.key);this.pendingPlayback=true}else{if(this._sound&&this._sound.readyState==4){this._sound.play();this.totalDuration=this._sound.duration;if(this.duration==0){this.duration=this.totalDuration*1000}this._sound.currentTime=this.position;this._sound.muted=this._muted;if(this._muted){this._sound.volume=0}else{this._sound.volume=this._volume}this.isPlaying=true;this.startTime=this.game.time.now;this.currentTime=0;this.stopTime=this.startTime+this.duration;this.onPlay.dispatch(this)}else{this.pendingPlayback=true}}}},restart:function(d,b,e,c){d=d||"";b=b||0;e=e||1;c=c||false;this.play(d,b,e,c,true)},pause:function(){if(this.isPlaying&&this._sound){this.stop();this.isPlaying=false;this.paused=true;this.onPause.dispatch(this)}},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){if(typeof this._sound.start==="undefined"){this._sound.noteGrainOn(0,this.position,this.duration)}else{this._sound.start(0,this.position,this.duration)}}else{this._sound.play()}this.isPlaying=true;this.paused=false;this.onResume.dispatch(this)}},stop:function(){if(this.isPlaying&&this._sound){if(this.usingWebAudio){if(typeof this._sound.stop==="undefined"){this._sound.noteOff(0)}else{this._sound.stop(0)}}else{if(this.usingAudioTag){this._sound.pause();this._sound.currentTime=0}}}this.isPlaying=false;var b=this.currentMarker;this.currentMarker="";this.onStop.dispatch(this,b)}};Object.defineProperty(Phaser.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}});Object.defineProperty(Phaser.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}});Object.defineProperty(Phaser.Sound.prototype,"mute",{get:function(){return this._muted},set:function(b){b=b||null;if(b){this._muted=true;if(this.usingWebAudio){this._muteVolume=this.gainNode.gain.value;this.gainNode.gain.value=0}else{if(this.usingAudioTag&&this._sound){this._muteVolume=this._sound.volume;this._sound.volume=0}}}else{this._muted=false;if(this.usingWebAudio){this.gainNode.gain.value=this._muteVolume}else{if(this.usingAudioTag&&this._sound){this._sound.volume=this._muteVolume}}}this.onMute.dispatch(this)}});Object.defineProperty(Phaser.Sound.prototype,"volume",{get:function(){return this._volume},set:function(b){if(this.usingWebAudio){this._volume=b;this.gainNode.gain.value=b}else{if(this.usingAudioTag&&this._sound){if(b>=0&&b<=1){this._volume=b;this._sound.volume=b}}}}});Phaser.SoundManager=function(b){this.game=b;this.onSoundDecode=new Phaser.Signal;this._muted=false;this._unlockSource=null;this._volume=1;this._muted=false;this._sounds=[];this.context=null;this.usingWebAudio=true;this.usingAudioTag=false;this.noAudio=false;this.touchLocked=false;this.channels=32};Phaser.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&this.game.device.webAudio==false){this.channels=1}if(this.game.device.iOS||(window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock)){this.game.input.touch.callbackContext=this;this.game.input.touch.touchStartCallback=this.unlock;this.game.input.mouse.callbackContext=this;this.game.input.mouse.mouseDownCallback=this.unlock;this.touchLocked=true}else{this.touchLocked=false}if(window.PhaserGlobal){if(window.PhaserGlobal.disableAudio==true){this.usingWebAudio=false;this.noAudio=true;return}if(window.PhaserGlobal.disableWebAudio==true){this.usingWebAudio=false;this.usingAudioTag=true;this.noAudio=false;return}}if(!!window.AudioContext){this.context=new window.AudioContext()}else{if(!!window.webkitAudioContext){this.context=new window.webkitAudioContext()}else{if(!!window.Audio){this.usingWebAudio=false;this.usingAudioTag=true}else{this.usingWebAudio=false;this.noAudio=true}}}if(this.context!==null){if(typeof this.context.createGain==="undefined"){this.masterGain=this.context.createGainNode()}else{this.masterGain=this.context.createGain()}this.masterGain.gain.value=1;this.masterGain.connect(this.context.destination)}},unlock:function(){if(this.touchLocked==false){return}if(this.game.device.webAudio==false||(window.PhaserGlobal&&window.PhaserGlobal.disableWebAudio==true)){this.touchLocked=false;this._unlockSource=null;this.game.input.touch.callbackContext=null;this.game.input.touch.touchStartCallback=null;this.game.input.mouse.callbackContext=null;this.game.input.mouse.mouseDownCallback=null}else{var b=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource();this._unlockSource.buffer=b;this._unlockSource.connect(this.context.destination);this._unlockSource.noteOn(0)}},stopAll:function(){for(var b=0;b255){return Phaser.Color.getColor(255,255,255)}if(d>c){return Phaser.Color.getColor(255,255,255)}var f=d+Math.round(Math.random()*(c-d));var e=d+Math.round(Math.random()*(c-d));var b=d+Math.round(Math.random()*(c-d));return Phaser.Color.getColor32(g,f,e,b)},getRGB:function(b){return{alpha:b>>>24,red:b>>16&255,green:b>>8&255,blue:b&255}},getWebRGB:function(c){var f=(c>>>24)/255;var e=c>>16&255;var d=c>>8&255;var b=c&255;return"rgba("+e.toString()+","+d.toString()+","+b.toString()+","+f.toString()+")"},getAlpha:function(b){return b>>>24},getAlphaFloat:function(b){return(b>>>24)/255},getRed:function(b){return b>>16&255},getGreen:function(b){return b>>8&255},getBlue:function(b){return b&255}};Phaser.Physics={};Phaser.Physics.Arcade=function(b){this.game=b;this.gravity=new Phaser.Point;this.bounds=new Phaser.Rectangle(0,0,b.world.width,b.world.height);this.maxObjects=10;this.maxLevels=4;this.OVERLAP_BIAS=4;this.TILE_OVERLAP=false;this.quadTree=new Phaser.QuadTree(this,this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels);this.quadTreeID=0;this._bounds1=new Phaser.Rectangle;this._bounds2=new Phaser.Rectangle;this._overlap=0;this._maxOverlap=0;this._velocity1=0;this._velocity2=0;this._newVelocity1=0;this._newVelocity2=0;this._average=0;this._mapData=[];this._result=false;this._total=0};Phaser.Physics.Arcade.prototype={updateMotion:function(b){this._velocityDelta=(this.computeVelocity(0,false,b.angularVelocity,b.angularAcceleration,b.angularDrag,b.maxAngular)-b.angularVelocity)/2;b.angularVelocity+=this._velocityDelta;b.rotation+=b.angularVelocity*this.game.time.physicsElapsed;this._velocityDelta=(this.computeVelocity(1,b,b.velocity.x,b.acceleration.x,b.drag.x)-b.velocity.x)/2;b.velocity.x+=this._velocityDelta;this._delta=b.velocity.x*this.game.time.physicsElapsed;b.x+=this._delta;this._velocityDelta=(this.computeVelocity(2,b,b.velocity.y,b.acceleration.y,b.drag.y)-b.velocity.y)/2;b.velocity.y+=this._velocityDelta;this._delta=b.velocity.y*this.game.time.physicsElapsed;b.y+=this._delta},computeVelocity:function(e,c,g,f,d,b){b=b||10000;if(e==1&&c.allowGravity){g+=this.gravity.x+c.gravity.x}else{if(e==2&&c.allowGravity){g+=this.gravity.y+c.gravity.y}}if(f!==0){g+=f*this.game.time.physicsElapsed}else{if(d!==0){this._drag=d*this.game.time.physicsElapsed;if(g-this._drag>0){g=g-this._drag}else{if(g+this._drag<0){g+=this._drag}else{g=0}}}}if(g!=0){if(g>b){g=b}else{if(g<-b){g=-b}}}return g},preUpdate:function(){this.quadTree.clear();this.quadTreeID=0;this.quadTree=new Phaser.QuadTree(this,this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels)},postUpdate:function(){this.quadTree.clear()},collide:function(f,e,d,c,b){d=d||null;c=c||null;b=b||d;this._result=false;this._total=0;if(f&&e&&f.exists&&e.exists){if(f.type==Phaser.SPRITE&&e.type==Phaser.SPRITE){this.collideSpriteVsSprite(f,e,d,c,b)}else{if(f.type==Phaser.SPRITE&&e.type==Phaser.GROUP){this.collideSpriteVsGroup(f,e,d,c,b)}else{if(f.type==Phaser.GROUP&&e.type==Phaser.SPRITE){this.collideSpriteVsGroup(e,f,d,c,b)}else{if(f.type==Phaser.GROUP&&e.type==Phaser.GROUP){this.collideGroupVsGroup(f,e,d,c,b)}else{if(f.type==Phaser.SPRITE&&e.type==Phaser.TILEMAP){this.collideSpriteVsTilemap(f,e,d,c,b)}else{if(f.type==Phaser.TILEMAP&&e.type==Phaser.SPRITE){this.collideSpriteVsTilemap(e,f,d,c,b)}else{if(f.type==Phaser.GROUP&&e.type==Phaser.TILEMAP){this.collideGroupVsTilemap(f,e,d,c,b)}else{if(f.type==Phaser.TILEMAP&&e.type==Phaser.GROUP){this.collideGroupVsTilemap(e,f,d,c,b)}else{if(f.type==Phaser.EMITTER&&e.type==Phaser.TILEMAP){this.collideGroupVsTilemap(f,e,d,c,b)}else{if(f.type==Phaser.TILEMAP&&e.type==Phaser.EMITTER){this.collideGroupVsTilemap(e,f,d,c,b)}}}}}}}}}}}return(this._total>0)},collideSpriteVsSprite:function(f,e,d,c,b){this.separate(f.body,e.body);if(this._result){if(c){if(c.call(b,f,e)){this._total++;if(d){d.call(b,f,e)}}}else{this._total++;if(d){d.call(b,f,e)}}}},collideGroupVsTilemap:function(g,f,e,d,b){if(g._container.first._iNext){var c=g._container.first._iNext;do{if(c.exists){this.collideSpriteVsTilemap(c,f,e,d,b)}c=c._iNext}while(c!=g._container.last._iNext)}},collideSpriteVsTilemap:function(d,g,f,e,b){this._mapData=g.collisionLayer.getTileOverlaps(d);var c=this._mapData.length;while(c--){if(e){if(e.call(b,d,this._mapData[c].tile)){this._total++;if(f){f.call(b,d,this._mapData[c].tile)}}}else{this._total++;if(f){f.call(b,d,this._mapData[c].tile)}}}},collideSpriteVsGroup:function(e,h,g,f,c){this._potentials=this.quadTree.retrieve(e);for(var d=0,b=this._potentials.length;d0)?c.deltaX():0),c.lastY,c.width+((c.deltaX()>0)?c.deltaX():-c.deltaX()),c.height);this._bounds2.setTo(b.x-((b.deltaX()>0)?b.deltaX():0),b.lastY,b.width+((b.deltaX()>0)?b.deltaX():-b.deltaX()),b.height);if((this._bounds1.right>this._bounds2.x)&&(this._bounds1.xthis._bounds2.y)&&(this._bounds1.yb.deltaX()){this._overlap=c.x+c.width-b.x;if((this._overlap>this._maxOverlap)||c.allowCollision.right==false||b.allowCollision.left==false){this._overlap=0}else{c.touching.right=true;b.touching.left=true}}else{if(c.deltaX()this._maxOverlap)||c.allowCollision.left==false||b.allowCollision.right==false){this._overlap=0}else{c.touching.left=true;b.touching.right=true}}}}}if(this._overlap!=0){c.overlapX=this._overlap;b.overlapX=this._overlap;if(c.customSeparateX||b.customSeparateX){return true}this._velocity1=c.velocity.x;this._velocity2=b.velocity.x;if(!c.immovable&&!b.immovable){this._overlap*=0.5;c.x=c.x-this._overlap;b.x+=this._overlap;this._newVelocity1=Math.sqrt((this._velocity2*this._velocity2*b.mass)/c.mass)*((this._velocity2>0)?1:-1);this._newVelocity2=Math.sqrt((this._velocity1*this._velocity1*c.mass)/b.mass)*((this._velocity1>0)?1:-1);this._average=(this._newVelocity1+this._newVelocity2)*0.5;this._newVelocity1-=this._average;this._newVelocity2-=this._average;c.velocity.x=this._average+this._newVelocity1*c.bounce.x;b.velocity.x=this._average+this._newVelocity2*b.bounce.x}else{if(!c.immovable){c.x=c.x-this._overlap;c.velocity.x=this._velocity2-this._velocity1*c.bounce.x}else{if(!b.immovable){b.x+=this._overlap;b.velocity.x=this._velocity1-this._velocity2*b.bounce.x}}}return true}else{return false}},separateY:function(c,b){if(c.immovable&&b.immovable){return false}this._overlap=0;if(c.deltaY()!=b.deltaY()){this._bounds1.setTo(c.x,c.y-((c.deltaY()>0)?c.deltaY():0),c.width,c.height+c.deltaAbsY());this._bounds2.setTo(b.x,b.y-((b.deltaY()>0)?b.deltaY():0),b.width,b.height+b.deltaAbsY());if((this._bounds1.right>this._bounds2.x)&&(this._bounds1.xthis._bounds2.y)&&(this._bounds1.yb.deltaY()){this._overlap=c.y+c.height-b.y;if((this._overlap>this._maxOverlap)||c.allowCollision.down==false||b.allowCollision.up==false){this._overlap=0}else{c.touching.down=true;b.touching.up=true}}else{if(c.deltaY()this._maxOverlap)||c.allowCollision.up==false||b.allowCollision.down==false){this._overlap=0}else{c.touching.up=true;b.touching.down=true}}}}}if(this._overlap!=0){c.overlapY=this._overlap;b.overlapY=this._overlap;if(c.customSeparateY||b.customSeparateY){return true}this._velocity1=c.velocity.y;this._velocity2=b.velocity.y;if(!c.immovable&&!b.immovable){this._overlap*=0.5;c.y=c.y-this._overlap;b.y+=this._overlap;this._newVelocity1=Math.sqrt((this._velocity2*this._velocity2*b.mass)/c.mass)*((this._velocity2>0)?1:-1);this._newVelocity2=Math.sqrt((this._velocity1*this._velocity1*c.mass)/b.mass)*((this._velocity1>0)?1:-1);this._average=(this._newVelocity1+this._newVelocity2)*0.5;this._newVelocity1-=this._average;this._newVelocity2-=this._average;c.velocity.y=this._average+this._newVelocity1*c.bounce.y;b.velocity.y=this._average+this._newVelocity2*b.bounce.y}else{if(!c.immovable){c.y=c.y-this._overlap;c.velocity.y=this._velocity2-this._velocity1*c.bounce.y;if(b.active&&b.moves&&(c.deltaY()>b.deltaY())){c.x+=b.x-b.lastX}}else{if(!b.immovable){b.y+=this._overlap;b.velocity.y=this._velocity1-this._velocity2*b.bounce.y;if(c.sprite.active&&c.moves&&(c.deltaY()h)&&(this._bounds1.xg)&&(this._bounds1.yh)&&(this._bounds1.xg)&&(this._bounds1.y0){this._overlap=d.bottom-g;if(d.allowCollision.down&&b&&this._overlap0){var h=this.distanceBetween(g,e);f=h/(c/1000)}g.body.velocity.x=Math.cos(b)*f;g.body.velocity.y=Math.sin(b)*f},accelerateTowardsObject:function(f,d,e,b,g){b=b||1000;g=g||1000;var c=this.angleBetween(f,d);f.body.velocity.x=0;f.body.velocity.y=0;f.body.acceleration.x=Math.cos(c)*e;f.body.acceleration.y=Math.sin(c)*e;f.body.maxVelocity.x=b;f.body.maxVelocity.y=g},moveTowardsMouse:function(f,e,c){e=e||60;c=c||0;var b=this.angleBetweenMouse(f);if(c>0){var g=this.distanceToMouse(f);e=g/(c/1000)}f.body.velocity.x=Math.cos(b)*e;f.body.velocity.y=Math.sin(b)*e},accelerateTowardsMouse:function(e,d,b,f){b=b||1000;f=f||1000;var c=this.angleBetweenMouse(e);e.body.velocity.x=0;e.body.velocity.y=0;e.body.acceleration.x=Math.cos(c)*d;e.body.acceleration.y=Math.sin(c)*d;e.body.maxVelocity.x=b;e.body.maxVelocity.y=f},moveTowardsPoint:function(f,g,e,c){e=e||60;c=c||0;var b=this.angleBetweenPoint(f,g);if(c>0){var h=this.distanceToPoint(f,g);e=h/(c/1000)}f.body.velocity.x=Math.cos(b)*e;f.body.velocity.y=Math.sin(b)*e},accelerateTowardsPoint:function(e,f,d,b,g){b=b||1000;g=g||1000;var c=this.angleBetweenPoint(e,f);e.body.velocity.x=0;e.body.velocity.y=0;e.body.acceleration.x=Math.cos(c)*d;e.body.acceleration.y=Math.sin(c)*d;e.body.maxVelocity.x=b;e.body.maxVelocity.y=g},distanceBetween:function(e,c){var f=e.center.x-c.center.x;var d=e.center.y-c.center.y;return Math.sqrt(f*f+d*d)},distanceToPoint:function(c,e){var d=c.center.x-e.x;var b=c.center.y-e.y;return Math.sqrt(d*d+b*b)},distanceToMouse:function(c){var d=c.center.x-this.game.input.x;var b=c.center.y-this.game.input.y;return Math.sqrt(d*d+b*b)},angleBetweenPoint:function(c,f,e){e=e||false;var d=f.x-c.center.x;var b=f.y-c.center.y;if(e){return this.game.math.radToDeg(Math.atan2(b,d))}else{return Math.atan2(b,d)}},angleBetween:function(e,c,g){g=g||false;var f=c.center.x-e.center.x;var d=c.center.y-e.center.y;if(g){return this.game.math.radToDeg(Math.atan2(d,f))}else{return Math.atan2(d,f)}},velocityFromFacing:function(b,c){},angleBetweenMouse:function(c,e){e=e||false;var d=this.game.input.x-c.bounds.x;var b=this.game.input.y-c.bounds.y;if(e){return this.game.math.radToDeg(Math.atan2(b,d))}else{return Math.atan2(b,d)}}};Phaser.Physics.Arcade.Body=function(b){this.sprite=b;this.game=b.game;this.offset=new Phaser.Point;this.x=b.x;this.y=b.y;this.sourceWidth=b.currentFrame.sourceSizeW;this.sourceHeight=b.currentFrame.sourceSizeH;this.width=b.currentFrame.sourceSizeW;this.height=b.currentFrame.sourceSizeH;this.halfWidth=Math.floor(b.currentFrame.sourceSizeW/2);this.halfHeight=Math.floor(b.currentFrame.sourceSizeH/2);this._sx=b.scale.x;this._sy=b.scale.y;this.velocity=new Phaser.Point;this.acceleration=new Phaser.Point;this.drag=new Phaser.Point;this.gravity=new Phaser.Point;this.bounce=new Phaser.Point;this.maxVelocity=new Phaser.Point(10000,10000);this.angularVelocity=0;this.angularAcceleration=0;this.angularDrag=0;this.maxAngular=1000;this.mass=1;this.quadTreeIDs=[];this.quadTreeIndex=-1;this.allowCollision={none:false,any:true,up:true,down:true,left:true,right:true};this.touching={none:true,up:false,down:false,left:false,right:false};this.wasTouching={none:true,up:false,down:false,left:false,right:false};this.immovable=false;this.moves=true;this.rotation=0;this.allowRotation=true;this.allowGravity=true;this.customSeparateX=false;this.customSeparateY=false;this.overlapX=0;this.overlapY=0;this.collideWorldBounds=false;this.lastX=b.x;this.lastY=b.y};Phaser.Physics.Arcade.Body.prototype={updateBounds:function(e,d,c,b){if(c!=this._sx||b!=this._sy){this.width=this.sourceWidth*c;this.height=this.sourceHeight*b;this.halfWidth=Math.floor(this.width/2);this.halfHeight=Math.floor(this.height/2);this._sx=c;this._sy=b}},update:function(){this.wasTouching.none=this.touching.none;this.wasTouching.up=this.touching.up;this.wasTouching.down=this.touching.down;this.wasTouching.left=this.touching.left;this.wasTouching.right=this.touching.right;this.touching.none=true;this.touching.up=false;this.touching.down=false;this.touching.left=false;this.touching.right=false;this.lastX=this.x;this.lastY=this.y;this.rotation=this.sprite.angle;this.x=(this.sprite.x-(this.sprite.anchor.x*this.width))+this.offset.x;this.y=(this.sprite.y-(this.sprite.anchor.y*this.height))+this.offset.y;if(this.moves){this.game.physics.updateMotion(this)}if(this.collideWorldBounds){this.checkWorldBounds()}if(this.allowCollision.none==false&&this.sprite.visible&&this.sprite.alive){this.quadTreeIDs=[];this.quadTreeIndex=-1;this.game.physics.quadTree.insert(this)}this.sprite.x=this.x-this.offset.x+(this.sprite.anchor.x*this.width);this.sprite.y=this.y-this.offset.y+(this.sprite.anchor.y*this.height);if(this.allowRotation){this.sprite.angle=this.rotation}},postUpdate:function(){this.sprite.x=this.x-this.offset.x+(this.sprite.anchor.x*this.width);this.sprite.y=this.y-this.offset.y+(this.sprite.anchor.y*this.height);if(this.allowRotation){this.sprite.angle=this.rotation}},checkWorldBounds:function(){if(this.xthis.game.world.bounds.right){this.x=this.game.world.bounds.right-this.width;this.velocity.x*=-this.bounce.x}}if(this.ythis.game.world.bounds.bottom){this.y=this.game.world.bounds.bottom-this.height;this.velocity.y*=-this.bounce.y}}},setSize:function(d,c,b,e){b=b||this.offset.x;e=e||this.offset.y;this.sourceWidth=d;this.sourceHeight=c;this.width=this.sourceWidth*this._sx;this.height=this.sourceHeight*this._sy;this.halfWidth=Math.floor(this.width/2);this.halfHeight=Math.floor(this.height/2);this.offset.setTo(b,e)},reset:function(){this.velocity.setTo(0,0);this.acceleration.setTo(0,0);this.angularVelocity=0;this.angularAcceleration=0;this.x=(this.sprite.x-(this.sprite.anchor.x*this.width))+this.offset.x;this.y=(this.sprite.y-(this.sprite.anchor.y*this.height))+this.offset.y;this.lastX=this.x;this.lastY=this.y},deltaAbsX:function(){return(this.deltaX()>0?this.deltaX():-this.deltaX())},deltaAbsY:function(){return(this.deltaY()>0?this.deltaY():-this.deltaY())},deltaX:function(){return this.x-this.lastX},deltaY:function(){return this.y-this.lastY}};Object.defineProperty(Phaser.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.y+this.height},set:function(b){if(b<=this.y){this.height=0}else{this.height=(this.y-b)}}});Object.defineProperty(Phaser.Physics.Arcade.Body.prototype,"right",{get:function(){return this.x+this.width},set:function(b){if(b<=this.x){this.width=0}else{this.width=this.x+b}}});Phaser.Particles=function(b){this.emitters={};this.ID=0};Phaser.Particles.prototype={emitters:null,add:function(b){this.emitters[b.name]=b;return b},remove:function(b){delete this.emitters[b.name]},update:function(){for(var b in this.emitters){if(this.emitters[b].exists){this.emitters[b].update()}}}};Phaser.Particles.Arcade={};Phaser.Particles.Arcade.Emitter=function(c,b,e,d){d=d||50;Phaser.Group.call(this,c);this.name="emitter"+this.game.particles.ID++;this.type=Phaser.EMITTER;this.x=0;this.y=0;this.width=1;this.height=1;this.minParticleSpeed=new Phaser.Point(-100,-100);this.maxParticleSpeed=new Phaser.Point(100,100);this.minParticleScale=1;this.maxParticleScale=1;this.minRotation=-360;this.maxRotation=360;this.gravity=2;this.particleClass=null;this.particleDrag=new Phaser.Point();this.frequency=100;this.maxParticles=d;this.lifespan=2000;this.bounce=0;this._quantity=0;this._timer=0;this._counter=0;this._explode=true;this.on=false;this.exists=true;this.emitX=b;this.emitY=e};Phaser.Particles.Arcade.Emitter.prototype=Object.create(Phaser.Group.prototype);Phaser.Particles.Arcade.Emitter.prototype.constructor=Phaser.Particles.Arcade.Emitter;Phaser.Particles.Arcade.Emitter.prototype.update=function(){if(this.on){if(this._explode){this._counter=0;do{this.emitParticle();this._counter++}while(this._counter=this._timer){this.emitParticle();this._counter++;if(this._quantity>0){if(this._counter>=this._quantity){this.on=false}}this._timer=this.game.time.now+this.frequency}}}};Phaser.Particles.Arcade.Emitter.prototype.makeParticles=function(d,h,f,e){if(typeof h=="undefined"){h=0}f=f||this.maxParticles;e=e||0;var j;var b=0;var c=d;var g=0;while(b0){j.body.allowCollision.any=true;j.body.allowCollision.none=false}else{j.body.allowCollision.none=true}j.exists=false;j.visible=false;j.anchor.setTo(0.5,0.5);this.add(j);b++}return this};Phaser.Particles.Arcade.Emitter.prototype.kill=function(){this.on=false;this.alive=false;this.exists=false};Phaser.Particles.Arcade.Emitter.prototype.revive=function(){this.alive=true;this.exists=true};Phaser.Particles.Arcade.Emitter.prototype.start=function(b,e,d,c){if(typeof b!=="boolean"){b=true}e=e||0;d=d||250;c=c||0;this.revive();this.visible=true;this.on=true;this._explode=b;this.lifespan=e;this.frequency=d;this._quantity+=c;this._counter=0;this._timer=this.game.time.now+d};Phaser.Particles.Arcade.Emitter.prototype.emitParticle=function(){var c=this.getFirstExists(false);if(c==null){return}if(this.width>1||this.height>1){c.reset(this.emiteX-this.game.rnd.integerInRange(this.left,this.right),this.emiteY-this.game.rnd.integerInRange(this.top,this.bottom))}else{c.reset(this.emitX,this.emitY)}c.lifespan=this.lifespan;c.body.bounce.setTo(this.bounce,this.bounce);if(this.minParticleSpeed.x!=this.maxParticleSpeed.x){c.body.velocity.x=this.game.rnd.integerInRange(this.minParticleSpeed.x,this.maxParticleSpeed.x)}else{c.body.velocity.x=this.minParticleSpeed.x}if(this.minParticleSpeed.y!=this.maxParticleSpeed.y){c.body.velocity.y=this.game.rnd.integerInRange(this.minParticleSpeed.y,this.maxParticleSpeed.y)}else{c.body.velocity.y=this.minParticleSpeed.y}c.body.gravity.y=this.gravity;if(this.minRotation!=this.maxRotation){c.body.angularVelocity=this.game.rnd.integerInRange(this.minRotation,this.maxRotation)}else{c.body.angularVelocity=this.minRotation}if(this.minParticleScale!==1||this.maxParticleScale!==1){var b=this.game.rnd.realInRange(this.minParticleScale,this.maxParticleScale);c.scale.setTo(b,b)}c.body.drag.x=this.particleDrag.x;c.body.drag.y=this.particleDrag.y};Phaser.Particles.Arcade.Emitter.prototype.setSize=function(c,b){this.width=c;this.height=b};Phaser.Particles.Arcade.Emitter.prototype.setXSpeed=function(c,b){c=c||0;b=b||0;this.minParticleSpeed.x=c;this.maxParticleSpeed.x=b};Phaser.Particles.Arcade.Emitter.prototype.setYSpeed=function(c,b){c=c||0;b=b||0;this.minParticleSpeed.y=c;this.maxParticleSpeed.y=b};Phaser.Particles.Arcade.Emitter.prototype.setRotation=function(c,b){c=c||0;b=b||0;this.minRotation=c;this.maxRotation=b};Phaser.Particles.Arcade.Emitter.prototype.at=function(b){this.emitX=b.center.x;this.emitY=b.center.y};Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"alpha",{get:function(){return this._container.alpha},set:function(b){this._container.alpha=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"visible",{get:function(){return this._container.visible},set:function(b){this._container.visible=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(b){this.emitX=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(b){this.emitY=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-(this.width/2))}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+(this.width/2))}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-(this.height/2))}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+(this.height/2))}});Phaser.Tilemap=function(d,e,b,i,g,h,c){if(typeof g==="undefined"){g=true}if(typeof h==="undefined"){h=0}if(typeof c==="undefined"){c=0}this.game=d;this.group=null;this.name="";this.key=e;this.renderOrderID=0;this.collisionCallback=null;this.exists=true;this.visible=true;this.tiles=[];this.layers=[];var f=this.game.cache.getTilemap(e);PIXI.DisplayObjectContainer.call(this);this.position.x=b;this.position.y=i;this.type=Phaser.TILEMAP;this.renderer=new Phaser.TilemapRenderer(this.game);this.mapFormat=f.format;switch(this.mapFormat){case Phaser.Tilemap.CSV:this.parseCSV(f.mapData,e,h,c);break;case Phaser.Tilemap.JSON:this.parseTiledJSON(f.mapData,e);break}if(this.currentLayer&&g){this.game.world.setSize(this.currentLayer.widthInPixels,this.currentLayer.heightInPixels,true)}};Phaser.Tilemap.prototype=Object.create(PIXI.DisplayObjectContainer.prototype);Phaser.Tilemap.prototype.constructor=Phaser.Tilemap;Phaser.Tilemap.CSV=0;Phaser.Tilemap.JSON=1;Phaser.Tilemap.prototype.parseCSV=function(d,j,h,g){var f=new Phaser.TilemapLayer(this,0,j,Phaser.Tilemap.CSV,"TileLayerCSV"+this.layers.length.toString(),h,g);d=d.trim();var k=d.split("\n");for(var e=0;e0){f.addColumn(c)}}f.updateBounds();f.createCanvas();var b=f.parseTileOffsets();this.currentLayer=f;this.collisionLayer=f;this.layers.push(f);this.generateTiles(b)};Phaser.Tilemap.prototype.parseTiledJSON=function(g,f){for(var e=0;e0){this.collisionCallback.call(this.collisionCallbackContext,b,this._tempCollisionData)}return true}else{return false}};Phaser.Tilemap.prototype.putTile=function(b,e,c,d){if(typeof d==="undefined"){d=this.currentLayer.ID}this.layers[d].putTile(b,e,c)};Phaser.Tilemap.prototype.update=function(){this.renderer.render(this)};Phaser.Tilemap.prototype.destroy=function(){this.tiles.length=0;this.layers.length=0};Object.defineProperty(Phaser.Tilemap.prototype,"widthInPixels",{get:function(){return this.currentLayer.widthInPixels}});Object.defineProperty(Phaser.Tilemap.prototype,"heightInPixels",{get:function(){return this.currentLayer.heightInPixels}});Phaser.TilemapLayer=function(f,i,e,d,c,h,b){this.exists=true;this.visible=true;this.widthInTiles=0;this.heightInTiles=0;this.widthInPixels=0;this.heightInPixels=0;this.tileMargin=0;this.tileSpacing=0;this.parent=f;this.game=f.game;this.ID=i;this.name=c;this.key=e;this.type=Phaser.TILEMAPLAYER;this.mapFormat=d;this.tileWidth=h;this.tileHeight=b;this.boundsInTiles=new Phaser.Rectangle();var g=this.game.cache.getTilemap(e);this.tileset=g.data;this._alpha=1;this.canvas=null;this.context=null;this.baseTexture=null;this.texture=null;this.sprite=null;this.mapData=[];this._tempTileBlock=[];this._tempBlockResults=[]};Phaser.TilemapLayer.prototype={putTileWorldXY:function(b,d,c){b=this.game.math.snapToFloor(b,this.tileWidth)/this.tileWidth;d=this.game.math.snapToFloor(d,this.tileHeight)/this.tileHeight;if(d>=0&&d=0&&b=0&&d=0&&bthis.widthInPixels||b.body.y<0||b.body.bottom>this.heightInPixels){return this._tempBlockResults}this._tempTileX=this.game.math.snapToFloor(b.body.x,this.tileWidth)/this.tileWidth;this._tempTileY=this.game.math.snapToFloor(b.body.y,this.tileHeight)/this.tileHeight;this._tempTileW=(this.game.math.snapToCeil(b.body.width,this.tileWidth)+this.tileWidth)/this.tileWidth;this._tempTileH=(this.game.math.snapToCeil(b.body.height,this.tileHeight)+this.tileHeight)/this.tileHeight;this.getTempBlock(this._tempTileX,this._tempTileY,this._tempTileW,this._tempTileH,true);for(var c=0;cthis.widthInTiles){g=this.widthInTiles}if(c>this.heightInTiles){c=this.heightInTiles}this._tempTileBlock=[];for(var b=h;b=0&&c=0&&bb.widthInTiles){this._maxX=b.widthInTiles}if(this._maxY>b.heightInTiles){this._maxY=b.heightInTiles}if(this._startX+this._maxX>b.widthInTiles){this._startX=b.widthInTiles-this._maxX}if(this._startY+this._maxY>b.heightInTiles){this._startY=b.heightInTiles-this._maxY}this._dx=-(this.game.camera.x-(this._startX*b.tileWidth));this._dy=-(this.game.camera.y-(this._startY*b.tileHeight));this._tx=this._dx;this._ty=this._dy;if(b.alpha!==1){this._ga=b.context.globalAlpha;b.context.globalAlpha=b.alpha}b.context.clearRect(0,0,b.canvas.width,b.canvas.height);for(var f=this._startY;f-1){b.context.globalAlpha=this._ga}if(this.game.renderType==Phaser.WEBGL){PIXI.texturesToUpdate.push(b.baseTexture)}}return true}}; \ No newline at end of file diff --git a/docs2/jsdoc_work.txt b/docs2/jsdoc_work.txt deleted file mode 100644 index 03fb7337..00000000 --- a/docs2/jsdoc_work.txt +++ /dev/null @@ -1,74 +0,0 @@ -JSDOC3 Work: - -1) This should go at the top of every file (with the module name corrected) - -/** -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.Animation -*/ - -2) This is the format a constructor should be: - -/** -* The constructor description goes here. If there isn't one for you to paste in, just put TODO. -* -* @class Phaser.Animation -* @constructor -* @param {Phaser.Game} game - A reference to the currently running game. -* @param {Phaser.Sprite} parent - A reference to the owner of this Animation. -* @param {string} name - The unique name for this animation, used in playback commands. -* @param {Phaser.Animation.FrameData} frameData - The FrameData object that contains all frames used by this Animation. -* @param {(Array.|Array.)} frames - An array of numbers or strings indicating which frames to play in which order. -* @param {number} delay - The time between each frame of the animation, given in ms. -* @param {boolean} looped - Should this animation loop or play through once. -*/ - -You must ensure the class is correct and it has the @constructor tag. -It is important you include the data-type. I don't expect you to know what the data type is, so just include: {todo} -It is important you include the hypen after the parameter name. You will always know what the parameter name is, so it should always be included. -You often won't know what the parameter description is, so just put "todo", like this: - -* @param {todo} name - todo. - -3) Functions are nearly exactly the same as the constructor: - -/** -* The function description goes here. If there isn't one for you to paste in, just put TODO. -* -* @method play -* @param {Number} [frameRate=null] The framerate to play the animation at. -* @return {Phaser.Animation} A reference to this Animation instance. -*/ - -You must ensure the @method tag is correct and present. -It is important you include the data-type. I don't expect you to know what the data type is, so just include: {todo} -It is important you include the hypen after the parameter name. You will always know what the parameter name is, so it should always be included. -You often won't know what the parameter description is, so just put "todo", like this: - -* @param {todo} name - todo. - -4) All properties must be marked-up: - -/** -* @property {boolean} isFinished - The finished state of the Animation. Set to true once playback completes, false during playback. -* @default -*/ -this.isFinished = false; - -It is important you include the data-type. I don't expect you to know what the data type is, so just include: {todo} -It is important you include the hypen after the parameter name. You will always know what the parameter name is, so it should always be included. -You often won't know what the parameter description is, so just put "todo", like this: - -* @property {todo} isFinished - todo. - -If the property has a base value assigned to it (i.e. a number or a string) then put @default. -If the property starts with an underscore it must include @private. Here is an example combining the two: - -/** -* @property {number} _frameIndex - The index of the current frame. -* @private -* @default -*/ -this._frameIndex = 0; diff --git a/docs2/out/AnimationManager-Phaser.AnimationManager.html b/docs2/out/AnimationManager-Phaser.AnimationManager.html deleted file mode 100644 index 5a25abcb..00000000 --- a/docs2/out/AnimationManager-Phaser.AnimationManager.html +++ /dev/null @@ -1,707 +0,0 @@ - - - - - - Phaser Class: AnimationManager - - - - - - - - - - -

    - - -
    - - -
    - -
    - - - -

    Class: AnimationManager

    -
    - -
    -

    - AnimationManager -

    - -

    Phaser.AnimationManager

    - -
    - -
    -
    - - - - -
    -

    new AnimationManager(sprite)

    - - -
    -
    - - -
    -

    The Animation Manager is used to add, play and update Phaser Animations. -Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    sprite - - -Phaser.Sprite - - - -

    A reference to the Game Object that owns this AnimationManager.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -

    Members

    - -
    - -
    -

    currentFrame

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    currentFrame - - -Phaser.Animation.Frame - - - -

    The currently displayed Frame of animation, if any.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • null
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    game

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running Game.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    sprite

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    sprite - - -Phaser.Sprite - - - -

    A reference to the parent Sprite that owns this AnimationManager.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    updateIfVisible

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    updateIfVisible - - -boolean - - - -

    Should the animation data continue to update even if the Sprite.visible is set to false.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • true
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - -
    - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Tue Oct 01 2013 23:59:05 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/AnimationManager.html b/docs2/out/AnimationManager.html deleted file mode 100644 index 06c6b6a4..00000000 --- a/docs2/out/AnimationManager.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - Phaser Module: AnimationManager - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Module: AnimationManager

    -
    - -
    -

    - AnimationManager -

    - -
    - - - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Tue Oct 01 2013 23:59:05 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Back.html b/docs2/out/Back.html deleted file mode 100644 index b21a0a88..00000000 --- a/docs2/out/Back.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Back - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Back

    -
    - -
    -

    - Back -

    - -
    - -
    -
    - - - - -

    Back easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Back ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Back ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Back ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Bounce.html b/docs2/out/Bounce.html deleted file mode 100644 index 8767df5c..00000000 --- a/docs2/out/Bounce.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Bounce - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Bounce

    -
    - -
    -

    - Bounce -

    - -
    - -
    -
    - - - - -

    Bounce easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Bounce ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Bounce ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Bounce ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Circular.html b/docs2/out/Circular.html deleted file mode 100644 index bc4edeae..00000000 --- a/docs2/out/Circular.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Circular - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Circular

    -
    - -
    -

    - Circular -

    - -
    - -
    -
    - - - - -

    Circular easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Circular ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Circular ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Circular ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Cubic.html b/docs2/out/Cubic.html deleted file mode 100644 index d5580a6f..00000000 --- a/docs2/out/Cubic.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Cubic - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Cubic

    -
    - -
    -

    - Cubic -

    - -
    - -
    -
    - - - - -

    Cubic easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Cubic ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Cubic ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Cubic ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Elastic.html b/docs2/out/Elastic.html deleted file mode 100644 index c5338776..00000000 --- a/docs2/out/Elastic.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Elastic - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Elastic

    -
    - -
    -

    - Elastic -

    - -
    - -
    -
    - - - - -

    Elastic easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Elastic ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Elastic ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Elastic ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Exponential.html b/docs2/out/Exponential.html deleted file mode 100644 index 080e8300..00000000 --- a/docs2/out/Exponential.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Exponential - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Exponential

    -
    - -
    -

    - Exponential -

    - -
    - -
    -
    - - - - -

    Exponential easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Exponential ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Exponential ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Exponential ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Linear.html b/docs2/out/Linear.html deleted file mode 100644 index 53d2fdde..00000000 --- a/docs2/out/Linear.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - - - Phaser Namespace: Linear - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Linear

    -
    - -
    -

    - Linear -

    - -
    - -
    -
    - - - - -

    Linear easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    k^2.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Parser.js.html b/docs2/out/Parser.js.html deleted file mode 100644 index 4ee8747a..00000000 --- a/docs2/out/Parser.js.html +++ /dev/null @@ -1,617 +0,0 @@ - - - - - - Phaser Source: animation/Parser.js - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Source: animation/Parser.js

    - -
    -
    -
    /**
    -* @author       Richard Davey <rich@photonstorm.com>
    -* @copyright    2013 Photon Storm Ltd.
    -* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    -*/
    -
    -/**
    -* Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.
    -*
    -* @class Phaser.Animation.Parser
    -*/
    -Phaser.Animation.Parser = {
    -
    -    /**
    -    * Parse a Sprite Sheet and extract the animation frame data from it.
    -    *
    -    * @method Phaser.Animation.Parser.spriteSheet
    -    * @param {Phaser.Game} game - A reference to the currently running game.
    -    * @param {string} key - The Game.Cache asset key of the Sprite Sheet image.
    -    * @param {number} frameWidth - The fixed width of each frame of the animation.
    -    * @param {number} frameHeight - The fixed height of each frame of the animation.
    -    * @param {number} [frameMax=-1] - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".
    -    * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames.
    -    */
    -    spriteSheet: function (game, key, frameWidth, frameHeight, frameMax) {
    -
    -        //  How big is our image?
    -        var img = game.cache.getImage(key);
    -
    -        if (img == null)
    -        {
    -            return null;
    -        }
    -
    -        var width = img.width;
    -        var height = img.height;
    -
    -        if (frameWidth <= 0)
    -        {
    -            frameWidth = Math.floor(-width / Math.min(-1, frameWidth));
    -        }
    -
    -        if (frameHeight <= 0)
    -        {
    -            frameHeight = Math.floor(-height / Math.min(-1, frameHeight));
    -        }
    -
    -        var row = Math.round(width / frameWidth);
    -        var column = Math.round(height / frameHeight);
    -        var total = row * column;
    -        
    -        if (frameMax !== -1)
    -        {
    -            total = frameMax;
    -        }
    -
    -        //  Zero or smaller than frame sizes?
    -        if (width == 0 || height == 0 || width < frameWidth || height < frameHeight || total === 0)
    -        {
    -            console.warn("Phaser.Animation.Parser.spriteSheet: width/height zero or width/height < given frameWidth/frameHeight");
    -            return null;
    -        }
    -
    -        //  Let's create some frames then
    -        var data = new Phaser.Animation.FrameData();
    -        var x = 0;
    -        var y = 0;
    -
    -        for (var i = 0; i < total; i++)
    -        {
    -            var uuid = game.rnd.uuid();
    -
    -            data.addFrame(new Phaser.Animation.Frame(i, x, y, frameWidth, frameHeight, '', uuid));
    -
    -            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[key], {
    -                x: x,
    -                y: y,
    -                width: frameWidth,
    -                height: frameHeight
    -            });
    -
    -            x += frameWidth;
    -
    -            if (x === width)
    -            {
    -                x = 0;
    -                y += frameHeight;
    -            }
    -        }
    -
    -        return data;
    -
    -    },
    -
    -    /**
    -    * Parse the JSON data and extract the animation frame data from it.
    -    *
    -    * @method Phaser.Animation.Parser.JSONData
    -    * @param {Phaser.Game} game - A reference to the currently running game.
    -    * @param {Object} json - The JSON data from the Texture Atlas. Must be in Array format.
    -    * @param {string} cacheKey - The Game.Cache asset key of the texture image.
    -    * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames.
    -    */
    -    JSONData: function (game, json, cacheKey) {
    -
    -        //  Malformed?
    -        if (!json['frames'])
    -        {
    -            console.warn("Phaser.Animation.Parser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array");
    -            console.log(json);
    -            return;
    -        }
    -
    -        //  Let's create some frames then
    -        var data = new Phaser.Animation.FrameData();
    -        
    -        //  By this stage frames is a fully parsed array
    -        var frames = json['frames'];
    -        var newFrame;
    -        
    -        for (var i = 0; i < frames.length; i++)
    -        {
    -            var uuid = game.rnd.uuid();
    -
    -            newFrame = data.addFrame(new Phaser.Animation.Frame(
    -                i,
    -            	frames[i].frame.x, 
    -            	frames[i].frame.y, 
    -            	frames[i].frame.w, 
    -            	frames[i].frame.h, 
    -            	frames[i].filename,
    -                uuid
    -			));
    -
    -            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
    -                x: frames[i].frame.x,
    -                y: frames[i].frame.y,
    -                width: frames[i].frame.w,
    -                height: frames[i].frame.h
    -            });
    -
    -            if (frames[i].trimmed)
    -            {
    -                newFrame.setTrim(
    -                    frames[i].trimmed, 
    -                    frames[i].sourceSize.w, 
    -                    frames[i].sourceSize.h, 
    -                    frames[i].spriteSourceSize.x, 
    -                    frames[i].spriteSourceSize.y, 
    -                    frames[i].spriteSourceSize.w, 
    -                    frames[i].spriteSourceSize.h
    -                );
    -
    -                //  We had to hack Pixi to get this to work :(
    -                PIXI.TextureCache[uuid].trimmed = true;
    -                PIXI.TextureCache[uuid].trim.x = frames[i].spriteSourceSize.x;
    -                PIXI.TextureCache[uuid].trim.y = frames[i].spriteSourceSize.y;
    -
    -            }
    -        }
    -
    -        return data;
    -
    -    },
    -
    -    /**
    -    * Parse the JSON data and extract the animation frame data from it.
    -    *
    -    * @method Phaser.Animation.Parser.JSONDataHash
    -    * @param {Phaser.Game} game - A reference to the currently running game.
    -    * @param {Object} json - The JSON data from the Texture Atlas. Must be in JSON Hash format.
    -    * @param {string} cacheKey - The Game.Cache asset key of the texture image.
    -    * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames.
    -    */
    -    JSONDataHash: function (game, json, cacheKey) {
    -
    -        //  Malformed?
    -        if (!json['frames'])
    -        {
    -            console.warn("Phaser.Animation.Parser.JSONDataHash: Invalid Texture Atlas JSON given, missing 'frames' object");
    -            console.log(json);
    -            return;
    -        }
    -            
    -        //  Let's create some frames then
    -        var data = new Phaser.Animation.FrameData();
    -
    -        //  By this stage frames is a fully parsed array
    -        var frames = json['frames'];
    -        var newFrame;
    -        var i = 0;
    -        
    -        for (var key in frames)
    -        {
    -            var uuid = game.rnd.uuid();
    -
    -            newFrame = data.addFrame(new Phaser.Animation.Frame(
    -                i,
    -                frames[key].frame.x, 
    -                frames[key].frame.y, 
    -                frames[key].frame.w, 
    -                frames[key].frame.h, 
    -                key,
    -                uuid
    -            ));
    -
    -            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
    -                x: frames[key].frame.x,
    -                y: frames[key].frame.y,
    -                width: frames[key].frame.w,
    -                height: frames[key].frame.h
    -            });
    -
    -            if (frames[key].trimmed)
    -            {
    -                newFrame.setTrim(
    -                    frames[key].trimmed, 
    -                    frames[key].sourceSize.w, 
    -                    frames[key].sourceSize.h, 
    -                    frames[key].spriteSourceSize.x, 
    -                    frames[key].spriteSourceSize.y, 
    -                    frames[key].spriteSourceSize.w, 
    -                    frames[key].spriteSourceSize.h
    -                );
    -
    -                //  We had to hack Pixi to get this to work :(
    -                PIXI.TextureCache[uuid].trimmed = true;
    -                PIXI.TextureCache[uuid].trim.x = frames[key].spriteSourceSize.x;
    -                PIXI.TextureCache[uuid].trim.y = frames[key].spriteSourceSize.y;
    -
    -            }
    -
    -            i++;
    -        }
    -
    -        return data;
    -
    -    },
    -
    -    /**
    -    * Parse the XML data and extract the animation frame data from it.
    -    *
    -    * @method Phaser.Animation.Parser.XMLData
    -    * @param {Phaser.Game} game - A reference to the currently running game.
    -    * @param {Object} xml - The XML data from the Texture Atlas. Must be in Starling XML format.
    -    * @param {string} cacheKey - The Game.Cache asset key of the texture image.
    -    * @return {Phaser.Animation.FrameData} A FrameData object containing the parsed frames.
    -    */
    -    XMLData: function (game, xml, cacheKey) {
    -
    -        //  Malformed?
    -        if (!xml.getElementsByTagName('TextureAtlas'))
    -        {
    -            console.warn("Phaser.Animation.Parser.XMLData: Invalid Texture Atlas XML given, missing <TextureAtlas> tag");
    -            return;
    -        }
    -
    -        //  Let's create some frames then
    -        var data = new Phaser.Animation.FrameData();
    -        var frames = xml.getElementsByTagName('SubTexture');
    -        var newFrame;
    -        
    -        for (var i = 0; i < frames.length; i++)
    -        {
    -            var uuid = game.rnd.uuid();
    -
    -            var frame = frames[i].attributes;
    -
    -            newFrame = data.addFrame(new Phaser.Animation.Frame(
    -                i,
    -            	frame.x.nodeValue, 
    -            	frame.y.nodeValue, 
    -            	frame.width.nodeValue, 
    -            	frame.height.nodeValue, 
    -            	frame.name.nodeValue,
    -                uuid
    -            ));
    -
    -            PIXI.TextureCache[uuid] = new PIXI.Texture(PIXI.BaseTextureCache[cacheKey], {
    -                x: frame.x.nodeValue,
    -                y: frame.y.nodeValue,
    -                width: frame.width.nodeValue,
    -                height: frame.height.nodeValue
    -            });
    -
    -            //  Trimmed?
    -            if (frame.frameX.nodeValue != '-0' || frame.frameY.nodeValue != '-0')
    -            {
    -                newFrame.setTrim(
    -                	true, 
    -                	frame.width.nodeValue, 
    -                	frame.height.nodeValue, 
    -                	Math.abs(frame.frameX.nodeValue), 
    -                	Math.abs(frame.frameY.nodeValue), 
    -                	frame.frameWidth.nodeValue, 
    -                	frame.frameHeight.nodeValue
    -                );
    -
    -                PIXI.TextureCache[uuid].realSize = {
    -                    x: Math.abs(frame.frameX.nodeValue),
    -                    y: Math.abs(frame.frameY.nodeValue),
    -                    w: frame.frameWidth.nodeValue,
    -                    h: frame.frameHeight.nodeValue
    -                };
    -
    -                //  We had to hack Pixi to get this to work :(
    -                PIXI.TextureCache[uuid].trimmed = true;
    -                PIXI.TextureCache[uuid].trim.x = Math.abs(frame.frameX.nodeValue);
    -                PIXI.TextureCache[uuid].trim.y = Math.abs(frame.frameY.nodeValue);
    -
    -            }
    -        }
    -
    -        return data;
    -
    -    }
    -
    -};
    -
    -
    -
    - - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - diff --git a/docs2/out/Parser.js_.html b/docs2/out/Parser.js_.html deleted file mode 100644 index 3711692e..00000000 --- a/docs2/out/Parser.js_.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - Phaser Source: loader/Parser.js - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Source: loader/Parser.js

    - -
    -
    -
    /**
    -* @author       Richard Davey <rich@photonstorm.com>
    -* @copyright    2013 Photon Storm Ltd.
    -* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    -*/
    -
    -/**
    -* Phaser.Loader.Parser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.
    -*
    -* @class Phaser.Loader.Parser
    -*/
    -Phaser.Loader.Parser = {
    -	
    -    /**
    -    * Parse frame data from an XML file.
    -    * @method Phaser.Loader.Parser.bitmapFont
    -    * @param {object} xml - XML data you want to parse.
    -    * @return {FrameData} Generated FrameData object.
    -    */
    -	bitmapFont: function (game, xml, cacheKey) {
    -
    -        //  Malformed?
    -        if (!xml.getElementsByTagName('font'))
    -        {
    -            console.warn("Phaser.Loader.Parser.bitmapFont: Invalid XML given, missing <font> tag");
    -            return;
    -        }
    -
    -        var texture = PIXI.TextureCache[cacheKey];
    -
    -        var data = {};
    -        var info = xml.getElementsByTagName("info")[0];
    -        var common = xml.getElementsByTagName("common")[0];
    -        data.font = info.attributes.getNamedItem("face").nodeValue;
    -        data.size = parseInt(info.attributes.getNamedItem("size").nodeValue, 10);
    -        data.lineHeight = parseInt(common.attributes.getNamedItem("lineHeight").nodeValue, 10);
    -        data.chars = {};
    -
    -        //parse letters
    -        var letters = xml.getElementsByTagName("char");
    -
    -        for (var i = 0; i < letters.length; i++)
    -        {
    -            var charCode = parseInt(letters[i].attributes.getNamedItem("id").nodeValue, 10);
    -
    -            var textureRect = {
    -                x: parseInt(letters[i].attributes.getNamedItem("x").nodeValue, 10),
    -                y: parseInt(letters[i].attributes.getNamedItem("y").nodeValue, 10),
    -                width: parseInt(letters[i].attributes.getNamedItem("width").nodeValue, 10),
    -                height: parseInt(letters[i].attributes.getNamedItem("height").nodeValue, 10)
    -            };
    -
    -            //	Note: This means you can only have 1 BitmapFont loaded at once!
    -            //	Need to replace this with our own handler soon.
    -            PIXI.TextureCache[charCode] = new PIXI.Texture(texture, textureRect);
    -
    -            data.chars[charCode] = {
    -                xOffset: parseInt(letters[i].attributes.getNamedItem("xoffset").nodeValue, 10),
    -                yOffset: parseInt(letters[i].attributes.getNamedItem("yoffset").nodeValue, 10),
    -                xAdvance: parseInt(letters[i].attributes.getNamedItem("xadvance").nodeValue, 10),
    -                kerning: {},
    -                texture:new PIXI.Texture(texture, textureRect)
    -
    -            };
    -        }
    -
    -        //parse kernings
    -        var kernings = xml.getElementsByTagName("kerning");
    -
    -        for (i = 0; i < kernings.length; i++)
    -        {
    -           var first = parseInt(kernings[i].attributes.getNamedItem("first").nodeValue, 10);
    -           var second = parseInt(kernings[i].attributes.getNamedItem("second").nodeValue, 10);
    -           var amount = parseInt(kernings[i].attributes.getNamedItem("amount").nodeValue, 10);
    -
    -            data.chars[second].kerning[first] = amount;
    -        }
    -
    -        PIXI.BitmapText.fonts[data.font] = data;
    -
    -    }
    -
    -};
    -
    -
    - - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - diff --git a/docs2/out/Phaser.Animation.Frame.html b/docs2/out/Phaser.Animation.Frame.html deleted file mode 100644 index 45f24b81..00000000 --- a/docs2/out/Phaser.Animation.Frame.html +++ /dev/null @@ -1,2815 +0,0 @@ - - - - - - Phaser Class: Frame - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: Frame

    -
    - -
    -

    - .Animation. - - Frame -

    - -

    Phaser.Animation.Frame

    - -
    - -
    -
    - - - - -
    -

    new Frame(index, x, y, width, height, name, uuid)

    - - -
    -
    - - -
    -

    A Frame is a single frame of an animation and is part of a FrameData collection.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    index - - -number - - - -

    The index of this Frame within the FrameData set it is being added to.

    x - - -number - - - -

    X position of the frame within the texture image.

    y - - -number - - - -

    Y position of the frame within the texture image.

    width - - -number - - - -

    Width of the frame within the texture image.

    height - - -number - - - -

    Height of the frame within the texture image.

    name - - -string - - - -

    The name of the frame. In Texture Atlas data this is usually set to the filename.

    uuid - - -string - - - -

    Internal UUID key.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -

    Members

    - -
    - -
    -

    centerX

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    centerX - - -number - - - -

    Center X position within the image to cut from.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    centerY

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    centerY - - -number - - - -

    Center Y position within the image to cut from.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    distance

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    distance - - -number - - - -

    The distance from the top left to the bottom-right of this Frame.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    height

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    height - - -number - - - -

    Height of the frame.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    index

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    index - - -number - - - -

    The index of this Frame within the FrameData set it is being added to.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    name

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - - -string - - - -

    Useful for Texture Atlas files (is set to the filename value).

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    rotated

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    rotated - - -boolean - - - -

    Rotated? (not yet implemented)

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • false
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    rotationDirection

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    rotationDirection - - -string - - - -

    Either 'cw' or 'ccw', rotation is always 90 degrees.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • 'cw'
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    sourceSizeH

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    sourceSizeH - - -number - - - -

    Height of the original sprite.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    sourceSizeW

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    sourceSizeW - - -number - - - -

    Width of the original sprite.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    spriteSourceSizeH

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    spriteSourceSizeH - - -number - - - -

    Height of the trimmed sprite.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • 0
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    spriteSourceSizeW

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    spriteSourceSizeW - - -number - - - -

    Width of the trimmed sprite.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • 0
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    spriteSourceSizeX

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    spriteSourceSizeX - - -number - - - -

    X position of the trimmed sprite inside original sprite.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • 0
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    spriteSourceSizeY

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    spriteSourceSizeY - - -number - - - -

    Y position of the trimmed sprite inside original sprite.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • 0
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    trimmed

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    trimmed - - -boolean - - - -

    Was it trimmed when packed?

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • false
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    uuid

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    uuid - - -string - - - -

    A link to the PIXI.TextureCache entry.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    width

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    width - - -number - - - -

    Width of the frame.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    x

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    x - - -number - - - -

    X position within the image to cut from.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    y

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    y - - -number - - - -

    Y position within the image to cut from.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - -
    - - - -

    Methods

    - -
    - -
    -

    setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

    - - -
    -
    - - -
    -

    If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    trimmed - - -boolean - - - -

    If this frame was trimmed or not.

    actualWidth - - -number - - - -

    The width of the frame before being trimmed.

    actualHeight - - -number - - - -

    The height of the frame before being trimmed.

    destX - - -number - - - -

    The destination X position of the trimmed frame for display.

    destY - - -number - - - -

    The destination Y position of the trimmed frame for display.

    destWidth - - -number - - - -

    The destination width of the trimmed frame for display.

    destHeight - - -number - - - -

    The destination height of the trimmed frame for display.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:41 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Phaser.Animation.FrameData.html b/docs2/out/Phaser.Animation.FrameData.html deleted file mode 100644 index 6e9e4cf0..00000000 --- a/docs2/out/Phaser.Animation.FrameData.html +++ /dev/null @@ -1,1762 +0,0 @@ - - - - - - Phaser Class: FrameData - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: FrameData

    -
    - -
    -

    - .Animation. - - FrameData -

    - -

    Phaser.Animation.FrameData

    - -
    - -
    -
    - - - - -
    -

    new FrameData()

    - - -
    -
    - - -
    -

    FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

    -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -

    Members

    - -
    - -
    -

    <readonly> total

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    total - - -number - - - -

    The total number of frames in this FrameData set.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - -
    - - - -

    Methods

    - -
    - -
    -

    addFrame(frame) → {Phaser.Animation.Frame}

    - - -
    -
    - - -
    -

    Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    frame - - -Phaser.Animation.Frame - - - -

    The frame to add to this FrameData set.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The frame that was just added.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.Frame - - -
    -
    - - - - - -
    - - - -
    -

    checkFrameName(name) → {boolean}

    - - -
    -
    - - -
    -

    Check if there is a Frame with the given name.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - - -string - - - -

    The name of the frame you want to check.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    True if the frame is found, otherwise false.

    -
    - - - -
    -
    - Type -
    -
    - -boolean - - -
    -
    - - - - - -
    - - - -
    -

    getFrame(index) → {Phaser.Animation.Frame}

    - - -
    -
    - - -
    -

    Get a Frame by its numerical index.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    index - - -number - - - -

    The index of the frame you want to get.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The frame, if found.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.Frame - - -
    -
    - - - - - -
    - - - -
    -

    getFrameByName(name) → {Phaser.Animation.Frame}

    - - -
    -
    - - -
    -

    Get a Frame by its frame name.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - - -string - - - -

    The name of the frame you want to get.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The frame, if found.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.Frame - - -
    -
    - - - - - -
    - - - -
    -

    getFrameIndexes(frames, useNumericIndex, output) → {Array}

    - - -
    -
    - - -
    -

    Returns all of the Frame indexes in this FrameData set. -The frames indexes are returned in the output array, or if none is provided in a new Array object.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    frames - - -Array - - - - - - - - - - - -

    An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.

    useNumericIndex - - -boolean - - - - - - <optional>
    - - - - - -
    - - true - -

    Are the given frames using numeric indexes (default) or strings? (false)

    output - - -Array - - - - - - <optional>
    - - - - - -
    - -

    If given the results will be appended to the end of this array otherwise a new array will be created.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    An array of all Frame indexes matching the given names or IDs.

    -
    - - - -
    -
    - Type -
    -
    - -Array - - -
    -
    - - - - - -
    - - - -
    -

    getFrameRange(start, end, output) → {Array}

    - - -
    -
    - - -
    -

    Returns a range of frames based on the given start and end frame indexes and returns them in an Array.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDescription
    start - - -number - - - - - - - - - -

    The starting frame index.

    end - - -number - - - - - - - - - -

    The ending frame index.

    output - - -Array - - - - - - <optional>
    - - - - - -

    If given the results will be appended to the end of this array otherwise a new array will be created.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    An array of Frames between the start and end index values, or an empty array if none were found.

    -
    - - - -
    -
    - Type -
    -
    - -Array - - -
    -
    - - - - - -
    - - - -
    -

    getFrames(frames, useNumericIndex, output) → {Array}

    - - -
    -
    - - -
    -

    Returns all of the Frames in this FrameData set where the frame index is found in the input array. -The frames are returned in the output array, or if none is provided in a new Array object.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    frames - - -Array - - - - - - - - - - - -

    An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned.

    useNumericIndex - - -boolean - - - - - - <optional>
    - - - - - -
    - - true - -

    Are the given frames using numeric indexes (default) or strings? (false)

    output - - -Array - - - - - - <optional>
    - - - - - -
    - -

    If given the results will be appended to the end of this array otherwise a new array will be created.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    An array of all Frames in this FrameData set matching the given names or IDs.

    -
    - - - -
    -
    - Type -
    -
    - -Array - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Phaser.Animation.Parser.html b/docs2/out/Phaser.Animation.Parser.html deleted file mode 100644 index 3bccd7c2..00000000 --- a/docs2/out/Phaser.Animation.Parser.html +++ /dev/null @@ -1,1269 +0,0 @@ - - - - - - Phaser Class: Parser - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: Parser

    -
    - -
    -

    - .Animation. - - Parser -

    - -
    - -
    -
    - - - - -
    -

    new Parser()

    - - -
    -
    - - -
    -

    Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.

    -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> JSONData(game, json, cacheKey) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    -

    Parse the JSON data and extract the animation frame data from it.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running game.

    json - - -Object - - - -

    The JSON data from the Texture Atlas. Must be in Array format.

    cacheKey - - -string - - - -

    The Game.Cache asset key of the texture image.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    A FrameData object containing the parsed frames.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - - -
    - - - -
    -

    <static> JSONDataHash(game, json, cacheKey) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    -

    Parse the JSON data and extract the animation frame data from it.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running game.

    json - - -Object - - - -

    The JSON data from the Texture Atlas. Must be in JSON Hash format.

    cacheKey - - -string - - - -

    The Game.Cache asset key of the texture image.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    A FrameData object containing the parsed frames.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - - -
    - - - -
    -

    <static> spriteSheet(game, key, frameWidth, frameHeight, frameMax) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    -

    Parse a Sprite Sheet and extract the animation frame data from it.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    game - - -Phaser.Game - - - - - - - - - - - -

    A reference to the currently running game.

    key - - -string - - - - - - - - - - - -

    The Game.Cache asset key of the Sprite Sheet image.

    frameWidth - - -number - - - - - - - - - - - -

    The fixed width of each frame of the animation.

    frameHeight - - -number - - - - - - - - - - - -

    The fixed height of each frame of the animation.

    frameMax - - -number - - - - - - <optional>
    - - - - - -
    - - -1 - -

    The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames".

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    A FrameData object containing the parsed frames.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - - -
    - - - -
    -

    <static> XMLData(game, xml, cacheKey) → {Phaser.Animation.FrameData}

    - - -
    -
    - - -
    -

    Parse the XML data and extract the animation frame data from it.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running game.

    xml - - -Object - - - -

    The XML data from the Texture Atlas. Must be in Starling XML format.

    cacheKey - - -string - - - -

    The Game.Cache asset key of the texture image.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    A FrameData object containing the parsed frames.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Animation.FrameData - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:42 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Phaser.Loader.Parser.html b/docs2/out/Phaser.Loader.Parser.html deleted file mode 100644 index a68e0d06..00000000 --- a/docs2/out/Phaser.Loader.Parser.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - Phaser Class: Parser - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: Parser

    -
    - -
    -

    - .Loader. - - Parser -

    - -
    - -
    -
    - - - - -
    -

    new Parser()

    - - -
    -
    - - -
    -

    Phaser.Loader.Parser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

    -
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> bitmapFont(xml) → {FrameData}

    - - -
    -
    - - -
    -

    Parse frame data from an XML file.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    xml - - -object - - - -

    XML data you want to parse.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Generated FrameData object.

    -
    - - - -
    -
    - Type -
    -
    - -FrameData - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:18:43 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/PluginManager-Phaser.PluginManager.html b/docs2/out/PluginManager-Phaser.PluginManager.html deleted file mode 100644 index d899654c..00000000 --- a/docs2/out/PluginManager-Phaser.PluginManager.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - Phaser Class: PluginManager - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: PluginManager

    -
    - -
    -

    - PluginManager -

    - -

    PPhaser - PluginManager

    - -
    - -
    -
    - - - - -
    -

    new PluginManager(game, parent)

    - - -
    -
    - - -
    -

    Description.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running game.

    parent - - -Description - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -

    Members

    - -
    - -
    -

    game

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running game.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    plugins

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    plugins - - -array - - - -

    Description.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - -
    - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 02 2013 13:35:30 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/PluginManager.html b/docs2/out/PluginManager.html deleted file mode 100644 index 62067e01..00000000 --- a/docs2/out/PluginManager.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - Phaser Module: PluginManager - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Module: PluginManager

    -
    - -
    -

    - PluginManager -

    - -
    - -
    -
    - - - - - - -
    - - - - - - - - - - - -
    Author:
    -
    - -
    - - - - - - - - -
    License:
    -
    - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 02 2013 13:35:30 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Quadratic.html b/docs2/out/Quadratic.html deleted file mode 100644 index 300ea209..00000000 --- a/docs2/out/Quadratic.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Quadratic - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Quadratic

    -
    - -
    -

    - Quadratic -

    - -
    - -
    -
    - - - - -

    Quadratic easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    k^2.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    k* (2-k).

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Quartic.html b/docs2/out/Quartic.html deleted file mode 100644 index c9913fe0..00000000 --- a/docs2/out/Quartic.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Quartic - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Quartic

    -
    - -
    -

    - Quartic -

    - -
    - -
    -
    - - - - -

    Quartic easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Quartic ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Quartic ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Quartic ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Quintic.html b/docs2/out/Quintic.html deleted file mode 100644 index 9e505166..00000000 --- a/docs2/out/Quintic.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Quintic - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Quintic

    -
    - -
    -

    - Quintic -

    - -
    - -
    -
    - - - - -

    Quintic easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Quintic ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Quintic ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Quintic ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Sinusoidal.html b/docs2/out/Sinusoidal.html deleted file mode 100644 index e335ad15..00000000 --- a/docs2/out/Sinusoidal.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - Phaser Namespace: Sinusoidal - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Namespace: Sinusoidal

    -
    - -
    -

    - Sinusoidal -

    - -
    - -
    -
    - - - - -

    Sinusoidal easing.

    - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - -

    Methods

    - -
    - -
    -

    <static> In(k) → {number}

    - - -
    -
    - - -
    -

    Sinusoidal ease-in.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> InOut(k) → {number}

    - - -
    -
    - - -
    -

    Sinusoidal ease-in/out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - - - -
    -

    <static> Out(k) → {number}

    - - -
    -
    - - -
    -

    Sinusoidal ease-out.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    k - - -number - - - -

    Description.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -number - - -
    -
    - - - - - -
    - -
    - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:57:03 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Utils.html b/docs2/out/Utils.html deleted file mode 100644 index d664e73f..00000000 --- a/docs2/out/Utils.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - Phaser Module: Utils - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Module: Utils

    -
    - -
    -

    - Phaser. - - Utils -

    - -
    - -
    -
    - - - - - - -
    - - - - - - - - - - - -
    Author:
    -
    - -
    - - - - - - - - -
    License:
    -
    - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:27:21 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/Utils_.html b/docs2/out/Utils_.html deleted file mode 100644 index fa393369..00000000 --- a/docs2/out/Utils_.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - Phaser Class: Utils - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: Utils

    -
    - -
    -

    - Utils -

    - -
    - -
    -
    - - - - -
    -

    new Utils()

    - - -
    -
    - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:27:23 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/module-Phaser.html b/docs2/out/module-Phaser.html deleted file mode 100644 index 5017475c..00000000 --- a/docs2/out/module-Phaser.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - Phaser Module: Phaser - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Module: Phaser

    -
    - -
    -

    - Phaser -

    - -
    - -
    -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:47:48 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/module-Tween-Phaser.Tween.html b/docs2/out/module-Tween-Phaser.Tween.html deleted file mode 100644 index f5a017d4..00000000 --- a/docs2/out/module-Tween-Phaser.Tween.html +++ /dev/null @@ -1,1070 +0,0 @@ - - - - - - Phaser Class: Tween - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: Tween

    -
    - -
    -

    - Tween -

    - -

    Tween

    - -
    - -
    -
    - - - - -
    -

    new Tween(object, game)

    - - -
    -
    - - -
    -

    Tween constructor -Create a new <code>Tween</code>.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    object - - -object - - - -

    Target object will be affected by this tween.

    game - - -Phaser.Game - - - -

    Current game instance.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -

    Members

    - -
    - -
    -

    game

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running Game.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    isRunning

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    isRunning - - -boolean - - - -

    Description.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • false
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    onComplete

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    onComplete - - -Phaser.Signal - - - -

    Description.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    onStart

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    onStart - - -Phaser.Signal - - - -

    Description.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    pendingDelete

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    pendingDelete - - -boolean - - - -

    If this tween is ready to be deleted by the TweenManager.

    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • false
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - -
    - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:53:32 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/module-Tween-Phaser.TweenManager.html b/docs2/out/module-Tween-Phaser.TweenManager.html deleted file mode 100644 index 8d742af3..00000000 --- a/docs2/out/module-Tween-Phaser.TweenManager.html +++ /dev/null @@ -1,746 +0,0 @@ - - - - - - Phaser Class: TweenManager - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Class: TweenManager

    -
    - -
    -

    - TweenManager -

    - -

    Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. -Tweens are hooked into the game clock and pause system, adjusting based on the game state.

    -

    TweenManager is based heavily on tween.js by http://soledadpenades.com. -The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. -It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. -Please see https://github.com/sole/tween.js for a full list of contributors.

    - -
    - -
    -
    - - - - -
    -

    new TweenManager(game)

    - - -
    -
    - - -
    -

    Phaser - TweenManager

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    A reference to the currently running game.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - -

    Members

    - -
    - -
    -

    game

    - - -
    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    game - - -Phaser.Game - - - -

    Local reference to game.

    -
    - - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - - - -
    -

    REVISION

    - - -
    -
    - -
    -

    Version number of this library.

    -
    - - - - - -
    - - -
    Properties:
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    REVISION - - -string - - - -
    -
    - - - - - - - - - - - - - - - - - - -
    Default Value:
    -
    • "11dev"
    - - - -
    Source:
    -
    - - - - - - - -
    - - - -
    - -
    - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/module-Tween.html b/docs2/out/module-Tween.html deleted file mode 100644 index 7c241474..00000000 --- a/docs2/out/module-Tween.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - Phaser Module: Tween - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Module: Tween

    -
    - -
    -

    - Tween -

    - -
    - -
    -
    - - - - - - -
    - - - - - - - - - - - -
    Author:
    -
    - -
    - - - - - - - - -
    License:
    -
    - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 01:56:58 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/modules.list.html b/docs2/out/modules.list.html deleted file mode 100644 index 9a1416c1..00000000 --- a/docs2/out/modules.list.html +++ /dev/null @@ -1,676 +0,0 @@ - - - - - - Phaser Modules - - - - - - - - - - -
    - - -
    - - -
    - -
    - - - -

    Modules

    -
    - -
    -

    - -

    - -
    - -
    -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - - - - - - -

    Classes

    - -
    -
    Animation
    -
    - -
    AnimationManager
    -
    - -
    AnimationParser
    -
    - -
    Cache
    -
    - -
    Camera
    -
    - -
    Canvas
    -
    - -
    Circle
    -
    - -
    Color
    -
    - -
    Device
    -
    - -
    Easing
    -
    - -
    Back
    -
    - -
    Bounce
    -
    - -
    Circular
    -
    - -
    Cubic
    -
    - -
    Elastic
    -
    - -
    Exponential
    -
    - -
    Linear
    -
    - -
    Quadratic
    -
    - -
    Quartic
    -
    - -
    Quintic
    -
    - -
    Sinusoidal
    -
    - -
    Frame
    -
    - -
    FrameData
    -
    - -
    Game
    -
    - -
    Group
    -
    - -
    Input
    -
    - -
    InputHandler
    -
    - -
    Key
    -
    - -
    Keyboard
    -
    - -
    LinkedList
    -
    - -
    Loader
    -
    - -
    LoaderParser
    -
    - -
    Math
    -
    - -
    Mouse
    -
    - -
    MSPointer
    -
    - -
    Net
    -
    - -
    Particles
    -
    - -
    Emitter
    -
    - -
    Plugin
    -
    - -
    PluginManager
    -
    - -
    Point
    -
    - -
    Pointer
    -
    - -
    QuadTree
    -
    - -
    RandomDataGenerator
    -
    - -
    Rectangle
    -
    - -
    RequestAnimationFrame
    -
    - -
    Signal
    -
    - -
    Sound
    -
    - -
    SoundManager
    -
    - -
    Stage
    -
    - -
    StageScaleMode
    -
    - -
    State
    -
    - -
    StateManager
    -
    - -
    Time
    -
    - -
    Touch
    -
    - -
    Tween
    -
    - -
    TweenManager
    -
    - -
    Debug
    -
    - -
    World
    -
    - -
    SignalBinding
    -
    - -
    Utils
    -
    -
    - - - -

    Namespaces

    - -
    -
    Phaser
    -
    -
    - - - - - - - - - -
    - -
    - - - - -
    - -
    -
    - - - - Phaser Copyright © 2012-2013 Photon Storm Ltd. - -
    - - - Documentation generated by JSDoc 3.2.0-dev - on Thu Oct 03 2013 02:27:17 GMT+0100 (BST) using the DocStrap template. - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs2/out/scripts/linenumber.js b/docs2/out/scripts/linenumber.js deleted file mode 100644 index a0c570d5..00000000 --- a/docs2/out/scripts/linenumber.js +++ /dev/null @@ -1,17 +0,0 @@ -(function() { - var counter = 0; - var numbered; - var source = document.getElementsByClassName('prettyprint source'); - - if (source && source[0]) { - source = source[0].getElementsByTagName('code')[0]; - - numbered = source.innerHTML.split('\n'); - numbered = numbered.map(function(item) { - counter++; - return '' + item; - }); - - source.innerHTML = numbered.join('\n'); - } -})(); diff --git a/docs2/out/styles/jsdoc-default.css b/docs2/out/styles/jsdoc-default.css deleted file mode 100644 index ea49f607..00000000 --- a/docs2/out/styles/jsdoc-default.css +++ /dev/null @@ -1,283 +0,0 @@ -html -{ - overflow: auto; - background-color: #fff; -} - -body -{ - font: 14px "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans serif; - line-height: 130%; - color: #000; - background-color: #fff; -} - -a { - color: #444; -} - -a:visited { - color: #444; -} - -a:active { - color: #444; -} - -header -{ - display: block; - padding: 6px 4px; -} - -.class-description { - font-style: italic; - font-family: Palatino, 'Palatino Linotype', serif; - font-size: 130%; - line-height: 140%; - margin-bottom: 1em; - margin-top: 1em; -} - -#main { - float: left; - width: 100%; -} - -section -{ - display: block; - - background-color: #fff; - padding: 12px 24px; - border-bottom: 1px solid #ccc; - margin-right: 240px; -} - -.variation { - display: none; -} - -.optional:after { - content: "opt"; - font-size: 60%; - color: #aaa; - font-style: italic; - font-weight: lighter; -} - -nav -{ - display: block; - float: left; - margin-left: -230px; - margin-top: 28px; - width: 220px; - border-left: 1px solid #ccc; - padding-left: 9px; -} - -nav ul { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; - font-size: 100%; - line-height: 17px; - padding:0; - margin:0; - list-style-type:none; -} - -nav h2 a, nav h2 a:visited { - color: #A35A00; - text-decoration: none; -} - -nav h3 { - margin-top: 12px; -} - -nav li { - margin-top: 6px; -} - -nav a { - color: #5C5954; -} - -nav a:visited { - color: #5C5954; -} - -nav a:active { - color: #5C5954; -} - -footer { - display: block; - padding: 6px; - margin-top: 12px; - font-style: italic; - font-size: 90%; -} - -h1 -{ - font-size: 200%; - font-weight: bold; - letter-spacing: -0.01em; - margin: 6px 0 9px 0; -} - -h2 -{ - font-size: 170%; - font-weight: bold; - letter-spacing: -0.01em; - margin: 6px 0 3px 0; -} - -h3 -{ - font-size: 150%; - font-weight: bold; - letter-spacing: -0.01em; - margin-top: 16px; - margin: 6px 0 3px 0; -} - -h4 -{ - font-size: 130%; - font-weight: bold; - letter-spacing: -0.01em; - margin-top: 16px; - margin: 18px 0 3px 0; - color: #A35A00; -} - -h5, .container-overview .subsection-title -{ - font-size: 120%; - font-weight: bold; - letter-spacing: -0.01em; - margin: 8px 0 3px -16px; -} - -h6 -{ - font-size: 100%; - letter-spacing: -0.01em; - margin: 6px 0 3px 0; - font-style: italic; -} - -.ancestors { color: #999; } -.ancestors a -{ - color: #999 !important; - text-decoration: none; -} - -.important -{ - font-weight: bold; - color: #950B02; -} - -.yes-def { - text-indent: -1000px; -} - -.type-signature { - color: #aaa; -} - -.name, .signature { - font-family: Consolas, "Lucida Console", Monaco, monospace; -} - -.details { margin-top: 14px; } -.details dt { width:100px; float:left; border-left: 2px solid #DDD; padding-left: 10px; padding-top: 6px; } -.details dd { margin-left: 50px; } -.details ul { margin: 0; } -.details ul { list-style-type: none; } -.details li { margin-left: 30px; padding-top: 6px; } - -.description { - margin-bottom: 1em; - margin-left: -16px; - margin-top: 1em; -} - -.code-caption -{ - font-style: italic; - font-family: Palatino, 'Palatino Linotype', serif; - font-size: 107%; - margin: 0; -} - -.prettyprint -{ - border: 1px solid #ddd; - width: 80%; - overflow: auto; -} - -.prettyprint.source { - width: inherit; -} - -.prettyprint code -{ - font-family: Consolas, 'Lucida Console', Monaco, monospace; - font-size: 100%; - line-height: 18px; - display: block; - padding: 4px 12px; - margin: 0; - background-color: #fff; - color: #000; - border-left: 3px #ddd solid; -} - -.params, .props -{ - border-spacing: 0; - border: 0; - border-collapse: collapse; -} - -.params .name, .props .name, .name code { - color: #A35A00; - font-family: Consolas, 'Lucida Console', Monaco, monospace; - font-size: 100%; -} - -.params td, .params th, .props td, .props th -{ - border: 1px solid #ddd; - margin: 0px; - text-align: left; - vertical-align: top; - padding: 4px 6px; - display: table-cell; -} - -.params thead tr, .props thead tr -{ - background-color: #ddd; - font-weight: bold; -} - -.params .params thead tr, .props .props thead tr -{ - background-color: #fff; - font-weight: bold; -} - -.params th, .props th { border-right: 1px solid #aaa; } -.params thead .last, .props thead .last { border-right: 1px solid #ddd; } - -.disabled { - color: #454545; -} diff --git a/docs2/out/styles/prettify-jsdoc.css b/docs2/out/styles/prettify-jsdoc.css deleted file mode 100644 index 5a2526e3..00000000 --- a/docs2/out/styles/prettify-jsdoc.css +++ /dev/null @@ -1,111 +0,0 @@ -/* JSDoc prettify.js theme */ - -/* plain text */ -.pln { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* string content */ -.str { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a keyword */ -.kwd { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a comment */ -.com { - font-weight: normal; - font-style: italic; -} - -/* a type name */ -.typ { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a literal value */ -.lit { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* punctuation */ -.pun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp open bracket */ -.opn { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp close bracket */ -.clo { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a markup tag name */ -.tag { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute name */ -.atn { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute value */ -.atv { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a declaration */ -.dec { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a variable name */ -.var { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a function name */ -.fun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; -} diff --git a/docs2/tags.txt b/docs2/tags.txt deleted file mode 100644 index 3a300098..00000000 --- a/docs2/tags.txt +++ /dev/null @@ -1,47 +0,0 @@ -/** -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser -*/ - -/** -* The class constructor -* -* @class Name -* @constructor -* @param {Phaser.Game} game A reference to the currently running game. -*/ - -/** -* A reference to the currently running Game. -* @property game -* @type {Phaser.Game} -*/ -public game: Phaser.Game; - -/** -* My method description. Like other pieces of your comment blocks, -* this can span multiple lines. -* -* @method methodName -* @param {String} foo Argument 1 -* @param {Object} config A config object -* @param {String} config.name The name on the config object -* @param {Function} config.callback A callback function on the config object -* @param {Boolean} [extra=false] Do extra, optional work -* @return {Boolean} Returns true on success -*/ - -/** -* Property description. -* -* @property propertyName -* @public @private -* @type {Object} -* @default "foo" -*/ - -@param {Type} Name Description -Object, Array, String, Boolean, Number, Mixed, MyType - diff --git a/plugins2/CSS3Filters.js b/plugins/CSS3Filters.js similarity index 100% rename from plugins2/CSS3Filters.js rename to plugins/CSS3Filters.js diff --git a/plugins2/ColorHarmony.js b/plugins/ColorHarmony.js similarity index 100% rename from plugins2/ColorHarmony.js rename to plugins/ColorHarmony.js diff --git a/plugins2/SamplePlugin.js b/plugins/SamplePlugin.js similarity index 100% rename from plugins2/SamplePlugin.js rename to plugins/SamplePlugin.js diff --git a/docs2/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla b/resources/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla similarity index 100% rename from docs2/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla rename to resources/Phaser Logo/2D Text/Phaser Logo 2D Vector Outline.fla diff --git a/docs2/Phaser Logo/PNG/Phaser Logo Print Quality.png b/resources/Phaser Logo/PNG/Phaser Logo Print Quality.png similarity index 100% rename from docs2/Phaser Logo/PNG/Phaser Logo Print Quality.png rename to resources/Phaser Logo/PNG/Phaser Logo Print Quality.png diff --git a/docs2/Phaser Logo/PNG/Phaser Logo Web Quality.png b/resources/Phaser Logo/PNG/Phaser Logo Web Quality.png similarity index 100% rename from docs2/Phaser Logo/PNG/Phaser Logo Web Quality.png rename to resources/Phaser Logo/PNG/Phaser Logo Web Quality.png diff --git a/docs2/Phaser Logo/PNG/Phaser Logo iPad Resolution.png b/resources/Phaser Logo/PNG/Phaser Logo iPad Resolution.png similarity index 100% rename from docs2/Phaser Logo/PNG/Phaser Logo iPad Resolution.png rename to resources/Phaser Logo/PNG/Phaser Logo iPad Resolution.png diff --git a/docs2/Phaser Logo/PNG/Phaser-Logo-Small.png b/resources/Phaser Logo/PNG/Phaser-Logo-Small.png similarity index 100% rename from docs2/Phaser Logo/PNG/Phaser-Logo-Small.png rename to resources/Phaser Logo/PNG/Phaser-Logo-Small.png diff --git a/docs2/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png b/resources/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png similarity index 100% rename from docs2/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png rename to resources/Phaser Logo/Pixel Art/Phaser-Logo-Sizes.png diff --git a/docs2/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png b/resources/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png similarity index 100% rename from docs2/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png rename to resources/Phaser Logo/Pixel Art/phaser_pixel_large_shaded.png diff --git a/docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png b/resources/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png similarity index 100% rename from docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png rename to resources/Phaser Logo/Pixel Art/phaser_pixel_medium_flat.png diff --git a/docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png b/resources/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png similarity index 100% rename from docs2/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png rename to resources/Phaser Logo/Pixel Art/phaser_pixel_medium_shaded.png diff --git a/docs2/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png b/resources/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png similarity index 100% rename from docs2/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png rename to resources/Phaser Logo/Pixel Art/phaser_pixel_small_flat.png diff --git a/docs2/Phaser Logo/Vector/Phaser Logo.eps b/resources/Phaser Logo/Vector/Phaser Logo.eps similarity index 100% rename from docs2/Phaser Logo/Vector/Phaser Logo.eps rename to resources/Phaser Logo/Vector/Phaser Logo.eps diff --git a/docs2/Phaser Logo/Vector/Phaser Logo.fla b/resources/Phaser Logo/Vector/Phaser Logo.fla similarity index 100% rename from docs2/Phaser Logo/Vector/Phaser Logo.fla rename to resources/Phaser Logo/Vector/Phaser Logo.fla diff --git a/docs2/Screen Shots/phaser-cybernoid.png b/resources/Screen Shots/phaser-cybernoid.png similarity index 100% rename from docs2/Screen Shots/phaser-cybernoid.png rename to resources/Screen Shots/phaser-cybernoid.png diff --git a/docs2/Screen Shots/phaser_balls.png b/resources/Screen Shots/phaser_balls.png similarity index 100% rename from docs2/Screen Shots/phaser_balls.png rename to resources/Screen Shots/phaser_balls.png diff --git a/docs2/Screen Shots/phaser_blaster.png b/resources/Screen Shots/phaser_blaster.png similarity index 100% rename from docs2/Screen Shots/phaser_blaster.png rename to resources/Screen Shots/phaser_blaster.png diff --git a/docs2/Screen Shots/phaser_cams.png b/resources/Screen Shots/phaser_cams.png similarity index 100% rename from docs2/Screen Shots/phaser_cams.png rename to resources/Screen Shots/phaser_cams.png diff --git a/docs2/Screen Shots/phaser_desert.png b/resources/Screen Shots/phaser_desert.png similarity index 100% rename from docs2/Screen Shots/phaser_desert.png rename to resources/Screen Shots/phaser_desert.png diff --git a/docs2/Screen Shots/phaser_fixed_camera.png b/resources/Screen Shots/phaser_fixed_camera.png similarity index 100% rename from docs2/Screen Shots/phaser_fixed_camera.png rename to resources/Screen Shots/phaser_fixed_camera.png diff --git a/docs2/Screen Shots/phaser_fruit.png b/resources/Screen Shots/phaser_fruit.png similarity index 100% rename from docs2/Screen Shots/phaser_fruit.png rename to resources/Screen Shots/phaser_fruit.png diff --git a/docs2/Screen Shots/phaser_fruit_particles.png b/resources/Screen Shots/phaser_fruit_particles.png similarity index 100% rename from docs2/Screen Shots/phaser_fruit_particles.png rename to resources/Screen Shots/phaser_fruit_particles.png diff --git a/docs2/Screen Shots/phaser_mapdraw.png b/resources/Screen Shots/phaser_mapdraw.png similarity index 100% rename from docs2/Screen Shots/phaser_mapdraw.png rename to resources/Screen Shots/phaser_mapdraw.png diff --git a/docs2/Screen Shots/phaser_mario_combo.png b/resources/Screen Shots/phaser_mario_combo.png similarity index 100% rename from docs2/Screen Shots/phaser_mario_combo.png rename to resources/Screen Shots/phaser_mario_combo.png diff --git a/docs2/Screen Shots/phaser_particles.png b/resources/Screen Shots/phaser_particles.png similarity index 100% rename from docs2/Screen Shots/phaser_particles.png rename to resources/Screen Shots/phaser_particles.png diff --git a/docs2/Screen Shots/phaser_platformer.png b/resources/Screen Shots/phaser_platformer.png similarity index 100% rename from docs2/Screen Shots/phaser_platformer.png rename to resources/Screen Shots/phaser_platformer.png diff --git a/docs2/Screen Shots/phaser_quadtree.png b/resources/Screen Shots/phaser_quadtree.png similarity index 100% rename from docs2/Screen Shots/phaser_quadtree.png rename to resources/Screen Shots/phaser_quadtree.png diff --git a/docs2/Screen Shots/phaser_rotate4.png b/resources/Screen Shots/phaser_rotate4.png similarity index 100% rename from docs2/Screen Shots/phaser_rotate4.png rename to resources/Screen Shots/phaser_rotate4.png diff --git a/docs2/Screen Shots/phaser_scrollfactor.png b/resources/Screen Shots/phaser_scrollfactor.png similarity index 100% rename from docs2/Screen Shots/phaser_scrollfactor.png rename to resources/Screen Shots/phaser_scrollfactor.png diff --git a/docs2/Screen Shots/phaser_sprite_bounds.png b/resources/Screen Shots/phaser_sprite_bounds.png similarity index 100% rename from docs2/Screen Shots/phaser_sprite_bounds.png rename to resources/Screen Shots/phaser_sprite_bounds.png diff --git a/docs2/Screen Shots/phaser_tanks.png b/resources/Screen Shots/phaser_tanks.png similarity index 100% rename from docs2/Screen Shots/phaser_tanks.png rename to resources/Screen Shots/phaser_tanks.png diff --git a/docs2/Screen Shots/phaser_tilemap.png b/resources/Screen Shots/phaser_tilemap.png similarity index 100% rename from docs2/Screen Shots/phaser_tilemap.png rename to resources/Screen Shots/phaser_tilemap.png diff --git a/docs2/Screen Shots/phaser_tilemap_collision.png b/resources/Screen Shots/phaser_tilemap_collision.png similarity index 100% rename from docs2/Screen Shots/phaser_tilemap_collision.png rename to resources/Screen Shots/phaser_tilemap_collision.png diff --git a/docs2/Screen Shots/phaser_tilemap_debug.png b/resources/Screen Shots/phaser_tilemap_debug.png similarity index 100% rename from docs2/Screen Shots/phaser_tilemap_debug.png rename to resources/Screen Shots/phaser_tilemap_debug.png diff --git a/docs2/WIP/01_phaser-arcade.jpg b/resources/wip/01_phaser-arcade.jpg similarity index 100% rename from docs2/WIP/01_phaser-arcade.jpg rename to resources/wip/01_phaser-arcade.jpg diff --git a/docs2/WIP/02_phaser-newsletter.jpg b/resources/wip/02_phaser-newsletter.jpg similarity index 100% rename from docs2/WIP/02_phaser-newsletter.jpg rename to resources/wip/02_phaser-newsletter.jpg diff --git a/docs2/WIP/Physics Comparison.xlsx b/resources/wip/Physics Comparison.xlsx similarity index 100% rename from docs2/WIP/Physics Comparison.xlsx rename to resources/wip/Physics Comparison.xlsx diff --git a/docs2/WIP/phaser-manual_2013-08-27.pdf b/resources/wip/phaser-manual_2013-08-27.pdf similarity index 100% rename from docs2/WIP/phaser-manual_2013-08-27.pdf rename to resources/wip/phaser-manual_2013-08-27.pdf diff --git a/docs2/WIP/phaser_copy.doc b/resources/wip/phaser_copy.doc similarity index 100% rename from docs2/WIP/phaser_copy.doc rename to resources/wip/phaser_copy.doc diff --git a/docs2/WIP/phaser_onscreen-controls_1-arcade.png b/resources/wip/phaser_onscreen-controls_1-arcade.png similarity index 100% rename from docs2/WIP/phaser_onscreen-controls_1-arcade.png rename to resources/wip/phaser_onscreen-controls_1-arcade.png diff --git a/docs2/WIP/phaser_onscreen-controls_2-dpad.png b/resources/wip/phaser_onscreen-controls_2-dpad.png similarity index 100% rename from docs2/WIP/phaser_onscreen-controls_2-dpad.png rename to resources/wip/phaser_onscreen-controls_2-dpad.png diff --git a/docs2/WIP/phaser_onscreen-controls_3-generic.png b/resources/wip/phaser_onscreen-controls_3-generic.png similarity index 100% rename from docs2/WIP/phaser_onscreen-controls_3-generic.png rename to resources/wip/phaser_onscreen-controls_3-generic.png diff --git a/docs2/Resources/avoid-digits.png b/resources/wip/sprites/avoid-digits.png similarity index 100% rename from docs2/Resources/avoid-digits.png rename to resources/wip/sprites/avoid-digits.png diff --git a/docs2/Resources/avoid-panel.png b/resources/wip/sprites/avoid-panel.png similarity index 100% rename from docs2/Resources/avoid-panel.png rename to resources/wip/sprites/avoid-panel.png diff --git a/docs2/Resources/avoid-sheet.png b/resources/wip/sprites/avoid-sheet.png similarity index 100% rename from docs2/Resources/avoid-sheet.png rename to resources/wip/sprites/avoid-sheet.png diff --git a/docs2/Resources/avoidmock4x2.png b/resources/wip/sprites/avoidmock4x2.png similarity index 100% rename from docs2/Resources/avoidmock4x2.png rename to resources/wip/sprites/avoidmock4x2.png diff --git a/docs2/Resources/box-01.png b/resources/wip/sprites/box-01.png similarity index 100% rename from docs2/Resources/box-01.png rename to resources/wip/sprites/box-01.png diff --git a/docs2/Resources/box-02.png b/resources/wip/sprites/box-02.png similarity index 100% rename from docs2/Resources/box-02.png rename to resources/wip/sprites/box-02.png diff --git a/docs2/Resources/breakout2c.png b/resources/wip/sprites/breakout2c.png similarity index 100% rename from docs2/Resources/breakout2c.png rename to resources/wip/sprites/breakout2c.png diff --git a/docs2/Resources/phaser checkboxes.gif b/resources/wip/sprites/phaser checkboxes.gif similarity index 100% rename from docs2/Resources/phaser checkboxes.gif rename to resources/wip/sprites/phaser checkboxes.gif diff --git a/docs2/Resources/phaser power tools.gif b/resources/wip/sprites/phaser power tools.gif similarity index 100% rename from docs2/Resources/phaser power tools.gif rename to resources/wip/sprites/phaser power tools.gif diff --git a/docs2/Resources/phaser sprites10.gif b/resources/wip/sprites/phaser sprites10.gif similarity index 100% rename from docs2/Resources/phaser sprites10.gif rename to resources/wip/sprites/phaser sprites10.gif diff --git a/docs2/zwoptex-phaser.template b/resources/zwoptex-phaser.template similarity index 100% rename from docs2/zwoptex-phaser.template rename to resources/zwoptex-phaser.template diff --git a/wip/physics/AdvancedPhysics.js b/wip/physics/AdvancedPhysics.js deleted file mode 100644 index b65b373d..00000000 --- a/wip/physics/AdvancedPhysics.js +++ /dev/null @@ -1,269 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /** - * Phaser - Physics Manager - * - * The Physics Manager is responsible for looking after, creating and colliding - * all of the physics bodies and joints in the world. - */ - (function (Physics) { - var AdvancedPhysics = (function () { - function AdvancedPhysics(game) { - this.lastTime = Date.now(); - this.frameRateHz = 60; - this.timeDelta = 0; - this.paused = false; - this.step = false; - // step through the simulation (i.e. per click) - //public paused: bool = true; - //public step: bool = false; // step through the simulation (i.e. per click) - this.velocityIterations = 8; - this.positionIterations = 4; - this.allowSleep = true; - this.warmStarting = true; - this.game = game; - this.gravity = new Phaser.Vec2(); - this.space = new Physics.Space(this); - this.collision = new Physics.Collision(); - } - AdvancedPhysics.clear = function clear() { - //Manager.debug.textContent = ""; - Physics.Manager.log = []; - }; - AdvancedPhysics.write = function write(s) { - //Manager.debug.textContent += s + "\n"; - }; - AdvancedPhysics.writeAll = function writeAll() { - for(var i = 0; i < Physics.Manager.log.length; i++) { - //Manager.debug.textContent += Manager.log[i]; - } - }; - AdvancedPhysics.log = []; - AdvancedPhysics.dump = function dump(phase, body) { - /* - var s = "\n\nPhase: " + phase + "\n"; - s += "Position: " + body.position.toString() + "\n"; - s += "Velocity: " + body.velocity.toString() + "\n"; - s += "Angle: " + body.angle + "\n"; - s += "Force: " + body.force.toString() + "\n"; - s += "Torque: " + body.torque + "\n"; - s += "Bounds: " + body.bounds.toString() + "\n"; - s += "Shape ***\n"; - s += "Vert 0: " + body.shapes[0].verts[0].toString() + "\n"; - s += "Vert 1: " + body.shapes[0].verts[1].toString() + "\n"; - s += "Vert 2: " + body.shapes[0].verts[2].toString() + "\n"; - s += "Vert 3: " + body.shapes[0].verts[3].toString() + "\n"; - s += "TVert 0: " + body.shapes[0].tverts[0].toString() + "\n"; - s += "TVert 1: " + body.shapes[0].tverts[1].toString() + "\n"; - s += "TVert 2: " + body.shapes[0].tverts[2].toString() + "\n"; - s += "TVert 3: " + body.shapes[0].tverts[3].toString() + "\n"; - s += "Plane 0: " + body.shapes[0].planes[0].normal.toString() + "\n"; - s += "Plane 1: " + body.shapes[0].planes[1].normal.toString() + "\n"; - s += "Plane 2: " + body.shapes[0].planes[2].normal.toString() + "\n"; - s += "Plane 3: " + body.shapes[0].planes[3].normal.toString() + "\n"; - s += "TPlane 0: " + body.shapes[0].tplanes[0].normal.toString() + "\n"; - s += "TPlane 1: " + body.shapes[0].tplanes[1].normal.toString() + "\n"; - s += "TPlane 2: " + body.shapes[0].tplanes[2].normal.toString() + "\n"; - s += "TPlane 3: " + body.shapes[0].tplanes[3].normal.toString() + "\n"; - - Manager.log.push(s); - */ - }; - AdvancedPhysics.SHAPE_TYPE_CIRCLE = 0; - AdvancedPhysics.SHAPE_TYPE_SEGMENT = 1; - AdvancedPhysics.SHAPE_TYPE_POLY = 2; - AdvancedPhysics.SHAPE_NUM_TYPES = 3; - AdvancedPhysics.JOINT_TYPE_ANGLE = 0; - AdvancedPhysics.JOINT_TYPE_REVOLUTE = 1; - AdvancedPhysics.JOINT_TYPE_WELD = 2; - AdvancedPhysics.JOINT_TYPE_WHEEL = 3; - AdvancedPhysics.JOINT_TYPE_PRISMATIC = 4; - AdvancedPhysics.JOINT_TYPE_DISTANCE = 5; - AdvancedPhysics.JOINT_TYPE_ROPE = 6; - AdvancedPhysics.JOINT_TYPE_MOUSE = 7; - AdvancedPhysics.JOINT_LINEAR_SLOP = 0.0008; - AdvancedPhysics.JOINT_ANGULAR_SLOP = 2 * 0.017453292519943294444444444444444; - AdvancedPhysics.JOINT_MAX_LINEAR_CORRECTION = 0.5; - AdvancedPhysics.JOINT_MAX_ANGULAR_CORRECTION = 8 * 0.017453292519943294444444444444444; - AdvancedPhysics.JOINT_LIMIT_STATE_INACTIVE = 0; - AdvancedPhysics.JOINT_LIMIT_STATE_AT_LOWER = 1; - AdvancedPhysics.JOINT_LIMIT_STATE_AT_UPPER = 2; - AdvancedPhysics.JOINT_LIMIT_STATE_EQUAL_LIMITS = 3; - AdvancedPhysics.CONTACT_SOLVER_COLLISION_SLOP = 0.0008; - AdvancedPhysics.CONTACT_SOLVER_BAUMGARTE = 0.28; - AdvancedPhysics.CONTACT_SOLVER_MAX_LINEAR_CORRECTION = 1; - AdvancedPhysics.bodyCounter = 0; - AdvancedPhysics.jointCounter = 0; - AdvancedPhysics.shapeCounter = 0; - AdvancedPhysics.prototype.update = function () { - // Get these from Phaser.Time instead - var time = Date.now(); - var frameTime = (time - this.lastTime) / 1000; - this.lastTime = time; - // if rAf - why? - frameTime = Math.floor(frameTime * 60 + 0.5) / 60; - //if (!mouseDown) - //{ - // var p = canvasToWorld(mousePosition); - // var body = space.findBodyByPoint(p); - // //domCanvas.style.cursor = body ? "pointer" : "default"; - //} - if(!this.paused || this.step) { - Physics.Manager.clear(); - var h = 1 / this.frameRateHz; - this.timeDelta += frameTime; - if(this.step) { - this.step = false; - this.timeDelta = h; - } - for(var maxSteps = 4; maxSteps > 0 && this.timeDelta >= h; maxSteps--) { - this.space.step(h, this.velocityIterations, this.positionIterations, this.warmStarting, this.allowSleep); - this.timeDelta -= h; - } - if(this.timeDelta > h) { - this.timeDelta = 0; - } - } - //frameCount++; - }; - AdvancedPhysics.prototype.addBody = function (body) { - this.space.addBody(body); - }; - AdvancedPhysics.prototype.removeBody = function (body) { - this.space.removeBody(body); - }; - AdvancedPhysics.prototype.addJoint = function (joint) { - this.space.addJoint(joint); - }; - AdvancedPhysics.prototype.removeJoint = function (joint) { - this.space.removeJoint(joint); - }; - AdvancedPhysics.prototype.pixelsToMeters = function (value) { - return value * 0.02; - }; - AdvancedPhysics.prototype.metersToPixels = function (value) { - return value * 50; - }; - AdvancedPhysics.pixelsToMeters = function pixelsToMeters(value) { - return value * 0.02; - }; - AdvancedPhysics.metersToPixels = function metersToPixels(value) { - return value * 50; - }; - AdvancedPhysics.p2m = function p2m(value) { - return value * 0.02; - }; - AdvancedPhysics.m2p = function m2p(value) { - return value * 50; - }; - AdvancedPhysics.areaForCircle = function areaForCircle(radius_outer, radius_inner) { - return Math.PI * (radius_outer * radius_outer - radius_inner * radius_inner); - }; - AdvancedPhysics.inertiaForCircle = function inertiaForCircle(mass, center, radius_outer, radius_inner) { - return mass * ((radius_outer * radius_outer + radius_inner * radius_inner) * 0.5 + center.lengthSq()); - }; - AdvancedPhysics.areaForSegment = function areaForSegment(a, b, radius) { - return radius * (Math.PI * radius + 2 * Phaser.Vec2Utils.distance(a, b)); - }; - AdvancedPhysics.centroidForSegment = function centroidForSegment(a, b) { - return Phaser.Vec2Utils.scale(Phaser.Vec2Utils.add(a, b), 0.5); - }; - AdvancedPhysics.inertiaForSegment = function inertiaForSegment(mass, a, b) { - var distsq = Phaser.Vec2Utils.distanceSq(b, a); - var offset = Phaser.Vec2Utils.scale(Phaser.Vec2Utils.add(a, b), 0.5); - return mass * (distsq / 12 + offset.lengthSq()); - }; - AdvancedPhysics.areaForPoly = function areaForPoly(verts) { - var area = 0; - for(var i = 0; i < verts.length; i++) { - area += Phaser.Vec2Utils.cross(verts[i], verts[(i + 1) % verts.length]); - } - return area / 2; - }; - AdvancedPhysics.centroidForPoly = function centroidForPoly(verts) { - var area = 0; - var vsum = new Phaser.Vec2(); - for(var i = 0; i < verts.length; i++) { - var v1 = verts[i]; - var v2 = verts[(i + 1) % verts.length]; - var cross = Phaser.Vec2Utils.cross(v1, v2); - area += cross; - // SO many vecs created here - unroll these bad boys - vsum.add(Phaser.Vec2Utils.scale(Phaser.Vec2Utils.add(v1, v2), cross)); - } - return Phaser.Vec2Utils.scale(vsum, 1 / (3 * area)); - }; - AdvancedPhysics.inertiaForPoly = function inertiaForPoly(mass, verts, offset) { - var sum1 = 0; - var sum2 = 0; - for(var i = 0; i < verts.length; i++) { - var v1 = Phaser.Vec2Utils.add(verts[i], offset); - var v2 = Phaser.Vec2Utils.add(verts[(i + 1) % verts.length], offset); - var a = Phaser.Vec2Utils.cross(v2, v1); - var b = Phaser.Vec2Utils.dot(v1, v1) + Phaser.Vec2Utils.dot(v1, v2) + Phaser.Vec2Utils.dot(v2, v2); - sum1 += a * b; - sum2 += a; - } - return (mass * sum1) / (6 * sum2); - }; - AdvancedPhysics.inertiaForBox = function inertiaForBox(mass, w, h) { - return mass * (w * w + h * h) / 12; - }; - AdvancedPhysics.createConvexHull = // Create the convex hull using the Gift wrapping algorithm (http://en.wikipedia.org/wiki/Gift_wrapping_algorithm) - function createConvexHull(points) { - // Find the right most point on the hull - var i0 = 0; - var x0 = points[0].x; - for(var i = 1; i < points.length; i++) { - var x = points[i].x; - if(x > x0 || (x == x0 && points[i].y < points[i0].y)) { - i0 = i; - x0 = x; - } - } - var n = points.length; - var hull = []; - var m = 0; - var ih = i0; - while(1) { - hull[m] = ih; - var ie = 0; - for(var j = 1; j < n; j++) { - if(ie == ih) { - ie = j; - continue; - } - var r = Phaser.Vec2Utils.subtract(points[ie], points[hull[m]]); - var v = Phaser.Vec2Utils.subtract(points[j], points[hull[m]]); - var c = Phaser.Vec2Utils.cross(r, v); - if(c < 0) { - ie = j; - } - // Collinearity check - if(c == 0 && v.lengthSq() > r.lengthSq()) { - ie = j; - } - } - m++; - ih = ie; - if(ie == i0) { - break; - } - } - // Copy vertices - var newPoints = []; - for(var i = 0; i < m; ++i) { - newPoints.push(points[hull[i]]); - } - return newPoints; - }; - return AdvancedPhysics; - })(); - Physics.AdvancedPhysics = AdvancedPhysics; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/AdvancedPhysics.ts b/wip/physics/AdvancedPhysics.ts deleted file mode 100644 index c4010e83..00000000 --- a/wip/physics/AdvancedPhysics.ts +++ /dev/null @@ -1,386 +0,0 @@ -/// -/// -/// -/// - -/** -* Phaser - Physics Manager -* -* The Physics Manager is responsible for looking after, creating and colliding -* all of the physics bodies and joints in the world. -*/ - -module Phaser.Physics { - - export class AdvancedPhysics { - - constructor(game: Game) { - - this.game = game; - - this.gravity = new Phaser.Vec2; - - this.space = new Space(this); - - this.collision = new Collision(); - - } - - public collision; - - /** - * Local reference to Game. - */ - public game: Game; - - public static debug: HTMLTextAreaElement; - - public static clear() { - //Manager.debug.textContent = ""; - Manager.log = []; - } - - public static write(s: string) { - //Manager.debug.textContent += s + "\n"; - } - - public static writeAll() { - - for (var i = 0; i < Manager.log.length; i++) - { - //Manager.debug.textContent += Manager.log[i]; - } - - } - - public static log = []; - - public static dump(phase: string, body: Body) { - - /* - var s = "\n\nPhase: " + phase + "\n"; - s += "Position: " + body.position.toString() + "\n"; - s += "Velocity: " + body.velocity.toString() + "\n"; - s += "Angle: " + body.angle + "\n"; - s += "Force: " + body.force.toString() + "\n"; - s += "Torque: " + body.torque + "\n"; - s += "Bounds: " + body.bounds.toString() + "\n"; - s += "Shape ***\n"; - s += "Vert 0: " + body.shapes[0].verts[0].toString() + "\n"; - s += "Vert 1: " + body.shapes[0].verts[1].toString() + "\n"; - s += "Vert 2: " + body.shapes[0].verts[2].toString() + "\n"; - s += "Vert 3: " + body.shapes[0].verts[3].toString() + "\n"; - s += "TVert 0: " + body.shapes[0].tverts[0].toString() + "\n"; - s += "TVert 1: " + body.shapes[0].tverts[1].toString() + "\n"; - s += "TVert 2: " + body.shapes[0].tverts[2].toString() + "\n"; - s += "TVert 3: " + body.shapes[0].tverts[3].toString() + "\n"; - s += "Plane 0: " + body.shapes[0].planes[0].normal.toString() + "\n"; - s += "Plane 1: " + body.shapes[0].planes[1].normal.toString() + "\n"; - s += "Plane 2: " + body.shapes[0].planes[2].normal.toString() + "\n"; - s += "Plane 3: " + body.shapes[0].planes[3].normal.toString() + "\n"; - s += "TPlane 0: " + body.shapes[0].tplanes[0].normal.toString() + "\n"; - s += "TPlane 1: " + body.shapes[0].tplanes[1].normal.toString() + "\n"; - s += "TPlane 2: " + body.shapes[0].tplanes[2].normal.toString() + "\n"; - s += "TPlane 3: " + body.shapes[0].tplanes[3].normal.toString() + "\n"; - - Manager.log.push(s); - */ - - } - - public static collision: Collision; - - public static SHAPE_TYPE_CIRCLE: number = 0; - public static SHAPE_TYPE_SEGMENT: number = 1; - public static SHAPE_TYPE_POLY: number = 2; - public static SHAPE_NUM_TYPES: number = 3; - - public static JOINT_TYPE_ANGLE: number = 0; - public static JOINT_TYPE_REVOLUTE: number = 1; - public static JOINT_TYPE_WELD: number = 2; - public static JOINT_TYPE_WHEEL: number = 3; - public static JOINT_TYPE_PRISMATIC: number = 4; - public static JOINT_TYPE_DISTANCE: number = 5; - public static JOINT_TYPE_ROPE: number = 6; - public static JOINT_TYPE_MOUSE: number = 7; - - public static JOINT_LINEAR_SLOP: number = 0.0008; - public static JOINT_ANGULAR_SLOP: number = 2 * 0.017453292519943294444444444444444; - public static JOINT_MAX_LINEAR_CORRECTION: number = 0.5; - public static JOINT_MAX_ANGULAR_CORRECTION: number = 8 * 0.017453292519943294444444444444444; - - public static JOINT_LIMIT_STATE_INACTIVE: number = 0; - public static JOINT_LIMIT_STATE_AT_LOWER: number = 1; - public static JOINT_LIMIT_STATE_AT_UPPER: number = 2; - public static JOINT_LIMIT_STATE_EQUAL_LIMITS: number = 3; - - public static CONTACT_SOLVER_COLLISION_SLOP: number = 0.0008; - public static CONTACT_SOLVER_BAUMGARTE: number = 0.28; - public static CONTACT_SOLVER_MAX_LINEAR_CORRECTION: number = 1;//Infinity; - - public static bodyCounter: number = 0; - public static jointCounter: number = 0; - public static shapeCounter: number = 0; - - public space: Space; - public lastTime: number = Date.now(); - public frameRateHz: number = 60; - public timeDelta: number = 0; - public paused: bool = false; - public step: bool = false; // step through the simulation (i.e. per click) - //public paused: bool = true; - //public step: bool = false; // step through the simulation (i.e. per click) - public velocityIterations: number = 8; - public positionIterations: number = 4; - public allowSleep: bool = true; - public warmStarting: bool = true; - - public gravity: Phaser.Vec2; - - - public update() { - - // Get these from Phaser.Time instead - var time = Date.now(); - var frameTime = (time - this.lastTime) / 1000; - this.lastTime = time; - - // if rAf - why? - frameTime = Math.floor(frameTime * 60 + 0.5) / 60; - - //if (!mouseDown) - //{ - // var p = canvasToWorld(mousePosition); - // var body = space.findBodyByPoint(p); - // //domCanvas.style.cursor = body ? "pointer" : "default"; - //} - - if (!this.paused || this.step) - { - Manager.clear(); - - var h = 1 / this.frameRateHz; - - this.timeDelta += frameTime; - - if (this.step) - { - this.step = false; - this.timeDelta = h; - } - - for (var maxSteps = 4; maxSteps > 0 && this.timeDelta >= h; maxSteps--) - { - this.space.step(h, this.velocityIterations, this.positionIterations, this.warmStarting, this.allowSleep); - this.timeDelta -= h; - } - - if (this.timeDelta > h) - { - this.timeDelta = 0; - } - } - - //frameCount++; - - } - - public addBody(body: Body) { - this.space.addBody(body); - } - - public removeBody(body: Body) { - this.space.removeBody(body); - } - - public addJoint(joint: IJoint) { - this.space.addJoint(joint); - } - - public removeJoint(joint: IJoint) { - this.space.removeJoint(joint); - } - - public pixelsToMeters(value: number): number { - return value * 0.02; - } - - public metersToPixels(value: number): number { - return value * 50; - } - - public static pixelsToMeters(value: number): number { - return value * 0.02; - } - - public static metersToPixels(value: number): number { - return value * 50; - } - - public static p2m(value: number): number { - return value * 0.02; - } - - public static m2p(value: number): number { - return value * 50; - } - - public static areaForCircle(radius_outer: number, radius_inner: number): number { - return Math.PI * (radius_outer * radius_outer - radius_inner * radius_inner); - } - - public static inertiaForCircle(mass: number, center: Phaser.Vec2, radius_outer: number, radius_inner: number): number { - return mass * ((radius_outer * radius_outer + radius_inner * radius_inner) * 0.5 + center.lengthSq()); - } - - public static areaForSegment(a: Phaser.Vec2, b: Phaser.Vec2, radius: number): number { - return radius * (Math.PI * radius + 2 * Phaser.Vec2Utils.distance(a, b)); - } - - public static centroidForSegment(a: Phaser.Vec2, b: Phaser.Vec2): Phaser.Vec2 { - return Phaser.Vec2Utils.scale(Phaser.Vec2Utils.add(a, b), 0.5); - } - - public static inertiaForSegment(mass: number, a: Phaser.Vec2, b: Phaser.Vec2): number { - - var distsq = Phaser.Vec2Utils.distanceSq(b, a); - var offset: Phaser.Vec2 = Phaser.Vec2Utils.scale(Phaser.Vec2Utils.add(a, b), 0.5); - - return mass * (distsq / 12 + offset.lengthSq()); - - } - - public static areaForPoly(verts: Phaser.Vec2[]): number { - - var area = 0; - - for (var i = 0; i < verts.length; i++) - { - area += Phaser.Vec2Utils.cross(verts[i], verts[(i + 1) % verts.length]); - } - - return area / 2; - } - - public static centroidForPoly(verts: Phaser.Vec2[]): Phaser.Vec2 { - - var area = 0; - var vsum = new Phaser.Vec2; - - for (var i = 0; i < verts.length; i++) - { - var v1 = verts[i]; - var v2 = verts[(i + 1) % verts.length]; - var cross = Phaser.Vec2Utils.cross(v1, v2); - - area += cross; - - // SO many vecs created here - unroll these bad boys - vsum.add(Phaser.Vec2Utils.scale(Phaser.Vec2Utils.add(v1, v2), cross)); - } - - return Phaser.Vec2Utils.scale(vsum, 1 / (3 * area)); - - } - - public static inertiaForPoly(mass: number, verts: Phaser.Vec2[], offset: Phaser.Vec2): number { - - var sum1 = 0; - var sum2 = 0; - - for (var i = 0; i < verts.length; i++) - { - var v1 = Phaser.Vec2Utils.add(verts[i], offset); - var v2 = Phaser.Vec2Utils.add(verts[(i + 1) % verts.length], offset); - - var a = Phaser.Vec2Utils.cross(v2, v1); - var b = Phaser.Vec2Utils.dot(v1, v1) + Phaser.Vec2Utils.dot(v1, v2) + Phaser.Vec2Utils.dot(v2, v2); - - sum1 += a * b; - sum2 += a; - } - - return (mass * sum1) / (6 * sum2); - - } - - public static inertiaForBox(mass: number, w: number, h: number) { - return mass * (w * w + h * h) / 12; - } - - // Create the convex hull using the Gift wrapping algorithm (http://en.wikipedia.org/wiki/Gift_wrapping_algorithm) - public static createConvexHull(points) { - - // Find the right most point on the hull - var i0 = 0; - var x0 = points[0].x; - - for (var i = 1; i < points.length; i++) - { - var x = points[i].x; - - if (x > x0 || (x == x0 && points[i].y < points[i0].y)) - { - i0 = i; - x0 = x; - } - } - - var n = points.length; - var hull = []; - var m = 0; - var ih = i0; - - while (1) - { - hull[m] = ih; - - var ie = 0; - - for (var j = 1; j < n; j++) - { - if (ie == ih) - { - ie = j; - continue; - } - - var r = Phaser.Vec2Utils.subtract(points[ie], points[hull[m]]); - var v = Phaser.Vec2Utils.subtract(points[j], points[hull[m]]); - var c = Phaser.Vec2Utils.cross(r, v); - - if (c < 0) - { - ie = j; - } - - // Collinearity check - if (c == 0 && v.lengthSq() > r.lengthSq()) - { - ie = j; - } - } - - m++; - ih = ie; - - if (ie == i0) - { - break; - } - } - - // Copy vertices - var newPoints = []; - - for (var i = 0; i < m; ++i) - { - newPoints.push(points[hull[i]]); - } - - return newPoints; - } - - } - -} \ No newline at end of file diff --git a/wip/physics/ArcadePhysics.js b/wip/physics/ArcadePhysics.js deleted file mode 100644 index 2f9b5688..00000000 --- a/wip/physics/ArcadePhysics.js +++ /dev/null @@ -1,19 +0,0 @@ -var Shapes; -(function (Shapes) { - - var Point = Shapes.Point = (function () { - function Point(x, y) { - this.x = x; - this.y = y; - } - Point.prototype.getDist = function () { - return Math.sqrt((this.x * this.x) + (this.y * this.y)); - }; - Point.origin = new Point(0, 0); - return Point; - })(); - -})(Shapes || (Shapes = {})); - -var p = new Shapes.Point(3, 4); -var dist = p.getDist(); diff --git a/wip/physics/ArcadePhysics.ts b/wip/physics/ArcadePhysics.ts deleted file mode 100644 index 00ae9b18..00000000 --- a/wip/physics/ArcadePhysics.ts +++ /dev/null @@ -1,1121 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - PhysicsManager -* -* Your game only has one PhysicsManager instance and it's responsible for looking after, creating and colliding -* all of the physics objects in the world. -*/ - - -module Phaser.Physics { - - export class ArcadePhysics { - - constructor(game: Game, width: number, height: number) { - - this.game = game; - - this.gravity = new Vec2; - this.drag = new Vec2; - this.bounce = new Vec2; - this.angularDrag = 0; - - this.bounds = new Rectangle(0, 0, width, height); - - this._distance = new Vec2; - this._tangent = new Vec2; - - this.members = new Group(game); - - } - - /** - * Local private reference to Game. - */ - public game: Game; - - /** - * Physics object pool - */ - public members: Group; - - // Temp calculation vars - private _drag: number; - private _delta: number; - private _velocityDelta: number; - private _length: number = 0; - private _distance: Vec2; - private _tangent: Vec2; - private _separatedX: bool; - private _separatedY: bool; - private _overlap: number; - private _maxOverlap: number; - private _obj1Velocity: number; - private _obj2Velocity: number; - private _obj1NewVelocity: number; - private _obj2NewVelocity: number; - private _average: number; - private _quadTree: QuadTree; - private _quadTreeResult: bool; - - public bounds: Rectangle; - - public gravity: Vec2; - public drag: Vec2; - public bounce: Vec2; - public angularDrag: number; - - /** - * The overlap bias is used when calculating hull overlap before separation - change it if you have especially small or large GameObjects - * @type {number} - */ - static OVERLAP_BIAS: number = 4; - - /** - * The overlap bias is used when calculating hull overlap before separation - change it if you have especially small or large GameObjects - * @type {number} - */ - static TILE_OVERLAP: bool = false; - - /** - * @type {number} - */ - public worldDivisions: number = 6; - - - /* - public update() { - - this._length = this._objects.length; - - for (var i = 0; i < this._length; i++) - { - if (this._objects[i]) - { - this._objects[i].preUpdate(); - this.updateMotion(this._objects[i]); - this.collideWorld(this._objects[i]); - - for (var x = 0; x < this._length; x++) - { - if (this._objects[x] && this._objects[x] !== this._objects[i]) - { - //this.collideShapes(this._objects[i], this._objects[x]); - var r = this.NEWseparate(this._objects[i], this._objects[x]); - //console.log('sep', r); - } - } - - } - } - - } - - public render() { - - // iterate through the objects here, updating and colliding - for (var i = 0; i < this._length; i++) - { - if (this._objects[i]) - { - this._objects[i].render(this.game.stage.context); - } - } - - } -*/ - - public updateMotion(body: Phaser.Physics.Body) { - - if (body.type == Types.BODY_DISABLED) - { - return; - } - - this._velocityDelta = (this.computeVelocity(body.angularVelocity, body.gravity.x, body.angularAcceleration, body.angularDrag, body.maxAngular) - body.angularVelocity) / 2; - body.angularVelocity += this._velocityDelta; - body.sprite.transform.rotation += body.angularVelocity * this.game.time.elapsed; - body.angularVelocity += this._velocityDelta; - - this._velocityDelta = (this.computeVelocity(body.velocity.x, body.gravity.x, body.acceleration.x, body.drag.x) - body.velocity.x) / 2; - body.velocity.x += this._velocityDelta; - this._delta = body.velocity.x * this.game.time.elapsed; - body.velocity.x += this._velocityDelta; - //body.position.x += this._delta; - body.sprite.x += this._delta; - - this._velocityDelta = (this.computeVelocity(body.velocity.y, body.gravity.y, body.acceleration.y, body.drag.y) - body.velocity.y) / 2; - body.velocity.y += this._velocityDelta; - this._delta = body.velocity.y * this.game.time.elapsed; - body.velocity.y += this._velocityDelta; - //body.position.y += this._delta; - body.sprite.y += this._delta; - - } - - /** - * A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. - * - * @param {number} Velocity Any component of velocity (e.g. 20). - * @param {number} Acceleration Rate at which the velocity is changing. - * @param {number} Drag Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. - * @param {number} Max An absolute value cap for the velocity. - * - * @return {number} The altered Velocity value. - */ - public computeVelocity(velocity: number, gravity: number = 0, acceleration: number = 0, drag: number = 0, max: number = 10000): number { - - if (acceleration !== 0) - { - velocity += (acceleration + gravity) * this.game.time.elapsed; - } - else if (drag !== 0) - { - this._drag = drag * this.game.time.elapsed; - - if (velocity - this._drag > 0) - { - velocity = velocity - this._drag; - } - else if (velocity + this._drag < 0) - { - velocity += this._drag; - } - else - { - velocity = 0; - } - - velocity += gravity; - } - - if ((velocity != 0) && (max != 10000)) - { - if (velocity > max) - { - velocity = max; - } - else if (velocity < -max) - { - velocity = -max; - } - } - - return velocity; - - } - - /** - * The core Collision separation method. - * @param body1 The first Physics.Body to separate - * @param body2 The second Physics.Body to separate - * @returns {boolean} Returns true if the bodies were separated, otherwise false. - */ - public separate(body1: Body, body2: Body): bool { - - this._separatedX = this.separateBodyX(body1, body2); - this._separatedY = this.separateBodyY(body1, body2); - - return this._separatedX || this._separatedY; - - } - - public checkHullIntersection(body1: Body, body2:Body): bool { - return ((body1.hullX + body1.hullWidth > body2.hullX) && (body1.hullX < body2.hullX + body2.hullWidth) && (body1.hullY + body1.hullHeight > body2.hullY) && (body1.hullY < body2.hullY + body2.hullHeight)); - } - - /** - * Separates the two objects on their x axis - * @param object1 The first GameObject to separate - * @param object2 The second GameObject to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ - public separateBodyX(body1: Body, body2: Body): bool { - - // Can't separate two disabled or static objects - if ((body1.type == Types.BODY_DISABLED || body1.type == Types.BODY_STATIC) && (body2.type == Types.BODY_DISABLED || body2.type == Types.BODY_STATIC)) - { - return false; - } - - // First, get the two object deltas - this._overlap = 0; - - if (body1.deltaX != body2.deltaX) - { - if (RectangleUtils.intersects(body1.bounds, body2.bounds)) - { - this._maxOverlap = body1.deltaXAbs + body2.deltaXAbs + PhysicsManager.OVERLAP_BIAS; - - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (body1.deltaX > body2.deltaX) - { - this._overlap = body1.bounds.right - body2.bounds.x; - - if ((this._overlap > this._maxOverlap) || !(body1.allowCollisions & Types.RIGHT) || !(body2.allowCollisions & Types.LEFT)) - { - this._overlap = 0; - } - else - { - body1.touching |= Types.RIGHT; - body2.touching |= Types.LEFT; - } - } - else if (body1.deltaX < body2.deltaX) - { - this._overlap = body1.bounds.x - body2.bounds.width - body2.bounds.x; - - if ((-this._overlap > this._maxOverlap) || !(body1.allowCollisions & Types.LEFT) || !(body2.allowCollisions & Types.RIGHT)) - { - this._overlap = 0; - } - else - { - body1.touching |= Types.LEFT; - body2.touching |= Types.RIGHT; - } - } - } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - this._obj1Velocity = body1.velocity.x; - this._obj2Velocity = body2.velocity.x; - - /** - * Dynamic = gives and receives impacts - * Static = gives but doesn't receive impacts, cannot be moved by physics - * Kinematic = gives impacts, but never receives, can be moved by physics - */ - - // 2 dynamic bodies will exchange velocities - if (body1.type == Types.BODY_DYNAMIC && body2.type == Types.BODY_DYNAMIC) - { - this._overlap *= 0.5; - body1.position.x = body1.position.x - this._overlap; - body2.position.x += this._overlap; - - this._obj1NewVelocity = Math.sqrt((this._obj2Velocity * this._obj2Velocity * body2.mass) / body1.mass) * ((this._obj2Velocity > 0) ? 1 : -1); - this._obj2NewVelocity = Math.sqrt((this._obj1Velocity * this._obj1Velocity * body1.mass) / body2.mass) * ((this._obj1Velocity > 0) ? 1 : -1); - this._average = (this._obj1NewVelocity + this._obj2NewVelocity) * 0.5; - this._obj1NewVelocity -= this._average; - this._obj2NewVelocity -= this._average; - body1.velocity.x = this._average + this._obj1NewVelocity * body1.bounce.x; - body2.velocity.x = this._average + this._obj2NewVelocity * body2.bounce.x; - } - else if (body2.type != Types.BODY_DYNAMIC) - { - // Body 2 is Static or Kinematic - this._overlap *= 2; - body1.position.x -= this._overlap; - body1.velocity.x = this._obj2Velocity - this._obj1Velocity * body1.bounce.x; - } - else if (body1.type != Types.BODY_DYNAMIC) - { - // Body 1 is Static or Kinematic - this._overlap *= 2; - body2.position.x += this._overlap; - body2.velocity.x = this._obj1Velocity - this._obj2Velocity * body2.bounce.x; - } - - return true; - } - else - { - return false; - } - - } - - /** - * Separates the two objects on their y axis - * @param object1 The first GameObject to separate - * @param object2 The second GameObject to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the Y axis. - */ - public separateBodyY(body1: Body, body2: Body): bool { - - // Can't separate two immovable objects - if ((body1.type == Types.BODY_DISABLED || body1.type == Types.BODY_STATIC) && (body2.type == Types.BODY_DISABLED || body2.type == Types.BODY_STATIC)) - { - return false; - } - - // First, get the two object deltas - this._overlap = 0; - - if (body1.deltaY != body2.deltaY) - { - if (RectangleUtils.intersects(body1.bounds, body2.bounds)) - { - // This is the only place to use the DeltaAbs values - this._maxOverlap = body1.deltaYAbs + body2.deltaYAbs + PhysicsManager.OVERLAP_BIAS; - - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (body1.deltaY > body2.deltaY) - { - this._overlap = body1.bounds.bottom - body2.bounds.y; - - if ((this._overlap > this._maxOverlap) || !(body1.allowCollisions & Types.DOWN) || !(body2.allowCollisions & Types.UP)) - { - this._overlap = 0; - } - else - { - body1.touching |= Types.DOWN; - body2.touching |= Types.UP; - } - } - else if (body1.deltaY < body2.deltaY) - { - this._overlap = body1.bounds.y - body2.bounds.height - body2.bounds.y; - - if ((-this._overlap > this._maxOverlap) || !(body1.allowCollisions & Types.UP) || !(body2.allowCollisions & Types.DOWN)) - { - this._overlap = 0; - } - else - { - body1.touching |= Types.UP; - body2.touching |= Types.DOWN; - } - } - } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (this._overlap != 0) - { - this._obj1Velocity = body1.velocity.y; - this._obj2Velocity = body2.velocity.y; - - /** - * Dynamic = gives and receives impacts - * Static = gives but doesn't receive impacts, cannot be moved by physics - * Kinematic = gives impacts, but never receives, can be moved by physics - */ - - if (body1.type == Types.BODY_DYNAMIC && body2.type == Types.BODY_DYNAMIC) - { - this._overlap *= 0.5; - body1.position.y = body1.position.y - this._overlap; - body2.position.y += this._overlap; - - this._obj1NewVelocity = Math.sqrt((this._obj2Velocity * this._obj2Velocity * body2.mass) / body1.mass) * ((this._obj2Velocity > 0) ? 1 : -1); - this._obj2NewVelocity = Math.sqrt((this._obj1Velocity * this._obj1Velocity * body1.mass) / body2.mass) * ((this._obj1Velocity > 0) ? 1 : -1); - var average: number = (this._obj1NewVelocity + this._obj2NewVelocity) * 0.5; - this._obj1NewVelocity -= average; - this._obj2NewVelocity -= average; - body1.velocity.y = average + this._obj1NewVelocity * body1.bounce.y; - body2.velocity.y = average + this._obj2NewVelocity * body2.bounce.y; - } - else if (body2.type != Types.BODY_DYNAMIC) - { - this._overlap *= 2; - body1.position.y -= this._overlap; - body1.velocity.y = this._obj2Velocity - this._obj1Velocity * body1.bounce.y; - // This is special case code that handles things like horizontal moving platforms you can ride - //if (body2.parent.active && body2.moves && (body1.deltaY > body2.deltaY)) - if (body2.sprite.active && (body1.deltaY > body2.deltaY)) - { - body1.position.x += body2.position.x - body2.oldPosition.x; - } - } - else if (body1.type != Types.BODY_DYNAMIC) - { - this._overlap *= 2; - body2.position.y += this._overlap; - body2.velocity.y = this._obj1Velocity - this._obj2Velocity * body2.bounce.y; - // This is special case code that handles things like horizontal moving platforms you can ride - //if (object1.active && body1.moves && (body1.deltaY < body2.deltaY)) - if (body1.sprite.active && (body1.deltaY < body2.deltaY)) - { - body2.position.x += body1.position.x - body1.oldPosition.x; - } - } - - return true; - } - else - { - return false; - } - } - - - - - - - - /* - private TILEseparate(shapeA: IPhysicsShape, shapeB: IPhysicsShape, distance: Vec2, tangent: Vec2) { - - if (tangent.x == 1) - { - console.log('1 The left side of ShapeA hit the right side of ShapeB', Math.floor(distance.x)); - shapeA.physics.touching |= Phaser.Types.LEFT; - shapeB.physics.touching |= Phaser.Types.RIGHT; - } - else if (tangent.x == -1) - { - console.log('2 The right side of ShapeA hit the left side of ShapeB', Math.floor(distance.x)); - shapeA.physics.touching |= Phaser.Types.RIGHT; - shapeB.physics.touching |= Phaser.Types.LEFT; - } - - if (tangent.y == 1) - { - console.log('3 The top of ShapeA hit the bottom of ShapeB', Math.floor(distance.y)); - shapeA.physics.touching |= Phaser.Types.UP; - shapeB.physics.touching |= Phaser.Types.DOWN; - } - else if (tangent.y == -1) - { - console.log('4 The bottom of ShapeA hit the top of ShapeB', Math.floor(distance.y)); - shapeA.physics.touching |= Phaser.Types.DOWN; - shapeB.physics.touching |= Phaser.Types.UP; - } - - - // only apply collision response forces if the object is travelling into, and not out of, the collision - var dot = Vec2Utils.dot(shapeA.physics.velocity, tangent); - - if (dot < 0) - { - console.log('in to', dot); - - // Apply horizontal bounce - if (shapeA.physics.bounce.x > 0) - { - shapeA.physics.velocity.x *= -(shapeA.physics.bounce.x); - } - else - { - shapeA.physics.velocity.x = 0; - } - // Apply horizontal bounce - if (shapeA.physics.bounce.y > 0) - { - shapeA.physics.velocity.y *= -(shapeA.physics.bounce.y); - } - else - { - shapeA.physics.velocity.y = 0; - } - } - else - { - console.log('out of', dot); - } - - shapeA.position.x += Math.floor(distance.x); - //shapeA.bounds.x += Math.floor(distance.x); - - shapeA.position.y += Math.floor(distance.y); - //shapeA.bounds.y += distance.y; - - console.log('------------------------------------------------'); - - } - - private collideWorld(shape:IPhysicsShape) { - - // Collide on the x-axis - this._distance.x = shape.world.bounds.x - (shape.position.x - shape.bounds.halfWidth); - - if (0 < this._distance.x) - { - // Hit Left - this._tangent.setTo(1, 0); - this.separateXWall(shape, this._distance, this._tangent); - } - else - { - this._distance.x = (shape.position.x + shape.bounds.halfWidth) - shape.world.bounds.right; - - if (0 < this._distance.x) - { - // Hit Right - this._tangent.setTo(-1, 0); - this._distance.reverse(); - this.separateXWall(shape, this._distance, this._tangent); - } - } - - // Collide on the y-axis - this._distance.y = shape.world.bounds.y - (shape.position.y - shape.bounds.halfHeight); - - if (0 < this._distance.y) - { - // Hit Top - this._tangent.setTo(0, 1); - this.separateYWall(shape, this._distance, this._tangent); - } - else - { - this._distance.y = (shape.position.y + shape.bounds.halfHeight) - shape.world.bounds.bottom; - - if (0 < this._distance.y) - { - // Hit Bottom - this._tangent.setTo(0, -1); - this._distance.reverse(); - this.separateYWall(shape, this._distance, this._tangent); - } - } - - } - - private separateX(shapeA: IPhysicsShape, shapeB: IPhysicsShape, distance: Vec2, tangent: Vec2) { - - if (tangent.x == 1) - { - console.log('The left side of ShapeA hit the right side of ShapeB', distance.x); - shapeA.physics.touching |= Phaser.Types.LEFT; - shapeB.physics.touching |= Phaser.Types.RIGHT; - } - else - { - console.log('The right side of ShapeA hit the left side of ShapeB', distance.x); - shapeA.physics.touching |= Phaser.Types.RIGHT; - shapeB.physics.touching |= Phaser.Types.LEFT; - } - - // collision edges - //shapeA.oH = tangent.x; - - // only apply collision response forces if the object is travelling into, and not out of, the collision - if (Vec2Utils.dot(shapeA.physics.velocity, tangent) < 0) - { - // Apply horizontal bounce - if (shapeA.physics.bounce.x > 0) - { - shapeA.physics.velocity.x *= -(shapeA.physics.bounce.x); - } - else - { - shapeA.physics.velocity.x = 0; - } - } - - shapeA.position.x += distance.x; - shapeA.bounds.x += distance.x; - - } - - private separateY(shapeA: IPhysicsShape, shapeB: IPhysicsShape, distance: Vec2, tangent: Vec2) { - - if (tangent.y == 1) - { - console.log('The top of ShapeA hit the bottom of ShapeB', distance.y); - shapeA.physics.touching |= Phaser.Types.UP; - shapeB.physics.touching |= Phaser.Types.DOWN; - } - else - { - console.log('The bottom of ShapeA hit the top of ShapeB', distance.y); - shapeA.physics.touching |= Phaser.Types.DOWN; - shapeB.physics.touching |= Phaser.Types.UP; - } - - // collision edges - //shapeA.oV = tangent.y; - - // only apply collision response forces if the object is travelling into, and not out of, the collision - if (Vec2Utils.dot(shapeA.physics.velocity, tangent) < 0) - { - // Apply horizontal bounce - if (shapeA.physics.bounce.y > 0) - { - shapeA.physics.velocity.y *= -(shapeA.physics.bounce.y); - } - else - { - shapeA.physics.velocity.y = 0; - } - } - - shapeA.position.y += distance.y; - shapeA.bounds.y += distance.y; - - } - - private separateXWall(shapeA: IPhysicsShape, distance: Vec2, tangent: Vec2) { - - if (tangent.x == 1) - { - console.log('The left side of ShapeA hit the right side of ShapeB', distance.x); - shapeA.physics.touching |= Phaser.Types.LEFT; - } - else - { - console.log('The right side of ShapeA hit the left side of ShapeB', distance.x); - shapeA.physics.touching |= Phaser.Types.RIGHT; - } - - // collision edges - //shapeA.oH = tangent.x; - - // only apply collision response forces if the object is travelling into, and not out of, the collision - if (Vec2Utils.dot(shapeA.physics.velocity, tangent) < 0) - { - // Apply horizontal bounce - if (shapeA.physics.bounce.x > 0) - { - shapeA.physics.velocity.x *= -(shapeA.physics.bounce.x); - } - else - { - shapeA.physics.velocity.x = 0; - } - } - - shapeA.position.x += distance.x; - - } - - private separateYWall(shapeA: IPhysicsShape, distance: Vec2, tangent: Vec2) { - - if (tangent.y == 1) - { - console.log('The top of ShapeA hit the bottom of ShapeB', distance.y); - shapeA.physics.touching |= Phaser.Types.UP; - } - else - { - console.log('The bottom of ShapeA hit the top of ShapeB', distance.y); - shapeA.physics.touching |= Phaser.Types.DOWN; - } - - // collision edges - //shapeA.oV = tangent.y; - - // only apply collision response forces if the object is travelling into, and not out of, the collision - if (Vec2Utils.dot(shapeA.physics.velocity, tangent) < 0) - { - // Apply horizontal bounce - if (shapeA.physics.bounce.y > 0) - { - shapeA.physics.velocity.y *= -(shapeA.physics.bounce.y); - } - else - { - shapeA.physics.velocity.y = 0; - } - } - - shapeA.position.y += distance.y; - - } - */ - - /** - * Checks for overlaps between two objects using the world QuadTree. Can be Sprite vs. Sprite, Sprite vs. Group or Group vs. Group. - * Note: Does not take the objects scrollFactor into account. All overlaps are check in world space. - * @param object1 The first Sprite or Group to check. If null the world.group is used. - * @param object2 The second Sprite or Group to check. - * @param notifyCallback A callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap. - * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then notifyCallback will only be called if processCallback returns true. - * @param context The context in which the callbacks will be called - * @returns {boolean} true if the objects overlap, otherwise false. - */ - public overlap(object1 = null, object2 = null, notifyCallback = null, processCallback = null, context = null): bool { - - /* - if (object1 == null) - { - object1 = this.game.world.group; - } - - if (object2 == object1) - { - object2 = null; - } - - QuadTree.divisions = this.worldDivisions; - - this._quadTree = new Phaser.QuadTree(this, this.bounds.x, this.bounds.y, this.bounds.width, this.bounds.height); - - this._quadTree.load(object1, object2, notifyCallback, processCallback, context); - - this._quadTreeResult = this._quadTree.execute(); - - console.log('over', this._quadTreeResult); - - this._quadTree.destroy(); - - this._quadTree = null; - - return this._quadTreeResult; - */ - - return false; - - } - - - - - - - /** - * Collision resolution specifically for GameObjects vs. Tiles. - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated - */ - public separateTile(object:Sprite, x: number, y: number, width: number, height: number, mass: number, collideLeft: bool, collideRight: bool, collideUp: bool, collideDown: bool, separateX: bool, separateY: bool): bool { - - //var separatedX: bool = this.separateTileX(object, x, y, width, height, mass, collideLeft, collideRight, separateX); - //var separatedY: bool = this.separateTileY(object, x, y, width, height, mass, collideUp, collideDown, separateY); - - //return separatedX || separatedY; - - return false; - - } - - /** - * Separates the two objects on their x axis - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ - /* - public separateTileX(object:Sprite, x: number, y: number, width: number, height: number, mass: number, collideLeft: bool, collideRight: bool, separate: bool): bool { - - // Can't separate two immovable objects (tiles are always immovable) - if (object.immovable) - { - return false; - } - - // First, get the object delta - var overlap: number = 0; - var objDelta: number = object.x - object.last.x; - //var objDelta: number = object.collisionMask.deltaX; - - if (objDelta != 0) - { - // Check if the X hulls actually overlap - var objDeltaAbs: number = (objDelta > 0) ? objDelta : -objDelta; - //var objDeltaAbs: number = object.collisionMask.deltaXAbs; - var objBounds: Rectangle = new Rectangle(object.x - ((objDelta > 0) ? objDelta : 0), object.last.y, object.width + ((objDelta > 0) ? objDelta : -objDelta), object.height); - - if ((objBounds.x + objBounds.width > x) && (objBounds.x < x + width) && (objBounds.y + objBounds.height > y) && (objBounds.y < y + height)) - { - var maxOverlap: number = objDeltaAbs + Collision.OVERLAP_BIAS; - - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (objDelta > 0) - { - overlap = object.x + object.width - x; - - if ((overlap > maxOverlap) || !(object.allowCollisions & Collision.RIGHT) || collideLeft == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.RIGHT; - } - } - else if (objDelta < 0) - { - overlap = object.x - width - x; - - if ((-overlap > maxOverlap) || !(object.allowCollisions & Collision.LEFT) || collideRight == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.LEFT; - } - - } - - } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (overlap != 0) - { - if (separate == true) - { - //console.log(' - object.x = object.x - overlap; - object.velocity.x = -(object.velocity.x * object.elasticity); - } - - Collision.TILE_OVERLAP = true; - return true; - } - else - { - return false; - } - - } - */ - - /** - * Separates the two objects on their y axis - * @param object The first GameObject to separate - * @param tile The second GameObject to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the Y axis. - */ - /* - public separateTileY(object: Sprite, x: number, y: number, width: number, height: number, mass: number, collideUp: bool, collideDown: bool, separate: bool): bool { - - // Can't separate two immovable objects (tiles are always immovable) - if (object.immovable) - { - return false; - } - - // First, get the two object deltas - var overlap: number = 0; - var objDelta: number = object.y - object.last.y; - - if (objDelta != 0) - { - // Check if the Y hulls actually overlap - var objDeltaAbs: number = (objDelta > 0) ? objDelta : -objDelta; - var objBounds: Rectangle = new Rectangle(object.x, object.y - ((objDelta > 0) ? objDelta : 0), object.width, object.height + objDeltaAbs); - - if ((objBounds.x + objBounds.width > x) && (objBounds.x < x + width) && (objBounds.y + objBounds.height > y) && (objBounds.y < y + height)) - { - var maxOverlap: number = objDeltaAbs + Collision.OVERLAP_BIAS; - - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (objDelta > 0) - { - overlap = object.y + object.height - y; - - if ((overlap > maxOverlap) || !(object.allowCollisions & Collision.DOWN) || collideUp == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.DOWN; - } - } - else if (objDelta < 0) - { - overlap = object.y - height - y; - - if ((-overlap > maxOverlap) || !(object.allowCollisions & Collision.UP) || collideDown == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.UP; - } - } - } - } - - // TODO - with super low velocities you get lots of stuttering, set some kind of base minimum here - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (overlap != 0) - { - if (separate == true) - { - object.y = object.y - overlap; - object.velocity.y = -(object.velocity.y * object.elasticity); - } - - Collision.TILE_OVERLAP = true; - return true; - } - else - { - return false; - } - } - */ - - - /** - * Separates the two objects on their x axis - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ - /* - public static NEWseparateTileX(object:Sprite, x: number, y: number, width: number, height: number, mass: number, collideLeft: bool, collideRight: bool, separate: bool): bool { - - // Can't separate two immovable objects (tiles are always immovable) - if (object.immovable) - { - return false; - } - - // First, get the object delta - var overlap: number = 0; - - if (object.collisionMask.deltaX != 0) - { - // Check if the X hulls actually overlap - //var objDeltaAbs: number = (objDelta > 0) ? objDelta : -objDelta; - //var objBounds: Rectangle = new Rectangle(object.x - ((objDelta > 0) ? objDelta : 0), object.last.y, object.width + ((objDelta > 0) ? objDelta : -objDelta), object.height); - - //if ((objBounds.x + objBounds.width > x) && (objBounds.x < x + width) && (objBounds.y + objBounds.height > y) && (objBounds.y < y + height)) - if (object.collisionMask.intersectsRaw(x, x + width, y, y + height)) - { - var maxOverlap: number = object.collisionMask.deltaXAbs + Collision.OVERLAP_BIAS; - - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (object.collisionMask.deltaX > 0) - { - //overlap = object.x + object.width - x; - overlap = object.collisionMask.right - x; - - if ((overlap > maxOverlap) || !(object.allowCollisions & Collision.RIGHT) || collideLeft == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.RIGHT; - } - } - else if (object.collisionMask.deltaX < 0) - { - //overlap = object.x - width - x; - overlap = object.collisionMask.x - width - x; - - if ((-overlap > maxOverlap) || !(object.allowCollisions & Collision.LEFT) || collideRight == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.LEFT; - } - - } - - } - } - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (overlap != 0) - { - if (separate == true) - { - object.x = object.x - overlap; - object.velocity.x = -(object.velocity.x * object.elasticity); - } - - Collision.TILE_OVERLAP = true; - return true; - } - else - { - return false; - } - - } - */ - - /** - * Separates the two objects on their y axis - * @param object The first GameObject to separate - * @param tile The second GameObject to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the Y axis. - */ - /* - public NEWseparateTileY(object: Sprite, x: number, y: number, width: number, height: number, mass: number, collideUp: bool, collideDown: bool, separate: bool): bool { - - // Can't separate two immovable objects (tiles are always immovable) - if (object.immovable) - { - return false; - } - - // First, get the two object deltas - var overlap: number = 0; - //var objDelta: number = object.y - object.last.y; - - if (object.collisionMask.deltaY != 0) - { - // Check if the Y hulls actually overlap - //var objDeltaAbs: number = (objDelta > 0) ? objDelta : -objDelta; - //var objBounds: Rectangle = new Rectangle(object.x, object.y - ((objDelta > 0) ? objDelta : 0), object.width, object.height + objDeltaAbs); - - //if ((objBounds.x + objBounds.width > x) && (objBounds.x < x + width) && (objBounds.y + objBounds.height > y) && (objBounds.y < y + height)) - if (object.collisionMask.intersectsRaw(x, x + width, y, y + height)) - { - //var maxOverlap: number = objDeltaAbs + Collision.OVERLAP_BIAS; - var maxOverlap: number = object.collisionMask.deltaYAbs + Collision.OVERLAP_BIAS; - - // If they did overlap (and can), figure out by how much and flip the corresponding flags - if (object.collisionMask.deltaY > 0) - { - //overlap = object.y + object.height - y; - overlap = object.collisionMask.bottom - y; - - if ((overlap > maxOverlap) || !(object.allowCollisions & Collision.DOWN) || collideUp == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.DOWN; - } - } - else if (object.collisionMask.deltaY < 0) - { - //overlap = object.y - height - y; - overlap = object.collisionMask.y - height - y; - - if ((-overlap > maxOverlap) || !(object.allowCollisions & Collision.UP) || collideDown == false) - { - overlap = 0; - } - else - { - object.touching |= Collision.UP; - } - } - } - } - - // TODO - with super low velocities you get lots of stuttering, set some kind of base minimum here - - // Then adjust their positions and velocities accordingly (if there was any overlap) - if (overlap != 0) - { - if (separate == true) - { - object.y = object.y - overlap; - object.velocity.y = -(object.velocity.y * object.elasticity); - } - - Collision.TILE_OVERLAP = true; - return true; - } - else - { - return false; - } - } - */ - - } - -} \ No newline at end of file diff --git a/wip/physics/Body.js b/wip/physics/Body.js deleted file mode 100644 index 6f12a4b8..00000000 --- a/wip/physics/Body.js +++ /dev/null @@ -1,416 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Body - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Body = (function () { - function Body(sprite, type, x, y, shapeType) { - if (typeof x === "undefined") { x = 0; } - if (typeof y === "undefined") { y = 0; } - if (typeof shapeType === "undefined") { shapeType = 0; } - this._tempVec2 = new Phaser.Vec2(); - this._fixedRotation = false; - // Shapes - this.shapes = []; - // Joints - this.joints = []; - this.jointHash = { - }; - this.categoryBits = 0x0001; - this.maskBits = 0xFFFF; - this.stepCount = 0; - this._newPosition = new Phaser.Vec2(); - this.id = Phaser.Physics.AdvancedPhysics.bodyCounter++; - this.name = 'body' + this.id; - this.type = type; - if(sprite) { - this.sprite = sprite; - this.game = sprite.game; - this.position = new Phaser.Vec2(Phaser.Physics.AdvancedPhysics.pixelsToMeters(sprite.x), Phaser.Physics.AdvancedPhysics.pixelsToMeters(sprite.y)); - this.angle = this.game.math.degreesToRadians(sprite.rotation); - } else { - this.position = new Phaser.Vec2(Phaser.Physics.AdvancedPhysics.pixelsToMeters(x), Phaser.Physics.AdvancedPhysics.pixelsToMeters(y)); - this.angle = 0; - } - this.transform = new Phaser.Transform(this.position, this.angle); - this.centroid = new Phaser.Vec2(); - this.velocity = new Phaser.Vec2(); - this.force = new Phaser.Vec2(); - this.angularVelocity = 0; - this.torque = 0; - this.linearDamping = 0; - this.angularDamping = 0; - this.sleepTime = 0; - this.awaked = false; - this.shapes = []; - this.joints = []; - this.jointHash = { - }; - this.bounds = new Physics.Bounds(); - this.allowCollisions = Phaser.Types.ANY; - this.categoryBits = 0x0001; - this.maskBits = 0xFFFF; - this.stepCount = 0; - if(sprite) { - if(shapeType == 0) { - Phaser.BodyUtils.addBox(this, 0, 0, this.sprite.width, this.sprite.height, 1, 1, 1); - } else { - Phaser.BodyUtils.addCircle(this, Math.max(this.sprite.width, this.sprite.height) / 2, 0, 0, 1, 1, 1); - } - } - } - Object.defineProperty(Body.prototype, "rotation", { - get: /** - * The rotation of the body in degrees. Phaser uses a right-handed coordinate system, where 0 points to the right. - */ - function () { - return this.game.math.radiansToDegrees(this.angle); - }, - set: /** - * Set the rotation of the body in degrees. Phaser uses a right-handed coordinate system, where 0 points to the right. - * The value is automatically wrapped to be between 0 and 360. - */ - function (value) { - this.angle = this.game.math.degreesToRadians(this.game.math.wrap(value, 360, 0)); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Body.prototype, "isDisabled", { - get: function () { - return this.type == Phaser.Types.BODY_DISABLED ? true : false; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Body.prototype, "isStatic", { - get: function () { - return this.type == Phaser.Types.BODY_STATIC ? true : false; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Body.prototype, "isKinetic", { - get: function () { - return this.type == Phaser.Types.BODY_KINETIC ? true : false; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Body.prototype, "isDynamic", { - get: function () { - return this.type == Phaser.Types.BODY_DYNAMIC ? true : false; - }, - enumerable: true, - configurable: true - }); - Body.prototype.setType = function (type) { - if(type == this.type) { - return; - } - this.force.setTo(0, 0); - this.velocity.setTo(0, 0); - this.torque = 0; - this.angularVelocity = 0; - this.type = type; - this.awake(true); - }; - Body.prototype.addShape = function (shape) { - // Check not already part of this body - shape.body = this; - this.shapes.push(shape); - this.shapesLength = this.shapes.length; - return shape; - }; - Body.prototype.removeShape = function (shape) { - var index = this.shapes.indexOf(shape); - if(index != -1) { - this.shapes.splice(index, 1); - shape.body = undefined; - } - this.shapesLength = this.shapes.length; - }; - Body.prototype.setMass = function (mass) { - this.mass = mass; - this.massInverted = mass > 0 ? 1 / mass : 0; - }; - Body.prototype.setInertia = function (inertia) { - this.inertia = inertia; - this.inertiaInverted = inertia > 0 ? 1 / inertia : 0; - }; - Body.prototype.setPosition = function (x, y) { - this._newPosition.setTo(Phaser.Physics.AdvancedPhysics.pixelsToMeters(x), Phaser.Physics.AdvancedPhysics.pixelsToMeters(y)); - this.setTransform(this._newPosition, this.angle); - }; - Body.prototype.setTransform = function (pos, angle) { - // inject the transform into this.position - this.transform.setTo(pos, angle); - //Manager.write('setTransform: ' + this.position.toString()); - //Manager.write('centroid: ' + this.centroid.toString()); - Phaser.TransformUtils.transform(this.transform, this.centroid, this.position); - //Manager.write('post setTransform: ' + this.position.toString()); - //this.position.copyFrom(this.transform.transform(this.centroid)); - this.angle = angle; - }; - Body.prototype.syncTransform = function () { - //Manager.write('syncTransform:'); - //Manager.write('p: ' + this.position.toString()); - //Manager.write('centroid: ' + this.centroid.toString()); - //Manager.write('xf: ' + this.transform.toString()); - //Manager.write('a: ' + this.angle); - this.transform.setRotation(this.angle); - // OPTIMISE: Creating new vector - Phaser.Vec2Utils.subtract(this.position, Phaser.TransformUtils.rotate(this.transform, this.centroid), this.transform.t); - //Manager.write('--------------------'); - //Manager.write('xf: ' + this.transform.toString()); - //Manager.write('--------------------'); - }; - Body.prototype.getWorldPoint = function (p) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.transform(this.transform, p); - }; - Body.prototype.getWorldVector = function (v) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.rotate(this.transform, v); - }; - Body.prototype.getLocalPoint = function (p) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.untransform(this.transform, p); - }; - Body.prototype.getLocalVector = function (v) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.unrotate(this.transform, v); - }; - Object.defineProperty(Body.prototype, "fixedRotation", { - get: function () { - return this._fixedRotation; - }, - set: function (value) { - this._fixedRotation = value; - this.resetMassData(); - }, - enumerable: true, - configurable: true - }); - Body.prototype.resetMassData = function () { - this.centroid.setTo(0, 0); - this.mass = 0; - this.massInverted = 0; - this.inertia = 0; - this.inertiaInverted = 0; - if(this.isDynamic == false) { - Phaser.TransformUtils.transform(this.transform, this.centroid, this.position); - return; - } - var totalMassCentroid = new Phaser.Vec2(0, 0); - var totalMass = 0; - var totalInertia = 0; - for(var i = 0; i < this.shapes.length; i++) { - var shape = this.shapes[i]; - var centroid = shape.centroid(); - var mass = shape.area() * shape.density; - var inertia = shape.inertia(mass); - totalMassCentroid.multiplyAddByScalar(centroid, mass); - totalMass += mass; - totalInertia += inertia; - } - Phaser.Vec2Utils.scale(totalMassCentroid, 1 / totalMass, this.centroid); - this.setMass(totalMass); - if(!this.fixedRotation) { - this.setInertia(totalInertia - totalMass * Phaser.Vec2Utils.dot(this.centroid, this.centroid)); - } - // Move center of mass - var oldPosition = Phaser.Vec2Utils.clone(this.position); - Phaser.TransformUtils.transform(this.transform, this.centroid, this.position); - // Update center of mass velocity - oldPosition.subtract(this.position); - this.velocity.multiplyAddByScalar(Phaser.Vec2Utils.perp(oldPosition, oldPosition), this.angularVelocity); - }; - Body.prototype.resetJointAnchors = function () { - for(var i = 0; i < this.joints.length; i++) { - var joint = this.joints[i]; - if(!joint) { - continue; - } - var anchor1 = joint.getWorldAnchor1(); - var anchor2 = joint.getWorldAnchor2(); - joint.setWorldAnchor1(anchor1); - joint.setWorldAnchor2(anchor2); - } - }; - Body.prototype.cacheData = function (source) { - if (typeof source === "undefined") { source = ''; } - //Manager.write('cacheData -- start'); - //Manager.write('p: ' + this.position.toString()); - //Manager.write('xf: ' + this.transform.toString()); - this.bounds.clear(); - for(var i = 0; i < this.shapesLength; i++) { - var shape = this.shapes[i]; - shape.cacheData(this.transform); - this.bounds.addBounds(shape.bounds); - } - //Manager.write('bounds: ' + this.bounds.toString()); - //Manager.write('p: ' + this.position.toString()); - //Manager.write('xf: ' + this.transform.toString()); - //Manager.write('cacheData -- stop'); - }; - Body.prototype.updateVelocity = function (gravity, dt, damping) { - Phaser.Vec2Utils.multiplyAdd(gravity, this.force, this.massInverted, this._tempVec2); - Phaser.Vec2Utils.multiplyAdd(this.velocity, this._tempVec2, dt, this.velocity); - this.angularVelocity = this.angularVelocity + this.torque * this.inertiaInverted * dt; - // Apply damping. - // ODE: dv/dt + c * v = 0 - // Solution: v(t) = v0 * exp(-c * t) - // Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v * exp(-c * dt) - // v2 = exp(-c * dt) * v1 - // Taylor expansion: - // v2 = (1.0f - c * dt) * v1 - this.velocity.scale(this.clamp(1 - dt * (damping + this.linearDamping), 0, 1)); - this.angularVelocity *= this.clamp(1 - dt * (damping + this.angularDamping), 0, 1); - this.force.setTo(0, 0); - this.torque = 0; - }; - Body.prototype.inContact = function (body2) { - if(!body2 || this.stepCount == body2.stepCount) { - return false; - } - if(!(this.isAwake && this.isStatic == false) && !(body2.isAwake && body2.isStatic == false)) { - return false; - } - if(this.isCollidable(body2) == false) { - return false; - } - if(!this.bounds.intersectsBounds(body2.bounds)) { - return false; - } - return true; - }; - Body.prototype.clamp = function (v, min, max) { - return v < min ? min : (v > max ? max : v); - }; - Body.prototype.updatePosition = function (dt) { - this.position.add(Phaser.Vec2Utils.scale(this.velocity, dt, this._tempVec2)); - this.angle += this.angularVelocity * dt; - if(this.sprite) { - this.sprite.x = this.position.x * 50; - this.sprite.y = this.position.y * 50; - this.sprite.transform.rotation = this.game.math.radiansToDegrees(this.angle); - } - }; - Body.prototype.resetForce = function () { - this.force.setTo(0, 0); - this.torque = 0; - }; - Body.prototype.applyForce = function (force, p) { - if(this.isDynamic == false) { - return; - } - if(this.isAwake == false) { - this.awake(true); - } - this.force.add(force); - Phaser.Vec2Utils.subtract(p, this.position, this._tempVec2); - this.torque += Phaser.Vec2Utils.cross(this._tempVec2, force); - }; - Body.prototype.applyForceToCenter = function (force) { - if(this.isDynamic == false) { - return; - } - if(this.isAwake == false) { - this.awake(true); - } - this.force.add(force); - }; - Body.prototype.applyTorque = function (torque) { - if(this.isDynamic == false) { - return; - } - if(this.isAwake == false) { - this.awake(true); - } - this.torque += torque; - }; - Body.prototype.applyLinearImpulse = function (impulse, p) { - if(this.isDynamic == false) { - return; - } - if(this.isAwake == false) { - this.awake(true); - } - this.velocity.multiplyAddByScalar(impulse, this.massInverted); - Phaser.Vec2Utils.subtract(p, this.position, this._tempVec2); - this.angularVelocity += Phaser.Vec2Utils.cross(this._tempVec2, impulse) * this.inertiaInverted; - }; - Body.prototype.applyAngularImpulse = function (impulse) { - if(this.isDynamic == false) { - return; - } - if(this.isAwake == false) { - this.awake(true); - } - this.angularVelocity += impulse * this.inertiaInverted; - }; - Body.prototype.kineticEnergy = function () { - return 0.5 * (this.mass * this.velocity.dot(this.velocity) + this.inertia * (this.angularVelocity * this.angularVelocity)); - }; - Object.defineProperty(Body.prototype, "isAwake", { - get: function () { - return this.awaked; - }, - enumerable: true, - configurable: true - }); - Body.prototype.awake = function (flag) { - this.awaked = flag; - if(flag) { - this.sleepTime = 0; - } else { - this.velocity.setTo(0, 0); - this.angularVelocity = 0; - this.force.setTo(0, 0); - this.torque = 0; - } - }; - Body.prototype.isCollidable = function (other) { - if((this.isDynamic == false && other.isDynamic == false) || this == other) { - return false; - } - if(!(this.maskBits & other.categoryBits) || !(other.maskBits & this.categoryBits)) { - return false; - } - for(var i = 0; i < this.joints.length; i++) { - var joint = this.joints[i]; - if(!this.joints[i] || (!this.joints[i].collideConnected && other.jointHash[this.joints[i].id] != undefined)) { - return false; - } - } - return true; - }; - Body.prototype.toString = function () { - return "[{Body (name=" + this.name + " velocity=" + this.velocity.toString() + " angularVelocity: " + this.angularVelocity + ")}]"; - }; - return Body; - })(); - Physics.Body = Body; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Body.ts b/wip/physics/Body.ts deleted file mode 100644 index 325965af..00000000 --- a/wip/physics/Body.ts +++ /dev/null @@ -1,657 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Body -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Body { - - constructor(sprite: Phaser.Sprite, type: number, x?: number = 0, y?: number = 0, shapeType?: number = 0) { - - this.id = Phaser.Physics.AdvancedPhysics.bodyCounter++; - this.name = 'body' + this.id; - this.type = type; - - if (sprite) - { - this.sprite = sprite; - this.game = sprite.game; - this.position = new Phaser.Vec2(Phaser.Physics.AdvancedPhysics.pixelsToMeters(sprite.x), Phaser.Physics.AdvancedPhysics.pixelsToMeters(sprite.y)); - this.angle = this.game.math.degreesToRadians(sprite.rotation); - } - else - { - this.position = new Phaser.Vec2(Phaser.Physics.AdvancedPhysics.pixelsToMeters(x), Phaser.Physics.AdvancedPhysics.pixelsToMeters(y)); - this.angle = 0; - } - - this.transform = new Phaser.Transform(this.position, this.angle); - this.centroid = new Phaser.Vec2; - this.velocity = new Phaser.Vec2; - this.force = new Phaser.Vec2; - this.angularVelocity = 0; - this.torque = 0; - this.linearDamping = 0; - this.angularDamping = 0; - this.sleepTime = 0; - this.awaked = false; - - this.shapes = []; - this.joints = []; - this.jointHash = {}; - - this.bounds = new Bounds; - - this.allowCollisions = Phaser.Types.ANY; - - this.categoryBits = 0x0001; - this.maskBits = 0xFFFF; - - this.stepCount = 0; - - if (sprite) - { - if (shapeType == 0) - { - Phaser.BodyUtils.addBox(this, 0, 0, this.sprite.width, this.sprite.height, 1, 1, 1); - } - else - { - Phaser.BodyUtils.addCircle(this, Math.max(this.sprite.width, this.sprite.height) / 2, 0, 0, 1, 1, 1); - } - } - - } - - private _tempVec2: Phaser.Vec2 = new Phaser.Vec2; - private _fixedRotation: bool = false; - - /** - * Reference to Phaser.Game - */ - public game: Phaser.Game; - - /** - * Reference to the parent Sprite - */ - public sprite: Phaser.Sprite; - - /** - * The Body ID - */ - public id: number; - - /** - * The Body name - */ - public name: string; - - /** - * The type of Body (disabled, dynamic, static or kinematic) - * Disabled = skips all physics operations / tests (default) - * Dynamic = gives and receives impacts - * Static = gives but doesn't receive impacts, cannot be moved by physics - * Kinematic = gives impacts, but never receives, can be moved by physics - * @type {number} - */ - public type: number; - - /** - * The angle of the body in radians. Used by all of the internal physics methods. - */ - public angle: number; - - /** - * The rotation of the body in degrees. Phaser uses a right-handed coordinate system, where 0 points to the right. - */ - public get rotation(): number { - return this.game.math.radiansToDegrees(this.angle); - } - - /** - * Set the rotation of the body in degrees. Phaser uses a right-handed coordinate system, where 0 points to the right. - * The value is automatically wrapped to be between 0 and 360. - */ - public set rotation(value: number) { - this.angle = this.game.math.degreesToRadians(this.game.math.wrap(value, 360, 0)); - } - - // Local to world transform - public transform: Phaser.Transform; - - // Local center of mass - public centroid: Phaser.Vec2; - - // World position of centroid - public position: Phaser.Vec2; - - // Velocity - public velocity: Phaser.Vec2; - - // Force - public force: Phaser.Vec2; - - // Angular velocity - public angularVelocity: number; - - // Torque - public torque: number; - - // Linear damping - public linearDamping: number; - - // Angular damping - public angularDamping: number; - - // Sleep time - public sleepTime: number; - - // Awaked - public awaked: bool; - - // Allow Collisions - public allowCollisions: number; - - // Shapes - public shapes: IShape[] = []; - - // Length of the shapes array - public shapesLength: number; - - // Joints - public joints: IJoint[] = []; - public jointHash = {}; - - // Bounds of all shapes - public bounds: Bounds; - - public mass: number; - public massInverted: number; - public inertia: number; - public inertiaInverted: number; - - public categoryBits: number = 0x0001; - public maskBits: number = 0xFFFF; - public stepCount: number = 0; - public space: Space; - - - public get isDisabled(): bool { - return this.type == Phaser.Types.BODY_DISABLED ? true : false; - } - - public get isStatic(): bool { - return this.type == Phaser.Types.BODY_STATIC ? true : false; - } - - public get isKinetic(): bool { - return this.type == Phaser.Types.BODY_KINETIC ? true : false; - } - - public get isDynamic(): bool { - return this.type == Phaser.Types.BODY_DYNAMIC ? true : false; - } - - public setType(type: number) { - - if (type == this.type) - { - return; - } - - this.force.setTo(0, 0); - this.velocity.setTo(0, 0); - this.torque = 0; - this.angularVelocity = 0; - this.type = type; - - this.awake(true); - - } - - - public addShape(shape) { - - // Check not already part of this body - shape.body = this; - - this.shapes.push(shape); - - this.shapesLength = this.shapes.length; - - return shape; - - } - - public removeShape(shape) { - - var index = this.shapes.indexOf(shape); - - if (index != -1) - { - this.shapes.splice(index, 1); - shape.body = undefined; - } - - this.shapesLength = this.shapes.length; - - } - - private setMass(mass:number) { - - this.mass = mass; - this.massInverted = mass > 0 ? 1 / mass : 0; - - } - - private setInertia(inertia:number) { - - this.inertia = inertia; - this.inertiaInverted = inertia > 0 ? 1 / inertia : 0; - - } - - private _newPosition: Phaser.Vec2 = new Phaser.Vec2; - - public setPosition(x: number, y: number) { - - this._newPosition.setTo(Phaser.Physics.AdvancedPhysics.pixelsToMeters(x), Phaser.Physics.AdvancedPhysics.pixelsToMeters(y)); - - this.setTransform(this._newPosition, this.angle); - - } - - public setTransform(pos:Phaser.Vec2, angle:number) { - - // inject the transform into this.position - this.transform.setTo(pos, angle); - //Manager.write('setTransform: ' + this.position.toString()); - //Manager.write('centroid: ' + this.centroid.toString()); - Phaser.TransformUtils.transform(this.transform, this.centroid, this.position); - //Manager.write('post setTransform: ' + this.position.toString()); - //this.position.copyFrom(this.transform.transform(this.centroid)); - this.angle = angle; - - } - - public syncTransform() { - - //Manager.write('syncTransform:'); - //Manager.write('p: ' + this.position.toString()); - //Manager.write('centroid: ' + this.centroid.toString()); - //Manager.write('xf: ' + this.transform.toString()); - //Manager.write('a: ' + this.angle); - this.transform.setRotation(this.angle); - // OPTIMISE: Creating new vector - Phaser.Vec2Utils.subtract(this.position, Phaser.TransformUtils.rotate(this.transform, this.centroid), this.transform.t); - //Manager.write('--------------------'); - //Manager.write('xf: ' + this.transform.toString()); - //Manager.write('--------------------'); - - } - - public getWorldPoint(p:Phaser.Vec2) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.transform(this.transform, p); - } - - public getWorldVector(v:Phaser.Vec2) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.rotate(this.transform, v); - } - - public getLocalPoint(p:Phaser.Vec2) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.untransform(this.transform, p); - } - - public getLocalVector(v:Phaser.Vec2) { - // OPTIMISE: Creating new vector - return Phaser.TransformUtils.unrotate(this.transform, v); - } - - public set fixedRotation(value:bool) { - - this._fixedRotation = value; - - this.resetMassData(); - - } - - public get fixedRotation(): bool { - return this._fixedRotation; - } - - public resetMassData() { - - this.centroid.setTo(0, 0); - this.mass = 0; - this.massInverted = 0; - this.inertia = 0; - this.inertiaInverted = 0; - - if (this.isDynamic == false) - { - Phaser.TransformUtils.transform(this.transform, this.centroid, this.position); - return; - } - - var totalMassCentroid = new Phaser.Vec2(0, 0); - var totalMass = 0; - var totalInertia = 0; - - for (var i = 0; i < this.shapes.length; i++) - { - var shape = this.shapes[i]; - var centroid = shape.centroid(); - var mass = shape.area() * shape.density; - var inertia = shape.inertia(mass); - - totalMassCentroid.multiplyAddByScalar(centroid, mass); - totalMass += mass; - totalInertia += inertia; - } - - Phaser.Vec2Utils.scale(totalMassCentroid, 1 / totalMass, this.centroid); - - this.setMass(totalMass); - - if (!this.fixedRotation) - { - this.setInertia(totalInertia - totalMass * Phaser.Vec2Utils.dot(this.centroid, this.centroid)); - } - - // Move center of mass - var oldPosition: Phaser.Vec2 = Phaser.Vec2Utils.clone(this.position); - Phaser.TransformUtils.transform(this.transform, this.centroid, this.position); - - // Update center of mass velocity - oldPosition.subtract(this.position); - this.velocity.multiplyAddByScalar(Phaser.Vec2Utils.perp(oldPosition, oldPosition), this.angularVelocity); - - } - - public resetJointAnchors() { - - for (var i = 0; i < this.joints.length; i++) - { - var joint = this.joints[i]; - - if (!joint) - { - continue; - } - - var anchor1 = joint.getWorldAnchor1(); - var anchor2 = joint.getWorldAnchor2(); - - joint.setWorldAnchor1(anchor1); - joint.setWorldAnchor2(anchor2); - } - } - - public cacheData(source:string = '') { - - //Manager.write('cacheData -- start'); - //Manager.write('p: ' + this.position.toString()); - //Manager.write('xf: ' + this.transform.toString()); - - this.bounds.clear(); - - for (var i = 0; i < this.shapesLength; i++) - { - var shape: IShape = this.shapes[i]; - shape.cacheData(this.transform); - this.bounds.addBounds(shape.bounds); - } - - //Manager.write('bounds: ' + this.bounds.toString()); - - //Manager.write('p: ' + this.position.toString()); - //Manager.write('xf: ' + this.transform.toString()); - //Manager.write('cacheData -- stop'); - - } - - public updateVelocity(gravity, dt, damping) { - - Phaser.Vec2Utils.multiplyAdd(gravity, this.force, this.massInverted, this._tempVec2); - Phaser.Vec2Utils.multiplyAdd(this.velocity, this._tempVec2, dt, this.velocity); - - this.angularVelocity = this.angularVelocity + this.torque * this.inertiaInverted * dt; - - // Apply damping. - // ODE: dv/dt + c * v = 0 - // Solution: v(t) = v0 * exp(-c * t) - // Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v * exp(-c * dt) - // v2 = exp(-c * dt) * v1 - // Taylor expansion: - // v2 = (1.0f - c * dt) * v1 - this.velocity.scale(this.clamp(1 - dt * (damping + this.linearDamping), 0, 1)); - this.angularVelocity *= this.clamp(1 - dt * (damping + this.angularDamping), 0, 1); - - this.force.setTo(0, 0); - this.torque = 0; - - } - - public inContact(body2: Body): bool { - - if (!body2 || this.stepCount == body2.stepCount) - { - return false; - } - - if (!(this.isAwake && this.isStatic == false) && !(body2.isAwake && body2.isStatic == false)) - { - return false; - } - - if (this.isCollidable(body2) == false) - { - return false; - } - - if (!this.bounds.intersectsBounds(body2.bounds)) - { - return false; - } - - return true; - - } - - public clamp(v, min, max) { - return v < min ? min : (v > max ? max : v); - } - - public updatePosition(dt:number) { - - this.position.add(Phaser.Vec2Utils.scale(this.velocity, dt, this._tempVec2)); - - this.angle += this.angularVelocity * dt; - - if (this.sprite) - { - this.sprite.x = this.position.x * 50; - this.sprite.y = this.position.y * 50; - this.sprite.transform.rotation = this.game.math.radiansToDegrees(this.angle); - } - - } - - public resetForce() { - - this.force.setTo(0, 0); - this.torque = 0; - - } - - public applyForce(force:Phaser.Vec2, p:Phaser.Vec2) { - - if (this.isDynamic == false) - { - return; - } - - if (this.isAwake == false) - { - this.awake(true); - } - - this.force.add(force); - - Phaser.Vec2Utils.subtract(p, this.position, this._tempVec2); - - this.torque += Phaser.Vec2Utils.cross(this._tempVec2, force); - - } - - public applyForceToCenter(force:Phaser.Vec2) { - - if (this.isDynamic == false) - { - return; - } - - if (this.isAwake == false) - { - this.awake(true); - } - - this.force.add(force); - - } - - public applyTorque(torque:number) { - - if (this.isDynamic == false) - { - return; - } - - if (this.isAwake == false) - { - this.awake(true); - } - - this.torque += torque; - - } - - public applyLinearImpulse(impulse:Phaser.Vec2, p:Phaser.Vec2) { - - if (this.isDynamic == false) - { - return; - } - - if (this.isAwake == false) - { - this.awake(true); - } - - this.velocity.multiplyAddByScalar(impulse, this.massInverted); - - Phaser.Vec2Utils.subtract(p, this.position, this._tempVec2); - - this.angularVelocity += Phaser.Vec2Utils.cross(this._tempVec2, impulse) * this.inertiaInverted; - - } - - public applyAngularImpulse(impulse: number) { - - if (this.isDynamic == false) - { - return; - } - - if (this.isAwake == false) - { - this.awake(true); - } - - this.angularVelocity += impulse * this.inertiaInverted; - - } - - public kineticEnergy() { - - return 0.5 * (this.mass * this.velocity.dot(this.velocity) + this.inertia * (this.angularVelocity * this.angularVelocity)); - - } - - public get isAwake(): bool { - return this.awaked; - } - - public awake(flag) { - - this.awaked = flag; - - if (flag) - { - this.sleepTime = 0; - } - else - { - this.velocity.setTo(0, 0); - this.angularVelocity = 0; - this.force.setTo(0, 0); - this.torque = 0; - } - - } - - public isCollidable(other:Body) { - - if ((this.isDynamic == false && other.isDynamic == false) || this == other) - { - return false; - } - - if (!(this.maskBits & other.categoryBits) || !(other.maskBits & this.categoryBits)) - { - return false; - } - - for (var i = 0; i < this.joints.length; i++) - { - var joint = this.joints[i]; - - if (!this.joints[i] || (!this.joints[i].collideConnected && other.jointHash[this.joints[i].id] != undefined)) - { - return false; - } - } - - return true; - - } - - public toString(): string { - return "[{Body (name=" + this.name + " velocity=" + this.velocity.toString() + " angularVelocity: " + this.angularVelocity + ")}]"; - } - - } - -} \ No newline at end of file diff --git a/wip/physics/BodyUtils.ts b/wip/physics/BodyUtils.ts deleted file mode 100644 index e43a770d..00000000 --- a/wip/physics/BodyUtils.ts +++ /dev/null @@ -1,94 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - BodyUtils -* -* A collection of methods useful for manipulating AdvancedPhysics Body objects. -*/ - -module Phaser { - - export class BodyUtils { - - static duplicate(source: Phaser.Physics.Body, output?: Phaser.Physics.Body): Phaser.Physics.Body { - - /* - console.log('body duplicate called'); - - var newBody = new Phaser.Physics.Body(source.type, source.transform.t, source.rotation); - - for (var i = 0; i < source.shapes.length; i++) - { - output.addShape(source.shapes[i].duplicate()); - } - - output.resetMassData(); - */ - - return output; - - } - - static addPoly(body: Phaser.Physics.Body, verts, elasticity?: number = 1, friction?: number = 1, density?: number = 1): Phaser.Physics.Shapes.Poly { - - var poly: Phaser.Physics.Shapes.Poly = new Phaser.Physics.Shapes.Poly(verts); - poly.elasticity = elasticity; - poly.friction = friction; - poly.density = density; - - body.addShape(poly); - body.resetMassData(); - - return poly; - - } - - static addTriangle(body: Phaser.Physics.Body, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, elasticity?: number = 1, friction?: number = 1, density?: number = 1): Phaser.Physics.Shapes.Triangle { - - var tri: Phaser.Physics.Shapes.Triangle = new Phaser.Physics.Shapes.Triangle(x1, y1, x2, y2, x3, y3); - tri.elasticity = elasticity; - tri.friction = friction; - tri.density = density; - - body.addShape(tri); - body.resetMassData(); - - return tri; - - } - - static addBox(body: Phaser.Physics.Body, x: number, y: number, width: number, height: number, elasticity?: number = 1, friction?: number = 1, density?: number = 1): Phaser.Physics.Shapes.Box { - - var box: Phaser.Physics.Shapes.Box = new Phaser.Physics.Shapes.Box(x, y, width, height); - box.elasticity = elasticity; - box.friction = friction; - box.density = density; - - body.addShape(box); - body.resetMassData(); - - return box; - - } - - static addCircle(body: Phaser.Physics.Body, radius: number, x?: number = 0, y?: number = 0, elasticity?: number = 1, friction?: number = 1, density?: number = 1): Phaser.Physics.Shapes.Circle { - - var circle: Phaser.Physics.Shapes.Circle = new Phaser.Physics.Shapes.Circle(radius, x, y); - circle.elasticity = elasticity; - circle.friction = friction; - circle.density = density; - - body.addShape(circle); - body.resetMassData(); - - return circle; - - } - - } - -} \ No newline at end of file diff --git a/wip/physics/Bounds.js b/wip/physics/Bounds.js deleted file mode 100644 index 47b9ef6e..00000000 --- a/wip/physics/Bounds.js +++ /dev/null @@ -1,201 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /** - * Phaser - 2D AABB - * - * A 2D AABB object - */ - (function (Physics) { - var Bounds = (function () { - /** - * Creates a new 2D AABB object. - * @class Bounds - * @constructor - * @return {Bounds} This object - **/ - function Bounds(mins, maxs) { - if (typeof mins === "undefined") { mins = null; } - if (typeof maxs === "undefined") { maxs = null; } - if(mins) { - this.mins = Phaser.Vec2Utils.clone(mins); - } else { - this.mins = new Phaser.Vec2(999999, 999999); - } - if(maxs) { - this.maxs = Phaser.Vec2Utils.clone(maxs); - } else { - this.maxs = new Phaser.Vec2(999999, 999999); - } - } - Bounds.prototype.toString = function () { - return [ - "mins:", - this.mins.toString(), - "maxs:", - this.maxs.toString() - ].join(" "); - }; - Bounds.prototype.setTo = function (mins, maxs) { - this.mins.setTo(mins.x, mins.y); - this.maxs.setTo(maxs.x, maxs.y); - }; - Bounds.prototype.copy = function (b) { - this.mins.copyFrom(b.mins); - this.maxs.copyFrom(b.maxs); - return this; - }; - Bounds.prototype.clear = function () { - this.mins.setTo(999999, 999999); - this.maxs.setTo(-999999, -999999); - return this; - }; - Object.defineProperty(Bounds.prototype, "x", { - get: function () { - return Physics.AdvancedPhysics.metersToPixels(this.mins.x); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Bounds.prototype, "y", { - get: function () { - return Physics.AdvancedPhysics.metersToPixels(this.mins.y); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Bounds.prototype, "width", { - get: function () { - return Physics.AdvancedPhysics.metersToPixels(this.maxs.x - this.mins.x); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Bounds.prototype, "height", { - get: function () { - return Physics.AdvancedPhysics.metersToPixels(this.maxs.y - this.mins.y); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Bounds.prototype, "right", { - get: function () { - return this.x + this.width; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Bounds.prototype, "bottom", { - get: function () { - return this.y + this.height; - }, - enumerable: true, - configurable: true - }); - Bounds.prototype.isEmpty = function () { - return (this.mins.x > this.maxs.x || this.mins.y > this.maxs.y); - }; - Bounds.prototype.getPerimeter = /* - public getCenter() { - return vec2.scale(vec2.add(this.mins, this.maxs), 0.5); - } - - public getExtent() { - return vec2.scale(vec2.sub(this.maxs, this.mins), 0.5); - } - */ - function () { - return (this.maxs.x - this.mins.x + this.maxs.y - this.mins.y) * 2; - }; - Bounds.prototype.addPoint = function (p) { - if(this.mins.x > p.x) { - this.mins.x = p.x; - } - if(this.maxs.x < p.x) { - this.maxs.x = p.x; - } - if(this.mins.y > p.y) { - this.mins.y = p.y; - } - if(this.maxs.y < p.y) { - this.maxs.y = p.y; - } - return this; - }; - Bounds.prototype.addBounds = function (b) { - if(this.mins.x > b.mins.x) { - this.mins.x = b.mins.x; - } - if(this.maxs.x < b.maxs.x) { - this.maxs.x = b.maxs.x; - } - if(this.mins.y > b.mins.y) { - this.mins.y = b.mins.y; - } - if(this.maxs.y < b.maxs.y) { - this.maxs.y = b.maxs.y; - } - return this; - }; - Bounds.prototype.addBounds2 = function (mins, maxs) { - if(this.mins.x > mins.x) { - this.mins.x = mins.x; - } - if(this.maxs.x < maxs.x) { - this.maxs.x = maxs.x; - } - if(this.mins.y > mins.y) { - this.mins.y = mins.y; - } - if(this.maxs.y < maxs.y) { - this.maxs.y = maxs.y; - } - return this; - }; - Bounds.prototype.addExtents = function (center, extent_x, extent_y) { - if(this.mins.x > center.x - extent_x) { - this.mins.x = center.x - extent_x; - } - if(this.maxs.x < center.x + extent_x) { - this.maxs.x = center.x + extent_x; - } - if(this.mins.y > center.y - extent_y) { - this.mins.y = center.y - extent_y; - } - if(this.maxs.y < center.y + extent_y) { - this.maxs.y = center.y + extent_y; - } - return this; - }; - Bounds.prototype.expand = function (ax, ay) { - this.mins.x -= ax; - this.mins.y -= ay; - this.maxs.x += ax; - this.maxs.y += ay; - return this; - }; - Bounds.prototype.containPoint = function (p) { - if(p.x < this.mins.x || p.x > this.maxs.x || p.y < this.mins.y || p.y > this.maxs.y) { - return false; - } - return true; - }; - Bounds.prototype.intersectsBounds = function (b) { - if(this.mins.x > b.maxs.x || this.maxs.x < b.mins.x || this.mins.y > b.maxs.y || this.maxs.y < b.mins.y) { - return false; - } - return true; - }; - Bounds.expand = function expand(b, ax, ay) { - var b = new Bounds(b.mins, b.maxs); - b.expand(ax, ay); - return b; - }; - return Bounds; - })(); - Physics.Bounds = Bounds; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Bounds.ts b/wip/physics/Bounds.ts deleted file mode 100644 index 8c3a72e5..00000000 --- a/wip/physics/Bounds.ts +++ /dev/null @@ -1,199 +0,0 @@ -/// -/// -/// - -/** -* Phaser - 2D AABB -* -* A 2D AABB object -*/ - -module Phaser.Physics { - - export class Bounds { - - /** - * Creates a new 2D AABB object. - * @class Bounds - * @constructor - * @return {Bounds} This object - **/ - constructor(mins?: Phaser.Vec2 = null, maxs?: Phaser.Vec2 = null) { - - if (mins) - { - this.mins = Phaser.Vec2Utils.clone(mins); - } - else - { - this.mins = new Phaser.Vec2(999999, 999999); - } - - if (maxs) - { - this.maxs = Phaser.Vec2Utils.clone(maxs); - } - else - { - this.maxs = new Phaser.Vec2(999999, 999999); - } - - } - - public mins: Phaser.Vec2; - public maxs: Phaser.Vec2; - - public toString() { - return ["mins:", this.mins.toString(), "maxs:", this.maxs.toString()].join(" "); - } - - public setTo(mins: Phaser.Vec2, maxs: Phaser.Vec2) { - - this.mins.setTo(mins.x, mins.y); - this.maxs.setTo(maxs.x, maxs.y); - - } - - public copy(b: Bounds): Bounds { - - this.mins.copyFrom(b.mins); - this.maxs.copyFrom(b.maxs); - - return this; - } - - public clear(): Bounds { - - this.mins.setTo(999999, 999999); - this.maxs.setTo(-999999, -999999); - - return this; - - } - - public get x(): number { - return AdvancedPhysics.metersToPixels(this.mins.x); - } - - public get y(): number { - return AdvancedPhysics.metersToPixels(this.mins.y); - } - - public get width(): number { - return AdvancedPhysics.metersToPixels(this.maxs.x - this.mins.x); - } - - public get height(): number { - return AdvancedPhysics.metersToPixels(this.maxs.y - this.mins.y); - } - - public get right(): number { - return this.x + this.width; - } - - public get bottom(): number { - return this.y + this.height; - } - - public isEmpty(): bool { - return (this.mins.x > this.maxs.x || this.mins.y > this.maxs.y); - } - - /* - public getCenter() { - return vec2.scale(vec2.add(this.mins, this.maxs), 0.5); - } - - public getExtent() { - return vec2.scale(vec2.sub(this.maxs, this.mins), 0.5); - } - */ - - public getPerimeter(): number { - return (this.maxs.x - this.mins.x + this.maxs.y - this.mins.y) * 2; - } - - public addPoint(p: Phaser.Vec2): Bounds { - - if (this.mins.x > p.x) this.mins.x = p.x; - if (this.maxs.x < p.x) this.maxs.x = p.x; - if (this.mins.y > p.y) this.mins.y = p.y; - if (this.maxs.y < p.y) this.maxs.y = p.y; - - return this; - } - - public addBounds(b: Bounds): Bounds { - - if (this.mins.x > b.mins.x) this.mins.x = b.mins.x; - if (this.maxs.x < b.maxs.x) this.maxs.x = b.maxs.x; - if (this.mins.y > b.mins.y) this.mins.y = b.mins.y; - if (this.maxs.y < b.maxs.y) this.maxs.y = b.maxs.y; - - return this; - } - - public addBounds2(mins, maxs): Bounds { - - if (this.mins.x > mins.x) this.mins.x = mins.x; - if (this.maxs.x < maxs.x) this.maxs.x = maxs.x; - if (this.mins.y > mins.y) this.mins.y = mins.y; - if (this.maxs.y < maxs.y) this.maxs.y = maxs.y; - - return this; - } - - public addExtents(center: Phaser.Vec2, extent_x: number, extent_y: number): Bounds { - - if (this.mins.x > center.x - extent_x) this.mins.x = center.x - extent_x; - if (this.maxs.x < center.x + extent_x) this.maxs.x = center.x + extent_x; - if (this.mins.y > center.y - extent_y) this.mins.y = center.y - extent_y; - if (this.maxs.y < center.y + extent_y) this.maxs.y = center.y + extent_y; - - return this; - - } - - public expand(ax: number, ay: number): Bounds { - - this.mins.x -= ax; - this.mins.y -= ay; - this.maxs.x += ax; - this.maxs.y += ay; - - return this; - - } - - public containPoint(p: Phaser.Vec2): bool { - - if (p.x < this.mins.x || p.x > this.maxs.x || p.y < this.mins.y || p.y > this.maxs.y) - { - return false; - } - - return true; - - } - - public intersectsBounds(b: Bounds): bool { - - if (this.mins.x > b.maxs.x || this.maxs.x < b.mins.x || this.mins.y > b.maxs.y || this.maxs.y < b.mins.y) - { - return false; - } - - return true; - } - - public static expand(b: Bounds, ax, ay) { - - var b = new Bounds(b.mins, b.maxs); - b.expand(ax, ay); - return b; - - } - - } - -} \ No newline at end of file diff --git a/wip/physics/Collision.js b/wip/physics/Collision.js deleted file mode 100644 index 4ea803a9..00000000 --- a/wip/physics/Collision.js +++ /dev/null @@ -1,373 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Collision Handlers - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Collision = (function () { - function Collision() { } - Collision.prototype.collide = function (a, b, contacts) { - // Circle (a is the circle) - if(a.type == Physics.AdvancedPhysics.SHAPE_TYPE_CIRCLE) { - if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_CIRCLE) { - return this.circle2Circle(a, b, contacts); - } else if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_SEGMENT) { - return this.circle2Segment(a, b, contacts); - } else if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_POLY) { - return this.circle2Poly(a, b, contacts); - } - } - // Segment (a is the segment) - if(a.type == Physics.AdvancedPhysics.SHAPE_TYPE_SEGMENT) { - if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_CIRCLE) { - return this.circle2Segment(b, a, contacts); - } else if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_SEGMENT) { - return this.segment2Segment(a, b, contacts); - } else if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_POLY) { - return this.segment2Poly(a, b, contacts); - } - } - // Poly (a is the poly) - if(a.type == Physics.AdvancedPhysics.SHAPE_TYPE_POLY) { - if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_CIRCLE) { - return this.circle2Poly(b, a, contacts); - } else if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_SEGMENT) { - return this.segment2Poly(b, a, contacts); - } else if(b.type == Physics.AdvancedPhysics.SHAPE_TYPE_POLY) { - return this.poly2Poly(a, b, contacts); - } - } - }; - Collision.prototype._circle2Circle = function (c1, r1, c2, r2, contactArr) { - var rmax = r1 + r2; - var t = new Phaser.Vec2(); - //var t = vec2.sub(c2, c1); - Phaser.Vec2Utils.subtract(c2, c1, t); - var distsq = t.lengthSq(); - if(distsq > rmax * rmax) { - return 0; - } - var dist = Math.sqrt(distsq); - var p = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(c1, t, 0.5 + (r1 - r2) * 0.5 / dist, p); - //var p = vec2.mad(c1, t, 0.5 + (r1 - r2) * 0.5 / dist); - var n = new Phaser.Vec2(); - //var n = (dist != 0) ? vec2.scale(t, 1 / dist) : vec2.zero; - if(dist != 0) { - Phaser.Vec2Utils.scale(t, 1 / dist, n); - } - var d = dist - rmax; - contactArr.push(new Physics.Contact(p, n, d, 0)); - return 1; - }; - Collision.prototype.circle2Circle = function (circ1, circ2, contactArr) { - return this._circle2Circle(circ1.tc, circ1.radius, circ2.tc, circ2.radius, contactArr); - }; - Collision.prototype.circle2Segment = function (circ, seg, contactArr) { - var rsum = circ.radius + seg.radius; - // Normal distance from segment - var dn = Phaser.Vec2Utils.dot(circ.tc, seg.tn) - Phaser.Vec2Utils.dot(seg.ta, seg.tn); - var dist = (dn < 0 ? dn * -1 : dn) - rsum; - if(dist > 0) { - return 0; - } - // Tangential distance along segment - var dt = Phaser.Vec2Utils.cross(circ.tc, seg.tn); - var dtMin = Phaser.Vec2Utils.cross(seg.ta, seg.tn); - var dtMax = Phaser.Vec2Utils.cross(seg.tb, seg.tn); - if(dt < dtMin) { - if(dt < dtMin - rsum) { - return 0; - } - return this._circle2Circle(circ.tc, circ.radius, seg.ta, seg.radius, contactArr); - } else if(dt > dtMax) { - if(dt > dtMax + rsum) { - return 0; - } - return this._circle2Circle(circ.tc, circ.radius, seg.tb, seg.radius, contactArr); - } - var n = new Phaser.Vec2(); - if(dn > 0) { - n.copyFrom(seg.tn); - } else { - Phaser.Vec2Utils.negative(seg.tn, n); - } - //var n = (dn > 0) ? seg.tn : vec2.neg(seg.tn); - var c1 = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(circ.tc, n, -(circ.radius + dist * 0.5), c1); - var c2 = new Phaser.Vec2(); - Phaser.Vec2Utils.negative(n, c2); - contactArr.push(new Physics.Contact(c1, c2, dist, 0)); - //contactArr.push(new Contact(vec2.mad(circ.tc, n, -(circ.r + dist * 0.5)), vec2.neg(n), dist, 0)); - return 1; - }; - Collision.prototype.circle2Poly = function (circ, poly, contactArr) { - var minDist = -999999; - var minIdx = -1; - for(var i = 0; i < poly.verts.length; i++) { - var plane = poly.tplanes[i]; - var dist = Phaser.Vec2Utils.dot(circ.tc, plane.normal) - plane.d - circ.radius; - if(dist > 0) { - return 0; - } else if(dist > minDist) { - minDist = dist; - minIdx = i; - } - } - var n = poly.tplanes[minIdx].normal; - var a = poly.tverts[minIdx]; - var b = poly.tverts[(minIdx + 1) % poly.verts.length]; - var dta = Phaser.Vec2Utils.cross(a, n); - var dtb = Phaser.Vec2Utils.cross(b, n); - var dt = Phaser.Vec2Utils.cross(circ.tc, n); - if(dt > dta) { - return this._circle2Circle(circ.tc, circ.radius, a, 0, contactArr); - } else if(dt < dtb) { - return this._circle2Circle(circ.tc, circ.radius, b, 0, contactArr); - } - var c1 = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(circ.tc, n, -(circ.radius + minDist * 0.5), c1); - var c2 = new Phaser.Vec2(); - Phaser.Vec2Utils.negative(n, c2); - contactArr.push(new Physics.Contact(c1, c2, minDist, 0)); - //contactArr.push(new Contact(vec2.mad(circ.tc, n, -(circ.r + minDist * 0.5)), vec2.neg(n), minDist, 0)); - return 1; - }; - Collision.prototype.segmentPointDistanceSq = function (seg, p) { - var w = new Phaser.Vec2(); - var d = new Phaser.Vec2(); - Phaser.Vec2Utils.subtract(p, seg.ta, w); - Phaser.Vec2Utils.subtract(seg.tb, seg.ta, d); - //var w = vec2.sub(p, seg.ta); - //var d = vec2.sub(seg.tb, seg.ta); - var proj = w.dot(d); - if(proj <= 0) { - return w.dot(w); - } - var vsq = d.dot(d); - if(proj >= vsq) { - return w.dot(w) - 2 * proj + vsq; - } - return w.dot(w) - proj * proj / vsq; - }; - Collision.prototype.segment2Segment = // FIXME and optimise me lots!!! - function (seg1, seg2, contactArr) { - var d = []; - d[0] = this.segmentPointDistanceSq(seg1, seg2.ta); - d[1] = this.segmentPointDistanceSq(seg1, seg2.tb); - d[2] = this.segmentPointDistanceSq(seg2, seg1.ta); - d[3] = this.segmentPointDistanceSq(seg2, seg1.tb); - var idx1 = d[0] < d[1] ? 0 : 1; - var idx2 = d[2] < d[3] ? 2 : 3; - var idxm = d[idx1] < d[idx2] ? idx1 : idx2; - var s, t; - var u = Phaser.Vec2Utils.subtract(seg1.tb, seg1.ta); - var v = Phaser.Vec2Utils.subtract(seg2.tb, seg2.ta); - switch(idxm) { - case 0: - s = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg2.ta, seg1.ta), u) / Phaser.Vec2Utils.dot(u, u); - s = s < 0 ? 0 : (s > 1 ? 1 : s); - t = 0; - break; - case 1: - s = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg2.tb, seg1.ta), u) / Phaser.Vec2Utils.dot(u, u); - s = s < 0 ? 0 : (s > 1 ? 1 : s); - t = 1; - break; - case 2: - s = 0; - t = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg1.ta, seg2.ta), v) / Phaser.Vec2Utils.dot(v, v); - t = t < 0 ? 0 : (t > 1 ? 1 : t); - break; - case 3: - s = 1; - t = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg1.tb, seg2.ta), v) / Phaser.Vec2Utils.dot(v, v); - t = t < 0 ? 0 : (t > 1 ? 1 : t); - break; - } - var minp1 = Phaser.Vec2Utils.multiplyAdd(seg1.ta, u, s); - var minp2 = Phaser.Vec2Utils.multiplyAdd(seg2.ta, v, t); - return this._circle2Circle(minp1, seg1.radius, minp2, seg2.radius, contactArr); - }; - Collision.prototype.findPointsBehindSeg = // Identify vertexes that have penetrated the segment. - function (contactArr, seg, poly, dist, coef) { - var dta = Phaser.Vec2Utils.cross(seg.tn, seg.ta); - var dtb = Phaser.Vec2Utils.cross(seg.tn, seg.tb); - var n = new Phaser.Vec2(); - Phaser.Vec2Utils.scale(seg.tn, coef, n); - //var n = vec2.scale(seg.tn, coef); - for(var i = 0; i < poly.verts.length; i++) { - var v = poly.tverts[i]; - if(Phaser.Vec2Utils.dot(v, n) < Phaser.Vec2Utils.dot(seg.tn, seg.ta) * coef + seg.radius) { - var dt = Phaser.Vec2Utils.cross(seg.tn, v); - if(dta >= dt && dt >= dtb) { - contactArr.push(new Physics.Contact(v, n, dist, (poly.id << 16) | i)); - } - } - } - }; - Collision.prototype.segment2Poly = function (seg, poly, contactArr) { - var seg_td = Phaser.Vec2Utils.dot(seg.tn, seg.ta); - var seg_d1 = poly.distanceOnPlane(seg.tn, seg_td) - seg.radius; - if(seg_d1 > 0) { - return 0; - } - var n = new Phaser.Vec2(); - Phaser.Vec2Utils.negative(seg.tn, n); - var seg_d2 = poly.distanceOnPlane(n, -seg_td) - seg.radius; - //var seg_d2 = poly.distanceOnPlane(vec2.neg(seg.tn), -seg_td) - seg.r; - if(seg_d2 > 0) { - return 0; - } - var poly_d = -999999; - var poly_i = -1; - for(var i = 0; i < poly.verts.length; i++) { - var plane = poly.tplanes[i]; - var dist = seg.distanceOnPlane(plane.normal, plane.d); - if(dist > 0) { - return 0; - } - if(dist > poly_d) { - poly_d = dist; - poly_i = i; - } - } - var poly_n = new Phaser.Vec2(); - Phaser.Vec2Utils.negative(poly.tplanes[poly_i].normal, poly_n); - //var poly_n = vec2.neg(poly.tplanes[poly_i].n); - var va = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(seg.ta, poly_n, seg.radius, va); - //var va = vec2.mad(seg.ta, poly_n, seg.r); - var vb = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(seg.tb, poly_n, seg.radius, vb); - //var vb = vec2.mad(seg.tb, poly_n, seg.r); - if(poly.containPoint(va)) { - contactArr.push(new Physics.Contact(va, poly_n, poly_d, (seg.id << 16) | 0)); - } - if(poly.containPoint(vb)) { - contactArr.push(new Physics.Contact(vb, poly_n, poly_d, (seg.id << 16) | 1)); - } - // Floating point precision problems here. - // This will have to do for now. - poly_d -= 0.1; - if(seg_d1 >= poly_d || seg_d2 >= poly_d) { - if(seg_d1 > seg_d2) { - this.findPointsBehindSeg(contactArr, seg, poly, seg_d1, 1); - } else { - this.findPointsBehindSeg(contactArr, seg, poly, seg_d2, -1); - } - } - // If no other collision points are found, try colliding endpoints. - if(contactArr.length == 0) { - var poly_a = poly.tverts[poly_i]; - var poly_b = poly.tverts[(poly_i + 1) % poly.verts.length]; - if(this._circle2Circle(seg.ta, seg.radius, poly_a, 0, contactArr)) { - return 1; - } - if(this._circle2Circle(seg.tb, seg.radius, poly_a, 0, contactArr)) { - return 1; - } - if(this._circle2Circle(seg.ta, seg.radius, poly_b, 0, contactArr)) { - return 1; - } - if(this._circle2Circle(seg.tb, seg.radius, poly_b, 0, contactArr)) { - return 1; - } - } - return contactArr.length; - }; - Collision.prototype.findMSA = // Find the minimum separating axis for the given poly and plane list. - function (poly, planes, num) { - var min_dist = -999999; - var min_index = -1; - for(var i = 0; i < num; i++) { - var dist = poly.distanceOnPlane(planes[i].normal, planes[i].d); - if(dist > 0) { - // no collision - return { - dist: 0, - index: -1 - }; - } else if(dist > min_dist) { - min_dist = dist; - min_index = i; - } - } - // new object - see what we can do here - return { - dist: min_dist, - index: min_index - }; - }; - Collision.prototype.findVertsFallback = function (contactArr, poly1, poly2, n, dist) { - var num = 0; - for(var i = 0; i < poly1.verts.length; i++) { - var v = poly1.tverts[i]; - if(poly2.containPointPartial(v, n)) { - contactArr.push(new Physics.Contact(v, n, dist, (poly1.id << 16) | i)); - num++; - } - } - for(var i = 0; i < poly2.verts.length; i++) { - var v = poly2.tverts[i]; - if(poly1.containPointPartial(v, n)) { - contactArr.push(new Physics.Contact(v, n, dist, (poly2.id << 16) | i)); - num++; - } - } - return num; - }; - Collision.prototype.findVerts = // Find the overlapped vertices. - function (contactArr, poly1, poly2, n, dist) { - var num = 0; - for(var i = 0; i < poly1.verts.length; i++) { - var v = poly1.tverts[i]; - if(poly2.containPoint(v)) { - contactArr.push(new Physics.Contact(v, n, dist, (poly1.id << 16) | i)); - num++; - } - } - for(var i = 0; i < poly2.verts.length; i++) { - var v = poly2.tverts[i]; - if(poly1.containPoint(v)) { - contactArr.push(new Physics.Contact(v, n, dist, (poly2.id << 16) | i)); - num++; - } - } - return num > 0 ? num : this.findVertsFallback(contactArr, poly1, poly2, n, dist); - }; - Collision.prototype.poly2Poly = function (poly1, poly2, contactArr) { - var msa1 = this.findMSA(poly2, poly1.tplanes, poly1.verts.length); - if(msa1.index == -1) { - console.log('poly2poly 0', msa1); - return 0; - } - var msa2 = this.findMSA(poly1, poly2.tplanes, poly2.verts.length); - if(msa2.index == -1) { - console.log('poly2poly 1', msa2); - return 0; - } - // Penetration normal direction should be from poly1 to poly2 - if(msa1.dist > msa2.dist) { - return this.findVerts(contactArr, poly1, poly2, poly1.tplanes[msa1.index].normal, msa1.dist); - } - return this.findVerts(contactArr, poly1, poly2, Phaser.Vec2Utils.negative(poly2.tplanes[msa2.index].normal), msa2.dist); - }; - return Collision; - })(); - Physics.Collision = Collision; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Collision.ts b/wip/physics/Collision.ts deleted file mode 100644 index 3cb00ebd..00000000 --- a/wip/physics/Collision.ts +++ /dev/null @@ -1,559 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Collision Handlers -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Collision { - - public collide(a, b, contacts: Contact[]) { - - // Circle (a is the circle) - if (a.type == AdvancedPhysics.SHAPE_TYPE_CIRCLE) - { - if (b.type == AdvancedPhysics.SHAPE_TYPE_CIRCLE) - { - return this.circle2Circle(a, b, contacts); - } - else if (b.type == AdvancedPhysics.SHAPE_TYPE_SEGMENT) - { - return this.circle2Segment(a, b, contacts); - } - else if (b.type == AdvancedPhysics.SHAPE_TYPE_POLY) - { - return this.circle2Poly(a, b, contacts); - } - } - - // Segment (a is the segment) - if (a.type == AdvancedPhysics.SHAPE_TYPE_SEGMENT) - { - if (b.type == AdvancedPhysics.SHAPE_TYPE_CIRCLE) - { - return this.circle2Segment(b, a, contacts); - } - else if (b.type == AdvancedPhysics.SHAPE_TYPE_SEGMENT) - { - return this.segment2Segment(a, b, contacts); - } - else if (b.type == AdvancedPhysics.SHAPE_TYPE_POLY) - { - return this.segment2Poly(a, b, contacts); - } - } - - // Poly (a is the poly) - if (a.type == AdvancedPhysics.SHAPE_TYPE_POLY) - { - if (b.type == AdvancedPhysics.SHAPE_TYPE_CIRCLE) - { - return this.circle2Poly(b, a, contacts); - } - else if (b.type == AdvancedPhysics.SHAPE_TYPE_SEGMENT) - { - return this.segment2Poly(b, a, contacts); - } - else if (b.type == AdvancedPhysics.SHAPE_TYPE_POLY) - { - return this.poly2Poly(a, b, contacts); - } - } - - } - - private _circle2Circle(c1, r1, c2, r2, contactArr) { - - var rmax = r1 + r2; - - var t: Phaser.Vec2 = new Phaser.Vec2; - //var t = vec2.sub(c2, c1); - Phaser.Vec2Utils.subtract(c2, c1, t); - - var distsq = t.lengthSq(); - - if (distsq > rmax * rmax) - { - return 0; - } - - var dist = Math.sqrt(distsq); - - var p: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.multiplyAdd(c1, t, 0.5 + (r1 - r2) * 0.5 / dist, p); - //var p = vec2.mad(c1, t, 0.5 + (r1 - r2) * 0.5 / dist); - - var n: Phaser.Vec2 = new Phaser.Vec2; - //var n = (dist != 0) ? vec2.scale(t, 1 / dist) : vec2.zero; - - if (dist != 0) - { - Phaser.Vec2Utils.scale(t, 1 / dist, n); - } - - var d = dist - rmax; - - contactArr.push(new Contact(p, n, d, 0)); - - return 1; - - } - - public circle2Circle(circ1: Phaser.Physics.Shapes.Circle, circ2: Phaser.Physics.Shapes.Circle, contactArr: Contact[]) { - return this._circle2Circle(circ1.tc, circ1.radius, circ2.tc, circ2.radius, contactArr); - } - - public circle2Segment(circ: Phaser.Physics.Shapes.Circle, seg: Phaser.Physics.Shapes.Segment, contactArr: Contact[]) { - - var rsum = circ.radius + seg.radius; - - // Normal distance from segment - var dn = Phaser.Vec2Utils.dot(circ.tc, seg.tn) - Phaser.Vec2Utils.dot(seg.ta, seg.tn); - var dist = (dn < 0 ? dn * -1 : dn) - rsum; - if (dist > 0) - { - return 0; - } - - // Tangential distance along segment - var dt = Phaser.Vec2Utils.cross(circ.tc, seg.tn); - var dtMin = Phaser.Vec2Utils.cross(seg.ta, seg.tn); - var dtMax = Phaser.Vec2Utils.cross(seg.tb, seg.tn); - - if (dt < dtMin) - { - if (dt < dtMin - rsum) - { - return 0; - } - - return this._circle2Circle(circ.tc, circ.radius, seg.ta, seg.radius, contactArr); - } - else if (dt > dtMax) - { - if (dt > dtMax + rsum) - { - return 0; - } - - return this._circle2Circle(circ.tc, circ.radius, seg.tb, seg.radius, contactArr); - } - - var n: Phaser.Vec2 = new Phaser.Vec2; - - if (dn > 0) - { - n.copyFrom(seg.tn); - } - else - { - Phaser.Vec2Utils.negative(seg.tn, n); - } - //var n = (dn > 0) ? seg.tn : vec2.neg(seg.tn); - - var c1: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.multiplyAdd(circ.tc, n, -(circ.radius + dist * 0.5), c1); - - var c2: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.negative(n, c2); - - contactArr.push(new Contact(c1, c2, dist, 0)); - //contactArr.push(new Contact(vec2.mad(circ.tc, n, -(circ.r + dist * 0.5)), vec2.neg(n), dist, 0)); - - return 1; - - } - - public circle2Poly(circ: Phaser.Physics.Shapes.Circle, poly: Phaser.Physics.Shapes.Poly, contactArr: Contact[]) { - - var minDist = -999999; - var minIdx = -1; - - for (var i = 0; i < poly.verts.length; i++) - { - var plane = poly.tplanes[i]; - var dist = Phaser.Vec2Utils.dot(circ.tc, plane.normal) - plane.d - circ.radius; - - if (dist > 0) - { - return 0; - } - else if (dist > minDist) - { - minDist = dist; - minIdx = i; - } - } - - var n = poly.tplanes[minIdx].normal; - var a = poly.tverts[minIdx]; - var b = poly.tverts[(minIdx + 1) % poly.verts.length]; - var dta = Phaser.Vec2Utils.cross(a, n); - var dtb = Phaser.Vec2Utils.cross(b, n); - var dt = Phaser.Vec2Utils.cross(circ.tc, n); - - if (dt > dta) - { - return this._circle2Circle(circ.tc, circ.radius, a, 0, contactArr); - } - else if (dt < dtb) - { - return this._circle2Circle(circ.tc, circ.radius, b, 0, contactArr); - } - - var c1: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.multiplyAdd(circ.tc, n, -(circ.radius + minDist * 0.5), c1); - - var c2: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.negative(n, c2); - - contactArr.push(new Contact(c1, c2, minDist, 0)); - - //contactArr.push(new Contact(vec2.mad(circ.tc, n, -(circ.r + minDist * 0.5)), vec2.neg(n), minDist, 0)); - - return 1; - - } - - public segmentPointDistanceSq(seg: Phaser.Physics.Shapes.Segment, p) { - - var w: Phaser.Vec2 = new Phaser.Vec2; - var d: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.subtract(p, seg.ta, w); - Phaser.Vec2Utils.subtract(seg.tb, seg.ta, d); - - //var w = vec2.sub(p, seg.ta); - //var d = vec2.sub(seg.tb, seg.ta); - - var proj = w.dot(d); - - if (proj <= 0) - { - return w.dot(w); - } - - var vsq = d.dot(d); - - if (proj >= vsq) - { - return w.dot(w) - 2 * proj + vsq; - } - - return w.dot(w) - proj * proj / vsq; - - } - - // FIXME and optimise me lots!!! - public segment2Segment(seg1: Phaser.Physics.Shapes.Segment, seg2: Phaser.Physics.Shapes.Segment, contactArr: Contact[]) { - - var d = []; - d[0] = this.segmentPointDistanceSq(seg1, seg2.ta); - d[1] = this.segmentPointDistanceSq(seg1, seg2.tb); - d[2] = this.segmentPointDistanceSq(seg2, seg1.ta); - d[3] = this.segmentPointDistanceSq(seg2, seg1.tb); - - var idx1 = d[0] < d[1] ? 0 : 1; - var idx2 = d[2] < d[3] ? 2 : 3; - var idxm = d[idx1] < d[idx2] ? idx1 : idx2; - var s, t; - - var u = Phaser.Vec2Utils.subtract(seg1.tb, seg1.ta); - var v = Phaser.Vec2Utils.subtract(seg2.tb, seg2.ta); - - switch (idxm) - { - case 0: - s = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg2.ta, seg1.ta), u) / Phaser.Vec2Utils.dot(u, u); - s = s < 0 ? 0 : (s > 1 ? 1 : s); - t = 0; - break; - case 1: - s = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg2.tb, seg1.ta), u) / Phaser.Vec2Utils.dot(u, u); - s = s < 0 ? 0 : (s > 1 ? 1 : s); - t = 1; - break; - case 2: - s = 0; - t = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg1.ta, seg2.ta), v) / Phaser.Vec2Utils.dot(v, v); - t = t < 0 ? 0 : (t > 1 ? 1 : t); - break; - case 3: - s = 1; - t = Phaser.Vec2Utils.dot(Phaser.Vec2Utils.subtract(seg1.tb, seg2.ta), v) / Phaser.Vec2Utils.dot(v, v); - t = t < 0 ? 0 : (t > 1 ? 1 : t); - break; - } - - var minp1 = Phaser.Vec2Utils.multiplyAdd(seg1.ta, u, s); - var minp2 = Phaser.Vec2Utils.multiplyAdd(seg2.ta, v, t); - - return this._circle2Circle(minp1, seg1.radius, minp2, seg2.radius, contactArr); - - } - - // Identify vertexes that have penetrated the segment. - public findPointsBehindSeg(contactArr: Contact[], seg: Phaser.Physics.Shapes.Segment, poly: Phaser.Physics.Shapes.Poly, dist: number, coef: number) { - - var dta = Phaser.Vec2Utils.cross(seg.tn, seg.ta); - var dtb = Phaser.Vec2Utils.cross(seg.tn, seg.tb); - - var n: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.scale(seg.tn, coef, n); - //var n = vec2.scale(seg.tn, coef); - - for (var i = 0; i < poly.verts.length; i++) - { - var v = poly.tverts[i]; - - if (Phaser.Vec2Utils.dot(v, n) < Phaser.Vec2Utils.dot(seg.tn, seg.ta) * coef + seg.radius) - { - var dt = Phaser.Vec2Utils.cross(seg.tn, v); - - if (dta >= dt && dt >= dtb) - { - contactArr.push(new Contact(v, n, dist, (poly.id << 16) | i)); - } - } - } - } - - public segment2Poly(seg: Phaser.Physics.Shapes.Segment, poly: Phaser.Physics.Shapes.Poly, contactArr: Contact[]) { - - var seg_td = Phaser.Vec2Utils.dot(seg.tn, seg.ta); - var seg_d1 = poly.distanceOnPlane(seg.tn, seg_td) - seg.radius; - - if (seg_d1 > 0) - { - return 0; - } - - var n: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.negative(seg.tn, n); - var seg_d2 = poly.distanceOnPlane(n, -seg_td) - seg.radius; - //var seg_d2 = poly.distanceOnPlane(vec2.neg(seg.tn), -seg_td) - seg.r; - - if (seg_d2 > 0) - { - return 0; - } - - var poly_d = -999999; - var poly_i = -1; - - for (var i = 0; i < poly.verts.length; i++) - { - var plane = poly.tplanes[i]; - var dist = seg.distanceOnPlane(plane.normal, plane.d); - - if (dist > 0) - { - return 0; - } - - if (dist > poly_d) - { - poly_d = dist; - poly_i = i; - } - } - - var poly_n: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.negative(poly.tplanes[poly_i].normal, poly_n); - //var poly_n = vec2.neg(poly.tplanes[poly_i].n); - - var va: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.multiplyAdd(seg.ta, poly_n, seg.radius, va); - //var va = vec2.mad(seg.ta, poly_n, seg.r); - - var vb: Phaser.Vec2 = new Phaser.Vec2; - Phaser.Vec2Utils.multiplyAdd(seg.tb, poly_n, seg.radius, vb); - //var vb = vec2.mad(seg.tb, poly_n, seg.r); - - if (poly.containPoint(va)) - { - contactArr.push(new Contact(va, poly_n, poly_d, (seg.id << 16) | 0)); - } - - if (poly.containPoint(vb)) - { - contactArr.push(new Contact(vb, poly_n, poly_d, (seg.id << 16) | 1)); - } - - // Floating point precision problems here. - // This will have to do for now. - poly_d -= 0.1 - - if (seg_d1 >= poly_d || seg_d2 >= poly_d) - { - if (seg_d1 > seg_d2) - { - this.findPointsBehindSeg(contactArr, seg, poly, seg_d1, 1); - } - else - { - this.findPointsBehindSeg(contactArr, seg, poly, seg_d2, -1); - } - } - - // If no other collision points are found, try colliding endpoints. - if (contactArr.length == 0) - { - var poly_a = poly.tverts[poly_i]; - var poly_b = poly.tverts[(poly_i + 1) % poly.verts.length]; - - if (this._circle2Circle(seg.ta, seg.radius, poly_a, 0, contactArr)) - { - return 1; - } - - if (this._circle2Circle(seg.tb, seg.radius, poly_a, 0, contactArr)) - { - return 1; - } - - if (this._circle2Circle(seg.ta, seg.radius, poly_b, 0, contactArr)) - { - return 1; - } - - if (this._circle2Circle(seg.tb, seg.radius, poly_b, 0, contactArr)) - { - return 1; - } - } - - return contactArr.length; - - } - - // Find the minimum separating axis for the given poly and plane list. - public findMSA(poly: Phaser.Physics.Shapes.Poly, planes: Phaser.Physics.Plane[], num: number) { - - var min_dist: number = -999999; - var min_index: number = -1; - - for (var i: number = 0; i < num; i++) - { - var dist: number = poly.distanceOnPlane(planes[i].normal, planes[i].d); - - if (dist > 0) - { - // no collision - return { dist: 0, index: -1 }; - } - else if (dist > min_dist) - { - min_dist = dist; - min_index = i; - } - } - - // new object - see what we can do here - return { dist: min_dist, index: min_index }; - - } - - public findVertsFallback(contactArr: Contact[], poly1: Phaser.Physics.Shapes.Poly, poly2: Phaser.Physics.Shapes.Poly, n, dist: number) { - - var num = 0; - - for (var i = 0; i < poly1.verts.length; i++) - { - var v = poly1.tverts[i]; - - if (poly2.containPointPartial(v, n)) - { - contactArr.push(new Contact(v, n, dist, (poly1.id << 16) | i)); - num++; - } - } - - for (var i = 0; i < poly2.verts.length; i++) - { - var v = poly2.tverts[i]; - - if (poly1.containPointPartial(v, n)) - { - contactArr.push(new Contact(v, n, dist, (poly2.id << 16) | i)); - num++; - } - } - - return num; - - } - - // Find the overlapped vertices. - public findVerts(contactArr: Contact[], poly1: Phaser.Physics.Shapes.Poly, poly2: Phaser.Physics.Shapes.Poly, n, dist: number) { - - var num = 0; - - for (var i = 0; i < poly1.verts.length; i++) - { - var v = poly1.tverts[i]; - - if (poly2.containPoint(v)) - { - contactArr.push(new Contact(v, n, dist, (poly1.id << 16) | i)); - num++; - } - } - - for (var i = 0; i < poly2.verts.length; i++) - { - var v = poly2.tverts[i]; - - if (poly1.containPoint(v)) - { - contactArr.push(new Contact(v, n, dist, (poly2.id << 16) | i)); - num++; - } - } - - return num > 0 ? num : this.findVertsFallback(contactArr, poly1, poly2, n, dist); - - } - - public poly2Poly(poly1: Phaser.Physics.Shapes.Poly, poly2: Phaser.Physics.Shapes.Poly, contactArr: Contact[]) { - - var msa1 = this.findMSA(poly2, poly1.tplanes, poly1.verts.length); - - if (msa1.index == -1) - { - console.log('poly2poly 0', msa1); - return 0; - } - - var msa2 = this.findMSA(poly1, poly2.tplanes, poly2.verts.length); - - if (msa2.index == -1) - { - console.log('poly2poly 1', msa2); - return 0; - } - - // Penetration normal direction should be from poly1 to poly2 - if (msa1.dist > msa2.dist) - { - return this.findVerts(contactArr, poly1, poly2, poly1.tplanes[msa1.index].normal, msa1.dist); - } - - return this.findVerts(contactArr, poly1, poly2, Phaser.Vec2Utils.negative(poly2.tplanes[msa2.index].normal), msa2.dist); - - } - - } - -} \ No newline at end of file diff --git a/wip/physics/Contact.js b/wip/physics/Contact.js deleted file mode 100644 index 61569c60..00000000 --- a/wip/physics/Contact.js +++ /dev/null @@ -1,32 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Contact - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Contact = (function () { - function Contact(p, n, d, hash) { - this.hash = hash; - this.point = p; - this.normal = n; - this.depth = d; - this.lambdaNormal = 0; - this.lambdaTangential = 0; - this.r1 = new Phaser.Vec2(); - this.r2 = new Phaser.Vec2(); - this.r1_local = new Phaser.Vec2(); - this.r2_local = new Phaser.Vec2(); - } - return Contact; - })(); - Physics.Contact = Contact; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Contact.ts b/wip/physics/Contact.ts deleted file mode 100644 index fe6f544f..00000000 --- a/wip/physics/Contact.ts +++ /dev/null @@ -1,62 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Contact -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Contact { - - constructor(p, n, d, hash) { - - this.hash = hash; - this.point = p; - this.normal = n; - this.depth = d; - this.lambdaNormal = 0; - this.lambdaTangential = 0; - - this.r1 = new Phaser.Vec2; - this.r2 = new Phaser.Vec2; - this.r1_local = new Phaser.Vec2; - this.r2_local = new Phaser.Vec2; - - } - - public hash; - - // Linear velocities at contact point - public r1: Phaser.Vec2; - public r2: Phaser.Vec2; - public r1_local: Phaser.Vec2; - public r2_local: Phaser.Vec2; - // Bounce velocity - public bounce: number; - public emn: number; - public emt: number; - - // Contact point - public point; - - // Contact normal (toward shape2) - public normal: Phaser.Vec2; - - // Penetration depth (d < 0) - public depth; - - // Accumulated normal constraint impulse - public lambdaNormal; - - // Accumulated tangential constraint impulse - public lambdaTangential; - - } - -} diff --git a/wip/physics/ContactSolver.js b/wip/physics/ContactSolver.js deleted file mode 100644 index 203a8740..00000000 --- a/wip/physics/ContactSolver.js +++ /dev/null @@ -1,269 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - ContactSolver - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - //------------------------------------------------------------------------------------------------- - // Contact Constraint - // - // Non-penetration constraint: - // C = dot(p2 - p1, n) - // Cdot = dot(v2 - v1, n) - // J = [ -n, -cross(r1, n), n, cross(r2, n) ] - // - // impulse = JT * lambda = [ -n * lambda, -cross(r1, n) * lambda, n * lambda, cross(r1, n) * lambda ] - // - // Friction constraint: - // C = dot(p2 - p1, t) - // Cdot = dot(v2 - v1, t) - // J = [ -t, -cross(r1, t), t, cross(r2, t) ] - // - // impulse = JT * lambda = [ -t * lambda, -cross(r1, t) * lambda, t * lambda, cross(r1, t) * lambda ] - // - // NOTE: lambda is an impulse in constraint space. - //------------------------------------------------------------------------------------------------- - (function (Physics) { - var ContactSolver = (function () { - function ContactSolver(shape1, shape2) { - this.shape1 = shape1; - this.shape2 = shape2; - this.contacts = []; - this.elasticity = 1; - this.friction = 1; - } - ContactSolver.prototype.update = function (newContactArr) { - for(var i = 0; i < newContactArr.length; i++) { - var newContact = newContactArr[i]; - var k = -1; - for(var j = 0; j < this.contacts.length; j++) { - if(newContact.hash == this.contacts[j].hash) { - k = j; - break; - } - } - if(k > -1) { - newContact.lambdaNormal = this.contacts[k].lambdaNormal; - newContact.lambdaTangential = this.contacts[k].lambdaTangential; - } - } - this.contacts = newContactArr; - }; - ContactSolver.prototype.initSolver = function (dt_inv) { - var body1 = this.shape1.body; - var body2 = this.shape2.body; - var sum_m_inv = body1.massInverted + body2.massInverted; - for(var i = 0; i < this.contacts.length; i++) { - var con = this.contacts[i]; - //console.log('initSolver con'); - //console.log(con); - // Transformed r1, r2 - Phaser.Vec2Utils.subtract(con.point, body1.position, con.r1); - Phaser.Vec2Utils.subtract(con.point, body2.position, con.r2); - //con.r1 = vec2.sub(con.point, body1.p); - //con.r2 = vec2.sub(con.point, body2.p); - // Local r1, r2 - Phaser.TransformUtils.unrotate(body1.transform, con.r1, con.r1_local); - Phaser.TransformUtils.unrotate(body2.transform, con.r2, con.r2_local); - //con.r1_local = body1.transform.unrotate(con.r1); - //con.r2_local = body2.transform.unrotate(con.r2); - var n = con.normal; - var t = Phaser.Vec2Utils.perp(con.normal); - // invEMn = J * invM * JT - // J = [ -n, -cross(r1, n), n, cross(r2, n) ] - var sn1 = Phaser.Vec2Utils.cross(con.r1, n); - var sn2 = Phaser.Vec2Utils.cross(con.r2, n); - var emn_inv = sum_m_inv + body1.inertiaInverted * sn1 * sn1 + body2.inertiaInverted * sn2 * sn2; - con.emn = emn_inv == 0 ? 0 : 1 / emn_inv; - // invEMt = J * invM * JT - // J = [ -t, -cross(r1, t), t, cross(r2, t) ] - var st1 = Phaser.Vec2Utils.cross(con.r1, t); - var st2 = Phaser.Vec2Utils.cross(con.r2, t); - var emt_inv = sum_m_inv + body1.inertiaInverted * st1 * st1 + body2.inertiaInverted * st2 * st2; - con.emt = emt_inv == 0 ? 0 : 1 / emt_inv; - // Linear velocities at contact point - // in 2D: cross(w, r) = perp(r) * w - var v1 = new Phaser.Vec2(); - var v2 = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(body1.velocity, Phaser.Vec2Utils.perp(con.r1), body1.angularVelocity, v1); - Phaser.Vec2Utils.multiplyAdd(body2.velocity, Phaser.Vec2Utils.perp(con.r2), body2.angularVelocity, v2); - //var v1 = vec2.mad(body1.v, vec2.perp(con.r1), body1.w); - //var v2 = vec2.mad(body2.v, vec2.perp(con.r2), body2.w); - // relative velocity at contact point - var rv = new Phaser.Vec2(); - Phaser.Vec2Utils.subtract(v2, v1, rv); - //var rv = vec2.sub(v2, v1); - // bounce velocity dot n - con.bounce = Phaser.Vec2Utils.dot(rv, con.normal) * this.elasticity; - } - }; - ContactSolver.prototype.warmStart = function () { - var body1 = this.shape1.body; - var body2 = this.shape2.body; - for(var i = 0; i < this.contacts.length; i++) { - var con = this.contacts[i]; - var n = con.normal; - var lambda_n = con.lambdaNormal; - var lambda_t = con.lambdaTangential; - // Apply accumulated impulses - //var impulse = vec2.rotate_vec(new vec2(lambda_n, lambda_t), n); - //var impulse = new vec2(lambda_n * n.x - lambda_t * n.y, lambda_t * n.x + lambda_n * n.y); - var impulse = new Phaser.Vec2(lambda_n * n.x - lambda_t * n.y, lambda_t * n.x + lambda_n * n.y); - //console.log('phaser warmStart impulse ' + i + ' = ' + impulse.toString()); - body1.velocity.multiplyAddByScalar(impulse, -body1.massInverted); - //body1.v.mad(impulse, -body1.m_inv); - body1.angularVelocity -= Phaser.Vec2Utils.cross(con.r1, impulse) * body1.inertiaInverted; - //body1.w -= vec2.cross(con.r1, impulse) * body1.i_inv; - body2.velocity.multiplyAddByScalar(impulse, body2.massInverted); - //body2.v.mad(impulse, body2.m_inv); - body2.angularVelocity += Phaser.Vec2Utils.cross(con.r2, impulse) * body2.inertiaInverted; - //body2.w += vec2.cross(con.r2, impulse) * body2.i_inv; - } - }; - ContactSolver.prototype.solveVelocityConstraints = function () { - var body1 = this.shape1.body; - var body2 = this.shape2.body; - Physics.AdvancedPhysics.write('solveVelocityConstraints. Body1: ' + body1.name + ' Body2: ' + body2.name); - Physics.AdvancedPhysics.write('Shape 1: ' + this.shape1.type + ' Shape 2: ' + this.shape2.type); - var m1_inv = body1.massInverted; - var i1_inv = body1.inertiaInverted; - var m2_inv = body2.massInverted; - var i2_inv = body2.inertiaInverted; - Physics.AdvancedPhysics.write('m1_inv: ' + m1_inv); - Physics.AdvancedPhysics.write('i1_inv: ' + i1_inv); - Physics.AdvancedPhysics.write('m2_inv: ' + m2_inv); - Physics.AdvancedPhysics.write('i2_inv: ' + i2_inv); - for(var i = 0; i < this.contacts.length; i++) { - Physics.AdvancedPhysics.write('------------ solve con ' + i); - var con = this.contacts[i]; - var n = con.normal; - var t = Phaser.Vec2Utils.perp(n); - var r1 = con.r1; - var r2 = con.r2; - // Linear velocities at contact point - // in 2D: cross(w, r) = perp(r) * w - var v1 = new Phaser.Vec2(); - var v2 = new Phaser.Vec2(); - Phaser.Vec2Utils.multiplyAdd(body1.velocity, Phaser.Vec2Utils.perp(r1), body1.angularVelocity, v1); - //var v1 = vec2.mad(body1.v, vec2.perp(r1), body1.w); - Physics.AdvancedPhysics.write('v1 ' + v1.toString()); - Phaser.Vec2Utils.multiplyAdd(body2.velocity, Phaser.Vec2Utils.perp(r2), body2.angularVelocity, v2); - //var v2 = vec2.mad(body2.v, vec2.perp(r2), body2.w); - Physics.AdvancedPhysics.write('v2 ' + v2.toString()); - // Relative velocity at contact point - var rv = new Phaser.Vec2(); - Phaser.Vec2Utils.subtract(v2, v1, rv); - //var rv = vec2.sub(v2, v1); - Physics.AdvancedPhysics.write('rv ' + rv.toString()); - // Compute normal constraint impulse + adding bounce as a velocity bias - // lambda_n = -EMn * J * V - var lambda_n = -con.emn * (Phaser.Vec2Utils.dot(n, rv) + con.bounce); - Physics.AdvancedPhysics.write('lambda_n: ' + lambda_n); - // Accumulate and clamp - var lambda_n_old = con.lambdaNormal; - con.lambdaNormal = Math.max(lambda_n_old + lambda_n, 0); - //con.lambdaNormal = this.clamp(lambda_n_old + lambda_n, 0); - lambda_n = con.lambdaNormal - lambda_n_old; - Physics.AdvancedPhysics.write('lambda_n clamped: ' + lambda_n); - // Compute frictional constraint impulse - // lambda_t = -EMt * J * V - var lambda_t = -con.emt * Phaser.Vec2Utils.dot(t, rv); - // Max friction constraint impulse (Coulomb's Law) - var lambda_t_max = con.lambdaNormal * this.friction; - // Accumulate and clamp - var lambda_t_old = con.lambdaTangential; - con.lambdaTangential = this.clamp(lambda_t_old + lambda_t, -lambda_t_max, lambda_t_max); - lambda_t = con.lambdaTangential - lambda_t_old; - // Apply the final impulses - //var impulse = vec2.rotate_vec(new vec2(lambda_n, lambda_t), n); - var impulse = new Phaser.Vec2(lambda_n * n.x - lambda_t * n.y, lambda_t * n.x + lambda_n * n.y); - Physics.AdvancedPhysics.write('impulse: ' + impulse.toString()); - body1.velocity.multiplyAddByScalar(impulse, -m1_inv); - //body1.v.mad(impulse, -m1_inv); - body1.angularVelocity -= Phaser.Vec2Utils.cross(r1, impulse) * i1_inv; - //body1.w -= vec2.cross(r1, impulse) * i1_inv; - body2.velocity.multiplyAddByScalar(impulse, m2_inv); - //body2.v.mad(impulse, m2_inv); - body2.angularVelocity += Phaser.Vec2Utils.cross(r2, impulse) * i2_inv; - //body2.w += vec2.cross(r2, impulse) * i2_inv; - Physics.AdvancedPhysics.write('body1: ' + body1.toString()); - Physics.AdvancedPhysics.write('body2: ' + body2.toString()); - } - }; - ContactSolver.prototype.solvePositionConstraints = function () { - var body1 = this.shape1.body; - var body2 = this.shape2.body; - Physics.AdvancedPhysics.write('solvePositionConstraints'); - var m1_inv = body1.massInverted; - var i1_inv = body1.inertiaInverted; - var m2_inv = body2.massInverted; - var i2_inv = body2.inertiaInverted; - var sum_m_inv = m1_inv + m2_inv; - var max_penetration = 0; - for(var i = 0; i < this.contacts.length; i++) { - Physics.AdvancedPhysics.write('------------- solvePositionConstraints ' + i); - var con = this.contacts[i]; - var n = con.normal; - var r1 = new Phaser.Vec2(); - var r2 = new Phaser.Vec2(); - // Transformed r1, r2 - Phaser.Vec2Utils.rotate(con.r1_local, body1.angle, r1); - Phaser.Vec2Utils.rotate(con.r2_local, body2.angle, r2); - Physics.AdvancedPhysics.write('r1_local.x = ' + con.r1_local.x + ' r1_local.y = ' + con.r1_local.y + ' angle: ' + body1.angle); - Physics.AdvancedPhysics.write('r1 rotated: r1.x = ' + r1.x + ' r1.y = ' + r1.y); - Physics.AdvancedPhysics.write('r2_local.x = ' + con.r2_local.x + ' r2_local.y = ' + con.r2_local.y + ' angle: ' + body2.angle); - Physics.AdvancedPhysics.write('r2 rotated: r2.x = ' + r2.x + ' r2.y = ' + r2.y); - // Contact points (corrected) - var p1 = new Phaser.Vec2(); - var p2 = new Phaser.Vec2(); - Phaser.Vec2Utils.add(body1.position, r1, p1); - Phaser.Vec2Utils.add(body2.position, r2, p2); - Physics.AdvancedPhysics.write('body1.pos.x=' + body1.position.x + ' y=' + body1.position.y); - Physics.AdvancedPhysics.write('body2.pos.x=' + body2.position.x + ' y=' + body2.position.y); - // Corrected delta vector - var dp = new Phaser.Vec2(); - Phaser.Vec2Utils.subtract(p2, p1, dp); - // Position constraint - var c = Phaser.Vec2Utils.dot(dp, n) + con.depth; - var correction = this.clamp(Physics.AdvancedPhysics.CONTACT_SOLVER_BAUMGARTE * (c + Physics.AdvancedPhysics.CONTACT_SOLVER_COLLISION_SLOP), -Physics.AdvancedPhysics.CONTACT_SOLVER_MAX_LINEAR_CORRECTION, 0); - if(correction == 0) { - continue; - } - // We don't need max_penetration less than or equal slop - max_penetration = Math.max(max_penetration, -c); - // Compute lambda for position constraint - // Solve (J * invM * JT) * lambda = -C / dt - var sn1 = Phaser.Vec2Utils.cross(r1, n); - var sn2 = Phaser.Vec2Utils.cross(r2, n); - var em_inv = sum_m_inv + body1.inertiaInverted * sn1 * sn1 + body2.inertiaInverted * sn2 * sn2; - var lambda_dt = em_inv == 0 ? 0 : -correction / em_inv; - // Apply correction impulses - var impulse_dt = new Phaser.Vec2(); - Phaser.Vec2Utils.scale(n, lambda_dt, impulse_dt); - body1.position.multiplyAddByScalar(impulse_dt, -m1_inv); - body1.angle -= sn1 * lambda_dt * i1_inv; - body2.position.multiplyAddByScalar(impulse_dt, m2_inv); - body2.angle += sn2 * lambda_dt * i2_inv; - Physics.AdvancedPhysics.write('body1.pos.x=' + body1.position.x + ' y=' + body1.position.y); - Physics.AdvancedPhysics.write('body2.pos.x=' + body2.position.x + ' y=' + body2.position.y); - } - Physics.AdvancedPhysics.write('max_penetration: ' + max_penetration); - return max_penetration <= Physics.AdvancedPhysics.CONTACT_SOLVER_COLLISION_SLOP * 3; - }; - ContactSolver.prototype.clamp = function (v, min, max) { - return v < min ? min : (v > max ? max : v); - }; - return ContactSolver; - })(); - Physics.ContactSolver = ContactSolver; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/ContactSolver.ts b/wip/physics/ContactSolver.ts deleted file mode 100644 index 675e8b6b..00000000 --- a/wip/physics/ContactSolver.ts +++ /dev/null @@ -1,386 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - ContactSolver -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -//------------------------------------------------------------------------------------------------- -// Contact Constraint -// -// Non-penetration constraint: -// C = dot(p2 - p1, n) -// Cdot = dot(v2 - v1, n) -// J = [ -n, -cross(r1, n), n, cross(r2, n) ] -// -// impulse = JT * lambda = [ -n * lambda, -cross(r1, n) * lambda, n * lambda, cross(r1, n) * lambda ] -// -// Friction constraint: -// C = dot(p2 - p1, t) -// Cdot = dot(v2 - v1, t) -// J = [ -t, -cross(r1, t), t, cross(r2, t) ] -// -// impulse = JT * lambda = [ -t * lambda, -cross(r1, t) * lambda, t * lambda, cross(r1, t) * lambda ] -// -// NOTE: lambda is an impulse in constraint space. -//------------------------------------------------------------------------------------------------- - -module Phaser.Physics { - - export class ContactSolver { - - constructor(shape1, shape2) { - - this.shape1 = shape1; - this.shape2 = shape2; - - this.contacts = []; - this.elasticity = 1; - this.friction = 1; - - } - - public shape1; - public shape2; - - // Contact list - public contacts: Contact[]; - - // Coefficient of restitution (elasticity) - public elasticity: number; - - // Frictional coefficient - public friction: number; - - public update(newContactArr: Contact[]) { - - for (var i = 0; i < newContactArr.length; i++) - { - var newContact = newContactArr[i]; - var k = -1; - - for (var j = 0; j < this.contacts.length; j++) - { - if (newContact.hash == this.contacts[j].hash) - { - k = j; - break; - } - } - - if (k > -1) - { - newContact.lambdaNormal = this.contacts[k].lambdaNormal; - newContact.lambdaTangential = this.contacts[k].lambdaTangential; - } - } - - this.contacts = newContactArr; - - } - - public initSolver(dt_inv) { - - var body1: Body = this.shape1.body; - var body2: Body = this.shape2.body; - - var sum_m_inv = body1.massInverted + body2.massInverted; - - for (var i = 0; i < this.contacts.length; i++) - { - var con: Contact = this.contacts[i]; - - //console.log('initSolver con'); - //console.log(con); - - // Transformed r1, r2 - Phaser.Vec2Utils.subtract(con.point, body1.position, con.r1); - Phaser.Vec2Utils.subtract(con.point, body2.position, con.r2); - //con.r1 = vec2.sub(con.point, body1.p); - //con.r2 = vec2.sub(con.point, body2.p); - - // Local r1, r2 - Phaser.TransformUtils.unrotate(body1.transform, con.r1, con.r1_local); - Phaser.TransformUtils.unrotate(body2.transform, con.r2, con.r2_local); - //con.r1_local = body1.transform.unrotate(con.r1); - //con.r2_local = body2.transform.unrotate(con.r2); - - var n = con.normal; - var t = Phaser.Vec2Utils.perp(con.normal); - - // invEMn = J * invM * JT - // J = [ -n, -cross(r1, n), n, cross(r2, n) ] - var sn1 = Phaser.Vec2Utils.cross(con.r1, n); - var sn2 = Phaser.Vec2Utils.cross(con.r2, n); - var emn_inv = sum_m_inv + body1.inertiaInverted * sn1 * sn1 + body2.inertiaInverted * sn2 * sn2; - con.emn = emn_inv == 0 ? 0 : 1 / emn_inv; - - // invEMt = J * invM * JT - // J = [ -t, -cross(r1, t), t, cross(r2, t) ] - var st1 = Phaser.Vec2Utils.cross(con.r1, t); - var st2 = Phaser.Vec2Utils.cross(con.r2, t); - var emt_inv = sum_m_inv + body1.inertiaInverted * st1 * st1 + body2.inertiaInverted * st2 * st2; - con.emt = emt_inv == 0 ? 0 : 1 / emt_inv; - - // Linear velocities at contact point - // in 2D: cross(w, r) = perp(r) * w - - var v1 = new Phaser.Vec2; - var v2 = new Phaser.Vec2; - - Phaser.Vec2Utils.multiplyAdd(body1.velocity, Phaser.Vec2Utils.perp(con.r1), body1.angularVelocity, v1); - Phaser.Vec2Utils.multiplyAdd(body2.velocity, Phaser.Vec2Utils.perp(con.r2), body2.angularVelocity, v2); - //var v1 = vec2.mad(body1.v, vec2.perp(con.r1), body1.w); - //var v2 = vec2.mad(body2.v, vec2.perp(con.r2), body2.w); - - // relative velocity at contact point - var rv = new Phaser.Vec2; - Phaser.Vec2Utils.subtract(v2, v1, rv); - //var rv = vec2.sub(v2, v1); - - // bounce velocity dot n - con.bounce = Phaser.Vec2Utils.dot(rv, con.normal) * this.elasticity; - - } - } - - public warmStart() { - - var body1: Body = this.shape1.body; - var body2: Body = this.shape2.body; - - for (var i = 0; i < this.contacts.length; i++) - { - var con:Contact = this.contacts[i]; - var n = con.normal; - var lambda_n = con.lambdaNormal; - var lambda_t = con.lambdaTangential; - - // Apply accumulated impulses - //var impulse = vec2.rotate_vec(new vec2(lambda_n, lambda_t), n); - //var impulse = new vec2(lambda_n * n.x - lambda_t * n.y, lambda_t * n.x + lambda_n * n.y); - var impulse = new Phaser.Vec2(lambda_n * n.x - lambda_t * n.y, lambda_t * n.x + lambda_n * n.y); - - //console.log('phaser warmStart impulse ' + i + ' = ' + impulse.toString()); - - body1.velocity.multiplyAddByScalar(impulse, -body1.massInverted); - //body1.v.mad(impulse, -body1.m_inv); - - body1.angularVelocity -= Phaser.Vec2Utils.cross(con.r1, impulse) * body1.inertiaInverted; - //body1.w -= vec2.cross(con.r1, impulse) * body1.i_inv; - - body2.velocity.multiplyAddByScalar(impulse, body2.massInverted); - //body2.v.mad(impulse, body2.m_inv); - - body2.angularVelocity += Phaser.Vec2Utils.cross(con.r2, impulse) * body2.inertiaInverted; - //body2.w += vec2.cross(con.r2, impulse) * body2.i_inv; - } - - } - - public solveVelocityConstraints() { - - var body1: Body = this.shape1.body; - var body2: Body = this.shape2.body; - - AdvancedPhysics.write('solveVelocityConstraints. Body1: ' + body1.name + ' Body2: ' + body2.name); - AdvancedPhysics.write('Shape 1: ' + this.shape1.type + ' Shape 2: ' + this.shape2.type); - - var m1_inv = body1.massInverted; - var i1_inv = body1.inertiaInverted; - var m2_inv = body2.massInverted; - var i2_inv = body2.inertiaInverted; - - AdvancedPhysics.write('m1_inv: ' + m1_inv); - AdvancedPhysics.write('i1_inv: ' + i1_inv); - AdvancedPhysics.write('m2_inv: ' + m2_inv); - AdvancedPhysics.write('i2_inv: ' + i2_inv); - - for (var i = 0; i < this.contacts.length; i++) - { - AdvancedPhysics.write('------------ solve con ' + i); - - var con: Contact = this.contacts[i]; - var n: Phaser.Vec2 = con.normal; - var t = Phaser.Vec2Utils.perp(n); - var r1 = con.r1; - var r2 = con.r2; - - // Linear velocities at contact point - // in 2D: cross(w, r) = perp(r) * w - - var v1 = new Phaser.Vec2; - var v2 = new Phaser.Vec2; - - Phaser.Vec2Utils.multiplyAdd(body1.velocity, Phaser.Vec2Utils.perp(r1), body1.angularVelocity, v1); - //var v1 = vec2.mad(body1.v, vec2.perp(r1), body1.w); - - AdvancedPhysics.write('v1 ' + v1.toString()); - - Phaser.Vec2Utils.multiplyAdd(body2.velocity, Phaser.Vec2Utils.perp(r2), body2.angularVelocity, v2); - //var v2 = vec2.mad(body2.v, vec2.perp(r2), body2.w); - - AdvancedPhysics.write('v2 ' + v2.toString()); - - // Relative velocity at contact point - var rv = new Phaser.Vec2; - Phaser.Vec2Utils.subtract(v2, v1, rv); - //var rv = vec2.sub(v2, v1); - - AdvancedPhysics.write('rv ' + rv.toString()); - - // Compute normal constraint impulse + adding bounce as a velocity bias - // lambda_n = -EMn * J * V - var lambda_n = -con.emn * (Phaser.Vec2Utils.dot(n, rv) + con.bounce); - - AdvancedPhysics.write('lambda_n: ' + lambda_n); - - // Accumulate and clamp - var lambda_n_old = con.lambdaNormal; - con.lambdaNormal = Math.max(lambda_n_old + lambda_n, 0); - //con.lambdaNormal = this.clamp(lambda_n_old + lambda_n, 0); - lambda_n = con.lambdaNormal - lambda_n_old; - - AdvancedPhysics.write('lambda_n clamped: ' + lambda_n); - - // Compute frictional constraint impulse - // lambda_t = -EMt * J * V - var lambda_t = -con.emt * Phaser.Vec2Utils.dot(t, rv); - - // Max friction constraint impulse (Coulomb's Law) - var lambda_t_max = con.lambdaNormal * this.friction; - - // Accumulate and clamp - var lambda_t_old = con.lambdaTangential; - con.lambdaTangential = this.clamp(lambda_t_old + lambda_t, -lambda_t_max, lambda_t_max); - lambda_t = con.lambdaTangential - lambda_t_old; - - // Apply the final impulses - //var impulse = vec2.rotate_vec(new vec2(lambda_n, lambda_t), n); - var impulse = new Phaser.Vec2(lambda_n * n.x - lambda_t * n.y, lambda_t * n.x + lambda_n * n.y); - - AdvancedPhysics.write('impulse: ' + impulse.toString()); - - body1.velocity.multiplyAddByScalar(impulse, -m1_inv); - //body1.v.mad(impulse, -m1_inv); - - body1.angularVelocity -= Phaser.Vec2Utils.cross(r1, impulse) * i1_inv; - //body1.w -= vec2.cross(r1, impulse) * i1_inv; - - body2.velocity.multiplyAddByScalar(impulse, m2_inv); - //body2.v.mad(impulse, m2_inv); - - body2.angularVelocity += Phaser.Vec2Utils.cross(r2, impulse) * i2_inv; - //body2.w += vec2.cross(r2, impulse) * i2_inv; - - AdvancedPhysics.write('body1: ' + body1.toString()); - AdvancedPhysics.write('body2: ' + body2.toString()); - - } - - } - - public solvePositionConstraints() { - - var body1: Body = this.shape1.body; - var body2: Body = this.shape2.body; - - AdvancedPhysics.write('solvePositionConstraints'); - - var m1_inv = body1.massInverted; - var i1_inv = body1.inertiaInverted; - var m2_inv = body2.massInverted; - var i2_inv = body2.inertiaInverted; - var sum_m_inv = m1_inv + m2_inv; - - var max_penetration = 0; - - for (var i = 0; i < this.contacts.length; i++) - { - AdvancedPhysics.write('------------- solvePositionConstraints ' + i); - - var con:Contact = this.contacts[i]; - var n:Phaser.Vec2 = con.normal; - - var r1 = new Phaser.Vec2; - var r2 = new Phaser.Vec2; - - // Transformed r1, r2 - Phaser.Vec2Utils.rotate(con.r1_local, body1.angle, r1); - Phaser.Vec2Utils.rotate(con.r2_local, body2.angle, r2); - - AdvancedPhysics.write('r1_local.x = ' + con.r1_local.x + ' r1_local.y = ' + con.r1_local.y + ' angle: ' + body1.angle); - AdvancedPhysics.write('r1 rotated: r1.x = ' + r1.x + ' r1.y = ' + r1.y); - AdvancedPhysics.write('r2_local.x = ' + con.r2_local.x + ' r2_local.y = ' + con.r2_local.y + ' angle: ' + body2.angle); - AdvancedPhysics.write('r2 rotated: r2.x = ' + r2.x + ' r2.y = ' + r2.y); - - // Contact points (corrected) - var p1 = new Phaser.Vec2; - var p2 = new Phaser.Vec2; - - Phaser.Vec2Utils.add(body1.position, r1, p1); - Phaser.Vec2Utils.add(body2.position, r2, p2); - - AdvancedPhysics.write('body1.pos.x=' + body1.position.x + ' y=' + body1.position.y); - AdvancedPhysics.write('body2.pos.x=' + body2.position.x + ' y=' + body2.position.y); - - // Corrected delta vector - var dp = new Phaser.Vec2; - Phaser.Vec2Utils.subtract(p2, p1, dp); - - // Position constraint - var c = Phaser.Vec2Utils.dot(dp, n) + con.depth; - - var correction = this.clamp(AdvancedPhysics.CONTACT_SOLVER_BAUMGARTE * (c + AdvancedPhysics.CONTACT_SOLVER_COLLISION_SLOP), -AdvancedPhysics.CONTACT_SOLVER_MAX_LINEAR_CORRECTION, 0); - - if (correction == 0) - { - continue; - } - - // We don't need max_penetration less than or equal slop - max_penetration = Math.max(max_penetration, -c); - - // Compute lambda for position constraint - // Solve (J * invM * JT) * lambda = -C / dt - var sn1 = Phaser.Vec2Utils.cross(r1, n); - var sn2 = Phaser.Vec2Utils.cross(r2, n); - - var em_inv = sum_m_inv + body1.inertiaInverted * sn1 * sn1 + body2.inertiaInverted * sn2 * sn2; - - var lambda_dt = em_inv == 0 ? 0 : -correction / em_inv; - - // Apply correction impulses - var impulse_dt = new Phaser.Vec2; - Phaser.Vec2Utils.scale(n, lambda_dt, impulse_dt); - - body1.position.multiplyAddByScalar(impulse_dt, -m1_inv); - body1.angle -= sn1 * lambda_dt * i1_inv; - - body2.position.multiplyAddByScalar(impulse_dt, m2_inv); - body2.angle += sn2 * lambda_dt * i2_inv; - - AdvancedPhysics.write('body1.pos.x=' + body1.position.x + ' y=' + body1.position.y); - AdvancedPhysics.write('body2.pos.x=' + body2.position.x + ' y=' + body2.position.y); - } - - AdvancedPhysics.write('max_penetration: ' + max_penetration); - - return max_penetration <= AdvancedPhysics.CONTACT_SOLVER_COLLISION_SLOP * 3; - - } - - public clamp(v, min, max) { - return v < min ? min : (v > max ? max : v); - } - - } - -} diff --git a/wip/physics/Manager.js b/wip/physics/Manager.js deleted file mode 100644 index 517e40c6..00000000 --- a/wip/physics/Manager.js +++ /dev/null @@ -1,67 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /** - * Phaser - Physics Manager - * - * The Physics Manager is responsible for looking after, creating and colliding - * all of the physics bodies and joints in the world. - */ - (function (Physics) { - var Manager = (function () { - function Manager(game) { - this.game = game; - } - Manager.clear = function clear() { - //Manager.debug.textContent = ""; - Manager.log = []; - }; - Manager.write = function write(s) { - //Manager.debug.textContent += s + "\n"; - }; - Manager.writeAll = function writeAll() { - for(var i = 0; i < Manager.log.length; i++) { - //Manager.debug.textContent += Manager.log[i]; - } - }; - Manager.log = []; - Manager.dump = function dump(phase, body) { - /* - var s = "\n\nPhase: " + phase + "\n"; - s += "Position: " + body.position.toString() + "\n"; - s += "Velocity: " + body.velocity.toString() + "\n"; - s += "Angle: " + body.angle + "\n"; - s += "Force: " + body.force.toString() + "\n"; - s += "Torque: " + body.torque + "\n"; - s += "Bounds: " + body.bounds.toString() + "\n"; - s += "Shape ***\n"; - s += "Vert 0: " + body.shapes[0].verts[0].toString() + "\n"; - s += "Vert 1: " + body.shapes[0].verts[1].toString() + "\n"; - s += "Vert 2: " + body.shapes[0].verts[2].toString() + "\n"; - s += "Vert 3: " + body.shapes[0].verts[3].toString() + "\n"; - s += "TVert 0: " + body.shapes[0].tverts[0].toString() + "\n"; - s += "TVert 1: " + body.shapes[0].tverts[1].toString() + "\n"; - s += "TVert 2: " + body.shapes[0].tverts[2].toString() + "\n"; - s += "TVert 3: " + body.shapes[0].tverts[3].toString() + "\n"; - s += "Plane 0: " + body.shapes[0].planes[0].normal.toString() + "\n"; - s += "Plane 1: " + body.shapes[0].planes[1].normal.toString() + "\n"; - s += "Plane 2: " + body.shapes[0].planes[2].normal.toString() + "\n"; - s += "Plane 3: " + body.shapes[0].planes[3].normal.toString() + "\n"; - s += "TPlane 0: " + body.shapes[0].tplanes[0].normal.toString() + "\n"; - s += "TPlane 1: " + body.shapes[0].tplanes[1].normal.toString() + "\n"; - s += "TPlane 2: " + body.shapes[0].tplanes[2].normal.toString() + "\n"; - s += "TPlane 3: " + body.shapes[0].tplanes[3].normal.toString() + "\n"; - - Manager.log.push(s); - */ - }; - Manager.prototype.update = function () { - }; - return Manager; - })(); - Physics.Manager = Manager; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Manager.ts b/wip/physics/Manager.ts deleted file mode 100644 index 519e3cd8..00000000 --- a/wip/physics/Manager.ts +++ /dev/null @@ -1,86 +0,0 @@ -/// -/// -/// - -/** -* Phaser - Physics Manager -* -* The Physics Manager is responsible for looking after, creating and colliding -* all of the physics bodies and joints in the world. -*/ - -module Phaser.Physics { - - export class Manager { - - constructor(game: Game) { - this.game = game; - } - - /** - * Local reference to Game. - */ - public game: Game; - - public static debug: HTMLTextAreaElement; - - public static clear() { - //Manager.debug.textContent = ""; - Manager.log = []; - } - - public static write(s: string) { - //Manager.debug.textContent += s + "\n"; - } - - public static writeAll() { - - for (var i = 0; i < Manager.log.length; i++) - { - //Manager.debug.textContent += Manager.log[i]; - } - - } - - public static log = []; - - public static dump(phase: string, body: Body) { - - /* - var s = "\n\nPhase: " + phase + "\n"; - s += "Position: " + body.position.toString() + "\n"; - s += "Velocity: " + body.velocity.toString() + "\n"; - s += "Angle: " + body.angle + "\n"; - s += "Force: " + body.force.toString() + "\n"; - s += "Torque: " + body.torque + "\n"; - s += "Bounds: " + body.bounds.toString() + "\n"; - s += "Shape ***\n"; - s += "Vert 0: " + body.shapes[0].verts[0].toString() + "\n"; - s += "Vert 1: " + body.shapes[0].verts[1].toString() + "\n"; - s += "Vert 2: " + body.shapes[0].verts[2].toString() + "\n"; - s += "Vert 3: " + body.shapes[0].verts[3].toString() + "\n"; - s += "TVert 0: " + body.shapes[0].tverts[0].toString() + "\n"; - s += "TVert 1: " + body.shapes[0].tverts[1].toString() + "\n"; - s += "TVert 2: " + body.shapes[0].tverts[2].toString() + "\n"; - s += "TVert 3: " + body.shapes[0].tverts[3].toString() + "\n"; - s += "Plane 0: " + body.shapes[0].planes[0].normal.toString() + "\n"; - s += "Plane 1: " + body.shapes[0].planes[1].normal.toString() + "\n"; - s += "Plane 2: " + body.shapes[0].planes[2].normal.toString() + "\n"; - s += "Plane 3: " + body.shapes[0].planes[3].normal.toString() + "\n"; - s += "TPlane 0: " + body.shapes[0].tplanes[0].normal.toString() + "\n"; - s += "TPlane 1: " + body.shapes[0].tplanes[1].normal.toString() + "\n"; - s += "TPlane 2: " + body.shapes[0].tplanes[2].normal.toString() + "\n"; - s += "TPlane 3: " + body.shapes[0].tplanes[3].normal.toString() + "\n"; - - Manager.log.push(s); - */ - - } - - public update() { - - } - - } - -} \ No newline at end of file diff --git a/wip/physics/Plane.js b/wip/physics/Plane.js deleted file mode 100644 index 3e73d78b..00000000 --- a/wip/physics/Plane.js +++ /dev/null @@ -1,23 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Plane - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Plane = (function () { - function Plane(normal, d) { - this.normal = normal; - this.d = d; - } - return Plane; - })(); - Physics.Plane = Plane; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Plane.ts b/wip/physics/Plane.ts deleted file mode 100644 index f8fd4836..00000000 --- a/wip/physics/Plane.ts +++ /dev/null @@ -1,28 +0,0 @@ -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Plane -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Plane { - - constructor(normal: Phaser.Vec2, d: number) { - - this.normal = normal; - this.d = d; - - } - - public normal: Phaser.Vec2; - public d: number; - - } - -} diff --git a/wip/physics/Space.js b/wip/physics/Space.js deleted file mode 100644 index 0021e9e8..00000000 --- a/wip/physics/Space.js +++ /dev/null @@ -1,500 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Space - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Space = (function () { - function Space(manager) { - this.postSolve = null; - this.stepCount = 0; - this._manager = manager; - this.bodies = []; - this.bodyHash = { - }; - this.joints = []; - this.jointHash = { - }; - this.numContacts = 0; - this.contactSolvers = []; - this.gravity = this._manager.gravity; - this.damping = 0; - this._linTolSqr = Space.SLEEP_LINEAR_TOLERANCE * Space.SLEEP_LINEAR_TOLERANCE; - this._angTolSqr = Space.SLEEP_ANGULAR_TOLERANCE * Space.SLEEP_ANGULAR_TOLERANCE; - } - Space.TIME_TO_SLEEP = 0.5; - Space.SLEEP_LINEAR_TOLERANCE = 0.5; - Space.SLEEP_ANGULAR_TOLERANCE = 2 * 0.017453292519943294444444444444444; - Space.prototype.clear = function () { - Physics.AdvancedPhysics.shapeCounter = 0; - Physics.AdvancedPhysics.bodyCounter = 0; - Physics.AdvancedPhysics.jointCounter = 0; - for(var i = 0; i < this.bodies.length; i++) { - if(this.bodies[i]) { - this.removeBody(this.bodies[i]); - } - } - this.bodies = []; - this.bodyHash = { - }; - this.joints = []; - this.jointHash = { - }; - this.contactSolvers = []; - this.stepCount = 0; - }; - Space.prototype.addBody = function (body) { - if(this.bodyHash[body.id] != undefined) { - return; - } - var index = this.bodies.push(body) - 1; - this.bodyHash[body.id] = index; - body.awake(true); - body.space = this; - body.cacheData('addBody'); - }; - Space.prototype.removeBody = function (body) { - if(this.bodyHash[body.id] == undefined) { - return; - } - // Remove linked joints - for(var i = 0; i < body.joints.length; i++) { - if(body.joints[i]) { - this.removeJoint(body.joints[i]); - } - } - body.space = null; - var index = this.bodyHash[body.id]; - delete this.bodyHash[body.id]; - delete this.bodies[index]; - }; - Space.prototype.addJoint = function (joint) { - if(this.jointHash[joint.id] != undefined) { - return; - } - joint.body1.awake(true); - joint.body2.awake(true); - var index = this.joints.push(joint) - 1; - this.jointHash[joint.id] = index; - var index = joint.body1.joints.push(joint) - 1; - joint.body1.jointHash[joint.id] = index; - var index = joint.body2.joints.push(joint) - 1; - joint.body2.jointHash[joint.id] = index; - }; - Space.prototype.removeJoint = function (joint) { - if(this.jointHash[joint.id] == undefined) { - return; - } - joint.body1.awake(true); - joint.body2.awake(true); - var index = joint.body1.jointHash[joint.id]; - delete joint.body1.jointHash[joint.id]; - delete joint.body1.joints[index]; - var index = joint.body2.jointHash[joint.id]; - delete joint.body2.jointHash[joint.id]; - delete joint.body2.joints[index]; - var index = this.jointHash[joint.id]; - delete this.jointHash[joint.id]; - delete this.joints[index]; - }; - Space.prototype.findShapeByPoint = function (p, refShape) { - var firstShape; - for(var i = 0; i < this.bodies.length; i++) { - var body = this.bodies[i]; - if(!body) { - continue; - } - for(var j = 0; j < body.shapes.length; j++) { - var shape = body.shapes[j]; - if(shape.pointQuery(p)) { - if(!refShape) { - return shape; - } - if(!firstShape) { - firstShape = shape; - } - if(shape == refShape) { - refShape = null; - } - } - } - } - return firstShape; - }; - Space.prototype.findBodyByPoint = function (p, refBody) { - var firstBody; - for(var i = 0; i < this.bodies.length; i++) { - var body = this.bodies[i]; - if(!body) { - continue; - } - for(var j = 0; j < body.shapes.length; j++) { - var shape = body.shapes[j]; - if(shape.pointQuery(p)) { - if(!refBody) { - return shape.body; - } - if(!firstBody) { - firstBody = shape.body; - } - if(shape.body == refBody) { - refBody = null; - } - break; - } - } - } - return firstBody; - }; - Space.prototype.shapeById = function (id) { - var shape; - for(var i = 0; i < this.bodies.length; i++) { - var body = this.bodies[i]; - if(!body) { - continue; - } - for(var j = 0; j < body.shapes.length; j++) { - if(body.shapes[j].id == id) { - return body.shapes[j]; - } - } - } - return null; - }; - Space.prototype.jointById = function (id) { - var index = this.jointHash[id]; - if(index != undefined) { - return this.joints[index]; - } - return null; - }; - Space.prototype.findVertexByPoint = function (p, minDist, refVertexId) { - var firstVertexId = -1; - refVertexId = refVertexId || -1; - for(var i = 0; i < this.bodies.length; i++) { - var body = this.bodies[i]; - if(!body) { - continue; - } - for(var j = 0; j < body.shapes.length; j++) { - var shape = body.shapes[j]; - var index = shape.findVertexByPoint(p, minDist); - if(index != -1) { - var vertex = (shape.id << 16) | index; - if(refVertexId == -1) { - return vertex; - } - if(firstVertexId == -1) { - firstVertexId = vertex; - } - if(vertex == refVertexId) { - refVertexId = -1; - } - } - } - } - return firstVertexId; - }; - Space.prototype.findEdgeByPoint = function (p, minDist, refEdgeId) { - var firstEdgeId = -1; - refEdgeId = refEdgeId || -1; - for(var i = 0; i < this.bodies.length; i++) { - var body = this.bodies[i]; - if(!body) { - continue; - } - for(var j = 0; j < body.shapes.length; j++) { - var shape = body.shapes[j]; - if(shape.type != Physics.AdvancedPhysics.SHAPE_TYPE_POLY) { - continue; - } - var index = shape.findEdgeByPoint(p, minDist); - if(index != -1) { - var edge = (shape.id << 16) | index; - if(refEdgeId == -1) { - return edge; - } - if(firstEdgeId == -1) { - firstEdgeId = edge; - } - if(edge == refEdgeId) { - refEdgeId = -1; - } - } - } - } - return firstEdgeId; - }; - Space.prototype.findJointByPoint = function (p, minDist, refJointId) { - var firstJointId = -1; - var dsq = minDist * minDist; - refJointId = refJointId || -1; - for(var i = 0; i < this.joints.length; i++) { - var joint = this.joints[i]; - if(!joint) { - continue; - } - var jointId = -1; - if(Phaser.Vec2Utils.distanceSq(p, joint.getWorldAnchor1()) < dsq) { - jointId = (joint.id << 16 | 0); - } else if(Phaser.Vec2Utils.distanceSq(p, joint.getWorldAnchor2()) < dsq) { - jointId = (joint.id << 16 | 1); - } - if(jointId != -1) { - if(refJointId == -1) { - return jointId; - } - if(firstJointId == -1) { - firstJointId = jointId; - } - if(jointId == refJointId) { - refJointId = -1; - } - } - } - return firstJointId; - }; - Space.prototype.findContactSolver = function (shape1, shape2) { - Physics.Manager.write('findContactSolver. Length: ' + this._cl); - for(var i = 0; i < this._cl; i++) { - var contactSolver = this.contactSolvers[i]; - if(shape1 == contactSolver.shape1 && shape2 == contactSolver.shape2) { - return contactSolver; - } - } - return null; - }; - Space.prototype.genTemporalContactSolvers = function () { - Physics.Manager.write('genTemporalContactSolvers'); - this._cl = 0; - this.contactSolvers.length = 0; - this.numContacts = 0; - for(var body1Index = 0; body1Index < this._bl; body1Index++) { - if(!this.bodies[body1Index]) { - continue; - } - this.bodies[body1Index].stepCount = this.stepCount; - for(var body2Index = 0; body2Index < this._bl; body2Index++) { - if(this.bodies[body1Index].inContact(this.bodies[body2Index]) == false) { - continue; - } - Physics.Manager.write('body1 and body2 intersect'); - for(var i = 0; i < this.bodies[body1Index].shapesLength; i++) { - for(var j = 0; j < this.bodies[body2Index].shapesLength; j++) { - this._shape1 = this.bodies[body1Index].shapes[i]; - this._shape2 = this.bodies[body2Index].shapes[j]; - var contactArr = []; - if(!Physics.AdvancedPhysics.collision.collide(this._shape1, this._shape2, contactArr)) { - continue; - } - if(this._shape1.type > this._shape2.type) { - var temp = this._shape1; - this._shape1 = this._shape2; - this._shape2 = temp; - } - this.numContacts += contactArr.length; - // Result stored in this._contactSolver (see what we can do about generating some re-usable solvers) - var contactSolver = this.findContactSolver(this._shape1, this._shape2); - Physics.Manager.write('findContactSolver result: ' + contactSolver); - if(contactSolver) { - contactSolver.update(contactArr); - this.contactSolvers.push(contactSolver); - } else { - Physics.Manager.write('awake both bodies'); - this.bodies[body1Index].awake(true); - this.bodies[body2Index].awake(true); - var newContactSolver = new Physics.ContactSolver(this._shape1, this._shape2); - newContactSolver.contacts = contactArr; - newContactSolver.elasticity = Math.max(this._shape1.elasticity, this._shape2.elasticity); - newContactSolver.friction = Math.sqrt(this._shape1.friction * this._shape2.friction); - this.contactSolvers.push(newContactSolver); - Physics.Manager.write('new contact solver'); - } - } - } - } - } - this._cl = this.contactSolvers.length; - }; - Space.prototype.initSolver = function (warmStarting) { - Physics.Manager.write('initSolver'); - Physics.Manager.write('contactSolvers.length: ' + this._cl); - // Initialize contact solvers - for(var c = 0; c < this._cl; c++) { - this.contactSolvers[c].initSolver(this._deltaInv); - // Warm starting (apply cached impulse) - if(warmStarting) { - this.contactSolvers[c].warmStart(); - } - } - // Initialize joint solver - for(var j = 0; j < this.joints.length; j++) { - if(this.joints[j]) { - this.joints[j].initSolver(this._delta, warmStarting); - } - } - // Warm starting (apply cached impulse) - /* - if (warmStarting) - { - for (var c = 0; c < this._cl; c++) - { - this.contactSolvers[c].warmStart(); - } - } - */ - }; - Space.prototype.velocitySolver = function (iterations) { - Physics.Manager.write('velocitySolver, iterations: ' + iterations + ' csa len: ' + this._cl); - for(var i = 0; i < iterations; i++) { - for(var j = 0; j < this._jl; j++) { - if(this.joints[j]) { - this.joints[j].solveVelocityConstraints(); - } - } - for(var c = 0; c < this._cl; c++) { - this.contactSolvers[c].solveVelocityConstraints(); - } - } - }; - Space.prototype.positionSolver = function (iterations) { - this._positionSolved = false; - for(var i = 0; i < iterations; i++) { - this._contactsOk = true; - this._jointsOk = true; - for(var c = 0; c < this._cl; c++) { - this._contactsOk = this.contactSolvers[c].solvePositionConstraints() && this._contactsOk; - } - for(var j = 0; j < this._jl; j++) { - if(this.joints[j]) { - this._jointsOk = this.joints[j].solvePositionConstraints() && this._jointsOk; - } - } - if(this._contactsOk && this._jointsOk) { - // exit early if the position errors are small - this._positionSolved = true; - break; - } - } - return this._positionSolved; - }; - Space.prototype.step = // Step through the physics simulation - function (dt, velocityIterations, positionIterations, warmStarting, allowSleep) { - Physics.Manager.clear(); - Physics.Manager.write('Space step ' + this.stepCount); - this._delta = dt; - this._deltaInv = 1 / dt; - this._bl = this.bodies.length; - this._jl = this.joints.length; - this.stepCount++; - // 1) Generate Contact Solvers (into the this.contactSolvers array) - this.genTemporalContactSolvers(); - Physics.Manager.dump("Contact Solvers", this.bodies[1]); - // 2) Initialize the Contact Solvers - this.initSolver(warmStarting); - Physics.Manager.dump("Init Solver", this.bodies[1]); - // 3) Intergrate velocity - for(var i = 0; i < this._bl; i++) { - if(this.bodies[i] && this.bodies[i].isDynamic && this.bodies[i].isAwake) { - this.bodies[i].updateVelocity(this.gravity, this._delta, this.damping); - } - } - Physics.Manager.dump("Update Velocity", this.bodies[1]); - // 4) Awaken bodies via joints - for(var j = 0; i < this._jl; j++) { - if(!this.joints[j]) { - continue; - } - // combine - var awake1 = this.joints[j].body1.isAwake && !this.joints[j].body1.isStatic; - var awake2 = this.joints[j].body2.isAwake && !this.joints[j].body2.isStatic; - if(awake1 ^ awake2) { - if(!awake1) { - this.joints[j].body1.awake(true); - } - if(!awake2) { - this.joints[j].body2.awake(true); - } - } - } - // 5) Iterative velocity constraints solver - this.velocitySolver(velocityIterations); - Physics.Manager.dump("Velocity Solvers", this.bodies[1]); - // 6) Integrate position - for(var i = 0; i < this._bl; i++) { - if(this.bodies[i] && this.bodies[i].isDynamic && this.bodies[i].isAwake) { - this.bodies[i].updatePosition(this._delta); - } - } - Physics.Manager.dump("Update Position", this.bodies[1]); - // 7) Process breakable joint - for(var i = 0; i < this._jl; i++) { - if(this.joints[i] && this.joints[i].breakable && (this.joints[i].getReactionForce(this._deltaInv).lengthSq() >= this.joints[i].maxForce * this.joints[i].maxForce)) { - this.removeJoint(this.joints[i]); - } - } - // 8) Iterative position constraints solver (result stored in this._positionSolved) - this.positionSolver(positionIterations); - Physics.Manager.dump("Position Solver", this.bodies[1]); - // 9) Sync the Transforms - for(var i = 0; i < this._bl; i++) { - if(this.bodies[i]) { - this.bodies[i].syncTransform(); - } - } - Physics.Manager.dump("Sync Transform", this.bodies[1]); - // 10) Post solve collision callback - if(this.postSolve) { - for(var i = 0; i < this._cl; i++) { - this.postSolve(this.contactSolvers[i]); - } - } - // 11) Cache Body Data - for(var i = 0; i < this._bl; i++) { - if(this.bodies[i] && this.bodies[i].isDynamic && this.bodies[i].isAwake) { - this.bodies[i].cacheData('post solve collision callback'); - } - } - Physics.Manager.dump("Cache Data", this.bodies[1]); - Physics.Manager.writeAll(); - // 12) Process sleeping - if(allowSleep) { - this._minSleepTime = 999999; - for(var i = 0; i < this._bl; i++) { - if(!this.bodies[i] || this.bodies[i].isDynamic == false) { - continue; - } - if(this.bodies[i].angularVelocity * this.bodies[i].angularVelocity > this._angTolSqr || this.bodies[i].velocity.dot(this.bodies[i].velocity) > this._linTolSqr) { - this.bodies[i].sleepTime = 0; - this._minSleepTime = 0; - } else { - this.bodies[i].sleepTime += this._delta; - this._minSleepTime = Math.min(this._minSleepTime, this.bodies[i].sleepTime); - } - } - if(this._positionSolved && this._minSleepTime >= Space.TIME_TO_SLEEP) { - for(var i = 0; i < this._bl; i++) { - if(this.bodies[i]) { - this.bodies[i].awake(false); - } - } - } - } - }; - return Space; - })(); - Physics.Space = Space; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Space.ts b/wip/physics/Space.ts deleted file mode 100644 index 030ceb32..00000000 --- a/wip/physics/Space.ts +++ /dev/null @@ -1,823 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Space -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Space { - - constructor(manager: Phaser.Physics.AdvancedPhysics) { - - this._manager = manager; - - this.bodies = []; - this.bodyHash = {}; - - this.joints = []; - this.jointHash = {}; - - this.numContacts = 0; - this.contactSolvers = []; - - this.gravity = this._manager.gravity; - this.damping = 0; - - this._linTolSqr = Space.SLEEP_LINEAR_TOLERANCE * Space.SLEEP_LINEAR_TOLERANCE; - this._angTolSqr = Space.SLEEP_ANGULAR_TOLERANCE * Space.SLEEP_ANGULAR_TOLERANCE; - - } - - private _manager: Phaser.Physics.AdvancedPhysics; - - // Delta Timer - private _delta: number; - private _deltaInv: number; - - // Body array length - private _bl: number; - - // Joints array length - private _jl: number; - - // Contact Solvers array length - private _cl: number; - - private _linTolSqr: number; - private _angTolSqr: number; - - // Minimum sleep time (used in the sleep process solver) - private _minSleepTime: number; - - private _positionSolved: bool; - - private _shape1: IShape; - private _shape2: IShape; - private _contactsOk: bool; - private _jointsOk: bool; - - private bodyHash; - private jointHash; - - public static TIME_TO_SLEEP = 0.5; - public static SLEEP_LINEAR_TOLERANCE = 0.5; - public static SLEEP_ANGULAR_TOLERANCE = 2 * 0.017453292519943294444444444444444; - - public bodies: Body[]; - public joints: IJoint[]; - public numContacts: number; - public contactSolvers: ContactSolver[]; - public postSolve = null; - public gravity: Phaser.Vec2; - public damping: number; - public stepCount: number = 0; - - public clear() { - - AdvancedPhysics.shapeCounter = 0; - AdvancedPhysics.bodyCounter = 0; - AdvancedPhysics.jointCounter = 0; - - for (var i = 0; i < this.bodies.length; i++) - { - if (this.bodies[i]) - { - this.removeBody(this.bodies[i]); - } - } - - this.bodies = []; - this.bodyHash = {}; - - this.joints = []; - this.jointHash = {}; - - this.contactSolvers = []; - - this.stepCount = 0; - - } - - public addBody(body: Body) { - - if (this.bodyHash[body.id] != undefined) - { - return; - } - - var index = this.bodies.push(body) - 1; - this.bodyHash[body.id] = index; - - body.awake(true); - body.space = this; - body.cacheData('addBody'); - - } - - public removeBody(body: Body) { - - if (this.bodyHash[body.id] == undefined) - { - return; - } - - // Remove linked joints - for (var i = 0; i < body.joints.length; i++) - { - if (body.joints[i]) - { - this.removeJoint(body.joints[i]); - } - } - - body.space = null; - - var index = this.bodyHash[body.id]; - delete this.bodyHash[body.id]; - delete this.bodies[index]; - - } - - public addJoint(joint: IJoint) { - - if (this.jointHash[joint.id] != undefined) - { - return; - } - - joint.body1.awake(true); - joint.body2.awake(true); - - var index = this.joints.push(joint) - 1; - this.jointHash[joint.id] = index; - - var index = joint.body1.joints.push(joint) - 1; - joint.body1.jointHash[joint.id] = index; - - var index = joint.body2.joints.push(joint) - 1; - joint.body2.jointHash[joint.id] = index; - - } - - public removeJoint(joint: IJoint) { - - if (this.jointHash[joint.id] == undefined) - { - return; - } - - joint.body1.awake(true); - joint.body2.awake(true); - - var index = joint.body1.jointHash[joint.id]; - delete joint.body1.jointHash[joint.id]; - delete joint.body1.joints[index]; - - var index = joint.body2.jointHash[joint.id]; - delete joint.body2.jointHash[joint.id]; - delete joint.body2.joints[index]; - - var index = this.jointHash[joint.id]; - delete this.jointHash[joint.id]; - delete this.joints[index]; - - } - - public findShapeByPoint(p, refShape) { - - var firstShape; - - for (var i = 0; i < this.bodies.length; i++) - { - var body = this.bodies[i]; - - if (!body) - { - continue; - } - - for (var j = 0; j < body.shapes.length; j++) - { - var shape = body.shapes[j]; - - if (shape.pointQuery(p)) - { - if (!refShape) - { - return shape; - } - - if (!firstShape) - { - firstShape = shape; - } - - if (shape == refShape) - { - refShape = null; - } - } - } - } - - return firstShape; - } - - public findBodyByPoint(p, refBody: Body) { - - var firstBody; - - for (var i = 0; i < this.bodies.length; i++) - { - var body = this.bodies[i]; - - if (!body) - { - continue; - } - - for (var j = 0; j < body.shapes.length; j++) - { - var shape = body.shapes[j]; - - if (shape.pointQuery(p)) - { - if (!refBody) - { - return shape.body; - } - - if (!firstBody) - { - firstBody = shape.body; - } - - if (shape.body == refBody) - { - refBody = null; - } - - break; - } - } - } - - return firstBody; - - } - - public shapeById(id) { - - var shape; - - for (var i = 0; i < this.bodies.length; i++) - { - var body: Body = this.bodies[i]; - - if (!body) - { - continue; - } - - for (var j = 0; j < body.shapes.length; j++) - { - if (body.shapes[j].id == id) - { - return body.shapes[j]; - } - } - } - - return null; - } - - public jointById(id) { - - var index = this.jointHash[id]; - - if (index != undefined) - { - return this.joints[index]; - } - - return null; - } - - public findVertexByPoint(p, minDist, refVertexId) { - - var firstVertexId = -1; - - refVertexId = refVertexId || -1; - - for (var i = 0; i < this.bodies.length; i++) - { - var body = this.bodies[i]; - - if (!body) - { - continue; - } - - for (var j = 0; j < body.shapes.length; j++) - { - var shape = body.shapes[j]; - var index = shape.findVertexByPoint(p, minDist); - - if (index != -1) - { - var vertex = (shape.id << 16) | index; - - if (refVertexId == -1) - { - return vertex; - } - - if (firstVertexId == -1) - { - firstVertexId = vertex; - } - - if (vertex == refVertexId) - { - refVertexId = -1; - } - } - } - } - - return firstVertexId; - - } - - public findEdgeByPoint(p, minDist, refEdgeId) { - - var firstEdgeId = -1; - - refEdgeId = refEdgeId || -1; - - for (var i = 0; i < this.bodies.length; i++) - { - var body = this.bodies[i]; - - if (!body) - { - continue; - } - - for (var j = 0; j < body.shapes.length; j++) - { - var shape = body.shapes[j]; - - if (shape.type != AdvancedPhysics.SHAPE_TYPE_POLY) - { - continue; - } - - var index = shape.findEdgeByPoint(p, minDist); - - if (index != -1) - { - var edge = (shape.id << 16) | index; - - if (refEdgeId == -1) - { - return edge; - } - - if (firstEdgeId == -1) - { - firstEdgeId = edge; - } - - if (edge == refEdgeId) - { - refEdgeId = -1; - } - } - } - } - - return firstEdgeId; - } - - public findJointByPoint(p, minDist, refJointId) { - - var firstJointId = -1; - - var dsq = minDist * minDist; - - refJointId = refJointId || -1; - - for (var i = 0; i < this.joints.length; i++) - { - var joint = this.joints[i]; - - if (!joint) - { - continue; - } - - var jointId = -1; - - if (Phaser.Vec2Utils.distanceSq(p, joint.getWorldAnchor1()) < dsq) - { - jointId = (joint.id << 16 | 0); - } - else if (Phaser.Vec2Utils.distanceSq(p, joint.getWorldAnchor2()) < dsq) - { - jointId = (joint.id << 16 | 1); - } - - if (jointId != -1) - { - if (refJointId == -1) - { - return jointId; - } - - if (firstJointId == -1) - { - firstJointId = jointId; - } - - if (jointId == refJointId) - { - refJointId = -1; - } - } - } - - return firstJointId; - } - - private findContactSolver(shape1:IShape, shape2:IShape):ContactSolver { - - Manager.write('findContactSolver. Length: ' + this._cl); - - for (var i = 0; i < this._cl; i++) - { - var contactSolver: ContactSolver = this.contactSolvers[i]; - - if (shape1 == contactSolver.shape1 && shape2 == contactSolver.shape2) - { - return contactSolver; - } - } - - return null; - - } - - private genTemporalContactSolvers() { - - Manager.write('genTemporalContactSolvers'); - - this._cl = 0; - this.contactSolvers.length = 0; - this.numContacts = 0; - - for (var body1Index = 0; body1Index < this._bl; body1Index++) - { - if (!this.bodies[body1Index]) - { - continue; - } - - this.bodies[body1Index].stepCount = this.stepCount; - - for (var body2Index = 0; body2Index < this._bl; body2Index++) - { - if (this.bodies[body1Index].inContact(this.bodies[body2Index]) == false) - { - continue; - } - - Manager.write('body1 and body2 intersect'); - - for (var i = 0; i < this.bodies[body1Index].shapesLength; i++) - { - for (var j = 0; j < this.bodies[body2Index].shapesLength; j++) - { - this._shape1 = this.bodies[body1Index].shapes[i]; - this._shape2 = this.bodies[body2Index].shapes[j]; - - var contactArr = []; - - if (!AdvancedPhysics.collision.collide(this._shape1, this._shape2, contactArr)) - { - continue; - } - - if (this._shape1.type > this._shape2.type) - { - var temp = this._shape1; - this._shape1 = this._shape2; - this._shape2 = temp; - } - - this.numContacts += contactArr.length; - - // Result stored in this._contactSolver (see what we can do about generating some re-usable solvers) - var contactSolver: ContactSolver = this.findContactSolver(this._shape1, this._shape2); - - Manager.write('findContactSolver result: ' + contactSolver); - - if (contactSolver) - { - contactSolver.update(contactArr); - this.contactSolvers.push(contactSolver); - } - else - { - Manager.write('awake both bodies'); - - this.bodies[body1Index].awake(true); - this.bodies[body2Index].awake(true); - - var newContactSolver = new ContactSolver(this._shape1, this._shape2); - newContactSolver.contacts = contactArr; - newContactSolver.elasticity = Math.max(this._shape1.elasticity, this._shape2.elasticity); - newContactSolver.friction = Math.sqrt(this._shape1.friction * this._shape2.friction); - - this.contactSolvers.push(newContactSolver); - Manager.write('new contact solver'); - } - } - } - } - } - - this._cl = this.contactSolvers.length; - - } - - private initSolver(warmStarting) { - - Manager.write('initSolver'); - Manager.write('contactSolvers.length: ' + this._cl); - - // Initialize contact solvers - for (var c = 0; c < this._cl; c++) - { - this.contactSolvers[c].initSolver(this._deltaInv); - - // Warm starting (apply cached impulse) - if (warmStarting) - { - this.contactSolvers[c].warmStart(); - } - - } - - // Initialize joint solver - for (var j = 0; j < this.joints.length; j++) - { - if (this.joints[j]) - { - this.joints[j].initSolver(this._delta, warmStarting); - } - } - - // Warm starting (apply cached impulse) - /* - if (warmStarting) - { - for (var c = 0; c < this._cl; c++) - { - this.contactSolvers[c].warmStart(); - } - } - */ - - } - - private velocitySolver(iterations:number) { - - Manager.write('velocitySolver, iterations: ' + iterations + ' csa len: ' + this._cl); - - for (var i = 0; i < iterations; i++) - { - for (var j = 0; j < this._jl; j++) - { - if (this.joints[j]) - { - this.joints[j].solveVelocityConstraints(); - } - } - - for (var c = 0; c < this._cl; c++) - { - this.contactSolvers[c].solveVelocityConstraints(); - } - } - - } - - private positionSolver(iterations:number):bool { - - this._positionSolved = false; - - for (var i = 0; i < iterations; i++) - { - this._contactsOk = true; - this._jointsOk = true; - - for (var c = 0; c < this._cl; c++) - { - this._contactsOk = this.contactSolvers[c].solvePositionConstraints() && this._contactsOk; - } - - for (var j = 0; j < this._jl; j++) - { - if (this.joints[j]) - { - this._jointsOk = this.joints[j].solvePositionConstraints() && this._jointsOk; - } - } - - if (this._contactsOk && this._jointsOk) - { - // exit early if the position errors are small - this._positionSolved = true; - break; - } - } - - return this._positionSolved; - - } - - // Step through the physics simulation - public step(dt: number, velocityIterations: number, positionIterations: number, warmStarting: bool, allowSleep: bool) { - - Manager.clear(); - Manager.write('Space step ' + this.stepCount); - - this._delta = dt; - this._deltaInv = 1 / dt; - this._bl = this.bodies.length; - this._jl = this.joints.length; - - this.stepCount++; - - // 1) Generate Contact Solvers (into the this.contactSolvers array) - this.genTemporalContactSolvers(); - - Manager.dump("Contact Solvers", this.bodies[1]); - - // 2) Initialize the Contact Solvers - this.initSolver(warmStarting); - - Manager.dump("Init Solver", this.bodies[1]); - - // 3) Intergrate velocity - for (var i = 0; i < this._bl; i++) - { - if (this.bodies[i] && this.bodies[i].isDynamic && this.bodies[i].isAwake) - { - this.bodies[i].updateVelocity(this.gravity, this._delta, this.damping); - } - } - - Manager.dump("Update Velocity", this.bodies[1]); - - // 4) Awaken bodies via joints - for (var j = 0; i < this._jl; j++) - { - if (!this.joints[j]) - { - continue; - } - - // combine - var awake1 = this.joints[j].body1.isAwake && !this.joints[j].body1.isStatic; - var awake2 = this.joints[j].body2.isAwake && !this.joints[j].body2.isStatic; - - if (awake1 ^ awake2) - { - if (!awake1) - { - this.joints[j].body1.awake(true); - } - - if (!awake2) - { - this.joints[j].body2.awake(true); - } - } - } - - // 5) Iterative velocity constraints solver - this.velocitySolver(velocityIterations); - - Manager.dump("Velocity Solvers", this.bodies[1]); - - // 6) Integrate position - for (var i = 0; i < this._bl; i++) - { - if (this.bodies[i] && this.bodies[i].isDynamic && this.bodies[i].isAwake) - { - this.bodies[i].updatePosition(this._delta); - } - } - - Manager.dump("Update Position", this.bodies[1]); - - // 7) Process breakable joint - for (var i = 0; i < this._jl; i++) - { - if (this.joints[i] && this.joints[i].breakable && (this.joints[i].getReactionForce(this._deltaInv).lengthSq() >= this.joints[i].maxForce * this.joints[i].maxForce)) - { - this.removeJoint(this.joints[i]); - } - } - - // 8) Iterative position constraints solver (result stored in this._positionSolved) - this.positionSolver(positionIterations); - - Manager.dump("Position Solver", this.bodies[1]); - - // 9) Sync the Transforms - for (var i = 0; i < this._bl; i++) - { - if (this.bodies[i]) - { - this.bodies[i].syncTransform(); - } - } - - Manager.dump("Sync Transform", this.bodies[1]); - - // 10) Post solve collision callback - if (this.postSolve) - { - for (var i = 0; i < this._cl; i++) - { - this.postSolve(this.contactSolvers[i]); - } - } - - // 11) Cache Body Data - for (var i = 0; i < this._bl; i++) - { - if (this.bodies[i] && this.bodies[i].isDynamic && this.bodies[i].isAwake) - { - this.bodies[i].cacheData('post solve collision callback'); - } - } - - Manager.dump("Cache Data", this.bodies[1]); - - Manager.writeAll(); - - // 12) Process sleeping - if (allowSleep) - { - this._minSleepTime = 999999; - - for (var i = 0; i < this._bl; i++) - { - if (!this.bodies[i] || this.bodies[i].isDynamic == false) - { - continue; - } - - if (this.bodies[i].angularVelocity * this.bodies[i].angularVelocity > this._angTolSqr || this.bodies[i].velocity.dot(this.bodies[i].velocity) > this._linTolSqr) - { - this.bodies[i].sleepTime = 0; - this._minSleepTime = 0; - } - else - { - this.bodies[i].sleepTime += this._delta; - this._minSleepTime = Math.min(this._minSleepTime, this.bodies[i].sleepTime); - } - } - - if (this._positionSolved && this._minSleepTime >= Space.TIME_TO_SLEEP) - { - for (var i = 0; i < this._bl; i++) - { - if (this.bodies[i]) - { - this.bodies[i].awake(false); - } - } - } - } - } - - } - -} \ No newline at end of file diff --git a/wip/physics/Transform.js b/wip/physics/Transform.js deleted file mode 100644 index 98c0c8c0..00000000 --- a/wip/physics/Transform.js +++ /dev/null @@ -1,53 +0,0 @@ -/// -/// -/** -* Phaser - 2D Transform -* -* A 2D Transform -*/ -var Phaser; -(function (Phaser) { - var Transform = (function () { - /** - * Creates a new 2D Transform object. - * @class Transform - * @constructor - * @return {Transform} This object - **/ - function Transform(pos, angle) { - this.t = Phaser.Vec2Utils.clone(pos); - this.c = Math.cos(angle); - this.s = Math.sin(angle); - this.angle = angle; - } - Transform.prototype.toString = function () { - return 't=' + this.t.toString() + ' c=' + this.c + ' s=' + this.s + ' a=' + this.angle; - }; - Transform.prototype.setTo = function (pos, angle) { - this.t.copyFrom(pos); - this.c = Math.cos(angle); - this.s = Math.sin(angle); - return this; - }; - Transform.prototype.setRotation = function (angle) { - if(angle !== this.angle) { - this.c = Math.cos(angle); - this.s = Math.sin(angle); - this.angle = angle; - } - return this; - }; - Transform.prototype.setPosition = function (p) { - this.t.copyFrom(p); - return this; - }; - Transform.prototype.identity = function () { - this.t.setTo(0, 0); - this.c = 1; - this.s = 0; - return this; - }; - return Transform; - })(); - Phaser.Transform = Transform; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/Transform.ts b/wip/physics/Transform.ts deleted file mode 100644 index 6c451048..00000000 --- a/wip/physics/Transform.ts +++ /dev/null @@ -1,83 +0,0 @@ -/// -/// - -/** -* Phaser - 2D Transform -* -* A 2D Transform -*/ - -module Phaser { - - export class Transform { - - /** - * Creates a new 2D Transform object. - * @class Transform - * @constructor - * @return {Transform} This object - **/ - constructor(pos: Phaser.Vec2, angle: number) { - - this.t = Phaser.Vec2Utils.clone(pos); - this.c = Math.cos(angle); - this.s = Math.sin(angle); - this.angle = angle; - - } - - public t: Phaser.Vec2; - public c: number; - public s: number; - public angle: number; - - public toString() { - - return 't=' + this.t.toString() + ' c=' + this.c + ' s=' + this.s + ' a=' + this.angle; - - } - - public setTo(pos:Phaser.Vec2, angle:number) { - - this.t.copyFrom(pos); - this.c = Math.cos(angle); - this.s = Math.sin(angle); - - return this; - - } - - public setRotation(angle:number) { - - if (angle !== this.angle) - { - this.c = Math.cos(angle); - this.s = Math.sin(angle); - this.angle = angle; - } - - return this; - - } - - public setPosition(p:Phaser.Vec2) { - - this.t.copyFrom(p); - - return this; - - } - - public identity() { - - this.t.setTo(0, 0); - this.c = 1; - this.s = 0; - - return this; - - } - - } - -} \ No newline at end of file diff --git a/wip/physics/TransformUtils.js b/wip/physics/TransformUtils.js deleted file mode 100644 index 818a4d2d..00000000 --- a/wip/physics/TransformUtils.js +++ /dev/null @@ -1,39 +0,0 @@ -/// -/// -/// -/** -* Phaser - TransformUtils -* -* A collection of methods useful for manipulating and performing operations on 2D Transforms. -* -*/ -var Phaser; -(function (Phaser) { - var TransformUtils = (function () { - function TransformUtils() { } - TransformUtils.rotate = function rotate(t, v, out) { - if (typeof out === "undefined") { out = new Phaser.Vec2(); } - //return new vec2(v.x * this.c - v.y * this.s, v.x * this.s + v.y * this.c); - return out.setTo(v.x * t.c - v.y * t.s, v.x * t.s + v.y * t.c); - }; - TransformUtils.unrotate = function unrotate(t, v, out) { - if (typeof out === "undefined") { out = new Phaser.Vec2(); } - //return new vec2(v.x * this.c + v.y * this.s, -v.x * this.s + v.y * this.c); - return out.setTo(v.x * t.c + v.y * t.s, -v.x * t.s + v.y * t.c); - }; - TransformUtils.transform = function transform(t, v, out) { - if (typeof out === "undefined") { out = new Phaser.Vec2(); } - //return new vec2(v.x * this.c - v.y * this.s + this.t.x, v.x * this.s + v.y * this.c + this.t.y); - return out.setTo(v.x * t.c - v.y * t.s + t.t.x, v.x * t.s + v.y * t.c + t.t.y); - }; - TransformUtils.untransform = function untransform(t, v, out) { - if (typeof out === "undefined") { out = new Phaser.Vec2(); } - var px = v.x - t.t.x; - var py = v.y - t.t.y; - //return new vec2(px * this.c + py * this.s, -px * this.s + py * this.c); - return out.setTo(px * t.c + py * t.s, -px * t.s + py * t.c); - }; - return TransformUtils; - })(); - Phaser.TransformUtils = TransformUtils; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/TransformUtils.ts b/wip/physics/TransformUtils.ts deleted file mode 100644 index 1f199209..00000000 --- a/wip/physics/TransformUtils.ts +++ /dev/null @@ -1,43 +0,0 @@ -/// -/// -/// - -/** -* Phaser - TransformUtils -* -* A collection of methods useful for manipulating and performing operations on 2D Transforms. -* -*/ - -module Phaser { - - export class TransformUtils { - - public static rotate(t: Transform, v:Phaser.Vec2, out?: Vec2 = new Vec2):Phaser.Vec2 { - //return new vec2(v.x * this.c - v.y * this.s, v.x * this.s + v.y * this.c); - return out.setTo(v.x * t.c - v.y * t.s, v.x * t.s + v.y * t.c); - } - - public static unrotate(t: Transform, v:Phaser.Vec2, out?: Vec2 = new Vec2):Phaser.Vec2 { - //return new vec2(v.x * this.c + v.y * this.s, -v.x * this.s + v.y * this.c); - return out.setTo(v.x * t.c + v.y * t.s, -v.x * t.s + v.y * t.c); - } - - public static transform(t: Transform, v:Phaser.Vec2, out?: Vec2 = new Vec2):Phaser.Vec2 { - //return new vec2(v.x * this.c - v.y * this.s + this.t.x, v.x * this.s + v.y * this.c + this.t.y); - return out.setTo(v.x * t.c - v.y * t.s + t.t.x, v.x * t.s + v.y * t.c + t.t.y); - } - - public static untransform(t: Transform, v:Phaser.Vec2, out?: Vec2 = new Vec2):Phaser.Vec2 { - - var px = v.x - t.t.x; - var py = v.y - t.t.y; - - //return new vec2(px * this.c + py * this.s, -px * this.s + py * this.c); - return out.setTo(px * t.c + py * t.s, -px * t.s + py * t.c); - - } - - } - -} \ No newline at end of file diff --git a/wip/physics/joints/IJoint.js b/wip/physics/joints/IJoint.js deleted file mode 100644 index 38c4f862..00000000 --- a/wip/physics/joints/IJoint.js +++ /dev/null @@ -1,3 +0,0 @@ -var Phaser; -(function (Phaser) { - })(Phaser || (Phaser = {})); diff --git a/wip/physics/joints/IJoint.js.map b/wip/physics/joints/IJoint.js.map deleted file mode 100644 index 715856b3..00000000 --- a/wip/physics/joints/IJoint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IJoint.js","sources":["IJoint.ts"],"names":["Phaser"],"mappings":"AAYA,IAAO,MAAM;AA6BZ,CA7BD,UAAO,MAAM;IA6BbA,CAACA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/joints/IJoint.ts b/wip/physics/joints/IJoint.ts deleted file mode 100644 index cb940a12..00000000 --- a/wip/physics/joints/IJoint.ts +++ /dev/null @@ -1,43 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Joint -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export interface IJoint { - - id: number; - type: number; - - body1: Phaser.Physics.Body; - body2: Phaser.Physics.Body; - - collideConnected; // bool? - maxForce: number; - breakable: bool; - - anchor1: Phaser.Vec2; - anchor2: Phaser.Vec2; - - getWorldAnchor1(); - getWorldAnchor2(); - setWorldAnchor1(anchor1); - setWorldAnchor2(anchor2); - - initSolver(dt, warmStarting); - solveVelocityConstraints(); - solvePositionConstraints(); - getReactionForce(dt_inv); - - } - -} - diff --git a/wip/physics/joints/Joint.js b/wip/physics/joints/Joint.js deleted file mode 100644 index 8999f0e3..00000000 --- a/wip/physics/joints/Joint.js +++ /dev/null @@ -1,41 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Joint - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Joint = (function () { - function Joint(type, body1, body2, collideConnected) { - this.id = Physics.AdvancedPhysics.jointCounter++; - this.type = type; - this.body1 = body1; - this.body2 = body2; - this.collideConnected = collideConnected; - this.maxForce = 9999999999; - this.breakable = false; - } - Joint.prototype.getWorldAnchor1 = function () { - return this.body1.getWorldPoint(this.anchor1); - }; - Joint.prototype.getWorldAnchor2 = function () { - return this.body2.getWorldPoint(this.anchor2); - }; - Joint.prototype.setWorldAnchor1 = function (anchor1) { - this.anchor1 = this.body1.getLocalPoint(anchor1); - }; - Joint.prototype.setWorldAnchor2 = function (anchor2) { - this.anchor2 = this.body2.getLocalPoint(anchor2); - }; - return Joint; - })(); - Physics.Joint = Joint; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/joints/Joint.js.map b/wip/physics/joints/Joint.js.map deleted file mode 100644 index 90974efb..00000000 --- a/wip/physics/joints/Joint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Joint.js","sources":["Joint.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Joint","Phaser.Physics.Joint.constructor","Phaser.Physics.Joint.getWorldAnchor1","Phaser.Physics.Joint.getWorldAnchor2","Phaser.Physics.Joint.setWorldAnchor1","Phaser.Physics.Joint.setWorldAnchor2"],"mappings":"AAYA,IAAO,MAAM;AAmDZ,CAnDD,UAAO,MAAM;IAZbA,2CAA2CA;IAC3CA,4CAA4CA;IAC5CA,gDAAgDA;IAChDA,sCAAsCA;IACtCA,mCAAmCA;IAEnCA;;;;MAIEA;KAEKA,UAAOA,OAAOA;QAEjBC;YAEIC,SAFSA,KAAKA,CAEFA,IAAYA,EAAEA,KAAyBA,EAAEA,KAAyBA,EAAEA,gBAAgBA;gBAE5FC,IAAIA,CAACA,EAAEA,GAAGA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,CAACA,YAAYA,EAAEA;gBAC/CA,IAAIA,CAACA,IAAIA,GAAGA,IAAIA;gBAEhBA,IAAIA,CAACA,KAAKA,GAAGA,KAAKA;gBAClBA,IAAIA,CAACA,KAAKA,GAAGA,KAAKA;gBAElBA,IAAIA,CAACA,gBAAgBA,GAAGA,gBAAgBA;gBAExCA,IAAIA,CAACA,QAAQA,GAAGA,UAAUA;gBAC1BA,IAAIA,CAACA,SAASA,GAAGA,KAAKA;YAE1BA,CAACA;YAeDD,kCAAAA;gBACIE,OAAOA,IAAIA,CAACA,KAAKA,CAACA,aAAaA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA;YAClDA,CAACA;YAEDF,kCAAAA;gBACIG,OAAOA,IAAIA,CAACA,KAAKA,CAACA,aAAaA,CAACA,IAAIA,CAACA,OAAOA,CAACA,CAACA;YAClDA,CAACA;YAEDH,kCAAAA,UAAuBA,OAAOA;gBAC1BI,IAAIA,CAACA,OAAOA,GAAGA,IAAIA,CAACA,KAAKA,CAACA,aAAaA,CAACA,OAAOA,CAACA;YACpDA,CAACA;YAEDJ,kCAAAA,UAAuBA,OAAOA;gBAC1BK,IAAIA,CAACA,OAAOA,GAAGA,IAAIA,CAACA,KAAKA,CAACA,aAAaA,CAACA,OAAOA,CAACA;YACpDA,CAACA;YAELL;AAACA,QAADA,CAACA,IAAAD;QA9CDA,sBA8CCA,QAAAA;IAGLA,CAACA,2CAAAD;IAnDMA;AAmDNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/joints/Joint.ts b/wip/physics/joints/Joint.ts deleted file mode 100644 index 48d8b277..00000000 --- a/wip/physics/joints/Joint.ts +++ /dev/null @@ -1,64 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Joint -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Joint { - - constructor(type: number, body1:Phaser.Physics.Body, body2:Phaser.Physics.Body, collideConnected) { - - this.id = AdvancedPhysics.jointCounter++; - this.type = type; - - this.body1 = body1; - this.body2 = body2; - - this.collideConnected = collideConnected; - - this.maxForce = 9999999999; - this.breakable = false; - - } - - public id: number; - public type: number; - - public body1: Phaser.Physics.Body; - public body2: Phaser.Physics.Body; - - public collideConnected; // bool? - public maxForce: number; - public breakable: bool; - - public anchor1: Phaser.Vec2; - public anchor2: Phaser.Vec2; - - public getWorldAnchor1() { - return this.body1.getWorldPoint(this.anchor1); - } - - public getWorldAnchor2() { - return this.body2.getWorldPoint(this.anchor2); - } - - public setWorldAnchor1(anchor1) { - this.anchor1 = this.body1.getLocalPoint(anchor1); - } - - public setWorldAnchor2(anchor2) { - this.anchor2 = this.body2.getLocalPoint(anchor2); - } - - } - - -} \ No newline at end of file diff --git a/wip/physics/shapes/Box.js b/wip/physics/shapes/Box.js deleted file mode 100644 index 892a27f2..00000000 --- a/wip/physics/shapes/Box.js +++ /dev/null @@ -1,59 +0,0 @@ -var __extends = this.__extends || function (d, b) { - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Phaser; -(function (Phaser) { - (function (Physics) { - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Shapes - Box - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Shapes) { - var Box = (function (_super) { - __extends(Box, _super); - // Give in pixels - function Box(x, y, width, height) { - console.log('Box px', x, y, width, height); - x = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x); - y = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y); - width = Phaser.Physics.AdvancedPhysics.pixelsToMeters(width); - height = Phaser.Physics.AdvancedPhysics.pixelsToMeters(height); - console.log('Box m', x, y, width, height); - var hw = width * 0.5; - var hh = height * 0.5; - console.log('Box hh', hw, hh); - _super.call(this, [ - { - x: -hw + x, - y: +hh + y - }, - { - x: -hw + x, - y: -hh + y - }, - { - x: +hw + x, - y: -hh + y - }, - { - x: +hw + x, - y: +hh + y - } - ]); - } - return Box; - })(Phaser.Physics.Shapes.Poly); - Shapes.Box = Box; - })(Physics.Shapes || (Physics.Shapes = {})); - var Shapes = Physics.Shapes; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/Box.js.map b/wip/physics/shapes/Box.js.map deleted file mode 100644 index 1870ec11..00000000 --- a/wip/physics/shapes/Box.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Box.js","sources":["Box.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Shapes","Phaser.Physics.Shapes.Box","Phaser.Physics.Shapes.Box.constructor"],"mappings":";;;;;AAYA,IAAO,MAAM;AAgCZ,CAhCD,UAAO,MAAM;KAANA,UAAOA,OAAOA;QAZrBC,2CAA2CA;QAC3CA,sCAAsCA;QACtCA,mCAAmCA;QACnCA,iCAAiCA;QACjCA,gCAAgCA;QAEhCA;;;;UAIEA;SAEKA,UAAeA,MAAMA;YAExB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CAILA;gBAFGA,CAACA;gBAELD;AAACA,YAADA,CAACA,EA5BwBD,MAAMA,CAACA,OAAOA,CAACA,MAAMA,CAACA,IAAIA,EA4BlDA;YA5BDA,iBA4BCA,YAAAA;QAELA,CAACA,2CAAAD;QAhCMA;AAgCNA,IAADA,CAACA,2CAAAD;IAhCMA;AAgCNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/Box.ts b/wip/physics/shapes/Box.ts deleted file mode 100644 index 90743c74..00000000 --- a/wip/physics/shapes/Box.ts +++ /dev/null @@ -1,45 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Shapes - Box -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics.Shapes { - - export class Box extends Phaser.Physics.Shapes.Poly { - - // Give in pixels - constructor(x, y, width, height) { - - console.log('Box px', x, y, width, height); - - x = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x); - y = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y); - width = Phaser.Physics.AdvancedPhysics.pixelsToMeters(width); - height = Phaser.Physics.AdvancedPhysics.pixelsToMeters(height); - - console.log('Box m', x, y, width, height); - - var hw = width * 0.5; - var hh = height * 0.5; - - console.log('Box hh', hw, hh); - - super([ - { x: -hw + x, y: +hh + y }, - { x: -hw + x, y: -hh + y }, - { x: +hw + x, y: -hh + y }, - { x: +hw + x, y: +hh + y } - ]); - - } - - } - -} diff --git a/wip/physics/shapes/Circle.js b/wip/physics/shapes/Circle.js deleted file mode 100644 index df298613..00000000 --- a/wip/physics/shapes/Circle.js +++ /dev/null @@ -1,87 +0,0 @@ -var __extends = this.__extends || function (d, b) { - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Phaser; -(function (Phaser) { - (function (Physics) { - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Shape - Circle - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Shapes) { - var Circle = (function (_super) { - __extends(Circle, _super); - function Circle(radius, x, y) { - if (typeof x === "undefined") { x = 0; } - if (typeof y === "undefined") { y = 0; } - _super.call(this, Physics.AdvancedPhysics.SHAPE_TYPE_CIRCLE); - x = Physics.AdvancedPhysics.pixelsToMeters(x); - y = Physics.AdvancedPhysics.pixelsToMeters(y); - radius = Physics.AdvancedPhysics.pixelsToMeters(radius); - this.center = new Phaser.Vec2(x, y); - this.radius = radius; - this.tc = new Phaser.Vec2(); - this.finishVerts(); - } - Circle.prototype.finishVerts = function () { - this.radius = Math.abs(this.radius); - }; - Circle.prototype.duplicate = function () { - return new Circle(this.center.x, this.center.y, this.radius); - }; - Circle.prototype.recenter = function (c) { - this.center.subtract(c); - }; - Circle.prototype.transform = function (xf) { - Phaser.TransformUtils.transform(xf, this.center, this.center); - //this.center = xf.transform(this.center); - }; - Circle.prototype.untransform = function (xf) { - Phaser.TransformUtils.untransform(xf, this.center, this.center); - //this.center = xf.untransform(this.center); - }; - Circle.prototype.area = function () { - return Physics.AdvancedPhysics.areaForCircle(this.radius, 0); - }; - Circle.prototype.centroid = function () { - return Phaser.Vec2Utils.clone(this.center); - }; - Circle.prototype.inertia = function (mass) { - return Physics.AdvancedPhysics.inertiaForCircle(mass, this.center, this.radius, 0); - }; - Circle.prototype.cacheData = function (xf) { - Phaser.TransformUtils.transform(xf, this.center, this.tc); - //this.tc = xf.transform(this.center); - this.bounds.mins.setTo(this.tc.x - this.radius, this.tc.y - this.radius); - this.bounds.maxs.setTo(this.tc.x + this.radius, this.tc.y + this.radius); - }; - Circle.prototype.pointQuery = function (p) { - //return vec2.distsq(this.tc, p) < (this.r * this.r); - return Phaser.Vec2Utils.distanceSq(this.tc, p) < (this.radius * this.radius); - }; - Circle.prototype.findVertexByPoint = function (p, minDist) { - var dsq = minDist * minDist; - if(Phaser.Vec2Utils.distanceSq(this.tc, p) < dsq) { - return 0; - } - return -1; - }; - Circle.prototype.distanceOnPlane = function (n, d) { - Phaser.Vec2Utils.dot(n, this.tc) - this.radius - d; - }; - return Circle; - })(Phaser.Physics.Shape); - Shapes.Circle = Circle; - })(Physics.Shapes || (Physics.Shapes = {})); - var Shapes = Physics.Shapes; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/Circle.js.map b/wip/physics/shapes/Circle.js.map deleted file mode 100644 index 46921cb2..00000000 --- a/wip/physics/shapes/Circle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Circle.js","sources":["Circle.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Shapes","Phaser.Physics.Shapes.Circle","Phaser.Physics.Shapes.Circle.constructor","Phaser.Physics.Shapes.Circle.finishVerts","Phaser.Physics.Shapes.Circle.duplicate","Phaser.Physics.Shapes.Circle.recenter","Phaser.Physics.Shapes.Circle.transform","Phaser.Physics.Shapes.Circle.untransform","Phaser.Physics.Shapes.Circle.area","Phaser.Physics.Shapes.Circle.centroid","Phaser.Physics.Shapes.Circle.inertia","Phaser.Physics.Shapes.Circle.cacheData","Phaser.Physics.Shapes.Circle.pointQuery","Phaser.Physics.Shapes.Circle.findVertexByPoint","Phaser.Physics.Shapes.Circle.distanceOnPlane"],"mappings":";;;;;AAYA,IAAO,MAAM;AA4FZ,CA5FD,UAAO,MAAM;KAANA,UAAOA,OAAOA;QAZrBC,2CAA2CA;QAC3CA,gDAAgDA;QAChDA,sCAAsCA;QACtCA,mCAAmCA;QACnCA,iCAAiCA;QAEjCA;;;;UAIEA;SAEKA,UAAeA,MAAMA;YAExBC;;gBAEIC,SAFSA,MAAMA,CAEHA,MAAcA,EAAEA,CAAcA,EAAEA,CAAcA;oBAA9BC,gCAAAA,CAACA,GAAYA,CAACA;AAAAA,oBAAEA,gCAAAA,CAACA,GAAYA,CAACA;AAAAA,oBAEtDA,8BAAMA,eAAOA,CAACA,iBAAiBA,CAoFtCA;oBAlFOA,CAACA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,CAACA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,OAAOA,GAAGA,OAAOA,CAACA;oBAE5BA,GAAIA,MAAMA,CAACA,SAASA,CAACA,UAAUA,CAACA,IAAIA,CAACA,EAAEA,EAAEA,CAACA,CAACA,GAAGA,GAAGA,CAACA;wBAE9CA,OAAOA,CAACA,CAACA;qBACZA;oBAEDA,OAAOA,CAACA,CAACA,CAACA;gBACdA,CAACA;gBAEDZ,mCAAAA,UAAuBA,CAACA,EAAEA,CAACA;oBACvBa,MAAMA,CAACA,SAASA,CAACA,GAAGA,CAACA,CAACA,EAAEA,IAAIA,CAACA,EAAEA,CAACA,GAAGA,IAAIA,CAACA,MAAMA,GAAGA,CAACA;gBACtDA,CAACA;gBAELb;AAACA,YAADA,CAACA,EAxF2BD,MAAMA,CAACA,OAAOA,CAACA,KAAKA,EAwF/CA;YAxFDA,uBAwFCA,YAAAA;QAELA,CAACA,2CAAAD;QA5FMA;AA4FNA,IAADA,CAACA,2CAAAD;IA5FMA;AA4FNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/Circle.ts b/wip/physics/shapes/Circle.ts deleted file mode 100644 index 52a60fde..00000000 --- a/wip/physics/shapes/Circle.ts +++ /dev/null @@ -1,105 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Shape - Circle -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics.Shapes { - - export class Circle extends Phaser.Physics.Shape implements IShape { - - constructor(radius: number, x?: number = 0, y?: number = 0) { - - super(AdvancedPhysics.SHAPE_TYPE_CIRCLE); - - x = AdvancedPhysics.pixelsToMeters(x); - y = AdvancedPhysics.pixelsToMeters(y); - radius = AdvancedPhysics.pixelsToMeters(radius); - - this.center = new Phaser.Vec2(x, y); - this.radius = radius; - this.tc = new Phaser.Vec2; - - this.finishVerts(); - - } - - public radius: number; - public center: Phaser.Vec2; - public tc: Phaser.Vec2; - - public finishVerts() { - this.radius = Math.abs(this.radius); - } - - public duplicate(): Circle { - return new Circle(this.center.x, this.center.y, this.radius); - } - - public recenter(c:Phaser.Vec2) { - this.center.subtract(c); - } - - public transform(xf: Transform) { - - Phaser.TransformUtils.transform(xf, this.center, this.center); - //this.center = xf.transform(this.center); - } - - public untransform(xf: Transform) { - Phaser.TransformUtils.untransform(xf, this.center, this.center); - //this.center = xf.untransform(this.center); - } - - public area(): number { - return AdvancedPhysics.areaForCircle(this.radius, 0); - } - - public centroid(): Phaser.Vec2 { - return Phaser.Vec2Utils.clone(this.center); - } - - public inertia(mass: number): number { - return AdvancedPhysics.inertiaForCircle(mass, this.center, this.radius, 0); - } - - public cacheData(xf: Transform) { - - Phaser.TransformUtils.transform(xf, this.center, this.tc); - //this.tc = xf.transform(this.center); - - this.bounds.mins.setTo(this.tc.x - this.radius, this.tc.y - this.radius); - this.bounds.maxs.setTo(this.tc.x + this.radius, this.tc.y + this.radius); - - } - - public pointQuery(p:Phaser.Vec2): bool { - //return vec2.distsq(this.tc, p) < (this.r * this.r); - return Phaser.Vec2Utils.distanceSq(this.tc, p) < (this.radius * this.radius); - } - - public findVertexByPoint(p:Phaser.Vec2, minDist: number): number { - - var dsq = minDist * minDist; - - if (Phaser.Vec2Utils.distanceSq(this.tc, p) < dsq) - { - return 0; - } - - return -1; - } - - public distanceOnPlane(n, d) { - Phaser.Vec2Utils.dot(n, this.tc) - this.radius - d; - } - - } - -} \ No newline at end of file diff --git a/wip/physics/shapes/IShape.js b/wip/physics/shapes/IShape.js deleted file mode 100644 index 38c4f862..00000000 --- a/wip/physics/shapes/IShape.js +++ /dev/null @@ -1,3 +0,0 @@ -var Phaser; -(function (Phaser) { - })(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/IShape.js.map b/wip/physics/shapes/IShape.js.map deleted file mode 100644 index b957e623..00000000 --- a/wip/physics/shapes/IShape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IShape.js","sources":["IShape.ts"],"names":["Phaser"],"mappings":"AAaA,IAAO,MAAM;AAgCZ,CAhCD,UAAO,MAAM;IAgCbA,CAACA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/IShape.ts b/wip/physics/shapes/IShape.ts deleted file mode 100644 index 08085b74..00000000 --- a/wip/physics/shapes/IShape.ts +++ /dev/null @@ -1,47 +0,0 @@ -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - IShape -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export interface IShape { - - id: number; - type: number; - - elasticity: number; - friction: number; - density: number; - - body: Body; - bounds: Bounds; - - area(): number; - centroid(): Phaser.Vec2; - inertia(mass: number): number; - cacheData(xf:Transform); - pointQuery(p: Phaser.Vec2): bool; - findEdgeByPoint(p: Phaser.Vec2, minDist: number): number; - findVertexByPoint(p: Phaser.Vec2, minDist: number): number; - - // The verts of the shape (in local coordinate space) - verts: Phaser.Vec2[]; - planes: Phaser.Physics.Plane[]; - // The translated verts (in world space) - tverts: Phaser.Vec2[]; - tplanes: Phaser.Physics.Plane[]; - convexity: bool; - - } - -} - diff --git a/wip/physics/shapes/Poly.js b/wip/physics/shapes/Poly.js deleted file mode 100644 index 95311d67..00000000 --- a/wip/physics/shapes/Poly.js +++ /dev/null @@ -1,206 +0,0 @@ -var __extends = this.__extends || function (d, b) { - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Phaser; -(function (Phaser) { - (function (Physics) { - /// - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Shapes - Convex Polygon - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Shapes) { - var Poly = (function (_super) { - __extends(Poly, _super); - // Verts is an optional array of objects, the objects must have public x and y properties which will be used - // to seed this polygon (i.e. Vec2 objects, or just straight JS objects) and must wind COUNTER clockwise - function Poly(verts) { - _super.call(this, Physics.AdvancedPhysics.SHAPE_TYPE_POLY); - this.verts = []; - this.planes = []; - this.tverts = []; - this.tplanes = []; - if(verts) { - for(var i = 0; i < verts.length; i++) { - this.verts[i] = new Phaser.Vec2(verts[i].x, verts[i].y); - this.tverts[i] = this.verts[i]; - //this.tverts[i] = new Phaser.Vec2(verts[i].x, verts[i].y); - this.tplanes[i] = new Phaser.Physics.Plane(new Phaser.Vec2(), 0); - } - } - this.finishVerts(); - } - Poly.prototype.finishVerts = function () { - if(this.verts.length < 2) { - this.convexity = false; - this.planes = []; - return; - } - this.convexity = true; - this.tverts = []; - this.tplanes = []; - // Must be counter-clockwise verts - for(var i = 0; i < this.verts.length; i++) { - var a = this.verts[i]; - var b = this.verts[(i + 1) % this.verts.length]; - var n = Phaser.Vec2Utils.normalize(Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(a, b))); - this.planes[i] = new Phaser.Physics.Plane(n, Phaser.Vec2Utils.dot(n, a)); - this.tverts[i] = Phaser.Vec2Utils.clone(this.verts[i])// reference??? - ; - //this.tverts[i] = this.verts[i]; // reference??? - this.tplanes[i] = new Phaser.Physics.Plane(new Phaser.Vec2(), 0); - } - for(var i = 0; i < this.verts.length; i++) { - //var b = this.verts[(i + 2) % this.verts.length]; - //var n = this.planes[i].normal; - //var d = this.planes[i].d; - if(Phaser.Vec2Utils.dot(this.planes[i].normal, this.verts[(i + 2) % this.verts.length]) - this.planes[i].d > 0) { - this.convexity = false; - } - } - }; - Poly.prototype.duplicate = function () { - return new Phaser.Physics.Shapes.Poly(this.verts); - }; - Poly.prototype.recenter = function (c) { - for(var i = 0; i < this.verts.length; i++) { - this.verts[i].subtract(c); - } - }; - Poly.prototype.transform = function (xf) { - for(var i = 0; i < this.verts.length; i++) { - this.verts[i] = Phaser.TransformUtils.transform(xf, this.verts[i]); - //this.verts[i] = xf.transform(this.verts[i]); - } - }; - Poly.prototype.untransform = function (xf) { - for(var i = 0; i < this.verts.length; i++) { - this.verts[i] = Phaser.TransformUtils.untransform(xf, this.verts[i]); - //this.verts[i] = xf.untransform(this.verts[i]); - } - }; - Poly.prototype.area = function () { - return Physics.AdvancedPhysics.areaForPoly(this.verts); - }; - Poly.prototype.centroid = function () { - return Physics.AdvancedPhysics.centroidForPoly(this.verts); - }; - Poly.prototype.inertia = function (mass) { - return Physics.AdvancedPhysics.inertiaForPoly(mass, this.verts, new Phaser.Vec2()); - }; - Poly.prototype.cacheData = function (xf) { - this.bounds.clear(); - var numVerts = this.verts.length; - Physics.AdvancedPhysics.write('----------- Poly cacheData = ' + numVerts); - if(numVerts == 0) { - return; - } - for(var i = 0; i < numVerts; i++) { - this.tverts[i] = Phaser.TransformUtils.transform(xf, this.verts[i]); - //this.tverts[i] = xf.transform(this.verts[i]); - Physics.AdvancedPhysics.write('tvert' + i + ' = ' + this.tverts[i].toString()); - } - if(numVerts < 2) { - this.bounds.addPoint(this.tverts[0]); - return; - } - for(var i = 0; i < numVerts; i++) { - var a = this.tverts[i]; - var b = this.tverts[(i + 1) % numVerts]; - var n = Phaser.Vec2Utils.normalize(Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(a, b))); - Physics.AdvancedPhysics.write('a = ' + a.toString()); - Physics.AdvancedPhysics.write('b = ' + b.toString()); - Physics.AdvancedPhysics.write('n = ' + n.toString()); - this.tplanes[i].normal = n; - this.tplanes[i].d = Phaser.Vec2Utils.dot(n, a); - Physics.AdvancedPhysics.write('tplanes' + i + ' n = ' + this.tplanes[i].normal.toString()); - Physics.AdvancedPhysics.write('tplanes' + i + ' d = ' + this.tplanes[i].d.toString()); - this.bounds.addPoint(a); - } - }; - Poly.prototype.pointQuery = function (p) { - if(!this.bounds.containPoint(p)) { - return false; - } - return this.containPoint(p); - }; - Poly.prototype.findVertexByPoint = function (p, minDist) { - var dsq = minDist * minDist; - for(var i = 0; i < this.tverts.length; i++) { - if(Phaser.Vec2Utils.distanceSq(this.tverts[i], p) < dsq) { - return i; - } - } - return -1; - }; - Poly.prototype.findEdgeByPoint = function (p, minDist) { - var dsq = minDist * minDist; - var numVerts = this.tverts.length; - for(var i = 0; i < this.tverts.length; i++) { - var v1 = this.tverts[i]; - var v2 = this.tverts[(i + 1) % numVerts]; - var n = this.tplanes[i].normal; - var dtv1 = Phaser.Vec2Utils.cross(v1, n); - var dtv2 = Phaser.Vec2Utils.cross(v2, n); - var dt = Phaser.Vec2Utils.cross(p, n); - if(dt > dtv1) { - if(Phaser.Vec2Utils.distanceSq(v1, p) < dsq) { - return i; - } - } else if(dt < dtv2) { - if(Phaser.Vec2Utils.distanceSq(v2, p) < dsq) { - return i; - } - } else { - var dist = Phaser.Vec2Utils.dot(n, p) - Phaser.Vec2Utils.dot(n, v1); - if(dist * dist < dsq) { - return i; - } - } - } - return -1; - }; - Poly.prototype.distanceOnPlane = function (n, d) { - var min = 999999; - for(var i = 0; i < this.verts.length; i++) { - min = Math.min(min, Phaser.Vec2Utils.dot(n, this.tverts[i])); - } - return min - d; - }; - Poly.prototype.containPoint = function (p) { - for(var i = 0; i < this.verts.length; i++) { - var plane = this.tplanes[i]; - if(Phaser.Vec2Utils.dot(plane.normal, p) - plane.d > 0) { - return false; - } - } - return true; - }; - Poly.prototype.containPointPartial = function (p, n) { - for(var i = 0; i < this.verts.length; i++) { - var plane = this.tplanes[i]; - if(Phaser.Vec2Utils.dot(plane.normal, n) < 0.0001) { - continue; - } - if(Phaser.Vec2Utils.dot(plane.normal, p) - plane.d > 0) { - return false; - } - } - return true; - }; - return Poly; - })(Phaser.Physics.Shape); - Shapes.Poly = Poly; - })(Physics.Shapes || (Physics.Shapes = {})); - var Shapes = Physics.Shapes; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/Poly.js.map b/wip/physics/shapes/Poly.js.map deleted file mode 100644 index 14f926d9..00000000 --- a/wip/physics/shapes/Poly.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Poly.js","sources":["Poly.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Shapes","Phaser.Physics.Shapes.Poly","Phaser.Physics.Shapes.Poly.constructor","Phaser.Physics.Shapes.Poly.finishVerts","Phaser.Physics.Shapes.Poly.duplicate","Phaser.Physics.Shapes.Poly.recenter","Phaser.Physics.Shapes.Poly.transform","Phaser.Physics.Shapes.Poly.untransform","Phaser.Physics.Shapes.Poly.area","Phaser.Physics.Shapes.Poly.centroid","Phaser.Physics.Shapes.Poly.inertia","Phaser.Physics.Shapes.Poly.cacheData","Phaser.Physics.Shapes.Poly.pointQuery","Phaser.Physics.Shapes.Poly.findVertexByPoint","Phaser.Physics.Shapes.Poly.findEdgeByPoint","Phaser.Physics.Shapes.Poly.distanceOnPlane","Phaser.Physics.Shapes.Poly.containPoint","Phaser.Physics.Shapes.Poly.containPointPartial"],"mappings":";;;;;AAaA,IAAO,MAAM;AA6RZ,CA7RD,UAAO,MAAM;KAANA,UAAOA,OAAOA;QAbrBC,2CAA2CA;QAC3CA,gDAAgDA;QAChDA,sCAAsCA;QACtCA,mCAAmCA;QACnCA,oCAAoCA;QACpCA,iCAAiCA;QAEjCA;;;;UAIEA;SAEKA,UAAeA,MAAMA;YAExBC;;gBAIIC,6GAF6GA;gBAC7GA,yGAAyGA;gBACzGA,SAJSA,IAAIA,CAIDA,KAAMA;oBAEdC,8BAAMA,eAAOA,CAACA,eAAeA,CAmRpCA;oBAjROA,IAAIA,CAACA,KAAKA,GAAGA,EAAEA;oBACfA,IAAIA,CAACA,MAAMA,GAAGA,EAAEA;oBAChBA,IAAIA,CAACA,MAAMA,GAAGA,EAAEA;oBAChBA,IAAIA,CAACA,OAAOA,GAAGA,EAAEA;oBAEjBA,GAAIA,KAAKA,CAACA;wBAENA,IAAKA,IAAIA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,KAAKA,CAACA,MAAMA,EAAEA,CAACA,EAAEA,CACrCA;4BACIA,IAAIA,CAACA,KAAKA,CAACA,CAACA,CAACA,GAAGA,IAAIA,MAAMA,CAACA,IAAIA,CAACA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAACA,EAAEA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;4B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AAD;IA7RMA;AA6RNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/Poly.ts b/wip/physics/shapes/Poly.ts deleted file mode 100644 index 0119dc47..00000000 --- a/wip/physics/shapes/Poly.ts +++ /dev/null @@ -1,299 +0,0 @@ -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Shapes - Convex Polygon -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics.Shapes { - - export class Poly extends Phaser.Physics.Shape implements IShape { - - // Verts is an optional array of objects, the objects must have public x and y properties which will be used - // to seed this polygon (i.e. Vec2 objects, or just straight JS objects) and must wind COUNTER clockwise - constructor(verts?) { - - super(AdvancedPhysics.SHAPE_TYPE_POLY); - - this.verts = []; - this.planes = []; - this.tverts = []; - this.tplanes = []; - - if (verts) - { - for (var i = 0; i < verts.length; i++) - { - this.verts[i] = new Phaser.Vec2(verts[i].x, verts[i].y); - this.tverts[i] = this.verts[i]; - //this.tverts[i] = new Phaser.Vec2(verts[i].x, verts[i].y); - this.tplanes[i] = new Phaser.Physics.Plane(new Phaser.Vec2, 0); - } - } - - this.finishVerts(); - - } - - - public finishVerts() { - - if (this.verts.length < 2) - { - this.convexity = false; - this.planes = []; - return; - } - - this.convexity = true; - this.tverts = []; - this.tplanes = []; - - // Must be counter-clockwise verts - for (var i = 0; i < this.verts.length; i++) - { - var a = this.verts[i]; - var b = this.verts[(i + 1) % this.verts.length]; - var n = Phaser.Vec2Utils.normalize(Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(a, b))); - - this.planes[i] = new Phaser.Physics.Plane(n, Phaser.Vec2Utils.dot(n, a)); - - this.tverts[i] = Phaser.Vec2Utils.clone(this.verts[i]); // reference??? - //this.tverts[i] = this.verts[i]; // reference??? - - this.tplanes[i] = new Phaser.Physics.Plane(new Phaser.Vec2, 0); - } - - for (var i = 0; i < this.verts.length; i++) - { - //var b = this.verts[(i + 2) % this.verts.length]; - //var n = this.planes[i].normal; - //var d = this.planes[i].d; - - if (Phaser.Vec2Utils.dot(this.planes[i].normal, this.verts[(i + 2) % this.verts.length]) - this.planes[i].d > 0) - { - this.convexity = false; - } - } - - } - - public duplicate() { - return new Phaser.Physics.Shapes.Poly(this.verts); - } - - public recenter(c) { - - for (var i = 0; i < this.verts.length; i++) - { - this.verts[i].subtract(c); - } - - } - - public transform(xf:Phaser.Transform) { - - for (var i = 0; i < this.verts.length; i++) - { - this.verts[i] = Phaser.TransformUtils.transform(xf, this.verts[i]); - //this.verts[i] = xf.transform(this.verts[i]); - } - } - - public untransform(xf:Phaser.Transform) { - - for (var i = 0; i < this.verts.length; i++) - { - this.verts[i] = Phaser.TransformUtils.untransform(xf, this.verts[i]); - //this.verts[i] = xf.untransform(this.verts[i]); - } - - } - - public area(): number { - return AdvancedPhysics.areaForPoly(this.verts); - } - - public centroid(): Phaser.Vec2 { - return AdvancedPhysics.centroidForPoly(this.verts); - } - - public inertia(mass: number): number { - return AdvancedPhysics.inertiaForPoly(mass, this.verts, new Phaser.Vec2); - } - - public cacheData(xf:Transform) { - - this.bounds.clear(); - - var numVerts = this.verts.length; - - AdvancedPhysics.write('----------- Poly cacheData = ' + numVerts); - - if (numVerts == 0) - { - return; - } - - for (var i = 0; i < numVerts; i++) - { - this.tverts[i] = Phaser.TransformUtils.transform(xf, this.verts[i]); - //this.tverts[i] = xf.transform(this.verts[i]); - AdvancedPhysics.write('tvert' + i + ' = ' + this.tverts[i].toString()); - } - - if (numVerts < 2) - { - this.bounds.addPoint(this.tverts[0]); - return; - } - - for (var i = 0; i < numVerts; i++) - { - var a = this.tverts[i]; - var b = this.tverts[(i + 1) % numVerts]; - var n = Phaser.Vec2Utils.normalize(Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(a, b))); - - AdvancedPhysics.write('a = ' + a.toString()); - AdvancedPhysics.write('b = ' + b.toString()); - AdvancedPhysics.write('n = ' + n.toString()); - - this.tplanes[i].normal = n; - this.tplanes[i].d = Phaser.Vec2Utils.dot(n, a); - - AdvancedPhysics.write('tplanes' + i + ' n = ' + this.tplanes[i].normal.toString()); - AdvancedPhysics.write('tplanes' + i + ' d = ' + this.tplanes[i].d.toString()); - - this.bounds.addPoint(a); - - } - - } - - public pointQuery(p: Phaser.Vec2): bool { - - if (!this.bounds.containPoint(p)) - { - return false; - } - - return this.containPoint(p); - } - - public findVertexByPoint(p:Phaser.Vec2, minDist: number): number { - - var dsq = minDist * minDist; - - for (var i = 0; i < this.tverts.length; i++) - { - if (Phaser.Vec2Utils.distanceSq(this.tverts[i], p) < dsq) - { - return i; - } - } - - return -1; - } - - public findEdgeByPoint(p: Phaser.Vec2, minDist: number): number { - - var dsq = minDist * minDist; - var numVerts = this.tverts.length; - - for (var i = 0; i < this.tverts.length; i++) - { - var v1 = this.tverts[i]; - var v2 = this.tverts[(i + 1) % numVerts]; - var n = this.tplanes[i].normal; - - var dtv1 = Phaser.Vec2Utils.cross(v1, n); - var dtv2 = Phaser.Vec2Utils.cross(v2, n); - var dt = Phaser.Vec2Utils.cross(p, n); - - if (dt > dtv1) - { - if (Phaser.Vec2Utils.distanceSq(v1, p) < dsq) - { - return i; - } - } - else if (dt < dtv2) - { - if (Phaser.Vec2Utils.distanceSq(v2, p) < dsq) - { - return i; - } - } - else - { - var dist = Phaser.Vec2Utils.dot(n, p) - Phaser.Vec2Utils.dot(n, v1); - - if (dist * dist < dsq) - { - return i; - } - } - } - - return -1; - - } - - public distanceOnPlane(n: Phaser.Vec2, d:number) { - - var min: number = 999999; - - for (var i = 0; i < this.verts.length; i++) - { - min = Math.min(min, Phaser.Vec2Utils.dot(n, this.tverts[i])); - } - - return min - d; - - } - - public containPoint(p: Phaser.Vec2) { - - for (var i = 0; i < this.verts.length; i++) - { - var plane = this.tplanes[i]; - - if (Phaser.Vec2Utils.dot(plane.normal, p) - plane.d > 0) - { - return false; - } - } - - return true; - - } - - public containPointPartial(p, n) { - - for (var i = 0; i < this.verts.length; i++) - { - var plane = this.tplanes[i]; - - if (Phaser.Vec2Utils.dot(plane.normal, n) < 0.0001) - { - continue; - } - - if (Phaser.Vec2Utils.dot(plane.normal, p) - plane.d > 0) - { - return false; - } - } - - return true; - } - - } - -} \ No newline at end of file diff --git a/wip/physics/shapes/Segment.js b/wip/physics/shapes/Segment.js deleted file mode 100644 index 678f8047..00000000 --- a/wip/physics/shapes/Segment.js +++ /dev/null @@ -1,141 +0,0 @@ -var __extends = this.__extends || function (d, b) { - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Phaser; -(function (Phaser) { - (function (Physics) { - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Shapes - Segment - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Shapes) { - var Segment = (function (_super) { - __extends(Segment, _super); - function Segment(a, b, radius) { - _super.call(this, Physics.AdvancedPhysics.SHAPE_TYPE_SEGMENT); - this.a = a.duplicate(); - this.b = b.duplicate(); - this.radius = radius; - this.normal = Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(b, a)); - this.normal.normalize(); - this.ta = new Phaser.Vec2(); - this.tb = new Phaser.Vec2(); - this.tn = new Phaser.Vec2(); - this.finishVerts(); - } - Segment.prototype.finishVerts = function () { - this.normal = Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(this.b, this.a)); - this.normal.normalize(); - this.radius = Math.abs(this.radius); - }; - Segment.prototype.duplicate = function () { - return new Phaser.Physics.Shapes.Segment(this.a, this.b, this.radius); - }; - Segment.prototype.recenter = function (c) { - this.a.subtract(c); - this.b.subtract(c); - }; - Segment.prototype.transform = function (xf) { - Phaser.TransformUtils.transform(xf, this.a, this.a); - Phaser.TransformUtils.transform(xf, this.b, this.b); - //this.a = xf.transform(this.a); - //this.b = xf.transform(this.b); - }; - Segment.prototype.untransform = function (xf) { - Phaser.TransformUtils.untransform(xf, this.a, this.a); - Phaser.TransformUtils.untransform(xf, this.b, this.b); - //this.a = xf.untransform(this.a); - //this.b = xf.untransform(this.b); - }; - Segment.prototype.area = function () { - return Physics.AdvancedPhysics.areaForSegment(this.a, this.b, this.radius); - }; - Segment.prototype.centroid = function () { - return Physics.AdvancedPhysics.centroidForSegment(this.a, this.b); - }; - Segment.prototype.inertia = function (mass) { - return Physics.AdvancedPhysics.inertiaForSegment(mass, this.a, this.b); - }; - Segment.prototype.cacheData = function (xf) { - Phaser.TransformUtils.transform(xf, this.a, this.ta); - Phaser.TransformUtils.transform(xf, this.b, this.tb); - //this.ta = xf.transform(this.a); - //this.tb = xf.transform(this.b); - this.tn = Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(this.tb, this.ta)).normalize(); - var l; - var r; - var t; - var b; - if(this.ta.x < this.tb.x) { - l = this.ta.x; - r = this.tb.x; - } else { - l = this.tb.x; - r = this.ta.x; - } - if(this.ta.y < this.tb.y) { - b = this.ta.y; - t = this.tb.y; - } else { - b = this.tb.y; - t = this.ta.y; - } - this.bounds.mins.setTo(l - this.radius, b - this.radius); - this.bounds.maxs.setTo(r + this.radius, t + this.radius); - }; - Segment.prototype.pointQuery = function (p) { - if(!this.bounds.containPoint(p)) { - return false; - } - var dn = Phaser.Vec2Utils.dot(this.tn, p) - Phaser.Vec2Utils.dot(this.ta, this.tn); - var dist = Math.abs(dn); - if(dist > this.radius) { - return false; - } - var dt = Phaser.Vec2Utils.cross(p, this.tn); - var dta = Phaser.Vec2Utils.cross(this.ta, this.tn); - var dtb = Phaser.Vec2Utils.cross(this.tb, this.tn); - if(dt <= dta) { - if(dt < dta - this.radius) { - return false; - } - return Phaser.Vec2Utils.distanceSq(this.ta, p) < (this.radius * this.radius); - } else if(dt > dtb) { - if(dt > dtb + this.radius) { - return false; - } - return Phaser.Vec2Utils.distanceSq(this.tb, p) < (this.radius * this.radius); - } - return true; - }; - Segment.prototype.findVertexByPoint = function (p, minDist) { - var dsq = minDist * minDist; - if(Phaser.Vec2Utils.distanceSq(this.ta, p) < dsq) { - return 0; - } - if(Phaser.Vec2Utils.distanceSq(this.tb, p) < dsq) { - return 1; - } - return -1; - }; - Segment.prototype.distanceOnPlane = function (n, d) { - var a = Phaser.Vec2Utils.dot(n, this.ta) - this.radius; - var b = Phaser.Vec2Utils.dot(n, this.tb) - this.radius; - return Math.min(a, b) - d; - }; - return Segment; - })(Phaser.Physics.Shape); - Shapes.Segment = Segment; - })(Physics.Shapes || (Physics.Shapes = {})); - var Shapes = Physics.Shapes; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/Segment.js.map b/wip/physics/shapes/Segment.js.map deleted file mode 100644 index d7f8512a..00000000 --- a/wip/physics/shapes/Segment.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Segment.js","sources":["Segment.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Shapes","Phaser.Physics.Shapes.Segment","Phaser.Physics.Shapes.Segment.constructor","Phaser.Physics.Shapes.Segment.finishVerts","Phaser.Physics.Shapes.Segment.duplicate","Phaser.Physics.Shapes.Segment.recenter","Phaser.Physics.Shapes.Segment.transform","Phaser.Physics.Shapes.Segment.untransform","Phaser.Physics.Shapes.Segment.area","Phaser.Physics.Shapes.Segment.centroid","Phaser.Physics.Shapes.Segment.inertia","Phaser.Physics.Shapes.Segment.cacheData","Phaser.Physics.Shapes.Segment.pointQuery","Phaser.Physics.Shapes.Segment.findVertexByPoint","Phaser.Physics.Shapes.Segment.distanceOnPlane"],"mappings":";;;;;AAYA,IAAO,MAAM;AA+LZ,CA/LD,UAAO,MAAM;KAANA,UAAOA,OAAOA;QAZrBC,2CAA2CA;QAC3CA,gDAAgDA;QAChDA,sCAAsCA;QACtCA,mCAAmCA;QACnCA,iCAAiCA;QAEjCA;;;;UAIEA;SAEKA,UAAeA,MAAMA;YAExBC;;gBAEIC,SAFSA,OAAOA,CAEJA,CAACA,EAAEA,CAACA,EAAEA,MAAcA;oBAE5BC,8BAAMA,eAAOA,CAACA,kBAAkBA,CAuLvCA;oBAr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,CAACA,SAASA,CAACA,EAAEA,EAAEA,IAAIA,CAACA,CAACA,EAAEA,IAAIA,CAACA,EAAEA,CAACA;oBACpDA,MAAMA,CAACA,cAAcA,CAACA,SAASA,CAACA,EAAEA,EAAEA,IAAIA,CAACA,CAACA,EAAEA,IAAIA,CAACA,EAAEA,CAACA;oBAEpDA,iCAAiCA;oBACjCA,iCAAiCA;oBAEjCA,IAAIA,CAACA,EAAEA,GAAGA,MAAMA,CAACA,SAASA,CAACA,IAAIA,CAACA,MAAMA,CAACA,SAASA,CAACA,QAAQA,CAACA,IAAIA,CAACA,EAAEA,EAAEA,IAAIA,CAACA,EAAEA,CAACA,CAACA,CAACA,SAASA,EAAEA;oBAExFA,IAAIA,CAACA,CAACA;oBACNA,IAAIA,CAACA,CAACA;oBACNA,IAAIA,CAACA,CAACA;oBACNA,IAAIA,CAACA,CAACA;oBAENA,GAAIA,IAAIA,CAACA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA,CAACA;wBAEtBA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;wBACbA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;qBAChBA,KAEDA;wBACIA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;wBACbA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;qBAChBA;oBAEDA,GAAIA,IAAIA,CAACA,EAAEA,CAACA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA,CAACA;wBAEtBA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;wBACbA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;qBAChBA,KACDA;wBACIA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;wBACbA,CAACA,GAAGA,IAAIA,CAACA,EAAEA,CAACA,CAACA;qBAChBA;oBAEDA,IAAIA,CAACA,MAAMA,CA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EA,CAACA,GAAGA,IAAIA,CAACA,MAAMA,CAACA;oBACvDA,IAAIA,CAACA,GAAGA,MAAMA,CAACA,SAASA,CAACA,GAAGA,CAACA,CAACA,EAAEA,IAAIA,CAACA,EAAEA,CAACA,GAAGA,IAAIA,CAACA,MAAMA,CAACA;oBAEvDA,OAAOA,IAAIA,CAACA,GAAGA,CAACA,CAACA,EAAEA,CAACA,CAACA,GAAGA,CAACA,CAACA;gBAC9BA,CAACA;gBAELb;AAACA,YAADA,CAACA,EA3L4BD,MAAMA,CAACA,OAAOA,CAACA,KAAKA,EA2LhDA;YA3LDA,yBA2LCA,YAAAA;QAELA,CAACA,2CAAAD;QA/LMA;AA+LNA,IAADA,CAACA,2CAAAD;IA/LMA;AA+LNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/Segment.ts b/wip/physics/shapes/Segment.ts deleted file mode 100644 index 7416c03b..00000000 --- a/wip/physics/shapes/Segment.ts +++ /dev/null @@ -1,204 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Shapes - Segment -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics.Shapes { - - export class Segment extends Phaser.Physics.Shape implements IShape { - - constructor(a, b, radius: number) { - - super(AdvancedPhysics.SHAPE_TYPE_SEGMENT); - - this.a = a.duplicate(); - this.b = b.duplicate(); - this.radius = radius; - - this.normal = Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(b, a)); - this.normal.normalize(); - - this.ta = new Phaser.Vec2; - this.tb = new Phaser.Vec2; - this.tn = new Phaser.Vec2; - - this.finishVerts(); - - } - - public a: Phaser.Vec2; - public b: Phaser.Vec2; - public radius: number; - - public normal: Phaser.Vec2; - public ta: Phaser.Vec2; - public tb: Phaser.Vec2; - public tn: Phaser.Vec2; - - public finishVerts() { - - this.normal = Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(this.b, this.a)); - this.normal.normalize(); - - this.radius = Math.abs(this.radius); - - } - - public duplicate() { - return new Phaser.Physics.Shapes.Segment(this.a, this.b, this.radius); - } - - public recenter(c) { - this.a.subtract(c); - this.b.subtract(c); - } - - public transform(xf:Transform) { - - Phaser.TransformUtils.transform(xf, this.a, this.a); - Phaser.TransformUtils.transform(xf, this.b, this.b); - - //this.a = xf.transform(this.a); - //this.b = xf.transform(this.b); - - } - - public untransform(xf:Transform) { - - Phaser.TransformUtils.untransform(xf, this.a, this.a); - Phaser.TransformUtils.untransform(xf, this.b, this.b); - - //this.a = xf.untransform(this.a); - //this.b = xf.untransform(this.b); - - } - - public area(): number { - return AdvancedPhysics.areaForSegment(this.a, this.b, this.radius); - } - - public centroid(): Phaser.Vec2 { - return AdvancedPhysics.centroidForSegment(this.a, this.b); - } - - public inertia(mass: number): number { - return AdvancedPhysics.inertiaForSegment(mass, this.a, this.b); - } - - public cacheData(xf:Transform) { - - Phaser.TransformUtils.transform(xf, this.a, this.ta); - Phaser.TransformUtils.transform(xf, this.b, this.tb); - - //this.ta = xf.transform(this.a); - //this.tb = xf.transform(this.b); - - this.tn = Phaser.Vec2Utils.perp(Phaser.Vec2Utils.subtract(this.tb, this.ta)).normalize(); - - var l; - var r; - var t; - var b; - - if (this.ta.x < this.tb.x) - { - l = this.ta.x; - r = this.tb.x; - } - else - { - l = this.tb.x; - r = this.ta.x; - } - - if (this.ta.y < this.tb.y) - { - b = this.ta.y; - t = this.tb.y; - } else - { - b = this.tb.y; - t = this.ta.y; - } - - this.bounds.mins.setTo(l - this.radius, b - this.radius); - this.bounds.maxs.setTo(r + this.radius, t + this.radius); - - } - - public pointQuery(p: Phaser.Vec2): bool { - - if (!this.bounds.containPoint(p)) - { - return false; - } - - var dn = Phaser.Vec2Utils.dot(this.tn, p) - Phaser.Vec2Utils.dot(this.ta, this.tn); - var dist = Math.abs(dn); - - if (dist > this.radius) - { - return false; - } - - var dt = Phaser.Vec2Utils.cross(p, this.tn); - var dta = Phaser.Vec2Utils.cross(this.ta, this.tn); - var dtb = Phaser.Vec2Utils.cross(this.tb, this.tn); - - if (dt <= dta) - { - if (dt < dta - this.radius) - { - return false; - } - - return Phaser.Vec2Utils.distanceSq(this.ta, p) < (this.radius * this.radius); - } - else if (dt > dtb) - { - if (dt > dtb + this.radius) - { - return false; - } - - return Phaser.Vec2Utils.distanceSq(this.tb, p) < (this.radius * this.radius); - } - - return true; - } - - public findVertexByPoint(p:Phaser.Vec2, minDist: number): number { - - var dsq = minDist * minDist; - - if (Phaser.Vec2Utils.distanceSq(this.ta, p) < dsq) - { - return 0; - } - - if (Phaser.Vec2Utils.distanceSq(this.tb, p) < dsq) - { - return 1; - } - - return -1; - } - - public distanceOnPlane(n, d) { - - var a = Phaser.Vec2Utils.dot(n, this.ta) - this.radius; - var b = Phaser.Vec2Utils.dot(n, this.tb) - this.radius; - - return Math.min(a, b) - d; - } - - } - -} \ No newline at end of file diff --git a/wip/physics/shapes/Shape.js b/wip/physics/shapes/Shape.js deleted file mode 100644 index 12786dac..00000000 --- a/wip/physics/shapes/Shape.js +++ /dev/null @@ -1,33 +0,0 @@ -var Phaser; -(function (Phaser) { - /// - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Shape - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Physics) { - var Shape = (function () { - function Shape(type) { - this.id = Physics.AdvancedPhysics.shapeCounter++; - this.type = type; - this.elasticity = 0.0; - this.friction = 1.0; - this.density = 1; - this.bounds = new Physics.Bounds(); - } - Shape.prototype.findEdgeByPoint = // Over-ridden by ShapePoly - function (p, minDist) { - return -1; - }; - return Shape; - })(); - Physics.Shape = Shape; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/Shape.js.map b/wip/physics/shapes/Shape.js.map deleted file mode 100644 index eef9473d..00000000 --- a/wip/physics/shapes/Shape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Shape.js","sources":["Shape.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Shape","Phaser.Physics.Shape.constructor","Phaser.Physics.Shape.findEdgeByPoint"],"mappings":"AAaA,IAAO,MAAM;AAgDZ,CAhDD,UAAO,MAAM;IAbbA,2CAA2CA;IAC3CA,gDAAgDA;IAChDA,sCAAsCA;IACtCA,mCAAmCA;IACnCA,qCAAqCA;IACrCA,kCAAkCA;IAElCA;;;;MAIEA;KAEKA,UAAOA,OAAOA;QAEjBC;YAEIC,SAFSA,KAAKA,CAEFA,IAAYA;gBAEpBC,IAAIA,CAACA,EAAEA,GAAGA,MAAMA,CAACA,OAAOA,CAACA,OAAOA,CAACA,YAAYA,EAAEA;gBAC/CA,IAAIA,CAACA,IAAIA,GAAGA,IAAIA;gBAEhBA,IAAIA,CAACA,UAAUA,GAAGA,GAAGA;gBACrBA,IAAIA,CAACA,QAAQA,GAAGA,GAAGA;gBACnBA,IAAIA,CAACA,OAAOA,GAAGA,CAACA;gBAEhBA,IAAIA,CAACA,MAAMA,GAAGA,IAAIA,MAAMA,EAAAA;YAE5BA,CAACA;YA2BDD,kCADAA,4BAA4BA;YAC5BA,UAAuBA,CAAcA,EAAEA,OAAeA;gBAClDE,OAAOA,CAACA,CAACA,CAACA;YACdA,CAACA;YAELF;AAACA,QAADA,CAACA,IAAAD;QA5CDA,sBA4CCA,QAAAA;IAELA,CAACA,2CAAAD;IAhDMA;AAgDNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/Shape.ts b/wip/physics/shapes/Shape.ts deleted file mode 100644 index edac5aa2..00000000 --- a/wip/physics/shapes/Shape.ts +++ /dev/null @@ -1,62 +0,0 @@ -/// -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Shape -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics { - - export class Shape { - - constructor(type: number) { - - this.id = AdvancedPhysics.shapeCounter++; - this.type = type; - - this.elasticity = 0.0; - this.friction = 1.0; - this.density = 1; - - this.bounds = new Bounds; - - } - - public id: number; - public type: number; - public body: Body; - - public verts: Phaser.Vec2[]; - public planes: Phaser.Physics.Plane[]; - - public tverts: Phaser.Vec2[]; - public tplanes: Phaser.Physics.Plane[]; - - public convexity: bool; - - // Coefficient of restitution (elasticity) - public elasticity: number; - - // Frictional coefficient - public friction: number; - - // Mass density - public density: number; - - // Axis-aligned bounding box - public bounds: Bounds; - - // Over-ridden by ShapePoly - public findEdgeByPoint(p: Phaser.Vec2, minDist: number): number { - return -1; - } - - } - -} \ No newline at end of file diff --git a/wip/physics/shapes/Triangle.js b/wip/physics/shapes/Triangle.js deleted file mode 100644 index 2c8aea16..00000000 --- a/wip/physics/shapes/Triangle.js +++ /dev/null @@ -1,51 +0,0 @@ -var __extends = this.__extends || function (d, b) { - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -var Phaser; -(function (Phaser) { - (function (Physics) { - /// - /// - /// - /// - /// - /** - * Phaser - Advanced Physics - Shapes - Triangle - * - * Based on the work Ju Hyung Lee started in JS PhyRus. - */ - (function (Shapes) { - var Triangle = (function (_super) { - __extends(Triangle, _super); - function Triangle(x1, y1, x2, y2, x3, y3) { - x1 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x1); - y1 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y1); - x2 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x2); - y2 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y2); - x3 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x3); - y3 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y3); - _super.call(this, [ - { - x: x1, - y: y1 - }, - { - x: x2, - y: y2 - }, - { - x: x3, - y: y3 - } - ]); - } - return Triangle; - })(Phaser.Physics.Shapes.Poly); - Shapes.Triangle = Triangle; - })(Physics.Shapes || (Physics.Shapes = {})); - var Shapes = Physics.Shapes; - })(Phaser.Physics || (Phaser.Physics = {})); - var Physics = Phaser.Physics; -})(Phaser || (Phaser = {})); diff --git a/wip/physics/shapes/Triangle.js.map b/wip/physics/shapes/Triangle.js.map deleted file mode 100644 index c1b54ffa..00000000 --- a/wip/physics/shapes/Triangle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Triangle.js","sources":["Triangle.ts"],"names":["Phaser","Phaser.Physics","Phaser.Physics.Shapes","Phaser.Physics.Shapes.Triangle","Phaser.Physics.Shapes.Triangle.constructor"],"mappings":";;;;;AAYA,IAAO,MAAM;AAmBZ,CAnBD,UAAO,MAAM;KAANA,UAAOA,OAAOA;QAZrBC,2CAA2CA;QAC3CA,sCAAsCA;QACtCA,mCAAmCA;QACnCA,iCAAiCA;QACjCA,gCAAgCA;QAEhCA;;;;UAIEA;SAEKA,UAAeA,MAAMA;YAExBC;;gBAEIC,SAFSA,QAAQA,CAELA,EAAUA,EAAEA,EAAUA,EAAEA,EAAUA,EAAEA,EAAUA,EAAEA,EAAUA,EAAEA,EAAUA;oBAE9EC,EAAEA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,EAAEA,CAACA;oBAC/BA,EAAEA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,EAAEA,CAACA;oBAC/BA,EAAEA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,EAAEA,CAACA;oBAC/BA,EAAEA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,EAAEA,CAACA;oBAC/BA,EAAEA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,EAAEA,CAACA;oBAC/BA,EAAEA,GAAGA,eAAOA,CAACA,cAAcA,CAACA,EAAEA,CAACA;oBAE/BA,8BAAMA;gBAACA;oBAAEA,CAACA,EAAEA,EAAEA;oBAAEA,CAACA,EAAEA,EAAEA;iBAAEA;gBAAEA;oBAAEA,CAACA,EAAEA,EAAEA;oBAAEA,CAACA,EAAEA,EAAEA;iBAAEA;gBAAEA;oBAAEA,CAACA,EAAEA,EAAEA;oBAAEA,CAACA,EAAEA,EAAEA;iBAAEA;aAACA,CAInEA;gBAFGA,CAACA;gBAELD;AAACA,YAADA,CAACA,EAf6BD,MAAMA,CAACA,OAAOA,CAACA,MAAMA,CAACA,IAAIA,EAevDA;YAfDA,2BAeCA,YAAAA;QAELA,CAACA,2CAAAD;QAnBMA;AAmBNA,IAADA,CAACA,2CAAAD;IAnBMA;AAmBNA,CAAAA,2BAAA"} \ No newline at end of file diff --git a/wip/physics/shapes/Triangle.ts b/wip/physics/shapes/Triangle.ts deleted file mode 100644 index 03842876..00000000 --- a/wip/physics/shapes/Triangle.ts +++ /dev/null @@ -1,32 +0,0 @@ -/// -/// -/// -/// -/// - -/** -* Phaser - Advanced Physics - Shapes - Triangle -* -* Based on the work Ju Hyung Lee started in JS PhyRus. -*/ - -module Phaser.Physics.Shapes { - - export class Triangle extends Phaser.Physics.Shapes.Poly { - - constructor(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number) { - - x1 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x1); - y1 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y1); - x2 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x2); - y2 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y2); - x3 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(x3); - y3 = Phaser.Physics.AdvancedPhysics.pixelsToMeters(y3); - - super([{ x: x1, y: y1 }, { x: x2, y: y2 }, { x: x3, y: y3 }]); - - } - - } - -} From 94c7c57e1c2ff10d6d777c81c76babe08667a011 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Wed, 23 Oct 2013 15:13:21 +0100 Subject: [PATCH 099/125] Fixed WebGL detection and code colour on Firefox. --- examples/_site/css/phaser-examples.css | 2 +- examples/index.html | 2 +- src/system/Device.js | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/_site/css/phaser-examples.css b/examples/_site/css/phaser-examples.css index abd5b211..c3ffec32 100644 --- a/examples/_site/css/phaser-examples.css +++ b/examples/_site/css/phaser-examples.css @@ -166,7 +166,7 @@ ul.right-controls > li{margin:0;padding:0; display: inline-block; vertical-align .reset-button{width: 121px; height:52px; display:inline-block; background: url('../../_site/images/reset-button.png') no-repeat;} .pause-button:hover, .mute-button:hover, .reset-button:hover{cursor: pointer;} .filler{height: 720px;} -.code-block{font-family: Courier; font-size: 12px; width:750px; height:auto; overflow: scroll; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} +.code-block{font-family: Courier; font-size: 12px; color: #fff; width:750px; height:auto; overflow: scroll; margin:0 auto; border-radius: 10px; background:#fdfdfd; border:0 !important; box-shadow: inset 0 5px 15px rgba(0,0,0,0.15), 0 0 10px rgba(106,200,248,0.5); padding: 25px !important;display: block; margin-bottom: 20px; margin-top: 30px;} .px800{width:800px; clear:both; display: block; margin:0 auto; line-height: 1.5em;} .gradient p{color:#333;} diff --git a/examples/index.html b/examples/index.html index 0bea009e..9ecc2085 100644 --- a/examples/index.html +++ b/examples/index.html @@ -24,7 +24,7 @@ - + diff --git a/src/system/Device.js b/src/system/Device.js index 5aa7cec3..bcb97952 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -324,6 +324,16 @@ Phaser.Device.prototype = { this.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; this.fileSystem = !!window['requestFileSystem']; this.webGL = ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )(); + + if (this.webGL === null) + { + this.webGL = false; + } + else + { + this.webGL = true; + } + this.worker = !!window['Worker']; if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) { From 7b052c302fb2bc08749bbc41756227fa6020921b Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 23 Oct 2013 12:09:54 +0200 Subject: [PATCH 100/125] Remove old gruntfile --- GruntFile.js | 80 ---------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 GruntFile.js diff --git a/GruntFile.js b/GruntFile.js deleted file mode 100644 index e83f27d1..00000000 --- a/GruntFile.js +++ /dev/null @@ -1,80 +0,0 @@ -module.exports = function (grunt) { - grunt.loadNpmTasks('grunt-typescript'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-copy'); - - var wrapPhaserInUmd = function(content, isAddon) { - var replacement = [ - '(function (root, factory) {', - ' if (typeof exports === \'object\') {', - ' module.exports = factory();', - ' } else if (typeof define === \'function\' && define.amd) {', - ' define(factory);', - ' } else {', - ' root.Phaser = factory();', - ' }', - '}(this, function () {', - content, - 'return Phaser;', - '}));' - ]; - return replacement.join('\n'); - }; - - var wrapAddonInUmd = function(content) { - var replacement = [ - '(function (root, factory) {', - ' if (typeof exports === \'object\') {', - ' module.exports = factory(require(\'phaser\'));', - ' } else if (typeof define === \'function\' && define.amd) {', - ' define([\'phaser\'], factory);', - ' } else {', - ' factory(root.Phaser);', - ' }', - '}(this, function (Phaser) {', - content, - 'return Phaser;', - '}));' - ]; - return replacement.join('\n'); - }; - - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - typescript: { - base: { - src: ['Phaser/**/*.ts'], - dest: 'build/phaser.js', - options: { - target: 'ES5', - declaration: true, - comments: true - } - }, - }, - copy: { - main: { - files: [{ - src: 'build/phaser.js', - dest: 'Tests/phaser.js' - }] - }, - mainAmd: { - files: [{ - src: 'build/phaser.js', - dest: 'build/phaser.amd.js' - }], - options: { - processContent: wrapPhaserInUmd - } - }, - }, - watch: { - files: '**/*.ts', - tasks: ['typescript', 'copy'] - } - }); - - grunt.registerTask('default', ['typescript', 'copy', 'watch']); - -} From dfee9f9b2fd1193c0dae5fd7118832d08d697085 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 23 Oct 2013 14:15:56 +0200 Subject: [PATCH 101/125] Add new Grunt build --- .gitignore | 8 +- Gruntfile.js | 168 +++++++ examples/_site/examples.json | 819 ++++++++++++++++++++++++++-------- examples/_site/view_full.html | 4 +- examples/_site/view_lite.html | 4 +- package.json | 22 +- src/Intro.js | 2 +- src/Phaser.js | 8 +- src/core/Game.js | 25 +- tasks/examples.js | 49 ++ tasks/umd.js | 35 ++ 11 files changed, 920 insertions(+), 224 deletions(-) create mode 100644 Gruntfile.js create mode 100644 tasks/examples.js create mode 100644 tasks/umd.js diff --git a/.gitignore b/.gitignore index 53a21490..e3173cf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,13 @@ +# System and IDE files .DS_Store .idea Phaser OSX.sublime-project Phaser OSX.sublime-workspace Phaser.sublime-project Phaser.sublime-workspace -node_modules + +# Vendors +node_modules/ + +# Build +dist/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..0e12c14b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,168 @@ +module.exports = function (grunt) { + + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadTasks('./tasks'); + + grunt.initConfig({ + compile_dir: 'dist', + src: { + phaser: [ + 'src/Intro.js', + 'src/pixi/Pixi.js', + 'src/Phaser.js', + 'src/utils/Utils.js', + 'src/pixi/core/Matrix.js', + 'src/pixi/core/Point.js', + 'src/pixi/core/Rectangle.js', + 'src/pixi/display/DisplayObject.js', + 'src/pixi/display/DisplayObjectContainer.js', + 'src/pixi/display/Sprite.js', + 'src/pixi/display/Stage.js', + 'src/pixi/extras/CustomRenderable.js', + 'src/pixi/extras/Strip.js', + 'src/pixi/extras/Rope.js', + 'src/pixi/extras/TilingSprite.js', + 'src/pixi/filters/FilterBlock.js', + 'src/pixi/filters/MaskFilter.js', + 'src/pixi/primitives/Graphics.js', + 'src/pixi/renderers/canvas/CanvasGraphics.js', + 'src/pixi/renderers/canvas/CanvasRenderer.js', + 'src/pixi/renderers/webgl/WebGLBatch.js', + 'src/pixi/renderers/webgl/WebGLGraphics.js', + 'src/pixi/renderers/webgl/WebGLRenderer.js', + 'src/pixi/renderers/webgl/WebGLRenderGroup.js', + 'src/pixi/renderers/webgl/WebGLShaders.js', + 'src/pixi/text/BitmapText.js', + 'src/pixi/text/Text.js', + 'src/pixi/textures/BaseTexture.js', + 'src/pixi/textures/Texture.js', + 'src/pixi/textures/RenderTexture.js', + 'src/pixi/utils/EventTarget.js', + 'src/pixi/utils/Polyk.js', + 'src/core/Camera.js', + 'src/core/State.js', + 'src/core/StateManager.js', + 'src/core/LinkedList.js', + 'src/core/Signal.js', + 'src/core/SignalBinding.js', + 'src/core/Plugin.js', + 'src/core/PluginManager.js', + 'src/core/Stage.js', + 'src/core/Group.js', + 'src/core/World.js', + 'src/core/Game.js', + 'src/input/Input.js', + 'src/input/Key.js', + 'src/input/Keyboard.js', + 'src/input/Mouse.js', + 'src/input/MSPointer.js', + 'src/input/Pointer.js', + 'src/input/Touch.js', + 'src/input/InputHandler.js', + 'src/gameobjects/Events.js', + 'src/gameobjects/GameObjectFactory.js', + 'src/gameobjects/Sprite.js', + 'src/gameobjects/TileSprite.js', + 'src/gameobjects/Text.js', + 'src/gameobjects/BitmapText.js', + 'src/gameobjects/Button.js', + 'src/gameobjects/Graphics.js', + 'src/gameobjects/RenderTexture.js', + 'src/system/Canvas.js', + 'src/system/StageScaleMode.js', + 'src/system/Device.js', + 'src/system/RequestAnimationFrame.js', + 'src/math/RandomDataGenerator.js', + 'src/math/Math.js', + 'src/math/QuadTree.js', + 'src/geom/Circle.js', + 'src/geom/Point.js', + 'src/geom/Rectangle.js', + 'src/net/Net.js', + 'src/tween/TweenManager.js', + 'src/tween/Tween.js', + 'src/tween/Easing.js', + 'src/time/Time.js', + 'src/animation/AnimationManager.js', + 'src/animation/Animation.js', + 'src/animation/Frame.js', + 'src/animation/FrameData.js', + 'src/animation/AnimationParser.js', + 'src/loader/Cache.js', + 'src/loader/Loader.js', + 'src/loader/LoaderParser.js', + 'src/sound/Sound.js', + 'src/sound/SoundManager.js', + 'src/utils/Debug.js', + 'src/utils/Color.js', + 'src/physics/arcade/ArcadePhysics.js', + 'src/physics/arcade/Body.js', + 'src/particles/Particles.js', + 'src/particles/arcade/ArcadeParticles.js', + 'src/particles/arcade/Emitter.js', + 'src/tilemap/Tile.js', + 'src/tilemap/Tilemap.js', + 'src/tilemap/TilemapLayer.js', + 'src/tilemap/TilemapParser.js', + 'src/tilemap/Tileset.js', + 'src/PixiPatch.js' + ] + }, + pkg: grunt.file.readJSON('package.json'), + clean: ['<%= compile_dir %>'], + concat: { + phaser: { + options: { + process: { + data: { + version: '<%= pkg.version %>', + buildDate: '<%= grunt.template.today() %>' + } + } + }, + src: ['<%= src.phaser %>'], + dest: '<%= compile_dir %>/phaser.js' + } + }, + umd: { + phaser: { + src: '<%= concat.phaser.dest %>', + dest: '<%= umd.phaser.src %>' + } + }, + uglify: { + phaser: { + options: { + banner: '/*! Phaser v<%= pkg.version %> | (c) 2013 Photon Storm Ltd. */\n' + }, + src: ['<%= umd.phaser.dest %>'], + dest: '<%= compile_dir %>/phaser.min.js' + } + }, + examples: { + all: { + options: { + base: 'examples', + excludes: ['_site', 'assets', 'states', 'wip'] + }, + src: ['examples/**/*.js'], + dest: 'examples/_site/examples.json' + } + }, + connect: { + root: { + options: { + keepalive: true + } + } + } + }); + + grunt.registerTask('default', ['build', 'examples']); + grunt.registerTask('build', ['clean', 'concat', 'umd', 'uglify']); + +}; diff --git a/examples/_site/examples.json b/examples/_site/examples.json index b9ad235a..40ed7616 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -1,191 +1,632 @@ { -"basics": [ - { "file": "01+-+load+an+image.js", "title": "01 - load an image" } -], -"games": [ - { "file": "breakout.js", "title": "breakout" }, - { "file": "invaders.js", "title": "invaders" }, - { "file": "starstruck.js", "title": "starstruck" }, - { "file": "tanks.js", "title": "tanks" } -], -"animation": [ - { "file": "change+texture+on+click.js", "title": "change texture on click" }, - { "file": "local+json+object.js", "title": "local json object" }, - { "file": "looped+animation.js", "title": "looped animation" }, - { "file": "multiple+anims.js", "title": "multiple anims" }, - { "file": "sprite+sheet.js", "title": "sprite sheet" }, - { "file": "texture+packer+json+hash.js", "title": "texture packer json hash" } -], -"audio": [ - { "file": "loop.js", "title": "loop" }, - { "file": "play+music.js", "title": "play music" } -], -"buttons": [ - { "file": "action+on+click.js", "title": "action on click" }, - { "file": "changing+the+frames.js", "title": "changing the frames" }, - { "file": "rotated+buttons.js", "title": "rotated buttons" } -], -"camera": [ - { "file": "basic+follow.js", "title": "basic follow" }, - { "file": "camera+cull.js", "title": "camera cull" }, - { "file": "follow+styles.js", "title": "follow styles" }, - { "file": "moving+the+camera.js", "title": "moving the camera" }, - { "file": "world+sprite.js", "title": "world sprite" } -], -"collision": [ - { "file": "bounding+box.js", "title": "bounding box" }, - { "file": "group+vs+group.js", "title": "group vs group" }, - { "file": "larger+bounding+box.js", "title": "larger bounding box" }, - { "file": "offset+bounding+box.js", "title": "offset bounding box" }, - { "file": "sprite+tiles.js", "title": "sprite tiles" }, - { "file": "sprite+vs+group.js", "title": "sprite vs group" }, - { "file": "sprite+vs+sprite+custom.js", "title": "sprite vs sprite custom" }, - { "file": "sprite+vs+sprite.js", "title": "sprite vs sprite" }, - { "file": "transform.js", "title": "transform" }, - { "file": "vertical+collision.js", "title": "vertical collision" } -], -"display": [ - { "file": "fullscreen.js", "title": "fullscreen" }, - { "file": "graphics.js", "title": "graphics" }, - { "file": "render+crisp.js", "title": "render crisp" } -], -"geometry": [ - { "file": "circle.js", "title": "circle" }, - { "file": "line.js", "title": "line" }, - { "file": "playing+with+points.js", "title": "playing with points" }, - { "file": "rectangle.js", "title": "rectangle" }, - { "file": "rotate+point.js", "title": "rotate point" } -], -"groups": [ - { "file": "add+a+sprite+to+group.js", "title": "add a sprite to group" }, - { "file": "bring+a+child+to+top.js", "title": "bring a child to top" }, - { "file": "bring+a+group+to+top.js", "title": "bring a group to top" }, - { "file": "call+all.js", "title": "call all" }, - { "file": "create+group.js", "title": "create group" }, - { "file": "create+sprite+in+a+group.js", "title": "create sprite in a group" }, - { "file": "display+order.js", "title": "display order" }, - { "file": "for+each.js", "title": "for each" }, - { "file": "get+first.js", "title": "get first" }, - { "file": "group+as+layer.js", "title": "group as layer" }, - { "file": "group+transform+-+rotate.js", "title": "group transform - rotate" }, - { "file": "group+transform+-+tween.js", "title": "group transform - tween" }, - { "file": "group+transform.js", "title": "group transform" }, - { "file": "recyling.js", "title": "recyling" }, - { "file": "remove.js", "title": "remove" }, - { "file": "replace.js", "title": "replace" }, - { "file": "set+All.js", "title": "set All" }, - { "file": "sub+groups+-+group+length.js", "title": "sub groups - group length" }, - { "file": "swap+children+in+a+group.js", "title": "swap children in a group" } -], -"input": [ - { "file": "cursor+key+movement.js", "title": "cursor key movement" }, - { "file": "drag+several+sprites.js", "title": "drag several sprites" }, - { "file": "drag.js", "title": "drag" }, - { "file": "drop+limitation.js", "title": "drop limitation" }, - { "file": "follow+mouse.js", "title": "follow mouse" }, - { "file": "game+scale.js", "title": "game scale" }, - { "file": "key.js", "title": "key" }, - { "file": "keyboard+hotkeys.js", "title": "keyboard hotkeys" }, - { "file": "keyboard+justpressed.js", "title": "keyboard justpressed" }, - { "file": "keyboard.js", "title": "keyboard" }, - { "file": "motion+lock+-+horizontal.js", "title": "motion lock - horizontal" }, - { "file": "motion+lock+-+vertical.js", "title": "motion lock - vertical" }, - { "file": "multi+touch.js", "title": "multi touch" }, - { "file": "override+default+controls.js", "title": "override default controls" }, - { "file": "pixel+perfect+click+detection.js", "title": "pixel perfect click detection" }, - { "file": "pixelpick+-+scrolling+effect.js", "title": "pixelpick - scrolling effect" }, - { "file": "pixelpick+-+spritesheet.js", "title": "pixelpick - spritesheet" }, - { "file": "snap+on+drag.js", "title": "snap on drag" } -], -"loader": [ - { "file": "pick+images+from+cache.js", "title": "pick images from cache" } -], -"misc": [ - { "file": "net.js", "title": "net" }, - { "file": "random+generators.js", "title": "random generators" }, - { "file": "repeatable+random+numbers.js", "title": "repeatable random numbers" } -], -"particles": [ - { "file": "click+burst.js", "title": "click burst" }, - { "file": "collision.js", "title": "collision" }, - { "file": "diamond+burst.js", "title": "diamond burst" }, - { "file": "no+rotation.js", "title": "no rotation" }, - { "file": "random+sprite.js", "title": "random sprite" }, - { "file": "when+particles+collide.js", "title": "when particles collide" }, - { "file": "zero+gravity.js", "title": "zero gravity" } -], -"physics": [ - { "file": "accelerate+to+pointer.js", "title": "accelerate to pointer" }, - { "file": "angle+between.js", "title": "angle between" }, - { "file": "angle+to+pointer.js", "title": "angle to pointer" }, - { "file": "angular+acceleration.js", "title": "angular acceleration" }, - { "file": "angular+velocity.js", "title": "angular velocity" }, - { "file": "mass+velocity+test.js", "title": "mass velocity test" }, - { "file": "move+towards+object.js", "title": "move towards object" }, - { "file": "multi+angle+to+pointer.js", "title": "multi angle to pointer" }, - { "file": "quadtree+-+collision+infos.js", "title": "quadtree - collision infos" }, - { "file": "quadtree+-+ids.js", "title": "quadtree - ids" }, - { "file": "shoot+the+pointer.js", "title": "shoot the pointer" }, - { "file": "sprite+bounds.js", "title": "sprite bounds" } -], -"sprites": [ - { "file": "add+a+sprite.js", "title": "add a sprite" }, - { "file": "add+several+sprites.js", "title": "add several sprites" }, - { "file": "collide+world+bounds.js", "title": "collide world bounds" }, - { "file": "destroy.js", "title": "destroy" }, - { "file": "dynamic+crop.js", "title": "dynamic crop" }, - { "file": "extending+sprite+demo+1.js", "title": "extending sprite demo 1" }, - { "file": "extending+sprite+demo+2.js", "title": "extending sprite demo 2" }, - { "file": "horizontal+crop.js", "title": "horizontal crop" }, - { "file": "move+a+sprite.js", "title": "move a sprite" }, - { "file": "out+of+bounds.js", "title": "out of bounds" }, - { "file": "scale+a+sprite.js", "title": "scale a sprite" }, - { "file": "shared+sprite+textures.js", "title": "shared sprite textures" }, - { "file": "sprite+rotation.js", "title": "sprite rotation" }, - { "file": "spritesheet.js", "title": "spritesheet" }, - { "file": "vertical+crop.js", "title": "vertical crop" } -], -"text": [ - { "file": "bitmap+fonts.js", "title": "bitmap fonts" }, - { "file": "hello+arial.js", "title": "hello arial" }, - { "file": "kern+of+duty.js", "title": "kern of duty" }, - { "file": "remove+text.js", "title": "remove text" }, - { "file": "text+stroke.js", "title": "text stroke" } -], -"tile sprites": [ - { "file": "animated+tiling+sprite.js", "title": "animated tiling sprite" }, - { "file": "tiling+sprite.js", "title": "tiling sprite" } -], -"tilemaps": [ - { "file": "Sci-Fly.js", "title": "Sci-Fly" }, - { "file": "fill+tiles.js", "title": "fill tiles" }, - { "file": "mapcollide.js", "title": "mapcollide" }, - { "file": "mario.js", "title": "mario" }, - { "file": "mariotogether.js", "title": "mariotogether" }, - { "file": "paint+tiles.js", "title": "paint tiles" }, - { "file": "randomise+tiles.js", "title": "randomise tiles" }, - { "file": "replace+tiles.js", "title": "replace tiles" }, - { "file": "supermario.js", "title": "supermario" }, - { "file": "supermario2.js", "title": "supermario2" }, - { "file": "swap+tiles.js", "title": "swap tiles" }, - { "file": "wip1.js", "title": "wip1" }, - { "file": "wip2.js", "title": "wip2" }, - { "file": "wip3.js", "title": "wip3" }, - { "file": "wip4.js", "title": "wip4" } -], -"tweens": [ - { "file": "bounce.js", "title": "bounce" }, - { "file": "bubbles.js", "title": "bubbles" }, - { "file": "chained+tweens.js", "title": "chained tweens" }, - { "file": "combined+tweens.js", "title": "combined tweens" }, - { "file": "easing+spritesheets.js", "title": "easing spritesheets" }, - { "file": "easing.js", "title": "easing" }, - { "file": "fading+in+a+sprite.js", "title": "fading in a sprite" }, - { "file": "pause+tween.js", "title": "pause tween" }, - { "file": "tween+several+properties.js", "title": "tween several properties" } -], -"world": [ - { "file": "fixed+to+camera.js", "title": "fixed to camera" }, - { "file": "move+around+world.js", "title": "move around world" } -] + "animation": [ + { + "file": "change+texture+on+click.js", + "title": "change texture on click" + }, + { + "file": "local+json+object.js", + "title": "local json object" + }, + { + "file": "looped+animation.js", + "title": "looped animation" + }, + { + "file": "multiple+anims.js", + "title": "multiple anims" + }, + { + "file": "sprite+sheet.js", + "title": "sprite sheet" + }, + { + "file": "texture+packer+json+hash.js", + "title": "texture packer json hash" + } + ], + "audio": [ + { + "file": "loop.js", + "title": "loop" + }, + { + "file": "play+music.js", + "title": "play music" + } + ], + "basics": [ + { + "file": "01+-+load+an+image.js", + "title": "01 - load an image" + } + ], + "buttons": [ + { + "file": "action+on+click.js", + "title": "action on click" + }, + { + "file": "changing+the+frames.js", + "title": "changing the frames" + }, + { + "file": "rotated+buttons.js", + "title": "rotated buttons" + } + ], + "camera": [ + { + "file": "basic+follow.js", + "title": "basic follow" + }, + { + "file": "camera+cull.js", + "title": "camera cull" + }, + { + "file": "follow+styles.js", + "title": "follow styles" + }, + { + "file": "moving+the+camera.js", + "title": "moving the camera" + }, + { + "file": "world+sprite.js", + "title": "world sprite" + } + ], + "collision": [ + { + "file": "bounding+box.js", + "title": "bounding box" + }, + { + "file": "group+vs+group.js", + "title": "group vs group" + }, + { + "file": "larger+bounding+box.js", + "title": "larger bounding box" + }, + { + "file": "offset+bounding+box.js", + "title": "offset bounding box" + }, + { + "file": "sprite+tiles.js", + "title": "sprite tiles" + }, + { + "file": "sprite+vs+group.js", + "title": "sprite vs group" + }, + { + "file": "sprite+vs+sprite+custom.js", + "title": "sprite vs sprite custom" + }, + { + "file": "sprite+vs+sprite.js", + "title": "sprite vs sprite" + }, + { + "file": "transform.js", + "title": "transform" + }, + { + "file": "vertical+collision.js", + "title": "vertical collision" + } + ], + "display": [ + { + "file": "fullscreen.js", + "title": "fullscreen" + }, + { + "file": "graphics.js", + "title": "graphics" + }, + { + "file": "render+crisp.js", + "title": "render crisp" + } + ], + "games": [ + { + "file": "breakout.js", + "title": "breakout" + }, + { + "file": "invaders.js", + "title": "invaders" + }, + { + "file": "starstruck.js", + "title": "starstruck" + }, + { + "file": "tanks.js", + "title": "tanks" + } + ], + "geometry": [ + { + "file": "circle.js", + "title": "circle" + }, + { + "file": "line.js", + "title": "line" + }, + { + "file": "playing+with+points.js", + "title": "playing with points" + }, + { + "file": "rectangle.js", + "title": "rectangle" + }, + { + "file": "rotate+point.js", + "title": "rotate point" + } + ], + "groups": [ + { + "file": "add+a+sprite+to+group.js", + "title": "add a sprite to group" + }, + { + "file": "bring+a+child+to+top.js", + "title": "bring a child to top" + }, + { + "file": "bring+a+group+to+top.js", + "title": "bring a group to top" + }, + { + "file": "call+all.js", + "title": "call all" + }, + { + "file": "create+group.js", + "title": "create group" + }, + { + "file": "create+sprite+in+a+group.js", + "title": "create sprite in a group" + }, + { + "file": "display+order.js", + "title": "display order" + }, + { + "file": "for+each.js", + "title": "for each" + }, + { + "file": "get+first.js", + "title": "get first" + }, + { + "file": "group+as+layer.js", + "title": "group as layer" + }, + { + "file": "group+transform+-+rotate.js", + "title": "group transform - rotate" + }, + { + "file": "group+transform+-+tween.js", + "title": "group transform - tween" + }, + { + "file": "group+transform.js", + "title": "group transform" + }, + { + "file": "recyling.js", + "title": "recyling" + }, + { + "file": "remove.js", + "title": "remove" + }, + { + "file": "replace.js", + "title": "replace" + }, + { + "file": "set+All.js", + "title": "set All" + }, + { + "file": "sub+groups+-+group+length.js", + "title": "sub groups - group length" + }, + { + "file": "swap+children+in+a+group.js", + "title": "swap children in a group" + } + ], + "input": [ + { + "file": "cursor+key+movement.js", + "title": "cursor key movement" + }, + { + "file": "drag+several+sprites.js", + "title": "drag several sprites" + }, + { + "file": "drag.js", + "title": "drag" + }, + { + "file": "drop+limitation.js", + "title": "drop limitation" + }, + { + "file": "follow+mouse.js", + "title": "follow mouse" + }, + { + "file": "game+scale.js", + "title": "game scale" + }, + { + "file": "key.js", + "title": "key" + }, + { + "file": "keyboard+hotkeys.js", + "title": "keyboard hotkeys" + }, + { + "file": "keyboard+justpressed.js", + "title": "keyboard justpressed" + }, + { + "file": "keyboard.js", + "title": "keyboard" + }, + { + "file": "motion+lock+-+horizontal.js", + "title": "motion lock - horizontal" + }, + { + "file": "motion+lock+-+vertical.js", + "title": "motion lock - vertical" + }, + { + "file": "multi+touch.js", + "title": "multi touch" + }, + { + "file": "override+default+controls.js", + "title": "override default controls" + }, + { + "file": "pixel+perfect+click+detection.js", + "title": "pixel perfect click detection" + }, + { + "file": "pixelpick+-+scrolling+effect.js", + "title": "pixelpick - scrolling effect" + }, + { + "file": "pixelpick+-+spritesheet.js", + "title": "pixelpick - spritesheet" + }, + { + "file": "snap+on+drag.js", + "title": "snap on drag" + } + ], + "loader": [ + { + "file": "pick+images+from+cache.js", + "title": "pick images from cache" + } + ], + "misc": [ + { + "file": "net.js", + "title": "net" + }, + { + "file": "random+generators.js", + "title": "random generators" + }, + { + "file": "repeatable+random+numbers.js", + "title": "repeatable random numbers" + } + ], + "particles": [ + { + "file": "click+burst.js", + "title": "click burst" + }, + { + "file": "collision.js", + "title": "collision" + }, + { + "file": "diamond+burst.js", + "title": "diamond burst" + }, + { + "file": "no+rotation.js", + "title": "no rotation" + }, + { + "file": "random+sprite.js", + "title": "random sprite" + }, + { + "file": "when+particles+collide.js", + "title": "when particles collide" + }, + { + "file": "zero+gravity.js", + "title": "zero gravity" + } + ], + "physics": [ + { + "file": "accelerate+to+pointer.js", + "title": "accelerate to pointer" + }, + { + "file": "angle+between.js", + "title": "angle between" + }, + { + "file": "angle+to+pointer.js", + "title": "angle to pointer" + }, + { + "file": "angular+acceleration.js", + "title": "angular acceleration" + }, + { + "file": "angular+velocity.js", + "title": "angular velocity" + }, + { + "file": "mass+velocity+test.js", + "title": "mass velocity test" + }, + { + "file": "move+towards+object.js", + "title": "move towards object" + }, + { + "file": "multi+angle+to+pointer.js", + "title": "multi angle to pointer" + }, + { + "file": "quadtree+-+collision+infos.js", + "title": "quadtree - collision infos" + }, + { + "file": "quadtree+-+ids.js", + "title": "quadtree - ids" + }, + { + "file": "shoot+the+pointer.js", + "title": "shoot the pointer" + }, + { + "file": "sprite+bounds.js", + "title": "sprite bounds" + } + ], + "sprites": [ + { + "file": "add+a+sprite.js", + "title": "add a sprite" + }, + { + "file": "add+several+sprites.js", + "title": "add several sprites" + }, + { + "file": "collide+world+bounds.js", + "title": "collide world bounds" + }, + { + "file": "destroy.js", + "title": "destroy" + }, + { + "file": "dynamic+crop.js", + "title": "dynamic crop" + }, + { + "file": "extending+sprite+demo+1.js", + "title": "extending sprite demo 1" + }, + { + "file": "extending+sprite+demo+2.js", + "title": "extending sprite demo 2" + }, + { + "file": "horizontal+crop.js", + "title": "horizontal crop" + }, + { + "file": "move+a+sprite.js", + "title": "move a sprite" + }, + { + "file": "out+of+bounds.js", + "title": "out of bounds" + }, + { + "file": "scale+a+sprite.js", + "title": "scale a sprite" + }, + { + "file": "shared+sprite+textures.js", + "title": "shared sprite textures" + }, + { + "file": "sprite+rotation.js", + "title": "sprite rotation" + }, + { + "file": "spritesheet.js", + "title": "spritesheet" + }, + { + "file": "vertical+crop.js", + "title": "vertical crop" + } + ], + "text": [ + { + "file": "bitmap+fonts.js", + "title": "bitmap fonts" + }, + { + "file": "hello+arial.js", + "title": "hello arial" + }, + { + "file": "kern+of+duty.js", + "title": "kern of duty" + }, + { + "file": "remove+text.js", + "title": "remove text" + }, + { + "file": "text+stroke.js", + "title": "text stroke" + } + ], + "tile sprites": [ + { + "file": "animated+tiling+sprite.js", + "title": "animated tiling sprite" + }, + { + "file": "tiling+sprite.js", + "title": "tiling sprite" + } + ], + "tilemaps": [ + { + "file": "fill+tiles.js", + "title": "fill tiles" + }, + { + "file": "mapcollide.js", + "title": "mapcollide" + }, + { + "file": "mario.js", + "title": "mario" + }, + { + "file": "mariotogether.js", + "title": "mariotogether" + }, + { + "file": "paint+tiles.js", + "title": "paint tiles" + }, + { + "file": "randomise+tiles.js", + "title": "randomise tiles" + }, + { + "file": "replace+tiles.js", + "title": "replace tiles" + }, + { + "file": "sci+fly.js", + "title": "sci fly" + }, + { + "file": "supermario.js", + "title": "supermario" + }, + { + "file": "supermario2.js", + "title": "supermario2" + }, + { + "file": "swap+tiles.js", + "title": "swap tiles" + }, + { + "file": "wip1.js", + "title": "wip1" + }, + { + "file": "wip2.js", + "title": "wip2" + }, + { + "file": "wip3.js", + "title": "wip3" + }, + { + "file": "wip4.js", + "title": "wip4" + } + ], + "tweens": [ + { + "file": "bounce.js", + "title": "bounce" + }, + { + "file": "bubbles.js", + "title": "bubbles" + }, + { + "file": "chained+tweens.js", + "title": "chained tweens" + }, + { + "file": "combined+tweens.js", + "title": "combined tweens" + }, + { + "file": "easing+spritesheets.js", + "title": "easing spritesheets" + }, + { + "file": "easing.js", + "title": "easing" + }, + { + "file": "fading+in+a+sprite.js", + "title": "fading in a sprite" + }, + { + "file": "pause+tween.js", + "title": "pause tween" + }, + { + "file": "tween+several+properties.js", + "title": "tween several properties" + } + ], + "world": [ + { + "file": "fixed+to+camera.js", + "title": "fixed to camera" + }, + { + "file": "move+around+world.js", + "title": "move around world" + } + ] } \ No newline at end of file diff --git a/examples/_site/view_full.html b/examples/_site/view_full.html index 83d6c04f..11eb14b0 100644 --- a/examples/_site/view_full.html +++ b/examples/_site/view_full.html @@ -9,7 +9,7 @@ @@ -193,4 +193,4 @@ - \ No newline at end of file + diff --git a/examples/_site/view_lite.html b/examples/_site/view_lite.html index a8d7e679..2768996c 100644 --- a/examples/_site/view_lite.html +++ b/examples/_site/view_lite.html @@ -9,7 +9,7 @@ @@ -119,4 +119,4 @@ - \ No newline at end of file + diff --git a/package.json b/package.json index d7fc476c..27aeecbd 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,7 @@ { "name": "Phaser", - "version": "1.0.7", - "description": "html5 game framework", - "main": "build/phaser.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, + "version": "1.1.0", + "description": "HTML5 game framework", "repository": { "type": "git", "url": "https://photonstorm@github.com/photonstorm/phaser.git" @@ -18,15 +14,13 @@ ], "author": "Richard Davey", "license": "MIT", - "readmeFilename": "README.md", - "gitHead": "1217bf4722768514fe15ff904dab59f848d146f4", "devDependencies": { "grunt": "~0.4.1", - "typescript": "~0.8.3", - "grunt-typescript": "~0.1.4", - "grunt-contrib-watch": "~0.3.1", - "grunt-contrib-connect": "~0.3.0", - "grunt-open": "~0.2.0", - "grunt-contrib-copy": "~0.4.1" + "grunt-contrib-concat": "~0.3.0", + "grunt-contrib-connect": "~0.5.0", + "grunt-contrib-copy": "~0.4.1", + "grunt-contrib-clean": "~0.5.0", + "grunt-contrib-uglify": "~0.2.4", + "lodash": "~2.2.1" } } diff --git a/src/Intro.js b/src/Intro.js index f260f9a9..908be578 100644 --- a/src/Intro.js +++ b/src/Intro.js @@ -9,7 +9,7 @@ * * Phaser - http://www.phaser.io * -* v{version} - Built at: {buildDate} +* v<%= version %> - Built at: <%= buildDate %> * * By Richard Davey http://www.photonstorm.com @photonstorm * diff --git a/src/Phaser.js b/src/Phaser.js index d6be22ec..639e1637 100644 --- a/src/Phaser.js +++ b/src/Phaser.js @@ -7,10 +7,10 @@ /** * @namespace Phaser */ -var Phaser = Phaser || { +var Phaser = Phaser || { - VERSION: '1.1.0', - GAMES: [], + VERSION: '<%= version %>', + GAMES: [], AUTO: 0, CANVAS: 1, WEBGL: 2, @@ -39,4 +39,4 @@ var Phaser = Phaser || { PIXI.InteractionManager = function (dummy) { // We don't need this in Pixi, so we've removed it to save space // however the Stage object expects a reference to it, so here is a dummy entry. -}; \ No newline at end of file +}; diff --git a/src/core/Game.js b/src/core/Game.js index 47acbb98..83d0e0de 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -32,7 +32,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant if (typeof transparent == 'undefined') { transparent = false; } if (typeof antialias == 'undefined') { antialias = true; } - + /** * @property {number} id - Phaser Game ID (for when Pixi supports multiple instances). */ @@ -251,7 +251,7 @@ Phaser.Game.prototype = { /** * Initialize engine sub modules and start the game. - * + * * @method Phaser.Game#boot * @protected */ @@ -315,10 +315,13 @@ Phaser.Game.prototype = { console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000'); } - if (Phaser.VERSION.substr(-5) == '-beta') - { - console.warn('You are using a beta version of Phaser. Some things may not work.'); - } + var pos = Phaser.VERSION.indexOf('-'); + var versionQualifier = (pos >= 0) ? Phaser.VERSION.substr(pos + 1) : null; + if (versionQualifier) + { + var article = ['a', 'e', 'i', 'o', 'u', 'y'].indexOf(versionQualifier.charAt(0)) >= 0 ? 'an' : 'a'; + console.warn('You are using %s %s version of Phaser. Some things may not work.', article, versionQualifier); + } this.isRunning = true; this._loadComplete = false; @@ -329,10 +332,10 @@ Phaser.Game.prototype = { } }, - + /** * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. - * + * * @method Phaser.Game#setUpRenderer * @protected */ @@ -369,7 +372,7 @@ Phaser.Game.prototype = { /** * Called when the load has finished, after preload was run. - * + * * @method Phaser.Game#loadComplete * @protected */ @@ -383,7 +386,7 @@ Phaser.Game.prototype = { /** * The core game loop. - * + * * @method Phaser.Game#update * @protected * @param {number} time - The current time as provided by RequestAnimationFrame. @@ -418,7 +421,7 @@ Phaser.Game.prototype = { /** * Nuke the entire game from orbit - * + * * @method Phaser.Game#destroy */ destroy: function () { diff --git a/tasks/examples.js b/tasks/examples.js new file mode 100644 index 00000000..d9bdf882 --- /dev/null +++ b/tasks/examples.js @@ -0,0 +1,49 @@ +var path = require('path'); +var _ = require('lodash'); + +function pathToArray(parts) { + var part = parts.shift(); + if (parts.length > 0) { + var obj = {}; + obj[part] = pathToArray(parts); + return obj; + } else { + return part; + } +} + +module.exports = function(grunt) { + grunt.registerMultiTask('examples', 'Build examples site.', function() { + var options = this.options({ + base: '', + excludes: [] + }); + + this.files.forEach(function(f) { + var results = {}; + f.src.filter(function(filepath) { + if (!grunt.file.exists(filepath)) { + grunt.log.warn('Source file "' + filepath + '" not found.'); + return false; + } else { + filepath = path.relative(options.base, filepath); + return options.excludes.every(function(dir) { + return filepath.indexOf(dir + '/') < 0; + }); + } + }).map(function(filepath) { + return pathToArray(path.relative(options.base, filepath).split('/')); + }).forEach(function(parts) { + _.merge(results, parts, function(a, b) { + var example = { + file: encodeURIComponent(b).replace(/%20/g, '+'), + title: b.substr(0, b.length - 3) + }; + return _.isArray(a) ? a.concat(example) : [example]; + }); + }); + + grunt.file.write(f.dest, JSON.stringify(results, null, ' ')); + }); + }); +}; diff --git a/tasks/umd.js b/tasks/umd.js new file mode 100644 index 00000000..428d44a1 --- /dev/null +++ b/tasks/umd.js @@ -0,0 +1,35 @@ +var umdBefore = [ + '!function(root, factory) {', + ' if (typeof define === "function" && define.amd) {', + ' define(factory);', + ' } else if (typeof exports === "object") {', + ' module.exports = factory();', + ' } else {', + ' root.Phaser = factory();', + ' }', + '}(this, function() {' +].join('\n'); + +var umdAfter = [ + ' return Phaser;', + '});' +].join('\n'); + +module.exports = function(grunt) { + grunt.registerMultiTask('umd', 'Create an UMD wrapper.', function() { + this.files.forEach(function(f) { + var src = umdBefore + '\n' + f.src.filter(function(filepath) { + if (!grunt.file.exists(filepath)) { + grunt.log.warn('Source file "' + filepath + '" not found.'); + return false; + } else { + return true; + } + }).map(function(filepath) { + return grunt.file.read(filepath); + }).join('\n') + umdAfter; + + grunt.file.write(f.dest, src); + }); + }); +}; From 7e5f38d0222eac4f11a7afbc0bb9f96bb767d7fc Mon Sep 17 00:00:00 2001 From: photonstorm Date: Wed, 23 Oct 2013 17:11:06 +0100 Subject: [PATCH 102/125] Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas. --- README.md | 3 ++- examples/camera/world sprite.js | 4 ++-- src/core/Group.js | 12 ++++++++++++ src/gameobjects/Sprite.js | 3 --- src/physics/arcade/Body.js | 6 ------ src/time/Time.js | 6 ++++++ 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7662b867..9b4e87ff 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,8 @@ Version 1.1 * The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils. * Added Physics.overlap(sprite1, sprite2) for quick body vs. body overlap tests with no separation performed. * Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events. - +* Phaser.Group now automatically calls updateTransform on any child added to it (avoids temp. frame glitches when new objects are rendered on their first frame). +* Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas. Outstanding Tasks diff --git a/examples/camera/world sprite.js b/examples/camera/world sprite.js index 13936f22..e96f05ff 100644 --- a/examples/camera/world sprite.js +++ b/examples/camera/world sprite.js @@ -3,8 +3,6 @@ var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: function preload() { - game.world.setBounds(0, 0, 1920, 1200); - game.load.image('backdrop', 'assets/pics/remember-me.jpg'); game.load.image('card', 'assets/sprites/mana_card.png'); @@ -15,6 +13,8 @@ var Keys = Phaser.Keyboard; function create() { + game.world.setBounds(0, 0, 1920, 1200); + game.add.sprite(0, 0, 'backdrop'); card = game.add.sprite(200, 200, 'card'); diff --git a/src/core/Group.js b/src/core/Group.js index dc6b3007..8ebf5bcc 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -50,15 +50,18 @@ Phaser.Group = function (game, parent, name, useStage) { if (parent instanceof Phaser.Group) { parent._container.addChild(this._container); + parent._container.updateTransform(); } else { parent.addChild(this._container); + parent.updateTransform(); } } else { this.game.stage._stage.addChild(this._container); + this.game.stage._stage.updateTransform(); } } @@ -106,6 +109,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + + child.updateTransform(); } return child; @@ -133,6 +138,8 @@ Phaser.Group.prototype = { } this._container.addChildAt(child, index); + + child.updateTransform(); } return child; @@ -182,6 +189,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + + child.updateTransform(); return child; @@ -217,6 +226,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + child.updateTransform(); + } }, @@ -408,6 +419,7 @@ Phaser.Group.prototype = { this._container.removeChild(oldChild); this._container.addChildAt(newChild, index); newChild.events.onAddedToGroup.dispatch(newChild, this); + newChild.updateTransform(); } }, diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 31b6f5dd..f5203ded 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -190,9 +190,6 @@ Phaser.Sprite = function (game, x, y, key, frame) { */ this.scale = new Phaser.Point(1, 1); - // console.log(this.worldTransform); - // this.worldTransform = []; - /** * @property {Phaser.Point} _cache - A mini cache for storing all of the calculated values. * @private diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 82fee9ca..a2b1f3a5 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -113,9 +113,6 @@ Phaser.Physics.Arcade.Body.prototype = { this.screenX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.screenY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.preX = (this.sprite.localTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.preY = (this.sprite.localTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; @@ -241,11 +238,8 @@ Phaser.Physics.Arcade.Body.prototype = { this.angularVelocity = 0; this.angularAcceleration = 0; - this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.preX = (this.sprite.localTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.preY = (this.sprite.localTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; this.preRotation = this.sprite.angle; this.x = this.preX; diff --git a/src/time/Time.js b/src/time/Time.js index 81cf3742..04e11f91 100644 --- a/src/time/Time.js +++ b/src/time/Time.js @@ -202,6 +202,12 @@ Phaser.Time.prototype = { this.lastTime = time + this.timeToCall; this.physicsElapsed = 1.0 * (this.elapsed / 1000); + // Clamp the delta + if (this.physicsElapsed > 1) + { + this.physicsElapsed = 1; + } + // Paused? if (this.game.paused) { From a6fac64248cbddddfffdee5d07bf6458e13455bc Mon Sep 17 00:00:00 2001 From: photonstorm Date: Thu, 24 Oct 2013 04:27:28 +0100 Subject: [PATCH 103/125] Loads of issues reported on Github resolved (sprite crop, music resume, etc). --- README.md | 12 + examples/_site/examples.json | 820 +++++++--------------------- examples/audio/pause and resume.js | 51 ++ examples/sprites/dynamic crop.js | 20 +- examples/sprites/horizontal crop.js | 24 +- examples/sprites/vertical crop.js | 24 +- examples/wip/crop.js | 24 + examples/wip/input active.js | 39 ++ src/animation/Animation.js | 48 +- src/core/Game.js | 4 + src/gameobjects/Sprite.js | 144 ++--- src/geom/Rectangle.js | 13 + src/input/Input.js | 35 +- src/input/InputHandler.js | 12 +- src/input/Pointer.js | 4 +- src/loader/Loader.js | 9 +- src/sound/Sound.js | 29 +- 17 files changed, 538 insertions(+), 774 deletions(-) create mode 100644 examples/audio/pause and resume.js create mode 100644 examples/wip/crop.js create mode 100644 examples/wip/input active.js diff --git a/README.md b/README.md index 9b4e87ff..1841790b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ Version 1.1 * JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. * Brand new Example system (no more php!) and over 150 examples to learn from too. * New TypeScript definitions file generated (in the build folder). +* New Grunt based build system added for those that prefer Grunt over php (thanks to Florent Cailhol) + * Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. * Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. * Updated ArcadePhysics.separateX/Y to use new body system - much better results now. @@ -139,6 +141,15 @@ Version 1.1 * Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events. * Phaser.Group now automatically calls updateTransform on any child added to it (avoids temp. frame glitches when new objects are rendered on their first frame). * Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas. +* Animation.generateFrameNames can now work in reverse, so the start/stop values can create frames that increment or decrement respectively. +* Loader updated to use xhr.responseText when loading json, csv or text files. xhr.response is still used for Web Audio binary files (thanks bubba) +* Input.onDown and onUp events now dispatch the original event that triggered them (i.e. a MouseEvent or TouchEvent) as the 2nd parameter, after the Pointer (thanks rezoner) +* Game.destroy will now stop the raf from running as well as close down all input related event listeners (issue 92, thanks astrism) +* Fixed issue 105 where a dragged object that was destroyed would cause an Input error (thanks onedayitwillmake) +* Updated Sprite.crop significantly. Values are now cached, stopping constant Texture frame updates and you can do sprite.crop.width++ for example (thanks haden) +* Change: Sprite.crop needs to be enabled with sprite.cropEnabled = true. +* Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height). +* Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora). Outstanding Tasks @@ -151,6 +162,7 @@ Outstanding Tasks * TODO: Sound.addMarker hh:mm:ss:ms * TODO: swap state (non-destructive shift) * TODO: rotation offset +* TODO: Look at HiDPI Canvas settings Requirements ------------ diff --git a/examples/_site/examples.json b/examples/_site/examples.json index 40ed7616..41646962 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -1,632 +1,192 @@ { - "animation": [ - { - "file": "change+texture+on+click.js", - "title": "change texture on click" - }, - { - "file": "local+json+object.js", - "title": "local json object" - }, - { - "file": "looped+animation.js", - "title": "looped animation" - }, - { - "file": "multiple+anims.js", - "title": "multiple anims" - }, - { - "file": "sprite+sheet.js", - "title": "sprite sheet" - }, - { - "file": "texture+packer+json+hash.js", - "title": "texture packer json hash" - } - ], - "audio": [ - { - "file": "loop.js", - "title": "loop" - }, - { - "file": "play+music.js", - "title": "play music" - } - ], - "basics": [ - { - "file": "01+-+load+an+image.js", - "title": "01 - load an image" - } - ], - "buttons": [ - { - "file": "action+on+click.js", - "title": "action on click" - }, - { - "file": "changing+the+frames.js", - "title": "changing the frames" - }, - { - "file": "rotated+buttons.js", - "title": "rotated buttons" - } - ], - "camera": [ - { - "file": "basic+follow.js", - "title": "basic follow" - }, - { - "file": "camera+cull.js", - "title": "camera cull" - }, - { - "file": "follow+styles.js", - "title": "follow styles" - }, - { - "file": "moving+the+camera.js", - "title": "moving the camera" - }, - { - "file": "world+sprite.js", - "title": "world sprite" - } - ], - "collision": [ - { - "file": "bounding+box.js", - "title": "bounding box" - }, - { - "file": "group+vs+group.js", - "title": "group vs group" - }, - { - "file": "larger+bounding+box.js", - "title": "larger bounding box" - }, - { - "file": "offset+bounding+box.js", - "title": "offset bounding box" - }, - { - "file": "sprite+tiles.js", - "title": "sprite tiles" - }, - { - "file": "sprite+vs+group.js", - "title": "sprite vs group" - }, - { - "file": "sprite+vs+sprite+custom.js", - "title": "sprite vs sprite custom" - }, - { - "file": "sprite+vs+sprite.js", - "title": "sprite vs sprite" - }, - { - "file": "transform.js", - "title": "transform" - }, - { - "file": "vertical+collision.js", - "title": "vertical collision" - } - ], - "display": [ - { - "file": "fullscreen.js", - "title": "fullscreen" - }, - { - "file": "graphics.js", - "title": "graphics" - }, - { - "file": "render+crisp.js", - "title": "render crisp" - } - ], - "games": [ - { - "file": "breakout.js", - "title": "breakout" - }, - { - "file": "invaders.js", - "title": "invaders" - }, - { - "file": "starstruck.js", - "title": "starstruck" - }, - { - "file": "tanks.js", - "title": "tanks" - } - ], - "geometry": [ - { - "file": "circle.js", - "title": "circle" - }, - { - "file": "line.js", - "title": "line" - }, - { - "file": "playing+with+points.js", - "title": "playing with points" - }, - { - "file": "rectangle.js", - "title": "rectangle" - }, - { - "file": "rotate+point.js", - "title": "rotate point" - } - ], - "groups": [ - { - "file": "add+a+sprite+to+group.js", - "title": "add a sprite to group" - }, - { - "file": "bring+a+child+to+top.js", - "title": "bring a child to top" - }, - { - "file": "bring+a+group+to+top.js", - "title": "bring a group to top" - }, - { - "file": "call+all.js", - "title": "call all" - }, - { - "file": "create+group.js", - "title": "create group" - }, - { - "file": "create+sprite+in+a+group.js", - "title": "create sprite in a group" - }, - { - "file": "display+order.js", - "title": "display order" - }, - { - "file": "for+each.js", - "title": "for each" - }, - { - "file": "get+first.js", - "title": "get first" - }, - { - "file": "group+as+layer.js", - "title": "group as layer" - }, - { - "file": "group+transform+-+rotate.js", - "title": "group transform - rotate" - }, - { - "file": "group+transform+-+tween.js", - "title": "group transform - tween" - }, - { - "file": "group+transform.js", - "title": "group transform" - }, - { - "file": "recyling.js", - "title": "recyling" - }, - { - "file": "remove.js", - "title": "remove" - }, - { - "file": "replace.js", - "title": "replace" - }, - { - "file": "set+All.js", - "title": "set All" - }, - { - "file": "sub+groups+-+group+length.js", - "title": "sub groups - group length" - }, - { - "file": "swap+children+in+a+group.js", - "title": "swap children in a group" - } - ], - "input": [ - { - "file": "cursor+key+movement.js", - "title": "cursor key movement" - }, - { - "file": "drag+several+sprites.js", - "title": "drag several sprites" - }, - { - "file": "drag.js", - "title": "drag" - }, - { - "file": "drop+limitation.js", - "title": "drop limitation" - }, - { - "file": "follow+mouse.js", - "title": "follow mouse" - }, - { - "file": "game+scale.js", - "title": "game scale" - }, - { - "file": "key.js", - "title": "key" - }, - { - "file": "keyboard+hotkeys.js", - "title": "keyboard hotkeys" - }, - { - "file": "keyboard+justpressed.js", - "title": "keyboard justpressed" - }, - { - "file": "keyboard.js", - "title": "keyboard" - }, - { - "file": "motion+lock+-+horizontal.js", - "title": "motion lock - horizontal" - }, - { - "file": "motion+lock+-+vertical.js", - "title": "motion lock - vertical" - }, - { - "file": "multi+touch.js", - "title": "multi touch" - }, - { - "file": "override+default+controls.js", - "title": "override default controls" - }, - { - "file": "pixel+perfect+click+detection.js", - "title": "pixel perfect click detection" - }, - { - "file": "pixelpick+-+scrolling+effect.js", - "title": "pixelpick - scrolling effect" - }, - { - "file": "pixelpick+-+spritesheet.js", - "title": "pixelpick - spritesheet" - }, - { - "file": "snap+on+drag.js", - "title": "snap on drag" - } - ], - "loader": [ - { - "file": "pick+images+from+cache.js", - "title": "pick images from cache" - } - ], - "misc": [ - { - "file": "net.js", - "title": "net" - }, - { - "file": "random+generators.js", - "title": "random generators" - }, - { - "file": "repeatable+random+numbers.js", - "title": "repeatable random numbers" - } - ], - "particles": [ - { - "file": "click+burst.js", - "title": "click burst" - }, - { - "file": "collision.js", - "title": "collision" - }, - { - "file": "diamond+burst.js", - "title": "diamond burst" - }, - { - "file": "no+rotation.js", - "title": "no rotation" - }, - { - "file": "random+sprite.js", - "title": "random sprite" - }, - { - "file": "when+particles+collide.js", - "title": "when particles collide" - }, - { - "file": "zero+gravity.js", - "title": "zero gravity" - } - ], - "physics": [ - { - "file": "accelerate+to+pointer.js", - "title": "accelerate to pointer" - }, - { - "file": "angle+between.js", - "title": "angle between" - }, - { - "file": "angle+to+pointer.js", - "title": "angle to pointer" - }, - { - "file": "angular+acceleration.js", - "title": "angular acceleration" - }, - { - "file": "angular+velocity.js", - "title": "angular velocity" - }, - { - "file": "mass+velocity+test.js", - "title": "mass velocity test" - }, - { - "file": "move+towards+object.js", - "title": "move towards object" - }, - { - "file": "multi+angle+to+pointer.js", - "title": "multi angle to pointer" - }, - { - "file": "quadtree+-+collision+infos.js", - "title": "quadtree - collision infos" - }, - { - "file": "quadtree+-+ids.js", - "title": "quadtree - ids" - }, - { - "file": "shoot+the+pointer.js", - "title": "shoot the pointer" - }, - { - "file": "sprite+bounds.js", - "title": "sprite bounds" - } - ], - "sprites": [ - { - "file": "add+a+sprite.js", - "title": "add a sprite" - }, - { - "file": "add+several+sprites.js", - "title": "add several sprites" - }, - { - "file": "collide+world+bounds.js", - "title": "collide world bounds" - }, - { - "file": "destroy.js", - "title": "destroy" - }, - { - "file": "dynamic+crop.js", - "title": "dynamic crop" - }, - { - "file": "extending+sprite+demo+1.js", - "title": "extending sprite demo 1" - }, - { - "file": "extending+sprite+demo+2.js", - "title": "extending sprite demo 2" - }, - { - "file": "horizontal+crop.js", - "title": "horizontal crop" - }, - { - "file": "move+a+sprite.js", - "title": "move a sprite" - }, - { - "file": "out+of+bounds.js", - "title": "out of bounds" - }, - { - "file": "scale+a+sprite.js", - "title": "scale a sprite" - }, - { - "file": "shared+sprite+textures.js", - "title": "shared sprite textures" - }, - { - "file": "sprite+rotation.js", - "title": "sprite rotation" - }, - { - "file": "spritesheet.js", - "title": "spritesheet" - }, - { - "file": "vertical+crop.js", - "title": "vertical crop" - } - ], - "text": [ - { - "file": "bitmap+fonts.js", - "title": "bitmap fonts" - }, - { - "file": "hello+arial.js", - "title": "hello arial" - }, - { - "file": "kern+of+duty.js", - "title": "kern of duty" - }, - { - "file": "remove+text.js", - "title": "remove text" - }, - { - "file": "text+stroke.js", - "title": "text stroke" - } - ], - "tile sprites": [ - { - "file": "animated+tiling+sprite.js", - "title": "animated tiling sprite" - }, - { - "file": "tiling+sprite.js", - "title": "tiling sprite" - } - ], - "tilemaps": [ - { - "file": "fill+tiles.js", - "title": "fill tiles" - }, - { - "file": "mapcollide.js", - "title": "mapcollide" - }, - { - "file": "mario.js", - "title": "mario" - }, - { - "file": "mariotogether.js", - "title": "mariotogether" - }, - { - "file": "paint+tiles.js", - "title": "paint tiles" - }, - { - "file": "randomise+tiles.js", - "title": "randomise tiles" - }, - { - "file": "replace+tiles.js", - "title": "replace tiles" - }, - { - "file": "sci+fly.js", - "title": "sci fly" - }, - { - "file": "supermario.js", - "title": "supermario" - }, - { - "file": "supermario2.js", - "title": "supermario2" - }, - { - "file": "swap+tiles.js", - "title": "swap tiles" - }, - { - "file": "wip1.js", - "title": "wip1" - }, - { - "file": "wip2.js", - "title": "wip2" - }, - { - "file": "wip3.js", - "title": "wip3" - }, - { - "file": "wip4.js", - "title": "wip4" - } - ], - "tweens": [ - { - "file": "bounce.js", - "title": "bounce" - }, - { - "file": "bubbles.js", - "title": "bubbles" - }, - { - "file": "chained+tweens.js", - "title": "chained tweens" - }, - { - "file": "combined+tweens.js", - "title": "combined tweens" - }, - { - "file": "easing+spritesheets.js", - "title": "easing spritesheets" - }, - { - "file": "easing.js", - "title": "easing" - }, - { - "file": "fading+in+a+sprite.js", - "title": "fading in a sprite" - }, - { - "file": "pause+tween.js", - "title": "pause tween" - }, - { - "file": "tween+several+properties.js", - "title": "tween several properties" - } - ], - "world": [ - { - "file": "fixed+to+camera.js", - "title": "fixed to camera" - }, - { - "file": "move+around+world.js", - "title": "move around world" - } - ] +"basics": [ + { "file": "01+-+load+an+image.js", "title": "01 - load an image" } +], +"games": [ + { "file": "breakout.js", "title": "breakout" }, + { "file": "invaders.js", "title": "invaders" }, + { "file": "starstruck.js", "title": "starstruck" }, + { "file": "tanks.js", "title": "tanks" } +], +"animation": [ + { "file": "change+texture+on+click.js", "title": "change texture on click" }, + { "file": "local+json+object.js", "title": "local json object" }, + { "file": "looped+animation.js", "title": "looped animation" }, + { "file": "multiple+anims.js", "title": "multiple anims" }, + { "file": "sprite+sheet.js", "title": "sprite sheet" }, + { "file": "texture+packer+json+hash.js", "title": "texture packer json hash" } +], +"audio": [ + { "file": "loop.js", "title": "loop" }, + { "file": "pause+and+resume.js", "title": "pause and resume" }, + { "file": "play+music.js", "title": "play music" } +], +"buttons": [ + { "file": "action+on+click.js", "title": "action on click" }, + { "file": "changing+the+frames.js", "title": "changing the frames" }, + { "file": "rotated+buttons.js", "title": "rotated buttons" } +], +"camera": [ + { "file": "basic+follow.js", "title": "basic follow" }, + { "file": "camera+cull.js", "title": "camera cull" }, + { "file": "follow+styles.js", "title": "follow styles" }, + { "file": "moving+the+camera.js", "title": "moving the camera" }, + { "file": "world+sprite.js", "title": "world sprite" } +], +"collision": [ + { "file": "bounding+box.js", "title": "bounding box" }, + { "file": "group+vs+group.js", "title": "group vs group" }, + { "file": "larger+bounding+box.js", "title": "larger bounding box" }, + { "file": "offset+bounding+box.js", "title": "offset bounding box" }, + { "file": "sprite+tiles.js", "title": "sprite tiles" }, + { "file": "sprite+vs+group.js", "title": "sprite vs group" }, + { "file": "sprite+vs+sprite+custom.js", "title": "sprite vs sprite custom" }, + { "file": "sprite+vs+sprite.js", "title": "sprite vs sprite" }, + { "file": "transform.js", "title": "transform" }, + { "file": "vertical+collision.js", "title": "vertical collision" } +], +"display": [ + { "file": "fullscreen.js", "title": "fullscreen" }, + { "file": "graphics.js", "title": "graphics" }, + { "file": "render+crisp.js", "title": "render crisp" } +], +"geometry": [ + { "file": "circle.js", "title": "circle" }, + { "file": "line.js", "title": "line" }, + { "file": "playing+with+points.js", "title": "playing with points" }, + { "file": "rectangle.js", "title": "rectangle" }, + { "file": "rotate+point.js", "title": "rotate point" } +], +"groups": [ + { "file": "add+a+sprite+to+group.js", "title": "add a sprite to group" }, + { "file": "bring+a+child+to+top.js", "title": "bring a child to top" }, + { "file": "bring+a+group+to+top.js", "title": "bring a group to top" }, + { "file": "call+all.js", "title": "call all" }, + { "file": "create+group.js", "title": "create group" }, + { "file": "create+sprite+in+a+group.js", "title": "create sprite in a group" }, + { "file": "display+order.js", "title": "display order" }, + { "file": "for+each.js", "title": "for each" }, + { "file": "get+first.js", "title": "get first" }, + { "file": "group+as+layer.js", "title": "group as layer" }, + { "file": "group+transform+-+rotate.js", "title": "group transform - rotate" }, + { "file": "group+transform+-+tween.js", "title": "group transform - tween" }, + { "file": "group+transform.js", "title": "group transform" }, + { "file": "recyling.js", "title": "recyling" }, + { "file": "remove.js", "title": "remove" }, + { "file": "replace.js", "title": "replace" }, + { "file": "set+All.js", "title": "set All" }, + { "file": "sub+groups+-+group+length.js", "title": "sub groups - group length" }, + { "file": "swap+children+in+a+group.js", "title": "swap children in a group" } +], +"input": [ + { "file": "cursor+key+movement.js", "title": "cursor key movement" }, + { "file": "drag+several+sprites.js", "title": "drag several sprites" }, + { "file": "drag.js", "title": "drag" }, + { "file": "drop+limitation.js", "title": "drop limitation" }, + { "file": "follow+mouse.js", "title": "follow mouse" }, + { "file": "game+scale.js", "title": "game scale" }, + { "file": "key.js", "title": "key" }, + { "file": "keyboard+hotkeys.js", "title": "keyboard hotkeys" }, + { "file": "keyboard+justpressed.js", "title": "keyboard justpressed" }, + { "file": "keyboard.js", "title": "keyboard" }, + { "file": "motion+lock+-+horizontal.js", "title": "motion lock - horizontal" }, + { "file": "motion+lock+-+vertical.js", "title": "motion lock - vertical" }, + { "file": "multi+touch.js", "title": "multi touch" }, + { "file": "override+default+controls.js", "title": "override default controls" }, + { "file": "pixel+perfect+click+detection.js", "title": "pixel perfect click detection" }, + { "file": "pixelpick+-+scrolling+effect.js", "title": "pixelpick - scrolling effect" }, + { "file": "pixelpick+-+spritesheet.js", "title": "pixelpick - spritesheet" }, + { "file": "snap+on+drag.js", "title": "snap on drag" } +], +"loader": [ + { "file": "pick+images+from+cache.js", "title": "pick images from cache" } +], +"misc": [ + { "file": "net.js", "title": "net" }, + { "file": "random+generators.js", "title": "random generators" }, + { "file": "repeatable+random+numbers.js", "title": "repeatable random numbers" } +], +"particles": [ + { "file": "click+burst.js", "title": "click burst" }, + { "file": "collision.js", "title": "collision" }, + { "file": "diamond+burst.js", "title": "diamond burst" }, + { "file": "no+rotation.js", "title": "no rotation" }, + { "file": "random+sprite.js", "title": "random sprite" }, + { "file": "when+particles+collide.js", "title": "when particles collide" }, + { "file": "zero+gravity.js", "title": "zero gravity" } +], +"physics": [ + { "file": "accelerate+to+pointer.js", "title": "accelerate to pointer" }, + { "file": "angle+between.js", "title": "angle between" }, + { "file": "angle+to+pointer.js", "title": "angle to pointer" }, + { "file": "angular+acceleration.js", "title": "angular acceleration" }, + { "file": "angular+velocity.js", "title": "angular velocity" }, + { "file": "mass+velocity+test.js", "title": "mass velocity test" }, + { "file": "move+towards+object.js", "title": "move towards object" }, + { "file": "multi+angle+to+pointer.js", "title": "multi angle to pointer" }, + { "file": "quadtree+-+collision+infos.js", "title": "quadtree - collision infos" }, + { "file": "quadtree+-+ids.js", "title": "quadtree - ids" }, + { "file": "shoot+the+pointer.js", "title": "shoot the pointer" }, + { "file": "sprite+bounds.js", "title": "sprite bounds" } +], +"sprites": [ + { "file": "add+a+sprite.js", "title": "add a sprite" }, + { "file": "add+several+sprites.js", "title": "add several sprites" }, + { "file": "collide+world+bounds.js", "title": "collide world bounds" }, + { "file": "destroy.js", "title": "destroy" }, + { "file": "dynamic+crop.js", "title": "dynamic crop" }, + { "file": "extending+sprite+demo+1.js", "title": "extending sprite demo 1" }, + { "file": "extending+sprite+demo+2.js", "title": "extending sprite demo 2" }, + { "file": "horizontal+crop.js", "title": "horizontal crop" }, + { "file": "move+a+sprite.js", "title": "move a sprite" }, + { "file": "out+of+bounds.js", "title": "out of bounds" }, + { "file": "scale+a+sprite.js", "title": "scale a sprite" }, + { "file": "shared+sprite+textures.js", "title": "shared sprite textures" }, + { "file": "sprite+rotation.js", "title": "sprite rotation" }, + { "file": "spritesheet.js", "title": "spritesheet" }, + { "file": "vertical+crop.js", "title": "vertical crop" } +], +"text": [ + { "file": "bitmap+fonts.js", "title": "bitmap fonts" }, + { "file": "hello+arial.js", "title": "hello arial" }, + { "file": "kern+of+duty.js", "title": "kern of duty" }, + { "file": "remove+text.js", "title": "remove text" }, + { "file": "text+stroke.js", "title": "text stroke" } +], +"tile sprites": [ + { "file": "animated+tiling+sprite.js", "title": "animated tiling sprite" }, + { "file": "tiling+sprite.js", "title": "tiling sprite" } +], +"tilemaps": [ + { "file": "fill+tiles.js", "title": "fill tiles" }, + { "file": "mapcollide.js", "title": "mapcollide" }, + { "file": "mario.js", "title": "mario" }, + { "file": "mariotogether.js", "title": "mariotogether" }, + { "file": "paint+tiles.js", "title": "paint tiles" }, + { "file": "randomise+tiles.js", "title": "randomise tiles" }, + { "file": "replace+tiles.js", "title": "replace tiles" }, + { "file": "sci+fly.js", "title": "sci fly" }, + { "file": "supermario.js", "title": "supermario" }, + { "file": "supermario2.js", "title": "supermario2" }, + { "file": "swap+tiles.js", "title": "swap tiles" }, + { "file": "wip1.js", "title": "wip1" }, + { "file": "wip2.js", "title": "wip2" }, + { "file": "wip3.js", "title": "wip3" }, + { "file": "wip4.js", "title": "wip4" } +], +"tweens": [ + { "file": "bounce.js", "title": "bounce" }, + { "file": "bubbles.js", "title": "bubbles" }, + { "file": "chained+tweens.js", "title": "chained tweens" }, + { "file": "combined+tweens.js", "title": "combined tweens" }, + { "file": "easing+spritesheets.js", "title": "easing spritesheets" }, + { "file": "easing.js", "title": "easing" }, + { "file": "fading+in+a+sprite.js", "title": "fading in a sprite" }, + { "file": "pause+tween.js", "title": "pause tween" }, + { "file": "tween+several+properties.js", "title": "tween several properties" } +], +"world": [ + { "file": "fixed+to+camera.js", "title": "fixed to camera" }, + { "file": "move+around+world.js", "title": "move around world" } +] } \ No newline at end of file diff --git a/examples/audio/pause and resume.js b/examples/audio/pause and resume.js new file mode 100644 index 00000000..bc9ef2b9 --- /dev/null +++ b/examples/audio/pause and resume.js @@ -0,0 +1,51 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); + +function preload() { + + game.load.image('disk', 'assets/sprites/ra_dont_crack_under_pressure.png'); + + // Firefox doesn't support mp3 files, so use ogg + game.load.audio('boden', ['assets/audio/bodenstaendig_2000_in_rock_4bit.mp3', 'assets/audio/bodenstaendig_2000_in_rock_4bit.ogg']); + +} + +var s; +var music; + +function create() { + + game.stage.backgroundColor = '#182d3b'; + game.input.touch.preventDefault = false; + + music = game.add.audio('boden'); + music.play(); + + s = game.add.sprite(game.world.centerX, game.world.centerY, 'disk'); + s.anchor.setTo(0.5, 0.5); + + game.input.onDown.add(changeVolume, this); + +} + +function changeVolume(pointer) { + + if (pointer.y < 300) + { + music.pause(); + } + else + { + music.resume(); + } + +} + +function update() { + s.rotation += 0.01; +} + +function render() { + game.debug.renderSoundInfo(music, 20, 32); +} + diff --git a/examples/sprites/dynamic crop.js b/examples/sprites/dynamic crop.js index 7707aedc..9922d0a0 100644 --- a/examples/sprites/dynamic crop.js +++ b/examples/sprites/dynamic crop.js @@ -1,29 +1,35 @@ -var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); function preload() { game.load.image('trsi', 'assets/pics/trsipic1_lazur.jpg'); } -var r; var pic; function create() { pic = game.add.sprite(0, 0, 'trsi'); - r = new Phaser.Rectangle(0, 0, 200, 200); + pic.cropEnabled = true; + + pic.crop.width = 128; + pic.crop.height = 128; } function update() { - r.x = game.input.x; - r.y = game.input.y; pic.x = game.input.x; pic.y = game.input.y; - // Apply the new crop Rectangle to the sprite - pic.crop = r; + pic.crop.x = game.input.x; + pic.crop.y = game.input.y; + +} + +function render() { + + game.debug.renderText('x: ' + game.input.x + ' y: ' + game.input.y, 32, 32); } diff --git a/examples/sprites/horizontal crop.js b/examples/sprites/horizontal crop.js index 74dcdd02..77f66dc7 100644 --- a/examples/sprites/horizontal crop.js +++ b/examples/sprites/horizontal crop.js @@ -1,27 +1,23 @@ -var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.image('trsi', 'assets/pics/trsipic1_lazur.jpg'); } -var r; -var pic; - function create() { - pic = game.add.sprite(game.world.centerX, 550, 'trsi'); + var pic = game.add.sprite(game.world.centerX, 550, 'trsi'); + pic.anchor.setTo(0.5, 1); + + // By default Sprites ignore the crop setting, you have to explicitly enable it like this: + pic.cropEnabled = true; - r = new Phaser.Rectangle(0, 0, 200, pic.height); + // Set the crop rect width to zero + pic.crop.width = 0; - game.add.tween(r).to( { x: pic.width - 200 }, 3000, Phaser.Easing.Bounce.Out, true, 0, 1000, true); - -} - -function update() { - - // Apply the new crop Rectangle to the sprite - pic.crop = r; + // Here we'll tween the crop rect, from a width of zero to full width, and back again + game.add.tween(pic.crop).to( { width: pic.width }, 3000, Phaser.Easing.Bounce.Out, true, 0, 1000, true); } diff --git a/examples/sprites/vertical crop.js b/examples/sprites/vertical crop.js index 83590cc1..09bd2887 100644 --- a/examples/sprites/vertical crop.js +++ b/examples/sprites/vertical crop.js @@ -1,27 +1,23 @@ -var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update }); +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.image('trsi', 'assets/pics/trsipic1_lazur.jpg'); } -var r; -var pic; - function create() { - pic = game.add.sprite(game.world.centerX, 550, 'trsi'); + var pic = game.add.sprite(game.world.centerX, 550, 'trsi'); + pic.anchor.setTo(0.5, 1); - r = new Phaser.Rectangle(0, 0, pic.width, 0); + // By default Sprites ignore the crop setting, you have to explicitly enable it like this: + pic.cropEnabled = true; - game.add.tween(r).to( { height: pic.height }, 3000, Phaser.Easing.Bounce.Out, true, 0, 1000, true); - -} - -function update() { - - // Apply the new crop Rectangle to the sprite - pic.crop = r; + // Set the crop rect height to zero + pic.crop.height = 0; + + // Here we'll tween the crop rect, from a height of zero to full height, and back again + game.add.tween(pic.crop).to( { height: pic.height }, 3000, Phaser.Easing.Bounce.Out, true, 0, 1000, true); } diff --git a/examples/wip/crop.js b/examples/wip/crop.js new file mode 100644 index 00000000..f6f846a0 --- /dev/null +++ b/examples/wip/crop.js @@ -0,0 +1,24 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update }); + +function preload() { + + game.load.image('atari1', 'assets/sprites/atari130xe.png'); + +} + +var atari; + +function create() { + + atari = game.add.sprite(300, 300, 'atari1'); + + // atari.crop = new Phaser.Rectangle(0, 0, 10, atari.height); + +} + +function update() { + + atari.crop.width -= 1; + +} diff --git a/examples/wip/input active.js b/examples/wip/input active.js new file mode 100644 index 00000000..71e00e67 --- /dev/null +++ b/examples/wip/input active.js @@ -0,0 +1,39 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.image('atari1', 'assets/sprites/atari130xe.png'); + game.load.image('coke', 'assets/sprites/cokecan.png'); + game.load.image('mushroom', 'assets/sprites/mushroom2.png'); + +} + +var dropper; + +function create() { + + dropper = game.add.sprite(200, 400, 'mushroom'); + dropper.inputEnabled = true; + dropper.input.enableDrag(); + dropper.events.onDragStart.add(prepareToKill, this); + +} + +function prepareToKill() { + + console.log('3 sec warning'); + + var t = { time: 0 }; + + var tween = game.add.tween(t).to({time: 1}, 3000, Phaser.Easing.Linear.None, true); + tween.onComplete.add(nukeIt, this); + +} + +function nukeIt() { + + console.log('nuked'); + dropper.destroy(); + +} diff --git a/src/animation/Animation.js b/src/animation/Animation.js index 1620b38a..ff95fd72 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -406,33 +406,55 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { * * @method Phaser.Animation.generateFrameNames * @param {string} prefix - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. -* @param {number} min - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1. -* @param {number} max - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34. +* @param {number} start - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1. +* @param {number} stop - The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34. * @param {string} [suffix=''] - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. * @param {number} [zeroPad=0] - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. */ -Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { +Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zeroPad) { if (typeof suffix == 'undefined') { suffix = ''; } var output = []; var frame = ''; - for (var i = min; i <= max; i++) + if (start < stop) { - if (typeof zeroPad == 'number') + for (var i = start; i <= stop; i++) { - // str, len, pad, dir - frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); } - else + } + else + { + for (var i = start; i >= stop; i--) { - frame = i.toString(); + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); } - - frame = prefix + frame + suffix; - - output.push(frame); } return output; diff --git a/src/core/Game.js b/src/core/Game.js index 83d0e0de..02b40049 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -426,6 +426,10 @@ Phaser.Game.prototype = { */ destroy: function () { + this.raf.stop(); + + this.input.destroy(); + this.state.destroy(); this.state = null; diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index f5203ded..2b468454 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -144,20 +144,6 @@ Phaser.Sprite = function (game, x, y, key, frame) { */ this.anchor = new Phaser.Point(); - /** - * @property {Description} _cropUUID - Description. - * @private - * @default - */ - this._cropUUID = null; - - /** - * @property {Description} _cropUUID - Description. - * @private - * @default - */ - this._cropRect = null; - /** * @property {number} x - Description. */ @@ -225,7 +211,10 @@ Phaser.Sprite = function (game, x, y, key, frame) { boundsX: 0, boundsY: 0, // If this sprite visible to the camera (regardless of being set to visible or not) - cameraVisible: true + cameraVisible: true, + + // Crop cache + cropX: 0, cropY: 0, cropWidth: this.currentFrame.sourceSizeW, cropHeight: this.currentFrame.sourceSizeH }; @@ -305,6 +294,9 @@ Phaser.Sprite = function (game, x, y, key, frame) { */ this.fixedToCamera = false; + this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); + this.cropEnabled = false; + }; // Needed to keep the PIXI.Sprite constructor in the prototype chain (as the core pixi renderer uses an instanceof check sadly) @@ -352,6 +344,11 @@ Phaser.Sprite.prototype.preUpdate = function() { this.updateCache(); this.updateAnimation(); + if (this.cropEnabled) + { + this.updateCrop(); + } + // Re-run the camera visibility check if (this._cache.dirty) { @@ -436,6 +433,37 @@ Phaser.Sprite.prototype.updateAnimation = function() { } +Phaser.Sprite.prototype.updateCrop = function() { + + // This only runs if crop is enabled + if (this.crop.width != this._cache.cropWidth || this.crop.height != this._cache.cropHeight || this.crop.x != this._cache.cropX || this.crop.y != this._cache.cropY) + { + this.crop.floorAll(); + + this._cache.cropX = this.crop.x; + this._cache.cropY = this.crop.y; + this._cache.cropWidth = this.crop.width; + this._cache.cropHeight = this.crop.height; + + this.texture.frame = this.crop; + this.texture.width = this.crop.width; + this.texture.height = this.crop.height; + + this.texture.updateFrame = true; + + PIXI.Texture.frameUpdates.push(this.texture); + } + +} + +Phaser.Sprite.prototype.resetCrop = function() { + + this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); + this.texture.setFrame(this.crop); + this.cropEnabled = false; + +} + Phaser.Sprite.prototype.postUpdate = function() { if (this.exists) @@ -586,9 +614,20 @@ Phaser.Sprite.prototype.destroy = function() { this.group.remove(this); } - this.input.destroy(); - this.events.destroy(); - this.animations.destroy(); + if (this.input) + { + this.input.destroy(); + } + + if (this.events) + { + this.events.destroy(); + } + + if (this.animations) + { + this.animations.destroy(); + } this.alive = false; this.exists = false; @@ -847,56 +886,39 @@ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { }); /** -* Get the input enabled state of this Sprite. -* @returns {Description} -*//** -* Set the ability for this sprite to receive input events. -* @param {Description} value - Description -*/ -Object.defineProperty(Phaser.Sprite.prototype, "crop", { - - get: function () { - - return this._cropRect; + * The width of the sprite, setting this will actually modify the scale to acheive the value set + * + * @property width + * @type Number + */ +Object.defineProperty(Phaser.Sprite.prototype, 'width', { + get: function() { + return this.scale.x * this.currentFrame.width; }, - set: function (value) { + set: function(value) { + this.scale.x = value / this.currentFrame.width + this._width = value; + } - if (value instanceof Phaser.Rectangle) - { - if (this._cropUUID == null) - { - this._cropUUID = this.game.rnd.uuid(); +}); - PIXI.TextureCache[this._cropUUID] = new PIXI.Texture(PIXI.BaseTextureCache[this.key], { - x: Math.floor(value.x), - y: Math.floor(value.y), - width: Math.floor(value.width), - height: Math.floor(value.height) - }); - } - else - { - PIXI.TextureCache[this._cropUUID].frame = value; - } +/** + * The height of the sprite, setting this will actually modify the scale to acheive the value set + * + * @property height + * @type Number + */ +Object.defineProperty(Phaser.Sprite.prototype, 'height', { - this._cropRect = value; - this.setTexture(PIXI.TextureCache[this._cropUUID]); - } - else - { - this._cropRect = null; + get: function() { + return this.scale.y * this.currentFrame.height; + }, - if (this.animations.isLoaded) - { - this.animations.refreshFrame(); - } - else - { - this.setTexture(PIXI.TextureCache[this.key]); - } - } + set: function(value) { + this.scale.y = value / this.currentFrame.height + this._height = value; } }); diff --git a/src/geom/Rectangle.js b/src/geom/Rectangle.js index 5b63e421..6890a2a8 100644 --- a/src/geom/Rectangle.js +++ b/src/geom/Rectangle.js @@ -103,6 +103,19 @@ Phaser.Rectangle.prototype = { }, + /** + * Runs Math.floor() on the x, y, width and height values of this Rectangle. + * @method Phaser.Rectangle#floorAll + **/ + floorAll: function () { + + this.x = Math.floor(this.x); + this.y = Math.floor(this.y); + this.width = Math.floor(this.width); + this.height = Math.floor(this.height); + + }, + /** * Copies the x, y, width and height properties from any given object to this Rectangle. * @method Phaser.Rectangle#copyFrom diff --git a/src/input/Input.js b/src/input/Input.js index efe1f7b0..acc9cda9 100644 --- a/src/input/Input.js +++ b/src/input/Input.js @@ -395,6 +395,19 @@ Phaser.Input.prototype = { this.mspointer.start(); this.mousePointer.active = true; + }, + + /** + * Stops all of the Input Managers from running. + * @method Phaser.Input#destroy + */ + destroy: function () { + + this.mouse.stop(); + this.keyboard.stop(); + this.touch.stop(); + this.mspointer.stop(); + }, /** @@ -681,28 +694,6 @@ Phaser.Input.prototype = { return null; - }, - - /** - * Get the distance between two Pointer objects. - * @method Phaser.Input#getDistance - * @param {Pointer} pointer1 - * @param {Pointer} pointer2 - * @return {Description} Description. - */ - getDistance: function (pointer1, pointer2) { - // return Phaser.Vec2Utils.distance(pointer1.position, pointer2.position); - }, - - /** - * Get the angle between two Pointer objects. - * @method Phaser.Input#getAngle - * @param {Pointer} pointer1 - * @param {Pointer} pointer2 - * @return {Description} Description. - */ - getAngle: function (pointer1, pointer2) { - // return Phaser.Vec2Utils.angle(pointer1.position, pointer2.position); } }; diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 985f8af1..cd2b0178 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -306,10 +306,13 @@ Phaser.InputHandler.prototype = { if (this.enabled) { + this.enabled = false; + + this.game.input.interactiveItems.remove(this); + this.stop(); - // Null everything + this.sprite = null; - // etc } }, @@ -615,7 +618,10 @@ Phaser.InputHandler.prototype = { this.game.stage.canvas.style.cursor = "default"; } - this.sprite.events.onInputOut.dispatch(this.sprite, pointer); + if (this.sprite && this.sprite.events) + { + this.sprite.events.onInputOut.dispatch(this.sprite, pointer); + } }, diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 950c8bf6..2558d1a7 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -281,7 +281,7 @@ Phaser.Pointer.prototype = { this.game.input.x = this.x * this.game.input.scale.x; this.game.input.y = this.y * this.game.input.scale.y; this.game.input.position.setTo(this.x, this.y); - this.game.input.onDown.dispatch(this); + this.game.input.onDown.dispatch(this, event); this.game.input.resetSpeed(this.x, this.y); } @@ -506,7 +506,7 @@ Phaser.Pointer.prototype = { if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0)) { - this.game.input.onUp.dispatch(this); + this.game.input.onUp.dispatch(this, event); // Was it a tap? if (this.duration >= 0 && this.duration <= this.game.input.tapRate) diff --git a/src/loader/Loader.js b/src/loader/Loader.js index 4402f1ac..dabdcb50 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -161,6 +161,7 @@ Phaser.Loader.prototype = { } sprite.crop = this.preloadSprite.crop; + sprite.cropEnabled = true; }, @@ -935,7 +936,7 @@ Phaser.Loader.prototype = { break; case 'text': - file.data = this._xhr.response; + file.data = this._xhr.responseText; this.game.cache.addText(file.key, file.url, file.data); break; } @@ -955,7 +956,7 @@ Phaser.Loader.prototype = { */ jsonLoadComplete: function (key) { - var data = JSON.parse(this._xhr.response); + var data = JSON.parse(this._xhr.responseText); var file = this._fileList[key]; if (file.type == 'tilemap') @@ -979,7 +980,7 @@ Phaser.Loader.prototype = { */ csvLoadComplete: function (key) { - var data = this._xhr.response; + var data = this._xhr.responseText; var file = this._fileList[key]; this.game.cache.addTilemap(file.key, file.url, data, file.format); @@ -1014,7 +1015,7 @@ Phaser.Loader.prototype = { */ xmlLoadComplete: function (key) { - var data = this._xhr.response; + var data = this._xhr.responseText; var xml; try diff --git a/src/sound/Sound.js b/src/sound/Sound.js index bbd5948d..32193c09 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -118,8 +118,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {number} autoplay - * @default + * @property {number} stopTime */ this.stopTime = 0; @@ -130,6 +129,18 @@ Phaser.Sound = function (game, key, volume, loop) { */ this.paused = false; + /** + * Description. + * @property {number} pausedPosition + */ + this.pausedPosition = 0; + + /** + * Description. + * @property {number} pausedTime + */ + this.pausedTime = 0; + /** * Description. * @property {boolean} isPlaying @@ -627,10 +638,13 @@ Phaser.Sound.prototype = { this.stop(); this.isPlaying = false; this.paused = true; + this.pausedPosition = this.currentTime; + this.pausedTime = this.game.time.now; this.onPause.dispatch(this); } }, + /** * Resumes the sound * @method Phaser.Sound#resume @@ -641,14 +655,20 @@ Phaser.Sound.prototype = { { if (this.usingWebAudio) { + var p = this.position + (this.pausedPosition / 1000); + + this._sound = this.context.createBufferSource(); + this._sound.buffer = this._buffer; + this._sound.connect(this.gainNode); + if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration); + this._sound.noteGrainOn(0, p, this.duration); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - this._sound.start(0, this.position, this.duration); + this._sound.start(0, p, this.duration); } } else @@ -658,6 +678,7 @@ Phaser.Sound.prototype = { this.isPlaying = true; this.paused = false; + this.startTime += (this.game.time.now - this.pausedTime); this.onResume.dispatch(this); } From 9ed930c4cf11ae73da1322f98ac239f379931934 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 24 Oct 2013 12:25:59 +0200 Subject: [PATCH 104/125] Add verbose output to examples task Verbose output: https://gist.github.com/ooflorent/7134728 --- tasks/examples.js | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/tasks/examples.js b/tasks/examples.js index d9bdf882..03eb9f14 100644 --- a/tasks/examples.js +++ b/tasks/examples.js @@ -20,18 +20,40 @@ module.exports = function(grunt) { }); this.files.forEach(function(f) { + if (grunt.option('verbose')) { + if (grunt.file.exists(f.dest)) { + grunt.verbose.writeln(); + grunt.verbose.warn('Destination file "%s" will be overridden.', f.dest); + } + grunt.verbose.writeln(); + } + var results = {}; - f.src.filter(function(filepath) { + var files = f.src.filter(function(filepath) { if (!grunt.file.exists(filepath)) { grunt.log.warn('Source file "' + filepath + '" not found.'); return false; } else { filepath = path.relative(options.base, filepath); return options.excludes.every(function(dir) { - return filepath.indexOf(dir + '/') < 0; + var keep = filepath.indexOf(dir + '/') < 0; + if (!keep) { + grunt.verbose.writeln('Skipping %s%s...', (dir + '/').inverse.red, filepath.substr(dir.length + 1)); + } + return keep; }); } - }).map(function(filepath) { + }); + + if (grunt.option('verbose')) { + grunt.verbose.writeln(); + grunt.verbose.writeln('Found ' + files.length.toString().cyan + ' examples:'); + files.forEach(function(file) { + grunt.verbose.writeln(' * '.cyan + file); + }); + } + + files.map(function(filepath) { return pathToArray(path.relative(options.base, filepath).split('/')); }).forEach(function(parts) { _.merge(results, parts, function(a, b) { @@ -43,7 +65,19 @@ module.exports = function(grunt) { }); }); + if (grunt.option('verbose')) { + var categories = Object.keys(results); + grunt.verbose.writeln(); + grunt.verbose.writeln('Extracted ' + categories.length.toString().cyan + ' categories:'); + categories.forEach(function(cat) { + grunt.verbose.writeln(' * '.cyan + cat); + }); + } + + grunt.verbose.writeln(); + grunt.verbose.or.write('Writing ' + f.dest + '...'); grunt.file.write(f.dest, JSON.stringify(results, null, ' ')); + grunt.verbose.or.ok(); }); }); }; From ab6dbfb49ec009565ebb135cb1957900290ac46b Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 24 Oct 2013 13:29:40 +0200 Subject: [PATCH 105/125] Remove path.relative() which produce unexpected results on Windows --- tasks/examples.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tasks/examples.js b/tasks/examples.js index 03eb9f14..a3282390 100644 --- a/tasks/examples.js +++ b/tasks/examples.js @@ -1,4 +1,3 @@ -var path = require('path'); var _ = require('lodash'); function pathToArray(parts) { @@ -34,11 +33,10 @@ module.exports = function(grunt) { grunt.log.warn('Source file "' + filepath + '" not found.'); return false; } else { - filepath = path.relative(options.base, filepath); return options.excludes.every(function(dir) { - var keep = filepath.indexOf(dir + '/') < 0; + var keep = filepath.indexOf(options.base + '/' + dir + '/') < 0; if (!keep) { - grunt.verbose.writeln('Skipping %s%s...', (dir + '/').inverse.red, filepath.substr(dir.length + 1)); + grunt.verbose.writeln('Skipping %s/%s/%s...', options.base, dir.inverse.red, filepath.substr(options.base.length + dir.length + 2)); } return keep; }); @@ -54,7 +52,7 @@ module.exports = function(grunt) { } files.map(function(filepath) { - return pathToArray(path.relative(options.base, filepath).split('/')); + return pathToArray(filepath.substr(options.base.length + 1).split('/')); }).forEach(function(parts) { _.merge(results, parts, function(a, b) { var example = { From f6b50c4520ed4df381d14994c97502bc6926b42d Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 24 Oct 2013 14:08:57 +0200 Subject: [PATCH 106/125] Fix order of examples --- examples/_site/js/phaser-examples.js | 11 +++++++++-- examples/_site/js/phaser-sideview.js | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/examples/_site/js/phaser-examples.js b/examples/_site/js/phaser-examples.js index 6b4034da..cc91c19b 100644 --- a/examples/_site/js/phaser-examples.js +++ b/examples/_site/js/phaser-examples.js @@ -10,8 +10,15 @@ $(document).ready(function(){ var node = ''; var laser = ''; - $.each(data, function(dir, files) + var directories = Object.keys(data); + + directories.splice(directories.indexOf('basics'), 1); + directories.splice(directories.indexOf('games'), 1); + directories.unshift('basics', 'games'); + + directories.forEach(function(dir) { + var files = data[dir]; len = Math.floor(files.length / 4) + 1; if ((files.length / 4) % 1 == 0) @@ -75,7 +82,7 @@ $(document).ready(function(){ node += '

    Did you open this html file locally?

    '; node += '

    It needs to be opened via a web server, or due to browser security permissions
    it will be unable to load local resources such as images and json data.

    '; node += '

    Please see our Getting Started guide for details.

    '; - + node += ''; node += ''; diff --git a/examples/_site/js/phaser-sideview.js b/examples/_site/js/phaser-sideview.js index 861cfb5e..9b34854a 100644 --- a/examples/_site/js/phaser-sideview.js +++ b/examples/_site/js/phaser-sideview.js @@ -7,8 +7,15 @@ $(document).ready(function(){ var i = 0; var node = ''; - $.each(data, function(dir, files) + var directories = Object.keys(data); + + directories.splice(directories.indexOf('basics'), 1); + directories.splice(directories.indexOf('games'), 1); + directories.unshift('basics', 'games'); + + directories.forEach(function(dir) { + var files = data[dir]; node = '

    ' + dir + '

    '; for (var e = 0; e < files.length; e++) From 708a144c7ab1936bb73081cc552851186bea5ed1 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Thu, 24 Oct 2013 14:12:54 +0200 Subject: [PATCH 107/125] Sort example directories --- examples/_site/js/phaser-examples.js | 1 + examples/_site/js/phaser-sideview.js | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/_site/js/phaser-examples.js b/examples/_site/js/phaser-examples.js index cc91c19b..67083539 100644 --- a/examples/_site/js/phaser-examples.js +++ b/examples/_site/js/phaser-examples.js @@ -14,6 +14,7 @@ $(document).ready(function(){ directories.splice(directories.indexOf('basics'), 1); directories.splice(directories.indexOf('games'), 1); + directories.sort(); directories.unshift('basics', 'games'); directories.forEach(function(dir) diff --git a/examples/_site/js/phaser-sideview.js b/examples/_site/js/phaser-sideview.js index 9b34854a..1c7278b4 100644 --- a/examples/_site/js/phaser-sideview.js +++ b/examples/_site/js/phaser-sideview.js @@ -11,6 +11,7 @@ $(document).ready(function(){ directories.splice(directories.indexOf('basics'), 1); directories.splice(directories.indexOf('games'), 1); + directories.sort(); directories.unshift('basics', 'games'); directories.forEach(function(dir) From 1f28d328a7b02be99d0758c3468ff8a7ea1f2268 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Thu, 24 Oct 2013 21:21:00 +0100 Subject: [PATCH 108/125] Commit before refactoring Sprite guts. --- README.md | 1 + examples/_site/examples.json | 828 ++++++++++++++++++++++++------- examples/buttons/button scale.js | 90 ++++ examples/wip/button size.js | 42 ++ examples/wip/fiddle.js | 12 +- examples/wip/index.php | 1 + src/gameobjects/Sprite.js | 301 ++++++++--- src/geom/Rectangle.js | 8 +- src/input/InputHandler.js | 51 +- src/loader/Cache.js | 3 +- src/utils/Debug.js | 2 +- 11 files changed, 1048 insertions(+), 291 deletions(-) create mode 100644 examples/buttons/button scale.js create mode 100644 examples/wip/button size.js diff --git a/README.md b/README.md index 1841790b..5c5cdd1d 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Version 1.1 * Change: Sprite.crop needs to be enabled with sprite.cropEnabled = true. * Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height). * Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora). +* Sprite.loadTexture now works correctly with static images, RenderTextures and Animations. Outstanding Tasks diff --git a/examples/_site/examples.json b/examples/_site/examples.json index 41646962..29e2a3bb 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -1,192 +1,640 @@ { -"basics": [ - { "file": "01+-+load+an+image.js", "title": "01 - load an image" } -], -"games": [ - { "file": "breakout.js", "title": "breakout" }, - { "file": "invaders.js", "title": "invaders" }, - { "file": "starstruck.js", "title": "starstruck" }, - { "file": "tanks.js", "title": "tanks" } -], -"animation": [ - { "file": "change+texture+on+click.js", "title": "change texture on click" }, - { "file": "local+json+object.js", "title": "local json object" }, - { "file": "looped+animation.js", "title": "looped animation" }, - { "file": "multiple+anims.js", "title": "multiple anims" }, - { "file": "sprite+sheet.js", "title": "sprite sheet" }, - { "file": "texture+packer+json+hash.js", "title": "texture packer json hash" } -], -"audio": [ - { "file": "loop.js", "title": "loop" }, - { "file": "pause+and+resume.js", "title": "pause and resume" }, - { "file": "play+music.js", "title": "play music" } -], -"buttons": [ - { "file": "action+on+click.js", "title": "action on click" }, - { "file": "changing+the+frames.js", "title": "changing the frames" }, - { "file": "rotated+buttons.js", "title": "rotated buttons" } -], -"camera": [ - { "file": "basic+follow.js", "title": "basic follow" }, - { "file": "camera+cull.js", "title": "camera cull" }, - { "file": "follow+styles.js", "title": "follow styles" }, - { "file": "moving+the+camera.js", "title": "moving the camera" }, - { "file": "world+sprite.js", "title": "world sprite" } -], -"collision": [ - { "file": "bounding+box.js", "title": "bounding box" }, - { "file": "group+vs+group.js", "title": "group vs group" }, - { "file": "larger+bounding+box.js", "title": "larger bounding box" }, - { "file": "offset+bounding+box.js", "title": "offset bounding box" }, - { "file": "sprite+tiles.js", "title": "sprite tiles" }, - { "file": "sprite+vs+group.js", "title": "sprite vs group" }, - { "file": "sprite+vs+sprite+custom.js", "title": "sprite vs sprite custom" }, - { "file": "sprite+vs+sprite.js", "title": "sprite vs sprite" }, - { "file": "transform.js", "title": "transform" }, - { "file": "vertical+collision.js", "title": "vertical collision" } -], -"display": [ - { "file": "fullscreen.js", "title": "fullscreen" }, - { "file": "graphics.js", "title": "graphics" }, - { "file": "render+crisp.js", "title": "render crisp" } -], -"geometry": [ - { "file": "circle.js", "title": "circle" }, - { "file": "line.js", "title": "line" }, - { "file": "playing+with+points.js", "title": "playing with points" }, - { "file": "rectangle.js", "title": "rectangle" }, - { "file": "rotate+point.js", "title": "rotate point" } -], -"groups": [ - { "file": "add+a+sprite+to+group.js", "title": "add a sprite to group" }, - { "file": "bring+a+child+to+top.js", "title": "bring a child to top" }, - { "file": "bring+a+group+to+top.js", "title": "bring a group to top" }, - { "file": "call+all.js", "title": "call all" }, - { "file": "create+group.js", "title": "create group" }, - { "file": "create+sprite+in+a+group.js", "title": "create sprite in a group" }, - { "file": "display+order.js", "title": "display order" }, - { "file": "for+each.js", "title": "for each" }, - { "file": "get+first.js", "title": "get first" }, - { "file": "group+as+layer.js", "title": "group as layer" }, - { "file": "group+transform+-+rotate.js", "title": "group transform - rotate" }, - { "file": "group+transform+-+tween.js", "title": "group transform - tween" }, - { "file": "group+transform.js", "title": "group transform" }, - { "file": "recyling.js", "title": "recyling" }, - { "file": "remove.js", "title": "remove" }, - { "file": "replace.js", "title": "replace" }, - { "file": "set+All.js", "title": "set All" }, - { "file": "sub+groups+-+group+length.js", "title": "sub groups - group length" }, - { "file": "swap+children+in+a+group.js", "title": "swap children in a group" } -], -"input": [ - { "file": "cursor+key+movement.js", "title": "cursor key movement" }, - { "file": "drag+several+sprites.js", "title": "drag several sprites" }, - { "file": "drag.js", "title": "drag" }, - { "file": "drop+limitation.js", "title": "drop limitation" }, - { "file": "follow+mouse.js", "title": "follow mouse" }, - { "file": "game+scale.js", "title": "game scale" }, - { "file": "key.js", "title": "key" }, - { "file": "keyboard+hotkeys.js", "title": "keyboard hotkeys" }, - { "file": "keyboard+justpressed.js", "title": "keyboard justpressed" }, - { "file": "keyboard.js", "title": "keyboard" }, - { "file": "motion+lock+-+horizontal.js", "title": "motion lock - horizontal" }, - { "file": "motion+lock+-+vertical.js", "title": "motion lock - vertical" }, - { "file": "multi+touch.js", "title": "multi touch" }, - { "file": "override+default+controls.js", "title": "override default controls" }, - { "file": "pixel+perfect+click+detection.js", "title": "pixel perfect click detection" }, - { "file": "pixelpick+-+scrolling+effect.js", "title": "pixelpick - scrolling effect" }, - { "file": "pixelpick+-+spritesheet.js", "title": "pixelpick - spritesheet" }, - { "file": "snap+on+drag.js", "title": "snap on drag" } -], -"loader": [ - { "file": "pick+images+from+cache.js", "title": "pick images from cache" } -], -"misc": [ - { "file": "net.js", "title": "net" }, - { "file": "random+generators.js", "title": "random generators" }, - { "file": "repeatable+random+numbers.js", "title": "repeatable random numbers" } -], -"particles": [ - { "file": "click+burst.js", "title": "click burst" }, - { "file": "collision.js", "title": "collision" }, - { "file": "diamond+burst.js", "title": "diamond burst" }, - { "file": "no+rotation.js", "title": "no rotation" }, - { "file": "random+sprite.js", "title": "random sprite" }, - { "file": "when+particles+collide.js", "title": "when particles collide" }, - { "file": "zero+gravity.js", "title": "zero gravity" } -], -"physics": [ - { "file": "accelerate+to+pointer.js", "title": "accelerate to pointer" }, - { "file": "angle+between.js", "title": "angle between" }, - { "file": "angle+to+pointer.js", "title": "angle to pointer" }, - { "file": "angular+acceleration.js", "title": "angular acceleration" }, - { "file": "angular+velocity.js", "title": "angular velocity" }, - { "file": "mass+velocity+test.js", "title": "mass velocity test" }, - { "file": "move+towards+object.js", "title": "move towards object" }, - { "file": "multi+angle+to+pointer.js", "title": "multi angle to pointer" }, - { "file": "quadtree+-+collision+infos.js", "title": "quadtree - collision infos" }, - { "file": "quadtree+-+ids.js", "title": "quadtree - ids" }, - { "file": "shoot+the+pointer.js", "title": "shoot the pointer" }, - { "file": "sprite+bounds.js", "title": "sprite bounds" } -], -"sprites": [ - { "file": "add+a+sprite.js", "title": "add a sprite" }, - { "file": "add+several+sprites.js", "title": "add several sprites" }, - { "file": "collide+world+bounds.js", "title": "collide world bounds" }, - { "file": "destroy.js", "title": "destroy" }, - { "file": "dynamic+crop.js", "title": "dynamic crop" }, - { "file": "extending+sprite+demo+1.js", "title": "extending sprite demo 1" }, - { "file": "extending+sprite+demo+2.js", "title": "extending sprite demo 2" }, - { "file": "horizontal+crop.js", "title": "horizontal crop" }, - { "file": "move+a+sprite.js", "title": "move a sprite" }, - { "file": "out+of+bounds.js", "title": "out of bounds" }, - { "file": "scale+a+sprite.js", "title": "scale a sprite" }, - { "file": "shared+sprite+textures.js", "title": "shared sprite textures" }, - { "file": "sprite+rotation.js", "title": "sprite rotation" }, - { "file": "spritesheet.js", "title": "spritesheet" }, - { "file": "vertical+crop.js", "title": "vertical crop" } -], -"text": [ - { "file": "bitmap+fonts.js", "title": "bitmap fonts" }, - { "file": "hello+arial.js", "title": "hello arial" }, - { "file": "kern+of+duty.js", "title": "kern of duty" }, - { "file": "remove+text.js", "title": "remove text" }, - { "file": "text+stroke.js", "title": "text stroke" } -], -"tile sprites": [ - { "file": "animated+tiling+sprite.js", "title": "animated tiling sprite" }, - { "file": "tiling+sprite.js", "title": "tiling sprite" } -], -"tilemaps": [ - { "file": "fill+tiles.js", "title": "fill tiles" }, - { "file": "mapcollide.js", "title": "mapcollide" }, - { "file": "mario.js", "title": "mario" }, - { "file": "mariotogether.js", "title": "mariotogether" }, - { "file": "paint+tiles.js", "title": "paint tiles" }, - { "file": "randomise+tiles.js", "title": "randomise tiles" }, - { "file": "replace+tiles.js", "title": "replace tiles" }, - { "file": "sci+fly.js", "title": "sci fly" }, - { "file": "supermario.js", "title": "supermario" }, - { "file": "supermario2.js", "title": "supermario2" }, - { "file": "swap+tiles.js", "title": "swap tiles" }, - { "file": "wip1.js", "title": "wip1" }, - { "file": "wip2.js", "title": "wip2" }, - { "file": "wip3.js", "title": "wip3" }, - { "file": "wip4.js", "title": "wip4" } -], -"tweens": [ - { "file": "bounce.js", "title": "bounce" }, - { "file": "bubbles.js", "title": "bubbles" }, - { "file": "chained+tweens.js", "title": "chained tweens" }, - { "file": "combined+tweens.js", "title": "combined tweens" }, - { "file": "easing+spritesheets.js", "title": "easing spritesheets" }, - { "file": "easing.js", "title": "easing" }, - { "file": "fading+in+a+sprite.js", "title": "fading in a sprite" }, - { "file": "pause+tween.js", "title": "pause tween" }, - { "file": "tween+several+properties.js", "title": "tween several properties" } -], -"world": [ - { "file": "fixed+to+camera.js", "title": "fixed to camera" }, - { "file": "move+around+world.js", "title": "move around world" } -] + "animation": [ + { + "file": "change+texture+on+click.js", + "title": "change texture on click" + }, + { + "file": "local+json+object.js", + "title": "local json object" + }, + { + "file": "looped+animation.js", + "title": "looped animation" + }, + { + "file": "multiple+anims.js", + "title": "multiple anims" + }, + { + "file": "sprite+sheet.js", + "title": "sprite sheet" + }, + { + "file": "texture+packer+json+hash.js", + "title": "texture packer json hash" + } + ], + "audio": [ + { + "file": "loop.js", + "title": "loop" + }, + { + "file": "pause+and+resume.js", + "title": "pause and resume" + }, + { + "file": "play+music.js", + "title": "play music" + } + ], + "basics": [ + { + "file": "01+-+load+an+image.js", + "title": "01 - load an image" + } + ], + "buttons": [ + { + "file": "action+on+click.js", + "title": "action on click" + }, + { + "file": "button+scale.js", + "title": "button scale" + }, + { + "file": "changing+the+frames.js", + "title": "changing the frames" + }, + { + "file": "rotated+buttons.js", + "title": "rotated buttons" + } + ], + "camera": [ + { + "file": "basic+follow.js", + "title": "basic follow" + }, + { + "file": "camera+cull.js", + "title": "camera cull" + }, + { + "file": "follow+styles.js", + "title": "follow styles" + }, + { + "file": "moving+the+camera.js", + "title": "moving the camera" + }, + { + "file": "world+sprite.js", + "title": "world sprite" + } + ], + "collision": [ + { + "file": "bounding+box.js", + "title": "bounding box" + }, + { + "file": "group+vs+group.js", + "title": "group vs group" + }, + { + "file": "larger+bounding+box.js", + "title": "larger bounding box" + }, + { + "file": "offset+bounding+box.js", + "title": "offset bounding box" + }, + { + "file": "sprite+tiles.js", + "title": "sprite tiles" + }, + { + "file": "sprite+vs+group.js", + "title": "sprite vs group" + }, + { + "file": "sprite+vs+sprite+custom.js", + "title": "sprite vs sprite custom" + }, + { + "file": "sprite+vs+sprite.js", + "title": "sprite vs sprite" + }, + { + "file": "transform.js", + "title": "transform" + }, + { + "file": "vertical+collision.js", + "title": "vertical collision" + } + ], + "display": [ + { + "file": "fullscreen.js", + "title": "fullscreen" + }, + { + "file": "graphics.js", + "title": "graphics" + }, + { + "file": "render+crisp.js", + "title": "render crisp" + } + ], + "games": [ + { + "file": "breakout.js", + "title": "breakout" + }, + { + "file": "invaders.js", + "title": "invaders" + }, + { + "file": "starstruck.js", + "title": "starstruck" + }, + { + "file": "tanks.js", + "title": "tanks" + } + ], + "geometry": [ + { + "file": "circle.js", + "title": "circle" + }, + { + "file": "line.js", + "title": "line" + }, + { + "file": "playing+with+points.js", + "title": "playing with points" + }, + { + "file": "rectangle.js", + "title": "rectangle" + }, + { + "file": "rotate+point.js", + "title": "rotate point" + } + ], + "groups": [ + { + "file": "add+a+sprite+to+group.js", + "title": "add a sprite to group" + }, + { + "file": "bring+a+child+to+top.js", + "title": "bring a child to top" + }, + { + "file": "bring+a+group+to+top.js", + "title": "bring a group to top" + }, + { + "file": "call+all.js", + "title": "call all" + }, + { + "file": "create+group.js", + "title": "create group" + }, + { + "file": "create+sprite+in+a+group.js", + "title": "create sprite in a group" + }, + { + "file": "display+order.js", + "title": "display order" + }, + { + "file": "for+each.js", + "title": "for each" + }, + { + "file": "get+first.js", + "title": "get first" + }, + { + "file": "group+as+layer.js", + "title": "group as layer" + }, + { + "file": "group+transform+-+rotate.js", + "title": "group transform - rotate" + }, + { + "file": "group+transform+-+tween.js", + "title": "group transform - tween" + }, + { + "file": "group+transform.js", + "title": "group transform" + }, + { + "file": "recyling.js", + "title": "recyling" + }, + { + "file": "remove.js", + "title": "remove" + }, + { + "file": "replace.js", + "title": "replace" + }, + { + "file": "set+All.js", + "title": "set All" + }, + { + "file": "sub+groups+-+group+length.js", + "title": "sub groups - group length" + }, + { + "file": "swap+children+in+a+group.js", + "title": "swap children in a group" + } + ], + "input": [ + { + "file": "cursor+key+movement.js", + "title": "cursor key movement" + }, + { + "file": "drag+several+sprites.js", + "title": "drag several sprites" + }, + { + "file": "drag.js", + "title": "drag" + }, + { + "file": "drop+limitation.js", + "title": "drop limitation" + }, + { + "file": "follow+mouse.js", + "title": "follow mouse" + }, + { + "file": "game+scale.js", + "title": "game scale" + }, + { + "file": "key.js", + "title": "key" + }, + { + "file": "keyboard+hotkeys.js", + "title": "keyboard hotkeys" + }, + { + "file": "keyboard+justpressed.js", + "title": "keyboard justpressed" + }, + { + "file": "keyboard.js", + "title": "keyboard" + }, + { + "file": "motion+lock+-+horizontal.js", + "title": "motion lock - horizontal" + }, + { + "file": "motion+lock+-+vertical.js", + "title": "motion lock - vertical" + }, + { + "file": "multi+touch.js", + "title": "multi touch" + }, + { + "file": "override+default+controls.js", + "title": "override default controls" + }, + { + "file": "pixel+perfect+click+detection.js", + "title": "pixel perfect click detection" + }, + { + "file": "pixelpick+-+scrolling+effect.js", + "title": "pixelpick - scrolling effect" + }, + { + "file": "pixelpick+-+spritesheet.js", + "title": "pixelpick - spritesheet" + }, + { + "file": "snap+on+drag.js", + "title": "snap on drag" + } + ], + "loader": [ + { + "file": "pick+images+from+cache.js", + "title": "pick images from cache" + } + ], + "misc": [ + { + "file": "net.js", + "title": "net" + }, + { + "file": "random+generators.js", + "title": "random generators" + }, + { + "file": "repeatable+random+numbers.js", + "title": "repeatable random numbers" + } + ], + "particles": [ + { + "file": "click+burst.js", + "title": "click burst" + }, + { + "file": "collision.js", + "title": "collision" + }, + { + "file": "diamond+burst.js", + "title": "diamond burst" + }, + { + "file": "no+rotation.js", + "title": "no rotation" + }, + { + "file": "random+sprite.js", + "title": "random sprite" + }, + { + "file": "when+particles+collide.js", + "title": "when particles collide" + }, + { + "file": "zero+gravity.js", + "title": "zero gravity" + } + ], + "physics": [ + { + "file": "accelerate+to+pointer.js", + "title": "accelerate to pointer" + }, + { + "file": "angle+between.js", + "title": "angle between" + }, + { + "file": "angle+to+pointer.js", + "title": "angle to pointer" + }, + { + "file": "angular+acceleration.js", + "title": "angular acceleration" + }, + { + "file": "angular+velocity.js", + "title": "angular velocity" + }, + { + "file": "mass+velocity+test.js", + "title": "mass velocity test" + }, + { + "file": "move+towards+object.js", + "title": "move towards object" + }, + { + "file": "multi+angle+to+pointer.js", + "title": "multi angle to pointer" + }, + { + "file": "quadtree+-+collision+infos.js", + "title": "quadtree - collision infos" + }, + { + "file": "quadtree+-+ids.js", + "title": "quadtree - ids" + }, + { + "file": "shoot+the+pointer.js", + "title": "shoot the pointer" + }, + { + "file": "sprite+bounds.js", + "title": "sprite bounds" + } + ], + "sprites": [ + { + "file": "add+a+sprite.js", + "title": "add a sprite" + }, + { + "file": "add+several+sprites.js", + "title": "add several sprites" + }, + { + "file": "collide+world+bounds.js", + "title": "collide world bounds" + }, + { + "file": "destroy.js", + "title": "destroy" + }, + { + "file": "dynamic+crop.js", + "title": "dynamic crop" + }, + { + "file": "extending+sprite+demo+1.js", + "title": "extending sprite demo 1" + }, + { + "file": "extending+sprite+demo+2.js", + "title": "extending sprite demo 2" + }, + { + "file": "horizontal+crop.js", + "title": "horizontal crop" + }, + { + "file": "move+a+sprite.js", + "title": "move a sprite" + }, + { + "file": "out+of+bounds.js", + "title": "out of bounds" + }, + { + "file": "scale+a+sprite.js", + "title": "scale a sprite" + }, + { + "file": "shared+sprite+textures.js", + "title": "shared sprite textures" + }, + { + "file": "sprite+rotation.js", + "title": "sprite rotation" + }, + { + "file": "spritesheet.js", + "title": "spritesheet" + }, + { + "file": "vertical+crop.js", + "title": "vertical crop" + } + ], + "text": [ + { + "file": "bitmap+fonts.js", + "title": "bitmap fonts" + }, + { + "file": "hello+arial.js", + "title": "hello arial" + }, + { + "file": "kern+of+duty.js", + "title": "kern of duty" + }, + { + "file": "remove+text.js", + "title": "remove text" + }, + { + "file": "text+stroke.js", + "title": "text stroke" + } + ], + "tile sprites": [ + { + "file": "animated+tiling+sprite.js", + "title": "animated tiling sprite" + }, + { + "file": "tiling+sprite.js", + "title": "tiling sprite" + } + ], + "tilemaps": [ + { + "file": "fill+tiles.js", + "title": "fill tiles" + }, + { + "file": "mapcollide.js", + "title": "mapcollide" + }, + { + "file": "mario.js", + "title": "mario" + }, + { + "file": "mariotogether.js", + "title": "mariotogether" + }, + { + "file": "paint+tiles.js", + "title": "paint tiles" + }, + { + "file": "randomise+tiles.js", + "title": "randomise tiles" + }, + { + "file": "replace+tiles.js", + "title": "replace tiles" + }, + { + "file": "sci+fly.js", + "title": "sci fly" + }, + { + "file": "supermario.js", + "title": "supermario" + }, + { + "file": "supermario2.js", + "title": "supermario2" + }, + { + "file": "swap+tiles.js", + "title": "swap tiles" + }, + { + "file": "wip1.js", + "title": "wip1" + }, + { + "file": "wip2.js", + "title": "wip2" + }, + { + "file": "wip3.js", + "title": "wip3" + }, + { + "file": "wip4.js", + "title": "wip4" + } + ], + "tweens": [ + { + "file": "bounce.js", + "title": "bounce" + }, + { + "file": "bubbles.js", + "title": "bubbles" + }, + { + "file": "chained+tweens.js", + "title": "chained tweens" + }, + { + "file": "combined+tweens.js", + "title": "combined tweens" + }, + { + "file": "easing+spritesheets.js", + "title": "easing spritesheets" + }, + { + "file": "easing.js", + "title": "easing" + }, + { + "file": "fading+in+a+sprite.js", + "title": "fading in a sprite" + }, + { + "file": "pause+tween.js", + "title": "pause tween" + }, + { + "file": "tween+several+properties.js", + "title": "tween several properties" + } + ], + "world": [ + { + "file": "fixed+to+camera.js", + "title": "fixed to camera" + }, + { + "file": "move+around+world.js", + "title": "move around world" + } + ] } \ No newline at end of file diff --git a/examples/buttons/button scale.js b/examples/buttons/button scale.js new file mode 100644 index 00000000..209b35d2 --- /dev/null +++ b/examples/buttons/button scale.js @@ -0,0 +1,90 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render }); + +function preload() { + + game.load.spritesheet('button', 'assets/buttons/button_sprite_sheet.png', 193, 71); + + game.load.image('sky0','assets/skies/space2.png'); + game.load.image('sky1','assets/skies/cavern1.png'); + game.load.image('sky2','assets/skies/chrome.png'); + game.load.image('sky3','assets/skies/fire.png'); + game.load.image('sky4','assets/skies/fog.png'); + game.load.image('sky5','assets/skies/sky1.png'); + game.load.image('sky6','assets/skies/toxic.png'); + +} + +var background; +var button1; +var button2; +var button3; +var button4; +var button5; +var button6; + +function create() { + + background = game.add.sprite(0, 0, 'sky0'); + background.name = 'background'; + + // Standard button (also used as our pointer tracker) + button1 = game.add.button(100, 100, 'button', changeSky, this, 2, 1, 0); + button1.name = 'sky1'; + button1.anchor.setTo(0.5, 0.5); + + // Rotated button + button2 = game.add.button(330, 200, 'button', changeSky, this, 2, 1, 0); + button2.name = 'sky2'; + button2.angle = 24; + button2.anchor.setTo(0.5, 0.5); + + // Width scaled button + button3 = game.add.button(100, 300, 'button', changeSky, this, 2, 1, 0); + button3.name = 'sky3'; + button3.width = 300; + + // Scaled button + button4 = game.add.button(300, 450, 'button', changeSky, this, 2, 1, 0); + button4.name = 'sky4'; + button4.scale.setTo(2, 2); + + // Shrunk button + button5 = game.add.button(100, 450, 'button', changeSky, this, 2, 1, 0); + button5.name = 'sky5'; + button5.scale.setTo(0.5, 0.5); + + // Scaled and Rotated button + button6 = game.add.button(600, 200, 'button', changeSky, this, 2, 1, 0); + button6.name = 'sky6'; + button6.angle = 24; + button6.scale.setTo(0.5, 2); + // button6.anchor.setTo(0.5, 0.5); + + // game.world.setBounds(0, 0, 2000, 2000); + // works regardless of world angle, parent angle or camera position + // game.world.angle = 5; + // game.camera.x = 300; + +} + +function changeSky (button) { + + background.loadTexture(button.name); + +} + +function render () { + + game.debug.renderSpriteCorners(button1, false, true); + game.debug.renderSpriteCorners(button2, false, true); + game.debug.renderSpriteCorners(button3, false, true); + game.debug.renderSpriteCorners(button4, false, true); + game.debug.renderSpriteCorners(button5, false, true); + game.debug.renderSpriteCorners(button6, false, true); + + // game.debug.renderLocalTransformInfo(button3, 32, 132); + // game.debug.renderText('ox: ' + button1.offset.x + ' oy: ' + button1.offset.y, 32, 200); + game.debug.renderPoint(button6.input._tempPoint); + +} diff --git a/examples/wip/button size.js b/examples/wip/button size.js new file mode 100644 index 00000000..365e6184 --- /dev/null +++ b/examples/wip/button size.js @@ -0,0 +1,42 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, render: render }); + +function preload() { + + game.load.spritesheet('button', 'assets/buttons/button_sprite_sheet.png', 193, 71); + game.load.image('background','assets/misc/starfield.jpg'); + +} + +var button; +var background; + +function create() { + + game.stage.backgroundColor = '#182d3b'; + + background = game.add.tileSprite(0, 0, 800, 600, 'background'); + + button = game.add.button(game.world.centerX - 95, 200, 'button', actionOnClick, this, 2, 1, 0); + button.anchor.setTo(0.5, 0.5); + + button.scale.setTo(2, 2); + // button.width = 100; + // button.height = 300; + button.angle = 10; + +} + +function actionOnClick () { + + background.visible =! background.visible; + +} + +function render () { + + game.debug.renderSpriteCorners(button); + + game.debug.renderPoint(button.input._tempPoint); + +} diff --git a/examples/wip/fiddle.js b/examples/wip/fiddle.js index cbb7185e..62c9427e 100644 --- a/examples/wip/fiddle.js +++ b/examples/wip/fiddle.js @@ -13,17 +13,17 @@ function create() { ball = game.add.sprite(300, 0, 'ball'); - startBounceTween(); + TweenLite.to(ball, 10, { y: 400 }); } function startBounceTween() { - ball.y = 0; + // ball.y = 0; - var bounce=game.add.tween(ball); + // var bounce=game.add.tween(ball); - bounce.to({ y: game.world.height-ball.height }, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.In); - bounce.onComplete.add(startBounceTween, this); - bounce.start(); + // bounce.to({ y: game.world.height-ball.height }, 1000 + Math.random() * 3000, Phaser.Easing.Bounce.In); + // bounce.onComplete.add(startBounceTween, this); + // bounce.start(); } diff --git a/examples/wip/index.php b/examples/wip/index.php index 3db7c03a..5f7a6174 100644 --- a/examples/wip/index.php +++ b/examples/wip/index.php @@ -77,6 +77,7 @@ phaser + = a.x && x <= a.right && y >= a.y && y <= a.bottom); }; +Phaser.Rectangle.containsRaw = function (rx, ry, rw, rh, x, y) { + return (x >= rx && x <= (rx + rw) && y >= ry && y <= (ry + rh)); +}; + /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter. * @method Phaser.Rectangle.containsPoint @@ -566,7 +570,7 @@ Phaser.Rectangle.contains = function (a, x, y) { * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsPoint = function (a, point) { - return Phaser.Phaser.Rectangle.contains(a, point.x, point.y); + return Phaser.Rectangle.contains(a, point.x, point.y); }; /** diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index cd2b0178..f43c1cbf 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -484,28 +484,49 @@ Phaser.InputHandler.prototype = { { this.sprite.getLocalUnmodifiedPosition(this._tempPoint, pointer.x, pointer.y); - // Check against bounds first (move these to private vars) - var x1 = -(this.sprite.texture.frame.width) * this.sprite.anchor.x; - var y1; - - if (this._tempPoint.x > x1 && this._tempPoint.x < x1 + this.sprite.texture.frame.width) + // The unmodified position is being offset by the anchor, i.e. into negative space + + // var x = this.sprite.anchor.x * this.sprite.width; + // var y = this.sprite.anchor.y * this.sprite.height; + var x = 0; + var y = 0; + + // check world transform + if (this.sprite.worldTransform[3] == 0 && this.sprite.worldTransform[1] == 0) { - y1 = -(this.sprite.texture.frame.height) * this.sprite.anchor.y; - - if (this._tempPoint.y > y1 && this._tempPoint.y < y1 + this.sprite.texture.frame.height) + // Un-rotated (but potentially scaled) + // if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.height) + if (this._tempPoint.x >= x && this._tempPoint.x <= this.sprite.width && this._tempPoint.y >= y && this._tempPoint.y <= this.sprite.height) + { + return true; + } + } + else + { + // Rotated (and could be scaled too) + // if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height) + if (this._tempPoint.x >= x && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= y && this._tempPoint.y <= this.sprite.currentFrame.height) { - if (this.pixelPerfect) - { - return this.checkPixel(this._tempPoint.x, this._tempPoint.y); - } - else - { return true; - } } } } + // if (this.pixelPerfect) + // { + // return this.checkPixel(this._tempPoint.x, this._tempPoint.y); + // } + // else + // { + // return true; + // } + // } + // } + + // } + + // } + return false; }, diff --git a/src/loader/Cache.js b/src/loader/Cache.js index 65a9336c..90cb2af2 100644 --- a/src/loader/Cache.js +++ b/src/loader/Cache.js @@ -263,7 +263,8 @@ Phaser.Cache.prototype = { addImage: function (key, url, data) { this._images[key] = { url: url, data: data, spriteSheet: false }; - this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, '', ''); + + this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, key, this.game.rnd.uuid()); PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 0e9daa09..5e742aa2 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -206,7 +206,7 @@ Phaser.Utils.Debug.prototype = { if (showBounds) { - this.context.strokeStyle = 'rgba(255,0,255,0.5)'; + this.context.strokeStyle = 'rgba(0,255,0,0.8)'; this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height); this.context.stroke(); } From 1469663ea5d6afc9e647aa206eac0341616c67cd Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 02:19:16 +0100 Subject: [PATCH 109/125] Button fixes and Input coordinate fixes. --- examples/buttons/button scale.js | 12 +++-- src/gameobjects/Sprite.js | 75 ++++++++++---------------------- src/input/InputHandler.js | 6 +-- src/utils/Debug.js | 20 ++++----- 4 files changed, 43 insertions(+), 70 deletions(-) diff --git a/examples/buttons/button scale.js b/examples/buttons/button scale.js index 209b35d2..30204ae6 100644 --- a/examples/buttons/button scale.js +++ b/examples/buttons/button scale.js @@ -57,13 +57,17 @@ function create() { // Scaled and Rotated button button6 = game.add.button(600, 200, 'button', changeSky, this, 2, 1, 0); button6.name = 'sky6'; - button6.angle = 24; - button6.scale.setTo(0.5, 2); - // button6.anchor.setTo(0.5, 0.5); + button6.angle = 32; + button6.scale.setTo(2, 2); + button6.anchor.setTo(0.5, 0.5); + // scale + anchor works fine + // angle + anchor works fine + // scale + angle + anchor falls over + // game.world.setBounds(0, 0, 2000, 2000); // works regardless of world angle, parent angle or camera position - // game.world.angle = 5; + // game.world.angle = 10; // game.camera.x = 300; } diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 1ed1e2b8..6318fb97 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -213,7 +213,8 @@ Phaser.Sprite = function (game, x, y, key, frame) { calcWidth: -1, calcHeight: -1, // The current frame details - frameID: this.currentFrame.uuid, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height, + // frameID: this.currentFrame.uuid, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height, + frameID: -1, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height, boundsX: 0, boundsY: 0, @@ -389,44 +390,6 @@ Phaser.Sprite.prototype.updateCache = function() { // |b d ty| // |0 0 1| - - // this._cache.width = Math.floor(this.currentFrame.sourceSizeW); - // this._cache.height = Math.floor(this.currentFrame.sourceSizeH); - // this._cache.halfWidth = Math.floor(this._cache.width / 2); - // this._cache.halfHeight = Math.floor(this._cache.height / 2); - - - // this._cache.scaleX = this.scale.x; - // this._cache.scaleY = this.scale.y; - - /* - if (this.scale.x !== this._cache.realScaleX || this.scale.y !== this._cache.realScaleY) - { - console.log('rescale', this.name); - this._cache.width = this.width; - this._cache.height = this.height; - this._cache.halfWidth = Math.floor(this._cache.width / 2); - this._cache.halfHeight = Math.floor(this._cache.height / 2); - this._cache.realScaleX = this.scale.x; - this._cache.realScaleY = this.scale.y; - this.updateFrame = true; - this._cache.dirty = true; - } - */ - - if (this._cache.calcWidth !== this.width || this._cache.calcHeight !== this.height) - { - console.log('calc', this.name); - this._cache.width = Math.floor(this.currentFrame.sourceSizeW); - this._cache.height = Math.floor(this.currentFrame.sourceSizeH); - this._cache.halfWidth = Math.floor(this._cache.width / 2); - this._cache.halfHeight = Math.floor(this._cache.height / 2); - this._cache.frameWidth = this.texture.frame.width; - this._cache.frameHeight = this.texture.frame.height; - this._cache.frameID = this.currentFrame.uuid; - this._cache.dirty = true; - } - if (this.worldTransform[1] != this._cache.i01 || this.worldTransform[3] != this._cache.i10) { this._cache.a00 = this.worldTransform[0]; // scaleX a @@ -459,10 +422,10 @@ Phaser.Sprite.prototype.updateAnimation = function() { if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID) { - // console.log('ua frame 1 change', this.name); - // this._cache.frameWidth = this.texture.frame.width; - // this._cache.frameHeight = this.texture.frame.height; - // this._cache.frameID = this.currentFrame.uuid; + console.log('ua frame 1 change', this.name); + this._cache.frameWidth = this.texture.frame.width; + this._cache.frameHeight = this.texture.frame.height; + this._cache.frameID = this.currentFrame.uuid; this._cache.dirty = true; } @@ -471,12 +434,12 @@ Phaser.Sprite.prototype.updateAnimation = function() { console.log('ua frame 2 change', this.name); // this._cache.width = Math.floor(this.currentFrame.sourceSizeW * this._cache.scaleX); // this._cache.height = Math.floor(this.currentFrame.sourceSizeH * this._cache.scaleY); - // this._cache.width = this.currentFrame.width; - // // this._cache.height = this.currentFrame.height; + this._cache.width = this.currentFrame.width; + this._cache.height = this.currentFrame.height; // this._cache.width = Math.floor(this.currentFrame.sourceSizeW); // this._cache.height = Math.floor(this.currentFrame.sourceSizeH); - // this._cache.halfWidth = Math.floor(this._cache.width / 2); - // this._cache.halfHeight = Math.floor(this._cache.height / 2); + this._cache.halfWidth = Math.floor(this._cache.width / 2); + this._cache.halfHeight = Math.floor(this._cache.height / 2); this._cache.id = 1 / (this._cache.a00 * this._cache.a11 + this._cache.a01 * -this._cache.a10); this._cache.idi = 1 / (this._cache.a00 * this._cache.a11 + this._cache.i01 * -this._cache.i10); @@ -492,10 +455,16 @@ Phaser.Sprite.prototype.updateAnimation = function() { Phaser.Sprite.prototype.updateBounds = function() { // Update the edge points - console.log('updateBounds', this.name); this.offset.setTo(this._cache.a02 - (this.anchor.x * this._cache.width), this._cache.a12 - (this.anchor.y * this._cache.height)); + // this.offset.setTo(this._cache.a02 - (this.anchor.x * this.currentFrame.width), this._cache.a12 - (this.anchor.y * this.currentFrame.height)); + // this.offset.setTo(this._cache.a02 - (this.anchor.x * this.width), this._cache.a12 - (this.anchor.y * this.height)); + + // this.offset.setTo(this._cache.a02 - (this.anchor.x * this._cache.width), this._cache.a12 - (this.anchor.y * this._cache.height)); + + console.log('updateBounds', this.name, this.offset.x, this.offset.y); + this.getLocalPosition(this.center, this.offset.x + this._cache.halfWidth, this.offset.y + this._cache.halfHeight); this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y); this.getLocalPosition(this.topRight, this.offset.x + this._cache.width, this.offset.y); @@ -513,8 +482,8 @@ Phaser.Sprite.prototype.updateBounds = function() { this._cache.boundsX = this._cache.x; this._cache.boundsY = this._cache.y; - this._cache.calcWidth = this.width; - this._cache.calcHeight = this.height; + // this._cache.calcWidth = this.width; + // this._cache.calcHeight = this.height; this.updateFrame = true; @@ -872,9 +841,10 @@ Phaser.Sprite.prototype.reset = function(x, y, health) { */ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) { - // p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this.scale.x) + this._cache.a02; - // p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; + p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this.scale.x) + this._cache.a02; + p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; + /* if (this.worldTransform[0] == 1) { p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * 1) + this._cache.a02; @@ -892,6 +862,7 @@ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) { { p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; } + */ return p; diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index f43c1cbf..fe90ba7c 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -495,19 +495,17 @@ Phaser.InputHandler.prototype = { if (this.sprite.worldTransform[3] == 0 && this.sprite.worldTransform[1] == 0) { // Un-rotated (but potentially scaled) - // if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.height) if (this._tempPoint.x >= x && this._tempPoint.x <= this.sprite.width && this._tempPoint.y >= y && this._tempPoint.y <= this.sprite.height) { - return true; + return true; } } else { // Rotated (and could be scaled too) - // if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height) if (this._tempPoint.x >= x && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= y && this._tempPoint.y <= this.sprite.currentFrame.height) { - return true; + return true; } } } diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 5e742aa2..6dc1e82f 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -200,25 +200,25 @@ Phaser.Utils.Debug.prototype = { showText = showText || false; showBounds = showBounds || false; - color = color || 'rgb(255,0,255)'; + color = color || 'rgb(255,255,255)'; this.start(0, 0, color); if (showBounds) { - this.context.strokeStyle = 'rgba(0,255,0,0.8)'; + this.context.strokeStyle = 'rgba(255,0,0,1)'; this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height); this.context.stroke(); } - this.context.beginPath(); - this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y); - this.context.lineTo(sprite.topRight.x, sprite.topRight.y); - this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y); - this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y); - this.context.closePath(); - this.context.strokeStyle = 'rgba(0,0,255,0.8)'; - this.context.stroke(); + // this.context.beginPath(); + // this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y); + // this.context.lineTo(sprite.topRight.x, sprite.topRight.y); + // this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y); + // this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y); + // this.context.closePath(); + // this.context.strokeStyle = 'rgba(255,0,0,1)'; + // this.context.stroke(); this.renderPoint(sprite.center); this.renderPoint(sprite.topLeft); From 427819c655e87fa63df41ca2eff09502f379927e Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 03:49:14 +0100 Subject: [PATCH 110/125] Sprite bounds finally correct, regardless of rotation, parenting, scale or anchor. --- examples/buttons/button scale.js | 10 +- src/gameobjects/Sprite.js | 163 ++++++++----------------------- src/utils/Debug.js | 8 +- 3 files changed, 50 insertions(+), 131 deletions(-) diff --git a/examples/buttons/button scale.js b/examples/buttons/button scale.js index 30204ae6..022c2c91 100644 --- a/examples/buttons/button scale.js +++ b/examples/buttons/button scale.js @@ -55,14 +55,12 @@ function create() { button5.scale.setTo(0.5, 0.5); // Scaled and Rotated button - button6 = game.add.button(600, 200, 'button', changeSky, this, 2, 1, 0); + button6 = game.add.button(570, 200, 'button', changeSky, this, 2, 1, 0); // anchor 0.5 + // button6 = game.add.button(470, 100, 'button', changeSky, this, 2, 1, 0); // anchor 0 button6.name = 'sky6'; button6.angle = 32; button6.scale.setTo(2, 2); button6.anchor.setTo(0.5, 0.5); - // scale + anchor works fine - // angle + anchor works fine - // scale + angle + anchor falls over // game.world.setBounds(0, 0, 2000, 2000); @@ -87,8 +85,8 @@ function render () { game.debug.renderSpriteCorners(button5, false, true); game.debug.renderSpriteCorners(button6, false, true); - // game.debug.renderLocalTransformInfo(button3, 32, 132); - // game.debug.renderText('ox: ' + button1.offset.x + ' oy: ' + button1.offset.y, 32, 200); + // game.debug.renderWorldTransformInfo(button1, 32, 132); + // game.debug.renderText('sx: ' + button3.scale.x + ' sy: ' + button3.scale.y + ' w: ' + button3.width + ' cw: ' + button3._cache.width, 32, 20); game.debug.renderPoint(button6.input._tempPoint); } diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 6318fb97..e4c12e3c 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -422,7 +422,6 @@ Phaser.Sprite.prototype.updateAnimation = function() { if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID) { - console.log('ua frame 1 change', this.name); this._cache.frameWidth = this.texture.frame.width; this._cache.frameHeight = this.texture.frame.height; this._cache.frameID = this.currentFrame.uuid; @@ -454,22 +453,22 @@ Phaser.Sprite.prototype.updateAnimation = function() { */ Phaser.Sprite.prototype.updateBounds = function() { - // Update the edge points + var sx = 1; + var sy = 1; - this.offset.setTo(this._cache.a02 - (this.anchor.x * this._cache.width), this._cache.a12 - (this.anchor.y * this._cache.height)); + if (this.worldTransform[3] !== 0 || this.worldTransform[1] !== 0) + { + sx = this.scale.x; + sy = this.scale.y; + } - // this.offset.setTo(this._cache.a02 - (this.anchor.x * this.currentFrame.width), this._cache.a12 - (this.anchor.y * this.currentFrame.height)); - // this.offset.setTo(this._cache.a02 - (this.anchor.x * this.width), this._cache.a12 - (this.anchor.y * this.height)); + this.offset.setTo(this._cache.a02 - (this.anchor.x * this.width), this._cache.a12 - (this.anchor.y * this.height)); - // this.offset.setTo(this._cache.a02 - (this.anchor.x * this._cache.width), this._cache.a12 - (this.anchor.y * this._cache.height)); - - console.log('updateBounds', this.name, this.offset.x, this.offset.y); - - this.getLocalPosition(this.center, this.offset.x + this._cache.halfWidth, this.offset.y + this._cache.halfHeight); - this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y); - this.getLocalPosition(this.topRight, this.offset.x + this._cache.width, this.offset.y); - this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this._cache.height); - this.getLocalPosition(this.bottomRight, this.offset.x + this._cache.width, this.offset.y + this._cache.height); + this.getLocalPosition(this.center, this.offset.x + (this.width / 2), this.offset.y + (this.height / 2), sx, sy); + this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y, sx, sy); + this.getLocalPosition(this.topRight, this.offset.x + this.width, this.offset.y, sx, sy); + this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this.height, sx, sy); + this.getLocalPosition(this.bottomRight, this.offset.x + this.width, this.offset.y + this.height, sx, sy); this._cache.left = Phaser.Math.min(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x); this._cache.right = Phaser.Math.max(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x); @@ -481,9 +480,6 @@ Phaser.Sprite.prototype.updateBounds = function() { // This is the coordinate the Sprite was at when the last bounds was created this._cache.boundsX = this._cache.x; this._cache.boundsY = this._cache.y; - - // this._cache.calcWidth = this.width; - // this._cache.calcHeight = this.height; this.updateFrame = true; @@ -519,59 +515,44 @@ Phaser.Sprite.prototype.updateBounds = function() { /** * Description. -* -* @method Phaser.Sprite.prototype.updateBounds +* +* @method Phaser.Sprite.prototype.getLocalPosition +* @param {Description} p - Description. +* @param {number} x - Description. +* @param {number} y - Description. +* @return {Description} Description. */ -Phaser.Sprite.prototype.DEADupdateBounds = function() { +Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) { - // Update the edge points + // p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this.scale.x) + this._cache.a02; + // p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; - this.offset.setTo(this._cache.a02 - (this.anchor.x * this.width), this._cache.a12 - (this.anchor.y * this.height)); + p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * sx) + this._cache.a02; + p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * sy) + this._cache.a12; - this.getLocalPosition(this.center, this.offset.x + this._cache.halfWidth, this.offset.y + this._cache.halfHeight); - this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y); - this.getLocalPosition(this.topRight, this.offset.x + this._cache.width, this.offset.y); - this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this._cache.height); - this.getLocalPosition(this.bottomRight, this.offset.x + this._cache.width, this.offset.y + this._cache.height); + return p; - this._cache.left = Phaser.Math.min(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x); - this._cache.right = Phaser.Math.max(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x); - this._cache.top = Phaser.Math.min(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y); - this._cache.bottom = Phaser.Math.max(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y); +} - this.bounds.setTo(this._cache.left, this._cache.top, this._cache.right - this._cache.left, this._cache.bottom - this._cache.top); +/** +* Description. +* +* @method Phaser.Sprite.prototype.getLocalUnmodifiedPosition +* @param {Description} p - Description. +* @param {number} x - Description. +* @param {number} y - Description. +* @return {Description} Description. +*/ +Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { - // This is the coordinate the Sprite was at when the last bounds was created - this._cache.boundsX = this._cache.x; - this._cache.boundsY = this._cache.y; + p.x = this._cache.a11 * this._cache.idi * x + -this._cache.i01 * this._cache.idi * y + (this._cache.a12 * this._cache.i01 - this._cache.a02 * this._cache.a11) * this._cache.idi; + p.y = this._cache.a00 * this._cache.idi * y + -this._cache.i10 * this._cache.idi * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.i10) * this._cache.idi; - if (this.inWorld == false) - { - // Sprite WAS out of the screen, is it still? - this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds, this.inWorldThreshold); + // apply anchor + p.x += (this.anchor.x * this.width); + p.y += (this.anchor.y * this.height); - if (this.inWorld) - { - // It's back again, reset the OOB check - this._outOfBoundsFired = false; - } - } - else - { - // Sprite WAS in the screen, has it now left? - this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds, this.inWorldThreshold); - - if (this.inWorld == false) - { - this.events.onOutOfBounds.dispatch(this); - this._outOfBoundsFired = true; - - if (this.outOfBoundsKill) - { - this.kill(); - } - } - } + return p; } @@ -830,66 +811,6 @@ Phaser.Sprite.prototype.reset = function(x, y, health) { } -/** -* Description. -* -* @method Phaser.Sprite.prototype.getLocalPosition -* @param {Description} p - Description. -* @param {number} x - Description. -* @param {number} y - Description. -* @return {Description} Description. -*/ -Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) { - - p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this.scale.x) + this._cache.a02; - p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; - - /* - if (this.worldTransform[0] == 1) - { - p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * 1) + this._cache.a02; - } - else - { - p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this.scale.x) + this._cache.a02; - } - - if (this.worldTransform[4] == 1) - { - p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * 1) + this._cache.a12; - } - else - { - p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; - } - */ - - return p; - -} - -/** -* Description. -* -* @method Phaser.Sprite.prototype.getLocalUnmodifiedPosition -* @param {Description} p - Description. -* @param {number} x - Description. -* @param {number} y - Description. -* @return {Description} Description. -*/ -Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { - - p.x = this._cache.a11 * this._cache.idi * x + -this._cache.i01 * this._cache.idi * y + (this._cache.a12 * this._cache.i01 - this._cache.a02 * this._cache.a11) * this._cache.idi; - p.y = this._cache.a00 * this._cache.idi * y + -this._cache.i10 * this._cache.idi * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.i10) * this._cache.idi; - - // apply anchor - p.x += (this.anchor.x * this.width); - p.y += (this.anchor.y * this.height); - - return p; - -} - /** * Description. * diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 6dc1e82f..30122ee2 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -221,10 +221,10 @@ Phaser.Utils.Debug.prototype = { // this.context.stroke(); this.renderPoint(sprite.center); - this.renderPoint(sprite.topLeft); - this.renderPoint(sprite.topRight); - this.renderPoint(sprite.bottomLeft); - this.renderPoint(sprite.bottomRight); + this.renderPoint(sprite.topLeft, 'rgb(255,255,0)'); + this.renderPoint(sprite.topRight, 'rgb(255,0,0)'); + this.renderPoint(sprite.bottomLeft, 'rgb(0,0,255)'); + this.renderPoint(sprite.bottomRight, 'rgb(255,255,255)'); if (showText) { From 1294b3a2b980ae8a6cffbb9a258afabb4e51f73d Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 03:57:08 +0100 Subject: [PATCH 111/125] Input over now works regardless of rotation, anchor or scale. --- examples/buttons/button scale.js | 7 +++---- src/gameobjects/Sprite.js | 7 ++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/examples/buttons/button scale.js b/examples/buttons/button scale.js index 022c2c91..8ab6715b 100644 --- a/examples/buttons/button scale.js +++ b/examples/buttons/button scale.js @@ -56,15 +56,13 @@ function create() { // Scaled and Rotated button button6 = game.add.button(570, 200, 'button', changeSky, this, 2, 1, 0); // anchor 0.5 - // button6 = game.add.button(470, 100, 'button', changeSky, this, 2, 1, 0); // anchor 0 button6.name = 'sky6'; button6.angle = 32; button6.scale.setTo(2, 2); button6.anchor.setTo(0.5, 0.5); - - // game.world.setBounds(0, 0, 2000, 2000); // works regardless of world angle, parent angle or camera position + // game.world.setBounds(0, 0, 2000, 2000); // game.world.angle = 10; // game.camera.x = 300; @@ -87,6 +85,7 @@ function render () { // game.debug.renderWorldTransformInfo(button1, 32, 132); // game.debug.renderText('sx: ' + button3.scale.x + ' sy: ' + button3.scale.y + ' w: ' + button3.width + ' cw: ' + button3._cache.width, 32, 20); - game.debug.renderPoint(button6.input._tempPoint); + // game.debug.renderPoint(button2.input._tempPoint); + // game.debug.renderPoint(button6.input._tempPoint); } diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index e4c12e3c..3b261715 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -524,9 +524,6 @@ Phaser.Sprite.prototype.updateBounds = function() { */ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) { - // p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this.scale.x) + this._cache.a02; - // p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this.scale.y) + this._cache.a12; - p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * sx) + this._cache.a02; p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * sy) + this._cache.a12; @@ -549,8 +546,8 @@ Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { p.y = this._cache.a00 * this._cache.idi * y + -this._cache.i10 * this._cache.idi * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.i10) * this._cache.idi; // apply anchor - p.x += (this.anchor.x * this.width); - p.y += (this.anchor.y * this.height); + p.x += (this.anchor.x * this._cache.width); + p.y += (this.anchor.y * this._cache.height); return p; From d30f7092085aeb3b83fb3b000ba46511cb3dd03f Mon Sep 17 00:00:00 2001 From: Tomas Morris Date: Thu, 24 Oct 2013 21:24:35 -0600 Subject: [PATCH 112/125] Manually created a more accurate TypeScript definition file --- build/phaser.d.ts | 3718 ++++++++++++++++++++++----------------------- 1 file changed, 1817 insertions(+), 1901 deletions(-) diff --git a/build/phaser.d.ts b/build/phaser.d.ts index 5633d524..249e9d2a 100644 --- a/build/phaser.d.ts +++ b/build/phaser.d.ts @@ -1,1901 +1,1817 @@ - - -declare module Phaser { - - - export interface Animation { - - - game: any; - name: any; - delay: any; - looped: any; - killOnComplete: any; - isFinished: any; - isPlaying: any; - isPaused: any; - currentFrame: any; - paused: any; - frameTotal: any; - frame: any; - - static play(frameRate: number, loop: boolean, killOnComplete: boolean): Phaser.Animation; - static restart(): any; - static stop(resetFrame: boolean): any; - static update(): any; - static destroy(): any; - static onComplete(): any; - static generateFrameNames(prefix: string, min: number, max: number, suffix: string, zeroPad: number): any; - } - - export interface AnimationManager { - - - sprite: any; - game: any; - currentFrame: any; - updateIfVisible: any; - isLoaded: any; - frameData: any; - frameTotal: any; - paused: any; - frame: any; - frameName: any; - - add(name: string, frames: Array, frameRate: number, loop: boolean, useNumericIndex: boolean): Phaser.Animation; - validateFrames(frames: Array, useNumericIndex: boolean): boolean; - play(name: string, frameRate: number, loop: boolean, killOnComplete: boolean): Phaser.Animation; - stop(name: string, resetFrame: boolean): any; - update(): boolean; - refreshFrame(): any; - destroy(): any; - } - - export interface AnimationParser { - - - static spriteSheet(game: Phaser.Game, key: string, frameWidth: number, frameHeight: number, frameMax: number): Phaser.FrameData; - static JSONData(game: Phaser.Game, json: Object, cacheKey: string): Phaser.FrameData; - static JSONDataHash(game: Phaser.Game, json: Object, cacheKey: string): Phaser.FrameData; - static XMLData(game: Phaser.Game, xml: Object, cacheKey: string): Phaser.FrameData; - } - - export interface BitmapText { - - - exists: any; - alive: any; - group: any; - name: any; - game: any; - type: any; - anchor: any; - scale: any; - - update(): any; - destroy(): any; - } - - export interface Button { - - - type: any; - onInputOver: any; - onInputOut: any; - onInputDown: any; - onInputUp: any; - - setFrames(overFrame: string|number, outFrame: string|number, downFrame: string|number): any; - onInputOverHandler(pointer: Description): any; - onInputOutHandler(pointer: Description): any; - onInputDownHandler(pointer: Description): any; - onInputUpHandler(pointer: Description): any; - } - - export interface Cache { - - - game: any; - onSoundUnlock: any; - - addCanvas(key: string, canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): any; - addRenderTexture(key: string, textue: Phaser.Texture): any; - addSpriteSheet(key: string, url: string, data: object, frameWidth: number, frameHeight: number, frameMax: number): any; - addTileset(key: string, url: string, data: object, tileWidth: number, tileHeight: number, tileMax: number, tileMargin: number, tileSpacing: number): any; - addTilemap(key: string, url: string, mapData: object, format: number): any; - addTextureAtlas(key: string, url: string, data: object, atlasData: object, format: number): any; - addBitmapFont(key: string, url: string, data: object, xmlData): any; - addDefaultImage(): any; - addText(key: string, url: string, data: object): any; - addImage(key: string, url: string, data: object): any; - addSound(key: string, url: string, data: object, webAudio: boolean, audioTag: boolean): any; - reloadSound(key: string): any; - reloadSoundComplete(key: string): any; - updateSound(key: string, property, value): any; - decodedSound(key: string, data: object): any; - getCanvas(key: string): object; - checkImageKey(key: string): boolean; - getImage(key: string): object; - getTilesetImage(key: string): object; - getTileset(key: string): Phaser.Tileset; - getTilemapData(key: string): Object; - getFrameData(key: string): Phaser.FrameData; - getFrameByIndex(key: string, frame): Phaser.Frame; - getFrameByName(key: string, frame): Phaser.Frame; - getFrame(key: string): Phaser.Frame; - getTextureFrame(key: string): Phaser.Frame; - getTexture(key: string): Phaser.RenderTexture; - getSound(key: string): Phaser.Sound; - getSoundData(key: string): object; - isSoundDecoded(key: string): boolean; - isSoundReady(key: string): boolean; - isSpriteSheet(key: string): boolean; - getText(key: string): object; - getKeys(array: Array): Array; - getImageKeys(): Array; - getSoundKeys(): Array; - getTextKeys(): Array; - removeCanvas(key: string): any; - removeImage(key: string): any; - removeSound(key: string): any; - removeText(key: string): any; - destroy(): any; - } - - export interface Camera { - - - game: any; - world: any; - id: any; - view: any; - screenView: any; - bounds: any; - deadzone: any; - visible: any; - atLimit: any; - target: any; - static FOLLOW_LOCKON: any; - static FOLLOW_PLATFORMER: any; - static FOLLOW_TOPDOWN: any; - static FOLLOW_TOPDOWN_TIGHT: any; - x: any; - y: any; - width: any; - height: any; - - follow(target: Phaser.Sprite, style: number): any; - focusOn(displayObject: any): any; - focusOnXY(x: number, y: number): any; - update(): any; - checkBounds(): any; - setPosition(x: number, y: number): any; - setSize(width: number, height: number): any; - } - - export interface Canvas { - - - static create(width: number, height: number): HTMLCanvasElement; - static getOffset(element: HTMLElement, point: Phaser.Point): Phaser.Point; - static getAspectRatio(canvas: HTMLCanvasElement): number; - static setBackgroundColor(canvas: HTMLCanvasElement, color: string): HTMLCanvasElement; - static setTouchAction(canvas: HTMLCanvasElement, value: String): HTMLCanvasElement; - static setUserSelect(canvas: HTMLCanvasElement, value: String): HTMLCanvasElement; - static addToDOM(canvas: HTMLCanvasElement, parent: string, overflowHidden: boolean): HTMLCanvasElement; - static setTransform(context: CanvasRenderingContext2D, translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): CanvasRenderingContext2D; - static setSmoothingEnabled(context: CanvasRenderingContext2D, value: boolean): CanvasRenderingContext2D; - static setImageRenderingCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement; - static setImageRenderingBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement; - } - - export interface Circle { - - - x: any; - y: any; - diameter: any; - radius: any; - left: any; - right: any; - top: any; - bottom: any; - area: any; - empty: any; - - circumference(): number; - setTo(x: number, y: number, diameter: number): Circle; - copyFrom(source: any): Circle; - copyTo(dest: any): Object; - distance(dest: object, round: boolean): number; - clone(out: Phaser.Circle): Phaser.Circle; - contains(x: number, y: number): boolean; - circumferencePoint(angle: number, asDegrees: boolean, out: Phaser.Point): Phaser.Point; - offset(dx: number, dy: number): Circle; - offsetPoint(point: Point): Circle; - toString(): string; - static contains(a: Phaser.Circle, x: number, y: number): boolean; - static equals(a: Phaser.Circle, b: Phaser.Circle): boolean; - static intersects(a: Phaser.Circle, b: Phaser.Circle): boolean; - static circumferencePoint(a: Phaser.Circle, angle: number, asDegrees: boolean, out: Phaser.Point): Phaser.Point; - static intersectsRectangle(c: Phaser.Circle, r: Phaser.Rectangle): boolean; - } - - export interface Color { - - - static getColor32(alpha: number, red: number, green: number, blue: number): number; - static getColor(red: number, green: number, blue: number): number; - static hexToRGB(h: string): object; - static getColorInfo(color: number): string; - static RGBtoHexstring(color: number): string; - static RGBtoWebstring(color: number): string; - static colorToHexstring(color: number): string; - static interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number; - static interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number; - static interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number; - static getRandomColor(min: number, max: number, alpha: number): number; - static getRGB(color: number): object; - static getWebRGB(color: number): string; - static getAlpha(color: number): number; - static getAlphaFloat(color: number): number; - static getRed(color: number): number; - static getGreen(color: number): number; - static getBlue(color: number): number; - } - - export interface Device { - - - patchAndroidClearRectBug: any; - desktop: any; - iOS: any; - android: any; - chromeOS: any; - linux: any; - macOS: any; - windows: any; - canvas: any; - file: any; - fileSystem: any; - localStorage: any; - webGL: any; - worker: any; - touch: any; - mspointer: any; - css3D: any; - pointerLock: any; - arora: any; - chrome: any; - epiphany: any; - firefox: any; - ie: any; - ieVersion: any; - mobileSafari: any; - midori: any; - opera: any; - safari: any; - audioData: any; - webAudio: any; - ogg: any; - opus: any; - mp3: any; - wav: any; - m4a: any; - webm: any; - iPhone: any; - iPhone4: any; - iPad: any; - pixelRatio: any; - - canPlayAudio(type: string): boolean; - isConsoleOpen(): boolean; - } - - export interface Easing { - - } - - export interface Events { - - } - - export interface Frame { - - - index: any; - x: any; - y: any; - width: any; - height: any; - name: any; - uuid: any; - centerX: any; - centerY: any; - distance: any; - rotated: any; - rotationDirection: any; - trimmed: any; - sourceSizeW: any; - sourceSizeH: any; - spriteSourceSizeX: any; - spriteSourceSizeY: any; - spriteSourceSizeW: any; - spriteSourceSizeH: any; - - setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): any; - } - - export interface FrameData { - - - total: any; - - addFrame(frame: Phaser.Frame): Phaser.Frame; - getFrame(index: number): Phaser.Frame; - getFrameByName(name: string): Phaser.Frame; - checkFrameName(name: string): boolean; - getFrameRange(start: number, end: number, output: Array): Array; - getFrames(frames: Array, useNumericIndex: boolean, output: Array): Array; - getFrameIndexes(frames: Array, useNumericIndex: boolean, output: Array): Array; - } - - export interface Game { - - - id: any; - parent: any; - width: any; - height: any; - transparent: any; - antialias: any; - renderer: any; - state: any; - renderType: any; - isBooted: any; - isRunning: any; - raf: any; - add: any; - cache: any; - input: any; - load: any; - math: any; - net: any; - sound: any; - stage: any; - time: any; - tweens: any; - world: any; - physics: any; - rnd: any; - device: any; - camera: any; - canvas: any; - context: any; - debug: any; - particles: any; - paused: any; - - boot(): any; - setUpRenderer(): any; - loadComplete(): any; - update(time: number): any; - destroy(): any; - } - - export interface GameObjectFactory { - - - game: any; - world: any; - - existing(-: object): boolean; - sprite(x: number, y: number, key: string|RenderTexture, frame: string|number): Description; - child(group: Phaser.Group, x: number, y: number, key: string|RenderTexture, frame: string|number): Description; - tween(obj: object): Description; - group(parent: Description, name: Description): Description; - audio(key: Description, volume: Description, loop: Description): Description; - tileSprite(x: Description, y: Description, width: Description, height: Description, key: Description, frame: Description): Description; - text(x: Description, y: Description, text: Description, style: Description): any; - button(x: Description, y: Description, callback: Description, callbackContext: Description, overFrame: Description, outFrame: Description, downFrame: Description, downFrame): Description; - graphics(x: Description, y: Description): Description; - emitter(x: Description, y: Description, maxParticles: Description): Description; - bitmapText(x: Description, y: Description, text: Description, style: Description): Description; - tilemap(key: Description): Description; - tileset(key: Description): Description; - tilemapLayer(x: Description, y: Description, width: Description, height: Description, key: Description, frame: Description, layer): Description; - renderTexture(key: Description, width: Description, height: Description): Description; - } - - export interface Graphics { - - - type: any; - - destroy(): any; - } - - export interface Group { - - - game: any; - name: any; - type: any; - exists: any; - scale: any; - total: any; - length: any; - x: any; - y: any; - angle: any; - rotation: any; - visible: any; - alpha: any; - - add(child: *): *; - addAt(child: *, index: number): *; - static getAt(index: number): *; - create(x: number, y: number, key: string, frame: number|string, exists: boolean): Phaser.Sprite; - createMultiple(quantity: number, key: string, frame: number|string, exists: boolean): any; - swap(child1: *, child2: *): boolean; - bringToTop(child: *): *; - getIndex(child: *): number; - replace(oldChild: *, newChild: *): any; - setProperty(child: *, key: array, value: *, operation: number): any; - setAll(key: string, value: *, checkAlive: boolean, checkVisible: boolean, operation: number): any; - addAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; - subAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; - multiplyAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; - divideAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): any; - callAllExists(callback: function, existsValue: boolean, parameter: ...*): any; - callAll(callback: function, parameter: ...*): any; - forEach(callback: function, callbackContext: Object, checkExists: boolean): any; - forEachAlive(callback: function, callbackContext: Object): any; - forEachDead(callback: function, callbackContext: Object): any; - getFirstExists(state: boolean): Any; - getFirstAlive(): Any; - getFirstDead(): Any; - countLiving(): number; - countDead(): number; - getRandom(startIndex: number, length: number): Any; - remove(child: Any): any; - removeAll(): any; - removeBetween(startIndex: number, endIndex: number): any; - destroy(): any; - dump(full: boolean): any; - } - - export interface Input { - - - game: any; - hitCanvas: any; - hitContext: any; - static MOUSE_OVERRIDES_TOUCH: any; - static TOUCH_OVERRIDES_MOUSE: any; - static MOUSE_TOUCH_COMBINE: any; - pollRate: any; - disabled: any; - multiInputOverride: any; - position: any; - speed: any; - circle: any; - scale: any; - maxPointers: any; - currentPointers: any; - tapRate: any; - doubleTapRate: any; - holdRate: any; - justPressedRate: any; - justReleasedRate: any; - recordPointerHistory: any; - recordRate: any; - recordLimit: any; - pointer1: any; - pointer2: any; - pointer3: any; - pointer4: any; - pointer5: any; - pointer6: any; - pointer7: any; - pointer8: any; - pointer9: any; - pointer10: any; - activePointer: any; - mousePointer: any; - mouse: any; - keyboard: any; - touch: any; - mspointer: any; - onDown: any; - onUp: any; - onTap: any; - onHold: any; - interactiveItems: any; - x: any; - y: any; - pollLocked: any; - totalInactivePointers: any; - totalActivePointers: any; - worldX: any; - worldY: any; - - boot(): any; - addPointer(): Phaser.Pointer; - update(): any; - reset(hard: boolean): any; - resetSpeed(x: number, y: number): any; - startPointer(event: Any): Phaser.Pointer; - updatePointer(event: Any): Phaser.Pointer; - stopPointer(event: Any): Phaser.Pointer; - getPointer(state: boolean): Phaser.Pointer; - getPointerFromIdentifier(identifier: number): Phaser.Pointer; - getDistance(pointer1: Pointer, pointer2: Pointer): Description; - getAngle(pointer1: Pointer, pointer2: Pointer): Description; - } - - export interface InputHandler { - - - sprite: any; - game: any; - enabled: any; - parent: any; - next: any; - prev: any; - last: any; - first: any; - priorityID: any; - useHandCursor: any; - isDragged: any; - allowHorizontalDrag: any; - allowVerticalDrag: any; - bringToTop: any; - snapOffset: any; - snapOnDrag: any; - snapOnRelease: any; - snapX: any; - snapY: any; - pixelPerfect: any; - pixelPerfectAlpha: any; - draggable: any; - boundsRect: any; - boundsSprite: any; - consumePointerEvent: any; - - start(priority: number, useHandCursor: boolean): Phaser.Sprite; - reset(): any; - stop(): any; - destroy(): any; - pointerX(pointer: Pointer): number; - pointerY(pointer: Pointer): number; - pointerDown(pointer: Pointer): boolean; - pointerUp(pointer: Pointer): boolean; - pointerTimeDown(pointer: Pointer): number; - pointerTimeUp(pointer: Pointer): number; - pointerOver(pointer: Pointer): {bool; - pointerOut(pointer: Pointer): boolean; - pointerTimeOver(pointer: Pointer): number; - pointerTimeOut(pointer: Pointer): number; - pointerDragged(pointer: Pointer): number; - checkPointerOver(pointer: Pointer): boolean; - checkPixel(x: Description, y: Description): boolean; - update(pointer: Pointer): any; - updateDrag(pointer: Pointer): boolean; - justOver(pointer: Pointer, delay: number): boolean; - justOut(pointer: Pointer, delay: number): boolean; - justPressed(pointer: Pointer, delay: number): boolean; - justReleased(pointer: Pointer, delay: number): boolean; - overDuration(pointer: Pointer): number; - downDuration(pointer: Pointer): number; - enableDrag(lockCenter, bringToTop, pixelPerfect, alphaThreshold, boundsRect, boundsSprite): any; - disableDrag(): any; - startDrag(pointer): any; - stopDrag(pointer): any; - setDragLock(allowHorizontal, allowVertical): any; - enableSnap(snapX, snapY, onDrag, onRelease): any; - disableSnap(): any; - checkBoundsRect(): any; - checkBoundsSprite(): any; - } - - export interface Key { - - - game: any; - isDown: any; - isUp: any; - altKey: any; - ctrlKey: any; - shiftKey: any; - timeDown: any; - duration: any; - timeUp: any; - repeats: any; - keyCode: any; - onDown: any; - onUp: any; - - processKeyDown(event.: KeyboardEvent): any; - processKeyUp(event.: KeyboardEvent): any; - justPressed(duration: number): boolean; - justReleased(duration: number): boolean; - } - - export interface Keyboard { - - - game: any; - disabled: any; - callbackContext: any; - onDownCallback: any; - onUpCallback: any; - - addCallbacks(context: Object, onDown: function, onUp: function): any; - addKey(keycode: number): Phaser.Key; - removeKey(keycode: number): any; - createCursorKeys(): object; - start(): any; - stop(): any; - addKeyCapture(keycode: Any): any; - removeKeyCapture(keycode: number): any; - clearCaptures(): any; - processKeyDown(event: KeyboardEvent): any; - processKeyUp(event: KeyboardEvent): any; - reset(): any; - justPressed(keycode: number, duration: number): boolean; - justReleased(keycode: number, duration: number): boolean; - isDown(keycode: number): boolean; - } - - export interface LinkedList { - - - next: any; - prev: any; - first: any; - last: any; - total: any; - - add(child: object): object; - remove(child: object): any; - callAll(callback: function): any; - } - - export interface Loader { - - - game: any; - queueSize: any; - isLoading: any; - hasLoaded: any; - progress: any; - preloadSprite: any; - crossOrigin: any; - baseURL: any; - onFileComplete: any; - onFileError: any; - onLoadStart: any; - onLoadComplete: any; - static TEXTURE_ATLAS_JSON_ARRAY: any; - static TEXTURE_ATLAS_JSON_HASH: any; - static TEXTURE_ATLAS_XML_STARLING: any; - - setPreloadSprite(sprite: Phaser.Sprite, direction: number): any; - checkKeyExists(key: string): boolean; - reset(): any; - addToFileList(type: Description, key: string, url: string, properties: Description): any; - image(key: string, url: string, overwrite: boolean): any; - text(key: string, url: string, overwrite: boolean): any; - spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax: number): any; - tileset(key: string, url: string, tileWidth: number, tileHeight: number, tileMax: number, tileMargin: number, tileSpacing: number): any; - audio(key: string, urls: Array, autoDecode: boolean): any; - tilemap(key: string, tilesetURL: string, mapDataURL: string, mapData: object, format: string): any; - bitmapFont(key: string, textureURL: string, xmlURL: string, xmlData: object): any; - atlasJSONArray(key: string, atlasURL: Description, atlasData: Description, atlasData): any; - atlasJSONHash(key: string, atlasURL: Description, atlasData: Description, atlasData): any; - atlasXML(key: string, atlasURL: Description, atlasData: Description, atlasData): any; - atlas(key: string, textureURL: string, atlasURL: string, atlasData: object, format: number): any; - removeFile(key): any; - removeAll(): any; - start(): any; - fileError(key: string): any; - fileComplete(key: string): any; - jsonLoadComplete(key: string): any; - csvLoadComplete(key: string): any; - dataLoadError(key: string): any; - xmlLoadComplete(key: string): any; - } - - export interface LoaderParser { - - - static bitmapFont(xml: object, xml, cacheKey): FrameData; - } - - export interface Math { - - - static PI2: any; - static degToRad: function; - static radToDeg: function; - - static fuzzyEqual(a: number, b: number, epsilon: number): boolean; - static fuzzyLessThan(a: number, b: number, epsilon: number): boolean; - static fuzzyGreaterThan(a: number, b: number, epsilon: number): boolean; - static fuzzyCeil(val: number, epsilon: number): boolean; - static fuzzyFloor(val: number, epsilon: number): boolean; - static average(): number; - static truncate(n: number): number; - static shear(n: number): number; - static snapTo(input: number, gap: number, start: number): number; - static snapToFloor(input: number, gap: number, start: number): number; - static snapToCeil(input: number, gap: number, start: number): number; - static snapToInArray(input: number, arr: array, sort: boolean): number; - static roundTo(value: number, place: number, base: number): number; - static floorTo(value: number, place: number, base: number): number; - static ceilTo(value: number, place: number, base: number): number; - static interpolateFloat(a: number, b: number, weight: number): number; - static angleBetween(x1: number, y1: number, x2: number, y2: number): number; - static normalizeAngle(angle: number, radians: boolean): number; - static nearestAngleBetween(a1: number, a2: number, radians: boolean): number; - static interpolateAngles(a1: number, a2: number, weight: number, radians: boolean, ease: Description): number; - static chanceRoll(chance: number): boolean; - static numberArray(min: number, max: number): array; - static maxAdd(value: number, amount: number, max-: number): number; - static minSub(value: number, amount: number, min: number): number; - static wrap(value, min, max): number; - static wrapValue(value: number, amount: number, max: number): number; - static randomSign(): number; - static isOdd(n: number): boolean; - static isEven(n: number): boolean; - static max(): number; - static min(): number; - static wrapAngle(angle: number): number; - static angleLimit(angle: number, min: number, max: number): number; - static linearInterpolation(v: number, k: number): number; - static bezierInterpolation(v: number, k: number): number; - static catmullRomInterpolation(v: number, k: number): number; - static linear(p0: number, p1: number, t: number): number; - static bernstein(n: number, i: number): number; - static catmullRom(p0: number, p1: number, p2: number, p3: number, t: number): number; - static difference(a: number, b: number): number; - static getRandom(objects: array, startIndex: number, length: number): object; - static floor(Value: number): number; - static ceil(value: number): number; - static sinCosGenerator(length: number, sinAmplitude: number, cosAmplitude: number, frequency: number): Array; - static shift(stack: array): any; - static shuffleArray(array: array): array; - static distance(x1: number, y1: number, x2: number, y2: number): number; - static distanceRounded(x1: number, y1: number, x2: number, y2: number): number; - static clamp(x: number, a: number, b: number): number; - static clampBottom(x: number, a: number): number; - static within(a: number, b: number, tolerance: number): boolean; - static mapLinear(x: number, a1: number, a1: number, a2: number, b1: number, b2: number): number; - static smoothstep(x: number, min: number, max: number): number; - static smootherstep(x: number, min: number, max: number): number; - static sign(x: number): number; - } - - export interface Mouse { - - - game: any; - callbackContext: any; - mouseDownCallback: any; - mouseMoveCallback: any; - mouseUpCallback: any; - disabled: any; - locked: any; - static LEFT_BUTTON: any; - static MIDDLE_BUTTON: any; - static RIGHT_BUTTON: any; - - start(): any; - onMouseDown(event: MouseEvent): any; - onMouseMove(event: MouseEvent): any; - onMouseUp(event: MouseEvent): any; - requestPointerLock(): any; - pointerLockChange(event: MouseEvent): any; - releasePointerLock(): any; - stop(): any; - } - - export interface MSPointer { - - - game: any; - callbackContext: any; - mouseDownCallback: any; - mouseMoveCallback: any; - mouseUpCallback: any; - disabled: any; - - start(): any; - onPointerDown(event: Any): any; - onPointerMove(event: Any): any; - onPointerUp(event: Any): any; - stop(): any; - } - - export interface Net { - - - getHostName(): string; - checkDomainName(domain: string): boolean; - updateQueryString(key: string, value: string, redirect: boolean, url: string): string; - getQueryString(parameter: string): string|object; - decodeURI(value: string): string; - } - - export interface Particles { - - - emitters: any; - ID: any; - - add(emitter: Phaser.Emitter): Phaser.Emitter; - remove(emitter: Phaser.Emitter): any; - update(): any; - } - - export interface Plugin { - - - game: any; - parent: any; - active: any; - visible: any; - hasPreUpdate: any; - hasUpdate: any; - hasRender: any; - hasPostRender: any; - - preUpdate(): any; - update(): any; - render(): any; - postRender(): any; - destroy(): any; - } - - export interface PluginManager { - - - game: any; - plugins: any; - - add(plugin: Phaser.Plugin): Phaser.Plugin; - remove(plugin: Phaser.Plugin): any; - preUpdate(): any; - update(): any; - render(): any; - postRender(): any; - destroy(): any; - } - - export interface Point { - - - x: any; - y: any; - - copyFrom(source: any): Point; - invert(): Point; - setTo(x: number, y: number): Point; - add(x: number, y: number): Phaser.Point; - subtract(x: number, y: number): Phaser.Point; - multiply(x: number, y: number): Phaser.Point; - divide(x: number, y: number): Phaser.Point; - clampX(min: number, max: number): Phaser.Point; - clampY(min: number, max: number): Phaser.Point; - clamp(min: number, max: number): Phaser.Point; - clone(output: Phaser.Point): Phaser.Point; - copyTo(dest: any): Object; - distance(dest: object, round: boolean): number; - equals(a: Phaser.Point): boolean; - rotate(x: number, y: number, angle: number, asDegrees: boolean, distance: number): Phaser.Point; - toString(): string; - static add(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; - static subtract(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; - static multiply(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; - static divide(a: Phaser.Point, b: Phaser.Point, out: Phaser.Point): Phaser.Point; - static equals(a: Phaser.Point, b: Phaser.Point): boolean; - static distance(a: object, b: object, round: boolean): number; - static rotate(a: Phaser.Point, x: number, y: number, angle: number, asDegrees: boolean, distance: number): Phaser.Point; - } - - export interface Pointer { - - - game: any; - id: any; - positionDown: any; - position: any; - circle: any; - withinGame: any; - clientX: any; - clientY: any; - pageX: any; - pageY: any; - screenX: any; - screenY: any; - x: any; - y: any; - isMouse: any; - isDown: any; - isUp: any; - timeDown: any; - timeUp: any; - previousTapTime: any; - totalTouches: any; - msSinceLastClick: any; - targetObject: any; - active: any; - duration: any; - worldX: any; - worldY: any; - - start(event: Any): any; - update(): any; - move(event: Any): any; - leave(event: Any): any; - stop(event: Any): any; - justPressed(duration: number): boolean; - justReleased(duration: number): boolean; - reset(): any; - toString(): string; - } - - export interface QuadTree { - - } - - export interface RandomDataGenerator { - - - sow(seeds: array): any; - integer(): number; - frac(): number; - real(): number; - integerInRange(min: number, max: number): number; - realInRange(min: number, max: number): number; - normal(): number; - uuid(): string; - pick(ary: Any): number; - weightedPick(ary: Any): number; - timestamp(min: number, max: number): number; - angle(): number; - } - - export interface Rectangle { - - - x: any; - y: any; - width: any; - height: any; - halfWidth: any; - halfHeight: any; - bottom: any; - left: any; - right: any; - volume: any; - perimeter: any; - centerX: any; - centerY: any; - top: any; - topLeft: any; - empty: any; - - offset(dx: number, dy: number): Rectangle; - offsetPoint(point: Point): Rectangle; - setTo(x: number, y: number, width: number, height: number): Rectangle; - floor(): any; - copyFrom(source: any): Rectangle; - copyTo(source: any): object; - inflate(dx: number, dy: number): Phaser.Rectangle; - size(output: Phaser.Point): Phaser.Point; - clone(output: Phaser.Rectangle): Phaser.Rectangle; - contains(x: number, y: number): boolean; - containsRect(b: Phaser.Rectangle): boolean; - equals(b: Phaser.Rectangle): boolean; - intersection(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; - intersects(b: Phaser.Rectangle, tolerance: number): boolean; - intersectsRaw(left: number, right: number, top: number, bottomt: number, tolerance: number): boolean; - union(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; - toString(): string; - static inflate(a: Phaser.Rectangle, dx: number, dy: number): Phaser.Rectangle; - static inflatePoint(a: Phaser.Rectangle, point: Phaser.Point): Phaser.Rectangle; - static size(a: Phaser.Rectangle, output: Phaser.Point): Phaser.Point; - static clone(a: Phaser.Rectangle, output: Phaser.Rectangle): Phaser.Rectangle; - static contains(a: Phaser.Rectangle, x: number, y: number): boolean; - static containsPoint(a: Phaser.Rectangle, point: Phaser.Point): boolean; - static containsRect(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; - static equals(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; - static intersection(a: Phaser.Rectangle, b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; - static intersects(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; - static intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number, tolerance): boolean; - static union(a: Phaser.Rectangle, b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; - } - - export interface RenderTexture { - - - game: any; - name: any; - width: any; - height: any; - indetityMatrix: any; - frame: any; - type: any; - } - - export interface RequestAnimationFrame { - - - game: any; - isRunning: any; - - start(): any; - updateRAF(time: number): any; - updateSetTimeout(): any; - stop(): any; - isSetTimeOut(): boolean; - isRAF(): boolean; - } - - export interface Signal { - - - memorize: any; - active: any; - - dispatch(): any; - has(listener: Function, context: Object): boolean; - add(listener: function, listenerContext: object, priority: number): Phaser.SignalBinding; - addOnce(listener: function, listenerContext: object, priority: number): Phaser.SignalBinding; - remove(listener: function, context: object): function; - removeAll(): any; - getNumListeners(): number; - halt(): any; - forget(): any; - dispose(): any; - toString(): string; - } - - export interface Sound { - - - game: any; - name: any; - key: any; - loop: any; - markers: any; - context: any; - totalDuration: any; - startTime: any; - currentTime: any; - duration: any; - stopTime: any; - paused: any; - isPlaying: any; - currentMarker: any; - pendingPlayback: any; - override: any; - usingWebAudio: any; - usingAudioTag: any; - onDecoded: any; - onPlay: any; - onPause: any; - onResume: any; - onLoop: any; - onStop: any; - onMute: any; - onMarkerComplete: any; - isDecoding: any; - isDecoded: any; - mute: any; - volume: any; - - soundHasUnlocked(key: string): any; - addMarker(name: string, start: number, duration: number, volume: number, loop: boolean): any; - removeMarker(name: string): any; - update(): any; - play(marker: string, position: number, volume: number, loop: boolean, forceRestart: boolean): Sound; - restart(marker: string, position: number, volume: number, loop: boolean): any; - pause(): any; - resume(): any; - stop(): any; - } - - export interface SoundManager { - - - game: any; - onSoundDecode: any; - context: any; - usingWebAudio: any; - usingAudioTag: any; - noAudio: any; - touchLocked: any; - channels: any; - mute: any; - volume: any; - - boot(): any; - unlock(): any; - stopAll(): any; - pauseAll(): any; - resumeAll(): any; - decode(key: string, sound: Phaser.Sound): any; - update(): any; - add(key: string, volume: number, loop: boolean): any; - } - - export interface Sprite { - - - game: any; - exists: any; - alive: any; - group: any; - name: any; - type: any; - renderOrderID: any; - lifespan: any; - events: any; - animations: any; - input: any; - key: any; - anchor: any; - x: any; - y: any; - autoCull: any; - scale: any; - offset: any; - center: any; - topLeft: any; - topRight: any; - bottomRight: any; - bottomLeft: any; - bounds: any; - body: any; - health: any; - inWorld: any; - inWorldThreshold: any; - outOfBoundsKill: any; - fixedToCamera: any; - angle: any; - - preUpdate(): any; - centerOn(x: number, y: number): any; - revive(health): any; - kill(): any; - destroy(): any; - damage(amount): any; - reset(x, y, health): any; - updateBounds(): any; - getLocalPosition(p: Description, x: number, y: number): Description; - getLocalUnmodifiedPosition(p: Description, x: number, y: number): Description; - bringToTop(): any; - play(name: String, frameRate: number, loop: boolean, killOnComplete: boolean): Phaser.Animation; - } - - export interface Stage { - - - game: any; - offset: any; - canvas: any; - scaleMode: any; - scale: any; - aspectRatio: any; - backgroundColor: any; - - visibilityChange(event: Event): any; - } - - export interface StageScaleMode { - - - forceLandscape: any; - forcePortrait: any; - incorrectOrientation: any; - pageAlignHorizontally: any; - pageAlignVertically: any; - minWidth: any; - maxWidth: any; - minHeight: any; - maxHeight: any; - width: any; - height: any; - maxIterations: any; - game: any; - enterLandscape: any; - enterPortrait: any; - scaleFactor: any; - aspectRatio: any; - static EXACT_FIT: any; - static NO_SCALE: any; - static SHOW_ALL: any; - isFullScreen: any; - isPortrait: any; - isLandscape: any; - - startFullScreen(): any; - stopFullScreen(): any; - checkOrientationState(): any; - checkOrientation(event: Event): any; - checkResize(event: Event): any; - refresh(): any; - setScreenSize(force: Description): any; - setSize(): any; - setMaximum(): any; - setShowAll(): any; - setExactFit(): any; - } - - export interface State { - - - game: any; - add: any; - camera: any; - cache: any; - input: any; - load: any; - math: any; - sound: any; - stage: any; - time: any; - tweens: any; - world: any; - particles: any; - physics: any; - - preload(): any; - loadUpdate(): any; - loadRender(): any; - create(): any; - update(): any; - render(): any; - paused(): any; - destroy(): any; - } - - export interface StateManager { - - - game: any; - states: any; - current: any; - onInitCallback: any; - onPreloadCallback: any; - onCreateCallback: any; - onUpdateCallback: any; - onRenderCallback: any; - onPreRenderCallback: any; - onLoadUpdateCallback: any; - onLoadRenderCallback: any; - onPausedCallback: any; - onShutDownCallback: any; - - add(key, state, autoStart): any; - remove(key: string): any; - start(key: string, clearWorld: boolean, clearCache: boolean): any; - checkState(key: string): boolean; - link(key: string): any; - setCurrentState(key: string): any; - loadComplete(): any; - update(): any; - preRender(): any; - render(): any; - destroy(): any; - } - - export interface Text { - - - exists: any; - alive: any; - group: any; - name: any; - game: any; - type: any; - anchor: any; - scale: any; - renderable: any; - - update(): any; - destroy(): any; - } - - export interface Tile { - - - tileset: any; - index: any; - width: any; - height: any; - x: any; - y: any; - mass: any; - collideNone: any; - collideLeft: any; - collideRight: any; - collideUp: any; - collideDown: any; - separateX: any; - separateY: any; - collisionCallback: any; - collisionCallbackContext: any; - - setCollisionCallback(callback: Function, context: object): any; - destroy(): any; - setCollision(left: boolean, right: boolean, up: boolean, down: boolean, reset: boolean, separateX: boolean, separateY: boolean): any; - resetCollision(): any; - } - - export interface TileSprite { - - - texture: any; - type: any; - tileScale: any; - tilePosition: any; - } - - export interface Time { - - - game: any; - physicsElapsed: any; - time: any; - pausedTime: any; - now: any; - elapsed: any; - fps: any; - fpsMin: any; - fpsMax: any; - msMin: any; - msMax: any; - frames: any; - pauseDuration: any; - timeToCall: any; - lastTime: any; - - totalElapsedSeconds(): number; - update(time: number): any; - elapsedSince(since: number): number; - elapsedSecondsSince(since: number): number; - reset(): any; - } - - export interface Touch { - - - game: any; - disabled: boolean; - callbackContext: any; - touchStartCallback: any; - touchMoveCallback: any; - touchEndCallback: any; - touchEnterCallback: any; - touchLeaveCallback: any; - touchCancelCallback: any; - preventDefault: any; - - start(): any; - consumeDocumentTouches(): any; - onTouchStart(event: Any): any; - onTouchCancel(event: Any): any; - onTouchEnter(event: Any): any; - onTouchLeave(event: Any): any; - onTouchMove(event: Any): any; - onTouchEnd(event: Any): any; - stop(): any; - } - - export interface Tween { - - - game: any; - pendingDelete: any; - onStart: any; - onComplete: any; - isRunning: any; - - to(properties: object, duration: number, ease: function, autoStart: boolean, delay: number, repeat: boolean, yoyo: Phaser.Tween): Phaser.Tween; - start(time: number): Phaser.Tween; - stop(): Phaser.Tween; - delay(amount: number): Phaser.Tween; - repeat(times: number): Phaser.Tween; - yoyo(yoyo: boolean): Phaser.Tween; - easing(easing: function): Phaser.Tween; - interpolation(interpolation: function): Phaser.Tween; - chain(): Phaser.Tween; - loop(): Phaser.Tween; - onStartCallback(callback: function): Phaser.Tween; - onUpdateCallback(callback: function): Phaser.Tween; - onCompleteCallback(callback: function): Phaser.Tween; - pause(): any; - resume(): any; - update(time: number): boolean; - } - - export interface TweenManager { - - - game: any; - REVISION: any; - - getAll(): Phaser.Tween[]; - removeAll(): any; - add(tween: Phaser.Tween): Phaser.Tween; - create(object: Object): Phaser.Tween; - remove(tween: Phaser.Tween): any; - update(): boolean; - pauseAll(): any; - resumeAll(): any; - } - - export interface Utils { - - - static pad(str: string, len: number, pad: number, dir: number): string; - static isPlainObject(obj: object): boolean; - static extend(deep: boolean, target: object): object; - } - - export interface World { - - - scale: any; - bounds: any; - camera: any; - currentRenderOrderID: any; - width: any; - height: any; - centerX: any; - centerY: any; - randomX: any; - randomY: any; - - boot(): any; - update(): any; - postUpdate(): any; - setBounds(x: number, y: number, width: number, height: number): any; - destroy(): any; - } - - - } - - - -declare module Phaser.Easing { - - - export interface Back { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Bounce { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Circular { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Cubic { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Elastic { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Exponential { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Linear { - - - static None(k: number): number; - } - - export interface Quadratic { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Quartic { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Quintic { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - export interface Sinusoidal { - - - static In(k: number): number; - static Out(k: number): number; - static InOut(k: number): number; - } - - - } - - - -declare module Phaser.Particles.Arcade { - - - export interface Emitter extends Phaser.Group { - - - maxParticles: any; - name: any; - type: any; - x: any; - y: any; - width: any; - height: any; - minParticleSpeed: any; - maxParticleSpeed: any; - minParticleScale: any; - maxParticleScale: any; - minRotation: any; - maxRotation: any; - gravity: any; - particleClass: any; - particleDrag: any; - angularDrag: any; - frequency: any; - lifespan: any; - bounce: any; - on: any; - exists: any; - emitX: any; - emitY: any; - alpha: any; - visible: any; - left: any; - right: any; - top: any; - bottom: any; - - update(): any; - makeParticles(keys: Description, frames: number, quantity: number, collide: number, collideWorldBounds: boolean): This Emitter instance (nice for chaining stuff together, if you're into that).; - kill(): any; - revive(): any; - start(explode: boolean, lifespan: number, frequency: number, quantity: number): any; - emitParticle(): any; - setSize(width: number, height: number): any; - setXSpeed(min: number, max: number): any; - setYSpeed(min: number, max: number): any; - setRotation(min: number, max: number): any; - at(object: object): any; - } - - - } - - - -declare module Phaser.Utils { - - - export interface Debug { - - - game: any; - context: any; - font: any; - lineHeight: any; - renderShadow: any; - currentX: any; - currentY: any; - currentAlpha: any; - - start(x: number, y: number, color: string): any; - stop(): any; - line(text: string, x: number, y: number): any; - renderQuadTree(quadtree: Phaser.QuadTree, color: string): any; - renderSpriteCorners(sprite: Phaser.Sprite, showText: boolean, showBounds: boolean, color: string): any; - renderSoundInfo(sound: Phaser.Sound, x: number, y: number, color: string): any; - renderCameraInfo(camera: Phaser.Camera, x: number, y: number, color: string): any; - renderPointer(pointer: Phaser.Pointer, hideIfUp: boolean, downColor: string, upColor: string, color: string): any; - renderSpriteInputInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; - renderSpriteCollision(sprite: Phaser.Sprite, x: number, y: number, color: string): any; - renderInputInfo(x: number, y: number, color: string): any; - renderSpriteInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; - renderWorldTransformInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; - renderLocalTransformInfo(sprite: Phaser.Sprite, x: number, y: number, color: string): any; - renderPointInfo(sprite: Phaser.Point, x: number, y: number, color: string): any; - renderSpriteBody(sprite: Phaser.Sprite, color: string): any; - renderSpriteBounds(sprite: Phaser.Sprite, color: string, fill: boolean): any; - renderPixel(x: number, y: number, color: string): any; - renderPoint(point: Phaser.Point, color: string): any; - renderRectangle(rect: Phaser.Rectangle, color: string): any; - renderCircle(circle: Phaser.Circle, color: string): any; - renderText(text: string, x: number, y: number, color: string, font: string): any; - dumpLinkedList(list: Phaser.LinkedList): any; - } - - - } - - - -declare module PIXI { - - - export interface BaseTexture { - - - width: Number; - height: Number; - hasLoaded: Boolean; - source: Image; - - destroy(): any; - static fromImage(imageUrl, crossorigin): BaseTexture; - } - - export interface BitmapText { - - - setText(text): any; - setStyle(style, style.font, style.align): any; - } - - export interface CanvasGraphics { - - } - - export interface CanvasRenderer { - - - width: Number; - height: Number; - view: Canvas; - context: Canvas 2d Context; - - render(stage): any; - resize(width, height): any; - renderDisplayObject(displayObject): any; - } - - export interface CustomRenderable { - - - renderCanvas(renderer): any; - initWebGL(renderer): any; - renderWebGL(renderer, projectionMatrix): any; - } - - export interface DisplayObject { - - - position: Point; - scale: Point; - pivot: Point; - rotation: Number; - alpha: Number; - visible: Boolean; - hitArea: Rectangle|Circle|Ellipse|Polygon; - buttonMode: Boolean; - renderable: Boolean; - parent: DisplayObjectContainer; - stage: Stage; - worldAlpha: Number; - constructor: any; - - setInteractive(interactive): any; - } - - export interface DisplayObjectContainer { - - - children: Array; - - addChild(child): any; - addChildAt(child, index): any; - getChildAt(index): any; - removeChild(child): any; - } - - export interface EventTarget { - - } - - export interface Graphics { - - - fillAlpha: Number; - lineWidth: Number; - lineColor: String; - - lineStyle(lineWidth, color, alpha): any; - moveTo(x, y): any; - lineTo(x, y): any; - beginFill(color, alpha): any; - endFill(): any; - drawRect(x, y, width, height): any; - drawCircle(x, y, radius): any; - drawElipse(x, y, width, height): any; - clear(): any; - } - - export interface Point { - - - x: Number; - y: Number; - - clone(): Point; - } - - export interface Rectangle { - - - x: Number; - y: Number; - width: Number; - height: Number; - - clone(): Rectangle; - contains(x, y): Boolean; - } - - export interface RenderTexture { - - } - - export interface Sprite { - - - anchor: Point; - texture: Texture; - blendMode: Number; - - setTexture(texture): any; - static fromFrame(frameId): Sprite; - static fromImage(imageId): Sprite; - setText(text: String): any; - } - - export interface Stage { - - - interactive: Boolean; - interactionManager: InteractionManager; - - setBackgroundColor(backgroundColor): any; - getMousePosition(): Point; - } - - export interface Text { - - - setStyle(style, style.font, style.fill, style.align, style.stroke, style.strokeThickness, style.wordWrap, style.wordWrapWidth): any; - destroy(destroyTexture): any; - } - - export interface Texture { - - - baseTexture: BaseTexture; - frame: Rectangle; - trim: Point; - - destroy(destroyBase): any; - setFrame(frame): any; - static fromImage(imageUrl, crossorigin): Texture; - static fromFrame(frameId): Texture; - static fromCanvas(canvas): Texture; - static addTextureToCache(texture, id): any; - static removeTextureFromCache(id): Texture; - } - - export interface TilingSprite { - - - texture: Texture; - width: Number; - height: Number; - tileScale: Point; - tilePosition: Point; - - setTexture(texture): any; - } - - export interface WebGLBatch { - - - clean(): any; - restoreLostContext(gl): any; - init(sprite): any; - insertBefore(sprite, nextSprite): any; - insertAfter(sprite, previousSprite): any; - remove(sprite): any; - split(sprite): WebGLBatch; - merge(batch): any; - growBatch(): any; - refresh(): any; - update(): any; - render(start, end): any; - } - - export interface WebGLGraphics { - - } - - export interface WebGLRenderer { - - - render(stage): any; - resize(width, height): any; - } - - export interface WebGLRenderGroup { - - - render(projection): any; - } - - - } - - - -declare module PIXI.PolyK { - - - export interface Triangulate { - - } - - - } - +declare class Phaser { + static VERSION: string; + static GAMES: Array; + static AUTO: number; + static CANVAS: number; + static WEBGL: number; + static SPRITE: number; + static BUTTON: number; + static BULLET: number; + static GRAPHICS: number; + static TEXT: number; + static TILESPRITE: number; + static BITMAPTEXT: number; + static GROUP: number; + static RENDERTEXTURE: number; + static TILEMAP: number; + static TILEMAPLAYER: number; + static EMITTER: number; +} + +declare module Phaser { + class Camera { + constructor(game: Phaser.Game, id: number, x: number, y: number, width: number, height: number); + game: Phaser.Game; + world: Phaser.World; + id: number; + x: number; + y: number; + width: number; + height: number; + view: Phaser.Rectangle; + screenView: Phaser.Rectangle; + deadzone: Phaser.Rectangle; + visible: boolean; + atLimit: { x: boolean; y: boolean; }; + target: Phaser.Sprite; + _edge: number; + static FOLLOW_LOCKON: number; + static FOLLOW_PLATFORMER: number; + static FOLLOW_TOPDOWN: number; + static FOLLOW_TOPDOWN_TIGHT: number; + follow(target: Phaser.Sprite, style?: number): void; + focusOnXY(x: number, y: number): void; + update(): void; + checkWorldBounds(): void; + setPosition(x: number, y: number): void; + setSize(width: number, height: number): void; + } + + class State { + game: Phaser.Game; + add: Phaser.GameObjectFactory; + camera: Phaser.Camera; + cache: Phaser.Cache; + input: Phaser.Input; + stage: Phaser.Stage; + math: Phaser.Math; + sound: Phaser.SoundManager; + time: Phaser.Time; + tweens: Phaser.TweenManager; + world: Phaser.World; + particles: Phaser.Particles; + physics: Phaser.Physics.Arcade; + load(); + preload(); + create(); + render(); + update(); + paused(); + destroy(); + } + + class StateManager { + constructor(game: Phaser.Game, pendingState: Phaser.State); + game: Phaser.Game; + states: Object; + current: Phaser.State; + onInitCallback(): void; + onPreloadCallback(): void; + onCreateCallback(): void; + onUpdateCallback(): void; + onRenderCallback(): void; + onPreRenderCallback(): void; + onLoadUpdateCallback(): void; + onLoadRenderCallback(): void; + onPausedCallback(): void; + onShutDownCallback(): void; + boot(): void; + add(key: string, state: Phaser.State, autoStart: boolean): void; + remove(key: string): void; + start(key: string, clearWorld: boolean, clearCache: boolean): void; + dummy(): void; + checkState(key: string): boolean; + link(key: string): void; + setCurrentState(key: string): void; + loadComplete(): void; + update(): void; + preRender(): void; + render(): void; + destroy(): void; + } + + class LinkedListItem { + next: LinkedListItem; + prev: LinkedListItem; + first: LinkedListItem; + last: LinkedListItem; + } + + class LinkedList extends LinkedListItem { + total: number; + add(child: LinkedListItem): LinkedListItem; + remove(child: LinkedListItem): void; + callAll(callback: string): void; + dump(): void; + } + + class Signal { + memorize: boolean; + active: boolean; + validateListener(listener: Function, fnName: string): void; + has(listener: Function, context?: Object): boolean; + add(listener: Function, listenerContext?: Object, priority?: number): Phaser.SignalBinding; + addOnce(listener: Function, listenerContext?: Object, priority?: number): Phaser.SignalBinding; + remove(listener: Function, context?: Object): Function; + removeAll(): void; + getNumListeners(): number; + halt(): void; + dispatch(...params: any[]): void; + forget(): void; + dispose(): void; + toString(): string; + } + + class SignalBinding { + constructor(signal: Phaser.Signal, listener: Function, isOnce: boolean, listenerContext: Object, priority?: number); + context: Object; + active: boolean; + params: Array; + execute(paramsArr?: Array): void; + detach(): Function; + isBound(): boolean; + isOnce(): boolean; + getListener(): Function; + getSignal(): Phaser.Signal; + toString(): string; + } + + class StateCycle { + preUpdate(): void; + update(): void; + render(): void; + postRender(): void; + destroy(): void; + } + + class Plugin extends StateCycle { + constructor(game: Phaser.Game, parent: any); + game: Phaser.Game; + parent: any; + active: boolean; + visible: boolean; + hasPreUpdate: boolean; + hasUpdate: boolean; + hasRender: boolean; + hasPostRender: boolean; + } + + class PluginManager extends StateCycle { + constructor(game: Phaser.Game, parent: any); + game: Phaser.Game; + private _parent: any; + plugins: Phaser.Plugin[]; + add(plugin: Phaser.Plugin): Phaser.Plugin; + remove(plugin: Phaser.Plugin): void; + } + + class Stage { + constructor(game: Phaser.Game, width: number, height: number); + game: Phaser.Game; + offset: Phaser.Point; + canvas: HTMLCanvasElement; + scaleMode: number; + scale: Phaser.StageScaleMode; + aspectRatio: number; + backgroundColor: string; + boot(): void; + visibilityChange(event: Event): void; + } + + class Group { + constructor(game: Phaser.Game, parent: any, name: string, useStage: boolean); + game: Phaser.Game; + name: string; + type: number; + exists: boolean; + sortIndex: string; + length: number; + x: number; + y: number; + angle: number; + rotation: number; + visible: boolean; + add(child: any): any; + addAt(child: any, index: number): any; + getAt(index: number): any; + create(x: number, y: number, key: string, frame: string, exists: boolean): any; + swap(child1: any, child2: any): boolean; + bringToTop(child: any): any; + getIndex(child: any): number; + replace(oldChild: any, newChild: any): void; + setProperty(child: any, key: string[], value: string, operation: number): void; + setAll(key: string, value: number, checkAlive: boolean, checkVisible: boolean, operation: number): void; + subAll(key: string, value: number, checkAlive: boolean, checkVisible: boolean, operation: number): void; + multiplyAll(key: string, value: number, checkAlive: boolean, checkVisible: boolean, operation: number): void; + divideAll(key: string, value: number, checkAlive: boolean, checkVisible: boolean, operation: number): void; + callAllExists(callback: Function, callbackContext: Object, existsValue: boolean): void; + callAll(callback: Function, callbackContext: Object): void; + forEach(callback: Function, callbackContext: Object, checkExists: boolean): void; + forEachAlive(callback: Function, callbackContext: Object): void; + forEachDead(callback: Function, callbackContext: Object): void; + getFirstExists(state: boolean): any; + getFirstAlive(): any; + getFirstDead(): any; + countLiving(): number; + countDead(): number; + getRandom(startIndex: number, length: number): any; + remove(child: any): void; + removeAll(): void; + removeBetween(startIndex: number, endIndex: number): void; + destroy(): void; + dump(full: boolean): void; + } + + class World { + constructor(game: Phaser.Game); + game: Phaser.Game; + bounds: Phaser.Rectangle; + camera: Phaser.Camera; + currentRenderOrderID: number; + group: Phaser.Group; + width: number; + height: number; + centerX: number; + centerY: number; + randomX: number; + randomY: number; + boot(): void; + update(): void; + setSize(width: number, height: number): void; + destroy(): void; + } + + class Game { + constructor(width: number, height: number, renderer: number, parent: string, state: Phaser.StateManager, transparent: boolean, antialias: boolean); + id: number; + width: number; + height: number; + renderer: number; + transparent: boolean; + antialias: boolean; + parent: string; + state: Phaser.StateManager; + renderType: number; + isBooted: boolean; + raf: Phaser.RequestAnimationFrame; + add: Phaser.GameObjectFactory; + cache: Phaser.Cache; + input: Phaser.Input; + load: Phaser.Loader; + math: Phaser.Math; + sound: Phaser.SoundManager; + stage: Phaser.Stage; + time: Phaser.Time; + tweens: Phaser.TweenManager; + world: Phaser.World; + physics: Phaser.Physics.Arcade; + rnd: Phaser.RandomDataGenerator; + device: Phaser.Device; + camera: Phaser.Camera; + canvas: HTMLCanvasElement; + context: Object; + debug: Phaser.Utils.Debug; + particles: Phaser.Particles; + _paused: boolean; + paused: boolean; + boot(): void; + setUpRenderer(): void; + loadComplete(): void; + update(): void; + destroy(): void; + } + + class Input { + constructor(game: Phaser.Game); + static MOUSE_OVERRIDES_TOUCH: number; + static TOUCH_OVERRIDES_MOUSE: number; + static MOUSE_TOUCH_COMBINE: number; + id: number; + active: boolean; + game: Phaser.Game; + hitCanvas: any; + hitContext: any; + pollRate: number; + disabled: boolean; + multiInputOverride: number; + position: Phaser.Point; + speed: Phaser.Point; + circle: Phaser.Circle; + scale: Phaser.Point; + maxPointers: number; + currentPointers: number; + tapRate: number; + doubleTapRate: number; + holdRate: number; + justPressedRate: number; + justReleasedRate: number; + recordPointerHistory: boolean; + recordRate: number; + recordLimit: number; + x: number; + y: number; + totalInactivePointers: number; + totalActivePointers: number; + worldX: number; + worldY: number; + pollLocked: boolean; + pointer1: Phaser.Pointer; + pointer2: Phaser.Pointer; + pointer3: Phaser.Pointer; + pointer4: Phaser.Pointer; + pointer5: Phaser.Pointer; + pointer6: Phaser.Pointer; + pointer7: Phaser.Pointer; + pointer8: Phaser.Pointer; + pointer9: Phaser.Pointer; + pointer10: Phaser.Pointer; + activePointer: Phaser.Pointer; + mousePointer: Phaser.Pointer; + mouse: Phaser.Mouse; + keyboard: Phaser.Keyboard; + touch: Phaser.Touch; + mspointer: Phaser.MSPointer; + interactiveItems: Phaser.LinkedList; + onDown(): void; + onUp(): void; + onTap(): void; + onHold(): void; + boot(): void; + update(): void; + reset(hard?: boolean); + resetSpeed(x: number, y: number); + startPointer(event: Event): Phaser.Pointer; + updatePointer(event: Event): Phaser.Pointer; + stopPointer(event: Event): Phaser.Pointer; + getPointer(state: boolean): Phaser.Pointer; + getPointerFromIdentifier(identifier: number): Phaser.Pointer; + addPointer(): Phaser.Pointer; + } + + class Keyboard { + constructor(game: Phaser.Game); + game: Phaser.Game; + disabled: boolean; + static A: number; + static B: number; + static C: number; + static D: number; + static E: number; + static F: number; + static G: number; + static H: number; + static I: number; + static J: number; + static K: number; + static L: number; + static M: number; + static N: number; + static O: number; + static P: number; + static Q: number; + static R: number; + static S: number; + static T: number; + static U: number; + static V: number; + static W: number; + static X: number; + static Y: number; + static Z: number; + static ZERO: number; + static ONE: number; + static TWO: number; + static THREE: number; + static FOUR: number; + static FIVE: number; + static SIX: number; + static SEVEN: number; + static EIGHT: number; + static NINE: number; + static NUMPAD_0: number; + static NUMPAD_1: number; + static NUMPAD_2: number; + static NUMPAD_3: number; + static NUMPAD_4: number; + static NUMPAD_5: number; + static NUMPAD_6: number; + static NUMPAD_7: number; + static NUMPAD_8: number; + static NUMPAD_9: number; + static NUMPAD_MULTIPLY: number; + static NUMPAD_ADD: number; + static NUMPAD_ENTER: number; + static NUMPAD_SUBTRACT: number; + static NUMPAD_DECIMAL: number; + static NUMPAD_DIVIDE: number; + static F1: number; + static F2: number; + static F3: number; + static F4: number; + static F5: number; + static F6: number; + static F7: number; + static F8: number; + static F9: number; + static F10: number; + static F11: number; + static F12: number; + static F13: number; + static F14: number; + static F15: number; + static COLON: number; + static EQUALS: number; + static UNDERSCORE: number; + static QUESTION_MARK: number; + static TILDE: number; + static OPEN_BRACKET: number; + static BACKWARD_SLASH: number; + static CLOSED_BRACKET: number; + static QUOTES: number; + static BACKSPACE: number; + static TAB: number; + static CLEAR: number; + static ENTER: number; + static SHIFT: number; + static CONTROL: number; + static ALT: number; + static CAPS_LOCK: number; + static ESC: number; + static SPACEBAR: number; + static PAGE_UP: number; + static PAGE_DOWN: number; + static END: number; + static HOME: number; + static LEFT: number; + static UP: number; + static RIGHT: number; + static DOWN: number; + static INSERT: number; + static DELETE: number; + static HELP: number; + static NUM_LOCK: number; + start(): void; + stop(): void; + addKeyCapture(keycode: any): void; + removeKeyCapture(keycode: number): void; + clearCaptures(): void; + onKeyDown(event: any): void; + onKeyUp(event: any): void; + reset(): void; + justPressed(keycode: number, duration?: number): boolean; + justReleased(keycode: number, duration?: number): boolean; + isDown(keycode: number): boolean; + } + + class Mouse { + constructor(game: Phaser.Game) + game: Phaser.Game; + callbackContext: Object; + disabled: boolean; + locked: boolean; + static LEFT_BUTTON: number; + static MIDDLE_BUTTON: number; + static RIGHT_BUTTON: number; + mouseDownCallback(): void; + mouseMoveCallback(): void; + mouseUpCallback(): void; + start(): void; + onMouseDown(): void; + onMouseUp(): void; + onMouseMove(): void; + requestPointerLock(): void; + pointerLockChange(): void; + releasePointerLock(): void; + stop(); + } + + class MSPointer { + constructor(game: Phaser.Game); + game: Phaser.Game; + callbackContext: Object; + disabled: boolean; + mouseDownCallback(): void; + mouseMoveCallback(): void; + mouseUpCallback(): void; + start(): void; + onPointerDown(): void; + onPointerUp(): void; + onPointerMove(): void; + stop(): void; + } + + class Pointer { + constructor(game: Phaser.Game, id: number); + game: Phaser.Game; + id: number; + active: boolean; + positionDown: Phaser.Point; + position: Phaser.Point; + circle: Phaser.Circle; + withinGame: boolean; + clientX: number; + clientY: number; + pageX: number; + pageY: number; + screenX: number; + screenY: number; + duation: number; + worldX: number; + worldY: number; + x: number; + y: number; + isMouse: boolean; + isDown: boolean; + isUp: boolean; + timeDown: number; + timeUp: number; + previousTapTime: number; + totalTouches: number; + msSinceLastClick: number; + targetObject: any; + start(event: any): Phaser.Pointer; + update(): void; + move(event: any): void; + leave(event: any): void; + stop(event: any): void; + justPressed(duration?: number): boolean; + justReleased(duration?: number): boolean; + reset(): void; + toString(): string; + } + + class Touch { + constructor(game: Phaser.Game); + game: Phaser.Game; + callbackContext: any; + touchStartCallback: Function; + touchMoveCallback: Function; + touchEndCallback: Function; + touchEnterCallback: Function; + touchLeaveCallback: Function; + touchCancelCallback: Function; + preventDefault: boolean; + disabled: boolean; + start(): void; + consumeDocumentTouches(): void; + onTouchStart(event: any): void; + onTouchCancel(event: any): void; + onTouchEnter(event: any): void; + onTouchLeave(event: any): void; + onTouchMove(event: any): void; + onTouchEnd(event: any): void; + stop(): void; + } + + class InputHandler extends LinkedListItem { + constructor(sprite: Phaser.Sprite); + game: Phaser.Game; + sprite: Phaser.Sprite; + enabled: boolean; + priorityID: number; + useHandCursor: boolean; + isDragged: boolean; + allowHorizontalDrag: boolean; + allowVerticalDrag: boolean; + bringToTop: boolean; + snapOffset: number; + snapOnDrag: boolean; + snapOnRelease: boolean; + snapX: number; + snapY: number; + pixelPerfect: boolean; + pixelPerfectAlpha: number; + draggable: boolean; + boundsSprite: Phaser.Sprite; + consumePointerEvent: boolean; + start(priority: number, useHandCursor: boolean): void; + reset(): void; + stop(): void; + destroy(): void; + pointerX(pointer: number): number; + pointerY(pointer: number): number; + pointerDown(pointer: number): boolean; + pointerUp(pointer: number): boolean; + pointerTimeDown(pointer: number): number; + pointerTimeUp(pointer: number): number; + pointerOver(pointer: number): boolean; + pointerOut(pointer: number): boolean; + pointerTimeOver(pointer: number): number; + pointerTimeOut(pointer: number): number; + pointerDragged(pointer: number): boolean; + checkPointerOver(pointer: number): boolean; + checkPixel(x: number, y: number): boolean; + update(pointer: number): void; + updateDrag(pointer: number): boolean; + justOver(pointer: number, delay: number): boolean; + justOut(pointer: number, delay: number): boolean; + justPressed(pointer: number, delay: number): boolean; + justReleased(pointer: number, delay: number): boolean; + overDuration(pointer: number): number; + downDuration(pointer: number): number; + enableDrag(lockCenter: boolean, bringToTop: boolean, pixelPerfect: boolean, alphaThreshold?: number, boundsRect?: Phaser.Rectangle, boundsSprite?: Phaser.Rectangle): void; + disableDrag(): void; + startDrag(): void; + stopDrag(): void; + setDragLock(allowHorizontal: boolean, allowVertical: boolean): void; + enableSnap(snapX: number, snapY: number, onDrag?: boolean, onRelease?: boolean): void; + disableSnap(): void; + checkBoundsRect(): void; + checkBoundsSprite(): void; + } + + class Event { + constructor(sprite: Phaser.Sprite); + parent: Phaser.Sprite; + onAddedToGroup: Phaser.Signal; + onRemovedFromGroup: Phaser.Signal; + onKilled: Phaser.Signal; + onRevived: Phaser.Signal; + onOutOfBounds: Phaser.Signal; + onInputOver: Phaser.Signal; + onInputOut: Phaser.Signal; + onInputDown: Phaser.Signal; + onInputUp: Phaser.Signal; + onDragStart: Phaser.Signal; + onDragStop: Phaser.Signal; + onAnimationStart: Phaser.Signal; + onAnimationComplete: Phaser.Signal; + onAnimationLoop: Phaser.Signal; + } + + class GameObjectFactory { + constructor(game: Phaser.Game); + game: Phaser.Game; + world: Phaser.World; + existing(object: any): boolean; + sprite(x: number, y: number, key?: string, frame?: number): Phaser.Sprite; + child(parent: any, x: number, y: number, key?: string, frame?: number): Phaser.Sprite; + tween(obj: Object): Phaser.Tween; + group(parent: any, name: string): Phaser.Group; + audio(key: string, volume: number, loop: boolean): Phaser.Sound; + tileSprite(x: number, y: number, width: number, height: number, key?: string, frame?: number): Phaser.TileSprite; + text(x: number, y: number, text: string, style: string): Phaser.Text; + button(x: number, y: number, key: string, callback: Function, callbackContext: Object, overFrame?: number, outFrame?: number, downFrame?: number): Phaser.Button; + graphics(x: number, y: number): Phaser.Graphics; + emitter(x: number, y: number, maxParticles: number): Phaser.Particles.Arcade.Emitter; + bitmapText(x: number, y: number, text: string, style: string): Phaser.BitmapText; + tilemap(x: number, y: number, key: string, resizeWorld: boolean, tileWidth: number, tileHeight: number): Phaser.Tilemap; + renderTexture(key: string, width: number, height: number): Phaser.RenderTexture; + } + + class Sprite { + constructor(game: Phaser.Game, x: number, y: number, key: string, frame: number); + game: Phaser.Game; + exists: boolean; + alive: boolean; + group: Phaser.Group; + name: string; + type: number; + renderOrderID: number; + lifespan: number; + events: Phaser.Event[]; + animations: Phaser.AnimationManager; + input: Phaser.InputHandler; + key: string; + currentFrame: number; + anchor: Phaser.Point; + x: number; + y: number; + position: Phaser.Point; + autoCull: boolean; + scale: Phaser.Point; + scrollFactor: Phaser.Point; + offset: Phaser.Point; + center: Phaser.Point; + topLeft: Phaser.Point; + topRight: Phaser.Point; + bottomRight: Phaser.Point; + bottomLeft: Phaser.Point; + bounds: Phaser.Rectangle; + body: Phaser.Physics.Arcade.Body; + velocity: number; + acceleration: number; + inWorld: boolean; + inWorldThreshold: number; + angle: number; + frame: number; + frameName: string; + inCamera: boolean; + crop: boolean; + inputEnabled: boolean; + preUpdate(): void; + postUpdate(): void; + centerOn(x: number, y: number): void; + revive(): void; + kill(): void; + reset(x: number, y: number): void; + updateBounds(): void; + getLocalPosition(p: Phaser.Point, x: number, y: number): Phaser.Point; + getLocalUnmodifiedPosition(p: Phaser.Point, x: number, y: number): Phaser.Point; + bringToTop(): void; + getBounds(rect: Phaser.Rectangle): Phaser.Rectangle; + } + + class TileSprite { + constructor(game: Phaser.Game, x: number, y: number, width: number, height: number, key?: string, frame?: number); + texture: Phaser.RenderTexture; + type: number; + tileScale: Phaser.Point; + tilePosition: Phaser.Point; + } + + class Text { + constructor(game: Phaser.Game, x: number, y: number, text: string, style: string); + exists: boolean; + alive: boolean; + group: Phaser.Group; + name: string; + game: Phaser.Game; + type: number; + text: string; + angle: number; + style: string; + position: Phaser.Point; + anchor: Phaser.Point; + scale: Phaser.Point; + scrollFactor: Phaser.Point; + renderable: boolean; + update(): void; + } + + class BitmapText extends Phaser.Text { + } + + class Button { + constructor(game: Phaser.Game, x: number, y: number, key: string, callback: Function, overFrame: number, outFrame: number, downFrame: number); + input: Phaser.InputHandler; + onInputUp: Phaser.Signal; + onInputDown: Phaser.Signal; + onInputOut: Phaser.Signal; + onInputOver: Phaser.Signal; + events: Phaser.Event[]; + setFrames(overFrame?: number, outFrame?: number, downFrame?: number): void; + onInputOverHandler(pointer: Phaser.Pointer): void; + onInputUpHandler(pointer: Phaser.Pointer): void; + onInputDownHandler(pointer: Phaser.Pointer): void; + onInputOutHandler(pointer: Phaser.Pointer): void; + } + + class Graphics extends Phaser.Sprite { + constructor(game: Phaser.Game, x: number, y: number); + angle: number; + } + + class RenderTexture { + constructor(game: Phaser.Game, key: string, width: number, height: number); + name: string; + type: number; + } + + class Canvas { + create(width: number, height: number): HTMLCanvasElement; + getOffset(element: HTMLElement, point?: Phaser.Point): Phaser.Point; + getAspectRatio(canvas: HTMLCanvasElement): number; + setBackgroundColor(canvas: HTMLCanvasElement, color: string): HTMLCanvasElement; + setTouchAction(canvas: HTMLCanvasElement, value: string): HTMLCanvasElement; + addToDOM(canvas: HTMLCanvasElement, parent: string, overflowHidden: boolean): HTMLCanvasElement; + setTransform(context: CanvasRenderingContext2D, translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): CanvasRenderingContext2D; + setSmoothingEnabled(context: CanvasRenderingContext2D, value: boolean): CanvasRenderingContext2D; + setImageRenderingCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement; + setImageRenderingBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement; + } + + class StageScaleMode { + constructor(game: Phaser.Game, width: number, height: number); + static EXACT_FIT: number; + static NO_SCALE: number; + static SHOW_ALL: number; + forceLandscape: boolean; + forcePortrait: boolean; + incorrectOrientation: boolean; + pageAlignHorizontally: boolean; + pageAlignVeritcally: boolean; + minWidth: number; + maxWidth: number; + width: number; + height: number; + maxIterations: number; + game: Phaser.Game; + enterLandscape: Phaser.Signal; + enterPortrait: Phaser.Signal; + orientation: number; + scaleFactor: Phaser.Point; + aspectRatio: number; + isFullScreen: boolean; + isPortrait: boolean; + isLandscape: boolean; + startFullScreen(): void; + stopFullScreen(): void; + checkOrientationState(): void; + checkOrientation(): void; + checkResize(event: any): void; + refresh(): void; + setScreenSize(force: boolean): void; + setSize(): void; + setMaximum(): void; + setShowAll(): void; + setExactFit(): void; + } + + class Device { + patchAndroidClearRect: boolean; + desktop: boolean; + iOS: boolean; + android: boolean; + chromeOS: boolean; + linux: boolean; + macOS: boolean; + windows: boolean; + canvas: boolean; + file: boolean; + fileSystem: boolean; + localStorage: boolean; + webGL: boolean; + worker: boolean; + touch: boolean; + mspointer: boolean; + css3D: boolean; + pointerLock: boolean; + arora: boolean; + chrome: boolean; + epiphany: boolean; + firefox: boolean; + ie: boolean; + ieVersion: number; + mobileSafari: boolean; + midori: boolean; + opera: boolean; + safari: boolean; + webApp: boolean; + audioData: boolean; + webAudio: boolean; + ogg: boolean; + opus: boolean; + mp3: boolean; + wav: boolean; + m4a: boolean; + webm: boolean; + iPhone: boolean; + iPhone4: boolean; + iPad: boolean; + pixelRatio: number; + canPlayAudio(type: string): boolean; + isConsoleOpen(): boolean; + } + + class RequestAnimationFrame { + constructor(game: Phaser.Game); + game: Phaser.Game; + isRunning: boolean; + start(): boolean; + updateRAF(time: number): void; + updateSetTimeout(): void; + stop(): void; + isSetTimeOut(): boolean; + isRAF(): boolean; + } + + class RandomDataGenerator { + constructor(seeds: Array); + c: number; + s0: number; + s1: number; + s2: number; + rnd(): number; + sow(seeds: Array): void; + hash(data: any): number; + integer(): number; + frac(): number; + real(): number; + integerInRange(min: number, max: number): number; + realInRange(min: number, max: number): number; + normal(): number; + uuid(): number; + pick(ary: number[]): number; + weightedPick(ary: number[]): number; + timestamp(a?: number, b?: number): number; + angle(): number; + } + + class Math { + static PI2: number; + static fuzzyEqual(a: number, b: number, epsilon?: number): boolean; + static fuzzyLessThan(a: number, b: number, epsilon?: number): boolean; + static fuzzyGreaterThan(a: number, b: number, epsilon?: number): boolean; + static fuzzyCeil(a: number, b: number, epsilon?: number): boolean; + static fuzzyFloor(a: number, b: number, epsilon?: number): boolean; + static average(...numbers: number[]): number; + static truncate(n: number): number; + static shear(n: number): number; + static snapTo(input: number, gap: number, start?: number): number; + static snapToFloor(input: number, gap: number, start?: number): number; + static snapToCeil(input: number, gap: number, start?: number): number; + static snapToInArray(input: number, arr: number[], sort?: boolean): number; + static roundTo(value: number, place?: number, base?: number): number; + static floorTo(value: number, place?: number, base?: number): number; + static ceilTo(value: number, place?: number, base?: number): number; + static interpolateFloat(a: number, b: number, weight: number): number; + static angleBetween(x1: number, y1: number, x2: number, y2: number): number; + static normalizeAngle(angle: number, radians?: boolean): number; + static nearestAngleBetween(a1: number, a2: number, radians?: boolean): number; + static interpolateAngles(a1: number, a2: number, weight: number, radians?: boolean, ease?: any): number; + static chanceRoll(chance?: number): boolean; + static numberArray(min: number, max: number): number[]; + static maxAdd(value: number, amount: number, max: number): number; + static minSub(value: number, amount: number, min: number): number; + static wrap(value: number, min: number, max: number): number; + static wrapValue(value: number, amount: number, max: number): number; + static randomSign(): number; + static isOdd(n: number): boolean; + static isEven(n: number): boolean; + static max(...numbers: number[]): number; + static min(...numbers: number[]): number; + static wrapAngle(angle: number): number; + static angleLimit(angle: number, min: number, max: number): number; + static linearInterpolation(v: number[], k: number): number; + static bezierInterpolation(v: number[], k: number): number; + static catmullRomInterpolation(v: number[], k: number): number; + static linear(p0: number, p1: number, t: number): number; + static bernstein(n: number, i: number): number; + static catmullRom(p0: number, p1: number, p2: number, p3: number, t: number): number; + static difference(a: number, b: number): number; + static getRandom(objects: Object[], startIndex?: number, length?: number): Object; + static floor(value: number): number; + static ceil(value: number): number; + static sinCosGenerator(length: number, sinAmplitude?: number, cosAmplitude?: number, frequency?: number): { sin: number[]; cos: number[]; }; + static shift(stack: Array): any; + static shuffleArray(array: Array): Array; + static distance(x1: number, y1: number, x2: number, y2: number): number; + static distanceRounded(x1: number, y1: number, x2: number, y2: number): number; + static clamp(x: number, a: number, b: number): number; + static clampBottom(x: number, a: number): number; + static mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number; + static smoothstep(x: number, min: number, max: number): number; + static smootherstep(x: number, min: number, max: number): number; + static sign(x: number): number; + static degToRad(degrees: number): number; + static radToDeg(radians: number): number; + } + + class QuadTree { + constructor(physicsManager: Phaser.Physics.Arcade, x: number, y: number, width: number, height: number, maxObject?: number, maxLevels?: number, level?: number); + physicsManager: Phaser.Physics.Arcade; + ID: number; + maxObjects: number; + maxLevels: number; + level: number; + bounds: { + x: number; + y: number; + width: number; + height: number; + subWidth: number; + subHeight: number; + right: number; + bottom: number; + }; + objects: Array; + nodes: Array; + split(): void; + insert(body: Object): void; + getIndex(rect: Object): number; + retrieve(sprite: Object): Array; + clear(): void; + } + + class Circle { + constructor(x?: number, y?: number, diameter?: number); + x: number; + y: number; + diameter: number; + radius: number; + left: number; + right: number; + top: number; + bottom: number; + area: number; + empty: boolean; + circumference(): number; + setTo(x: number, y: number, diameter: number): Circle; + copyFrom(source: any): Circle; + copyTo(dest: Object): Object; + distance(dest: Object, round: boolean): number; + clone(out: Phaser.Circle): Phaser.Circle; + contains(x: number, y: number): Phaser.Circle; + circumferencePoint(angle: number, asDegrees: number, output?: Phaser.Point): Phaser.Point; + offset(dx: number, dy: number): Phaser.Circle; + offsetPoint(point: Phaser.Point): Phaser.Circle; + toString(): string; + static contains(a: Phaser.Circle, x: number, y: number): boolean; + static equals(a: Phaser.Circle, b: Phaser.Circle): boolean; + static intersects(a: Phaser.Circle, b: Phaser.Circle): boolean; + static circumferencePoint(a: Phaser.Circle, angle: number, asDegrees: boolean, output?: Phaser.Point): Phaser.Point; + static intersectsRectangle(c: Phaser.Circle, r: Phaser.Rectangle): boolean; + } + + class Point { + constructor(x: number, y: number); + x: number; + y: number; + copyFrom(source: any): Phaser.Point; + invert(): Phaser.Point; + setTo(x: number, y: number): Phaser.Point; + add(x: number, y: number): Phaser.Point; + subtract(x: number, y: number): Phaser.Point; + multiply(x: number, y: number): Phaser.Point; + divide(x: number, y: number): Phaser.Point; + clampX(min: number, max: number): Phaser.Point; + clampY(min: number, max: number): Phaser.Point; + clamp(min: number, max: number): Phaser.Point; + clone(output: Phaser.Point): Phaser.Point; + copyTo(dest: any): Object; + distance(dest: Object, round?: boolean): number; + equals(a: Phaser.Point): boolean; + rotate(x: number, y: number, angle: number, asDegrees: boolean, distance: number): Phaser.Point; + toString(): string; + static add(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; + static subtract(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; + static multiply(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; + static divide(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; + static equals(a: Phaser.Point, b: Phaser.Point): boolean; + static distance(a: Phaser.Point, b: Phaser.Point, round: boolean): number; + static rotate(a: Phaser.Point, x: number, y: number, angle: number, asDegrees: boolean, distance: boolean): Phaser.Point; + } + + class Rectangle { + constructor(x: number, y: number, width: number, height: number); + x: number; + y: number; + width: number; + height: number; + halfWidth: number; + halfHeight: number; + bottom: number; + bottomRight: Phaser.Point; + left: number; + right: number; + volume: number; + perimeter: number; + centerX: number; + centerY: number; + top: number; + topLeft: Phaser.Point; + empty: boolean; + offset(dx: number, dy: number): Phaser.Rectangle; + offsetPoint(point: Phaser.Point): Phaser.Rectangle; + setTo(x: number, y: number, width: number, height: number): Phaser.Rectangle; + floor(): void; + copyFrom(source: any): Phaser.Rectangle; + copyTo(dest: any): Object; + inflate(dx: number, dy: number): Phaser.Rectangle; + size(output: Phaser.Point): Phaser.Point; + clone(output: Phaser.Rectangle): Phaser.Rectangle; + contains(x: number, y: number): boolean; + containsRect(b: Phaser.Rectangle): boolean; + equals(b: Phaser.Rectangle): boolean; + intersection(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + intersects(b: Phaser.Rectangle, tolerance: number): boolean; + intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean; + union(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + toString(): string; + static inflate(a: Phaser.Rectangle, dx: number, dy: number): Phaser.Rectangle; + static inflatePoint(a: Phaser.Rectangle, point: Phaser.Point): Phaser.Rectangle; + static size(a: Phaser.Rectangle, output: Phaser.Point): Phaser.Point; + static clone(a: Phaser.Rectangle, output: Phaser.Rectangle): Phaser.Rectangle; + static contains(a: Phaser.Rectangle, x: number, y: number): boolean; + static containsPoint(a: Phaser.Rectangle, point: Phaser.Point): boolean; + static containsRect(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; + static equals(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; + static intersection(a: Phaser.Rectangle, b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + static intersects(a: Phaser.Rectangle, b: Phaser.Rectangle, tolerance: number): boolean; + static intersectsRaw(a: Phaser.Rectangle, left: number, right: number, top: number, bottom: number, tolerance: number): boolean; + static union(a: Phaser.Rectangle, b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; + } + + class Net { + constructor(game: Phaser.Game); + game: Phaser.Game; + getHostName(): string; + checkDomainName(domain: string): string; + updateQueryString(key: string, value: any, redirect?: boolean, url?: string): string; + getQueryString(parameter?: string): string; + decodeURI(value: string): string; + } + + class TweenManager { + constructor(game: Phaser.Game); + game: Phaser.Game; + REVISION: string; + getAll(): Phaser.Tween[]; + removeAll(): void; + add(tween: Phaser.Tween): Phaser.Tween; + create(object: Object): Phaser.Tween; + remove(tween: Phaser.Tween): void; + update(): boolean; + pauseAll(): void; + resumeAll(): void; + } + + class Tween { + constructor(object: Object, game: Phaser.Game); + game: Phaser.Game; + pending: boolean; + pendingDelete: boolean; + onStart: Phaser.Signal; + onComplete: Phaser.Signal; + isRunning: boolean; + to(properties: Object, duration?: number, ease?: any, autoStart?: boolean, delay?: number, loop?: boolean): Phaser.Tween; + start(time: number): Phaser.Tween; + stop(): Phaser.Tween; + delay(amount: number): Phaser.Tween; + repeat(times: number): Phaser.Tween; + yoyo(yoyo: boolean): Phaser.Tween; + easing(easing: any): Phaser.Tween; + interpolation(interpolation: Function): Phaser.Tween; + chain(...tweens: Phaser.Tween[]): Phaser.Tween; + loop(): Phaser.Tween; + onStartCallback(callback: Function): Phaser.Tween; + onUpdateCallback(callback: Function): Phaser.Tween; + onCompleteCallback(callback: Function): Phaser.Tween; + pause(): void; + resume(): void; + update(time: number): boolean; + } + + class Easing { + Linear: { + None: (k: number) => number; + }; + Quadratic: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Cubic: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Quartic: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Quintic: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Sinusoidal: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Exponential: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Circular: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Elastic: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Back: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + Bounce: { + In: (k: number) => number; + Out: (k: number) => number; + InOut: (k: number) => number; + }; + } + + class Time { + constructor(game: Phaser.Game); + game: Phaser.Game; + physicsElapsed: number; + time: number; + pausedTime: number; + now: number; + elapsed: number; + fps: number; + fpsMin: number; + fpsMax: number; + msMin: number; + msMax: number; + frames: number; + pauseDuration: number; + timeToCall: number; + lastTime: number; + totalElapsedSeconds(): number; + update(time: number): number; + gamePaused(): void; + gameResumed(): void; + elapsedSince(since: number): number; + elapsedSecondsSince(since: number): number; + reset(): void; + } + + class AnimationManager { + constructor(sprite); + sprite: Phaser.Sprite; + game: Phaser.Game; + currentFrame: Phaser.Animation.Frame; + updateIfVisible: boolean; + frameData: Phaser.Animation.FrameData; + frameTotal: number; + frame: number; + frameName: string; + loadFrameData(frameData: Phaser.Animation.FrameData): void; + add(name: string, frames?: Array, frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation; + validateFrames(frames: Array, useNumericIndex?: boolean): boolean; + play(name: string, frameRate?: number, loop?: boolean): Phaser.Animation; + stop(name?: string, resetFrame?: boolean): void; + update(): boolean; + destroy(): void; + } + + class Animation { + constructor(game: Phaser.Game, parent: Phaser.Sprite, name: string, frameData: Phaser.Animation.FrameData, frames: any[], delay: number, looped: boolean); + game: Phaser.Game; + name: string; + delay: number; + looped: boolean; + isFinished: boolean; + isPlaying: boolean; + currentFrame: Phaser.Animation.Frame; + frameTotal: number; + frame: number; + play(frameRate?: number, loop?: boolean): Phaser.Animation; + restart(): void; + stop(resetFrame?: boolean): void; + update(): boolean; + destroy(): void; + onComplete(): void; + } + + module Animation { + class Frame { + constructor(index: number, x: number, y: number, width: number, height: number, name: string, uuid: string); + index: number; + x: number; + y: number; + width: number; + height: number; + centerX: number; + centerY: number; + distance: number; + name: string; + uuid: string; + rotated: boolean; + rotationDirection: string; + trimmed: boolean; + sourceSizeW: number; + sourceSizeH: number; + spriteSourceSizeX: number; + spriteSourceSizeY: number; + spriteSourceSizeW: number; + spriteSourcesizeH: number; + setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): void; + } + + class FrameData { + addFrame(frame: Frame): Frame; + getFrame(index: number): Frame; + getFrameByName(name: string): Frame; + checkFrame(name: string): boolean; + getFrameRange(start: number, end: number, output: Array): Array; + getFrames(frames: Array, useNumericIndex?: boolean, output?: Array): Array; + getFrameIndexes(frames: Array, useNumericIndex?: boolean, output?: Array): Array; + total: number; + } + + class Parser { + spriteSheet(game: Phaser.Game, key: string, frameWidth: number, frameHeight: number, frameMax?: number): Phaser.Animation.FrameData; + JSONData(game: Phaser.Game, json: Object, cacheKey: string): Phaser.Animation.FrameData; + JSONDataHash(game: Phaser.Game, json: Object, cacheKey: string): Phaser.Animation.FrameData; + XMLData(game: Phaser.Game, xml: Object, cacheKey: string): Phaser.Animation.FrameData; + } + } + + class Cache { + constructor(game: Phaser.Game); + game: Phaser.Game; + onSoundUnlock: Phaser.Signal; + addCanvas(key: string, canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; + addRenderTexture(key: string, texture: RenderTexture): void; + addSpriteSheet(key: string, url: string, data: Object, frameWidth: number, frameHeight: number, frameMax: number): void; + addTilemap(key: string, url: string, data: Object, mapData: Object, atlasData: Object): void; + addTextureAtlas(key: string, url: string, data: Object, atlasData: Object): void; + addBitmapFont(key: string, url: string, data: Object, xmlData: Object): void; + addDefaultImage(): void; + addImage(key: string, url: string, data: Object): void; + addSound(key: string, url: string, data: Object): void; + reloadSound(key: string): void; + reloadSoundComplete(key: string): void; + updateSound(key: string, property: string, value: Phaser.Sound): void; + decodedSound(key: string, data: Object): void; + addText(key: string, url: string, data: Object): void; + getCanvas(key: string): Object; + checkImageKey(key: string): boolean; + getImage(key: string): Object; + getTilemap(key: string): Phaser.Tilemap; + getFrameData(key: string): Phaser.Animation.FrameData; + getFrameByIndex(key: string, frame: string): Phaser.Animation.Frame; + getFrameByName(key: string, frame: string): Phaser.Animation.Frame; + getFrame(key: string): Phaser.Animation.Frame; + getTextureFrame(key: string): Phaser.Animation.Frame; + getTexture(key: string): Phaser.RenderTexture; + getSound(key: string): Phaser.Sound; + getSoundData(key: string): Object; + isSoundDecoded(key: string): boolean; + isSoundReady(key: string): boolean; + isSpriteSheet(key: string): boolean; + getText(key: string): Object; + getKeys(array: Array): Array; + getImageKeys(): string[]; + getSoundKeys(): string[]; + getTextKeys(): string[]; + removeCanvas(key: string): void; + removeImage(key: string): void; + removeSound(key: string): void; + removeText(key: string): void; + destroy(): void; + } + + class Loader { + static TEXTURE_ATLAS_JSON_ARRAY: number; + static TEXTURE_ATLAS_JSON_HASH: number; + static TEXTURE_ATLAS_XML_STARLING: number; + constructor(game: Phaser.Game); + game: Phaser.Game; + queueSize: number; + isLoading: boolean; + hasLoaded: boolean; + progress: number; + preloadSprite: Phaser.Sprite; + crossOrigin: string; + baseURL: string; + onFileComplete: Phaser.Signal; + onFileError: Phaser.Signal; + onLoadStart: Phaser.Signal; + onLoadComplete: Phaser.Signal; + setPreloadSprite(sprite: Phaser.Sprite, direction: number): void; + checkKeyExists(key: string): boolean; + reset(): void; + addToFileList(type: string, key: string, url: string, properties: Array): void; + image(key: string, url: string, overwrite?: boolean): void; + text(key: string, url: string, overwrite?: boolean): void; + spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax: number): void; + audio(key: string, urls: string[], autoDecode?: boolean): void; + tilemap(key: string, tilesetURL: string, mapDataURL?: string, mapData?: Object, format?: string): void; + bitmapFont(key: string, textureURL: string, xmlURL?: string, xmlData?: Object): void; + atlasJSONArray(key: string, textureURL: string, atlasURL: string, atlasData: Object): void; + atlasJSONHash(key: string, textureURL: string, atlasURL: string, atlasData: Object): void; + atlasXML(key: string, textureURL: string, atlasURL: string, atlasData: Object): void; + atlas(key: string, textureURL: string, atlasURL?: string, atlasData?: Object, format?: number): void; + removeFile(key: string): void; + removeAll(): void; + start(): void; + loadFile(): void; + getAudioURL(urls: string[]): string; + fileError(key: string): void; + fileComplete(key: string): void; + jsonLoadComplete(key: string): void; + csvLoadComplete(key: string): void; + dataLoadError(key: string): void; + xmlLoadComplete(key: string): void; + nextFile(previousKey: string, success: boolean): void; + } + + module Loader { + class Parser { + bitmapFont(game: Phaser.Game, xml: Object, cacheKey: Phaser.Animation.FrameData): void; + } + } + + class Sound { + constructor(game: Phaser.Game, key: string, volume?: number, loop?: boolean); + game: Phaser.Game; + name: string; + key: string; + loop: boolean; + markers: Object; + context: any; + autoplay: boolean; + totalDuration: number; + startTime: number; + currentTime: number; + duration: number; + stopTime: number; + paused: boolean; + isPlaying: boolean; + currentMarker: string; + pendingPlayback: boolean; + override: boolean; + usingWebAudio: boolean; + usingAudioTag: boolean; + onDecoded: Phaser.Signal; + onPlay: Phaser.Signal; + onPause: Phaser.Signal; + onResume: Phaser.Signal; + onLoop: Phaser.Signal; + onStop: Phaser.Signal; + onMute: Phaser.Signal; + isDecoded: boolean; + isDecoding: boolean; + mute: boolean; + volume: number; + onMarkerComplete: Phaser.Signal; + soundHasUnlocked(key: string): void; + addMarker(name: string, start: number, stop: number, volume?: number, loop?: boolean): void; + removeMarker(name: string): void; + update(): void; + play(marker: string, position: number, volume?: number, loop?: boolean): Phaser.Sound; + restart(marker: string, position: number, volume?: number, loop?: boolean): void; + pause(): void; + resume(): void; + stop(): void; + } + + class SoundManager { + constructor(game: Phaser.Game); + game: Phaser.Game; + onSoundDecode: Phaser.Signal; + context: any; + usingWebAudio: boolean; + usingAudioTag: boolean; + noAudio: boolean; + touchLocked: boolean; + channels: number; + mute: boolean; + volume: number; + boot(): void; + unlock(): void; + stopAll(): void; + pauseAll(): void; + resumeAll(): void; + decode(key: string, sound?: Phaser.Sound): void; + update(): void; + add(key: string, volume: number, loop: boolean): Phaser.Sound; + } + + module Utils { + class Debug { + constructor(game: Phaser.Game); + game: Phaser.Game; + font: string; + lineHeight: number; + renderShadow: boolean; + currentX: number; + currentY: number; + currentAlpha: number; + start(x?: number, y?: number, color?: string): void; + stop(): void; + line(text: string, x: number, y: number): void; + renderQuadTree(quadtree: Phaser.QuadTree, color?: string): void; + renderSpriteCorners(sprite: Phaser.Sprite, showText?: boolean, showBounds?: boolean, color?: string): void; + renderSoundInfo(sound: Phaser.Sound, x: number, y: number, color?: string): void; + renderCameraInfo(camera: Phaser.Camera, x: number, y: number, color?: string): void; + renderPointer(pointer: Phaser.Pointer, hideIfUp?: boolean, downColor?: string, upColor?: string, color?: string): void; + renderSpriteInputInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; + renderSpriteCollision(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; + renderInputInfo(x: number, y: number, color?: string): void; + renderSpriteInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; + renderWorldTransformInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; + renderLocalTransformInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; + renderPointInfo(point: Phaser.Point, x: number, y: number, color?: string): void; + renderSpriteBody(sprite: Phaser.Sprite, color?: string): void; + renderSpriteBounds(sprite: Phaser.Sprite, color?: string, fill?: boolean): void; + renderPixel(x: number, y: number, fillStyle?: string): void; + renderPoint(point: Phaser.Point, fillStyle?: string): void; + renderRectangle(rect: Phaser.Rectangle, fillStyle?: string): void; + renderCircle(circle: Phaser.Circle, fillStyle?: string): void; + renderText(text: string, x: number, y: number, color?: string, font?: string): void; + } + } + + class Color { + getColor32(alpha: number, red: number, green: number, blue: number): number; + getColor(red: number, green: number, blue: number): number; + hexToRGB(h: string): number; + getColorInfo(color: number): string; + RGBtoHexstring(color: number): string; + RGBtoWebstring(color: number): string; + colorToHexstring(color: number): string; + interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number; + interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number; + interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number; + getRandomColor(min?: number, max?: number, alpha?: number): number; + getRGB(color: number): Object; + getWebRGB(color: number): string; + getAlpha(color: number): number; + getAlphaFloat(color: number): number; + getRed(color: number): number; + getGreen(color: number): number; + getBlue(color: number): number; + } + + module Physics { + class Arcade { + constructor(game: Phaser.Game) + game: Phaser.Game; + gravity: Phaser.Point; + bounds: Phaser.Rectangle; + maxObjects: number; + maxLevels: number; + OVERLAP_BIAS: number; + TILE_OVERLAP: number; + quadTree: Phaser.QuadTree; + quadTreeID: number; + updateMotion(body: Phaser.Physics.Arcade.Body); + computeVelocity(axis: number, body: Phaser.Physics.Arcade.Body, velocity: number, acceleration: number, drag: number, max: number): void; + preUpdate(): void; + postUpdate(): void; + collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; + collideSpriteVsSprite(sprite1: Phaser.Sprite, sprite2: Phaser.Sprite, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; + collideSpriteVsTilemap(sprite1: Phaser.Sprite, tilemap: Phaser.Tilemap, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; + collideSpriteVsGroup(sprite1: Phaser.Sprite, group: Phaser.Group, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; + collideGroupVsTilemap(group: Phaser.Group, tilemap: Phaser.Tilemap, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; + collideGroupVsGroup(group: Phaser.Group, group2: Phaser.Group, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; + separate(body: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): void; + separateX(body: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): void; + separateY(body: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): void; + separateTile(object: Object, x: number, y: number, width: number, height: number, mass: number, collideLeft: boolean, collideRight: boolean, collideUp: boolean, collideDown: boolean, separateX: boolean, separateY: boolean): boolean; + separateTileX(object: Object, x: number, y: number, width: number, height: number, mass: number, collideLeft: boolean, collideRight: boolean, collideUp: boolean, collideDown: boolean, separateX: boolean, separateY: boolean): boolean; + separateTileY(object: Object, x: number, y: number, width: number, height: number, mass: number, collideLeft: boolean, collideRight: boolean, collideUp: boolean, collideDown: boolean, separateX: boolean, separateY: boolean): boolean; + velocityFromAngle(angle: number, speed?: number, point?: Phaser.Point): Phaser.Point; + moveTowardsObject(source: Phaser.Sprite, dest: Phaser.Sprite, speed?: number, maxTime?: number): void; + accelerateTowardsObject(source: Phaser.Sprite, dest: Phaser.Sprite, speed?: number, xSpeedMax?: number, ySpeedMax?: number): void; + moveTowardsMouse(source: Phaser.Sprite, speed?: number, maxTime?: number): void; + accelerateTowardsMouse(source: Phaser.Sprite, speed: number, xSpeedMax?: number, ySpeedMax?: number): void; + moveTowardsPoint(source: Phaser.Sprite, target: Phaser.Point, speed?: number, maxTime?: number): void; + accelerateTowardsPoint(source: Phaser.Sprite, target: Phaser.Point, speed: number, xSpeedMax?: number, ySpeedMax?: number): void; + distanceBetween(a: Phaser.Sprite, b: Phaser.Sprite): number; + distanceToPoint(a: Phaser.Sprite, target: Phaser.Point): number; + distanceToMouse(a: Phaser.Sprite): number; + angleBetweenPoint(a: Phaser.Sprite, target: Phaser.Point, asDegrees?: boolean): number; + angleBetween(a: Phaser.Sprite, b: Phaser.Sprite, asDegrees?: boolean): number; + velocityFromFacing(parent: Phaser.Sprite, speed: number): Phaser.Point; + angleBetweenMouse(a: Phaser.Sprite, asDegress?: boolean): number; + } + + module Arcade { + class BorderChoices { + none: boolean; + any: boolean; + up: boolean; + down: boolean; + left: boolean; + right: boolean; + } + + class Body { + constructor(sprite: Phaser.Sprite); + sprite: Phaser.Sprite; + game: Phaser.Game; + offset: Phaser.Point; + x: number; + y: number; + lastX: number; + lastY: number; + sourceWidth: number; + sourceHeight: number; + width: number; + height: number; + halfWidth: number; + helfHeight: number; + velocity: Phaser.Point; + acceleration: Phaser.Point; + drag: Phaser.Point; + gravity: Phaser.Point; + bounce: Phaser.Point; + maxVelocity: Phaser.Point; + angularVelocity: number; + angularAcceleration: number; + angularDrag: number; + maxAngular: number; + mass: number; + quadTreeIDs: string[]; + quadTreeIndex: number; + allowCollision: BorderChoices; + touching: BorderChoices; + wasTouching: BorderChoices; + immovable: boolean; + moves: boolean; + rotation: number; + allowRotation: boolean; + allowGravity: boolean; + customSeparateX: boolean; + customSeparateY: boolean; + overlapX: number; + overlapY: number; + collideWorldBounds: boolean; + bottom: number; + right: number; + updateBounds(centerX: number, centerY: number, scaleX: number, scaleY: number): void; + update(): void; + postUpdate(): void; + checkWorldBounds(): void; + setSize(width: number, height: number, offsetX: number, offsetY: number): void; + reset(): void; + deltaAbsX(): number; + deltaAbsY(): number; + deltaX(): number; + deltaY(): number; + } + } + } + + class Particles { + constructor(game: Phaser.Game); + emitters: Object; + ID: number; + add(emitter: Phaser.Particles.Arcade.Emitter): Phaser.Particles.Arcade.Emitter; + remove(emitter: Phaser.Particles.Arcade.Emitter): void; + update(): void; + } + + module Particles { + module Arcade { + class Emitter { + constructor(game: Phaser.Game, x: number, y: number, maxParticles?: number); + name: string; + type: number; + x: number; + y: number; + width: number; + height: number; + minParticleSpeed: Phaser.Point; + maxParticleSpeed: Phaser.Point; + minParticleScale: number; + maxParticleScale: number; + minRotation: number; + maxRotation: number; + gravity: number; + particleClass: string; + particleDrag: Phaser.Point; + angularDrag: number; + frequency: number; + maxParticles: number; + lifespan: number; + bounce: Phaser.Point; + on: boolean; + exists: boolean; + emitX: number; + emitY: number; + alpha: number; + visible: boolean; + left: number; + top: number; + bottom: number; + right: number; + update(): void; + makeParticles(keys: string[], frames: string[], quantity: number, collide: boolean, collideWorldBounds: boolean): Phaser.Particles.Arcade.Emitter; + kill(): void; + revive(): void; + start(explode: boolean, lifespan: number, frequency: number, quantity: number): void; + emitParticle(): void; + setSize(width: number, height: number): void; + setXSpeed(min: number, max: number): void; + setYSpeed(min: number, max: number): void; + setRotation(min: number, max: number): void; + at(object: Object): void; + + } + } + } + + class Tilemap { + constructor(game: Phaser.Game, key: string, x: number, y: number, resizeWorld?: boolean, tileWidth?: number, tileHeight?: number); + game: Phaser.Game; + group: Phaser.Group; + name: string; + key: string; + renderOrderID: number; + collisionCallback: Function; + exists: boolean; + visible: boolean; + tiles: Array; + layers: Array; + position: Phaser.Point; + type: number; + renderer: Phaser.TilemapRenderer; + mapFormat: string; + widthInPixels: number; + heightInPixels: number; + static CSV: number; + static JSON: number; + parseCSV(data: string, key: string, tileWidth: number, tileHeight: number): void; + parseTiledJSON(json: string, key: string): void; + generateTiles(quantity: number): void; + setCollisionCallback(context: Object, callback: Function): void; + setCollisionRange(start: number, end: number, collision: number, resetCollisions?: boolean, separateX?: boolean, separateY?: boolean): void; + setCollisionByIndex(value: number[], collision: number, resetCollisions?: boolean, separateX?: boolean, separateY?: boolean): void; + getTileByIndex(value: number): Tile; + getTile(x: number, y: number, layer?: number): Tile; + getTileFromWorldXY(x: number, y: number, layer?: number): Tile; + getTileFromInputXY(layer?: number): Tile; + getTileOverlaps(object: Object): Array; + collide(objectOrGroup: any, callback: Function, context: Object): boolean; + collideGameObject(object: Object): boolean; + putTile(x: number, y: number, index: number, layer?: number): void; + update(): void; + destroy(): void; + } + + class TilemapLayer { + constructor(parent: Tilemap, id: number, key: string, mapFormat: number, name: string, tileWidth: number, tileHeight: number); + exists: boolean; + visible: boolean; + widthInTiles: number; + heightInTiles: number; + widthInPixels: number; + heightInPixels: number; + tileMargin: number; + tileSpacing: number; + parent: Tilemap; + game: Phaser.Game; + ID: number; + name: string; + key: string; + type: number; + mapFormat: number; + tileWidth: number; + tileHeight: number; + boundsInTiles: Phaser.Rectangle; + tileset: Object; + canvas: any; + context: any; + baseTexture: any; + texture: any; + sprite: Phaser.Sprite; + mapData: Array; + alpha: number; + putTileWorldXY(x: number, y: number, index: number): void; + putTile(x: number, y: number, index: number): void; + swapTile(tileA: number, tileB: number, x?: number, y?: number, width?: number, height?: number): void; + fillTile(index: number, x?: number, y?: number, width?: number, height?: number): void; + randomiseTiles(tiles: number[], x?: number, y?: number, width?: number, height?: number): void; + replaceTile(tileA: number, tileB: number, x?: number, y?: number, width?: number, height?: number): void; + getTileBlock(x: number, y: number, width: number, height: number): Array; + getTileFromWorldXY(x: number, y: number): Tile; + getTileOverlaps(object: Object): Array; + getTempBlock(x: number, y: number, width: number, height: number, collisionOnly?: boolean): void; + getTileIndex(x: number, y: number): number; + addColumn(column: string[]): void; + createCanvas(): void; + updateBounds(): void; + parseTileOffsets(): number; + } + + class Tile { + constructor(game: Phaser.Game, tilemap: Tilemap, index: number, width: number, height: number); + mass: number; + collideNone: boolean; + collideLeft: boolean; + collideRight: boolean; + collideUp: boolean; + collideDown: boolean; + separateX: boolean; + separateY: boolean; + game: Phaser.Game; + tilemap: Tilemap; + index: number; + width: number; + height: number; + destroy(): void; + setCollision(left: boolean, right: boolean, up: boolean, down: boolean, reset: boolean, seperateX: boolean, seperateY: boolean): void; + resetCollsion(): void; + toString(): string; + } + + class TilemapRenderer { + constructor(game: Phaser.Game); + game: Phaser.Game; + render(tilemap: Tilemap): void; + } +} \ No newline at end of file From 2921a6de2e25480174991228a4ccdaff06bbf91e Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 05:40:46 +0100 Subject: [PATCH 113/125] Pixel Perfect click detection now works even if the Sprite is part of a texture atlas. --- README.md | 6 +-- examples/_site/examples.json | 4 ++ examples/buttons/button scale.js | 7 ++- .../input/pixel perfect click detection.js | 4 +- examples/input/pixelpick - atlas.js | 52 +++++++++++++++++++ examples/input/pixelpick - spritesheet.js | 5 ++ src/core/Game.js | 1 + src/core/Stage.js | 30 +++++++++++ src/gameobjects/Sprite.js | 20 ++++--- src/input/InputHandler.js | 44 +++------------- src/utils/Debug.js | 28 +++++----- 11 files changed, 135 insertions(+), 66 deletions(-) create mode 100644 examples/input/pixelpick - atlas.js diff --git a/README.md b/README.md index 5c5cdd1d..49af09ee 100644 --- a/README.md +++ b/README.md @@ -151,13 +151,13 @@ Version 1.1 * Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height). * Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora). * Sprite.loadTexture now works correctly with static images, RenderTextures and Animations. - +* Lots of fixes within Sprite.bounds. The bounds is now correct regardless of rotation, anchor or scale of the Sprite or any of its parent objects. +* On a busy page it's possible for the game to boot with an incorrect stage offset x/y which can cause input events to be calculated wrong. A new property has been added to Stage to combat this issue: Stage.checkOffsetInterval. By default it will check the canvas offset every 2500ms and adjust it accordingly. You can set the value to 'false' to disable the check entirely, or set a higher or lower value. We recommend that you get the value quite low during your games preloader, but once the game has fully loaded hopefully the containing page will have settled down, so it's probably safe to disable the check entirely. +* Pixel Perfect click detection now works even if the Sprite is part of a texture atlas. Outstanding Tasks ----------------- -* BUG: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet. -* TODO: look at Sprite.crop (http://www.html5gamedevs.com/topic/1617-error-in-spritecrop/) * TODO: d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/) * TODO: more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/) * TODO: Sound.addMarker hh:mm:ss:ms diff --git a/examples/_site/examples.json b/examples/_site/examples.json index 29e2a3bb..88388bb0 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -320,6 +320,10 @@ "file": "pixel+perfect+click+detection.js", "title": "pixel perfect click detection" }, + { + "file": "pixelpick+-+atlas.js", + "title": "pixelpick - atlas" + }, { "file": "pixelpick+-+scrolling+effect.js", "title": "pixelpick - scrolling effect" diff --git a/examples/buttons/button scale.js b/examples/buttons/button scale.js index 8ab6715b..aa639e50 100644 --- a/examples/buttons/button scale.js +++ b/examples/buttons/button scale.js @@ -43,6 +43,8 @@ function create() { button3 = game.add.button(100, 300, 'button', changeSky, this, 2, 1, 0); button3.name = 'sky3'; button3.width = 300; + button3.anchor.setTo(0, 0.5); + // button3.angle = 0.1; // Scaled button button4 = game.add.button(300, 450, 'button', changeSky, this, 2, 1, 0); @@ -85,7 +87,8 @@ function render () { // game.debug.renderWorldTransformInfo(button1, 32, 132); // game.debug.renderText('sx: ' + button3.scale.x + ' sy: ' + button3.scale.y + ' w: ' + button3.width + ' cw: ' + button3._cache.width, 32, 20); - // game.debug.renderPoint(button2.input._tempPoint); - // game.debug.renderPoint(button6.input._tempPoint); + game.debug.renderText('ox: ' + game.stage.offset.x + ' oy: ' + game.stage.offset.y, 32, 20); + game.debug.renderPoint(button3.input._tempPoint); + game.debug.renderPoint(button6.input._tempPoint); } diff --git a/examples/input/pixel perfect click detection.js b/examples/input/pixel perfect click detection.js index 4246de80..70fcada7 100644 --- a/examples/input/pixel perfect click detection.js +++ b/examples/input/pixel perfect click detection.js @@ -37,11 +37,13 @@ function outSprite() { } function update() { - b.angle += 0.1; + b.angle += 0.05; } function render() { game.debug.renderSpriteInputInfo(b, 32, 32); + game.debug.renderSpriteCorners(b); + game.debug.renderPoint(b.input._tempPoint); } diff --git a/examples/input/pixelpick - atlas.js b/examples/input/pixelpick - atlas.js new file mode 100644 index 00000000..eef6172a --- /dev/null +++ b/examples/input/pixelpick - atlas.js @@ -0,0 +1,52 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + game.load.atlas('atlas', 'assets/pics/texturepacker_test.png', 'assets/pics/texturepacker_test.json'); + +} + +var chick; +var car; +var mech; +var robot; +var cop; + +function create() { + + game.stage.backgroundColor = '#404040'; + + // This demonstrates pixel perfect click detection even if using sprites in a texture atlas. + + chick = game.add.sprite(64, 64, 'atlas'); + chick.frameName = 'budbrain_chick.png'; + chick.inputEnabled = true; + chick.input.pixelPerfect = true; + chick.input.useHandCursor = true; + + cop = game.add.sprite(600, 64, 'atlas'); + cop.frameName = 'ladycop.png'; + cop.inputEnabled = true; + cop.input.pixelPerfect = true; + cop.input.useHandCursor = true; + + robot = game.add.sprite(50, 300, 'atlas'); + robot.frameName = 'robot.png'; + robot.inputEnabled = true; + robot.input.pixelPerfect = true; + robot.input.useHandCursor = true; + + car = game.add.sprite(100, 400, 'atlas'); + car.frameName = 'supercars_parsec.png'; + car.inputEnabled = true; + car.input.pixelPerfect = true; + car.input.useHandCursor = true; + + mech = game.add.sprite(250, 100, 'atlas'); + mech.frameName = 'titan_mech.png'; + mech.inputEnabled = true; + mech.input.pixelPerfect = true; + mech.input.useHandCursor = true; + +} diff --git a/examples/input/pixelpick - spritesheet.js b/examples/input/pixelpick - spritesheet.js index f0692822..d798775a 100644 --- a/examples/input/pixelpick - spritesheet.js +++ b/examples/input/pixelpick - spritesheet.js @@ -11,7 +11,10 @@ var b; function create() { + Phaser.Canvas.setSmoothingEnabled(game.context, false); + b = game.add.sprite(game.world.centerX, game.world.centerY, 'mummy'); + b.anchor.setTo(0.5, 0.5); b.scale.setTo(6, 6); b.animations.add('walk'); @@ -42,5 +45,7 @@ function outSprite() { function render() { game.debug.renderSpriteInputInfo(b, 32, 32); + game.debug.renderSpriteCorners(b); + game.debug.renderPoint(b.input._tempPoint); } diff --git a/src/core/Game.js b/src/core/Game.js index 02b40049..73fd060a 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -400,6 +400,7 @@ Phaser.Game.prototype = { this.plugins.preUpdate(); this.physics.preUpdate(); + this.stage.update(); this.input.update(); this.tweens.update(); this.sound.update(); diff --git a/src/core/Stage.js b/src/core/Stage.js index 76133cbb..50499321 100644 --- a/src/core/Stage.js +++ b/src/core/Stage.js @@ -61,6 +61,18 @@ Phaser.Stage = function (game, width, height) { */ this.aspectRatio = width / height; + /** + * @property {number} _nextOffsetCheck - The time to run the next offset check. + * @private + */ + this._nextOffsetCheck = 0; + + /** + * @property {number|false} checkOffsetInterval - The time (in ms) between which the stage should check to see if it has moved. + * @default + */ + this.checkOffsetInterval = 2500; + }; Phaser.Stage.prototype = { @@ -93,6 +105,24 @@ Phaser.Stage.prototype = { window.onblur = this._onChange; window.onfocus = this._onChange; + }, + + /** + * Runs Stage processes that need periodic updates, such as the offset checks. + * @method Phaser.Stage#update + */ + update: function () { + + if (this.checkOffsetInterval !== false) + { + if (this.game.time.now > this._nextOffsetCheck) + { + Phaser.Canvas.getOffset(this.canvas, this.offset); + this._nextOffsetCheck = this.game.time.now + this.checkOffsetInterval; + } + + } + }, /** diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 3b261715..0a45b074 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -392,6 +392,7 @@ Phaser.Sprite.prototype.updateCache = function() { if (this.worldTransform[1] != this._cache.i01 || this.worldTransform[3] != this._cache.i10) { + console.log('updateCache wt', this.name); this._cache.a00 = this.worldTransform[0]; // scaleX a this._cache.a01 = this.worldTransform[1]; // skewY c this._cache.a10 = this.worldTransform[3]; // skewX b @@ -430,13 +431,8 @@ Phaser.Sprite.prototype.updateAnimation = function() { if (this._cache.dirty && this.currentFrame) { - console.log('ua frame 2 change', this.name); - // this._cache.width = Math.floor(this.currentFrame.sourceSizeW * this._cache.scaleX); - // this._cache.height = Math.floor(this.currentFrame.sourceSizeH * this._cache.scaleY); this._cache.width = this.currentFrame.width; this._cache.height = this.currentFrame.height; - // this._cache.width = Math.floor(this.currentFrame.sourceSizeW); - // this._cache.height = Math.floor(this.currentFrame.sourceSizeH); this._cache.halfWidth = Math.floor(this._cache.width / 2); this._cache.halfHeight = Math.floor(this._cache.height / 2); @@ -540,14 +536,16 @@ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) { * @param {number} y - Description. * @return {Description} Description. */ -Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { +Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, gx, gy) { - p.x = this._cache.a11 * this._cache.idi * x + -this._cache.i01 * this._cache.idi * y + (this._cache.a12 * this._cache.i01 - this._cache.a02 * this._cache.a11) * this._cache.idi; - p.y = this._cache.a00 * this._cache.idi * y + -this._cache.i10 * this._cache.idi * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.i10) * this._cache.idi; + var a00 = this.worldTransform[0], a01 = this.worldTransform[1], a02 = this.worldTransform[2], + a10 = this.worldTransform[3], a11 = this.worldTransform[4], a12 = this.worldTransform[5], + id = 1 / (a00 * a11 + a01 * -a10), + x = a11 * id * gx + -a01 * id * gy + (a12 * a01 - a02 * a11) * id, + y = a00 * id * gy + -a10 * id * gx + (-a12 * a00 + a02 * a10) * id; - // apply anchor - p.x += (this.anchor.x * this._cache.width); - p.y += (this.anchor.y * this._cache.height); + p.x = x + (this.anchor.x * this._cache.width); + p.y = y + (this.anchor.y * this._cache.height); return p; diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index fe90ba7c..38a3d865 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -484,47 +484,19 @@ Phaser.InputHandler.prototype = { { this.sprite.getLocalUnmodifiedPosition(this._tempPoint, pointer.x, pointer.y); - // The unmodified position is being offset by the anchor, i.e. into negative space - - // var x = this.sprite.anchor.x * this.sprite.width; - // var y = this.sprite.anchor.y * this.sprite.height; - var x = 0; - var y = 0; - - // check world transform - if (this.sprite.worldTransform[3] == 0 && this.sprite.worldTransform[1] == 0) + if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height) { - // Un-rotated (but potentially scaled) - if (this._tempPoint.x >= x && this._tempPoint.x <= this.sprite.width && this._tempPoint.y >= y && this._tempPoint.y <= this.sprite.height) + if (this.pixelPerfect) { - return true; + return this.checkPixel(this._tempPoint.x, this._tempPoint.y); } - } - else - { - // Rotated (and could be scaled too) - if (this._tempPoint.x >= x && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= y && this._tempPoint.y <= this.sprite.currentFrame.height) + else { return true; } } } - // if (this.pixelPerfect) - // { - // return this.checkPixel(this._tempPoint.x, this._tempPoint.y); - // } - // else - // { - // return true; - // } - // } - // } - - // } - - // } - return false; }, @@ -538,16 +510,16 @@ Phaser.InputHandler.prototype = { */ checkPixel: function (x, y) { - x += (this.sprite.texture.frame.width * this.sprite.anchor.x); - y += (this.sprite.texture.frame.height * this.sprite.anchor.y); - // Grab a pixel from our image into the hitCanvas and then test it - if (this.sprite.texture.baseTexture.source) { this.game.input.hitContext.clearRect(0, 0, 1, 1); // This will fail if the image is part of a texture atlas - need to modify the x/y values here + + x += this.sprite.texture.frame.x; + y += this.sprite.texture.frame.y; + this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source, x, y, 1, 1, 0, 0, 1, 1); var rgb = this.game.input.hitContext.getImageData(0, 0, 1, 1); diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 30122ee2..f959530b 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -206,25 +206,27 @@ Phaser.Utils.Debug.prototype = { if (showBounds) { - this.context.strokeStyle = 'rgba(255,0,0,1)'; + this.context.beginPath(); + this.context.strokeStyle = 'rgba(0, 255, 0, 0.7)'; this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height); + this.context.closePath(); this.context.stroke(); } - // this.context.beginPath(); - // this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y); - // this.context.lineTo(sprite.topRight.x, sprite.topRight.y); - // this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y); - // this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y); - // this.context.closePath(); - // this.context.strokeStyle = 'rgba(255,0,0,1)'; - // this.context.stroke(); + this.context.beginPath(); + this.context.moveTo(sprite.topLeft.x, sprite.topLeft.y); + this.context.lineTo(sprite.topRight.x, sprite.topRight.y); + this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y); + this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y); + this.context.closePath(); + this.context.strokeStyle = 'rgba(255, 0, 255, 0.7)'; + this.context.stroke(); this.renderPoint(sprite.center); - this.renderPoint(sprite.topLeft, 'rgb(255,255,0)'); - this.renderPoint(sprite.topRight, 'rgb(255,0,0)'); - this.renderPoint(sprite.bottomLeft, 'rgb(0,0,255)'); - this.renderPoint(sprite.bottomRight, 'rgb(255,255,255)'); + this.renderPoint(sprite.topLeft); + this.renderPoint(sprite.topRight); + this.renderPoint(sprite.bottomLeft); + this.renderPoint(sprite.bottomRight); if (showText) { From d8a2b9d2af02e1eb8f17de26bf58fabc61c334c0 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 05:43:10 +0100 Subject: [PATCH 114/125] Removed console.log --- src/gameobjects/Sprite.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index 0a45b074..e3ffa14c 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -392,7 +392,6 @@ Phaser.Sprite.prototype.updateCache = function() { if (this.worldTransform[1] != this._cache.i01 || this.worldTransform[3] != this._cache.i10) { - console.log('updateCache wt', this.name); this._cache.a00 = this.worldTransform[0]; // scaleX a this._cache.a01 = this.worldTransform[1]; // skewY c this._cache.a10 = this.worldTransform[3]; // skewX b From 2659ed7a4a4a3fbf340b7cfe8b25eac13e6e2209 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 06:01:18 +0100 Subject: [PATCH 115/125] Updated readme. --- README.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 49af09ee..e9241f63 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Phaser 1.1 Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) internally for fast 2D Canvas and WebGL rendering. -Version: 1.1 - Released: October 24th 2013 +Version: 1.1 - Released: October 25th 2013 By Richard Davey, [Photon Storm](http://www.photonstorm.com) @@ -42,8 +42,8 @@ Version 1.1 * JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. * Brand new Example system (no more php!) and over 150 examples to learn from too. -* New TypeScript definitions file generated (in the build folder). -* New Grunt based build system added for those that prefer Grunt over php (thanks to Florent Cailhol) +* New TypeScript definitions file generated (in the build folder - thanks to TomTom1229 for manually enhancing this). +* New Grunt based build system added (thanks to Florent Cailhol) * Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. * Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. @@ -244,22 +244,23 @@ Although Phaser 1.0 is a brand new release it is born from years of experience b ![Phaser Particles](http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_particles.png) -Future Plans ------------- +Road Map +-------- -The following list is not exhaustive and is subject to change: +The 1.1 release was a massive under-taking, but we're really happy with how Phaser is progressing. It's becoming more solid and versatile with each iteration. Here is what's on our road map for future versions: -* Integrate Advanced Physics system. -* Integrate Advanced Particle system. -* Better sound controls and audio effects. -* Google Play Game Services. -* Ability to layer another DOM object and have it controlled by the game. -* More GUI components: checkbox, radio button, window, etc. -* Tilemap: more advanced Tiled support and support for DAME tilemaps. -* Joypad support. -* Gestures input class. -* Flash CC html output support. -* Game parameters read from Google Docs. +* Integration with an advanced physics system. We've been experimenting with p2.js but have yet to conclude our research. +* A more advanced Particle system, one that can render to a single canvas (rather than spawn hundreds of Sprites), more advanced effects, etc. +* Massively enhance the audio side of Phaser. Although it does what it does well, it could do with taking more advantage of Web Audio - echo effects, positional sound, etc. +* Comprehensive testing across Firefox OS devices, CocoonJS and Ejecta. +* Integration with third party services like Google Play Game Services and Amazon JS SDK. +* Ability to control DOM elements from the core game and layer them into the game. +* Touch Gestures. +* Virtual d-pad support and also support for the Joypad API. +* Test out packaging with Node-webkit. +* Flash CC HTML5 export integration. +* Game parameters stored in Google Docs. +* More advanced tile map features. Better support for advanced Tiled features and also I want to add full support for DAME tilemaps. Learn By Example ---------------- From 35517d94ad865694f21f0aaed663b67afaf084bb Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 25 Oct 2013 14:31:25 +0100 Subject: [PATCH 116/125] Just to test if smartGit works again --- src/gameobjects/GameObjectFactory.js | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 3095d1d7..dbd996a1 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -58,7 +58,7 @@ Phaser.GameObjectFactory.prototype = { * @method sprite * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. - * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture. + * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. * @returns {Description} Description. */ @@ -90,7 +90,7 @@ Phaser.GameObjectFactory.prototype = { * * @method tween * @param {object} obj - Object the tween will be run on. - * @return {Description} Description. + * @return {Phaser.Tween} Description. */ tween: function (obj) { @@ -99,12 +99,12 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new group to be added on the display list * * @method group * @param {Description} parent - Description. * @param {Description} name - Description. - * @return {Description} Description. + * @return {Phaser.Group} The newly created group. */ group: function (parent, name) { @@ -116,10 +116,10 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method audio - * @param {Description} key - Description. - * @param {Description} volume - Description. - * @param {Description} loop - Description. - * @return {Description} Description. + * @param {string} key - The Game.cache key of the sound that this object will use. + * @param {number} volume - The volume at which the sound will be played. + * @param {boolean} loop - Whether or not the sound will loop. + * @return {Phaser.Audio} The audio object. */ audio: function (key, volume, loop) { @@ -131,11 +131,11 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method tileSprite - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} width - Description. - * @param {Description} height - Description. - * @param {Description} key - Description. + * @param {number} x - X position of the new tileSprite. + * @param {number} y - Y position of the new tileSprite. + * @param {Description} width - the width of the tilesprite. + * @param {Description} height - the height of the tilesprite. + * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. * @param {Description} frame - Description. * @return {Description} Description. */ @@ -149,10 +149,10 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method text - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} text - Description. - * @param {Description} style - Description. + * @param {number} x - X position of the new text object. + * @param {number} y - Y position of the new text object. + * @param {string} text - The actual text that will be written. + * @param {object} style - The style object containing style attributes like font, font size , etc. */ text: function (x, y, text, style) { From a08436abc39752294c3f43b899059982d2b2b189 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 15:02:21 +0100 Subject: [PATCH 117/125] Final Sprite documentation added. --- .gitignore | 2 + src/gameobjects/Sprite.js | 338 ++++++++++++++++++++++++++------------ 2 files changed, 236 insertions(+), 104 deletions(-) diff --git a/.gitignore b/.gitignore index e3173cf0..4b7085e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ # System and IDE files +Thumbs.db .DS_Store .idea Phaser OSX.sublime-project Phaser OSX.sublime-workspace Phaser.sublime-project Phaser.sublime-workspace +*.suo # Vendors node_modules/ diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index e3ffa14c..b83ddffe 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -2,19 +2,21 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Sprite */ /** -* Create a new Sprite. +* Create a new Sprite object. Sprites are the lifeblood of your game, used for nearly everything visual. +* At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. +* They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), +* events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases. +* * @class Phaser.Sprite -* @classdesc Description of class. * @constructor -* @param {Phaser.Game} game - Current game instance. -* @param {Description} x - Description. -* @param {Description} y - Description. -* @param {string} key - Description. -* @param {Description} frame - Description. +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {number} x - The x coordinate (in world space) to position the Sprite at. +* @param {number} y - The y coordinate (in world space) to position the Sprite at. +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ Phaser.Sprite = function (game, x, y, key, frame) { @@ -41,8 +43,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.alive = true; /** - * @property {Description} group - Description. - * @default + * @property {Phaser.Group} group - The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent. */ this.group = null; @@ -53,12 +54,13 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.name = ''; /** - * @property {Description} type - Description. + * @property {number} type - The const type of this object. + * @default */ this.type = Phaser.SPRITE; /** - * @property {number} renderOrderID - Description. + * @property {number} renderOrderID - Used by the Renderer and Input Manager to control picking order. * @default */ this.renderOrderID = -1; @@ -72,12 +74,12 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.lifespan = 0; /** - * @property {Events} events - The Signals you can subscribe to that are dispatched when certain things happen on this Sprite or its components + * @property {Events} events - The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components. */ this.events = new Phaser.Events(this); /** - * @property {Phaser.AnimationManager} animations - This manages animations of the sprite. You can modify animations through it. (see Phaser.AnimationManager) + * @property {Phaser.AnimationManager} animations - This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager) */ this.animations = new Phaser.AnimationManager(this); @@ -87,10 +89,15 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.input = new Phaser.InputHandler(this); /** - * @property {Description} key - Description. + * @property {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. */ this.key = key; + /** + * @property {Phaser.Frame} currentFrame - A reference to the currently displayed frame. + */ + this.currentFrame = null; + if (key instanceof Phaser.RenderTexture) { PIXI.Sprite.call(this, key); @@ -146,26 +153,21 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.anchor = new Phaser.Point(); /** - * @property {number} x - Description. + * @property {number} x - The x coordinate (in world space) of this Sprite. */ this.x = x; /** - * @property {number} y - Description. + * @property {number} y - The y coordinate (in world space) of this Sprite. */ this.y = y; - /** - * @property {Description} position - Description. - */ this.position.x = x; this.position.y = y; /** * Should this Sprite be automatically culled if out of range of the camera? - * A culled sprite has its visible property set to 'false'. - * Note that this check doesn't look at this Sprites children, which may still be in camera range. - * So you should set autoCull to false if the Sprite will have children likely to still be in camera range. + * A culled sprite has its renderable property set to 'false'. * * @property {boolean} autoCull * @default @@ -173,7 +175,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.autoCull = false; /** - * @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one. + * @property {Phaser.Point} scale - The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc. */ this.scale = new Phaser.Point(1, 1); @@ -227,42 +229,45 @@ Phaser.Sprite = function (game, x, y, key, frame) { }; /** - * @property {Phaser.Point} offset - Corner point defaults. + * @property {Phaser.Point} offset - Corner point defaults. Should not typically be modified. */ this.offset = new Phaser.Point; /** - * @property {Phaser.Point} center - Description. + * @property {Phaser.Point} center - A Point containing the center coordinate of the Sprite. Takes rotation and scale into account. */ this.center = new Phaser.Point(x + Math.floor(this._cache.width / 2), y + Math.floor(this._cache.height / 2)); /** - * @property {Phaser.Point} topLeft - Description. + * @property {Phaser.Point} topLeft - A Point containing the top left coordinate of the Sprite. Takes rotation and scale into account. */ this.topLeft = new Phaser.Point(x, y); /** - * @property {Phaser.Point} topRight - Description. + * @property {Phaser.Point} topRight - A Point containing the top right coordinate of the Sprite. Takes rotation and scale into account. */ this.topRight = new Phaser.Point(x + this._cache.width, y); /** - * @property {Phaser.Point} bottomRight - Description. + * @property {Phaser.Point} bottomRight - A Point containing the bottom right coordinate of the Sprite. Takes rotation and scale into account. */ this.bottomRight = new Phaser.Point(x + this._cache.width, y + this._cache.height); /** - * @property {Phaser.Point} bottomLeft - Description. + * @property {Phaser.Point} bottomLeft - A Point containing the bottom left coordinate of the Sprite. Takes rotation and scale into account. */ this.bottomLeft = new Phaser.Point(x, y + this._cache.height); /** - * @property {Phaser.Rectangle} bounds - Description. + * This Rectangle object fully encompasses the Sprite and is updated in real-time. + * The bounds is the full bounding area after rotation and scale have been taken into account. It should not be modified directly. + * It's used for Camera culling and physics body alignment. + * @property {Phaser.Rectangle} bounds */ this.bounds = new Phaser.Rectangle(x, y, this._cache.width, this._cache.height); /** - * @property {Phaser.Physics.Arcade.Body} body - Set-up the physics body. + * @property {Phaser.Physics.Arcade.Body} body - By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates. */ this.body = new Phaser.Physics.Arcade.Body(this); @@ -272,24 +277,24 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.health = 1; /** - * @property {Description} inWorld - World bounds check. + * @property {boolean} inWorld - This value is set to true if the Sprite is positioned within the World, otherwise false. */ this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds); /** - * @property {number} inWorldThreshold - World bounds check. + * @property {number} inWorldThreshold - A threshold value applied to the inWorld check. If you don't want a Sprite to be considered "out of the world" until at least 100px away for example then set it to 100. * @default */ this.inWorldThreshold = 0; /** - * @property {boolean} outOfBoundsKill - Kills this sprite as soon as it goes outside of the World bounds. + * @property {boolean} outOfBoundsKill - If true the Sprite is killed as soon as Sprite.inWorld is false. * @default */ this.outOfBoundsKill = false; /** - * @property {boolean} _outOfBoundsFired - Description. + * @property {boolean} _outOfBoundsFired - Internal flag. * @private * @default */ @@ -302,7 +307,18 @@ Phaser.Sprite = function (game, x, y, key, frame) { */ this.fixedToCamera = false; + /** + * You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide. + * The crop is only applied if you have set Sprite.cropEnabled to true. + * @property {Phaser.Rectangle} crop + * @default + */ this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); + + /** + * @property {boolean} cropEnabled - If true the Sprite.crop property is used to crop the texture before render. Set to false to disable. + * @default + */ this.cropEnabled = false; }; @@ -312,8 +328,10 @@ Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype); Phaser.Sprite.prototype.constructor = Phaser.Sprite; /** -* Automatically called by World.preUpdate. You can create your own update in Objects that extend Phaser.Sprite. -* @method Phaser.Sprite.prototype.preUpdate +* Automatically called by World.preUpdate. Handles cache updates, lifespan checks, animation updates and physics updates. +* +* @method Phaser.Sprite#preUpdate +* @memberof Phaser.Sprite */ Phaser.Sprite.prototype.preUpdate = function() { @@ -384,6 +402,12 @@ Phaser.Sprite.prototype.preUpdate = function() { } +/** +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateCache +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.updateCache = function() { // |a c tx| @@ -418,6 +442,12 @@ Phaser.Sprite.prototype.updateCache = function() { } +/** +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateAnimation +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.updateAnimation = function() { if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID) @@ -442,9 +472,10 @@ Phaser.Sprite.prototype.updateAnimation = function() { } /** -* Description. -* -* @method Phaser.Sprite.prototype.updateBounds +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateBounds +* @memberof Phaser.Sprite */ Phaser.Sprite.prototype.updateBounds = function() { @@ -509,13 +540,17 @@ Phaser.Sprite.prototype.updateBounds = function() { } /** -* Description. +* Gets the local position of a coordinate relative to the Sprite, factoring in rotation and scale. +* Mostly only used internally. * -* @method Phaser.Sprite.prototype.getLocalPosition -* @param {Description} p - Description. -* @param {number} x - Description. -* @param {number} y - Description. -* @return {Description} Description. +* @method Phaser.Sprite#getLocalPosition +* @memberof Phaser.Sprite +* @param {Phaser.Point} p - The Point object to store the results in. +* @param {number} x - x coordinate within the Sprite to translate. +* @param {number} y - x coordinate within the Sprite to translate. +* @param {number} sx - Scale factor to be applied. +* @param {number} sy - Scale factor to be applied. +* @return {Phaser.Point} The translated point. */ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) { @@ -527,13 +562,15 @@ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) { } /** -* Description. +* Gets the local unmodified position of a coordinate relative to the Sprite, factoring in rotation and scale. +* Mostly only used internally by the Input Manager, but also useful for custom hit detection. * -* @method Phaser.Sprite.prototype.getLocalUnmodifiedPosition -* @param {Description} p - Description. -* @param {number} x - Description. -* @param {number} y - Description. -* @return {Description} Description. +* @method Phaser.Sprite#getLocalUnmodifiedPosition +* @memberof Phaser.Sprite +* @param {Phaser.Point} p - The Point object to store the results in. +* @param {number} x - x coordinate within the Sprite to translate. +* @param {number} y - x coordinate within the Sprite to translate. +* @return {Phaser.Point} The translated point. */ Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, gx, gy) { @@ -550,6 +587,12 @@ Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, gx, gy) { } +/** +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateCrop +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.updateCrop = function() { // This only runs if crop is enabled @@ -573,6 +616,12 @@ Phaser.Sprite.prototype.updateCrop = function() { } +/** +* Resets the Sprite.crop value back to the frame dimensions. +* +* @method Phaser.Sprite#resetCrop +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.resetCrop = function() { this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); @@ -581,6 +630,12 @@ Phaser.Sprite.prototype.resetCrop = function() { } +/** +* Internal function called by the World postUpdate cycle. +* +* @method Phaser.Sprite#postUpdate +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.postUpdate = function() { if (this.exists) @@ -611,6 +666,15 @@ Phaser.Sprite.prototype.postUpdate = function() { } +/** +* Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. +* This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game. +* +* @method Phaser.Sprite#loadTexture +* @memberof Phaser.Sprite +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. +*/ Phaser.Sprite.prototype.loadTexture = function (key, frame) { this.key = key; @@ -656,41 +720,77 @@ Phaser.Sprite.prototype.loadTexture = function (key, frame) { } +/** +* Returns the absolute delta x value. +* +* @method Phaser.Sprite#deltaAbsX +* @memberof Phaser.Sprite +* @return {number} The absolute delta value. +*/ Phaser.Sprite.prototype.deltaAbsX = function () { return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); } +/** +* Returns the absolute delta y value. +* +* @method Phaser.Sprite#deltaAbsY +* @memberof Phaser.Sprite +* @return {number} The absolute delta value. +*/ Phaser.Sprite.prototype.deltaAbsY = function () { return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); } +/** +* Returns the delta x value. +* +* @method Phaser.Sprite#deltaX +* @memberof Phaser.Sprite +* @return {number} The delta value. +*/ Phaser.Sprite.prototype.deltaX = function () { return this.x - this.prevX; } +/** +* Returns the delta y value. +* +* @method Phaser.Sprite#deltaY +* @memberof Phaser.Sprite +* @return {number} The delta value. +*/ Phaser.Sprite.prototype.deltaY = function () { return this.y - this.prevY; } /** * Moves the sprite so its center is located on the given x and y coordinates. -* Doesn't change the origin of the sprite. +* Doesn't change the anchor point of the sprite. * -* @method Phaser.Sprite.prototype.centerOn -* @param {number} x - Description. -* @param {number} y - Description. +* @method Phaser.Sprite#centerOn +* @memberof Phaser.Sprite +* @param {number} x - The x coordinate (in world space) to position the Sprite at. +* @param {number} y - The y coordinate (in world space) to position the Sprite at. +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.centerOn = function(x, y) { this.x = x + (this.x - this.center.x); this.y = y + (this.y - this.center.y); + return this; } /** -* Description. +* Brings a 'dead' Sprite back to life, optionally giving it the health value specified. +* A resurrected Sprite has its alive, exists and visible properties all set to true. +* It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal. * -* @method Phaser.Sprite.prototype.revive +* @method Phaser.Sprite#revive +* @memberof Phaser.Sprite +* @param {number} [health=1] - The health to give the Sprite. +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.revive = function(health) { @@ -701,14 +801,24 @@ Phaser.Sprite.prototype.revive = function(health) { this.visible = true; this.health = health; - this.events.onRevived.dispatch(this); + if (this.events) + { + this.events.onRevived.dispatch(this); + } + + return this; } /** -* Description. +* Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false. +* It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal. +* Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory. +* If you don't need this Sprite any more you should call Sprite.destroy instead. * -* @method Phaser.Sprite.prototype.kill +* @method Phaser.Sprite#kill +* @memberof Phaser.Sprite +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.kill = function() { @@ -721,12 +831,16 @@ Phaser.Sprite.prototype.kill = function() { this.events.onKilled.dispatch(this); } + return this; + } /** -* Description. +* Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present +* and nulls its reference to game, freeing it up for garbage collection. * -* @method Phaser.Sprite.prototype.destroy +* @method Phaser.Sprite#destroy +* @memberof Phaser.Sprite */ Phaser.Sprite.prototype.destroy = function() { @@ -759,9 +873,13 @@ Phaser.Sprite.prototype.destroy = function() { } /** -* Description. +* Damages the Sprite, this removes the given amount from the Sprites health property. +* If health is then taken below zero Sprite.kill is called. * -* @method Phaser.Sprite.prototype.kill +* @method Phaser.Sprite#damage +* @memberof Phaser.Sprite +* @param {number} amount - The amount to subtract from the Sprite.health value. +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.damage = function(amount) { @@ -775,12 +893,21 @@ Phaser.Sprite.prototype.damage = function(amount) { } } + return this; + } /** -* Description. +* Resets the Sprite. This places the Sprite at the given x/y world coordinates and then +* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. +* If the Sprite has a physics body that too is reset. * -* @method Phaser.Sprite.prototype.reset +* @method Phaser.Sprite#reset +* @memberof Phaser.Sprite +* @param {number} x - The x coordinate (in world space) to position the Sprite at. +* @param {number} y - The y coordinate (in world space) to position the Sprite at. +* @param {number} [health=1] - The health to give the Sprite. +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.reset = function(x, y, health) { @@ -802,13 +929,18 @@ Phaser.Sprite.prototype.reset = function(x, y, health) { { this.body.reset(); } + + return this; } /** -* Description. +* Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only +* bought to the top of that Group, not the entire display list. * -* @method Phaser.Sprite.prototype.bringToTop +* @method Phaser.Sprite#bringToTop +* @memberof Phaser.Sprite +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.bringToTop = function() { @@ -821,16 +953,19 @@ Phaser.Sprite.prototype.bringToTop = function() { this.game.world.bringToTop(this); } + return this; + } /** * Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * -* @method play -* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". -* @param {number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. -* @param {boolean} [loop=false] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. +* @method Phaser.Sprite#play +* @memberof Phaser.Sprite +* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump". +* @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {boolean} [loop=false] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. * @param {boolean} [killOnComplete=false] - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. * @return {Phaser.Animation} A reference to playing Animation instance. */ @@ -838,7 +973,7 @@ Phaser.Sprite.prototype.play = function (name, frameRate, loop, killOnComplete) if (this.animations) { - this.animations.play(name, frameRate, loop, killOnComplete); + return this.animations.play(name, frameRate, loop, killOnComplete); } } @@ -863,11 +998,8 @@ Object.defineProperty(Phaser.Sprite.prototype, 'angle', { }); /** -* Get the animation frame number. -* @returns {Description} -*//** -* Set the animation frame by frame number. -* @param {Description} value - Description +* @name Phaser.Sprite#frame +* @property {number} frame - Gets or sets the current frame index and updates the Texture Cache for display. */ Object.defineProperty(Phaser.Sprite.prototype, "frame", { @@ -882,11 +1014,8 @@ Object.defineProperty(Phaser.Sprite.prototype, "frame", { }); /** -* Get the animation frame name. -* @returns {Description} -*//** -* Set the animation frame by frame name. -* @param {Description} value - Description +* @name Phaser.Sprite#frameName +* @property {string} frameName - Gets or sets the current frame name and updates the Texture Cache for display. */ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { @@ -901,8 +1030,9 @@ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { }); /** -* Is this sprite visible to the camera or not? -* @returns {boolean} +* @name Phaser.Sprite#inCamera +* @property {boolean} inCamera - Is this sprite visible to the camera or not? +* @readonly */ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { @@ -913,12 +1043,12 @@ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { }); /** - * The width of the sprite, setting this will actually modify the scale to acheive the value set. - * If you wish to crop the Sprite instead see the Sprite.crop value. - * - * @property width - * @type Number - */ +* The width of the sprite in pixels, setting this will actually modify the scale to acheive the value desired. +* If you wish to crop the Sprite instead see the Sprite.crop value. +* +* @name Phaser.Sprite#width +* @property {number} width - The width of the Sprite in pixels. +*/ Object.defineProperty(Phaser.Sprite.prototype, 'width', { get: function() { @@ -936,12 +1066,12 @@ Object.defineProperty(Phaser.Sprite.prototype, 'width', { }); /** - * The height of the sprite, setting this will actually modify the scale to acheive the value set - * If you wish to crop the Sprite instead see the Sprite.crop value. - * - * @property height - * @type Number - */ +* The height of the sprite in pixels, setting this will actually modify the scale to acheive the value desired. +* If you wish to crop the Sprite instead see the Sprite.crop value. +* +* @name Phaser.Sprite#height +* @property {number} height - The height of the Sprite in pixels. +*/ Object.defineProperty(Phaser.Sprite.prototype, 'height', { get: function() { @@ -959,11 +1089,11 @@ Object.defineProperty(Phaser.Sprite.prototype, 'height', { }); /** -* Get the input enabled state of this Sprite. -* @returns {Description} -*//** -* Set the ability for this sprite to receive input events. -* @param {Description} value - Description +* By default a Sprite won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is +* activated for this Sprite instance and it will then start to process click/touch events and more. +* +* @name Phaser.Sprite#inputEnabled +* @property {boolean} inputEnabled - Set to true to allow this Sprite to receive input events, otherwise false. */ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", { From ce04ade45843f6b7ccce256ebb73de30ade4d206 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 25 Oct 2013 15:22:45 +0100 Subject: [PATCH 118/125] Lots of JSDocs updates in the gameobjects folder --- src/gameobjects/BitmapText.js | 9 ++- src/gameobjects/Bullet.js | 10 ++- src/gameobjects/Button.js | 1 - src/gameobjects/Events.js | 1 - src/gameobjects/GameObjectFactory.js | 97 ++++++++++++++-------------- src/gameobjects/Graphics.js | 5 +- src/gameobjects/RenderTexture.js | 14 ++-- src/gameobjects/Text.js | 10 ++- src/gameobjects/TileSprite.js | 14 ++-- 9 files changed, 74 insertions(+), 87 deletions(-) diff --git a/src/gameobjects/BitmapText.js b/src/gameobjects/BitmapText.js index 77fb274a..4558a411 100644 --- a/src/gameobjects/BitmapText.js +++ b/src/gameobjects/BitmapText.js @@ -2,7 +2,6 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.BitmapText */ /** @@ -12,10 +11,10 @@ * @class Phaser.BitmapText * @constructor * @param {Phaser.Game} game - A reference to the currently running game. -* @param {number} x - X position of Description. -* @param {number} y - Y position of Description. -* @param {string} text - Description. -* @param {string} style - Description. +* @param {number} x - X position of the new bitmapText object. +* @param {number} y - Y position of the new bitmapText object. +* @param {string} text - The actual text that will be written. +* @param {object} style - The style object containing style attributes like font, font size , etc. */ Phaser.BitmapText = function (game, x, y, text, style) { diff --git a/src/gameobjects/Bullet.js b/src/gameobjects/Bullet.js index 4c131a3b..d5a491d7 100644 --- a/src/gameobjects/Bullet.js +++ b/src/gameobjects/Bullet.js @@ -2,7 +2,6 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Bullet */ /** @@ -15,13 +14,12 @@ * animation, all input events, crop support, health/damage, loadTexture * * @class Phaser.Bullet -* @classdesc Description of class. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {Description} x - Description. -* @param {Description} y - Description. -* @param {string} key - Description. -* @param {Description} frame - Description. +* @param {number} x - X position of the new bullet. +* @param {number} y - Y position of the new bullet. +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ Phaser.Bullet = function (game, x, y, key, frame) { diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 2b1832da..63bceb82 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -2,7 +2,6 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Button */ diff --git a/src/gameobjects/Events.js b/src/gameobjects/Events.js index 1cd1b9e9..73fe1abd 100644 --- a/src/gameobjects/Events.js +++ b/src/gameobjects/Events.js @@ -2,7 +2,6 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Events */ diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index dbd996a1..e86c3b1d 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -2,7 +2,6 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.GameObjectFactory */ /** @@ -43,8 +42,8 @@ Phaser.GameObjectFactory.prototype = { /** * Description. * @method existing. - * @param {object} - Description. - * @return {boolean} Description. + * @param {*} object - An instance of Phaser.Sprite, Phaser.Button or any other display object.. + * @return {*} The child that was added to the Group. */ existing: function (object) { @@ -60,7 +59,7 @@ Phaser.GameObjectFactory.prototype = { * @param {number} y - Y position of the new sprite. * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @returns {Description} Description. + * @returns {Phaser.Sprite} the newly created sprite object. */ sprite: function (x, y, key, frame) { @@ -77,7 +76,7 @@ Phaser.GameObjectFactory.prototype = { * @param {number} y - Y position of the new sprite. * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture. * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @returns {Description} Description. + * @returns {Phaser.Sprite} the newly created sprite object. */ child: function (group, x, y, key, frame) { @@ -102,8 +101,8 @@ Phaser.GameObjectFactory.prototype = { * Creates a new group to be added on the display list * * @method group - * @param {Description} parent - Description. - * @param {Description} name - Description. + * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. + * @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging. * @return {Phaser.Group} The newly created group. */ group: function (parent, name) { @@ -119,7 +118,7 @@ Phaser.GameObjectFactory.prototype = { * @param {string} key - The Game.cache key of the sound that this object will use. * @param {number} volume - The volume at which the sound will be played. * @param {boolean} loop - Whether or not the sound will loop. - * @return {Phaser.Audio} The audio object. + * @return {Phaser.Sound} The newly created text object. */ audio: function (key, volume, loop) { @@ -133,11 +132,11 @@ Phaser.GameObjectFactory.prototype = { * @method tileSprite * @param {number} x - X position of the new tileSprite. * @param {number} y - Y position of the new tileSprite. - * @param {Description} width - the width of the tilesprite. - * @param {Description} height - the height of the tilesprite. + * @param {number} width - the width of the tilesprite. + * @param {number} height - the height of the tilesprite. * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param {Description} frame - Description. - * @return {Description} Description. + * @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @return {Phaser.TileSprite} The newly created tileSprite object. */ tileSprite: function (x, y, width, height, key, frame) { @@ -153,6 +152,7 @@ Phaser.GameObjectFactory.prototype = { * @param {number} y - Y position of the new text object. * @param {string} text - The actual text that will be written. * @param {object} style - The style object containing style attributes like font, font size , etc. + * @return {Phaser.Text} The newly created text object. */ text: function (x, y, text, style) { @@ -164,14 +164,15 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method button - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} callback - Description. - * @param {Description} callbackContext - Description. - * @param {Description} overFrame - Description. - * @param {Description} outFrame - Description. - * @param {Description} downFrame - Description. - * @return {Description} Description. + * @param {number} [x] X position of the new button object. + * @param {number} [y] Y position of the new button object. + * @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button. + * @param {function} [callback] The function to call when this button is pressed + * @param {object} [callbackContext] The context in which the callback will be called (usually 'this') + * @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. + * @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. + * @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. + * @return {Phaser.Button} The newly created button object. */ button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) { @@ -183,9 +184,9 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method graphics - * @param {Description} x - Description. - * @param {Description} y - Description. - * @return {Description} Description. + * @param {number} x - X position of the new graphics object. + * @param {number} y - Y position of the new graphics object. + * @return {Phaser.Graphics} The newly created graphics object. */ graphics: function (x, y) { @@ -197,10 +198,10 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method emitter - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} maxParticles - Description. - * @return {Description} Description. + * @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from. + * @param {number} [y=0] - The y coordinate within the Emitter that the particles are emitted from. + * @param {number} [maxParticles=50] - The total number of particles in this emitter. + * @return {Phaser.Emitter} The newly created emitter object. */ emitter: function (x, y, maxParticles) { @@ -212,11 +213,11 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method bitmapText - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} text - Description. - * @param {Description} style - Description. - * @return {Description} Description. + * @param {number} x - X position of the new bitmapText object. + * @param {number} y - Y position of the new bitmapText object. + * @param {string} text - The actual text that will be written. + * @param {object} style - The style object containing style attributes like font, font size , etc. + * @return {Phaser.BitmapText} The newly created bitmapText object. */ bitmapText: function (x, y, text, style) { @@ -228,8 +229,8 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method tilemap - * @param {Description} key - Description. - * @return {Description} Description. + * @param {string} key - Asset key for the JSON file. + * @return {Phaser.Tilemap} The newly created tilemap object. */ tilemap: function (key) { @@ -240,9 +241,9 @@ Phaser.GameObjectFactory.prototype = { /** * Description. * - * @method tilemap - * @param {Description} key - Description. - * @return {Description} Description. + * @method tileset + * @param {string} key - The image key as defined in the Game.Cache to use as the tileset. + * @return {Phaser.Tileset} The newly created tileset object. */ tileset: function (key) { @@ -253,14 +254,12 @@ Phaser.GameObjectFactory.prototype = { /** * Description. * - * @method tileSprite - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} width - Description. - * @param {Description} height - Description. - * @param {Description} key - Description. - * @param {Description} frame - Description. - * @return {Description} Description. + * @method tilemaplayer + * @param {number} x - X position of the new tilemapLayer. + * @param {number} y - Y position of the new tilemapLayer. + * @param {number} width - the width of the tilemapLayer. + * @param {number} height - the height of the tilemapLayer. + * @return {Phaser.TilemapLayer} The newly created tilemaplayer object. */ tilemapLayer: function (x, y, width, height, tileset, tilemap, layer) { @@ -272,10 +271,10 @@ Phaser.GameObjectFactory.prototype = { * Description. * * @method renderTexture - * @param {Description} key - Description. - * @param {Description} width - Description. - * @param {Description} height - Description. - * @return {Description} Description. + * @param {string} key - Asset key for the render texture. + * @param {number} width - the width of the render texture. + * @param {number} height - the height of the render texture. + * @return {Phaser.RenderTexture} The newly created renderTexture object. */ renderTexture: function (key, width, height) { diff --git a/src/gameobjects/Graphics.js b/src/gameobjects/Graphics.js index e58e811f..c1706ea1 100644 --- a/src/gameobjects/Graphics.js +++ b/src/gameobjects/Graphics.js @@ -2,7 +2,6 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Graphics */ /** @@ -12,8 +11,8 @@ * @constructor * * @param {Phaser.Game} game Current game instance. -* @param {number} [x] X position of Description. -* @param {number} [y] Y position of Description. +* @param {number} x - X position of the new graphics object. +* @param {number} y - Y position of the new graphics object. */ Phaser.Graphics = function (game, x, y) { diff --git a/src/gameobjects/RenderTexture.js b/src/gameobjects/RenderTexture.js index 3a213106..ee5799d3 100644 --- a/src/gameobjects/RenderTexture.js +++ b/src/gameobjects/RenderTexture.js @@ -2,18 +2,16 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.RenderTexture */ /** * Description of constructor. * @class Phaser.RenderTexture -* @classdesc Description of class. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {string} key - Description. -* @param {number} width - Description. -* @param {number} height - Description. +* @param {string} key - Asset key for the render texture. +* @param {number} width - the width of the render texture. +* @param {number} height - the height of the render texture. */ Phaser.RenderTexture = function (game, key, width, height) { @@ -23,19 +21,19 @@ Phaser.RenderTexture = function (game, key, width, height) { this.game = game; /** - * @property {Description} name - Description. + * @property {string} name - the name of the object. */ this.name = key; PIXI.EventTarget.call( this ); /** - * @property {number} width - Description. + * @property {number} width - the width. */ this.width = width || 100; /** - * @property {number} height - Description. + * @property {number} height - the height. */ this.height = height || 100; diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index d2c9caca..762477f3 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -2,19 +2,17 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Text */ /** * Create a new Text. * @class Phaser.Text -* @classdesc Description of class. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {Description} x - Description. -* @param {Description} y - Description. -* @param {string} text - Description. -* @param {string} style - Description. +* @param {number} x - X position of the new text object. +* @param {number} y - Y position of the new text object. +* @param {string} text - The actual text that will be written. +* @param {object} style - The style object containing style attributes like font, font size , */ Phaser.Text = function (game, x, y, text, style) { diff --git a/src/gameobjects/TileSprite.js b/src/gameobjects/TileSprite.js index f274940f..c9ee3dda 100644 --- a/src/gameobjects/TileSprite.js +++ b/src/gameobjects/TileSprite.js @@ -2,21 +2,19 @@ * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.TileSprite */ /** * Create a new TileSprite. * @class Phaser.Tilemap -* @classdesc Class description. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {object} x - Description. -* @param {object} y - Description. -* @param {number} width - Description. -* @param {number} height - Description. -* @param {string} key - Description. -* @param {Description} frame - Description. +* @param {number} x - X position of the new tileSprite. +* @param {number} y - Y position of the new tileSprite. +* @param {number} width - the width of the tilesprite. +* @param {number} height - the height of the tilesprite. +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ Phaser.TileSprite = function (game, x, y, width, height, key, frame) { From 12148b315933f95350b1ef2340e0a64efe92984a Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 25 Oct 2013 15:42:48 +0100 Subject: [PATCH 119/125] More improvements on GameObjectFactory --- src/gameobjects/BitmapText.js | 4 +--- src/gameobjects/GameObjectFactory.js | 20 +++++++++++--------- src/gameobjects/Graphics.js | 2 +- src/gameobjects/RenderTexture.js | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/gameobjects/BitmapText.js b/src/gameobjects/BitmapText.js index 4558a411..8090d8f8 100644 --- a/src/gameobjects/BitmapText.js +++ b/src/gameobjects/BitmapText.js @@ -5,9 +5,7 @@ */ /** -* An Animation instance contains a single animation and the controls to play it. -* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. -* +* Creates a new BitmapText. * @class Phaser.BitmapText * @constructor * @param {Phaser.Game} game - A reference to the currently running game. diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index e86c3b1d..ebd37ed5 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -98,7 +98,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Creates a new group to be added on the display list + * A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * * @method group * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. @@ -112,7 +112,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new instance of the Sound class. * * @method audio * @param {string} key - The Game.cache key of the sound that this object will use. @@ -127,7 +127,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new TileSprite. * * @method tileSprite * @param {number} x - X position of the new tileSprite. @@ -145,7 +145,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Text. * * @method text * @param {number} x - X position of the new text object. @@ -161,7 +161,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Button object. * * @method button * @param {number} [x] X position of the new button object. @@ -181,7 +181,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Graphics object. * * @method graphics * @param {number} x - X position of the new graphics object. @@ -195,7 +195,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Emitter is a lightweight particle emitter. It can be used for one-time explosions or for + * continuous effects like rain and fire. All it really does is launch Particle objects out + * at set intervals, and fixes their positions and velocities accorindgly. * * @method emitter * @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from. @@ -210,7 +212,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * * Create a new BitmapText. * * @method bitmapText * @param {number} x - X position of the new bitmapText object. @@ -268,7 +270,7 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * A dynamic initially blank canvas to which images can be drawn * * @method renderTexture * @param {string} key - Asset key for the render texture. diff --git a/src/gameobjects/Graphics.js b/src/gameobjects/Graphics.js index c1706ea1..e2303e9f 100644 --- a/src/gameobjects/Graphics.js +++ b/src/gameobjects/Graphics.js @@ -5,7 +5,7 @@ */ /** -* Description. +* Creates a new Graphics object. * * @class Phaser.Graphics * @constructor diff --git a/src/gameobjects/RenderTexture.js b/src/gameobjects/RenderTexture.js index ee5799d3..597fd700 100644 --- a/src/gameobjects/RenderTexture.js +++ b/src/gameobjects/RenderTexture.js @@ -5,7 +5,7 @@ */ /** -* Description of constructor. +* A dynamic initially blank canvas to which images can be drawn * @class Phaser.RenderTexture * @constructor * @param {Phaser.Game} game - Current game instance. From 9f9e6a2a573c8d116340c031f1b77dc2bc27f59e Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 16:54:40 +0100 Subject: [PATCH 120/125] Lots of doc updates! --- docs/Animation.js.html | 172 +- docs/AnimationManager.js.html | 124 +- docs/AnimationParser.js.html | 124 +- docs/ArcadePhysics.js.html | 1778 +++++ docs/BitmapText.js.html | 731 ++ docs/Body.js.html | 840 +++ docs/Bullet.js.html | 1128 +++ docs/Button.js.html | 825 +++ docs/Cache.js.html | 127 +- docs/Camera.js.html | 124 +- docs/Canvas.js.html | 124 +- docs/Circle.js.html | 124 +- docs/Color.js.html | 124 +- docs/Debug.js.html | 132 +- docs/Device.js.html | 134 +- docs/Easing.js.html | 124 +- docs/Emitter.js.html | 124 +- docs/Events.js.html | 572 ++ docs/Frame.js.html | 124 +- docs/FrameData.js.html | 124 +- docs/Game.js.html | 154 +- docs/GameObjectFactory.js.html | 795 +++ docs/Graphics.js.html | 592 ++ docs/Group.js.html | 136 +- docs/Input.js.html | 159 +- docs/InputHandler.js.html | 167 +- docs/Intro.js.html | 126 +- docs/Key.js.html | 124 +- docs/Keyboard.js.html | 124 +- docs/LinkedList.js.html | 124 +- docs/Loader.js.html | 133 +- docs/LoaderParser.js.html | 124 +- docs/MSPointer.js.html | 124 +- docs/Math.js.html | 124 +- docs/Mouse.js.html | 124 +- docs/Net.js.html | 124 +- docs/Particles.js.html | 124 +- docs/Phaser.Animation.html | 136 +- docs/Phaser.AnimationManager.html | 128 +- docs/Phaser.AnimationParser.html | 124 +- docs/Phaser.BitmapText.html | 1654 +++++ docs/Phaser.Bullet.html | 4145 +++++++++++ docs/Phaser.Button.html | 2139 ++++++ docs/Phaser.Cache.html | 192 +- docs/Phaser.Camera.html | 128 +- docs/Phaser.Canvas.html | 124 +- docs/Phaser.Circle.html | 124 +- docs/Phaser.Color.html | 124 +- docs/Phaser.Device.html | 128 +- docs/Phaser.Easing.Back.html | 124 +- docs/Phaser.Easing.Bounce.html | 124 +- docs/Phaser.Easing.Circular.html | 124 +- docs/Phaser.Easing.Cubic.html | 124 +- docs/Phaser.Easing.Elastic.html | 124 +- docs/Phaser.Easing.Exponential.html | 124 +- docs/Phaser.Easing.Linear.html | 124 +- docs/Phaser.Easing.Quadratic.html | 124 +- docs/Phaser.Easing.Quartic.html | 124 +- docs/Phaser.Easing.Quintic.html | 124 +- docs/Phaser.Easing.Sinusoidal.html | 124 +- docs/Phaser.Easing.html | 124 +- docs/Phaser.Events.html | 660 ++ docs/Phaser.Frame.html | 124 +- docs/Phaser.FrameData.html | 124 +- docs/Phaser.Game.html | 136 +- docs/Phaser.GameObjectFactory.html | 1078 +++ docs/Phaser.Graphics.html | 812 +++ docs/Phaser.Group.html | 212 +- docs/Phaser.Input.html | 421 +- docs/Phaser.InputHandler.html | 192 +- docs/Phaser.Key.html | 124 +- docs/Phaser.Keyboard.html | 124 +- docs/Phaser.LinkedList.html | 124 +- docs/Phaser.Loader.html | 172 +- docs/Phaser.LoaderParser.html | 124 +- docs/Phaser.MSPointer.html | 124 +- docs/Phaser.Math.html | 124 +- docs/Phaser.Mouse.html | 124 +- docs/Phaser.Net.html | 124 +- docs/Phaser.Particles.Arcade.Emitter.html | 200 +- docs/Phaser.Particles.html | 124 +- docs/Phaser.Physics.Arcade.html | 6408 +++++++++++++++++ docs/Phaser.Physics.html | 612 ++ docs/Phaser.Plugin.html | 124 +- docs/Phaser.PluginManager.html | 124 +- docs/Phaser.Point.html | 124 +- docs/Phaser.Pointer.html | 124 +- docs/Phaser.QuadTree.html | 124 +- docs/Phaser.RandomDataGenerator.html | 124 +- docs/Phaser.Rectangle.html | 269 +- docs/Phaser.RenderTexture.html | 1452 ++++ docs/Phaser.RequestAnimationFrame.html | 124 +- docs/Phaser.Signal.html | 126 +- docs/Phaser.Sound.html | 401 +- docs/Phaser.SoundManager.html | 124 +- docs/Phaser.Sprite.html | 7799 +++++++++++++++++++++ docs/Phaser.Stage.html | 305 +- docs/Phaser.StageScaleMode.html | 124 +- docs/Phaser.State.html | 126 +- docs/Phaser.StateManager.html | 124 +- docs/Phaser.Text.html | 1886 +++++ docs/Phaser.TileSprite.html | 1219 ++++ docs/Phaser.Time.html | 130 +- docs/Phaser.Touch.html | 124 +- docs/Phaser.Tween.html | 124 +- docs/Phaser.TweenManager.html | 124 +- docs/Phaser.Utils.Debug.html | 174 +- docs/Phaser.Utils.html | 124 +- docs/Phaser.World.html | 124 +- docs/Phaser.html | 157 +- docs/Phaser.js.html | 133 +- docs/Plugin.js.html | 124 +- docs/PluginManager.js.html | 124 +- docs/Point.js.html | 124 +- docs/Pointer.js.html | 128 +- docs/QuadTree.js.html | 124 +- docs/RandomDataGenerator.js.html | 124 +- docs/Rectangle.js.html | 145 +- docs/RenderTexture.js.html | 574 ++ docs/RequestAnimationFrame.js.html | 124 +- docs/Signal.js.html | 124 +- docs/SignalBinding.html | 124 +- docs/SignalBinding.js.html | 124 +- docs/Sound.js.html | 153 +- docs/SoundManager.js.html | 124 +- docs/Sprite.js.html | 1630 +++++ docs/Stage.js.html | 154 +- docs/StageScaleMode.js.html | 124 +- docs/State.js.html | 124 +- docs/StateManager.js.html | 124 +- docs/Text.js.html | 726 ++ docs/TileSprite.js.html | 562 ++ docs/Time.js.html | 130 +- docs/Touch.js.html | 124 +- docs/Tween.js.html | 124 +- docs/TweenManager.js.html | 124 +- docs/Utils.js.html | 124 +- docs/World.js.html | 124 +- docs/build/conf_dev.json | 2 + docs/classes.list.html | 160 +- docs/global.html | 3907 ++++++++++- docs/index.html | 128 +- docs/namespaces.list.html | 160 +- src/gameobjects/Bullet.js | 2 +- src/gameobjects/Sprite.js | 10 +- src/physics/arcade/ArcadePhysics.js | 281 +- src/physics/arcade/Body.js | 327 +- 147 files changed, 60434 insertions(+), 972 deletions(-) create mode 100644 docs/ArcadePhysics.js.html create mode 100644 docs/BitmapText.js.html create mode 100644 docs/Body.js.html create mode 100644 docs/Bullet.js.html create mode 100644 docs/Button.js.html create mode 100644 docs/Events.js.html create mode 100644 docs/GameObjectFactory.js.html create mode 100644 docs/Graphics.js.html create mode 100644 docs/Phaser.BitmapText.html create mode 100644 docs/Phaser.Bullet.html create mode 100644 docs/Phaser.Button.html create mode 100644 docs/Phaser.Events.html create mode 100644 docs/Phaser.GameObjectFactory.html create mode 100644 docs/Phaser.Graphics.html create mode 100644 docs/Phaser.Physics.Arcade.html create mode 100644 docs/Phaser.Physics.html create mode 100644 docs/Phaser.RenderTexture.html create mode 100644 docs/Phaser.Sprite.html create mode 100644 docs/Phaser.Text.html create mode 100644 docs/Phaser.TileSprite.html create mode 100644 docs/RenderTexture.js.html create mode 100644 docs/Sprite.js.html create mode 100644 docs/Text.js.html create mode 100644 docs/TileSprite.js.html diff --git a/docs/Animation.js.html b/docs/Animation.js.html index 9e79967b..b57a3c32 100644 --- a/docs/Animation.js.html +++ b/docs/Animation.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -729,33 +849,55 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { * * @method Phaser.Animation.generateFrameNames * @param {string} prefix - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. -* @param {number} min - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1. -* @param {number} max - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34. +* @param {number} start - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1. +* @param {number} stop - The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34. * @param {string} [suffix=''] - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. * @param {number} [zeroPad=0] - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. */ -Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { +Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zeroPad) { if (typeof suffix == 'undefined') { suffix = ''; } var output = []; var frame = ''; - for (var i = min; i <= max; i++) + if (start < stop) { - if (typeof zeroPad == 'number') + for (var i = start; i <= stop; i++) { - // str, len, pad, dir - frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); } - else + } + else + { + for (var i = start; i >= stop; i--) { - frame = i.toString(); + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); } - - frame = prefix + frame + suffix; - - output.push(frame); } return output; @@ -781,8 +923,8 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/AnimationManager.js.html b/docs/AnimationManager.js.html index e6f07a55..3e94389f 100644 --- a/docs/AnimationManager.js.html +++ b/docs/AnimationManager.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -745,8 +865,8 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/AnimationParser.js.html b/docs/AnimationParser.js.html index ebf468ab..d0f3c520 100644 --- a/docs/AnimationParser.js.html +++ b/docs/AnimationParser.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -659,8 +779,8 @@ Phaser.AnimationParser = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/ArcadePhysics.js.html b/docs/ArcadePhysics.js.html new file mode 100644 index 00000000..4c8b318e --- /dev/null +++ b/docs/ArcadePhysics.js.html @@ -0,0 +1,1778 @@ + + + + + + Phaser Source: physics/arcade/ArcadePhysics.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: physics/arcade/ArcadePhysics.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* @class Phaser.Physics
    +*/
    +Phaser.Physics = {};
    +
    +/**
    +* Arcade Physics constructor.
    +*
    +* @class Phaser.Physics.Arcade
    +* @classdesc Arcade Physics Constructor
    +* @constructor
    +* @param {Phaser.Game} game reference to the current game instance.
    +*/
    +Phaser.Physics.Arcade = function (game) {
    +    
    +    this.game = game;
    +
    +    this.gravity = new Phaser.Point;
    +    this.bounds = new Phaser.Rectangle(0, 0, game.world.width, game.world.height);
    +
    +    /**
    +    * Used by the QuadTree to set the maximum number of objects
    +    * @type {number}
    +    */
    +    this.maxObjects = 10;
    +
    +    /**
    +    * Used by the QuadTree to set the maximum number of levels
    +    * @type {number}
    +    */
    +    this.maxLevels = 4;
    +
    +    this.OVERLAP_BIAS = 4;
    +    this.TILE_OVERLAP = false;
    +
    +    this.quadTree = new Phaser.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);
    +    this.quadTreeID = 0;
    +
    +    //  Avoid gc spikes by caching these values for re-use
    +    this._bounds1 = new Phaser.Rectangle;
    +    this._bounds2 = new Phaser.Rectangle;
    +    this._overlap = 0;
    +    this._maxOverlap = 0;
    +    this._velocity1 = 0;
    +    this._velocity2 = 0;
    +    this._newVelocity1 = 0;
    +    this._newVelocity2 = 0;
    +    this._average = 0;
    +    this._mapData = [];
    +    this._mapTiles = 0;
    +    this._result = false;
    +    this._total = 0;
    +    this._angle = 0;
    +    this._dx = 0;
    +    this._dy = 0;
    +
    +};
    +
    +Phaser.Physics.Arcade.prototype = {
    +
    +    /**
    +    * Called automatically by a Physics body, it updates all motion related values on the Body.
    +    *
    +    * @method Phaser.Physics.Arcade#updateMotion
    +    * @param {Phaser.Physics.Arcade.Body} The Body object to be updated.
    +    */
    +    updateMotion: function (body) {
    +
    +        //  If you're wondering why the velocity is halved and applied twice, read this: http://www.niksula.hut.fi/~hkankaan/Homepages/gravity.html
    +
    +        //  Rotation
    +        this._velocityDelta = (this.computeVelocity(0, body, body.angularVelocity, body.angularAcceleration, body.angularDrag, body.maxAngular) - body.angularVelocity) / 2;
    +        body.angularVelocity += this._velocityDelta;
    +        body.rotation += (body.angularVelocity * this.game.time.physicsElapsed);
    +        body.angularVelocity += this._velocityDelta;
    +
    +        //  Horizontal
    +        this._velocityDelta = (this.computeVelocity(1, body, body.velocity.x, body.acceleration.x, body.drag.x, body.maxVelocity.x) - body.velocity.x) / 2;
    +        body.velocity.x += this._velocityDelta;
    +        body.x += (body.velocity.x * this.game.time.physicsElapsed);
    +        body.velocity.x += this._velocityDelta;
    +
    +        //  Vertical
    +        this._velocityDelta = (this.computeVelocity(2, body, body.velocity.y, body.acceleration.y, body.drag.y, body.maxVelocity.y) - body.velocity.y) / 2;
    +        body.velocity.y += this._velocityDelta;
    +        body.y += (body.velocity.y * this.game.time.physicsElapsed);
    +        body.velocity.y += this._velocityDelta;
    +
    +    },
    +
    +    /**
    +    * A tween-like function that takes a starting velocity and some other factors and returns an altered velocity.
    +    *
    +    * @method Phaser.Physics.Arcade#computeVelocity
    +    * @param {number} axis - 1 for horizontal, 2 for vertical.
    +    * @param {Phaser.Physics.Arcade.Body} body - The Body object to be updated.
    +    * @param {number} velocity - Any component of velocity (e.g. 20).
    +    * @param {number} acceleration - Rate at which the velocity is changing.
    +    * @param {number} drag - Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set.
    +    * @param {number} mMax - An absolute value cap for the velocity.
    +    * @return {number} The altered Velocity value.
    +    */
    +    computeVelocity: function (axis, body, velocity, acceleration, drag, max) {
    +
    +        max = max || 10000;
    +
    +        if (axis == 1 && body.allowGravity)
    +        {
    +            velocity += this.gravity.x + body.gravity.x;
    +        }
    +        else if (axis == 2 && body.allowGravity)
    +        {
    +            velocity += this.gravity.y + body.gravity.y;
    +        }
    +
    +        if (acceleration !== 0)
    +        {
    +            velocity += acceleration * this.game.time.physicsElapsed;
    +        }
    +        else if (drag !== 0)
    +        {
    +            this._drag = drag * this.game.time.physicsElapsed;
    +
    +            if (velocity - this._drag > 0)
    +            {
    +                velocity -= this._drag;
    +            }
    +            else if (velocity + this._drag < 0)
    +            {
    +                velocity += this._drag;
    +            }
    +            else
    +            {
    +                velocity = 0;
    +            }
    +        }
    +
    +        if (velocity > max)
    +        {
    +            velocity = max;
    +        }
    +        else if (velocity < -max)
    +        {
    +            velocity = -max;
    +        }
    +
    +        return velocity;
    +
    +    },
    +
    +    /**
    +    * Called automatically by the core game loop.
    +    *
    +    * @method Phaser.Physics.Arcade#preUpdate
    +    * @protected
    +    */
    +    preUpdate: function () {
    +
    +        //  Clear the tree
    +        this.quadTree.clear();
    +
    +        //  Create our tree which all of the Physics bodies will add themselves to
    +        this.quadTreeID = 0;
    +        this.quadTree = new Phaser.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);
    +
    +    },
    +
    +    /**
    +    * Called automatically by the core game loop.
    +    *
    +    * @method Phaser.Physics.Arcade#postUpdate
    +    * @protected
    +    */
    +    postUpdate: function () {
    +
    +        //  Clear the tree ready for the next update
    +        this.quadTree.clear();
    +
    +    },
    +
    +    /**
    +    * Checks if two Sprite objects overlap.
    +    *
    +    * @method Phaser.Physics.Arcade#overlap
    +    * @param {Phaser.Sprite} object1 - The first object to check. Can be an instance of Phaser.Sprite or anything that extends it.
    +    * @param {Phaser.Sprite} object2 - The second object to check. Can be an instance of Phaser.Sprite or anything that extends it.
    +    * @returns {boolean} true if the two objects overlap.
    +    */
    +    overlap: function (object1, object2) {
    +
    +        //  Only test valid objects
    +        if (object1 && object2 && object1.exists && object2.exists)
    +        {
    +            return (Phaser.Rectangle.intersects(object1.body, object2.body));
    +        }
    +
    +        return false;
    +
    +    },
    +
    +    /**
    +    * Checks for collision between two game objects. The objects can be Sprites, Groups, Emitters or Tilemaps.
    +    * You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap or Group vs. Tilemap collisions.
    +    * The objects are also automatically separated.
    +    *
    +    * @method Phaser.Physics.Arcade#collide
    +    * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap
    +    * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object2 - The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap
    +    * @param {function} [collideCallback=null] - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap.
    +    * @param {function} [processCallback=null] - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collideCallback will only be called if processCallback returns true.
    +    * @param {object} [callbackContext] - The context in which to run the callbacks.
    +    * @returns {number} The number of collisions that were processed.
    +    */
    +    collide: function (object1, object2, collideCallback, processCallback, callbackContext) {
    +
    +        collideCallback = collideCallback || null;
    +        processCallback = processCallback || null;
    +        callbackContext = callbackContext || collideCallback;
    +
    +        this._result = false;
    +        this._total = 0;
    +
    +        //  Only collide valid objects
    +        if (object1 && object2 && object1.exists && object2.exists)
    +        {
    +            //  Can expand to support Buttons, Text, etc at a later date. For now these are the essentials.
    +
    +            //  SPRITES
    +            if (object1.type == Phaser.SPRITE)
    +            {
    +                if (object2.type == Phaser.SPRITE)
    +                {
    +                    this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER)
    +                {
    +                    this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.TILEMAPLAYER)
    +                {
    +                    this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +            }
    +            //  GROUPS
    +            else if (object1.type == Phaser.GROUP)
    +            {
    +                if (object2.type == Phaser.SPRITE)
    +                {
    +                    this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER)
    +                {
    +                    this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.TILEMAPLAYER)
    +                {
    +                    this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +            }
    +            //  TILEMAP LAYERS
    +            else if (object1.type == Phaser.TILEMAPLAYER)
    +            {
    +                if (object2.type == Phaser.SPRITE)
    +                {
    +                    this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER)
    +                {
    +                    this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext);
    +                }
    +            }
    +            //  EMITTER
    +            else if (object1.type == Phaser.EMITTER)
    +            {
    +                if (object2.type == Phaser.SPRITE)
    +                {
    +                    this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.GROUP || object2.type == Phaser.EMITTER)
    +                {
    +                    this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +                else if (object2.type == Phaser.TILEMAPLAYER)
    +                {
    +                    this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext);
    +                }
    +            }
    +        }
    +
    +        return (this._total > 0);
    +
    +    },
    +
    +    /**
    +    * An internal function. Use Phaser.Physics.Arcade.collide instead.
    +    *
    +    * @method Phaser.Physics.Arcade#collideSpriteVsTilemapLayer
    +    * @private
    +    */
    +    collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext) {
    +
    +        this._mapData = tilemapLayer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true);
    +
    +        if (this._mapData.length > 1)
    +        {
    +            for (var i = 1; i < this._mapData.length; i++)
    +            {
    +                this.separateTile(sprite.body, this._mapData[i]);
    +
    +                if (this._result)
    +                {
    +                    //  They collided, is there a custom process callback?
    +                    if (processCallback)
    +                    {
    +                        if (processCallback.call(callbackContext, sprite, this._mapData[i]))
    +                        {
    +                            this._total++;
    +
    +                            if (collideCallback)
    +                            {
    +                                collideCallback.call(callbackContext, sprite, this._mapData[i]);
    +                            }
    +                        }
    +                    }
    +                    else
    +                    {
    +                        this._total++;
    +
    +                        if (collideCallback)
    +                        {
    +                            collideCallback.call(callbackContext, sprite, this._mapData[i]);
    +                        }
    +                    }
    +                }
    +            }
    +        }
    +
    +    },
    +
    +    /**
    +    * An internal function. Use Phaser.Physics.Arcade.collide instead.
    +    *
    +    * @method Phaser.Physics.Arcade#collideGroupVsTilemapLayer
    +    * @private
    +    */
    +    collideGroupVsTilemapLayer: function (group, tilemapLayer, collideCallback, processCallback, callbackContext) {
    +
    +        if (group.length == 0)
    +        {
    +            return;
    +        }
    +
    +        if (group._container.first._iNext)
    +        {
    +            var currentNode = group._container.first._iNext;
    +                
    +            do  
    +            {
    +                if (currentNode.exists)
    +                {
    +                    this.collideSpriteVsTilemapLayer(currentNode, tilemapLayer, collideCallback, processCallback, callbackContext);
    +                }
    +                currentNode = currentNode._iNext;
    +            }
    +            while (currentNode != group._container.last._iNext);
    +        }
    +
    +    },
    +
    +    /**
    +    * An internal function. Use Phaser.Physics.Arcade.collide instead.
    +    *
    +    * @method Phaser.Physics.Arcade#collideSpriteVsSprite
    +    * @private
    +    */
    +    collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext) {
    +
    +        this.separate(sprite1.body, sprite2.body);
    +
    +        if (this._result)
    +        {
    +            //  They collided, is there a custom process callback?
    +            if (processCallback)
    +            {
    +                if (processCallback.call(callbackContext, sprite1, sprite2))
    +                {
    +                    this._total++;
    +
    +                    if (collideCallback)
    +                    {
    +                        collideCallback.call(callbackContext, sprite1, sprite2);
    +                    }
    +                }
    +            }
    +            else
    +            {
    +                this._total++;
    +
    +                if (collideCallback)
    +                {
    +                    collideCallback.call(callbackContext, sprite1, sprite2);
    +                }
    +            }
    +        }
    +
    +    },
    +
    +    /**
    +    * An internal function. Use Phaser.Physics.Arcade.collide instead.
    +    *
    +    * @method Phaser.Physics.Arcade#collideSpriteVsGroup
    +    * @private
    +    */
    +    collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext) {
    +
    +        if (group.length == 0)
    +        {
    +            return;
    +        }
    +
    +        //  What is the sprite colliding with in the quadtree?
    +        this._potentials = this.quadTree.retrieve(sprite);
    +
    +        for (var i = 0, len = this._potentials.length; i < len; i++)
    +        {
    +            //  We have our potential suspects, are they in this group?
    +            if (this._potentials[i].sprite.group == group)
    +            {
    +                this.separate(sprite.body, this._potentials[i]);
    +
    +                if (this._result && processCallback)
    +                {
    +                    this._result = processCallback.call(callbackContext, sprite, this._potentials[i].sprite);
    +                }
    +
    +                if (this._result)
    +                {
    +                    this._total++;
    +
    +                    if (collideCallback)
    +                    {
    +                        collideCallback.call(callbackContext, sprite, this._potentials[i].sprite);
    +                    }
    +                }
    +            }
    +        }
    +
    +    },
    +
    +    /**
    +    * An internal function. Use Phaser.Physics.Arcade.collide instead.
    +    *
    +    * @method Phaser.Physics.Arcade#collideGroupVsGroup
    +    * @private
    +    */
    +    collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext) {
    +
    +        if (group1.length == 0 || group2.length == 0)
    +        {
    +            return;
    +        }
    +
    +        if (group1._container.first._iNext)
    +        {
    +            var currentNode = group1._container.first._iNext;
    +                
    +            do  
    +            {
    +                if (currentNode.exists)
    +                {
    +                    this.collideSpriteVsGroup(currentNode, group2, collideCallback, processCallback, callbackContext);
    +                }
    +                currentNode = currentNode._iNext;
    +            }
    +            while (currentNode != group1._container.last._iNext);
    +        }
    +
    +    },
    +
    +    /**
    +    * The core separation function to separate two physics bodies.
    +    * @method Phaser.Physics.Arcade#separate
    +    * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate.
    +    * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate.
    +    * @returns {boolean} Returns true if the bodies were separated, otherwise false.
    +    */
    +    separate: function (body1, body2) {
    +
    +        this._result = (this.separateX(body1, body2) || this.separateY(body1, body2));
    +
    +    },
    +
    +    /**
    +    * The core separation function to separate two physics bodies on the x axis.
    +    * @method Phaser.Physics.Arcade#separateX
    +    * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate.
    +    * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate.
    +    * @returns {boolean} Returns true if the bodies were separated, otherwise false.
    +    */
    +    separateX: function (body1, body2) {
    +
    +        //  Can't separate two immovable bodies
    +        if (body1.immovable && body2.immovable)
    +        {
    +            return false;
    +        }
    +
    +        this._overlap = 0;
    +
    +        //  Check if the hulls actually overlap
    +        if (Phaser.Rectangle.intersects(body1, body2))
    +        {
    +            this._maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + this.OVERLAP_BIAS;
    +
    +            if (body1.deltaX() == 0 && body2.deltaX() == 0)
    +            {
    +                //  They overlap but neither of them are moving
    +                body1.embedded = true;
    +                body2.embedded = true;
    +            }
    +            else if (body1.deltaX() > body2.deltaX())
    +            {
    +                //  Body1 is moving right and/or Body2 is moving left
    +                this._overlap = body1.x + body1.width - body2.x;
    +
    +                if ((this._overlap > this._maxOverlap) || body1.allowCollision.right == false || body2.allowCollision.left == false)
    +                {
    +                    this._overlap = 0;
    +                }
    +                else
    +                {
    +                    body1.touching.right = true;
    +                    body2.touching.left = true;
    +                }
    +            }
    +            else if (body1.deltaX() < body2.deltaX())
    +            {
    +                //  Body1 is moving left and/or Body2 is moving right
    +                this._overlap = body1.x - body2.width - body2.x;
    +
    +                if ((-this._overlap > this._maxOverlap) || body1.allowCollision.left == false || body2.allowCollision.right == false)
    +                {
    +                    this._overlap = 0;
    +                }
    +                else
    +                {
    +                    body1.touching.left = true;
    +                    body2.touching.right = true;
    +                }
    +            }
    +
    +            //  Then adjust their positions and velocities accordingly (if there was any overlap)
    +            if (this._overlap != 0)
    +            {
    +                body1.overlapX = this._overlap;
    +                body2.overlapX = this._overlap;
    +
    +                if (body1.customSeparateX || body2.customSeparateX)
    +                {
    +                    return true;
    +                }
    +
    +                this._velocity1 = body1.velocity.x;
    +                this._velocity2 = body2.velocity.x;
    +
    +                if (!body1.immovable && !body2.immovable)
    +                {
    +                    this._overlap *= 0.5;
    +
    +                    body1.x = body1.x - this._overlap;
    +                    body2.x += this._overlap;
    +
    +                    this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1);
    +                    this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1);
    +                    this._average = (this._newVelocity1 + this._newVelocity2) * 0.5;
    +                    this._newVelocity1 -= this._average;
    +                    this._newVelocity2 -= this._average;
    +
    +                    body1.velocity.x = this._average + this._newVelocity1 * body1.bounce.x;
    +                    body2.velocity.x = this._average + this._newVelocity2 * body2.bounce.x;
    +                }
    +                else if (!body1.immovable)
    +                {
    +                    body1.x = body1.x - this._overlap;
    +                    body1.velocity.x = this._velocity2 - this._velocity1 * body1.bounce.x;
    +                }
    +                else if (!body2.immovable)
    +                {
    +                    body2.x += this._overlap;
    +                    body2.velocity.x = this._velocity1 - this._velocity2 * body2.bounce.x;
    +                }
    +
    +                return true;
    +            }
    +        }
    +
    +        return false;
    +
    +    },
    +
    +    /**
    +    * The core separation function to separate two physics bodies on the y axis.
    +    * @method Phaser.Physics.Arcade#separateY
    +    * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate.
    +    * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate.
    +    * @returns {boolean} Returns true if the bodies were separated, otherwise false.
    +    */
    +    separateY: function (body1, body2) {
    +
    +        //  Can't separate two immovable or non-existing bodys
    +        if (body1.immovable && body2.immovable)
    +        {
    +            return false;
    +        }
    +
    +        this._overlap = 0;
    +
    +        //  Check if the hulls actually overlap
    +        if (Phaser.Rectangle.intersects(body1, body2))
    +        {
    +            this._maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + this.OVERLAP_BIAS;
    +
    +            if (body1.deltaY() == 0 && body2.deltaY() == 0)
    +            {
    +                //  They overlap but neither of them are moving
    +                body1.embedded = true;
    +                body2.embedded = true;
    +            }
    +            else if (body1.deltaY() > body2.deltaY())
    +            {
    +                //  Body1 is moving down and/or Body2 is moving up
    +                this._overlap = body1.y + body1.height - body2.y;
    +
    +                if ((this._overlap > this._maxOverlap) || body1.allowCollision.down == false || body2.allowCollision.up == false)
    +                {
    +                    this._overlap = 0;
    +                }
    +                else
    +                {
    +                    body1.touching.down = true;
    +                    body2.touching.up = true;
    +                }
    +            }
    +            else if (body1.deltaY() < body2.deltaY())
    +            {
    +                //  Body1 is moving up and/or Body2 is moving down
    +                this._overlap = body1.y - body2.height - body2.y;
    +
    +                if ((-this._overlap > this._maxOverlap) || body1.allowCollision.up == false || body2.allowCollision.down == false)
    +                {
    +                    this._overlap = 0;
    +                }
    +                else
    +                {
    +                    body1.touching.up = true;
    +                    body2.touching.down = true;
    +                }
    +            }
    +
    +            //  Then adjust their positions and velocities accordingly (if there was any overlap)
    +            if (this._overlap != 0)
    +            {
    +                body1.overlapY = this._overlap;
    +                body2.overlapY = this._overlap;
    +
    +                if (body1.customSeparateY || body2.customSeparateY)
    +                {
    +                    return true;
    +                }
    +
    +                this._velocity1 = body1.velocity.y;
    +                this._velocity2 = body2.velocity.y;
    +
    +                if (!body1.immovable && !body2.immovable)
    +                {
    +                    this._overlap *= 0.5;
    +
    +                    body1.y = body1.y - this._overlap;
    +                    body2.y += this._overlap;
    +
    +                    this._newVelocity1 = Math.sqrt((this._velocity2 * this._velocity2 * body2.mass) / body1.mass) * ((this._velocity2 > 0) ? 1 : -1);
    +                    this._newVelocity2 = Math.sqrt((this._velocity1 * this._velocity1 * body1.mass) / body2.mass) * ((this._velocity1 > 0) ? 1 : -1);
    +                    this._average = (this._newVelocity1 + this._newVelocity2) * 0.5;
    +                    this._newVelocity1 -= this._average;
    +                    this._newVelocity2 -= this._average;
    +
    +                    body1.velocity.y = this._average + this._newVelocity1 * body1.bounce.y;
    +                    body2.velocity.y = this._average + this._newVelocity2 * body2.bounce.y;
    +                }
    +                else if (!body1.immovable)
    +                {
    +                    body1.y = body1.y - this._overlap;
    +                    body1.velocity.y = this._velocity2 - this._velocity1 * body1.bounce.y;
    +
    +                    //  This is special case code that handles things like horizontal moving platforms you can ride
    +                    if (body2.active && body2.moves && (body1.deltaY() > body2.deltaY()))
    +                    {
    +                        body1.x += body2.x - body2.lastX;
    +                    }
    +                }
    +                else if (!body2.immovable)
    +                {
    +                    body2.y += this._overlap;
    +                    body2.velocity.y = this._velocity1 - this._velocity2 * body2.bounce.y;
    +
    +                    //  This is special case code that handles things like horizontal moving platforms you can ride
    +                    if (body1.sprite.active && body1.moves && (body1.deltaY() < body2.deltaY()))
    +                    {
    +                        body2.x += body1.x - body1.lastX;
    +                    }
    +                }
    +
    +                return true;
    +            }
    +
    +        }
    +
    +        return false;
    +
    +    },
    +
    +    /**
    +    * The core separation function to separate a physics body and a tile.
    +    * @method Phaser.Physics.Arcade#separateTile
    +    * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate.
    +    * @param {Phaser.Tile} tile - The tile to collide against.
    +    * @returns {boolean} Returns true if the bodies were separated, otherwise false.
    +    */
    +    separateTile: function (body, tile) {
    +
    +        this._result = (this.separateTileX(body, tile, true) || this.separateTileY(body, tile, true));
    +
    +    },
    +
    +    /**
    +    * The core separation function to separate a physics body and a tile on the x axis.
    +    * @method Phaser.Physics.Arcade#separateTileX
    +    * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate.
    +    * @param {Phaser.Tile} tile - The tile to collide against.
    +    * @returns {boolean} Returns true if the bodies were separated, otherwise false.
    +    */
    +    separateTileX: function (body, tile, separate) {
    +
    +        //  Can't separate two immovable objects (tiles are always immovable)
    +        if (body.immovable || body.deltaX() == 0 || Phaser.Rectangle.intersects(body.hullX, tile) == false)
    +        {
    +            return false;
    +        }
    +
    +        this._overlap = 0;
    +
    +        //  The hulls overlap, let's process it
    +        this._maxOverlap = body.deltaAbsX() + this.OVERLAP_BIAS;
    +
    +        if (body.deltaX() < 0)
    +        {
    +            //  Moving left
    +            this._overlap = tile.right - body.hullX.x;
    +
    +            if ((this._overlap > this._maxOverlap) || body.allowCollision.left == false || tile.tile.collideRight == false)
    +            {
    +                this._overlap = 0;
    +            }
    +            else
    +            {
    +                body.touching.left = true;
    +            }
    +        }
    +        else
    +        {
    +            //  Moving right
    +            this._overlap = body.hullX.right - tile.x;
    +
    +            if ((this._overlap > this._maxOverlap) || body.allowCollision.right == false || tile.tile.collideLeft == false)
    +            {
    +                this._overlap = 0;
    +            }
    +            else
    +            {
    +                body.touching.right = true;
    +            }
    +        }
    +
    +        //  Then adjust their positions and velocities accordingly (if there was any overlap)
    +        if (this._overlap != 0)
    +        {
    +            if (separate)
    +            {
    +                if (body.deltaX() < 0)
    +                {
    +                    body.x = body.x + this._overlap;
    +                }
    +                else
    +                {
    +                    body.x = body.x - this._overlap;
    +                }
    +
    +                if (body.bounce.x == 0)
    +                {
    +                    body.velocity.x = 0;
    +                }
    +                else
    +                {
    +                    body.velocity.x = -body.velocity.x * body.bounce.x;
    +                }
    +
    +                body.updateHulls();
    +            }
    +
    +            return true;
    +        }
    +        else
    +        {
    +            return false;
    +        }
    +
    +    },
    +
    +    /**
    +    * The core separation function to separate a physics body and a tile on the x axis.
    +    * @method Phaser.Physics.Arcade#separateTileY
    +    * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate.
    +    * @param {Phaser.Tile} tile - The tile to collide against.
    +    * @returns {boolean} Returns true if the bodies were separated, otherwise false.
    +    */
    +    separateTileY: function (body, tile, separate) {
    +
    +        //  Can't separate two immovable objects (tiles are always immovable)
    +        if (body.immovable || body.deltaY() == 0 || Phaser.Rectangle.intersects(body.hullY, tile) == false)
    +        {
    +            return false;
    +        }
    +
    +        this._overlap = 0;
    +
    +        //  The hulls overlap, let's process it
    +        this._maxOverlap = body.deltaAbsY() + this.OVERLAP_BIAS;
    +
    +        if (body.deltaY() < 0)
    +        {
    +            //  Moving up
    +            this._overlap = tile.bottom - body.hullY.y;
    +
    +            if ((this._overlap > this._maxOverlap) || body.allowCollision.up == false || tile.tile.collideDown == false)
    +            {
    +                this._overlap = 0;
    +            }
    +            else
    +            {
    +                body.touching.up = true;
    +            }
    +        }
    +        else
    +        {
    +            //  Moving down
    +            this._overlap = body.hullY.bottom - tile.y;
    +
    +            if ((this._overlap > this._maxOverlap) || body.allowCollision.down == false || tile.tile.collideUp == false)
    +            {
    +                this._overlap = 0;
    +            }
    +            else
    +            {
    +                body.touching.down = true;
    +            }
    +        }
    +
    +        //  Then adjust their positions and velocities accordingly (if there was any overlap)
    +        if (this._overlap != 0)
    +        {
    +            if (separate)
    +            {
    +                if (body.deltaY() < 0)
    +                {
    +                    body.y = body.y + this._overlap;
    +                }
    +                else
    +                {
    +                    body.y = body.y - this._overlap;
    +                }
    +
    +                if (body.bounce.y == 0)
    +                {
    +                    body.velocity.y = 0;
    +                }
    +                else
    +                {
    +                    body.velocity.y = -body.velocity.y * body.bounce.y;
    +                }
    +
    +                body.updateHulls();
    +            }
    +            
    +            return true;
    +        }
    +        else
    +        {
    +            return false;
    +        }
    +
    +    },
    +
    +    /**
    +    * Move the given display object towards the destination object at a steady velocity.
    +    * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.
    +    * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
    +    * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
    +    * Note: The display object doesn't stop moving once it reaches the destination coordinates.
    +    * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)
    +    * 
    +    * @method Phaser.Physics.Arcade#moveToObject
    +    * @param {any} displayObject - The display object to move.
    +    * @param {any} destination - The display object to move towards. Can be any object but must have visible x/y properties.
    +    * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)
    +    * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.
    +    * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.
    +    */
    +    moveToObject: function (displayObject, destination, speed, maxTime) {
    +
    +        speed = speed || 60;
    +        maxTime = maxTime || 0;
    +
    +        this._angle = Math.atan2(destination.y - displayObject.y, destination.x - displayObject.x);
    +        
    +        if (maxTime > 0)
    +        {
    +            //  We know how many pixels we need to move, but how fast?
    +            speed = this.distanceBetween(displayObject, destination) / (maxTime / 1000);
    +        }
    +        
    +        displayObject.body.velocity.x = Math.cos(this._angle) * speed;
    +        displayObject.body.velocity.y = Math.sin(this._angle) * speed;
    +
    +        return this._angle;
    +
    +    },
    +
    +    /**
    +    * Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer.
    +    * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.
    +    * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
    +    * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
    +    * Note: The display object doesn't stop moving once it reaches the destination coordinates.
    +    * 
    +    * @method Phaser.Physics.Arcade#moveToPointer
    +    * @param {any} displayObject - The display object to move.
    +    * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)
    +    * @param {Phaser.Pointer} [pointer] - The pointer to move towards. Defaults to Phaser.Input.activePointer.
    +    * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.
    +    * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.
    +    */
    +    moveToPointer: function (displayObject, speed, pointer, maxTime) {
    +
    +        speed = speed || 60;
    +        pointer = pointer || this.game.input.activePointer;
    +        maxTime = maxTime || 0;
    +
    +        this._angle = this.angleToPointer(displayObject, pointer);
    +        
    +        if (maxTime > 0)
    +        {
    +            //  We know how many pixels we need to move, but how fast?
    +            speed = this.distanceToPointer(displayObject, pointer) / (maxTime / 1000);
    +        }
    +        
    +        displayObject.body.velocity.x = Math.cos(this._angle) * speed;
    +        displayObject.body.velocity.y = Math.sin(this._angle) * speed;
    +
    +        return this._angle;
    +
    +    },
    +
    +    /**
    +    * Move the given display object towards the x/y coordinates at a steady velocity.
    +    * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.
    +    * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.
    +    * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
    +    * Note: The display object doesn't stop moving once it reaches the destination coordinates.
    +    * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)
    +    * 
    +    * @method Phaser.Physics.Arcade#moveToXY
    +    * @param {any} displayObject - The display object to move.
    +    * @param {number} x - The x coordinate to move towards.
    +    * @param {number} y - The y coordinate to move towards.
    +    * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)
    +    * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.
    +    * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.
    +    */
    +    moveToXY: function (displayObject, x, y, speed, maxTime) {
    +
    +        speed = speed || 60;
    +        maxTime = maxTime || 0;
    +
    +        this._angle = Math.atan2(y - displayObject.y, x - displayObject.x);
    +        
    +        if (maxTime > 0)
    +        {
    +            //  We know how many pixels we need to move, but how fast?
    +            speed = this.distanceToXY(displayObject, x, y) / (maxTime / 1000);
    +        }
    +        
    +        displayObject.body.velocity.x = Math.cos(this._angle) * speed;
    +        displayObject.body.velocity.y = Math.sin(this._angle) * speed;
    +
    +        return this._angle;
    +
    +    },
    +
    +    /**
    +    * Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object.
    +    * One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.
    +    * 
    +    * @method Phaser.Physics.Arcade#velocityFromAngle
    +    * @param {number} angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)
    +    * @param {number} [speed=60] - The speed it will move, in pixels per second sq.
    +    * @param {Phaser.Point|object} [point] - The Point object in which the x and y properties will be set to the calculated velocity.
    +    * @return {Phaser.Point} - A Point where point.x contains the velocity x value and point.y contains the velocity y value.
    +    */
    +    velocityFromAngle: function (angle, speed, point) {
    +
    +        speed = speed || 60;
    +        point = point || new Phaser.Point;
    +
    +        return point.setTo((Math.cos(this.game.math.degToRad(angle)) * speed), (Math.sin(this.game.math.degToRad(angle)) * speed));
    +
    +    },
    +
    +    /**
    +    * Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object.
    +    * One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.
    +    * 
    +    * @method Phaser.Physics.Arcade#velocityFromRotation
    +    * @param {number} rotation - The angle in radians.
    +    * @param {number} [speed=60] - The speed it will move, in pixels per second sq.
    +    * @param {Phaser.Point|object} [point] - The Point object in which the x and y properties will be set to the calculated velocity.
    +    * @return {Phaser.Point} - A Point where point.x contains the velocity x value and point.y contains the velocity y value.
    +    */
    +    velocityFromRotation: function (rotation, speed, point) {
    +
    +        speed = speed || 60;
    +        point = point || new Phaser.Point;
    +
    +        return point.setTo((Math.cos(rotation) * speed), (Math.sin(rotation) * speed));
    +
    +    },
    +
    +    /**
    +    * Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object.
    +    * One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.
    +    * 
    +    * @method Phaser.Physics.Arcade#accelerationFromRotation
    +    * @param {number} rotation - The angle in radians.
    +    * @param {number} [speed=60] - The speed it will move, in pixels per second sq.
    +    * @param {Phaser.Point|object} [point] - The Point object in which the x and y properties will be set to the calculated acceleration.
    +    * @return {Phaser.Point} - A Point where point.x contains the acceleration x value and point.y contains the acceleration y value.
    +    */
    +    accelerationFromRotation: function (rotation, speed, point) {
    +
    +        speed = speed || 60;
    +        point = point || new Phaser.Point;
    +
    +        return point.setTo((Math.cos(rotation) * speed), (Math.sin(rotation) * speed));
    +
    +    },
    +
    +    /**
    +    * Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)
    +    * You must give a maximum speed value, beyond which the display object won't go any faster.
    +    * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
    +    * Note: The display object doesn't stop moving once it reaches the destination coordinates.
    +    * 
    +    * @method Phaser.Physics.Arcade#accelerateToObject
    +    * @param {any} displayObject - The display object to move.
    +    * @param {any} destination - The display object to move towards. Can be any object but must have visible x/y properties.
    +    * @param {number} [speed=60] - The speed it will accelerate in pixels per second.
    +    * @param {number} [xSpeedMax=500] - The maximum x velocity the display object can reach.
    +    * @param {number} [ySpeedMax=500] - The maximum y velocity the display object can reach.
    +    * @return {number} The angle (in radians) that the object should be visually set to in order to match its new trajectory.
    +    */
    +    accelerateToObject: function (displayObject, destination, speed, xSpeedMax, ySpeedMax) {
    +
    +        if (typeof speed === 'undefined') { speed = 60; }
    +        if (typeof xSpeedMax === 'undefined') { xSpeedMax = 1000; }
    +        if (typeof ySpeedMax === 'undefined') { ySpeedMax = 1000; }
    +
    +        this._angle = this.angleBetween(displayObject, destination);
    +
    +        displayObject.body.acceleration.setTo(Math.cos(this._angle) * speed, Math.sin(this._angle) * speed);
    +        displayObject.body.maxVelocity.setTo(xSpeedMax, ySpeedMax);
    +
    +        return this._angle;
    +
    +    },
    +
    +    /**
    +    * Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)
    +    * You must give a maximum speed value, beyond which the display object won't go any faster.
    +    * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
    +    * Note: The display object doesn't stop moving once it reaches the destination coordinates.
    +    * 
    +    * @method Phaser.Physics.Arcade#accelerateToPointer
    +    * @param {any} displayObject - The display object to move.
    +    * @param {Phaser.Pointer} [pointer] - The pointer to move towards. Defaults to Phaser.Input.activePointer.
    +    * @param {number} [speed=60] - The speed it will accelerate in pixels per second.
    +    * @param {number} [xSpeedMax=500] - The maximum x velocity the display object can reach.
    +    * @param {number} [ySpeedMax=500] - The maximum y velocity the display object can reach.
    +    * @return {number} The angle (in radians) that the object should be visually set to in order to match its new trajectory.
    +    */
    +    accelerateToPointer: function (displayObject, pointer, speed, xSpeedMax, ySpeedMax) {
    +
    +        if (typeof speed === 'undefined') { speed = 60; }
    +        if (typeof pointer === 'undefined') { pointer = this.game.input.activePointer; }
    +        if (typeof xSpeedMax === 'undefined') { xSpeedMax = 1000; }
    +        if (typeof ySpeedMax === 'undefined') { ySpeedMax = 1000; }
    +
    +        this._angle = this.angleToPointer(displayObject, pointer);
    +        
    +        displayObject.body.acceleration.setTo(Math.cos(this._angle) * speed, Math.sin(this._angle) * speed);
    +        displayObject.body.maxVelocity.setTo(xSpeedMax, ySpeedMax);
    +
    +        return this._angle;
    +
    +    },
    +
    +    /**
    +    * Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)
    +    * You must give a maximum speed value, beyond which the display object won't go any faster.
    +    * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.
    +    * Note: The display object doesn't stop moving once it reaches the destination coordinates.
    +    * 
    +    * @method Phaser.Physics.Arcade#accelerateToXY
    +    * @param {any} displayObject - The display object to move.
    +    * @param {number} x - The x coordinate to accelerate towards.
    +    * @param {number} y - The y coordinate to accelerate towards.
    +    * @param {number} [speed=60] - The speed it will accelerate in pixels per second.
    +    * @param {number} [xSpeedMax=500] - The maximum x velocity the display object can reach.
    +    * @param {number} [ySpeedMax=500] - The maximum y velocity the display object can reach.
    +    * @return {number} The angle (in radians) that the object should be visually set to in order to match its new trajectory.
    +    */
    +    accelerateToXY: function (displayObject, x, y, speed, xSpeedMax, ySpeedMax) {
    +
    +        if (typeof speed === 'undefined') { speed = 60; }
    +        if (typeof xSpeedMax === 'undefined') { xSpeedMax = 1000; }
    +        if (typeof ySpeedMax === 'undefined') { ySpeedMax = 1000; }
    +
    +        this._angle = this.angleToXY(displayObject, x, y);
    +
    +        displayObject.body.acceleration.setTo(Math.cos(this._angle) * speed, Math.sin(this._angle) * speed);
    +        displayObject.body.maxVelocity.setTo(xSpeedMax, ySpeedMax);
    +
    +        return this._angle;
    +
    +    },
    +
    +    /**
    +    * Find the distance between two display objects (like Sprites).
    +    * 
    +    * @method Phaser.Physics.Arcade#distanceBetween
    +    * @param {any} source - The Display Object to test from.
    +    * @param {any} target - The Display Object to test to.
    +    * @return {number} The distance between the source and target objects.
    +    */
    +    distanceBetween: function (source, target) {
    +
    +        this._dx = source.x - target.x;
    +        this._dy = source.y - target.y;
    +        
    +        return Math.sqrt(this._dx * this._dx + this._dy * this._dy);
    +
    +    },
    +
    +    /**
    +    * Find the distance between a display object (like a Sprite) and the given x/y coordinates.
    +    * The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.
    +    * If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()
    +    * 
    +    * @method Phaser.Physics.Arcade#distanceToXY
    +    * @param {any} displayObject - The Display Object to test from.
    +    * @param {number} x - The x coordinate to move towards.
    +    * @param {number} y - The y coordinate to move towards.
    +    * @return {number} The distance between the object and the x/y coordinates.
    +    */
    +    distanceToXY: function (displayObject, x, y) {
    +
    +        this._dx = displayObject.x - x;
    +        this._dy = displayObject.y - y;
    +        
    +        return Math.sqrt(this._dx * this._dx + this._dy * this._dy);
    +
    +    },
    +
    +    /**
    +    * Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used.
    +    * The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.
    +    * If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()
    +    * 
    +    * @method Phaser.Physics.Arcade#distanceToPointer
    +    * @param {any} displayObject - The Display Object to test from.
    +    * @param {Phaser.Pointer} [pointer] - The Phaser.Pointer to test to. If none is given then Input.activePointer is used.
    +    * @return {number} The distance between the object and the Pointer.
    +    */
    +    distanceToPointer: function (displayObject, pointer) {
    +
    +        pointer = pointer || this.game.input.activePointer;
    +
    +        this._dx = displayObject.worldX - pointer.x;
    +        this._dy = displayObject.worldY - pointer.y;
    +        
    +        return Math.sqrt(this._dx * this._dx + this._dy * this._dy);
    +
    +    },
    +
    +    /**
    +    * Find the angle in radians between two display objects (like Sprites).
    +    * 
    +    * @method Phaser.Physics.Arcade#angleBetween
    +    * @param {any} source - The Display Object to test from.
    +    * @param {any} target - The Display Object to test to.
    +    * @return {number} The angle in radians between the source and target display objects.
    +    */
    +    angleBetween: function (source, target) {
    +
    +        this._dx = target.x - source.x;
    +        this._dy = target.y - source.y;
    +
    +        return Math.atan2(this._dy, this._dx);
    +
    +    },
    +
    +    /**
    +    * Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.
    +    * 
    +    * @method Phaser.Physics.Arcade#angleToXY
    +    * @param {any} displayObject - The Display Object to test from.
    +    * @param {number} x - The x coordinate to get the angle to.
    +    * @param {number} y - The y coordinate to get the angle to.
    +    * @return {number} The angle in radians between displayObject.x/y to Pointer.x/y
    +    */
    +    angleToXY: function (displayObject, x, y) {
    +
    +        this._dx = x - displayObject.x;
    +        this._dy = y - displayObject.y;
    +        
    +        return Math.atan2(this._dy, this._dx);
    +
    +    },
    +    
    +    /**
    +    * Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.
    +    * 
    +    * @method Phaser.Physics.Arcade#angleToPointer
    +    * @param {any} displayObject - The Display Object to test from.
    +    * @param {Phaser.Pointer} [pointer] - The Phaser.Pointer to test to. If none is given then Input.activePointer is used.
    +    * @return {number} The angle in radians between displayObject.x/y to Pointer.x/y
    +    */
    +    angleToPointer: function (displayObject, pointer) {
    +
    +        pointer = pointer || this.game.input.activePointer;
    +
    +        this._dx = pointer.worldX - displayObject.x;
    +        this._dy = pointer.worldY - displayObject.y;
    +        
    +        return Math.atan2(this._dy, this._dx);
    +
    +    }
    +
    +};
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/BitmapText.js.html b/docs/BitmapText.js.html new file mode 100644 index 00000000..7c793fa8 --- /dev/null +++ b/docs/BitmapText.js.html @@ -0,0 +1,731 @@ + + + + + + Phaser Source: gameobjects/BitmapText.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/BitmapText.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Creates a new <code>BitmapText</code>.
    +* @class Phaser.BitmapText
    +* @constructor
    +* @param {Phaser.Game} game - A reference to the currently running game.
    +* @param {number} x - X position of the new bitmapText object.
    +* @param {number} y - Y position of the new bitmapText object.
    +* @param {string} text - The actual text that will be written.
    +* @param {object} style - The style object containing style attributes like font, font size , etc.
    +*/
    +Phaser.BitmapText = function (game, x, y, text, style) {
    +
    +    x = x || 0;
    +    y = y || 0;
    +
    +    text = text || '';
    +    style = style || '';
    +
    +	/** 
    +	* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
    +	* @default
    +	*/
    +    this.exists = true;
    +
    +	/**
    +    * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
    +	* @default
    +	*/
    +    this.alive = true;
    +
    +	/**
    +    * @property {Description} group - Description.
    + 	* @default
    + 	*/
    +    this.group = null;
    +
    +	/**
    +    * @property {string} name - Description.
    +  	* @default
    +  	*/
    +    this.name = '';
    +
    +    /**
    +    * @property {Phaser.Game} game - A reference to the currently running Game.
    +    */
    +    this.game = game;
    +
    +    PIXI.BitmapText.call(this, text, style);
    +
    +    /**
    +    * @property {Description} type - Description.
    +    */
    +    this.type = Phaser.BITMAPTEXT;
    +
    +	/**
    +	* @property {number} position.x - Description.
    +	*/
    +    this.position.x = x;
    +    
    +	/**
    +	* @property {number} position.y - Description.
    +	*/
    +    this.position.y = y;
    +
    +    //  Replaces the PIXI.Point with a slightly more flexible one
    +	/**
    +	* @property {Phaser.Point} anchor - Description.
    +	*/
    +    this.anchor = new Phaser.Point();
    +    
    +	/**
    +	* @property {Phaser.Point} scale - Description.
    +	*/
    +    this.scale = new Phaser.Point(1, 1);
    +
    +    //  A mini cache for storing all of the calculated values
    +	/**
    +	* @property {function} _cache - Description.
    +	* @private
    +	*/
    +    this._cache = { 
    +
    +        dirty: false,
    +
    +        //  Transform cache
    +        a00: 1, a01: 0, a02: x, a10: 0, a11: 1, a12: y, id: 1, 
    +
    +        //  The previous calculated position
    +        x: -1, y: -1,
    +
    +        //  The actual scale values based on the worldTransform
    +        scaleX: 1, scaleY: 1
    +
    +    };
    +
    +    this._cache.x = this.x;
    +    this._cache.y = this.y;
    +
    +	/**
    +	* @property {boolean} renderable - Description.
    +	* @private
    +	*/
    +    this.renderable = true;
    +
    +};
    +
    +Phaser.BitmapText.prototype = Object.create(PIXI.BitmapText.prototype);
    +// Phaser.BitmapText.prototype = Phaser.Utils.extend(true, PIXI.BitmapText.prototype);
    +Phaser.BitmapText.prototype.constructor = Phaser.BitmapText;
    +
    +/**
    +* Automatically called by World.update
    +* @method Phaser.BitmapText.prototype.update
    +*/
    +Phaser.BitmapText.prototype.update = function() {
    +
    +    if (!this.exists)
    +    {
    +        return;
    +    }
    +
    +    this._cache.dirty = false;
    +
    +    this._cache.x = this.x;
    +    this._cache.y = this.y;
    +
    +    if (this.position.x != this._cache.x || this.position.y != this._cache.y)
    +    {
    +        this.position.x = this._cache.x;
    +        this.position.y = this._cache.y;
    +        this._cache.dirty = true;
    +    }
    +
    +    this.pivot.x = this.anchor.x*this.width;
    +    this.pivot.y = this.anchor.y*this.height;
    +
    +}
    +
    +/**
    +* @method Phaser.Text.prototype.destroy
    +*/
    +Phaser.BitmapText.prototype.destroy = function() {
    +
    +    if (this.group)
    +    {
    +        this.group.remove(this);
    +    }
    +
    +    if (this.canvas.parentNode)
    +    {
    +        this.canvas.parentNode.removeChild(this.canvas);
    +    }
    +    else
    +    {
    +        this.canvas = null;
    +        this.context = null;
    +    }
    +
    +    this.exists = false;
    +
    +    this.group = null;
    +
    +}
    +
    +/**
    +* Get
    +* @returns {Description}
    +*//**
    +* Set
    +* @param {Description} value - Description
    +*/
    +Object.defineProperty(Phaser.BitmapText.prototype, 'angle', {
    +
    +    get: function() {
    +        return Phaser.Math.radToDeg(this.rotation);
    +    },
    +
    +    set: function(value) {
    +        this.rotation = Phaser.Math.degToRad(value);
    +    }
    +
    +});
    +
    +/**
    +* Get
    +* @returns {Description}
    +*//**
    +* Set
    +* @param {Description} value - Description
    +*/
    +Object.defineProperty(Phaser.BitmapText.prototype, 'x', {
    +
    +    get: function() {
    +        return this.position.x;
    +    },
    +
    +    set: function(value) {
    +        this.position.x = value;
    +    }
    +
    +});
    +
    +/**
    +* Get
    +* @returns {Description}
    +*//**
    +* Set
    +* @param {Description} value - Description
    +*/
    +Object.defineProperty(Phaser.BitmapText.prototype, 'y', {
    +
    +    get: function() {
    +        return this.position.y;
    +    },
    +
    +    set: function(value) {
    +        this.position.y = value;
    +    }
    +
    +});
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Body.js.html b/docs/Body.js.html new file mode 100644 index 00000000..00d0cb23 --- /dev/null +++ b/docs/Body.js.html @@ -0,0 +1,840 @@ + + + + + + Phaser Source: physics/arcade/Body.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: physics/arcade/Body.js

    + +
    +
    +
    Phaser.Physics.Arcade.Body = function (sprite) {
    +
    +	this.sprite = sprite;
    +	this.game = sprite.game;
    +
    +	this.offset = new Phaser.Point;
    +
    +	this.x = sprite.x;
    +	this.y = sprite.y;
    +	this.preX = sprite.x;
    +	this.preY = sprite.y;
    +	this.preRotation = sprite.angle;
    +	this.screenX = sprite.x;
    +	this.screenY = sprite.y;
    +
    +	//	un-scaled original size
    +	this.sourceWidth = sprite.currentFrame.sourceSizeW;
    +	this.sourceHeight = sprite.currentFrame.sourceSizeH;
    +
    +	//	calculated (scaled) size
    +	this.width = sprite.currentFrame.sourceSizeW;
    +	this.height = sprite.currentFrame.sourceSizeH;
    +	this.halfWidth = Math.floor(sprite.currentFrame.sourceSizeW / 2);
    +	this.halfHeight = Math.floor(sprite.currentFrame.sourceSizeH / 2);
    +
    +	//	Scale value cache
    +	this._sx = sprite.scale.x;
    +	this._sy = sprite.scale.y;
    +
    +    this.velocity = new Phaser.Point;
    +    this.acceleration = new Phaser.Point;
    +    this.drag = new Phaser.Point;
    +    this.gravity = new Phaser.Point;
    +    this.bounce = new Phaser.Point;
    +    this.maxVelocity = new Phaser.Point(10000, 10000);
    +
    +    this.angularVelocity = 0;
    +    this.angularAcceleration = 0;
    +    this.angularDrag = 0;
    +    this.maxAngular = 1000;
    +    this.mass = 1;
    +
    +    this.skipQuadTree = false;
    +    this.quadTreeIDs = [];
    +    this.quadTreeIndex = -1;
    +
    +    //	Allow collision
    +    this.allowCollision = { none: false, any: true, up: true, down: true, left: true, right: true };
    +    this.touching = { none: true, up: false, down: false, left: false, right: false };
    +    this.wasTouching = { none: true, up: false, down: false, left: false, right: false };
    +    this.facing = Phaser.NONE;
    +
    +    this.immovable = false;
    +    this.moves = true;
    +    this.rotation = 0;
    +    this.allowRotation = true;
    +    this.allowGravity = true;
    +
    +    //	These two flags allow you to disable the custom separation that takes place
    +    //	Used in combination with your own collision processHandler you can create whatever
    +    //	type of collision response you need.
    +    this.customSeparateX = false;
    +    this.customSeparateY = false;
    +
    +    //	When this body collides with another the amount of overlap is stored in here
    +    //	These values are useful if you want to provide your own custom separation logic.
    +    this.overlapX = 0;
    +    this.overlapY = 0;
    +
    +    this.hullX = new Phaser.Rectangle();
    +    this.hullY = new Phaser.Rectangle();
    +
    +    //	If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true
    +    this.embedded = false;
    +
    +    this.collideWorldBounds = false;
    +
    +};
    +
    +Phaser.Physics.Arcade.Body.prototype = {
    +
    +	updateBounds: function (centerX, centerY, scaleX, scaleY) {
    +
    +		if (scaleX != this._sx || scaleY != this._sy)
    +		{
    +			this.width = this.sourceWidth * scaleX;
    +			this.height = this.sourceHeight * scaleY;
    +			this.halfWidth = Math.floor(this.width / 2);
    +			this.halfHeight = Math.floor(this.height / 2);
    +			this._sx = scaleX;
    +			this._sy = scaleY;
    +		}
    +
    +	},
    +
    +	preUpdate: function () {
    +
    +		//	Store and reset collision flags
    +	    this.wasTouching.none = this.touching.none;
    +	    this.wasTouching.up = this.touching.up;
    +	    this.wasTouching.down = this.touching.down;
    +	    this.wasTouching.left = this.touching.left;
    +	    this.wasTouching.right = this.touching.right;
    +
    +	    this.touching.none = true;
    +	    this.touching.up = false;
    +	    this.touching.down = false;
    +	    this.touching.left = false;
    +	    this.touching.right = false;
    +
    +	    this.embedded = false;
    +
    +		this.screenX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x;
    +		this.screenY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y;
    +
    +		this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x;
    +		this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y;
    +
    +		this.preRotation = this.sprite.angle;
    +
    +		this.x = this.preX;
    +		this.y = this.preY;
    +		this.rotation = this.preRotation;
    +
    +		if (this.moves)
    +		{
    +			this.game.physics.updateMotion(this);
    +
    +			if (this.collideWorldBounds)
    +			{
    +				this.checkWorldBounds();
    +			}
    +
    +			this.updateHulls();
    +		}
    +
    +		if (this.skipQuadTree == false && this.allowCollision.none == false && this.sprite.visible && this.sprite.alive)
    +		{
    +		    this.quadTreeIDs = [];
    +		    this.quadTreeIndex = -1;
    +			this.game.physics.quadTree.insert(this);
    +		}
    +
    +	},
    +
    +	postUpdate: function () {
    +
    +		//	Calculate forward-facing edge
    +		if (this.deltaX() == 0 && this.deltaY() == 0)
    +		{
    +			//	Can't work it out from the Body, how about from x position?
    +			if (this.sprite.deltaX() == 0 && this.sprite.deltaY() == 0)
    +			{
    +				//	still as a statue
    +			}
    +		}
    +
    +		if (this.deltaX() < 0)
    +		{
    +			this.facing = Phaser.LEFT;
    +		}
    +		else if (this.deltaX() > 0)
    +		{
    +			this.facing = Phaser.RIGHT;
    +		}
    +
    +		if (this.deltaY() < 0)
    +		{
    +			this.facing = Phaser.UP;
    +		}
    +		else if (this.deltaY() > 0)
    +		{
    +			this.facing = Phaser.DOWN;
    +		}
    +
    +		this.sprite.x += this.deltaX();
    +		this.sprite.y += this.deltaY();
    +
    +		if (this.allowRotation)
    +		{
    +			this.sprite.angle += this.deltaZ();
    +		}
    +
    +	},
    +
    +	updateHulls: function () {
    +
    +		this.hullX.setTo(this.x, this.preY, this.width, this.height);
    +		this.hullY.setTo(this.preX, this.y, this.width, this.height);
    +
    +	},
    +
    +	checkWorldBounds: function () {
    +
    +		if (this.x < this.game.world.bounds.x)
    +		{
    +			this.x = this.game.world.bounds.x;
    +			this.velocity.x *= -this.bounce.x;
    +		}
    +		else if (this.right > this.game.world.bounds.right)
    +		{
    +			this.x = this.game.world.bounds.right - this.width;
    +			this.velocity.x *= -this.bounce.x;
    +		}
    +
    +		if (this.y < this.game.world.bounds.y)
    +		{
    +			this.y = this.game.world.bounds.y;
    +			this.velocity.y *= -this.bounce.y;
    +		}
    +		else if (this.bottom > this.game.world.bounds.bottom)
    +		{
    +			this.y = this.game.world.bounds.bottom - this.height;
    +			this.velocity.y *= -this.bounce.y;
    +		}
    +
    +	},
    +
    +	setSize: function (width, height, offsetX, offsetY) {
    +
    +		offsetX = offsetX || this.offset.x;
    +		offsetY = offsetY || this.offset.y;
    +
    +		this.sourceWidth = width;
    +		this.sourceHeight = height;
    +		this.width = this.sourceWidth * this._sx;
    +		this.height = this.sourceHeight * this._sy;
    +		this.halfWidth = Math.floor(this.width / 2);
    +		this.halfHeight = Math.floor(this.height / 2);
    +		this.offset.setTo(offsetX, offsetY);
    +
    +	},
    +
    +	reset: function () {
    +
    +		this.velocity.setTo(0, 0);
    +		this.acceleration.setTo(0, 0);
    +
    +	    this.angularVelocity = 0;
    +	    this.angularAcceleration = 0;
    +		this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x;
    +		this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y;
    +		this.preRotation = this.sprite.angle;
    +
    +		this.x = this.preX;
    +		this.y = this.preY;
    +		this.rotation = this.preRotation;
    +
    +	},
    +
    +    deltaAbsX: function () {
    +        return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX());
    +    },
    +
    +    deltaAbsY: function () {
    +        return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY());
    +    },
    +
    +    deltaX: function () {
    +        return this.x - this.preX;
    +    },
    +
    +    deltaY: function () {
    +        return this.y - this.preY;
    +    },
    +
    +    deltaZ: function () {
    +        return this.rotation - this.preRotation;
    +    }
    +
    +};
    +
    +Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", {
    +    
    +    /**
    +    * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
    +    * @method bottom
    +    * @return {number}
    +    **/
    +    get: function () {
    +        return this.y + this.height;
    +    },
    +
    +    /**
    +    * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.
    +    * @method bottom
    +    * @param {number} value
    +    **/    
    +    set: function (value) {
    +
    +        if (value <= this.y)
    +        {
    +            this.height = 0;
    +        }
    +        else
    +        {
    +            this.height = (this.y - value);
    +        }
    +        
    +    }
    +
    +});
    +
    +Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
    +    
    +    /**
    +    * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties.
    +    * However it does affect the width property.
    +    * @method right
    +    * @return {number}
    +    **/    
    +    get: function () {
    +        return this.x + this.width;
    +    },
    +
    +    /**
    +    * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties.
    +    * However it does affect the width property.
    +    * @method right
    +    * @param {number} value
    +    **/
    +    set: function (value) {
    +
    +        if (value <= this.x)
    +        {
    +            this.width = 0;
    +        }
    +        else
    +        {
    +            this.width = this.x + value;
    +        }
    +
    +    }
    +
    +});
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Bullet.js.html b/docs/Bullet.js.html new file mode 100644 index 00000000..7d551922 --- /dev/null +++ b/docs/Bullet.js.html @@ -0,0 +1,1128 @@ + + + + + + Phaser Source: gameobjects/Bullet.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/Bullet.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Warning: Bullet is an experimental object that we don't advise using for now.
    +*
    +* A Bullet is like a stripped-down Sprite, useful for when you just need to get something moving around the screen quickly with little of the extra
    +* features that a Sprite supports.
    +* Bullet is MISSING the following:
    +*
    +* animation, all input events, crop support, health/damage, loadTexture
    +*
    +* @class Phaser.Bullet
    +* @constructor
    +* @param {Phaser.Game} game - Current game instance.
    +* @param {number} x - X position of the new bullet.
    +* @param {number} y - Y position of the new bullet.
    +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
    +*/
    +Phaser.Bullet = function (game, x, y, key, frame) {
    +
    +    x = x || 0;
    +    y = y || 0;
    +    key = key || null;
    +    frame = frame || null;
    +    
    +    /**
    +	* @property {Phaser.Game} game - A reference to the currently running Game.
    +	*/
    +	this.game = game;
    + 
    +	/**
    +	* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
    +	* @default
    +	*/
    +    this.exists = true;
    +
    +	/**
    +    * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
    +   	* @default
    +   	*/
    +    this.alive = true;
    +
    +	/**
    +    * @property {Description} group - Description.
    +   	* @default
    +   	*/
    +    this.group = null;
    +
    +    /**
    +     * @property {string} name - The user defined name given to this Sprite.
    +     * @default
    +     */
    +    this.name = '';
    +
    +    /**
    +	* @property {Description} type - Description.
    +	*/
    +    this.type = Phaser.BULLET;
    +
    +    /**
    +	* @property {number} renderOrderID - Description.
    +	* @default
    +	*/
    +    this.renderOrderID = -1;
    +
    +    /**
    +    * If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
    +	* The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.
    +	* @property {number} lifespan
    +	* @default
    +	*/    
    +    this.lifespan = 0;
    +
    +    /**
    +    * @property {Events} events - The Signals you can subscribe to that are dispatched when certain things happen on this Sprite or its components
    +    */
    +    this.events = new Phaser.Events(this);
    +
    +    /**
    +    *  @property {Description} key - Description.
    +    */
    +    this.key = key;
    +
    +    if (key instanceof Phaser.RenderTexture)
    +    {
    +        PIXI.Sprite.call(this, key);
    +
    +        this.currentFrame = this.game.cache.getTextureFrame(key.name);
    +    }
    +    else if (key instanceof PIXI.Texture)
    +    {
    +        PIXI.Sprite.call(this, key);
    +
    +        this.currentFrame = frame;
    +    }
    +    else
    +    {
    +        if (key == null || this.game.cache.checkImageKey(key) == false)
    +        {
    +            key = '__default';
    +        }
    +
    +        PIXI.Sprite.call(this, PIXI.TextureCache[key]);
    +
    +        if (this.game.cache.isSpriteSheet(key))
    +        {
    +        	/*
    +            this.animations.loadFrameData(this.game.cache.getFrameData(key));
    +
    +            if (frame !== null)
    +            {
    +                if (typeof frame === 'string')
    +                {
    +                    this.frameName = frame;
    +                }
    +                else
    +                {
    +                    this.frame = frame;
    +                }
    +            }
    +            */
    +        }
    +        else
    +        {
    +            this.currentFrame = this.game.cache.getFrame(key);
    +        }
    +    }
    +
    +    /**
    +    * The anchor sets the origin point of the texture.
    +    * The default is 0,0 this means the textures origin is the top left 
    +    * Setting than anchor to 0.5,0.5 means the textures origin is centered
    +    * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
    +    *
    +    * @property {Phaser.Point} anchor
    +    */
    +    this.anchor = new Phaser.Point();
    +
    +    /**
    +    * @property {number} x - Description.
    +    */
    +    this.x = x;
    +    
    +    /**
    +    * @property {number} y - Description.
    +    */
    +    this.y = y;
    +
    +    /**
    +    * @property {Description} position - Description.
    +    */
    +	this.position.x = x;
    +	this.position.y = y;
    +
    +    /**
    +    * Should this Sprite be automatically culled if out of range of the camera?
    +    * A culled sprite has its visible property set to 'false'.
    +    * Note that this check doesn't look at this Sprites children, which may still be in camera range.
    +    * So you should set autoCull to false if the Sprite will have children likely to still be in camera range.
    +    *
    +    * @property {boolean} autoCull
    +    * @default
    +    */
    +    this.autoCull = false;
    +
    +    /**
    +    * @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one.
    +    */ 
    +    this.scale = new Phaser.Point(1, 1);
    +
    +    /**
    +    * @property {Phaser.Point} _cache - A mini cache for storing all of the calculated values.
    +    * @private
    +    */
    +    this._cache = { 
    +
    +        dirty: false,
    +
    +        //  Transform cache
    +        a00: -1, a01: -1, a02: -1, a10: -1, a11: -1, a12: -1, id: -1, 
    +
    +        //  Input specific transform cache
    +        i01: -1, i10: -1, idi: -1,
    +
    +        //  Bounds check
    +        left: null, right: null, top: null, bottom: null, 
    +
    +        //  The previous calculated position
    +        x: -1, y: -1,
    +
    +        //  The actual scale values based on the worldTransform
    +        scaleX: 1, scaleY: 1,
    +
    +        //  The width/height of the image, based on the un-modified frame size multiplied by the final calculated scale size
    +        width: this.currentFrame.sourceSizeW, height: this.currentFrame.sourceSizeH,
    +
    +        //  The actual width/height of the image if from a trimmed atlas, multiplied by the final calculated scale size
    +        halfWidth: Math.floor(this.currentFrame.sourceSizeW / 2), halfHeight: Math.floor(this.currentFrame.sourceSizeH / 2),
    +
    +        boundsX: 0, boundsY: 0,
    +
    +        //  If this sprite visible to the camera (regardless of being set to visible or not)
    +        cameraVisible: true
    +
    +    };
    +  
    +    /**
    +    * @property {Phaser.Point} offset - Corner point defaults.
    +    */    
    +    this.offset = new Phaser.Point;
    +    
    +    /**
    +    * @property {Phaser.Point} center - Description.
    +    */
    +    this.center = new Phaser.Point(x + Math.floor(this._cache.width / 2), y + Math.floor(this._cache.height / 2));
    +   
    +    /**
    +    * @property {Phaser.Point} topLeft - Description.
    +    */
    +    this.topLeft = new Phaser.Point(x, y);
    +    
    +    /**
    +    * @property {Phaser.Point} topRight - Description.
    +    */
    +    this.topRight = new Phaser.Point(x + this._cache.width, y);
    +    
    +    /**
    +    * @property {Phaser.Point} bottomRight - Description.
    +    */
    +    this.bottomRight = new Phaser.Point(x + this._cache.width, y + this._cache.height);
    +    
    +    /**
    +    * @property {Phaser.Point} bottomLeft - Description.
    +    */
    +    this.bottomLeft = new Phaser.Point(x, y + this._cache.height);
    +    
    +    /**
    +    * @property {Phaser.Rectangle} bounds - Description.
    +    */
    +    this.bounds = new Phaser.Rectangle(x, y, this._cache.width, this._cache.height);
    +
    +    /**
    +    * @property {Phaser.Physics.Arcade.Body} body - Set-up the physics body.
    +    */
    +    this.body = new Phaser.Physics.Arcade.Body(this);
    +
    +    /**
    +    * @property {Description} inWorld - World bounds check.
    +    */
    +    this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds);
    +    
    +    /**
    +    * @property {number} inWorldThreshold - World bounds check.
    +    * @default
    +    */
    +    this.inWorldThreshold = 0;
    +
    +    /**
    +    * @property {boolean} outOfBoundsKill - Kills this sprite as soon as it goes outside of the World bounds.
    +    * @default
    +    */
    +    this.outOfBoundsKill = false;
    +    
    +    /**
    +    * @property {boolean} _outOfBoundsFired - Description.
    +    * @private
    +    * @default
    +    */
    +    this._outOfBoundsFired = false;
    +
    +    /**
    +    * A Sprite that is fixed to the camera ignores the position of any ancestors in the display list and uses its x/y coordinates as offsets from the top left of the camera.
    +    * @property {boolean} fixedToCamera - Fixes this Sprite to the Camera.
    +    * @default
    +    */
    +    this.fixedToCamera = false;
    +
    +};
    +
    +Phaser.Bullet.prototype = Object.create(PIXI.Sprite.prototype);
    +Phaser.Bullet.prototype.constructor = Phaser.Bullet;
    +
    +/**
    +* Automatically called by World.preUpdate. You can create your own update in Objects that extend Phaser.Sprite.
    +* @method Phaser.Sprite.prototype.preUpdate
    +*/
    +Phaser.Bullet.prototype.preUpdate = function() {
    +
    +    if (!this.exists)
    +    {
    +        this.renderOrderID = -1;
    +        return;
    +    }
    +
    +    if (this.lifespan > 0)
    +    {
    +        this.lifespan -= this.game.time.elapsed;
    +
    +        if (this.lifespan <= 0)
    +        {
    +            this.kill();
    +            return;
    +        }
    +    }
    +
    +    this._cache.dirty = false;
    +
    +    if (this.visible)
    +    {
    +        this.renderOrderID = this.game.world.currentRenderOrderID++;
    +    }
    +
    +    this.prevX = this.x;
    +    this.prevY = this.y;
    +
    +    //  |a c tx|
    +    //  |b d ty|
    +    //  |0 0  1|
    +
    +    if (this.worldTransform[1] != this._cache.i01 || this.worldTransform[3] != this._cache.i10)
    +    {
    +        this._cache.a00 = this.worldTransform[0];  //  scaleX         a
    +        this._cache.a01 = this.worldTransform[1];  //  skewY          c
    +        this._cache.a10 = this.worldTransform[3];  //  skewX          b
    +        this._cache.a11 = this.worldTransform[4];  //  scaleY         d
    +
    +        this._cache.i01 = this.worldTransform[1];  //  skewY          c (remains non-modified for input checks)
    +        this._cache.i10 = this.worldTransform[3];  //  skewX          b (remains non-modified for input checks)
    +
    +        this._cache.scaleX = Math.sqrt((this._cache.a00 * this._cache.a00) + (this._cache.a01 * this._cache.a01)); // round this off a bit?
    +        this._cache.scaleY = Math.sqrt((this._cache.a10 * this._cache.a10) + (this._cache.a11 * this._cache.a11)); // round this off a bit?
    +
    +        this._cache.a01 *= -1;
    +        this._cache.a10 *= -1;
    +
    +        this._cache.dirty = true;
    +    }
    +
    +    if (this.worldTransform[2] != this._cache.a02 || this.worldTransform[5] != this._cache.a12)
    +    {
    +        this._cache.a02 = this.worldTransform[2];  //  translateX     tx
    +        this._cache.a12 = this.worldTransform[5];  //  translateY     ty
    +        this._cache.dirty = true;
    +    }
    +
    +    //  Re-run the camera visibility check
    +    if (this._cache.dirty)
    +    {
    +        this._cache.cameraVisible = Phaser.Rectangle.intersects(this.game.world.camera.screenView, this.bounds, 0);
    +
    +        if (this.autoCull == true)
    +        {
    +            //  Won't get rendered but will still get its transform updated
    +            this.renderable = this._cache.cameraVisible;
    +        }
    +
    +        //  Update our physics bounds
    +        if (this.body)
    +        {
    +            this.body.updateBounds(this.center.x, this.center.y, this._cache.scaleX, this._cache.scaleY);
    +        }
    +    }
    +
    +    if (this.body)
    +    {
    +        this.body.preUpdate();
    +    }
    +
    +}
    +
    +Phaser.Bullet.prototype.postUpdate = function() {
    +
    +    if (this.exists)
    +    {
    +        //  The sprite is positioned in this call, after taking into consideration motion updates and collision
    +        if (this.body)
    +        {
    +            this.body.postUpdate();
    +        }
    +
    +        if (this.fixedToCamera)
    +        {
    +            this._cache.x = this.game.camera.view.x + this.x;
    +            this._cache.y = this.game.camera.view.y + this.y;
    +        }
    +        else
    +        {
    +            this._cache.x = this.x;
    +            this._cache.y = this.y;
    +        }
    +
    +        if (this.position.x != this._cache.x || this.position.y != this._cache.y)
    +        {
    +            this.position.x = this._cache.x;
    +            this.position.y = this._cache.y;
    +        }
    +    }
    +
    +}
    +
    +Phaser.Bullet.prototype.deltaAbsX = function () {
    +    return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX());
    +}
    +
    +Phaser.Bullet.prototype.deltaAbsY = function () {
    +    return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY());
    +}
    +
    +Phaser.Bullet.prototype.deltaX = function () {
    +    return this.x - this.prevX;
    +}
    +
    +Phaser.Bullet.prototype.deltaY = function () {
    +    return this.y - this.prevY;
    +}
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Bullet.prototype.revive
    +*/
    +Phaser.Bullet.prototype.revive = function(health) {
    +
    +    if (typeof health === 'undefined') { health = 1; }
    +
    +    this.alive = true;
    +    this.exists = true;
    +    this.visible = true;
    +    this.health = health;
    +
    +    this.events.onRevived.dispatch(this);
    +
    +}
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Bullet.prototype.kill
    +*/
    +Phaser.Bullet.prototype.kill = function() {
    +
    +    this.alive = false;
    +    this.exists = false;
    +    this.visible = false;
    +    this.events.onKilled.dispatch(this);
    +
    +}
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Bullet.prototype.destroy
    +*/
    +Phaser.Bullet.prototype.destroy = function() {
    +
    +    if (this.group)
    +    {
    +        this.group.remove(this);
    +    }
    +
    +    this.events.destroy();
    +
    +    this.alive = false;
    +    this.exists = false;
    +    this.visible = false;
    +
    +    this.game = null;
    +
    +}
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Sprite.prototype.reset
    +*/
    +Phaser.Bullet.prototype.reset = function(x, y) {
    +
    +    this.x = x;
    +    this.y = y;
    +    this.position.x = this.x;
    +    this.position.y = this.y;
    +    this.alive = true;
    +    this.exists = true;
    +    this.visible = true;
    +    this.renderable = true;
    +    this._outOfBoundsFired = false;
    +
    +    if (this.body)
    +    {
    +        this.body.reset();
    +    }
    +    
    +}
    +
    +/**
    +* Description.
    +*   
    +* @method Phaser.Sprite.prototype.updateBounds
    +*/
    +Phaser.Bullet.prototype.updateBounds = function() {
    +
    +    //  Update the edge points
    +
    +    this.offset.setTo(this._cache.a02 - (this.anchor.x * this._cache.width), this._cache.a12 - (this.anchor.y * this._cache.height));
    +
    +    this.getLocalPosition(this.center, this.offset.x + this._cache.halfWidth, this.offset.y + this._cache.halfHeight);
    +    this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y);
    +    this.getLocalPosition(this.topRight, this.offset.x + this._cache.width, this.offset.y);
    +    this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this._cache.height);
    +    this.getLocalPosition(this.bottomRight, this.offset.x + this._cache.width, this.offset.y + this._cache.height);
    +
    +    this._cache.left = Phaser.Math.min(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x);
    +    this._cache.right = Phaser.Math.max(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x);
    +    this._cache.top = Phaser.Math.min(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y);
    +    this._cache.bottom = Phaser.Math.max(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y);
    +
    +    this.bounds.setTo(this._cache.left, this._cache.top, this._cache.right - this._cache.left, this._cache.bottom - this._cache.top);
    +
    +    //  This is the coordinate the Bullet was at when the last bounds was created
    +    this._cache.boundsX = this._cache.x;
    +    this._cache.boundsY = this._cache.y;
    +
    +    if (this.inWorld == false)
    +    {
    +        //  Bullet WAS out of the screen, is it still?
    +        this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds, this.inWorldThreshold);
    +
    +        if (this.inWorld)
    +        {
    +            //  It's back again, reset the OOB check
    +            this._outOfBoundsFired = false;
    +        }
    +    }
    +    else
    +    {
    +        //   Bullet WAS in the screen, has it now left?
    +        this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds, this.inWorldThreshold);
    +
    +        if (this.inWorld == false)
    +        {
    +            this.events.onOutOfBounds.dispatch(this);
    +            this._outOfBoundsFired = true;
    +
    +            if (this.outOfBoundsKill)
    +            {
    +                this.kill();
    +            }
    +        }
    +    }
    +
    +}
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Bullet.prototype.getLocalPosition
    +* @param {Description} p - Description.
    +* @param {number} x - Description.
    +* @param {number} y - Description.
    +* @return {Description} Description.
    +*/
    +Phaser.Bullet.prototype.getLocalPosition = function(p, x, y) {
    +
    +    p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this._cache.scaleX) + this._cache.a02;
    +    p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this._cache.scaleY) + this._cache.a12;
    +
    +    return p;
    +
    +}
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Bullet.prototype.bringToTop
    +*/
    +Phaser.Bullet.prototype.bringToTop = function() {
    +
    +    if (this.group)
    +    {
    +        this.group.bringToTop(this);
    +    }
    +    else
    +    {
    +        this.game.world.bringToTop(this);
    +    }
    +
    +}
    +
    +/**
    +* Indicates the rotation of the Bullet, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
    +* Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
    +* If you wish to work in radians instead of degrees use the property Bullet.rotation instead.
    +* @name Phaser.Bullet#angle
    +* @property {number} angle - Gets or sets the Bullets angle of rotation in degrees.
    +*/
    +Object.defineProperty(Phaser.Bullet.prototype, 'angle', {
    +
    +    get: function() {
    +        return Phaser.Math.wrapAngle(Phaser.Math.radToDeg(this.rotation));
    +    },
    +
    +    set: function(value) {
    +        this.rotation = Phaser.Math.degToRad(Phaser.Math.wrapAngle(value));
    +    }
    +
    +});
    +
    +/**
    +* Is this sprite visible to the camera or not?
    +* @returns {boolean}
    +*/
    +Object.defineProperty(Phaser.Bullet.prototype, "inCamera", {
    +    
    +    get: function () {
    +        return this._cache.cameraVisible;
    +    }
    +
    +});
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Button.js.html b/docs/Button.js.html new file mode 100644 index 00000000..5e9d198d --- /dev/null +++ b/docs/Button.js.html @@ -0,0 +1,825 @@ + + + + + + Phaser Source: gameobjects/Button.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/Button.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +
    +/**
    +* Create a new <code>Button</code> object.
    +* @class Phaser.Button
    +* @constructor
    +*
    +* @param {Phaser.Game} game Current game instance.
    +* @param {number} [x] X position of the button.
    +* @param {number} [y] Y position of the button.
    +* @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button.
    +* @param {function} [callback] The function to call when this button is pressed
    +* @param {object} [callbackContext] The context in which the callback will be called (usually 'this')
    +* @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
    +* @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
    +* @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
    +*/
    +Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) {
    +
    +    x = x || 0;
    +    y = y || 0;
    +    key = key || null;
    +    callback = callback || null;
    +    callbackContext = callbackContext || this;
    +
    +	Phaser.Sprite.call(this, game, x, y, key, outFrame);
    +
    +	/** 
    +	* @property {Description} type - Description.
    +	*/
    +    this.type = Phaser.BUTTON;
    +
    +	/** 
    +	* @property {Description} _onOverFrameName - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onOverFrameName = null;
    +    
    +	/** 
    +	* @property {Description} _onOutFrameName - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onOutFrameName = null;
    +    
    +	/** 
    +	* @property {Description} _onDownFrameName - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onDownFrameName = null;
    +    
    +	/** 
    +	* @property {Description} _onUpFrameName - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onUpFrameName = null;
    +    
    +	/** 
    +	* @property {Description} _onOverFrameID - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onOverFrameID = null;
    +    
    +	/** 
    +	* @property {Description} _onOutFrameID - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onOutFrameID = null;
    +    
    +	/** 
    +	* @property {Description} _onDownFrameID - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onDownFrameID = null;
    +    
    +	/** 
    +	* @property {Description} _onUpFrameID - Description.
    +	* @private
    +	* @default
    +	*/
    +    this._onUpFrameID = null;
    +
    +    //  These are the signals the game will subscribe to
    +	/** 
    +	* @property {Phaser.Signal} onInputOver - Description.
    +	*/
    +    this.onInputOver = new Phaser.Signal;
    +    
    +	/** 
    +	* @property {Phaser.Signal} onInputOut - Description.
    +	*/
    +    this.onInputOut = new Phaser.Signal;
    +    
    +	/** 
    +	* @property {Phaser.Signal} onInputDown - Description.
    +	*/
    +    this.onInputDown = new Phaser.Signal;
    +    
    +	/** 
    +	* @property {Phaser.Signal} onInputUp - Description.
    +	*/
    +    this.onInputUp = new Phaser.Signal;
    +
    +    this.setFrames(overFrame, outFrame, downFrame);
    +
    +    if (callback !== null)
    +    {
    +        this.onInputUp.add(callback, callbackContext);
    +    }
    +
    +    this.freezeFrames = false;
    +
    +    this.input.start(0, true);
    +
    +    //  Redirect the input events to here so we can handle animation updates, etc
    +    this.events.onInputOver.add(this.onInputOverHandler, this);
    +    this.events.onInputOut.add(this.onInputOutHandler, this);
    +    this.events.onInputDown.add(this.onInputDownHandler, this);
    +    this.events.onInputUp.add(this.onInputUpHandler, this);
    +
    +};
    +
    +Phaser.Button.prototype = Phaser.Utils.extend(true, Phaser.Sprite.prototype, PIXI.Sprite.prototype);
    +Phaser.Button.prototype.constructor = Phaser.Button;
    +
    +/**
    +* Used to manually set the frames that will be used for the different states of the button
    +* exactly like setting them in the constructor.
    +*
    +* @method Phaser.Button.prototype.setFrames
    +* @param {string|number} [overFrame] - This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
    +* @param {string|number} [outFrame] - This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
    +* @param {string|number} [downFrame] - This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
    +*/
    +Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
    +
    +    if (overFrame !== null)
    +    {
    +        if (typeof overFrame === 'string')
    +        {
    +            this._onOverFrameName = overFrame;
    +            
    +            if (this.input.pointerOver())
    +            {
    +                this.frameName = overFrame;
    +            }
    +        }
    +        else
    +        {
    +            this._onOverFrameID = overFrame;
    +
    +            if (this.input.pointerOver())
    +            {
    +                this.frame = overFrame;
    +            }
    +        }
    +    }
    +
    +    if (outFrame !== null)
    +    {
    +        if (typeof outFrame === 'string')
    +        {
    +            this._onOutFrameName = outFrame;
    +            this._onUpFrameName = outFrame;
    +
    +            if (this.input.pointerOver() == false)
    +            {
    +                this.frameName = outFrame;
    +            }
    +        }
    +        else
    +        {
    +            this._onOutFrameID = outFrame;
    +            this._onUpFrameID = outFrame;
    +
    +            if (this.input.pointerOver() == false)
    +            {
    +                this.frame = outFrame;
    +            }
    +        }
    +    }
    +
    +    if (downFrame !== null)
    +    {
    +        if (typeof downFrame === 'string')
    +        {
    +            this._onDownFrameName = downFrame;
    +
    +            if (this.input.pointerOver())
    +            {
    +                this.frameName = downFrame;
    +            }
    +        }
    +        else
    +        {
    +            this._onDownFrameID = downFrame;
    +
    +            if (this.input.pointerOver())
    +            {
    +                this.frame = downFrame;
    +            }
    +        }
    +    }
    +
    +};
    +
    +/**
    +* Description.
    +*
    +* @method Phaser.Button.prototype.onInputOverHandler
    +* @param {Description} pointer - Description.
    +*/
    +Phaser.Button.prototype.onInputOverHandler = function (pointer) {
    +
    +    if (this.freezeFrames == false)
    +    {
    +        if (this._onOverFrameName != null)
    +        {
    +            this.frameName = this._onOverFrameName;
    +        }
    +        else if (this._onOverFrameID != null)
    +        {
    +            this.frame = this._onOverFrameID;
    +        }
    +    }
    +
    +    if (this.onInputOver)
    +    {
    +        this.onInputOver.dispatch(this, pointer);
    +    }
    +};
    +
    +/**
    +* Description.
    +*
    +* @method Phaser.Button.prototype.onInputOutHandler
    +* @param {Description} pointer - Description.
    +*/
    +Phaser.Button.prototype.onInputOutHandler = function (pointer) {
    +
    +    if (this.freezeFrames == false)
    +    {
    +        if (this._onOutFrameName != null)
    +        {
    +            this.frameName = this._onOutFrameName;
    +        }
    +        else if (this._onOutFrameID != null)
    +        {
    +            this.frame = this._onOutFrameID;
    +        }
    +    }
    +
    +    if (this.onInputOut)
    +    {
    +        this.onInputOut.dispatch(this, pointer);
    +    }
    +};
    +
    +/**
    +* Description.
    +*
    +* @method Phaser.Button.prototype.onInputDownHandler
    +* @param {Description} pointer - Description.
    +*/
    +Phaser.Button.prototype.onInputDownHandler = function (pointer) {
    +
    +    if (this.freezeFrames == false)
    +    {
    +        if (this._onDownFrameName != null)
    +        {
    +            this.frameName = this._onDownFrameName;
    +        }
    +        else if (this._onDownFrameID != null)
    +        {
    +            this.frame = this._onDownFrameID;
    +        }
    +    }
    +
    +    if (this.onInputDown)
    +    {
    +        this.onInputDown.dispatch(this, pointer);
    +    }
    +};
    +
    +/**
    +* Description.
    +*
    +* @method Phaser.Button.prototype.onInputUpHandler
    +* @param {Description} pointer - Description.
    +*/
    +Phaser.Button.prototype.onInputUpHandler = function (pointer) {
    +
    +    if (this.freezeFrames == false)
    +    {
    +        if (this._onUpFrameName != null)
    +        {
    +            this.frameName = this._onUpFrameName;
    +        }
    +        else if (this._onUpFrameID != null)
    +        {
    +            this.frame = this._onUpFrameID;
    +        }
    +    }
    +
    +    if (this.onInputUp)
    +    {
    +        this.onInputUp.dispatch(this, pointer);
    +    }
    +};
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Cache.js.html b/docs/Cache.js.html index 07ba77c1..a8ea6989 100644 --- a/docs/Cache.js.html +++ b/docs/Cache.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -586,7 +706,8 @@ Phaser.Cache.prototype = { addImage: function (key, url, data) { this._images[key] = { url: url, data: data, spriteSheet: false }; - this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, '', ''); + + this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, key, this.game.rnd.uuid()); PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); @@ -1137,8 +1258,8 @@ Phaser.Cache.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Camera.js.html b/docs/Camera.js.html index df9a44e3..dde93b3f 100644 --- a/docs/Camera.js.html +++ b/docs/Camera.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -748,8 +868,8 @@ Object.defineProperty(Phaser.Camera.prototype, "height", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Canvas.js.html b/docs/Canvas.js.html index 8132f1f0..0296461c 100644 --- a/docs/Canvas.js.html +++ b/docs/Canvas.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -597,8 +717,8 @@ Phaser.Canvas = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Circle.js.html b/docs/Circle.js.html index e4a6e022..9546d9a2 100644 --- a/docs/Circle.js.html +++ b/docs/Circle.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -811,8 +931,8 @@ Phaser.Circle.intersectsRectangle = function (c, r) {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Color.js.html b/docs/Color.js.html index 6604f3e7..a8b99a3e 100644 --- a/docs/Color.js.html +++ b/docs/Color.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -668,8 +788,8 @@ Phaser.Color = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Debug.js.html b/docs/Debug.js.html index b6aa73f6..8e5b2487 100644 --- a/docs/Debug.js.html +++ b/docs/Debug.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -523,14 +643,16 @@ Phaser.Utils.Debug.prototype = { showText = showText || false; showBounds = showBounds || false; - color = color || 'rgb(255,0,255)'; + color = color || 'rgb(255,255,255)'; this.start(0, 0, color); if (showBounds) { - this.context.strokeStyle = 'rgba(255,0,255,0.5)'; + this.context.beginPath(); + this.context.strokeStyle = 'rgba(0, 255, 0, 0.7)'; this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height); + this.context.closePath(); this.context.stroke(); } @@ -540,7 +662,7 @@ Phaser.Utils.Debug.prototype = { this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y); this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y); this.context.closePath(); - this.context.strokeStyle = 'rgba(0,0,255,0.8)'; + this.context.strokeStyle = 'rgba(255, 0, 255, 0.7)'; this.context.stroke(); this.renderPoint(sprite.center); @@ -1211,8 +1333,8 @@ Phaser.Utils.Debug.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Device.js.html b/docs/Device.js.html index 87b2e6e7..39e54b21 100644 --- a/docs/Device.js.html +++ b/docs/Device.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -647,6 +767,16 @@ Phaser.Device.prototype = { this.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; this.fileSystem = !!window['requestFileSystem']; this.webGL = ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )(); + + if (this.webGL === null) + { + this.webGL = false; + } + else + { + this.webGL = true; + } + this.worker = !!window['Worker']; if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) { @@ -874,8 +1004,8 @@ Phaser.Device.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Easing.js.html b/docs/Easing.js.html index d4c4e4b6..bcd7d229 100644 --- a/docs/Easing.js.html +++ b/docs/Easing.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -902,8 +1022,8 @@ Phaser.Easing = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Emitter.js.html b/docs/Emitter.js.html index 27495dba..79a282b7 100644 --- a/docs/Emitter.js.html +++ b/docs/Emitter.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1016,8 +1136,8 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Events.js.html b/docs/Events.js.html new file mode 100644 index 00000000..f6d0fa93 --- /dev/null +++ b/docs/Events.js.html @@ -0,0 +1,572 @@ + + + + + + Phaser Source: gameobjects/Events.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/Events.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +
    +/**
    +* The Events component is a collection of events fired by the parent game object and its components.
    +* 
    +* @class Phaser.Events
    +* @constructor
    +*
    +* @param {Phaser.Sprite} sprite - A reference to Description.
    +*/
    +Phaser.Events = function (sprite) {
    +	
    +	this.parent = sprite;
    +	this.onAddedToGroup = new Phaser.Signal;
    +	this.onRemovedFromGroup = new Phaser.Signal;
    +	this.onKilled = new Phaser.Signal;
    +	this.onRevived = new Phaser.Signal;
    +	this.onOutOfBounds = new Phaser.Signal;
    +
    +    this.onInputOver = null;
    +    this.onInputOut = null;
    +    this.onInputDown = null;
    +    this.onInputUp = null;
    +    this.onDragStart = null;
    +    this.onDragStop = null;
    +
    +	this.onAnimationStart = null;
    +	this.onAnimationComplete = null;
    +	this.onAnimationLoop = null;
    +
    +};
    +
    +Phaser.Events.prototype = {
    +
    +	destroy: function () {
    +
    +		this.parent = null;
    +		this.onAddedToGroup.dispose();
    +		this.onRemovedFromGroup.dispose();
    +		this.onKilled.dispose();
    +		this.onRevived.dispose();
    +		this.onOutOfBounds.dispose();
    +
    +		if (this.onInputOver)
    +		{
    +		    this.onInputOver.dispose();
    +		    this.onInputOut.dispose();
    +		    this.onInputDown.dispose();
    +		    this.onInputUp.dispose();
    +		    this.onDragStart.dispose();
    +		    this.onDragStop.dispose();
    +		}
    +
    +		if (this.onAnimationStart)
    +		{
    +			this.onAnimationStart.dispose();
    +			this.onAnimationComplete.dispose();
    +			this.onAnimationLoop.dispose();
    +		}
    +
    +	}
    +
    +};
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Frame.js.html b/docs/Frame.js.html index 2eb620b6..ed867b7d 100644 --- a/docs/Frame.js.html +++ b/docs/Frame.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -501,8 +621,8 @@ Phaser.Frame.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/FrameData.js.html b/docs/FrameData.js.html index 28919f5e..6a66f2c0 100644 --- a/docs/FrameData.js.html +++ b/docs/FrameData.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -578,8 +698,8 @@ Object.defineProperty(Phaser.FrameData.prototype, "total", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Game.js.html b/docs/Game.js.html index d0dc6451..630772fa 100644 --- a/docs/Game.js.html +++ b/docs/Game.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -355,7 +475,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant if (typeof transparent == 'undefined') { transparent = false; } if (typeof antialias == 'undefined') { antialias = true; } - + /** * @property {number} id - Phaser Game ID (for when Pixi supports multiple instances). */ @@ -574,7 +694,7 @@ Phaser.Game.prototype = { /** * Initialize engine sub modules and start the game. - * + * * @method Phaser.Game#boot * @protected */ @@ -638,10 +758,13 @@ Phaser.Game.prototype = { console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000'); } - if (Phaser.VERSION.substr(-5) == '-beta') - { - console.warn('You are using a beta version of Phaser. Some things may not work.'); - } + var pos = Phaser.VERSION.indexOf('-'); + var versionQualifier = (pos >= 0) ? Phaser.VERSION.substr(pos + 1) : null; + if (versionQualifier) + { + var article = ['a', 'e', 'i', 'o', 'u', 'y'].indexOf(versionQualifier.charAt(0)) >= 0 ? 'an' : 'a'; + console.warn('You are using %s %s version of Phaser. Some things may not work.', article, versionQualifier); + } this.isRunning = true; this._loadComplete = false; @@ -652,10 +775,10 @@ Phaser.Game.prototype = { } }, - + /** * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. - * + * * @method Phaser.Game#setUpRenderer * @protected */ @@ -692,7 +815,7 @@ Phaser.Game.prototype = { /** * Called when the load has finished, after preload was run. - * + * * @method Phaser.Game#loadComplete * @protected */ @@ -706,7 +829,7 @@ Phaser.Game.prototype = { /** * The core game loop. - * + * * @method Phaser.Game#update * @protected * @param {number} time - The current time as provided by RequestAnimationFrame. @@ -720,6 +843,7 @@ Phaser.Game.prototype = { this.plugins.preUpdate(); this.physics.preUpdate(); + this.stage.update(); this.input.update(); this.tweens.update(); this.sound.update(); @@ -741,11 +865,15 @@ Phaser.Game.prototype = { /** * Nuke the entire game from orbit - * + * * @method Phaser.Game#destroy */ destroy: function () { + this.raf.stop(); + + this.input.destroy(); + this.state.destroy(); this.state = null; @@ -820,8 +948,8 @@ Object.defineProperty(Phaser.Game.prototype, "paused", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/GameObjectFactory.js.html b/docs/GameObjectFactory.js.html new file mode 100644 index 00000000..fbd5c909 --- /dev/null +++ b/docs/GameObjectFactory.js.html @@ -0,0 +1,795 @@ + + + + + + Phaser Source: gameobjects/GameObjectFactory.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/GameObjectFactory.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Description.
    +*
    +* @class Phaser.GameObjectFactory
    +* @constructor
    +* @param {Phaser.Game} game - A reference to the currently running game.
    +*/
    +Phaser.GameObjectFactory = function (game) {
    +
    +    /**
    +	* @property {Phaser.Game} game - A reference to the currently running Game.
    +	*/
    +	this.game = game;
    +	
    +    /**
    +	* @property {Phaser.World} world - A reference to the game world.
    +	*/
    +	this.world = this.game.world;
    +
    +};
    +
    +Phaser.GameObjectFactory.prototype = {
    +
    +    /**
    +    * @property {Phaser.Game} game - A reference to the currently running Game.
    +    * @default
    +    */
    +	game: null,
    +	
    +    /**
    +	* @property {Phaser.World} world - A reference to the game world.
    +	* @default
    +	*/
    +    world: null,
    +
    +    /**
    +    * Description.
    +    * @method existing.
    +    * @param {*} object - An instance of Phaser.Sprite, Phaser.Button or any other display object..
    +    * @return {*} The child that was added to the Group.
    +    */
    +    existing: function (object) {
    +
    +        return this.world.add(object);
    +
    +    },
    +
    +	/**
    +    * Create a new Sprite with specific position and sprite sheet key.
    +    *
    +    * @method sprite
    +    * @param {number} x - X position of the new sprite.
    +    * @param {number} y - Y position of the new sprite.
    +    * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +    * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.
    +    * @returns {Phaser.Sprite} the newly created sprite object.
    +    */
    +    sprite: function (x, y, key, frame) {
    +
    +        return this.world.create(x, y, key, frame);
    +
    +    },
    +
    +    /**
    +    * Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent.
    +    *
    +    * @method child
    +    * @param {Phaser.Group} group - The Group to add this child to.
    +    * @param {number} x - X position of the new sprite.
    +    * @param {number} y - Y position of the new sprite.
    +    * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture.
    +    * @param  {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.
    +    * @returns {Phaser.Sprite} the newly created sprite object.
    +    */
    +    child: function (group, x, y, key, frame) {
    +
    +        return group.create(x, y, key, frame);
    +
    +    },
    +
    +    /**
    +    * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.
    +    *
    +    * @method tween
    +    * @param {object} obj - Object the tween will be run on.
    +    * @return {Phaser.Tween} Description.
    +    */
    +    tween: function (obj) {
    +
    +        return this.game.tweens.create(obj);
    +
    +    },
    +
    +    /**
    +    * A Group is a container for display objects that allows for fast pooling, recycling and collision checks.
    +    *
    +    * @method group
    +    * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any.
    +    * @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging.
    +    * @return {Phaser.Group} The newly created group.
    +    */
    +    group: function (parent, name) {
    +
    +        return new Phaser.Group(this.game, parent, name);
    +
    +    },
    +
    +    /**
    +     * Creates a new instance of the Sound class.
    +     *
    +     * @method audio
    +     * @param {string} key - The Game.cache key of the sound that this object will use.
    +     * @param {number} volume - The volume at which the sound will be played.
    +     * @param {boolean} loop - Whether or not the sound will loop.
    +     * @return {Phaser.Sound} The newly created text object.
    +     */
    +    audio: function (key, volume, loop) {
    +
    +        return this.game.sound.add(key, volume, loop);
    +        
    +    },
    +
    +    /**
    +     * Creates a new <code>TileSprite</code>.
    +     *
    +     * @method tileSprite
    +     * @param {number} x - X position of the new tileSprite.
    +     * @param {number} y - Y position of the new tileSprite.
    +     * @param {number} width - the width of the tilesprite.
    +     * @param {number} height - the height of the tilesprite.
    +     * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +     * @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
    +     * @return {Phaser.TileSprite} The newly created tileSprite object.
    +     */
    +    tileSprite: function (x, y, width, height, key, frame) {
    +
    +        return this.world.add(new Phaser.TileSprite(this.game, x, y, width, height, key, frame));
    +
    +    },
    +
    +    /**
    +     * Creates a new <code>Text</code>.
    +     *
    +     * @method text
    +     * @param {number} x - X position of the new text object.
    +     * @param {number} y - Y position of the new text object.
    +     * @param {string} text - The actual text that will be written.
    +     * @param {object} style - The style object containing style attributes like font, font size , etc.
    +     * @return {Phaser.Text} The newly created text object.
    +     */
    +    text: function (x, y, text, style) {
    +
    +        return this.world.add(new Phaser.Text(this.game, x, y, text, style));
    +
    +    },
    +
    +    /**
    +    * Creates a new <code>Button</code> object.
    +    *
    +    * @method button
    +    * @param {number} [x] X position of the new button object.
    +    * @param {number} [y] Y position of the new button object.
    +    * @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button.
    +    * @param {function} [callback] The function to call when this button is pressed
    +    * @param {object} [callbackContext] The context in which the callback will be called (usually 'this')
    +    * @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.
    +    * @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.
    +    * @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.
    +    * @return {Phaser.Button} The newly created button object.
    +    */
    +    button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) {
    +
    +        return this.world.add(new Phaser.Button(this.game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame));
    +
    +    },
    +
    +    /**
    +     * Creates a new <code>Graphics</code> object.
    +     *
    +     * @method graphics
    +     * @param {number} x - X position of the new graphics object.
    +     * @param {number} y - Y position of the new graphics object.
    +     * @return {Phaser.Graphics} The newly created graphics object.
    +     */
    +    graphics: function (x, y) {
    +
    +        return this.world.add(new Phaser.Graphics(this.game, x, y));
    +
    +    },
    +
    +    /**
    +    * Emitter is a lightweight particle emitter. It can be used for one-time explosions or for
    +    * continuous effects like rain and fire. All it really does is launch Particle objects out
    +    * at set intervals, and fixes their positions and velocities accorindgly.
    +    *
    +    * @method emitter
    +    * @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from.
    +    * @param {number} [y=0] - The y coordinate within the Emitter that the particles are emitted from.
    +    * @param {number} [maxParticles=50] - The total number of particles in this emitter.
    +    * @return {Phaser.Emitter} The newly created emitter object.
    +    */
    +    emitter: function (x, y, maxParticles) {
    +
    +        return this.game.particles.add(new Phaser.Particles.Arcade.Emitter(this.game, x, y, maxParticles));
    +
    +    },
    +
    +    /**
    +    * * Create a new <code>BitmapText</code>.
    +    *
    +    * @method bitmapText
    +    * @param {number} x - X position of the new bitmapText object.
    +    * @param {number} y - Y position of the new bitmapText object.
    +    * @param {string} text - The actual text that will be written.
    +    * @param {object} style - The style object containing style attributes like font, font size , etc.
    +    * @return {Phaser.BitmapText} The newly created bitmapText object.
    +    */
    +    bitmapText: function (x, y, text, style) {
    +
    +        return this.world.add(new Phaser.BitmapText(this.game, x, y, text, style));
    +
    +    },
    +
    +    /**
    +    * Description.
    +    *
    +    * @method tilemap
    +    * @param {string} key - Asset key for the JSON file.
    +    * @return {Phaser.Tilemap} The newly created tilemap object.
    +    */
    +    tilemap: function (key) {
    +
    +        return new Phaser.Tilemap(this.game, key);
    +
    +    },
    +
    +    /**
    +    * Description.
    +    *
    +    * @method tileset
    +    * @param {string} key - The image key as defined in the Game.Cache to use as the tileset.
    +    * @return {Phaser.Tileset} The newly created tileset object.
    +    */
    +    tileset: function (key) {
    +
    +        return this.game.cache.getTileset(key);
    +
    +    },
    +
    +    /**
    +     * Description.
    +     *
    +     * @method tilemaplayer
    +     * @param {number} x - X position of the new tilemapLayer.
    +     * @param {number} y - Y position of the new tilemapLayer.
    +     * @param {number} width - the width of the tilemapLayer.
    +     * @param {number} height - the height of the tilemapLayer.
    +     * @return {Phaser.TilemapLayer} The newly created tilemaplayer object.
    +     */
    +    tilemapLayer: function (x, y, width, height, tileset, tilemap, layer) {
    +
    +        return this.world.add(new Phaser.TilemapLayer(this.game, x, y, width, height, tileset, tilemap, layer));
    +
    +    },
    +
    +    /**
    +    * A dynamic initially blank canvas to which images can be drawn
    +    *
    +    * @method renderTexture
    +    * @param {string} key - Asset key for the render texture.
    +    * @param {number} width - the width of the render texture.
    +    * @param {number} height - the height of the render texture.
    +    * @return {Phaser.RenderTexture} The newly created renderTexture object.
    +    */
    +    renderTexture: function (key, width, height) {
    +
    +        var texture = new Phaser.RenderTexture(this.game, key, width, height);
    +
    +        this.game.cache.addRenderTexture(key, texture);
    +
    +        return texture;
    +
    +    },
    +
    +};
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Graphics.js.html b/docs/Graphics.js.html new file mode 100644 index 00000000..332169a9 --- /dev/null +++ b/docs/Graphics.js.html @@ -0,0 +1,592 @@ + + + + + + Phaser Source: gameobjects/Graphics.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/Graphics.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Creates a new <code>Graphics</code> object.
    +* 
    +* @class Phaser.Graphics
    +* @constructor
    +*
    +* @param {Phaser.Game} game Current game instance.
    +* @param {number} x - X position of the new graphics object.
    +* @param {number} y - Y position of the new graphics object.
    +*/
    +Phaser.Graphics = function (game, x, y) {
    +
    +    this.game = game;
    +
    +    PIXI.Graphics.call(this);
    +
    +    /**
    +	* @property {Description} type - Description.
    +	*/
    +    this.type = Phaser.GRAPHICS;
    +
    +};
    +
    +Phaser.Graphics.prototype = Object.create(PIXI.Graphics.prototype);
    +Phaser.Graphics.prototype.constructor = Phaser.Graphics;
    +
    +//  Add our own custom methods
    +
    +/**
    +* Description.
    +* 
    +* @method Phaser.Sprite.prototype.destroy
    +*/
    +Phaser.Graphics.prototype.destroy = function() {
    +
    +    this.clear();
    +
    +    if (this.group)
    +    {
    +        this.group.remove(this);
    +    }
    +
    +    this.game = null;
    +
    +}
    +
    +Object.defineProperty(Phaser.Graphics.prototype, 'angle', {
    +
    +    get: function() {
    +        return Phaser.Math.wrapAngle(Phaser.Math.radToDeg(this.rotation));
    +    },
    +
    +    set: function(value) {
    +        this.rotation = Phaser.Math.degToRad(Phaser.Math.wrapAngle(value));
    +    }
    +
    +});
    +
    +Object.defineProperty(Phaser.Graphics.prototype, 'x', {
    +
    +    get: function() {
    +        return this.position.x;
    +    },
    +
    +    set: function(value) {
    +        this.position.x = value;
    +    }
    +
    +});
    +
    +Object.defineProperty(Phaser.Graphics.prototype, 'y', {
    +
    +    get: function() {
    +        return this.position.y;
    +    },
    +
    +    set: function(value) {
    +        this.position.y = value;
    +    }
    +
    +});
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Group.js.html b/docs/Group.js.html index a351026c..69a9974b 100644 --- a/docs/Group.js.html +++ b/docs/Group.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -373,15 +493,18 @@ Phaser.Group = function (game, parent, name, useStage) { if (parent instanceof Phaser.Group) { parent._container.addChild(this._container); + parent._container.updateTransform(); } else { parent.addChild(this._container); + parent.updateTransform(); } } else { this.game.stage._stage.addChild(this._container); + this.game.stage._stage.updateTransform(); } } @@ -429,6 +552,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + + child.updateTransform(); } return child; @@ -456,6 +581,8 @@ Phaser.Group.prototype = { } this._container.addChildAt(child, index); + + child.updateTransform(); } return child; @@ -505,6 +632,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + + child.updateTransform(); return child; @@ -540,6 +669,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + child.updateTransform(); + } }, @@ -731,6 +862,7 @@ Phaser.Group.prototype = { this._container.removeChild(oldChild); this._container.addChildAt(newChild, index); newChild.events.onAddedToGroup.dispatch(newChild, this); + newChild.updateTransform(); } }, @@ -1583,8 +1715,8 @@ Object.defineProperty(Phaser.Group.prototype, "alpha", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Input.js.html b/docs/Input.js.html index 0b479b45..99543057 100644 --- a/docs/Input.js.html +++ b/docs/Input.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -718,6 +838,19 @@ Phaser.Input.prototype = { this.mspointer.start(); this.mousePointer.active = true; + }, + + /** + * Stops all of the Input Managers from running. + * @method Phaser.Input#destroy + */ + destroy: function () { + + this.mouse.stop(); + this.keyboard.stop(); + this.touch.stop(); + this.mspointer.stop(); + }, /** @@ -1004,28 +1137,6 @@ Phaser.Input.prototype = { return null; - }, - - /** - * Get the distance between two Pointer objects. - * @method Phaser.Input#getDistance - * @param {Pointer} pointer1 - * @param {Pointer} pointer2 - * @return {Description} Description. - */ - getDistance: function (pointer1, pointer2) { - // return Phaser.Vec2Utils.distance(pointer1.position, pointer2.position); - }, - - /** - * Get the angle between two Pointer objects. - * @method Phaser.Input#getAngle - * @param {Pointer} pointer1 - * @param {Pointer} pointer2 - * @return {Description} Description. - */ - getAngle: function (pointer1, pointer2) { - // return Phaser.Vec2Utils.angle(pointer1.position, pointer2.position); } }; @@ -1162,8 +1273,8 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/InputHandler.js.html b/docs/InputHandler.js.html index f83af112..a7767a3b 100644 --- a/docs/InputHandler.js.html +++ b/docs/InputHandler.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -629,10 +749,13 @@ Phaser.InputHandler.prototype = { if (this.enabled) { + this.enabled = false; + + this.game.input.interactiveItems.remove(this); + this.stop(); - // Null everything + this.sprite = null; - // etc } }, @@ -804,24 +927,15 @@ Phaser.InputHandler.prototype = { { this.sprite.getLocalUnmodifiedPosition(this._tempPoint, pointer.x, pointer.y); - // Check against bounds first (move these to private vars) - var x1 = -(this.sprite.texture.frame.width) * this.sprite.anchor.x; - var y1; - - if (this._tempPoint.x > x1 && this._tempPoint.x < x1 + this.sprite.texture.frame.width) + if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height) { - y1 = -(this.sprite.texture.frame.height) * this.sprite.anchor.y; - - if (this._tempPoint.y > y1 && this._tempPoint.y < y1 + this.sprite.texture.frame.height) + if (this.pixelPerfect) { - if (this.pixelPerfect) - { - return this.checkPixel(this._tempPoint.x, this._tempPoint.y); - } - else - { - return true; - } + return this.checkPixel(this._tempPoint.x, this._tempPoint.y); + } + else + { + return true; } } } @@ -839,16 +953,16 @@ Phaser.InputHandler.prototype = { */ checkPixel: function (x, y) { - x += (this.sprite.texture.frame.width * this.sprite.anchor.x); - y += (this.sprite.texture.frame.height * this.sprite.anchor.y); - // Grab a pixel from our image into the hitCanvas and then test it - if (this.sprite.texture.baseTexture.source) { this.game.input.hitContext.clearRect(0, 0, 1, 1); // This will fail if the image is part of a texture atlas - need to modify the x/y values here + + x += this.sprite.texture.frame.x; + y += this.sprite.texture.frame.y; + this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source, x, y, 1, 1, 0, 0, 1, 1); var rgb = this.game.input.hitContext.getImageData(0, 0, 1, 1); @@ -938,7 +1052,10 @@ Phaser.InputHandler.prototype = { this.game.stage.canvas.style.cursor = "default"; } - this.sprite.events.onInputOut.dispatch(this.sprite, pointer); + if (this.sprite && this.sprite.events) + { + this.sprite.events.onInputOut.dispatch(this.sprite, pointer); + } }, @@ -1393,8 +1510,8 @@ Phaser.InputHandler.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Intro.js.html b/docs/Intro.js.html index c9eb4020..82819e1a 100644 --- a/docs/Intro.js.html +++ b/docs/Intro.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -332,7 +452,7 @@ * * Phaser - http://www.phaser.io * -* v{version} - Built at: {buildDate} +* v<%= version %> - Built at: <%= buildDate %> * * By Richard Davey http://www.photonstorm.com @photonstorm * @@ -370,8 +490,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Key.js.html b/docs/Key.js.html index 606b4622..87eb0438 100644 --- a/docs/Key.js.html +++ b/docs/Key.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -512,8 +632,8 @@ Phaser.Key.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Keyboard.js.html b/docs/Keyboard.js.html index 28178681..09ef56bb 100644 --- a/docs/Keyboard.js.html +++ b/docs/Keyboard.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -834,8 +954,8 @@ Phaser.Keyboard.NUM_LOCK = 144;
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/LinkedList.js.html b/docs/LinkedList.js.html index ea65f1cf..222636ca 100644 --- a/docs/LinkedList.js.html +++ b/docs/LinkedList.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -494,8 +614,8 @@ Phaser.LinkedList.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Loader.js.html b/docs/Loader.js.html index 1bbd6580..206d8fd6 100644 --- a/docs/Loader.js.html +++ b/docs/Loader.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -484,6 +604,7 @@ Phaser.Loader.prototype = { } sprite.crop = this.preloadSprite.crop; + sprite.cropEnabled = true; }, @@ -1258,7 +1379,7 @@ Phaser.Loader.prototype = { break; case 'text': - file.data = this._xhr.response; + file.data = this._xhr.responseText; this.game.cache.addText(file.key, file.url, file.data); break; } @@ -1278,7 +1399,7 @@ Phaser.Loader.prototype = { */ jsonLoadComplete: function (key) { - var data = JSON.parse(this._xhr.response); + var data = JSON.parse(this._xhr.responseText); var file = this._fileList[key]; if (file.type == 'tilemap') @@ -1302,7 +1423,7 @@ Phaser.Loader.prototype = { */ csvLoadComplete: function (key) { - var data = this._xhr.response; + var data = this._xhr.responseText; var file = this._fileList[key]; this.game.cache.addTilemap(file.key, file.url, data, file.format); @@ -1337,7 +1458,7 @@ Phaser.Loader.prototype = { */ xmlLoadComplete: function (key) { - var data = this._xhr.response; + var data = this._xhr.responseText; var xml; try @@ -1447,8 +1568,8 @@ Phaser.Loader.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/LoaderParser.js.html b/docs/LoaderParser.js.html index d3378850..c00d28dd 100644 --- a/docs/LoaderParser.js.html +++ b/docs/LoaderParser.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -423,8 +543,8 @@ Phaser.LoaderParser = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/MSPointer.js.html b/docs/MSPointer.js.html index 86456654..6d271c3d 100644 --- a/docs/MSPointer.js.html +++ b/docs/MSPointer.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -523,8 +643,8 @@ Phaser.MSPointer.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Math.js.html b/docs/Math.js.html index 4bc3ca48..56e7015b 100644 --- a/docs/Math.js.html +++ b/docs/Math.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1511,8 +1631,8 @@ Phaser.Math = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Mouse.js.html b/docs/Mouse.js.html index 9bc49546..579cfe0e 100644 --- a/docs/Mouse.js.html +++ b/docs/Mouse.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -599,8 +719,8 @@ Phaser.Mouse.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Net.js.html b/docs/Net.js.html index 0b179d32..523c046f 100644 --- a/docs/Net.js.html +++ b/docs/Net.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -509,8 +629,8 @@ Phaser.Net.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Particles.js.html b/docs/Particles.js.html index 32c12ac0..1e3babd4 100644 --- a/docs/Particles.js.html +++ b/docs/Particles.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -414,8 +534,8 @@ Phaser.Particles.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Animation.html b/docs/Phaser.Animation.html index 1e3288db..0201aab1 100644 --- a/docs/Phaser.Animation.html +++ b/docs/Phaser.Animation.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -410,7 +530,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b -Phaser.Sprite +Phaser.Sprite @@ -1853,7 +1973,7 @@ It is created by the AnimationManager, consists of Animation.Frame objects and b
    -

    <static> generateFrameNames(prefix, min, max, suffix, zeroPad)

    +

    <static> generateFrameNames(prefix, start, stop, suffix, zeroPad)

    @@ -1936,7 +2056,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat - min + start @@ -1964,14 +2084,14 @@ You could use this function to generate those by doing: Phaser.Animation.generat -

    The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1.

    +

    The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1.

    - max + stop @@ -1999,7 +2119,7 @@ You could use this function to generate those by doing: Phaser.Animation.generat -

    The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34.

    +

    The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34.

    @@ -2814,8 +2934,8 @@ You could use this function to generate those by doing: Phaser.Animation.generat
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.AnimationManager.html b/docs/Phaser.AnimationManager.html index cc33f1bc..4c73a71f 100644 --- a/docs/Phaser.AnimationManager.html +++ b/docs/Phaser.AnimationManager.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -387,7 +507,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single -Phaser.Sprite +Phaser.Sprite @@ -1340,7 +1460,7 @@ Any Game Object such as Phaser.Sprite that supports animation contains a single -Phaser.Sprite +Phaser.Sprite @@ -2723,8 +2843,8 @@ The currentAnim property of the AnimationManager is automatically set to the ani
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.AnimationParser.html b/docs/Phaser.AnimationParser.html index 4e3a2f84..878830e1 100644 --- a/docs/Phaser.AnimationParser.html +++ b/docs/Phaser.AnimationParser.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1307,8 +1427,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.BitmapText.html b/docs/Phaser.BitmapText.html new file mode 100644 index 00000000..b011aeac --- /dev/null +++ b/docs/Phaser.BitmapText.html @@ -0,0 +1,1654 @@ + + + + + + Phaser Class: BitmapText + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: BitmapText

    +
    + +
    +

    + Phaser. + + BitmapText +

    + +

    Phaser.BitmapText

    + +
    + +
    +
    + + + + +
    +

    new BitmapText(game, x, y, text, style)

    + + +
    +
    + + +
    +

    Creates a new <code>BitmapText</code>.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running game.

    x + + +number + + + +

    X position of the new bitmapText object.

    y + + +number + + + +

    Y position of the new bitmapText object.

    text + + +string + + + +

    The actual text that will be written.

    style + + +object + + + +

    The style object containing style attributes like font, font size , etc.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    alive

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    alive + + +boolean + + + +

    This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    anchor

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    anchor + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    exists

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    exists + + +boolean + + + +

    If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running Game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    group

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    group + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    update()

    + + +
    +
    + + +
    +

    Automatically called by World.update

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Bullet.html b/docs/Phaser.Bullet.html new file mode 100644 index 00000000..adffcd0e --- /dev/null +++ b/docs/Phaser.Bullet.html @@ -0,0 +1,4145 @@ + + + + + + Phaser Class: Bullet + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Bullet

    +
    + +
    +

    + Phaser. + + Bullet +

    + +

    Phaser.Bullet

    + +
    + +
    +
    + + + + +
    +

    new Bullet(game, x, y, key, frame)

    + + +
    +
    + + +
    +

    Warning: Bullet is an experimental object that we don't advise using for now.

    +

    A Bullet is like a stripped-down Sprite, useful for when you just need to get something moving around the screen quickly with little of the extra +features that a Sprite supports. +Bullet is MISSING the following:

    +

    animation, all input events, crop support, health/damage, loadTexture

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Current game instance.

    x + + +number + + + +

    X position of the new bullet.

    y + + +number + + + +

    Y position of the new bullet.

    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame + + +string +| + +number + + + +

    If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    alive

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    alive + + +boolean + + + +

    This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    anchor

    + + +
    +
    + +
    +

    The anchor sets the origin point of the texture. +The default is 0,0 this means the textures origin is the top left +Setting than anchor to 0.5,0.5 means the textures origin is centered +Setting the anchor to 1,1 would mean the textures origin points will be the bottom right

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    anchor + + +Phaser.Point + + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    angle

    + + +
    +
    + +
    +

    Indicates the rotation of the Bullet, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. +Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90. +If you wish to work in radians instead of degrees use the property Bullet.rotation instead.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    angle + + +number + + + +

    Gets or sets the Bullets angle of rotation in degrees.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    autoCull

    + + +
    +
    + +
    +

    Should this Sprite be automatically culled if out of range of the camera? +A culled sprite has its visible property set to 'false'. +Note that this check doesn't look at this Sprites children, which may still be in camera range. +So you should set autoCull to false if the Sprite will have children likely to still be in camera range.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    autoCull + + +boolean + + + +
    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    body

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body + + +Phaser.Physics.Arcade.Body + + + +

    Set-up the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bottomLeft

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bottomLeft + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bottomRight

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bottomRight + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bounds

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bounds + + +Phaser.Rectangle + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    center

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    center + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    events

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    events + + +Events + + + +

    The Signals you can subscribe to that are dispatched when certain things happen on this Sprite or its components

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    exists

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    exists + + +boolean + + + +

    If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    fixedToCamera

    + + +
    +
    + +
    +

    A Sprite that is fixed to the camera ignores the position of any ancestors in the display list and uses its x/y coordinates as offsets from the top left of the camera.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    fixedToCamera + + +boolean + + + +

    Fixes this Sprite to the Camera.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running Game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    group

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    group + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    inWorld

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    inWorld + + +Description + + + +

    World bounds check.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    inWorldThreshold

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    inWorldThreshold + + +number + + + +

    World bounds check.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    key

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    lifespan

    + + +
    +
    + +
    +

    If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc. +The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    lifespan + + +number + + + +
    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + +

    The user defined name given to this Sprite.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    offset

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    offset + + +Phaser.Point + + + +

    Corner point defaults.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    outOfBoundsKill

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    outOfBoundsKill + + +boolean + + + +

    Kills this sprite as soon as it goes outside of the World bounds.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    renderOrderID

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    renderOrderID + + +number + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    Replaces the PIXI.Point with a slightly more flexible one.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    topLeft

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    topLeft + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    topRight

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    topRight + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    x

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    y

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    y + + +number + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    bringToTop()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    destroy()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    getLocalPosition(p, x, y) → {Description}

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    p + + +Description + + + +

    Description.

    x + + +number + + + +

    Description.

    y + + +number + + + +

    Description.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Description.

    +
    + + + +
    +
    + Type +
    +
    + +Description + + +
    +
    + + + + + +
    + + + +
    +

    kill()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    revive()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Button.html b/docs/Phaser.Button.html new file mode 100644 index 00000000..a854ce41 --- /dev/null +++ b/docs/Phaser.Button.html @@ -0,0 +1,2139 @@ + + + + + + Phaser Class: Button + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Button

    +
    + +
    +

    + Phaser. + + Button +

    + +

    Phaser.Button

    + +
    + +
    +
    + + + + +
    +

    new Button(game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame)

    + + +
    +
    + + +
    +

    Create a new <code>Button</code> object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    game + + +Phaser.Game + + + + + + + + + +

    Current game instance.

    x + + +number + + + + + + <optional>
    + + + + + +

    X position of the button.

    y + + +number + + + + + + <optional>
    + + + + + +

    Y position of the button.

    key + + +string + + + + + + <optional>
    + + + + + +

    The image key as defined in the Game.Cache to use as the texture for this button.

    callback + + +function + + + + + + <optional>
    + + + + + +

    The function to call when this button is pressed

    callbackContext + + +object + + + + + + <optional>
    + + + + + +

    The context in which the callback will be called (usually 'this')

    overFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.

    outFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.

    downFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    onInputDown

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    onInputDown + + +Phaser.Signal + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    onInputOut

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    onInputOut + + +Phaser.Signal + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    onInputOver

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    onInputOver + + +Phaser.Signal + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    onInputUp

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    onInputUp + + +Phaser.Signal + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    onInputDownHandler(pointer)

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    pointer + + +Description + + + +

    Description.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    onInputOutHandler(pointer)

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    pointer + + +Description + + + +

    Description.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    onInputOverHandler(pointer)

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    pointer + + +Description + + + +

    Description.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    onInputUpHandler(pointer)

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    pointer + + +Description + + + +

    Description.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    setFrames(overFrame, outFrame, downFrame)

    + + +
    +
    + + +
    +

    Used to manually set the frames that will be used for the different states of the button +exactly like setting them in the constructor.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    overFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.

    outFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.

    downFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Cache.html b/docs/Phaser.Cache.html index 475edfe1..f2c1d276 100644 --- a/docs/Phaser.Cache.html +++ b/docs/Phaser.Cache.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1590,7 +1710,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -2889,7 +3009,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3053,7 +3173,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3122,7 +3242,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3240,7 +3360,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3381,7 +3501,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3522,7 +3642,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3663,7 +3783,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3804,7 +3924,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -3945,7 +4065,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -4037,7 +4157,7 @@ as images, sounds and data files as a result of Loader calls. Cache items use st
    Source:
    @@ -4179,7 +4299,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4320,7 +4440,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4461,7 +4581,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4553,7 +4673,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4694,7 +4814,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4786,7 +4906,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4837,7 +4957,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    -

    getTexture(key) → {Phaser.RenderTexture}

    +

    getTexture(key) → {Phaser.RenderTexture}

    @@ -4927,7 +5047,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -4963,7 +5083,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    -Phaser.RenderTexture +Phaser.RenderTexture
    @@ -5068,7 +5188,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5209,7 +5329,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5350,7 +5470,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5491,7 +5611,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5632,7 +5752,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5773,7 +5893,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -5914,7 +6034,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6055,7 +6175,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6173,7 +6293,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6291,7 +6411,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6409,7 +6529,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6527,7 +6647,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6645,7 +6765,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6763,7 +6883,7 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    Source:
    @@ -6813,8 +6933,8 @@ Normally you don't call this directly but instead use getImageKeys, getSoundKeys
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Camera.html b/docs/Phaser.Camera.html index af7ae150..95529a37 100644 --- a/docs/Phaser.Camera.html +++ b/docs/Phaser.Camera.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1600,7 +1720,7 @@ at all then set this to null. The values can be anything and are in World coordi -Phaser.Sprite +Phaser.Sprite @@ -2678,7 +2798,7 @@ Objects outside of this view are not rendered (unless set to ignore the Camera, -Phaser.Sprite +Phaser.Sprite @@ -3163,8 +3283,8 @@ without having to use game.camera.x and game.camera.y.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Canvas.html b/docs/Phaser.Canvas.html index 14daba08..5647d0c4 100644 --- a/docs/Phaser.Canvas.html +++ b/docs/Phaser.Canvas.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2407,8 +2527,8 @@ patchy on earlier browsers, especially on mobile.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Circle.html b/docs/Phaser.Circle.html index 46e4a9eb..148f1751 100644 --- a/docs/Phaser.Circle.html +++ b/docs/Phaser.Circle.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -4187,8 +4307,8 @@ This method checks the radius distances between the two Circle objects to see if
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Color.html b/docs/Phaser.Color.html index 484476f6..203cf9cb 100644 --- a/docs/Phaser.Color.html +++ b/docs/Phaser.Color.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -3516,8 +3636,8 @@ RGB format information and HSL information. Each section starts on a newline, 3
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Device.html b/docs/Phaser.Device.html index f3bf6fd1..a4b79bfc 100644 --- a/docs/Phaser.Device.html +++ b/docs/Phaser.Device.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -4727,7 +4847,7 @@
    Source:
    @@ -4819,7 +4939,7 @@
    Source:
    @@ -4892,8 +5012,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:44 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Back.html b/docs/Phaser.Easing.Back.html index aea252ef..68cad7cf 100644 --- a/docs/Phaser.Easing.Back.html +++ b/docs/Phaser.Easing.Back.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Bounce.html b/docs/Phaser.Easing.Bounce.html index 23715df7..cc641978 100644 --- a/docs/Phaser.Easing.Bounce.html +++ b/docs/Phaser.Easing.Bounce.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Circular.html b/docs/Phaser.Easing.Circular.html index 58fba0c0..0166f173 100644 --- a/docs/Phaser.Easing.Circular.html +++ b/docs/Phaser.Easing.Circular.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Cubic.html b/docs/Phaser.Easing.Cubic.html index 892d2a19..290b4929 100644 --- a/docs/Phaser.Easing.Cubic.html +++ b/docs/Phaser.Easing.Cubic.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Elastic.html b/docs/Phaser.Easing.Elastic.html index a346c298..0314eacd 100644 --- a/docs/Phaser.Easing.Elastic.html +++ b/docs/Phaser.Easing.Elastic.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Exponential.html b/docs/Phaser.Easing.Exponential.html index 6c07b7bf..70449298 100644 --- a/docs/Phaser.Easing.Exponential.html +++ b/docs/Phaser.Easing.Exponential.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Linear.html b/docs/Phaser.Easing.Linear.html index d9790bea..d1c707e3 100644 --- a/docs/Phaser.Easing.Linear.html +++ b/docs/Phaser.Easing.Linear.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -586,8 +706,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Quadratic.html b/docs/Phaser.Easing.Quadratic.html index b1e44d6f..23cf5558 100644 --- a/docs/Phaser.Easing.Quadratic.html +++ b/docs/Phaser.Easing.Quadratic.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Quartic.html b/docs/Phaser.Easing.Quartic.html index 491b3306..3084d6d8 100644 --- a/docs/Phaser.Easing.Quartic.html +++ b/docs/Phaser.Easing.Quartic.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Quintic.html b/docs/Phaser.Easing.Quintic.html index 64fa5f1f..0d031701 100644 --- a/docs/Phaser.Easing.Quintic.html +++ b/docs/Phaser.Easing.Quintic.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.Sinusoidal.html b/docs/Phaser.Easing.Sinusoidal.html index 61b78478..354db64a 100644 --- a/docs/Phaser.Easing.Sinusoidal.html +++ b/docs/Phaser.Easing.Sinusoidal.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -868,8 +988,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Easing.html b/docs/Phaser.Easing.html index 9ba392f2..2143a4b9 100644 --- a/docs/Phaser.Easing.html +++ b/docs/Phaser.Easing.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -478,8 +598,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:59 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Events.html b/docs/Phaser.Events.html new file mode 100644 index 00000000..ec03461e --- /dev/null +++ b/docs/Phaser.Events.html @@ -0,0 +1,660 @@ + + + + + + Phaser Class: Events + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Events

    +
    + +
    +

    + Phaser. + + Events +

    + +

    Phaser.Events

    + +
    + +
    +
    + + + + +
    +

    new Events(sprite)

    + + +
    +
    + + +
    +

    The Events component is a collection of events fired by the parent game object and its components.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + +

    A reference to Description.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Frame.html b/docs/Phaser.Frame.html index 9f0ca9aa..f2cdf532 100644 --- a/docs/Phaser.Frame.html +++ b/docs/Phaser.Frame.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2853,8 +2973,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.FrameData.html b/docs/Phaser.FrameData.html index b64379a2..4da183af 100644 --- a/docs/Phaser.FrameData.html +++ b/docs/Phaser.FrameData.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1800,8 +1920,8 @@ The frames are returned in the output array, or if none is provided in a new Arr
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:45 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Game.html b/docs/Phaser.Game.html index 704bea9a..b752b0b1 100644 --- a/docs/Phaser.Game.html +++ b/docs/Phaser.Game.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -659,7 +779,7 @@ providing quick access to common functions and handling the boot process.

    -Phaser.GameObjectFactory +Phaser.GameObjectFactory @@ -2581,7 +2701,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4068,7 +4188,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4137,7 +4257,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4206,7 +4326,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4324,7 +4444,7 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    Source:
    @@ -4374,8 +4494,8 @@ When a game is paused the onPause event is dispatched. When it is resumed the on
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.GameObjectFactory.html b/docs/Phaser.GameObjectFactory.html new file mode 100644 index 00000000..b1fe49a3 --- /dev/null +++ b/docs/Phaser.GameObjectFactory.html @@ -0,0 +1,1078 @@ + + + + + + Phaser Class: GameObjectFactory + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: GameObjectFactory

    +
    + +
    +

    + Phaser. + + GameObjectFactory +

    + +

    Phaser.GameObjectFactory

    + +
    + +
    +
    + + + + +
    +

    new GameObjectFactory(game)

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running game.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running Game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running Game.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    world

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    world + + +Phaser.World + + + +

    A reference to the game world.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    world

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    world + + +Phaser.World + + + +

    A reference to the game world.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Graphics.html b/docs/Phaser.Graphics.html new file mode 100644 index 00000000..f7df7666 --- /dev/null +++ b/docs/Phaser.Graphics.html @@ -0,0 +1,812 @@ + + + + + + Phaser Class: Graphics + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Graphics

    +
    + +
    +

    + Phaser. + + Graphics +

    + +

    Phaser.Graphics

    + +
    + +
    +
    + + + + +
    +

    new Graphics(game, x, y)

    + + +
    +
    + + +
    +

    Creates a new <code>Graphics</code> object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Current game instance.

    x + + +number + + + +

    X position of the new graphics object.

    y + + +number + + + +

    Y position of the new graphics object.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Group.html b/docs/Phaser.Group.html index 2c75ea5e..e4350c52 100644 --- a/docs/Phaser.Group.html +++ b/docs/Phaser.Group.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -685,7 +805,7 @@
    Source:
    @@ -792,7 +912,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -897,7 +1017,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1101,7 +1221,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1310,7 +1430,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1412,7 +1532,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1514,7 +1634,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1616,7 +1736,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1718,7 +1838,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -1825,7 +1945,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
    Source:
    @@ -1932,7 +2052,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
    Source:
    @@ -2048,7 +2168,7 @@ that then see the addAt method.

    Source:
    @@ -2268,7 +2388,7 @@ Group.addAll('x', 10) will add 10 to the child.x value.

    Source:
    @@ -2410,7 +2530,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -2551,7 +2671,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -2736,7 +2856,7 @@ After the callback parameter you can add as many extra parameters as you like, w
    Source:
    @@ -2929,7 +3049,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -2998,7 +3118,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -3090,7 +3210,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -3141,7 +3261,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    -

    create(x, y, key, frame, exists) → {Phaser.Sprite}

    +

    create(x, y, key, frame, exists) → {Phaser.Sprite}

    @@ -3397,7 +3517,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    Source:
    @@ -3433,7 +3553,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    -Phaser.Sprite +Phaser.Sprite
    @@ -3670,7 +3790,7 @@ and will be positioned at 0, 0 (relative to the Group.x/y)

    Source:
    @@ -3739,7 +3859,7 @@ and will be positioned at 0, 0 (relative to the Group.x/y)

    Source:
    @@ -3927,7 +4047,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -4065,7 +4185,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -4231,7 +4351,7 @@ For example: Group.forEach(awardBonusGold, this, true, 100, 500)

    Source:
    @@ -4374,7 +4494,7 @@ For example: Group.forEachAlive(causeDamage, this, 500)

    Source:
    @@ -4517,7 +4637,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -4635,7 +4755,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -4728,7 +4848,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4821,7 +4941,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -4962,7 +5082,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -5103,7 +5223,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -5267,7 +5387,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -5478,7 +5598,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -5596,7 +5716,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -5666,7 +5786,7 @@ The Group container remains on the display list.

    Source:
    @@ -5807,7 +5927,7 @@ The Group container remains on the display list.

    Source:
    @@ -5948,7 +6068,7 @@ The Group container remains on the display list.

    Source:
    @@ -6235,7 +6355,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -6478,7 +6598,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -6666,7 +6786,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -6807,7 +6927,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -6880,8 +7000,8 @@ Group.subAll('x', 10) will minus 10 from the child.x value.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:00 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Input.html b/docs/Phaser.Input.html index 8b99dbb3..94af83fb 100644 --- a/docs/Phaser.Input.html +++ b/docs/Phaser.Input.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -4280,7 +4400,7 @@ For lots of games it's useful to set this to 1.

    Source:
    @@ -5264,7 +5384,7 @@ otherwise see the Pointer objects directly.

    Source:
    @@ -5370,7 +5490,7 @@ otherwise see the Pointer objects directly.

    Source:
    @@ -5585,7 +5705,7 @@ otherwise see the Pointer objects directly.

    Source:
    @@ -5691,7 +5811,7 @@ otherwise see the Pointer objects directly.

    Source:
    @@ -5797,7 +5917,7 @@ otherwise see the Pointer objects directly.

    Source:
    @@ -5903,7 +6023,7 @@ otherwise see the Pointer objects directly.

    Source:
    @@ -5969,7 +6089,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -6089,7 +6209,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    -

    getAngle(pointer1, pointer2) → {Description}

    +

    destroy()

    @@ -6097,7 +6217,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    -

    Get the angle between two Pointer objects.

    +

    Stops all of the Input Managers from running.

    @@ -6106,78 +6226,6 @@ If you need more then use this to create a new one, up to a maximum of 10.

    -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    pointer1 - - -Pointer - - - -
    pointer2 - - -Pointer - - - -
    - -
    @@ -6202,7 +6250,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -6223,193 +6271,6 @@ If you need more then use this to create a new one, up to a maximum of 10.

    -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -Description - - -
    -
    - - - - - -
    - - - -
    -

    getDistance(pointer1, pointer2) → {Description}

    - - -
    -
    - - -
    -

    Get the distance between two Pointer objects.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    pointer1 - - -Pointer - - - -
    pointer2 - - -Pointer - - - -
    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -Description - - -
    -
    - - -
    @@ -6507,7 +6368,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -6648,7 +6509,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -6789,7 +6650,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -6930,7 +6791,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -7048,7 +6909,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -7189,7 +7050,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -7281,7 +7142,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -7399,7 +7260,7 @@ If you need more then use this to create a new one, up to a maximum of 10.

    Source:
    @@ -7472,8 +7333,8 @@ If you need more then use this to create a new one, up to a maximum of 10.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.InputHandler.html b/docs/Phaser.InputHandler.html index d69deb50..d5b0ccdd 100644 --- a/docs/Phaser.InputHandler.html +++ b/docs/Phaser.InputHandler.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -386,7 +506,7 @@ -Phaser.Sprite +Phaser.Sprite @@ -2928,7 +3048,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c -Phaser.Sprite +Phaser.Sprite @@ -3137,7 +3257,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -3206,7 +3326,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -3347,7 +3467,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -3484,7 +3604,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -3641,7 +3761,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -3710,7 +3830,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -3828,7 +3948,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -4054,7 +4174,7 @@ For example if you had a stack of 6 sprites with the same priority IDs and one c
    Source:
    @@ -4222,7 +4342,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -4363,7 +4483,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -4523,7 +4643,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -4683,7 +4803,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -4843,7 +4963,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -4980,7 +5100,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5121,7 +5241,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5258,7 +5378,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5395,7 +5515,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5524,7 +5644,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5661,7 +5781,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5798,7 +5918,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -5935,7 +6055,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -6072,7 +6192,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -6209,7 +6329,7 @@ For example 16x16 as the snapX and snapY would make the sprite snap to every 16
    Source:
    @@ -6347,7 +6467,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -6489,7 +6609,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -6712,7 +6832,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -6740,7 +6860,7 @@ This value is only set when the pointer is over this Sprite.

    -

    start(priority, useHandCursor) → {Phaser.Sprite}

    +

    start(priority, useHandCursor) → {Phaser.Sprite}

    @@ -6889,7 +7009,7 @@ This value is only set when the pointer is over this Sprite.

    -Phaser.Sprite +Phaser.Sprite
    @@ -6945,7 +7065,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -7083,7 +7203,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -7201,7 +7321,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -7319,7 +7439,7 @@ This value is only set when the pointer is over this Sprite.

    Source:
    @@ -7388,8 +7508,8 @@ This value is only set when the pointer is over this Sprite.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Key.html b/docs/Phaser.Key.html index 564ecb42..9535d426 100644 --- a/docs/Phaser.Key.html +++ b/docs/Phaser.Key.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2435,8 +2555,8 @@ If the key is up it holds the duration of the previous down session.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Keyboard.html b/docs/Phaser.Keyboard.html index ab37d5cd..52fba980 100644 --- a/docs/Phaser.Keyboard.html +++ b/docs/Phaser.Keyboard.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2862,8 +2982,8 @@ This is called automatically by Phaser.Input and should not normally be invoked
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.LinkedList.html b/docs/Phaser.LinkedList.html index c67232b5..81eb6ad1 100644 --- a/docs/Phaser.LinkedList.html +++ b/docs/Phaser.LinkedList.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1354,8 +1474,8 @@ The function must exist on the member.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:46 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Loader.html b/docs/Phaser.Loader.html index 000cf34b..eec2d3f3 100644 --- a/docs/Phaser.Loader.html +++ b/docs/Phaser.Loader.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2066,7 +2186,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2324,7 +2444,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2488,7 +2608,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2652,7 +2772,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2816,7 +2936,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -2980,7 +3100,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3205,7 +3325,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3323,7 +3443,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3464,7 +3584,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3582,7 +3702,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3700,7 +3820,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3818,7 +3938,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -3982,7 +4102,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4100,7 +4220,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4169,7 +4289,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4287,7 +4407,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4356,7 +4476,7 @@ If you do so the Sprite's width or height will be cropped based on the percentag
    Source:
    @@ -4438,7 +4558,7 @@ This allows you to easily make loading bars for games.

    -Phaser.Sprite +Phaser.Sprite @@ -4809,7 +4929,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -4878,7 +4998,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5042,7 +5162,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5300,7 +5420,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5656,7 +5776,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5774,7 +5894,7 @@ This allows you to easily make loading bars for games.

    Source:
    @@ -5824,8 +5944,8 @@ This allows you to easily make loading bars for games.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.LoaderParser.html b/docs/Phaser.LoaderParser.html index ec747435..5ca3d17b 100644 --- a/docs/Phaser.LoaderParser.html +++ b/docs/Phaser.LoaderParser.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -586,8 +706,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.MSPointer.html b/docs/Phaser.MSPointer.html index d3a56e77..f928d333 100644 --- a/docs/Phaser.MSPointer.html +++ b/docs/Phaser.MSPointer.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1619,8 +1739,8 @@ It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 a
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Math.html b/docs/Phaser.Math.html index 499a808e..afd434de 100644 --- a/docs/Phaser.Math.html +++ b/docs/Phaser.Math.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -10085,8 +10205,8 @@ Should be called whenever the angle is updated on the Sprite to stop it from goi
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:01 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Mouse.html b/docs/Phaser.Mouse.html index 1527a2b5..bb7eac36 100644 --- a/docs/Phaser.Mouse.html +++ b/docs/Phaser.Mouse.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2165,8 +2285,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Net.html b/docs/Phaser.Net.html index 368ad77b..065fe463 100644 --- a/docs/Phaser.Net.html +++ b/docs/Phaser.Net.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1244,8 +1364,8 @@ Optionally you can redirect to the new url, or just return it as a string.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Particles.Arcade.Emitter.html b/docs/Phaser.Particles.Arcade.Emitter.html index 4851dc76..f024f524 100644 --- a/docs/Phaser.Particles.Arcade.Emitter.html +++ b/docs/Phaser.Particles.Arcade.Emitter.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -811,7 +931,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -2092,7 +2212,7 @@ Emitter.emitX and Emitter.emitY control the emission location relative to the x/
    Source:
    @@ -3598,7 +3718,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -3705,7 +3825,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -3914,7 +4034,7 @@ This will have no impact on the rotation value of its children, but it will upda
    Source:
    @@ -4762,7 +4882,7 @@ that then see the addAt method.

    Source:
    @@ -4987,7 +5107,7 @@ Group.addAll('x', 10) will add 10 to the child.x value.

    Source:
    @@ -5134,7 +5254,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -5398,7 +5518,7 @@ The child is added to the Group at the location specified by the index value, th
    Source:
    @@ -5588,7 +5708,7 @@ After the callback parameter you can add as many extra parameters as you like, w
    Source:
    @@ -5786,7 +5906,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -5860,7 +5980,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -5957,7 +6077,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    Source:
    @@ -6008,7 +6128,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
    -

    create(x, y, key, frame, exists) → {Phaser.Sprite}

    +

    create(x, y, key, frame, exists) → {Phaser.Sprite}

    @@ -6269,7 +6389,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    Source:
    @@ -6305,7 +6425,7 @@ Useful if you don't need to create the Sprite instances before-hand.

    -Phaser.Sprite +Phaser.Sprite
    @@ -6547,7 +6667,7 @@ and will be positioned at 0, 0 (relative to the Group.x/y)

    Source:
    @@ -6621,7 +6741,7 @@ and will be positioned at 0, 0 (relative to the Group.x/y)

    Source:
    @@ -6814,7 +6934,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -6957,7 +7077,7 @@ Group.divideAll('x', 2) will half the child.x value.

    Source:
    @@ -7197,7 +7317,7 @@ For example: Group.forEach(awardBonusGold, this, true, 100, 500)

    Source:
    @@ -7345,7 +7465,7 @@ For example: Group.forEachAlive(causeDamage, this, 500)

    Source:
    @@ -7493,7 +7613,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -7616,7 +7736,7 @@ For example: Group.forEachDead(bringToLife, this)

    Source:
    @@ -7714,7 +7834,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -7812,7 +7932,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -7958,7 +8078,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -8104,7 +8224,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -8273,7 +8393,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
    Source:
    @@ -8779,7 +8899,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -8902,7 +9022,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.

    Source:
    @@ -8977,7 +9097,7 @@ The Group container remains on the display list.

    Source:
    @@ -9123,7 +9243,7 @@ The Group container remains on the display list.

    Source:
    @@ -9269,7 +9389,7 @@ The Group container remains on the display list.

    Source:
    @@ -9631,7 +9751,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -9879,7 +9999,7 @@ The operation parameter controls how the new value is assigned to the property,
    Source:
    @@ -10823,7 +10943,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -10969,7 +11089,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.

    Source:
    @@ -11111,8 +11231,8 @@ Group.subAll('x', 10) will minus 10 from the child.x value.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Particles.html b/docs/Phaser.Particles.html index bbe241c6..b84e1ee9 100644 --- a/docs/Phaser.Particles.html +++ b/docs/Phaser.Particles.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1035,8 +1155,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Physics.Arcade.html b/docs/Phaser.Physics.Arcade.html new file mode 100644 index 00000000..63aeeb4c --- /dev/null +++ b/docs/Phaser.Physics.Arcade.html @@ -0,0 +1,6408 @@ + + + + + + Phaser Class: Arcade + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Arcade

    +
    + +
    +

    + Phaser.Physics. + + Arcade +

    + +

    Arcade Physics Constructor

    + +
    + +
    +
    + + + + +
    +

    new Arcade(game)

    + + +
    +
    + + +
    +

    Arcade Physics constructor.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    reference to the current game instance.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    maxLevels :number

    + + +
    +
    + +
    +

    Used by the QuadTree to set the maximum number of levels

    +
    + + + +
    Type:
    +
      +
    • + +number + + +
    • +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    maxObjects :number

    + + +
    +
    + +
    +

    Used by the QuadTree to set the maximum number of objects

    +
    + + + +
    Type:
    +
      +
    • + +number + + +
    • +
    + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    accelerateToObject(displayObject, destination, speed, xSpeedMax, ySpeedMax) → {number}

    + + +
    +
    + + +
    +

    Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) +You must give a maximum speed value, beyond which the display object won't go any faster. +Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. +Note: The display object doesn't stop moving once it reaches the destination coordinates.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    displayObject + + +any + + + + + + + + + + + +

    The display object to move.

    destination + + +any + + + + + + + + + + + +

    The display object to move towards. Can be any object but must have visible x/y properties.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will accelerate in pixels per second.

    xSpeedMax + + +number + + + + + + <optional>
    + + + + + +
    + + 500 + +

    The maximum x velocity the display object can reach.

    ySpeedMax + + +number + + + + + + <optional>
    + + + + + +
    + + 500 + +

    The maximum y velocity the display object can reach.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle (in radians) that the object should be visually set to in order to match its new trajectory.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    accelerateToPointer(displayObject, pointer, speed, xSpeedMax, ySpeedMax) → {number}

    + + +
    +
    + + +
    +

    Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.) +You must give a maximum speed value, beyond which the display object won't go any faster. +Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. +Note: The display object doesn't stop moving once it reaches the destination coordinates.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    displayObject + + +any + + + + + + + + + + + +

    The display object to move.

    pointer + + +Phaser.Pointer + + + + + + <optional>
    + + + + + +
    + +

    The pointer to move towards. Defaults to Phaser.Input.activePointer.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will accelerate in pixels per second.

    xSpeedMax + + +number + + + + + + <optional>
    + + + + + +
    + + 500 + +

    The maximum x velocity the display object can reach.

    ySpeedMax + + +number + + + + + + <optional>
    + + + + + +
    + + 500 + +

    The maximum y velocity the display object can reach.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle (in radians) that the object should be visually set to in order to match its new trajectory.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    accelerateToXY(displayObject, x, y, speed, xSpeedMax, ySpeedMax) → {number}

    + + +
    +
    + + +
    +

    Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.) +You must give a maximum speed value, beyond which the display object won't go any faster. +Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. +Note: The display object doesn't stop moving once it reaches the destination coordinates.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    displayObject + + +any + + + + + + + + + + + +

    The display object to move.

    x + + +number + + + + + + + + + + + +

    The x coordinate to accelerate towards.

    y + + +number + + + + + + + + + + + +

    The y coordinate to accelerate towards.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will accelerate in pixels per second.

    xSpeedMax + + +number + + + + + + <optional>
    + + + + + +
    + + 500 + +

    The maximum x velocity the display object can reach.

    ySpeedMax + + +number + + + + + + <optional>
    + + + + + +
    + + 500 + +

    The maximum y velocity the display object can reach.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle (in radians) that the object should be visually set to in order to match its new trajectory.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    accelerationFromRotation(rotation, speed, point) → {Phaser.Point}

    + + +
    +
    + + +
    +

    Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object. +One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    rotation + + +number + + + + + + + + + + + +

    The angle in radians.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will move, in pixels per second sq.

    point + + +Phaser.Point +| + +object + + + + + + <optional>
    + + + + + +
    + +

    The Point object in which the x and y properties will be set to the calculated acceleration.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +
      +
    • A Point where point.x contains the acceleration x value and point.y contains the acceleration y value.
    • +
    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Point + + +
    +
    + + + + + +
    + + + +
    +

    angleBetween(source, target) → {number}

    + + +
    +
    + + +
    +

    Find the angle in radians between two display objects (like Sprites).

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    source + + +any + + + +

    The Display Object to test from.

    target + + +any + + + +

    The Display Object to test to.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle in radians between the source and target display objects.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    angleToPointer(displayObject, pointer) → {number}

    + + +
    +
    + + +
    +

    Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    displayObject + + +any + + + + + + + + + +

    The Display Object to test from.

    pointer + + +Phaser.Pointer + + + + + + <optional>
    + + + + + +

    The Phaser.Pointer to test to. If none is given then Input.activePointer is used.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle in radians between displayObject.x/y to Pointer.x/y

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    angleToXY(displayObject, x, y) → {number}

    + + +
    +
    + + +
    +

    Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    displayObject + + +any + + + +

    The Display Object to test from.

    x + + +number + + + +

    The x coordinate to get the angle to.

    y + + +number + + + +

    The y coordinate to get the angle to.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle in radians between displayObject.x/y to Pointer.x/y

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    collide(object1, object2, collideCallback, processCallback, callbackContext) → {number}

    + + +
    +
    + + +
    +

    Checks for collision between two game objects. The objects can be Sprites, Groups, Emitters or Tilemaps. +You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap or Group vs. Tilemap collisions. +The objects are also automatically separated.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    object1 + + +Phaser.Sprite +| + +Phaser.Group +| + +Phaser.Particles.Emitter +| + +Phaser.Tilemap + + + + + + + + + + + +

    The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap

    object2 + + +Phaser.Sprite +| + +Phaser.Group +| + +Phaser.Particles.Emitter +| + +Phaser.Tilemap + + + + + + + + + + + +

    The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap

    collideCallback + + +function + + + + + + <optional>
    + + + + + +
    + + null + +

    An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap.

    processCallback + + +function + + + + + + <optional>
    + + + + + +
    + + null + +

    A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collideCallback will only be called if processCallback returns true.

    callbackContext + + +object + + + + + + <optional>
    + + + + + +
    + +

    The context in which to run the callbacks.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The number of collisions that were processed.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    computeVelocity(axis, body, velocity, acceleration, drag, mMax) → {number}

    + + +
    +
    + + +
    +

    A tween-like function that takes a starting velocity and some other factors and returns an altered velocity.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    axis + + +number + + + +

    1 for horizontal, 2 for vertical.

    body + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to be updated.

    velocity + + +number + + + +

    Any component of velocity (e.g. 20).

    acceleration + + +number + + + +

    Rate at which the velocity is changing.

    drag + + +number + + + +

    Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set.

    mMax + + +number + + + +

    An absolute value cap for the velocity.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The altered Velocity value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    distanceBetween(source, target) → {number}

    + + +
    +
    + + +
    +

    Find the distance between two display objects (like Sprites).

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    source + + +any + + + +

    The Display Object to test from.

    target + + +any + + + +

    The Display Object to test to.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The distance between the source and target objects.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    distanceToPointer(displayObject, pointer) → {number}

    + + +
    +
    + + +
    +

    Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used. +The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. +If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    displayObject + + +any + + + + + + + + + +

    The Display Object to test from.

    pointer + + +Phaser.Pointer + + + + + + <optional>
    + + + + + +

    The Phaser.Pointer to test to. If none is given then Input.activePointer is used.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The distance between the object and the Pointer.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    distanceToXY(displayObject, x, y) → {number}

    + + +
    +
    + + +
    +

    Find the distance between a display object (like a Sprite) and the given x/y coordinates. +The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. +If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    displayObject + + +any + + + +

    The Display Object to test from.

    x + + +number + + + +

    The x coordinate to move towards.

    y + + +number + + + +

    The y coordinate to move towards.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The distance between the object and the x/y coordinates.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    moveToObject(displayObject, destination, speed, maxTime) → {number}

    + + +
    +
    + + +
    +

    Move the given display object towards the destination object at a steady velocity. +If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. +Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. +Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. +Note: The display object doesn't stop moving once it reaches the destination coordinates. +Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    displayObject + + +any + + + + + + + + + + + +

    The display object to move.

    destination + + +any + + + + + + + + + + + +

    The display object to move towards. Can be any object but must have visible x/y properties.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will move, in pixels per second (default is 60 pixels/sec)

    maxTime + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle (in radians) that the object should be visually set to in order to match its new velocity.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    moveToPointer(displayObject, speed, pointer, maxTime) → {number}

    + + +
    +
    + + +
    +

    Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer. +If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. +Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. +Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. +Note: The display object doesn't stop moving once it reaches the destination coordinates.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    displayObject + + +any + + + + + + + + + + + +

    The display object to move.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will move, in pixels per second (default is 60 pixels/sec)

    pointer + + +Phaser.Pointer + + + + + + <optional>
    + + + + + +
    + +

    The pointer to move towards. Defaults to Phaser.Input.activePointer.

    maxTime + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle (in radians) that the object should be visually set to in order to match its new velocity.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    moveToXY(displayObject, x, y, speed, maxTime) → {number}

    + + +
    +
    + + +
    +

    Move the given display object towards the x/y coordinates at a steady velocity. +If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds. +Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms. +Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. +Note: The display object doesn't stop moving once it reaches the destination coordinates. +Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    displayObject + + +any + + + + + + + + + + + +

    The display object to move.

    x + + +number + + + + + + + + + + + +

    The x coordinate to move towards.

    y + + +number + + + + + + + + + + + +

    The y coordinate to move towards.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will move, in pixels per second (default is 60 pixels/sec)

    maxTime + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The angle (in radians) that the object should be visually set to in order to match its new velocity.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    overlap(object1, object2) → {boolean}

    + + +
    +
    + + +
    +

    Checks if two Sprite objects overlap.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    object1 + + +Phaser.Sprite + + + +

    The first object to check. Can be an instance of Phaser.Sprite or anything that extends it.

    object2 + + +Phaser.Sprite + + + +

    The second object to check. Can be an instance of Phaser.Sprite or anything that extends it.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    true if the two objects overlap.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    <protected> postUpdate()

    + + +
    +
    + + +
    +

    Called automatically by the core game loop.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected> preUpdate()

    + + +
    +
    + + +
    +

    Called automatically by the core game loop.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    separate(body1, body2) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate two physics bodies.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    body2 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    separateTile(body1, tile) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate a physics body and a tile.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    tile + + +Phaser.Tile + + + +

    The tile to collide against.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    separateTileX(body1, tile) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate a physics body and a tile on the x axis.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    tile + + +Phaser.Tile + + + +

    The tile to collide against.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    separateTileY(body1, tile) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate a physics body and a tile on the x axis.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    tile + + +Phaser.Tile + + + +

    The tile to collide against.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    separateX(body1, body2) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate two physics bodies on the x axis.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    body2 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    separateY(body1, body2) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate two physics bodies on the y axis.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    body2 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    updateMotion(The)

    + + +
    +
    + + +
    +

    Called automatically by a Physics body, it updates all motion related values on the Body.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    The + + +Phaser.Physics.Arcade.Body + + + +

    Body object to be updated.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    velocityFromAngle(angle, speed, point) → {Phaser.Point}

    + + +
    +
    + + +
    +

    Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object. +One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    angle + + +number + + + + + + + + + + + +

    The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will move, in pixels per second sq.

    point + + +Phaser.Point +| + +object + + + + + + <optional>
    + + + + + +
    + +

    The Point object in which the x and y properties will be set to the calculated velocity.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +
      +
    • A Point where point.x contains the velocity x value and point.y contains the velocity y value.
    • +
    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Point + + +
    +
    + + + + + +
    + + + +
    +

    velocityFromRotation(rotation, speed, point) → {Phaser.Point}

    + + +
    +
    + + +
    +

    Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object. +One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    rotation + + +number + + + + + + + + + + + +

    The angle in radians.

    speed + + +number + + + + + + <optional>
    + + + + + +
    + + 60 + +

    The speed it will move, in pixels per second sq.

    point + + +Phaser.Point +| + +object + + + + + + <optional>
    + + + + + +
    + +

    The Point object in which the x and y properties will be set to the calculated velocity.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +
      +
    • A Point where point.x contains the velocity x value and point.y contains the velocity y value.
    • +
    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Point + + +
    +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Physics.html b/docs/Phaser.Physics.html new file mode 100644 index 00000000..339633ee --- /dev/null +++ b/docs/Phaser.Physics.html @@ -0,0 +1,612 @@ + + + + + + Phaser Class: Physics + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Physics

    +
    + +
    +

    + Phaser. + + Physics +

    + +
    + +
    +
    + + + + +
    +

    new Physics()

    + + +
    +
    + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + +

    Classes

    + +
    +
    Arcade
    +
    +
    + + + + + + + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Plugin.html b/docs/Phaser.Plugin.html index 2366b40d..f5257f37 100644 --- a/docs/Phaser.Plugin.html +++ b/docs/Phaser.Plugin.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1706,8 +1826,8 @@ It is only called if active is set to true.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.PluginManager.html b/docs/Phaser.PluginManager.html index f6c39dea..a4886e8d 100644 --- a/docs/Phaser.PluginManager.html +++ b/docs/Phaser.PluginManager.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1336,8 +1456,8 @@ It only calls plugins who have active=true.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Point.html b/docs/Phaser.Point.html index 12cb2824..4ef47585 100644 --- a/docs/Phaser.Point.html +++ b/docs/Phaser.Point.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -4896,8 +5016,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Pointer.html b/docs/Phaser.Pointer.html index 7a88f5b7..15d132e6 100644 --- a/docs/Phaser.Pointer.html +++ b/docs/Phaser.Pointer.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -4739,8 +4859,8 @@ Default size of 44px (Apple's recommended "finger tip" size).


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.QuadTree.html b/docs/Phaser.QuadTree.html index 524130d1..9947a438 100644 --- a/docs/Phaser.QuadTree.html +++ b/docs/Phaser.QuadTree.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1205,8 +1325,8 @@ Split the node into 4 subnodes


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:02 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.RandomDataGenerator.html b/docs/Phaser.RandomDataGenerator.html index ff2e4bdc..c893b200 100644 --- a/docs/Phaser.RandomDataGenerator.html +++ b/docs/Phaser.RandomDataGenerator.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1898,8 +2018,8 @@ Random number generator from - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Rectangle.html b/docs/Phaser.Rectangle.html index 7f14f162..f7c069a4 100644 --- a/docs/Phaser.Rectangle.html +++ b/docs/Phaser.Rectangle.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -652,7 +772,7 @@
    Source:
    @@ -758,7 +878,7 @@
    Source:
    @@ -864,7 +984,7 @@
    Source:
    @@ -970,7 +1090,7 @@
    Source:
    @@ -1077,7 +1197,7 @@ If set to true then all of the Rectangle properties are set to 0.

    Source:
    @@ -1179,7 +1299,7 @@ If set to true then all of the Rectangle properties are set to 0.

    Source:
    @@ -1281,7 +1401,7 @@ If set to true then all of the Rectangle properties are set to 0.

    Source:
    @@ -1489,7 +1609,7 @@ If set to true then all of the Rectangle properties are set to 0.

    Source:
    @@ -1595,7 +1715,7 @@ If set to true then all of the Rectangle properties are set to 0.

    Source:
    @@ -1701,7 +1821,7 @@ If set to true then all of the Rectangle properties are set to 0.

    Source:
    @@ -1808,7 +1928,7 @@ However it does affect the height property, whereas changing the y value does no
    Source:
    @@ -1914,7 +2034,7 @@ However it does affect the height property, whereas changing the y value does no
    Source:
    @@ -2020,7 +2140,7 @@ However it does affect the height property, whereas changing the y value does no
    Source:
    @@ -2483,7 +2603,7 @@ However it does affect the height property, whereas changing the y value does no
    Source:
    @@ -2666,7 +2786,7 @@ However it does affect the height property, whereas changing the y value does no
    Source:
    @@ -2830,7 +2950,7 @@ However it does affect the height property, whereas changing the y value does no
    Source:
    @@ -2995,7 +3115,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
    Source:
    @@ -3160,7 +3280,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -3347,7 +3467,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -3511,7 +3631,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -3726,7 +3846,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -3891,7 +4011,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4124,7 +4244,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4308,7 +4428,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4523,7 +4643,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4676,7 +4796,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4836,7 +4956,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -4978,7 +5098,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
    Source:
    @@ -5119,7 +5239,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
    Source:
    @@ -5260,7 +5380,7 @@ A Rectangle object is said to contain another if the second Rectangle object fal
    Source:
    @@ -5402,7 +5522,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -5517,6 +5637,75 @@ This method compares the x, y, width and height properties of each Rectangle.

    + + + +
    +

    floorAll()

    + + +
    +
    + + +
    +

    Runs Math.floor() on the x, y, width and height values of this Rectangle.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + +
    @@ -5635,7 +5824,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -5799,7 +5988,7 @@ This method compares the x, y, width and height properties of each Rectangle.

    Source:
    @@ -5964,7 +6153,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -6197,7 +6386,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -6865,7 +7054,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -6957,7 +7146,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -7141,7 +7330,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Source:
    @@ -7214,8 +7403,8 @@ This method checks the x, y, width, and height properties of the Rectangles.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.RenderTexture.html b/docs/Phaser.RenderTexture.html new file mode 100644 index 00000000..4d406da5 --- /dev/null +++ b/docs/Phaser.RenderTexture.html @@ -0,0 +1,1452 @@ + + + + + + Phaser Class: RenderTexture + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: RenderTexture

    +
    + +
    +

    + Phaser. + + RenderTexture +

    + +

    Phaser.RenderTexture

    + +
    + +
    +
    + + + + +
    +

    new RenderTexture(game, key, width, height)

    + + +
    +
    + + +
    +

    A dynamic initially blank canvas to which images can be drawn

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Current game instance.

    key + + +string + + + +

    Asset key for the render texture.

    width + + +number + + + +

    the width of the render texture.

    height + + +number + + + +

    the height of the render texture.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    frame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    frame + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    height + + +number + + + +

    the height.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    indetityMatrix

    + + +
    +
    + +
    +

    I know this has a typo in it, but it's because the PIXI.RenderTexture does and we need to pair-up with it +once they update pixi to fix the typo, we'll fix it here too :)

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    indetityMatrix + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + +

    the name of the object.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + +

    the width.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.RequestAnimationFrame.html b/docs/Phaser.RequestAnimationFrame.html index 1dc5fb53..f2ef9d0d 100644 --- a/docs/Phaser.RequestAnimationFrame.html +++ b/docs/Phaser.RequestAnimationFrame.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1208,8 +1328,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Signal.html b/docs/Phaser.Signal.html index e1014a0b..f3235e32 100644 --- a/docs/Phaser.Signal.html +++ b/docs/Phaser.Signal.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1696,7 +1816,7 @@ already dispatched before.

    -Function +function @@ -2193,8 +2313,8 @@ already dispatched before.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Sound.html b/docs/Phaser.Sound.html index 0b3a284a..a9813371 100644 --- a/docs/Phaser.Sound.html +++ b/docs/Phaser.Sound.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -798,7 +918,7 @@
    Source:
    @@ -1224,7 +1344,7 @@
    Source:
    @@ -1326,7 +1446,7 @@
    Source:
    @@ -1435,7 +1555,7 @@
    Source:
    @@ -1855,7 +1975,7 @@
    Source:
    @@ -2070,7 +2190,7 @@
    Source:
    @@ -2176,7 +2296,7 @@
    Source:
    @@ -2282,7 +2402,7 @@
    Source:
    @@ -2388,7 +2508,7 @@
    Source:
    @@ -2494,7 +2614,7 @@
    Source:
    @@ -2600,7 +2720,7 @@
    Source:
    @@ -2706,7 +2826,7 @@
    Source:
    @@ -2812,7 +2932,7 @@
    Source:
    @@ -2921,7 +3041,7 @@
    Source:
    @@ -3030,7 +3150,219 @@
    Source:
    + + + + + + + +
    + + + + + + + +
    +

    pausedPosition

    + + +
    +
    + +
    +

    Description.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    pausedPosition + + +number + + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    pausedTime

    + + +
    +
    + +
    +

    Description.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    pausedTime + + +number + + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -3139,7 +3471,7 @@
    Source:
    @@ -3309,7 +3641,7 @@ - autoplay + stopTime @@ -3350,14 +3682,11 @@ -
    Default Value:
    -
    • 0
    -
    Source:
    @@ -3572,7 +3901,7 @@
    Source:
    @@ -3678,7 +4007,7 @@
    Source:
    @@ -3780,7 +4109,7 @@
    Source:
    @@ -4000,7 +4329,7 @@
    Source:
    @@ -4283,7 +4612,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -4352,7 +4681,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -4646,7 +4975,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -4787,7 +5116,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -5042,7 +5371,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -5111,7 +5440,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -5229,7 +5558,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -5298,7 +5627,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -5367,7 +5696,7 @@ This allows you to bundle multiple sounds together into a single audio file and
    Source:
    @@ -5417,8 +5746,8 @@ This allows you to bundle multiple sounds together into a single audio file and
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.SoundManager.html b/docs/Phaser.SoundManager.html index 475e87b7..dedced84 100644 --- a/docs/Phaser.SoundManager.html +++ b/docs/Phaser.SoundManager.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2325,8 +2445,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Sprite.html b/docs/Phaser.Sprite.html new file mode 100644 index 00000000..2c251b46 --- /dev/null +++ b/docs/Phaser.Sprite.html @@ -0,0 +1,7799 @@ + + + + + + Phaser Class: Sprite + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Sprite

    +
    + +
    +

    + Phaser. + + Sprite +

    + +

    Phaser.Sprite

    + +
    + +
    +
    + + + + +
    +

    new Sprite(game, x, y, key, frame)

    + + +
    +
    + + +
    +

    Create a new Sprite object. Sprites are the lifeblood of your game, used for nearly everything visual. +At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. +They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), +events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running game.

    x + + +number + + + +

    The x coordinate (in world space) to position the Sprite at.

    y + + +number + + + +

    The y coordinate (in world space) to position the Sprite at.

    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame + + +string +| + +number + + + +

    If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    alive

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    alive + + +boolean + + + +

    This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    anchor

    + + +
    +
    + +
    +

    The anchor sets the origin point of the texture. +The default is 0,0 this means the textures origin is the top left +Setting than anchor to 0.5,0.5 means the textures origin is centered +Setting the anchor to 1,1 would mean the textures origin points will be the bottom right

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    anchor + + +Phaser.Point + + + +

    The anchor around with Sprite rotation and scaling takes place.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    angle

    + + +
    +
    + +
    +

    Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. +Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90. +If you wish to work in radians instead of degrees use the property Sprite.rotation instead.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    angle + + +number + + + +

    Gets or sets the Sprites angle of rotation in degrees.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    animations

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    animations + + +Phaser.AnimationManager + + + +

    This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager)

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    autoCull

    + + +
    +
    + +
    +

    Should this Sprite be automatically culled if out of range of the camera? +A culled sprite has its renderable property set to 'false'.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    autoCull + + +boolean + + + +

    A flag indicating if the Sprite should be automatically camera culled or not.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    body

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body + + +Phaser.Physics.Arcade.Body + + + +

    By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bottomLeft

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bottomLeft + + +Phaser.Point + + + +

    A Point containing the bottom left coordinate of the Sprite. Takes rotation and scale into account.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bottomRight

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bottomRight + + +Phaser.Point + + + +

    A Point containing the bottom right coordinate of the Sprite. Takes rotation and scale into account.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bounds

    + + +
    +
    + +
    +

    This Rectangle object fully encompasses the Sprite and is updated in real-time. +The bounds is the full bounding area after rotation and scale have been taken into account. It should not be modified directly. +It's used for Camera culling and physics body alignment.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bounds + + +Phaser.Rectangle + + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    center

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    center + + +Phaser.Point + + + +

    A Point containing the center coordinate of the Sprite. Takes rotation and scale into account.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    crop

    + + +
    +
    + +
    +

    You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide. +The crop is only applied if you have set Sprite.cropEnabled to true.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    crop + + +Phaser.Rectangle + + + +

    The crop Rectangle applied to the Sprite texture before rendering.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    cropEnabled

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    cropEnabled + + +boolean + + + +

    If true the Sprite.crop property is used to crop the texture before render. Set to false to disable.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    currentFrame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    currentFrame + + +Phaser.Frame + + + +

    A reference to the currently displayed frame.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    events

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    events + + +Events + + + +

    The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    exists

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    exists + + +boolean + + + +

    If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    fixedToCamera

    + + +
    +
    + +
    +

    A Sprite that is fixed to the camera ignores the position of any ancestors in the display list and uses its x/y coordinates as offsets from the top left of the camera.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    fixedToCamera + + +boolean + + + +

    Fixes this Sprite to the Camera.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    frame

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    frame + + +number + + + +

    Gets or sets the current frame index and updates the Texture Cache for display.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    frameName

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    frameName + + +string + + + +

    Gets or sets the current frame name and updates the Texture Cache for display.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running Game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    group

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    group + + +Phaser.Group + + + +

    The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    health

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    health + + +number + + + +

    Health value. Used in combination with damage() to allow for quick killing of Sprites.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + +
    +

    The height of the sprite in pixels, setting this will actually modify the scale to acheive the value desired. +If you wish to crop the Sprite instead see the Sprite.crop value.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    height + + +number + + + +

    The height of the Sprite in pixels.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> inCamera

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    inCamera + + +boolean + + + +

    Is this sprite visible to the camera or not?

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    input

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    input + + +InputHandler + + + +

    The Input Handler Component.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    inputEnabled

    + + +
    +
    + +
    +

    By default a Sprite won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is +activated for this Sprite instance and it will then start to process click/touch events and more.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    inputEnabled + + +boolean + + + +

    Set to true to allow this Sprite to receive input events, otherwise false.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    inWorld

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    inWorld + + +boolean + + + +

    This value is set to true if the Sprite is positioned within the World, otherwise false.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    inWorldThreshold

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    inWorldThreshold + + +number + + + +

    A threshold value applied to the inWorld check. If you don't want a Sprite to be considered "out of the world" until at least 100px away for example then set it to 100.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    key

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    lifespan

    + + +
    +
    + +
    +

    If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc. +The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    lifespan + + +number + + + +

    The lifespan of the Sprite (in ms) before it will be killed.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + +

    The user defined name given to this Sprite.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    offset

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    offset + + +Phaser.Point + + + +

    Corner point defaults. Should not typically be modified.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    outOfBoundsKill

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    outOfBoundsKill + + +boolean + + + +

    If true the Sprite is killed as soon as Sprite.inWorld is false.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    renderOrderID

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    renderOrderID + + +number + + + +

    Used by the Renderer and Input Manager to control picking order.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    topLeft

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    topLeft + + +Phaser.Point + + + +

    A Point containing the top left coordinate of the Sprite. Takes rotation and scale into account.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    topRight

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    topRight + + +Phaser.Point + + + +

    A Point containing the top right coordinate of the Sprite. Takes rotation and scale into account.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +number + + + +

    The const type of this object.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + +
    +

    The width of the sprite in pixels, setting this will actually modify the scale to acheive the value desired. +If you wish to crop the Sprite instead see the Sprite.crop value.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + +

    The width of the Sprite in pixels.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    x

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    The x coordinate (in world space) of this Sprite.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    y

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    y + + +number + + + +

    The y coordinate (in world space) of this Sprite.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    bringToTop()

    + + +
    +
    + + +
    +

    Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only +bought to the top of that Group, not the entire display list.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    (Phaser.Sprite) This instance.

    +
    + + + + + + + +
    + + + +
    +

    centerOn(x, y)

    + + +
    +
    + + +
    +

    Moves the sprite so its center is located on the given x and y coordinates. +Doesn't change the anchor point of the sprite.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    The x coordinate (in world space) to position the Sprite at.

    y + + +number + + + +

    The y coordinate (in world space) to position the Sprite at.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    (Phaser.Sprite) This instance.

    +
    + + + + + + + +
    + + + +
    +

    damage(amount)

    + + +
    +
    + + +
    +

    Damages the Sprite, this removes the given amount from the Sprites health property. +If health is then taken below zero Sprite.kill is called.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    amount + + +number + + + +

    The amount to subtract from the Sprite.health value.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    (Phaser.Sprite) This instance.

    +
    + + + + + + + +
    + + + +
    +

    deltaAbsX() → {number}

    + + +
    +
    + + +
    +

    Returns the absolute delta x value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The absolute delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    deltaAbsY() → {number}

    + + +
    +
    + + +
    +

    Returns the absolute delta y value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The absolute delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    deltaX() → {number}

    + + +
    +
    + + +
    +

    Returns the delta x value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    deltaY() → {number}

    + + +
    +
    + + +
    +

    Returns the delta y value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    destroy()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    destroy()

    + + +
    +
    + + +
    +

    Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present +and nulls its reference to game, freeing it up for garbage collection.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    getLocalPosition(p, x, y, sx, sy) → {Phaser.Point}

    + + +
    +
    + + +
    +

    Gets the local position of a coordinate relative to the Sprite, factoring in rotation and scale. +Mostly only used internally.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    p + + +Phaser.Point + + + +

    The Point object to store the results in.

    x + + +number + + + +

    x coordinate within the Sprite to translate.

    y + + +number + + + +

    x coordinate within the Sprite to translate.

    sx + + +number + + + +

    Scale factor to be applied.

    sy + + +number + + + +

    Scale factor to be applied.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The translated point.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Point + + +
    +
    + + + + + +
    + + + +
    +

    getLocalUnmodifiedPosition(p, x, y) → {Phaser.Point}

    + + +
    +
    + + +
    +

    Gets the local unmodified position of a coordinate relative to the Sprite, factoring in rotation and scale. +Mostly only used internally by the Input Manager, but also useful for custom hit detection.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    p + + +Phaser.Point + + + +

    The Point object to store the results in.

    x + + +number + + + +

    x coordinate within the Sprite to translate.

    y + + +number + + + +

    x coordinate within the Sprite to translate.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The translated point.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Point + + +
    +
    + + + + + +
    + + + +
    +

    kill()

    + + +
    +
    + + +
    +

    Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false. +It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal. +Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory. +If you don't need this Sprite any more you should call Sprite.destroy instead.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    (Phaser.Sprite) This instance.

    +
    + + + + + + + +
    + + + +
    +

    loadTexture(key, frame)

    + + +
    +
    + + +
    +

    Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. +This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame + + +string +| + +number + + + +

    If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    play(name, frameRate, loop, killOnComplete) → {Phaser.Animation}

    + + +
    +
    + + +
    +

    Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() +If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    name + + +string + + + + + + + + + + + +

    The name of the animation to be played, e.g. "fire", "walk", "jump".

    frameRate + + +number + + + + + + <optional>
    + + + + + +
    + + null + +

    The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.

    loop + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + +

    Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.

    killOnComplete + + +boolean + + + + + + <optional>
    + + + + + +
    + + false + +

    If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    A reference to playing Animation instance.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Animation + + +
    +
    + + + + + +
    + + + +
    +

    postUpdate()

    + + +
    +
    + + +
    +

    Internal function called by the World postUpdate cycle.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    preUpdate()

    + + +
    +
    + + +
    +

    Automatically called by World.preUpdate. You can create your own update in Objects that extend Phaser.Sprite.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    preUpdate()

    + + +
    +
    + + +
    +

    Automatically called by World.preUpdate. Handles cache updates, lifespan checks, animation updates and physics updates.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    reset()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    reset(x, y, health)

    + + +
    +
    + + +
    +

    Resets the Sprite. This places the Sprite at the given x/y world coordinates and then +sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. +If the Sprite has a physics body that too is reset.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    x + + +number + + + + + + + + + + + +

    The x coordinate (in world space) to position the Sprite at.

    y + + +number + + + + + + + + + + + +

    The y coordinate (in world space) to position the Sprite at.

    health + + +number + + + + + + <optional>
    + + + + + +
    + + 1 + +

    The health to give the Sprite.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    (Phaser.Sprite) This instance.

    +
    + + + + + + + +
    + + + +
    +

    resetCrop()

    + + +
    +
    + + +
    +

    Resets the Sprite.crop value back to the frame dimensions.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    revive(health)

    + + +
    +
    + + +
    +

    Brings a 'dead' Sprite back to life, optionally giving it the health value specified. +A resurrected Sprite has its alive, exists and visible properties all set to true. +It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    health + + +number + + + + + + <optional>
    + + + + + +
    + + 1 + +

    The health to give the Sprite.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    (Phaser.Sprite) This instance.

    +
    + + + + + + + +
    + + + +
    +

    updateAnimation()

    + + +
    +
    + + +
    +

    Internal function called by preUpdate.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    updateBounds()

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    updateBounds()

    + + +
    +
    + + +
    +

    Internal function called by preUpdate.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    updateCache()

    + + +
    +
    + + +
    +

    Internal function called by preUpdate.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    updateCrop()

    + + +
    +
    + + +
    +

    Internal function called by preUpdate.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Stage.html b/docs/Phaser.Stage.html index 5adc7e26..e72d9ee0 100644 --- a/docs/Phaser.Stage.html +++ b/docs/Phaser.Stage.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -708,7 +828,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree
    Source:
    @@ -819,6 +939,114 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree +
    + + + +
    + + + +
    +

    checkOffsetInterval

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    checkOffsetInterval + + +number +| + +false + + + +

    The time (in ms) between which the stage should check to see if it has moved.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 2500
    + + + +
    Source:
    +
    + + + + + + +
    @@ -1241,6 +1469,75 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree
    +
    +

    update()

    + + +
    +
    + + +
    +

    Runs Stage processes that need periodic updates, such as the offset checks.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +

    visibilityChange(event)

    @@ -1332,7 +1629,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree
    Source:
    @@ -1382,8 +1679,8 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.StageScaleMode.html b/docs/Phaser.StageScaleMode.html index afb56453..12f9e211 100644 --- a/docs/Phaser.StageScaleMode.html +++ b/docs/Phaser.StageScaleMode.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -3719,8 +3839,8 @@ Please note that this needs to be supported by the web browser and isn't the sam
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.State.html b/docs/Phaser.State.html index 44b1f3a4..40cf1e4c 100644 --- a/docs/Phaser.State.html +++ b/docs/Phaser.State.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -469,7 +589,7 @@ It provides quick access to common functions such as the camera, cache, input, m -Phaser.GameObjectFactory +Phaser.GameObjectFactory @@ -2473,8 +2593,8 @@ If you need to use the loader, you may need to use them here.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.StateManager.html b/docs/Phaser.StateManager.html index 95db2d55..c85cda32 100644 --- a/docs/Phaser.StateManager.html +++ b/docs/Phaser.StateManager.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -3330,8 +3450,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:03 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Text.html b/docs/Phaser.Text.html new file mode 100644 index 00000000..0bedbd55 --- /dev/null +++ b/docs/Phaser.Text.html @@ -0,0 +1,1886 @@ + + + + + + Phaser Class: Text + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Text

    +
    + +
    +

    + Phaser. + + Text +

    + +

    Phaser.Text

    + +
    + +
    +
    + + + + +
    +

    new Text(game, x, y, text, style)

    + + +
    +
    + + +
    +

    Create a new <code>Text</code>.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Current game instance.

    x + + +number + + + +

    X position of the new text object.

    y + + +number + + + +

    Y position of the new text object.

    text + + +string + + + +

    The actual text that will be written.

    style + + +object + + + +

    The style object containing style attributes like font, font size ,

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    alive

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    alive + + +boolean + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    anchor

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    anchor + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    exists

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    exists + + +boolean + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    A reference to the currently running game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    group

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    group + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • null
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    name

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    name + + +string + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    renderable

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    renderable + + +boolean + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    scale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    scale + + +Phaser.Point + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    destroy()

    + + +
    +
    + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    destroy()

    + + +
    +
    + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    update()

    + + +
    +
    + + +
    +

    Automatically called by World.update.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.TileSprite.html b/docs/Phaser.TileSprite.html new file mode 100644 index 00000000..0fff887c --- /dev/null +++ b/docs/Phaser.TileSprite.html @@ -0,0 +1,1219 @@ + + + + + + Phaser Class: TileSprite + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: TileSprite

    +
    + +
    +

    + Phaser. + + TileSprite +

    + +

    Phaser.Tilemap

    + +
    + +
    +
    + + + + +
    +

    new TileSprite(game, x, y, width, height, key, frame)

    + + +
    +
    + + +
    +

    Create a new <code>TileSprite</code>.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Current game instance.

    x + + +number + + + +

    X position of the new tileSprite.

    y + + +number + + + +

    Y position of the new tileSprite.

    width + + +number + + + +

    the width of the tilesprite.

    height + + +number + + + +

    the height of the tilesprite.

    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame + + +string +| + +number + + + +

    If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    texture

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    texture + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    tilePosition

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    tilePosition + + +Point + + + +

    The offset position of the image that is being tiled.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    tileScale

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    tileScale + + +Point + + + +

    The scaling of the image that is being tiled.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    type

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +Description + + + +

    Description.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Time.html b/docs/Phaser.Time.html index ef62d104..6c4f3228 100644 --- a/docs/Phaser.Time.html +++ b/docs/Phaser.Time.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2305,7 +2425,7 @@
    Source:
    @@ -2446,7 +2566,7 @@
    Source:
    @@ -2538,7 +2658,7 @@
    Source:
    @@ -2794,8 +2914,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Touch.html b/docs/Phaser.Touch.html index f0030245..dd046bcb 100644 --- a/docs/Phaser.Touch.html +++ b/docs/Phaser.Touch.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -2445,8 +2565,8 @@ Doesn't appear to be supported by most browsers on a canvas element yet.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Tween.html b/docs/Phaser.Tween.html index 43e8bc3b..2bb08d08 100644 --- a/docs/Phaser.Tween.html +++ b/docs/Phaser.Tween.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -3151,8 +3271,8 @@ Used in combination with repeat you can create endless loops.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.TweenManager.html b/docs/Phaser.TweenManager.html index 19e57da6..ee5fce9b 100644 --- a/docs/Phaser.TweenManager.html +++ b/docs/Phaser.TweenManager.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1507,8 +1627,8 @@ Please see https://github.com/sole/tw
    - Documentation generated by
    JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Utils.Debug.html b/docs/Phaser.Utils.Debug.html index efc59fd1..8ebe3b10 100644 --- a/docs/Phaser.Utils.Debug.html +++ b/docs/Phaser.Utils.Debug.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1686,7 +1806,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -1847,7 +1967,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2137,7 +2257,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2345,7 +2465,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2425,7 +2545,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -2588,7 +2708,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2780,7 +2900,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -2941,7 +3061,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3184,7 +3304,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3486,7 +3606,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3729,7 +3849,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3807,7 +3927,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -3890,7 +4010,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -3970,7 +4090,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -4100,7 +4220,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -4180,7 +4300,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -4343,7 +4463,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -4423,7 +4543,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -4674,7 +4794,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -4837,7 +4957,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -4917,7 +5037,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -5080,7 +5200,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -5334,7 +5454,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -5414,7 +5534,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL -Phaser.Sprite +Phaser.Sprite @@ -5577,7 +5697,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    Source:
    @@ -5860,8 +5980,8 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Utils.html b/docs/Phaser.Utils.html index 29af7947..218c7314 100644 --- a/docs/Phaser.Utils.html +++ b/docs/Phaser.Utils.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1019,8 +1139,8 @@ dir = 1 (left), 2 (right), 3 (both)


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.World.html b/docs/Phaser.World.html index 51a398a0..bfe1e906 100644 --- a/docs/Phaser.World.html +++ b/docs/Phaser.World.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -1994,8 +2114,8 @@ If you need to adjust the bounds of the world


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.html b/docs/Phaser.html index 61ee9adf..e0e7fa60 100644 --- a/docs/Phaser.html +++ b/docs/Phaser.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -392,6 +512,15 @@
    AnimationParser
    +
    BitmapText
    +
    + +
    Bullet
    +
    + +
    Button
    +
    +
    Cache
    @@ -413,6 +542,9 @@
    Easing
    +
    Events
    +
    +
    Frame
    @@ -422,6 +554,12 @@
    Game
    +
    GameObjectFactory
    +
    + +
    Graphics
    +
    +
    Group
    @@ -461,6 +599,9 @@
    Particles
    +
    Physics
    +
    +
    Plugin
    @@ -482,6 +623,9 @@
    Rectangle
    +
    RenderTexture
    +
    +
    RequestAnimationFrame
    @@ -494,6 +638,9 @@
    SoundManager
    +
    Sprite
    +
    +
    Stage
    @@ -506,6 +653,12 @@
    StateManager
    +
    Text
    +
    + +
    TileSprite
    +
    +
    Time
    @@ -554,8 +707,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.js.html b/docs/Phaser.js.html index c2f516bb..62ba15c6 100644 --- a/docs/Phaser.js.html +++ b/docs/Phaser.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -330,10 +450,10 @@ /** * @namespace Phaser */ -var Phaser = Phaser || { +var Phaser = Phaser || { - VERSION: '1.1.0', - GAMES: [], + VERSION: '<%= version %>', + GAMES: [], AUTO: 0, CANVAS: 1, WEBGL: 2, @@ -362,7 +482,8 @@ var Phaser = Phaser || { PIXI.InteractionManager = function (dummy) { // We don't need this in Pixi, so we've removed it to save space // however the Stage object expects a reference to it, so here is a dummy entry. -}; +}; + @@ -382,8 +503,8 @@ PIXI.InteractionManager = function (dummy) {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Plugin.js.html b/docs/Plugin.js.html index d781cc54..5fae9c1c 100644 --- a/docs/Plugin.js.html +++ b/docs/Plugin.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -456,8 +576,8 @@ Phaser.Plugin.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/PluginManager.js.html b/docs/PluginManager.js.html index 32e281f1..3ee07220 100644 --- a/docs/PluginManager.js.html +++ b/docs/PluginManager.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -573,8 +693,8 @@ Phaser.PluginManager.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Point.js.html b/docs/Point.js.html index 6c893032..e0b13c5b 100644 --- a/docs/Point.js.html +++ b/docs/Point.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -738,8 +858,8 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Pointer.js.html b/docs/Pointer.js.html index f8a4d99f..55c1a964 100644 --- a/docs/Pointer.js.html +++ b/docs/Pointer.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -604,7 +724,7 @@ Phaser.Pointer.prototype = { this.game.input.x = this.x * this.game.input.scale.x; this.game.input.y = this.y * this.game.input.scale.y; this.game.input.position.setTo(this.x, this.y); - this.game.input.onDown.dispatch(this); + this.game.input.onDown.dispatch(this, event); this.game.input.resetSpeed(this.x, this.y); } @@ -829,7 +949,7 @@ Phaser.Pointer.prototype = { if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0)) { - this.game.input.onUp.dispatch(this); + this.game.input.onUp.dispatch(this, event); // Was it a tap? if (this.duration >= 0 && this.duration <= this.game.input.tapRate) @@ -1030,8 +1150,8 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldY", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/QuadTree.js.html b/docs/QuadTree.js.html index 715c8d09..2bcf4b56 100644 --- a/docs/QuadTree.js.html +++ b/docs/QuadTree.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -605,8 +725,8 @@ Phaser.QuadTree.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/RandomDataGenerator.js.html b/docs/RandomDataGenerator.js.html index 75430b32..3b234790 100644 --- a/docs/RandomDataGenerator.js.html +++ b/docs/RandomDataGenerator.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -587,8 +707,8 @@ Phaser.RandomDataGenerator.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Rectangle.js.html b/docs/Rectangle.js.html index 658e1ade..5a8a1f65 100644 --- a/docs/Rectangle.js.html +++ b/docs/Rectangle.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -426,6 +546,19 @@ Phaser.Rectangle.prototype = { }, + /** + * Runs Math.floor() on the x, y, width and height values of this Rectangle. + * @method Phaser.Rectangle#floorAll + **/ + floorAll: function () { + + this.x = Math.floor(this.x); + this.y = Math.floor(this.y); + this.width = Math.floor(this.width); + this.height = Math.floor(this.height); + + }, + /** * Copies the x, y, width and height properties from any given object to this Rectangle. * @method Phaser.Rectangle#copyFrom @@ -829,7 +962,7 @@ Phaser.Rectangle.inflate = function (a, dx, dy) { * @return {Phaser.Rectangle} The Rectangle object. */ Phaser.Rectangle.inflatePoint = function (a, point) { - return Phaser.Phaser.Rectangle.inflate(a, point.x, point.y); + return Phaser.Rectangle.inflate(a, point.x, point.y); }; /** @@ -868,6 +1001,10 @@ Phaser.Rectangle.contains = function (a, x, y) { return (x >= a.x && x <= a.right && y >= a.y && y <= a.bottom); }; +Phaser.Rectangle.containsRaw = function (rx, ry, rw, rh, x, y) { + return (x >= rx && x <= (rx + rw) && y >= ry && y <= (ry + rh)); +}; + /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter. * @method Phaser.Rectangle.containsPoint @@ -876,7 +1013,7 @@ Phaser.Rectangle.contains = function (a, x, y) { * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsPoint = function (a, point) { - return Phaser.Phaser.Rectangle.contains(a, point.x, point.y); + return Phaser.Rectangle.contains(a, point.x, point.y); }; /** @@ -1007,8 +1144,8 @@ Phaser.Rectangle.union = function (a, b, out) {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/RenderTexture.js.html b/docs/RenderTexture.js.html new file mode 100644 index 00000000..3880f0d0 --- /dev/null +++ b/docs/RenderTexture.js.html @@ -0,0 +1,574 @@ + + + + + + Phaser Source: gameobjects/RenderTexture.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/RenderTexture.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* A dynamic initially blank canvas to which images can be drawn
    +* @class Phaser.RenderTexture
    +* @constructor
    +* @param {Phaser.Game} game - Current game instance.
    +* @param {string} key - Asset key for the render texture.
    +* @param {number} width - the width of the render texture.
    +* @param {number} height - the height of the render texture.
    +*/
    +Phaser.RenderTexture = function (game, key, width, height) {
    +
    +	/**
    +	* @property {Phaser.Game} game - A reference to the currently running game. 
    +	*/
    +	this.game = game;
    +
    +	/**
    +    * @property {string} name - the name of the object. 
    +	*/
    +    this.name = key;
    +
    +	PIXI.EventTarget.call( this );
    +
    +	/**
    +	* @property {number} width - the width. 
    +    */
    +	this.width = width || 100;
    +	
    +	/**
    +	* @property {number} height - the height. 
    +    */
    +	this.height = height || 100;
    +
    +	/**
    +	* I know this has a typo in it, but it's because the PIXI.RenderTexture does and we need to pair-up with it
    +	* once they update pixi to fix the typo, we'll fix it here too :)
    +    * @property {Description} indetityMatrix - Description. 
    + 	*/
    +	this.indetityMatrix = PIXI.mat3.create();
    +
    +	/**
    +	* @property {Description} frame - Description. 
    +    */
    +	this.frame = new PIXI.Rectangle(0, 0, this.width, this.height);	
    +
    +	/**
    +	* @property {Description} type - Description. 
    +    */
    +	this.type = Phaser.RENDERTEXTURE;
    +
    +	if (PIXI.gl)
    +	{
    +		this.initWebGL();
    +	}
    +	else
    +	{
    +		this.initCanvas();
    +	}
    +	
    +};
    +
    +Phaser.RenderTexture.prototype = Phaser.Utils.extend(true, PIXI.RenderTexture.prototype);
    +Phaser.RenderTexture.prototype.constructor = Phaser.RenderTexture;
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/RequestAnimationFrame.js.html b/docs/RequestAnimationFrame.js.html index 1c29f775..55d15796 100644 --- a/docs/RequestAnimationFrame.js.html +++ b/docs/RequestAnimationFrame.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -493,8 +613,8 @@ Phaser.RequestAnimationFrame.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Signal.js.html b/docs/Signal.js.html index 9fbe233d..e53e8c5a 100644 --- a/docs/Signal.js.html +++ b/docs/Signal.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -638,8 +758,8 @@ Phaser.Signal.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/SignalBinding.html b/docs/SignalBinding.html index c8bb1cf0..2579d39e 100644 --- a/docs/SignalBinding.html +++ b/docs/SignalBinding.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -638,8 +758,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:52:04 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/SignalBinding.js.html b/docs/SignalBinding.js.html index 2f5557d3..721fddf8 100644 --- a/docs/SignalBinding.js.html +++ b/docs/SignalBinding.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -503,8 +623,8 @@ Phaser.SignalBinding.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Sound.js.html b/docs/Sound.js.html index 94c710f3..72c02c51 100644 --- a/docs/Sound.js.html +++ b/docs/Sound.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -441,8 +561,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {number} autoplay - * @default + * @property {number} stopTime */ this.stopTime = 0; @@ -453,6 +572,18 @@ Phaser.Sound = function (game, key, volume, loop) { */ this.paused = false; + /** + * Description. + * @property {number} pausedPosition + */ + this.pausedPosition = 0; + + /** + * Description. + * @property {number} pausedTime + */ + this.pausedTime = 0; + /** * Description. * @property {boolean} isPlaying @@ -950,10 +1081,13 @@ Phaser.Sound.prototype = { this.stop(); this.isPlaying = false; this.paused = true; + this.pausedPosition = this.currentTime; + this.pausedTime = this.game.time.now; this.onPause.dispatch(this); } }, + /** * Resumes the sound * @method Phaser.Sound#resume @@ -964,14 +1098,20 @@ Phaser.Sound.prototype = { { if (this.usingWebAudio) { + var p = this.position + (this.pausedPosition / 1000); + + this._sound = this.context.createBufferSource(); + this._sound.buffer = this._buffer; + this._sound.connect(this.gainNode); + if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration); + this._sound.noteGrainOn(0, p, this.duration); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - this._sound.start(0, this.position, this.duration); + this._sound.start(0, p, this.duration); } } else @@ -981,6 +1121,7 @@ Phaser.Sound.prototype = { this.isPlaying = true; this.paused = false; + this.startTime += (this.game.time.now - this.pausedTime); this.onResume.dispatch(this); } @@ -1147,8 +1288,8 @@ Object.defineProperty(Phaser.Sound.prototype, "volume", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/SoundManager.js.html b/docs/SoundManager.js.html index df2a0748..eaf2cba7 100644 --- a/docs/SoundManager.js.html +++ b/docs/SoundManager.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -790,8 +910,8 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Sprite.js.html b/docs/Sprite.js.html new file mode 100644 index 00000000..c1d87190 --- /dev/null +++ b/docs/Sprite.js.html @@ -0,0 +1,1630 @@ + + + + + + Phaser Source: gameobjects/Sprite.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/Sprite.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Create a new `Sprite` object. Sprites are the lifeblood of your game, used for nearly everything visual.
    +* At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.
    +* They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),
    +* events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.
    +*
    +* @class Phaser.Sprite
    +* @constructor
    +* @param {Phaser.Game} game - A reference to the currently running game.
    +* @param {number} x - The x coordinate (in world space) to position the Sprite at.
    +* @param {number} y - The y coordinate (in world space) to position the Sprite at.
    +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
    +*/
    +Phaser.Sprite = function (game, x, y, key, frame) {
    +
    +    x = x || 0;
    +    y = y || 0;
    +    key = key || null;
    +    frame = frame || null;
    +    
    +    /**
    +	* @property {Phaser.Game} game - A reference to the currently running Game.
    +	*/
    +	this.game = game;
    + 
    +	/**
    +	* @property {boolean} exists - If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all.
    +	* @default
    +	*/
    +    this.exists = true;
    +
    +	/**
    +    * @property {boolean} alive - This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering.
    +   	* @default
    +   	*/
    +    this.alive = true;
    +
    +	/**
    +    * @property {Phaser.Group} group - The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent.
    +   	*/
    +    this.group = null;
    +
    +    /**
    +     * @property {string} name - The user defined name given to this Sprite.
    +     * @default
    +     */
    +    this.name = '';
    +
    +    /**
    +	* @property {number} type - The const type of this object.
    +    * @default
    +	*/
    +    this.type = Phaser.SPRITE;
    +
    +    /**
    +	* @property {number} renderOrderID - Used by the Renderer and Input Manager to control picking order.
    +	* @default
    +	*/
    +    this.renderOrderID = -1;
    +
    +    /**
    +    * If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
    +	* The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called.
    +	* @property {number} lifespan - The lifespan of the Sprite (in ms) before it will be killed.
    +	* @default
    +	*/    
    +    this.lifespan = 0;
    +
    +    /**
    +    * @property {Events} events - The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components.
    +    */
    +    this.events = new Phaser.Events(this);
    +
    +    /**
    +    * @property {Phaser.AnimationManager} animations - This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager)
    +    */
    +    this.animations = new Phaser.AnimationManager(this);
    +
    +    /**
    +    * @property {InputHandler} input - The Input Handler Component.
    +    */
    +    this.input = new Phaser.InputHandler(this);
    +
    +    /**
    +    *  @property {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +    */
    +    this.key = key;
    +
    +    /**
    +    *  @property {Phaser.Frame} currentFrame - A reference to the currently displayed frame.
    +    */
    +    this.currentFrame = null;
    +
    +    if (key instanceof Phaser.RenderTexture)
    +    {
    +        PIXI.Sprite.call(this, key);
    +
    +        this.currentFrame = this.game.cache.getTextureFrame(key.name);
    +    }
    +    else if (key instanceof PIXI.Texture)
    +    {
    +        PIXI.Sprite.call(this, key);
    +
    +        this.currentFrame = frame;
    +    }
    +    else
    +    {
    +        if (key == null || this.game.cache.checkImageKey(key) == false)
    +        {
    +            key = '__default';
    +            this.key = key;
    +        }
    +
    +        PIXI.Sprite.call(this, PIXI.TextureCache[key]);
    +
    +        if (this.game.cache.isSpriteSheet(key))
    +        {
    +            this.animations.loadFrameData(this.game.cache.getFrameData(key));
    +
    +            if (frame !== null)
    +            {
    +                if (typeof frame === 'string')
    +                {
    +                    this.frameName = frame;
    +                }
    +                else
    +                {
    +                    this.frame = frame;
    +                }
    +            }
    +        }
    +        else
    +        {
    +            this.currentFrame = this.game.cache.getFrame(key);
    +        }
    +    }
    +
    +    /**
    +    * The anchor sets the origin point of the texture.
    +    * The default is 0,0 this means the textures origin is the top left 
    +    * Setting than anchor to 0.5,0.5 means the textures origin is centered
    +    * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right
    +    *
    +    * @property {Phaser.Point} anchor - The anchor around with Sprite rotation and scaling takes place.
    +    */
    +    this.anchor = new Phaser.Point();
    +
    +    /**
    +    * @property {number} x - The x coordinate (in world space) of this Sprite.
    +    */
    +    this.x = x;
    +    
    +    /**
    +    * @property {number} y - The y coordinate (in world space) of this Sprite.
    +    */
    +    this.y = y;
    +
    +	this.position.x = x;
    +	this.position.y = y;
    +
    +    /**
    +    * Should this Sprite be automatically culled if out of range of the camera?
    +    * A culled sprite has its renderable property set to 'false'.
    +    *
    +    * @property {boolean} autoCull - A flag indicating if the Sprite should be automatically camera culled or not.
    +    * @default
    +    */
    +    this.autoCull = false;
    +
    +    /**
    +    * @property {Phaser.Point} scale - The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc.
    +    */ 
    +    this.scale = new Phaser.Point(1, 1);
    +
    +    /**
    +    * @property {Phaser.Point} _cache - A mini cache for storing all of the calculated values.
    +    * @private
    +    */
    +    this._cache = { 
    +
    +        dirty: false,
    +
    +        //  Transform cache
    +        a00: -1, a01: -1, a02: -1, a10: -1, a11: -1, a12: -1, id: -1, 
    +
    +        //  Input specific transform cache
    +        i01: -1, i10: -1, idi: -1,
    +
    +        //  Bounds check
    +        left: null, right: null, top: null, bottom: null, 
    +
    +        //  The previous calculated position
    +        x: -1, y: -1,
    +
    +        //  The actual scale values based on the worldTransform
    +        scaleX: 1, scaleY: 1,
    +
    +        //  cache scale check
    +        realScaleX: 1, realScaleY: 1,
    +
    +        //  The width/height of the image, based on the un-modified frame size multiplied by the final calculated scale size
    +        width: this.currentFrame.sourceSizeW, height: this.currentFrame.sourceSizeH,
    +
    +        //  The actual width/height of the image if from a trimmed atlas, multiplied by the final calculated scale size
    +        halfWidth: Math.floor(this.currentFrame.sourceSizeW / 2), halfHeight: Math.floor(this.currentFrame.sourceSizeH / 2),
    +
    +        //  The width/height of the image, based on the un-modified frame size multiplied by the final calculated scale size
    +        calcWidth: -1, calcHeight: -1,
    +
    +        //  The current frame details
    +        // frameID: this.currentFrame.uuid, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height,
    +        frameID: -1, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height,
    +
    +        boundsX: 0, boundsY: 0,
    +
    +        //  If this sprite visible to the camera (regardless of being set to visible or not)
    +        cameraVisible: true,
    +
    +        //  Crop cache
    +        cropX: 0, cropY: 0, cropWidth: this.currentFrame.sourceSizeW, cropHeight: this.currentFrame.sourceSizeH
    +
    +    };
    +  
    +    /**
    +    * @property {Phaser.Point} offset - Corner point defaults. Should not typically be modified.
    +    */    
    +    this.offset = new Phaser.Point;
    +    
    +    /**
    +    * @property {Phaser.Point} center - A Point containing the center coordinate of the Sprite. Takes rotation and scale into account.
    +    */
    +    this.center = new Phaser.Point(x + Math.floor(this._cache.width / 2), y + Math.floor(this._cache.height / 2));
    +   
    +    /**
    +    * @property {Phaser.Point} topLeft - A Point containing the top left coordinate of the Sprite. Takes rotation and scale into account.
    +    */
    +    this.topLeft = new Phaser.Point(x, y);
    +    
    +    /**
    +    * @property {Phaser.Point} topRight - A Point containing the top right coordinate of the Sprite. Takes rotation and scale into account.
    +    */
    +    this.topRight = new Phaser.Point(x + this._cache.width, y);
    +    
    +    /**
    +    * @property {Phaser.Point} bottomRight - A Point containing the bottom right coordinate of the Sprite. Takes rotation and scale into account.
    +    */
    +    this.bottomRight = new Phaser.Point(x + this._cache.width, y + this._cache.height);
    +    
    +    /**
    +    * @property {Phaser.Point} bottomLeft - A Point containing the bottom left coordinate of the Sprite. Takes rotation and scale into account.
    +    */
    +    this.bottomLeft = new Phaser.Point(x, y + this._cache.height);
    +    
    +    /**
    +    * This Rectangle object fully encompasses the Sprite and is updated in real-time.
    +    * The bounds is the full bounding area after rotation and scale have been taken into account. It should not be modified directly.
    +    * It's used for Camera culling and physics body alignment.
    +    * @property {Phaser.Rectangle} bounds
    +    */
    +    this.bounds = new Phaser.Rectangle(x, y, this._cache.width, this._cache.height);
    +    
    +    /**
    +    * @property {Phaser.Physics.Arcade.Body} body - By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates.
    +    */
    +    this.body = new Phaser.Physics.Arcade.Body(this);
    +
    +    /**
    +    * @property {number} health - Health value. Used in combination with damage() to allow for quick killing of Sprites.
    +    */    
    +    this.health = 1;
    +
    +    /**
    +    * @property {boolean} inWorld - This value is set to true if the Sprite is positioned within the World, otherwise false.
    +    */
    +    this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds);
    +    
    +    /**
    +    * @property {number} inWorldThreshold - A threshold value applied to the inWorld check. If you don't want a Sprite to be considered "out of the world" until at least 100px away for example then set it to 100.
    +    * @default
    +    */
    +    this.inWorldThreshold = 0;
    +
    +    /**
    +    * @property {boolean} outOfBoundsKill - If true the Sprite is killed as soon as Sprite.inWorld is false.
    +    * @default
    +    */
    +    this.outOfBoundsKill = false;
    +    
    +    /**
    +    * @property {boolean} _outOfBoundsFired - Internal flag.
    +    * @private
    +    * @default
    +    */
    +    this._outOfBoundsFired = false;
    +
    +    /**
    +    * A Sprite that is fixed to the camera ignores the position of any ancestors in the display list and uses its x/y coordinates as offsets from the top left of the camera.
    +    * @property {boolean} fixedToCamera - Fixes this Sprite to the Camera.
    +    * @default
    +    */
    +    this.fixedToCamera = false;
    +
    +    /**
    +    * You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide.
    +    * The crop is only applied if you have set Sprite.cropEnabled to true.
    +    * @property {Phaser.Rectangle} crop - The crop Rectangle applied to the Sprite texture before rendering.
    +    * @default
    +    */
    +    this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height);
    +
    +    /**
    +    * @property {boolean} cropEnabled - If true the Sprite.crop property is used to crop the texture before render. Set to false to disable.
    +    * @default
    +    */
    +    this.cropEnabled = false;
    +
    +};
    +
    +//  Needed to keep the PIXI.Sprite constructor in the prototype chain (as the core pixi renderer uses an instanceof check sadly)
    +Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype);
    +Phaser.Sprite.prototype.constructor = Phaser.Sprite;
    +
    +/**
    +* Automatically called by World.preUpdate. Handles cache updates, lifespan checks, animation updates and physics updates.
    +*
    +* @method Phaser.Sprite#preUpdate
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.preUpdate = function() {
    +
    +    if (!this.exists)
    +    {
    +        this.renderOrderID = -1;
    +        return;
    +    }
    +
    +    if (this.lifespan > 0)
    +    {
    +        this.lifespan -= this.game.time.elapsed;
    +
    +        if (this.lifespan <= 0)
    +        {
    +            this.kill();
    +            return;
    +        }
    +    }
    +
    +    this._cache.dirty = false;
    +
    +    if (this.animations.update())
    +    {
    +        this._cache.dirty = true;
    +    }
    +
    +    if (this.visible)
    +    {
    +        this.renderOrderID = this.game.world.currentRenderOrderID++;
    +    }
    +
    +    this.prevX = this.x;
    +    this.prevY = this.y;
    +
    +    this.updateCache();
    +    this.updateAnimation();
    +
    +    if (this.cropEnabled)
    +    {
    +        this.updateCrop();
    +    }
    +
    +    //  Re-run the camera visibility check
    +    if (this._cache.dirty)
    +    {
    +        this.updateBounds();
    +
    +        this._cache.cameraVisible = Phaser.Rectangle.intersects(this.game.world.camera.screenView, this.bounds, 0);
    +
    +        if (this.autoCull == true)
    +        {
    +            //  Won't get rendered but will still get its transform updated
    +            this.renderable = this._cache.cameraVisible;
    +        }
    +
    +        //  Update our physics bounds
    +        if (this.body)
    +        {
    +            this.body.updateBounds(this.center.x, this.center.y, this._cache.scaleX, this._cache.scaleY);
    +        }
    +    }
    +
    +    if (this.body)
    +    {
    +        this.body.preUpdate();
    +    }
    +
    +}
    +
    +/**
    +* Internal function called by preUpdate.
    +*
    +* @method Phaser.Sprite#updateCache
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.updateCache = function() {
    +
    +    //  |a c tx|
    +    //  |b d ty|
    +    //  |0 0  1|
    +
    +    if (this.worldTransform[1] != this._cache.i01 || this.worldTransform[3] != this._cache.i10)
    +    {
    +        this._cache.a00 = this.worldTransform[0];  //  scaleX         a
    +        this._cache.a01 = this.worldTransform[1];  //  skewY          c
    +        this._cache.a10 = this.worldTransform[3];  //  skewX          b
    +        this._cache.a11 = this.worldTransform[4];  //  scaleY         d
    +
    +        this._cache.i01 = this.worldTransform[1];  //  skewY          c (remains non-modified for input checks)
    +        this._cache.i10 = this.worldTransform[3];  //  skewX          b (remains non-modified for input checks)
    +
    +        this._cache.scaleX = Math.sqrt((this._cache.a00 * this._cache.a00) + (this._cache.a01 * this._cache.a01)); // round this off a bit?
    +        this._cache.scaleY = Math.sqrt((this._cache.a10 * this._cache.a10) + (this._cache.a11 * this._cache.a11)); // round this off a bit?
    +
    +        this._cache.a01 *= -1;
    +        this._cache.a10 *= -1;
    +
    +        this._cache.dirty = true;
    +    }
    +
    +    if (this.worldTransform[2] != this._cache.a02 || this.worldTransform[5] != this._cache.a12)
    +    {
    +        this._cache.a02 = this.worldTransform[2];  //  translateX     tx
    +        this._cache.a12 = this.worldTransform[5];  //  translateY     ty
    +        this._cache.dirty = true;
    +    }
    +
    +}
    +
    +/**
    +* Internal function called by preUpdate.
    +*
    +* @method Phaser.Sprite#updateAnimation
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.updateAnimation = function() {
    +
    +    if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID)
    +    {
    +        this._cache.frameWidth = this.texture.frame.width;
    +        this._cache.frameHeight = this.texture.frame.height;
    +        this._cache.frameID = this.currentFrame.uuid;
    +        this._cache.dirty = true;
    +    }
    +
    +    if (this._cache.dirty && this.currentFrame)
    +    {
    +        this._cache.width = this.currentFrame.width;
    +        this._cache.height = this.currentFrame.height;
    +        this._cache.halfWidth = Math.floor(this._cache.width / 2);
    +        this._cache.halfHeight = Math.floor(this._cache.height / 2);
    +
    +        this._cache.id = 1 / (this._cache.a00 * this._cache.a11 + this._cache.a01 * -this._cache.a10);
    +        this._cache.idi = 1 / (this._cache.a00 * this._cache.a11 + this._cache.i01 * -this._cache.i10);
    +    }
    +
    +}
    +
    +/**
    +* Internal function called by preUpdate.
    +*
    +* @method Phaser.Sprite#updateBounds
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.updateBounds = function() {
    +
    +    var sx = 1;
    +    var sy = 1;
    +
    +    if (this.worldTransform[3] !== 0 || this.worldTransform[1] !== 0)
    +    {
    +        sx = this.scale.x;
    +        sy = this.scale.y;
    +    }
    +
    +    this.offset.setTo(this._cache.a02 - (this.anchor.x * this.width), this._cache.a12 - (this.anchor.y * this.height));
    +
    +    this.getLocalPosition(this.center, this.offset.x + (this.width / 2), this.offset.y + (this.height / 2), sx, sy);
    +    this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y, sx, sy);
    +    this.getLocalPosition(this.topRight, this.offset.x + this.width, this.offset.y, sx, sy);
    +    this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this.height, sx, sy);
    +    this.getLocalPosition(this.bottomRight, this.offset.x + this.width, this.offset.y + this.height, sx, sy);
    +
    +    this._cache.left = Phaser.Math.min(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x);
    +    this._cache.right = Phaser.Math.max(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x);
    +    this._cache.top = Phaser.Math.min(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y);
    +    this._cache.bottom = Phaser.Math.max(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y);
    +
    +    this.bounds.setTo(this._cache.left, this._cache.top, this._cache.right - this._cache.left, this._cache.bottom - this._cache.top);
    +
    +    //  This is the coordinate the Sprite was at when the last bounds was created
    +    this._cache.boundsX = this._cache.x;
    +    this._cache.boundsY = this._cache.y;
    +        
    +    this.updateFrame = true;
    +
    +    if (this.inWorld == false)
    +    {
    +        //  Sprite WAS out of the screen, is it still?
    +        this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds, this.inWorldThreshold);
    +
    +        if (this.inWorld)
    +        {
    +            //  It's back again, reset the OOB check
    +            this._outOfBoundsFired = false;
    +        }
    +    }
    +    else
    +    {
    +        //   Sprite WAS in the screen, has it now left?
    +        this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds, this.inWorldThreshold);
    +
    +        if (this.inWorld == false)
    +        {
    +            this.events.onOutOfBounds.dispatch(this);
    +            this._outOfBoundsFired = true;
    +
    +            if (this.outOfBoundsKill)
    +            {
    +                this.kill();
    +            }
    +        }
    +    }
    +
    +}
    +
    +/**
    +* Gets the local position of a coordinate relative to the Sprite, factoring in rotation and scale.
    +* Mostly only used internally.
    +* 
    +* @method Phaser.Sprite#getLocalPosition
    +* @memberof Phaser.Sprite
    +* @param {Phaser.Point} p - The Point object to store the results in.
    +* @param {number} x - x coordinate within the Sprite to translate.
    +* @param {number} y - x coordinate within the Sprite to translate.
    +* @param {number} sx - Scale factor to be applied.
    +* @param {number} sy - Scale factor to be applied.
    +* @return {Phaser.Point} The translated point.
    +*/
    +Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) {
    +
    +    p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * sx) + this._cache.a02;
    +    p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * sy) + this._cache.a12;
    +
    +    return p;
    +
    +}
    +
    +/**
    +* Gets the local unmodified position of a coordinate relative to the Sprite, factoring in rotation and scale.
    +* Mostly only used internally by the Input Manager, but also useful for custom hit detection.
    +* 
    +* @method Phaser.Sprite#getLocalUnmodifiedPosition
    +* @memberof Phaser.Sprite
    +* @param {Phaser.Point} p - The Point object to store the results in.
    +* @param {number} x - x coordinate within the Sprite to translate.
    +* @param {number} y - x coordinate within the Sprite to translate.
    +* @return {Phaser.Point} The translated point.
    +*/
    +Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, gx, gy) {
    +
    +    var a00 = this.worldTransform[0], a01 = this.worldTransform[1], a02 = this.worldTransform[2],
    +        a10 = this.worldTransform[3], a11 = this.worldTransform[4], a12 = this.worldTransform[5],
    +        id = 1 / (a00 * a11 + a01 * -a10),
    +        x = a11 * id * gx + -a01 * id * gy + (a12 * a01 - a02 * a11) * id,
    +        y = a00 * id * gy + -a10 * id * gx + (-a12 * a00 + a02 * a10) * id;
    +
    +    p.x = x + (this.anchor.x * this._cache.width);
    +    p.y = y + (this.anchor.y * this._cache.height);
    +
    +    return p;
    +
    +}
    +
    +/**
    +* Internal function called by preUpdate.
    +*
    +* @method Phaser.Sprite#updateCrop
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.updateCrop = function() {
    +
    +    //  This only runs if crop is enabled
    +    if (this.crop.width != this._cache.cropWidth || this.crop.height != this._cache.cropHeight || this.crop.x != this._cache.cropX || this.crop.y != this._cache.cropY)
    +    {
    +        this.crop.floorAll();
    +
    +        this._cache.cropX = this.crop.x;
    +        this._cache.cropY = this.crop.y;
    +        this._cache.cropWidth = this.crop.width;
    +        this._cache.cropHeight = this.crop.height;
    +
    +        this.texture.frame = this.crop;
    +        this.texture.width = this.crop.width;
    +        this.texture.height = this.crop.height;
    +
    +        this.texture.updateFrame = true;
    +
    +        PIXI.Texture.frameUpdates.push(this.texture);
    +    }
    +
    +}
    +
    +/**
    +* Resets the Sprite.crop value back to the frame dimensions.
    +*
    +* @method Phaser.Sprite#resetCrop
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.resetCrop = function() {
    +
    +    this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height);
    +    this.texture.setFrame(this.crop);
    +    this.cropEnabled = false;
    +
    +}
    +
    +/**
    +* Internal function called by the World postUpdate cycle.
    +*
    +* @method Phaser.Sprite#postUpdate
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.postUpdate = function() {
    +
    +    if (this.exists)
    +    {
    +        //  The sprite is positioned in this call, after taking into consideration motion updates and collision
    +        if (this.body)
    +        {
    +            this.body.postUpdate();
    +        }
    +
    +        if (this.fixedToCamera)
    +        {
    +            this._cache.x = this.game.camera.view.x + this.x;
    +            this._cache.y = this.game.camera.view.y + this.y;
    +        }
    +        else
    +        {
    +            this._cache.x = this.x;
    +            this._cache.y = this.y;
    +        }
    +
    +        if (this.position.x != this._cache.x || this.position.y != this._cache.y)
    +        {
    +            this.position.x = this._cache.x;
    +            this.position.y = this._cache.y;
    +        }
    +    }
    +
    +}
    +
    +/**
    +* Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache.
    +* This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game.
    +*
    +* @method Phaser.Sprite#loadTexture
    +* @memberof Phaser.Sprite
    +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
    +*/
    +Phaser.Sprite.prototype.loadTexture = function (key, frame) {
    +
    +    this.key = key;
    +
    +    if (key instanceof Phaser.RenderTexture)
    +    {
    +        this.currentFrame = this.game.cache.getTextureFrame(key.name);
    +    }
    +    else if (key instanceof PIXI.Texture)
    +    {
    +        this.currentFrame = frame;
    +    }
    +    else
    +    {
    +        if (typeof key === 'undefined' || this.game.cache.checkImageKey(key) === false)
    +        {
    +            key = '__default';
    +            this.key = key;
    +        }
    +
    +        if (this.game.cache.isSpriteSheet(key))
    +        {
    +            this.animations.loadFrameData(this.game.cache.getFrameData(key));
    +
    +            if (typeof frame !== 'undefined')
    +            {
    +                if (typeof frame === 'string')
    +                {
    +                    this.frameName = frame;
    +                }
    +                else
    +                {
    +                    this.frame = frame;
    +                }
    +            }
    +        }
    +        else
    +        {
    +            this.currentFrame = this.game.cache.getFrame(key);
    +            this.setTexture(PIXI.TextureCache[key]);
    +        }
    +    }
    +
    +}
    +
    +/**
    +* Returns the absolute delta x value.
    +*
    +* @method Phaser.Sprite#deltaAbsX
    +* @memberof Phaser.Sprite
    +* @return {number} The absolute delta value.
    +*/
    +Phaser.Sprite.prototype.deltaAbsX = function () {
    +    return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX());
    +}
    +
    +/**
    +* Returns the absolute delta y value.
    +*
    +* @method Phaser.Sprite#deltaAbsY
    +* @memberof Phaser.Sprite
    +* @return {number} The absolute delta value.
    +*/
    +Phaser.Sprite.prototype.deltaAbsY = function () {
    +    return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY());
    +}
    +
    +/**
    +* Returns the delta x value.
    +*
    +* @method Phaser.Sprite#deltaX
    +* @memberof Phaser.Sprite
    +* @return {number} The delta value.
    +*/
    +Phaser.Sprite.prototype.deltaX = function () {
    +    return this.x - this.prevX;
    +}
    +
    +/**
    +* Returns the delta y value.
    +*
    +* @method Phaser.Sprite#deltaY
    +* @memberof Phaser.Sprite
    +* @return {number} The delta value.
    +*/
    +Phaser.Sprite.prototype.deltaY = function () {
    +    return this.y - this.prevY;
    +}
    +
    +/**
    +* Moves the sprite so its center is located on the given x and y coordinates.
    +* Doesn't change the anchor point of the sprite.
    +* 
    +* @method Phaser.Sprite#centerOn
    +* @memberof Phaser.Sprite
    +* @param {number} x - The x coordinate (in world space) to position the Sprite at.
    +* @param {number} y - The y coordinate (in world space) to position the Sprite at.
    +* @return (Phaser.Sprite) This instance.
    +*/
    +Phaser.Sprite.prototype.centerOn = function(x, y) {
    +
    +    this.x = x + (this.x - this.center.x);
    +    this.y = y + (this.y - this.center.y);
    +    return this;
    +
    +}
    +
    +/**
    +* Brings a 'dead' Sprite back to life, optionally giving it the health value specified.
    +* A resurrected Sprite has its alive, exists and visible properties all set to true.
    +* It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal.
    +* 
    +* @method Phaser.Sprite#revive
    +* @memberof Phaser.Sprite
    +* @param {number} [health=1] - The health to give the Sprite.
    +* @return (Phaser.Sprite) This instance.
    +*/
    +Phaser.Sprite.prototype.revive = function(health) {
    +
    +    if (typeof health === 'undefined') { health = 1; }
    +
    +    this.alive = true;
    +    this.exists = true;
    +    this.visible = true;
    +    this.health = health;
    +
    +    if (this.events)
    +    {
    +        this.events.onRevived.dispatch(this);
    +    }
    +
    +    return this;
    +
    +}
    +
    +/**
    +* Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false.
    +* It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal.
    +* Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory.
    +* If you don't need this Sprite any more you should call Sprite.destroy instead.
    +* 
    +* @method Phaser.Sprite#kill
    +* @memberof Phaser.Sprite
    +* @return (Phaser.Sprite) This instance.
    +*/
    +Phaser.Sprite.prototype.kill = function() {
    +
    +    this.alive = false;
    +    this.exists = false;
    +    this.visible = false;
    +
    +    if (this.events)
    +    {
    +        this.events.onKilled.dispatch(this);
    +    }
    +
    +    return this;
    +
    +}
    +
    +/**
    +* Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present
    +* and nulls its reference to game, freeing it up for garbage collection.
    +* 
    +* @method Phaser.Sprite#destroy
    +* @memberof Phaser.Sprite
    +*/
    +Phaser.Sprite.prototype.destroy = function() {
    +
    +    if (this.group)
    +    {
    +        this.group.remove(this);
    +    }
    +
    +    if (this.input)
    +    {
    +        this.input.destroy();
    +    }
    +
    +    if (this.events)
    +    {
    +        this.events.destroy();
    +    }
    +
    +    if (this.animations)
    +    {
    +        this.animations.destroy();
    +    }
    +
    +    this.alive = false;
    +    this.exists = false;
    +    this.visible = false;
    +
    +    this.game = null;
    +
    +}
    +
    +/**
    +* Damages the Sprite, this removes the given amount from the Sprites health property.
    +* If health is then taken below zero Sprite.kill is called.
    +* 
    +* @method Phaser.Sprite#damage
    +* @memberof Phaser.Sprite
    +* @param {number} amount - The amount to subtract from the Sprite.health value.
    +* @return (Phaser.Sprite) This instance.
    +*/
    +Phaser.Sprite.prototype.damage = function(amount) {
    +
    +    if (this.alive)
    +    {
    +        this.health -= amount;
    +
    +        if (this.health < 0)
    +        {
    +            this.kill();
    +        }
    +    }
    +
    +    return this;
    +
    +}
    +
    +/**
    +* Resets the Sprite. This places the Sprite at the given x/y world coordinates and then
    +* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
    +* If the Sprite has a physics body that too is reset.
    +* 
    +* @method Phaser.Sprite#reset
    +* @memberof Phaser.Sprite
    +* @param {number} x - The x coordinate (in world space) to position the Sprite at.
    +* @param {number} y - The y coordinate (in world space) to position the Sprite at.
    +* @param {number} [health=1] - The health to give the Sprite.
    +* @return (Phaser.Sprite) This instance.
    +*/
    +Phaser.Sprite.prototype.reset = function(x, y, health) {
    +
    +    if (typeof health === 'undefined') { health = 1; }
    +
    +    this.x = x;
    +    this.y = y;
    +    this.position.x = this.x;
    +    this.position.y = this.y;
    +    this.alive = true;
    +    this.exists = true;
    +    this.visible = true;
    +    this.renderable = true;
    +    this._outOfBoundsFired = false;
    +
    +    this.health = health;
    +
    +    if (this.body)
    +    {
    +        this.body.reset();
    +    }
    +
    +    return this;
    +    
    +}
    +
    +/**
    +* Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only
    +* bought to the top of that Group, not the entire display list.
    +* 
    +* @method Phaser.Sprite#bringToTop
    +* @memberof Phaser.Sprite
    +* @return (Phaser.Sprite) This instance.
    +*/
    +Phaser.Sprite.prototype.bringToTop = function() {
    +
    +    if (this.group)
    +    {
    +        this.group.bringToTop(this);
    +    }
    +    else
    +    {
    +        this.game.world.bringToTop(this);
    +    }
    +
    +    return this;
    +
    +}
    +
    +/**
    +* Play an animation based on the given key. The animation should previously have been added via sprite.animations.add()
    +* If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself.
    +* 
    +* @method Phaser.Sprite#play
    +* @memberof Phaser.Sprite
    +* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump".
    +* @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used.
    +* @param {boolean} [loop=false] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used.
    +* @param {boolean} [killOnComplete=false] - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed.
    +* @return {Phaser.Animation} A reference to playing Animation instance.
    +*/
    +Phaser.Sprite.prototype.play = function (name, frameRate, loop, killOnComplete) {
    +
    +    if (this.animations)
    +    {
    +        return this.animations.play(name, frameRate, loop, killOnComplete);
    +    }
    +
    +}
    +
    +/**
    +* Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
    +* Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
    +* If you wish to work in radians instead of degrees use the property Sprite.rotation instead.
    +* @name Phaser.Sprite#angle
    +* @property {number} angle - Gets or sets the Sprites angle of rotation in degrees.
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, 'angle', {
    +
    +    get: function() {
    +        return Phaser.Math.wrapAngle(Phaser.Math.radToDeg(this.rotation));
    +    },
    +
    +    set: function(value) {
    +        this.rotation = Phaser.Math.degToRad(Phaser.Math.wrapAngle(value));
    +    }
    +
    +});
    +
    +/**
    +* @name Phaser.Sprite#frame
    +* @property {number} frame - Gets or sets the current frame index and updates the Texture Cache for display.
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, "frame", {
    +    
    +    get: function () {
    +        return this.animations.frame;
    +    },
    +
    +    set: function (value) {
    +        this.animations.frame = value;
    +    }
    +
    +});
    +
    +/**
    +* @name Phaser.Sprite#frameName
    +* @property {string} frameName - Gets or sets the current frame name and updates the Texture Cache for display.
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, "frameName", {
    +    
    +    get: function () {
    +        return this.animations.frameName;
    +    },
    +
    +    set: function (value) {
    +        this.animations.frameName = value;
    +    }
    +
    +});
    +
    +/**
    +* @name Phaser.Sprite#inCamera
    +* @property {boolean} inCamera - Is this sprite visible to the camera or not?
    +* @readonly
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, "inCamera", {
    +    
    +    get: function () {
    +        return this._cache.cameraVisible;
    +    }
    +
    +});
    +
    +/**
    +* The width of the sprite in pixels, setting this will actually modify the scale to acheive the value desired.
    +* If you wish to crop the Sprite instead see the Sprite.crop value.
    +*
    +* @name Phaser.Sprite#width
    +* @property {number} width - The width of the Sprite in pixels.
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, 'width', {
    +
    +    get: function() {
    +        return this.scale.x * this.currentFrame.width;
    +    },
    +
    +    set: function(value) {
    +
    +        this.scale.x = value / this.currentFrame.width;
    +        this._cache.scaleX = value / this.currentFrame.width;
    +        this._width = value;
    +
    +    }
    +
    +});
    +
    +/**
    +* The height of the sprite in pixels, setting this will actually modify the scale to acheive the value desired.
    +* If you wish to crop the Sprite instead see the Sprite.crop value.
    +*
    +* @name Phaser.Sprite#height
    +* @property {number} height - The height of the Sprite in pixels.
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, 'height', {
    +
    +    get: function() {
    +        return this.scale.y * this.currentFrame.height;
    +    },
    +
    +    set: function(value) {
    +
    +        this.scale.y = value / this.currentFrame.height;
    +        this._cache.scaleY = value / this.currentFrame.height;
    +        this._height = value;
    +
    +    }
    +
    +});
    +
    +/**
    +* By default a Sprite won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is
    +* activated for this Sprite instance and it will then start to process click/touch events and more.
    +*
    +* @name Phaser.Sprite#inputEnabled
    +* @property {boolean} inputEnabled - Set to true to allow this Sprite to receive input events, otherwise false.
    +*/
    +Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", {
    +    
    +    get: function () {
    +
    +        return (this.input.enabled);
    +
    +    },
    +
    +    set: function (value) {
    +
    +        if (value)
    +        {
    +            if (this.input.enabled == false)
    +            {
    +                this.input.start();
    +            }
    +        }
    +        else
    +        {
    +            if (this.input.enabled)
    +            {
    +                this.input.stop();
    +            }
    +        }
    +
    +    }
    +
    +});
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Stage.js.html b/docs/Stage.js.html index eeb07873..4f2f1fce 100644 --- a/docs/Stage.js.html +++ b/docs/Stage.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -384,6 +504,18 @@ Phaser.Stage = function (game, width, height) { */ this.aspectRatio = width / height; + /** + * @property {number} _nextOffsetCheck - The time to run the next offset check. + * @private + */ + this._nextOffsetCheck = 0; + + /** + * @property {number|false} checkOffsetInterval - The time (in ms) between which the stage should check to see if it has moved. + * @default + */ + this.checkOffsetInterval = 2500; + }; Phaser.Stage.prototype = { @@ -416,6 +548,24 @@ Phaser.Stage.prototype = { window.onblur = this._onChange; window.onfocus = this._onChange; + }, + + /** + * Runs Stage processes that need periodic updates, such as the offset checks. + * @method Phaser.Stage#update + */ + update: function () { + + if (this.checkOffsetInterval !== false) + { + if (this.game.time.now > this._nextOffsetCheck) + { + Phaser.Canvas.getOffset(this.canvas, this.offset); + this._nextOffsetCheck = this.game.time.now + this.checkOffsetInterval; + } + + } + }, /** @@ -487,8 +637,8 @@ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/StageScaleMode.js.html b/docs/StageScaleMode.js.html index 6bcc2c42..045b5c29 100644 --- a/docs/StageScaleMode.js.html +++ b/docs/StageScaleMode.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -912,8 +1032,8 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isLandscape", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/State.js.html b/docs/State.js.html index 14226299..1e6468f2 100644 --- a/docs/State.js.html +++ b/docs/State.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -510,8 +630,8 @@ Phaser.State.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/StateManager.js.html b/docs/StateManager.js.html index eef04b6b..ba023349 100644 --- a/docs/StateManager.js.html +++ b/docs/StateManager.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -866,8 +986,8 @@ Phaser.StateManager.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Text.js.html b/docs/Text.js.html new file mode 100644 index 00000000..35a2d3f6 --- /dev/null +++ b/docs/Text.js.html @@ -0,0 +1,726 @@ + + + + + + Phaser Source: gameobjects/Text.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/Text.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Create a new <code>Text</code>.
    +* @class Phaser.Text
    +* @constructor
    +* @param {Phaser.Game} game - Current game instance.
    +* @param {number} x - X position of the new text object.
    +* @param {number} y - Y position of the new text object.
    +* @param {string} text - The actual text that will be written.
    +* @param {object} style - The style object containing style attributes like font, font size ,
    +*/
    +Phaser.Text = function (game, x, y, text, style) {
    +
    +    x = x || 0;
    +    y = y || 0;
    +    text = text || '';
    +    style = style || '';
    +
    +    //  If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all
    +	/**
    +	* @property {boolean} exists - Description.
    +	* @default
    +	*/
    +    this.exists = true;
    +
    +    //  This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering
    +	/**
    +	* @property {boolean} alive - Description.
    +	* @default
    +	*/
    +    this.alive = true;
    +
    +	/**
    +	* @property {Description} group - Description.
    +	* @default
    +	*/
    +    this.group = null;
    +
    +	/**
    +	* @property {string} name - Description.
    +	* @default
    +	*/
    +    this.name = '';
    +
    +    /**
    +    * @property {Phaser.Game} game - A reference to the currently running game. 
    +    */
    +    this.game = game;
    +
    +    this._text = text;
    +    this._style = style;
    +
    +    PIXI.Text.call(this, text, style);
    +
    +    /**
    +     * @property {Description} type - Description. 
    +     */
    +    this.type = Phaser.TEXT;
    +
    +    /**
    +     * @property {Description} position - Description. 
    +     */
    +    this.position.x = this.x = x;
    +    this.position.y = this.y = y;
    +
    +    //  Replaces the PIXI.Point with a slightly more flexible one
    +    /**
    +     * @property {Phaser.Point} anchor - Description. 
    +     */
    +    this.anchor = new Phaser.Point();
    +    
    +    /**
    +     * @property {Phaser.Point} scale - Description. 
    +     */
    +    this.scale = new Phaser.Point(1, 1);
    +
    +    //  A mini cache for storing all of the calculated values
    +    /**
    +    * @property {Description} _cache - Description. 
    +    * @private
    +    */
    +    this._cache = { 
    +
    +        dirty: false,
    +
    +        //  Transform cache
    +        a00: 1, a01: 0, a02: x, a10: 0, a11: 1, a12: y, id: 1, 
    +
    +        //  The previous calculated position
    +        x: -1, y: -1,
    +
    +        //  The actual scale values based on the worldTransform
    +        scaleX: 1, scaleY: 1
    +
    +    };
    +
    +    this._cache.x = this.x;
    +    this._cache.y = this.y;
    +
    +    /**
    +    * @property {boolean} renderable - Description. 
    +    */
    +    this.renderable = true;
    +
    +};
    +
    +Phaser.Text.prototype = Object.create(PIXI.Text.prototype);
    +Phaser.Text.prototype.constructor = Phaser.Text;
    +
    +/**
    +* Automatically called by World.update.
    +* @method Phaser.Text.prototype.update
    +*/
    +Phaser.Text.prototype.update = function() {
    +
    +    if (!this.exists)
    +    {
    +        return;
    +    }
    +
    +    this._cache.dirty = false;
    +
    +    this._cache.x = this.x;
    +    this._cache.y = this.y;
    +
    +    if (this.position.x != this._cache.x || this.position.y != this._cache.y)
    +    {
    +        this.position.x = this._cache.x;
    +        this.position.y = this._cache.y;
    +        this._cache.dirty = true;
    +    }
    +
    +}
    +
    +/**
    +* @method Phaser.Text.prototype.destroy
    +*/
    +Phaser.Text.prototype.destroy = function() {
    +
    +    if (this.group)
    +    {
    +        this.group.remove(this);
    +    }
    +
    +    if (this.canvas.parentNode)
    +    {
    +        this.canvas.parentNode.removeChild(this.canvas);
    +    }
    +    else
    +    {
    +        this.canvas = null;
    +        this.context = null;
    +    }
    +
    +    this.exists = false;
    +
    +    this.group = null;
    +
    +}
    +
    +/**
    +* Get
    +* @returns {Description}
    +*//**
    +* Set
    +* @param {Description} value - Description
    +*/
    +Object.defineProperty(Phaser.Text.prototype, 'angle', {
    +
    +    get: function() {
    +        return Phaser.Math.radToDeg(this.rotation);
    +    },
    +
    +    set: function(value) {
    +        this.rotation = Phaser.Math.degToRad(value);
    +    }
    +
    +});
    +
    +Object.defineProperty(Phaser.Text.prototype, 'content', {
    +
    +    get: function() {
    +        return this._text;
    +    },
    +
    +    set: function(value) {
    +
    +        //  Let's not update unless needed, this way we can safely update the text in a core loop without constant re-draws
    +        if (value !== this._text)
    +        {
    +            this._text = value;
    +            this.setText(value);
    +        }
    +
    +    }
    +
    +});
    +
    +Object.defineProperty(Phaser.Text.prototype, 'font', {
    +
    +    get: function() {
    +        return this._style;
    +    },
    +
    +    set: function(value) {
    +
    +        //  Let's not update unless needed, this way we can safely update the text in a core loop without constant re-draws
    +        if (value !== this._style)
    +        {
    +            this._style = value;
    +            this.setStyle(value);
    +        }
    +
    +    }
    +
    +});
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/TileSprite.js.html b/docs/TileSprite.js.html new file mode 100644 index 00000000..812d8964 --- /dev/null +++ b/docs/TileSprite.js.html @@ -0,0 +1,562 @@ + + + + + + Phaser Source: gameobjects/TileSprite.js + + + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Source: gameobjects/TileSprite.js

    + +
    +
    +
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
    +
    +/**
    +* Create a new <code>TileSprite</code>.
    +* @class Phaser.Tilemap
    +* @constructor
    +* @param {Phaser.Game} game - Current game instance.
    +* @param {number} x - X position of the new tileSprite.
    +* @param {number} y - Y position of the new tileSprite.
    +* @param {number} width - the width of the tilesprite.
    +* @param {number} height - the height of the tilesprite.
    +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
    +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
    +*/
    +Phaser.TileSprite = function (game, x, y, width, height, key, frame) {
    +
    +    x = x || 0;
    +    y = y || 0;
    +    width = width || 256;
    +    height = height || 256;
    +    key = key || null;
    +    frame = frame || null;
    +
    +	Phaser.Sprite.call(this, game, x, y, key, frame);
    +
    +	/**
    +	* @property {Description} texture - Description. 
    +    */
    +    this.texture = PIXI.TextureCache[key];
    +
    +	PIXI.TilingSprite.call(this, this.texture, width, height);
    +
    +	/**
    +	* @property {Description} type - Description. 
    +    */
    +	this.type = Phaser.TILESPRITE;
    +
    +	/**
    +	* @property {Point} tileScale - The scaling of the image that is being tiled.
    +	*/	
    +	this.tileScale = new Phaser.Point(1, 1);
    +
    +	/**
    +	* @property {Point} tilePosition - The offset position of the image that is being tiled.
    +	*/	
    +	this.tilePosition = new Phaser.Point(0, 0);
    +
    +};
    +
    +Phaser.TileSprite.prototype = Phaser.Utils.extend(true, PIXI.TilingSprite.prototype, Phaser.Sprite.prototype);
    +Phaser.TileSprite.prototype.constructor = Phaser.TileSprite;
    +
    +//  Add our own custom methods
    +
    +
    +
    + + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Time.js.html b/docs/Time.js.html index 1748e42f..b616de5d 100644 --- a/docs/Time.js.html +++ b/docs/Time.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -525,6 +645,12 @@ Phaser.Time.prototype = { this.lastTime = time + this.timeToCall; this.physicsElapsed = 1.0 * (this.elapsed / 1000); + // Clamp the delta + if (this.physicsElapsed > 1) + { + this.physicsElapsed = 1; + } + // Paused? if (this.game.paused) { @@ -606,8 +732,8 @@ Phaser.Time.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Touch.js.html b/docs/Touch.js.html index 1a8af421..be9a5a3c 100644 --- a/docs/Touch.js.html +++ b/docs/Touch.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -674,8 +794,8 @@ Phaser.Touch.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Tween.js.html b/docs/Tween.js.html index 2bc8905d..16c1ae76 100644 --- a/docs/Tween.js.html +++ b/docs/Tween.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -950,8 +1070,8 @@ Phaser.Tween.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/TweenManager.js.html b/docs/TweenManager.js.html index fd001a9f..7936a498 100644 --- a/docs/TweenManager.js.html +++ b/docs/TweenManager.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -527,8 +647,8 @@ Phaser.TweenManager.prototype = {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Utils.js.html b/docs/Utils.js.html index 64a886ee..6bd7466b 100644 --- a/docs/Utils.js.html +++ b/docs/Utils.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -568,8 +688,8 @@ if (typeof Function.prototype.bind != 'function') {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/World.js.html b/docs/World.js.html index 8e0f1301..21d2ad92 100644 --- a/docs/World.js.html +++ b/docs/World.js.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -601,8 +721,8 @@ Object.defineProperty(Phaser.World.prototype, "randomY", {
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/build/conf_dev.json b/docs/build/conf_dev.json index 2a8fc1b4..e5ba68ae 100644 --- a/docs/build/conf_dev.json +++ b/docs/build/conf_dev.json @@ -8,12 +8,14 @@ "../../src/Intro.js", "../../src/animation/", "../../src/core/", + "../../src/gameobjects/", "../../src/geom/", "../../src/input/", "../../src/loader/", "../../src/math/", "../../src/net/", "../../src/particles/", + "../../src/physics/arcade/", "../../src/sound/", "../../src/system/", "../../src/time/", diff --git a/docs/classes.list.html b/docs/classes.list.html index 2d5f8a17..b1682b66 100644 --- a/docs/classes.list.html +++ b/docs/classes.list.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -387,6 +507,15 @@
    AnimationParser
    +
    BitmapText
    +
    + +
    Bullet
    +
    + +
    Button
    +
    +
    Cache
    @@ -441,6 +570,9 @@
    Sinusoidal
    +
    Events
    +
    +
    Frame
    @@ -450,6 +582,12 @@
    Game
    +
    GameObjectFactory
    +
    + +
    Graphics
    +
    +
    Group
    @@ -492,6 +630,12 @@
    Emitter
    +
    Physics
    +
    + +
    Arcade
    +
    +
    Plugin
    @@ -513,6 +657,9 @@
    Rectangle
    +
    RenderTexture
    +
    +
    RequestAnimationFrame
    @@ -525,6 +672,9 @@
    SoundManager
    +
    Sprite
    +
    +
    Stage
    @@ -537,6 +687,12 @@
    StateManager
    +
    Text
    +
    + +
    TileSprite
    +
    +
    Time
    @@ -598,8 +754,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/global.html b/docs/global.html index 10ffb391..90667b5e 100644 --- a/docs/global.html +++ b/docs/global.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -385,6 +505,2031 @@
    +
    +

    audio(key, volume, loop) → {Phaser.Sound}

    + + +
    +
    + + +
    +

    Creates a new instance of the Sound class.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string + + + +

    The Game.cache key of the sound that this object will use.

    volume + + +number + + + +

    The volume at which the sound will be played.

    loop + + +boolean + + + +

    Whether or not the sound will loop.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created text object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Sound + + +
    +
    + + + + + +
    + + + +
    +

    bitmapText(x, y, text, style) → {Phaser.BitmapText}

    + + +
    +
    + + +
    +
      +
    • Create a new <code>BitmapText</code>.
    • +
    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    X position of the new bitmapText object.

    y + + +number + + + +

    Y position of the new bitmapText object.

    text + + +string + + + +

    The actual text that will be written.

    style + + +object + + + +

    The style object containing style attributes like font, font size , etc.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created bitmapText object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.BitmapText + + +
    +
    + + + + + +
    + + + +
    +

    bottom() → {number}

    + + +
    +
    + + +
    +

    The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    bottom(value)

    + + +
    +
    + + +
    +

    The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    value + + +number + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) → {Phaser.Button}

    + + +
    +
    + + +
    +

    Creates a new <code>Button</code> object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    x + + +number + + + + + + <optional>
    + + + + + +

    X position of the new button object.

    y + + +number + + + + + + <optional>
    + + + + + +

    Y position of the new button object.

    key + + +string + + + + + + <optional>
    + + + + + +

    The image key as defined in the Game.Cache to use as the texture for this button.

    callback + + +function + + + + + + <optional>
    + + + + + +

    The function to call when this button is pressed

    callbackContext + + +object + + + + + + <optional>
    + + + + + +

    The context in which the callback will be called (usually 'this')

    overFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.

    outFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.

    downFrame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created button object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Button + + +
    +
    + + + + + +
    + + + +
    +

    child(group, x, y, key, frame) → {Phaser.Sprite}

    + + +
    +
    + + +
    +

    Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    group + + +Phaser.Group + + + + + + + + + +

    The Group to add this child to.

    x + + +number + + + + + + + + + +

    X position of the new sprite.

    y + + +number + + + + + + + + + +

    Y position of the new sprite.

    key + + +string +| + +RenderTexture + + + + + + <optional>
    + + + + + +

    The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture.

    frame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    the newly created sprite object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Sprite + + +
    +
    + + + + + +
    + + + +
    +

    emitter(x, y, maxParticles) → {Phaser.Emitter}

    + + +
    +
    + + +
    +

    Emitter is a lightweight particle emitter. It can be used for one-time explosions or for +continuous effects like rain and fire. All it really does is launch Particle objects out +at set intervals, and fixes their positions and velocities accorindgly.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    x + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    The x coordinate within the Emitter that the particles are emitted from.

    y + + +number + + + + + + <optional>
    + + + + + +
    + + 0 + +

    The y coordinate within the Emitter that the particles are emitted from.

    maxParticles + + +number + + + + + + <optional>
    + + + + + +
    + + 50 + +

    The total number of particles in this emitter.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created emitter object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Emitter + + +
    +
    + + + + + +
    + + + +
    +

    existing.(object) → {*}

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    object + + +* + + + +

    An instance of Phaser.Sprite, Phaser.Button or any other display object..

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The child that was added to the Group.

    +
    + + + +
    +
    + Type +
    +
    + +* + + +
    +
    + + + + + +
    + + + +
    +

    graphics(x, y) → {Phaser.Graphics}

    + + +
    +
    + + +
    +

    Creates a new <code>Graphics</code> object.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    X position of the new graphics object.

    y + + +number + + + +

    Y position of the new graphics object.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created graphics object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Graphics + + +
    +
    + + + + + +
    + + + +
    +

    group(parent, name) → {Phaser.Group}

    + + +
    +
    + + +
    +

    A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDefaultDescription
    parent + + +* + + + + + + + + + + + +

    The parent Group or DisplayObjectContainer that will hold this group, if any.

    name + + +string + + + + + + <optional>
    + + + + + +
    + + group + +

    A name for this Group. Not used internally but useful for debugging.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created group.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Group + + +
    +
    + + + + + +
    + + +

    HEXtoRGB(hex) → {array}

    @@ -518,6 +2663,1764 @@ +
    + + + +
    +

    renderTexture(key, width, height) → {Phaser.RenderTexture}

    + + +
    +
    + + +
    +

    A dynamic initially blank canvas to which images can be drawn

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string + + + +

    Asset key for the render texture.

    width + + +number + + + +

    the width of the render texture.

    height + + +number + + + +

    the height of the render texture.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created renderTexture object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.RenderTexture + + +
    +
    + + + + + +
    + + + +
    + + + +
    +
    + + +
    +

    The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. +However it does affect the width property.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    + + + +
    +
    + + +
    +

    The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. +However it does affect the width property.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    value + + +number + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    sprite(x, y, key, frame) → {Phaser.Sprite}

    + + +
    +
    + + +
    +

    Create a new Sprite with specific position and sprite sheet key.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeArgumentDescription
    x + + +number + + + + + + + + + +

    X position of the new sprite.

    y + + +number + + + + + + + + + +

    Y position of the new sprite.

    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + + + + + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame + + +string +| + +number + + + + + + <optional>
    + + + + + +

    If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    the newly created sprite object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Sprite + + +
    +
    + + + + + +
    + + + +
    +

    text(x, y, text, style) → {Phaser.Text}

    + + +
    +
    + + +
    +

    Creates a new <code>Text</code>.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    X position of the new text object.

    y + + +number + + + +

    Y position of the new text object.

    text + + +string + + + +

    The actual text that will be written.

    style + + +object + + + +

    The style object containing style attributes like font, font size , etc.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created text object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Text + + +
    +
    + + + + + +
    + + + +
    +

    tilemap(key) → {Phaser.Tilemap}

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string + + + +

    Asset key for the JSON file.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created tilemap object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Tilemap + + +
    +
    + + + + + +
    + + + +
    +

    tilemaplayer(x, y, width, height) → {Phaser.TilemapLayer}

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    X position of the new tilemapLayer.

    y + + +number + + + +

    Y position of the new tilemapLayer.

    width + + +number + + + +

    the width of the tilemapLayer.

    height + + +number + + + +

    the height of the tilemapLayer.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created tilemaplayer object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.TilemapLayer + + +
    +
    + + + + + +
    + + + +
    +

    tileset(key) → {Phaser.Tileset}

    + + +
    +
    + + +
    +

    Description.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    key + + +string + + + +

    The image key as defined in the Game.Cache to use as the tileset.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created tileset object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Tileset + + +
    +
    + + + + + +
    + + + +
    +

    tileSprite(x, y, width, height, key, frame) → {Phaser.TileSprite}

    + + +
    +
    + + +
    +

    Creates a new <code>TileSprite</code>.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    X position of the new tileSprite.

    y + + +number + + + +

    Y position of the new tileSprite.

    width + + +number + + + +

    the width of the tilesprite.

    height + + +number + + + +

    the height of the tilesprite.

    key + + +string +| + +Phaser.RenderTexture +| + +PIXI.Texture + + + +

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame + + +string +| + +number + + + +

    If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The newly created tileSprite object.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.TileSprite + + +
    +
    + + + + + +
    + + + +
    +

    tween(obj) → {Phaser.Tween}

    + + +
    +
    + + +
    +

    Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    obj + + +object + + + +

    Object the tween will be run on.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Description.

    +
    + + + +
    +
    + Type +
    +
    + +Phaser.Tween + + +
    +
    + + + + +
    @@ -545,8 +4448,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/index.html b/docs/index.html index a0ec9616..513d1335 100644 --- a/docs/index.html +++ b/docs/index.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -352,7 +472,7 @@

    - src/Intro.js + D:\wamp\www\phaser\src/Intro.js

    @@ -364,7 +484,7 @@

    Phaser - http://www.phaser.io

    -

    v{version} - Built at: {buildDate}

    +

    v<%= version %> - Built at: <%= buildDate %>

    By Richard Davey http://www.photonstorm.com @photonstorm

    A feature-packed 2D HTML5 game framework born from the smouldering pits of Flixel and constructed via plenty of blood, sweat, tears and coffee by Richard Davey (@photonstorm).

    @@ -452,8 +572,8 @@ and my love of game development originate.


    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template.
    diff --git a/docs/namespaces.list.html b/docs/namespaces.list.html index 7bdb5b06..32b68635 100644 --- a/docs/namespaces.list.html +++ b/docs/namespaces.list.html @@ -54,6 +54,18 @@ AnimationParser +
  • + BitmapText +
  • + +
  • + Bullet +
  • + +
  • + Button +
  • +
  • Cache
  • @@ -126,6 +138,10 @@ Sinusoidal +
  • + Events +
  • +
  • Frame
  • @@ -138,6 +154,14 @@ Game +
  • + GameObjectFactory +
  • + +
  • + Graphics +
  • +
  • Group
  • @@ -194,6 +218,14 @@ Emitter +
  • + Physics +
  • + +
  • + Arcade +
  • +
  • Plugin
  • @@ -222,6 +254,10 @@ Rectangle +
  • + RenderTexture +
  • +
  • RequestAnimationFrame
  • @@ -238,6 +274,10 @@ SoundManager +
  • + Sprite +
  • +
  • Stage
  • @@ -254,6 +294,14 @@ StateManager +
  • + Text +
  • + +
  • + TileSprite +
  • +
  • Time
  • @@ -296,10 +344,82 @@ @@ -387,6 +507,15 @@
    AnimationParser
    +
    BitmapText
    +
    + +
    Bullet
    +
    + +
    Button
    +
    +
    Cache
    @@ -441,6 +570,9 @@
    Sinusoidal
    +
    Events
    +
    +
    Frame
    @@ -450,6 +582,12 @@
    Game
    +
    GameObjectFactory
    +
    + +
    Graphics
    +
    +
    Group
    @@ -492,6 +630,12 @@
    Emitter
    +
    Physics
    +
    + +
    Arcade
    +
    +
    Plugin
    @@ -513,6 +657,9 @@
    Rectangle
    +
    RenderTexture
    +
    +
    RequestAnimationFrame
    @@ -525,6 +672,9 @@
    SoundManager
    +
    Sprite
    +
    +
    Stage
    @@ -537,6 +687,12 @@
    StateManager
    +
    Text
    +
    + +
    TileSprite
    +
    +
    Time
    @@ -598,8 +754,8 @@
    - Documentation generated by JSDoc 3.2.0-dev - on Wed Oct 23 2013 13:51:58 GMT+0100 (BST) using the DocStrap template. + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. diff --git a/src/gameobjects/Bullet.js b/src/gameobjects/Bullet.js index d5a491d7..4da6912e 100644 --- a/src/gameobjects/Bullet.js +++ b/src/gameobjects/Bullet.js @@ -5,7 +5,7 @@ */ /** -* Create a new Bullet. +* Warning: Bullet is an experimental object that we don't advise using for now. * * A Bullet is like a stripped-down Sprite, useful for when you just need to get something moving around the screen quickly with little of the extra * features that a Sprite supports. diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index b83ddffe..3384cb73 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -5,7 +5,7 @@ */ /** -* Create a new Sprite object. Sprites are the lifeblood of your game, used for nearly everything visual. +* Create a new `Sprite` object. Sprites are the lifeblood of your game, used for nearly everything visual. * At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. * They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), * events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases. @@ -68,7 +68,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { /** * If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc. * The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called. - * @property {number} lifespan + * @property {number} lifespan - The lifespan of the Sprite (in ms) before it will be killed. * @default */ this.lifespan = 0; @@ -148,7 +148,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { * Setting than anchor to 0.5,0.5 means the textures origin is centered * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right * - * @property {Phaser.Point} anchor + * @property {Phaser.Point} anchor - The anchor around with Sprite rotation and scaling takes place. */ this.anchor = new Phaser.Point(); @@ -169,7 +169,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { * Should this Sprite be automatically culled if out of range of the camera? * A culled sprite has its renderable property set to 'false'. * - * @property {boolean} autoCull + * @property {boolean} autoCull - A flag indicating if the Sprite should be automatically camera culled or not. * @default */ this.autoCull = false; @@ -310,7 +310,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { /** * You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide. * The crop is only applied if you have set Sprite.cropEnabled to true. - * @property {Phaser.Rectangle} crop + * @property {Phaser.Rectangle} crop - The crop Rectangle applied to the Sprite texture before rendering. * @default */ this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 31ae5718..3aff9dcc 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -1,52 +1,174 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +*/ + +/** +* @class Phaser.Physics +*/ Phaser.Physics = {}; +/** +* Arcade Physics constructor. +* +* @class Phaser.Physics.Arcade +* @classdesc Arcade Physics Constructor +* @constructor +* @param {Phaser.Game} game reference to the current game instance. +*/ Phaser.Physics.Arcade = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + /** + * @property {Phaser.Point} gravity - The World gravity setting. Defaults to x: 0, y: 0, or no gravity. + */ this.gravity = new Phaser.Point; + + /** + * @property {Phaser.Rectangle} bounds - The bounds inside of which the physics world exists. Defaults to match the world bounds. + */ this.bounds = new Phaser.Rectangle(0, 0, game.world.width, game.world.height); /** - * Used by the QuadTree to set the maximum number of objects - * @type {number} + * @property {number} maxObjects - Used by the QuadTree to set the maximum number of objects per quad. */ this.maxObjects = 10; /** - * Used by the QuadTree to set the maximum number of levels - * @type {number} + * @property {number} maxLevels - Used by the QuadTree to set the maximum number of iteration levels. */ this.maxLevels = 4; + /** + * @property {number} OVERLAP_BIAS - A value added to the delta values during collision checks. + */ this.OVERLAP_BIAS = 4; - this.TILE_OVERLAP = false; + // this.TILE_OVERLAP = false; + + /** + * @property {Phaser.QuadTree} quadTree - The world QuadTree. + */ this.quadTree = new Phaser.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels); + + /** + * @property {number} quadTreeID - The QuadTree ID. + */ this.quadTreeID = 0; // Avoid gc spikes by caching these values for re-use + + /** + * @property {Phaser.Rectangle} _bounds1 - Internal cache var. + * @private + */ this._bounds1 = new Phaser.Rectangle; + + /** + * @property {Phaser.Rectangle} _bounds2 - Internal cache var. + * @private + */ this._bounds2 = new Phaser.Rectangle; + + /** + * @property {number} _overlap - Internal cache var. + * @private + */ this._overlap = 0; + + /** + * @property {number} _maxOverlap - Internal cache var. + * @private + */ this._maxOverlap = 0; + + /** + * @property {number} _velocity1 - Internal cache var. + * @private + */ this._velocity1 = 0; + + /** + * @property {number} _velocity2 - Internal cache var. + * @private + */ this._velocity2 = 0; + + /** + * @property {number} _newVelocity1 - Internal cache var. + * @private + */ this._newVelocity1 = 0; + + /** + * @property {number} _newVelocity2 - Internal cache var. + * @private + */ this._newVelocity2 = 0; + + /** + * @property {number} _average - Internal cache var. + * @private + */ this._average = 0; + + /** + * @property {Array} _mapData - Internal cache var. + * @private + */ this._mapData = []; + + /** + * @property {number} _mapTiles - Internal cache var. + * @private + */ this._mapTiles = 0; + + /** + * @property {boolean} _result - Internal cache var. + * @private + */ this._result = false; + + /** + * @property {number} _total - Internal cache var. + * @private + */ this._total = 0; + + /** + * @property {number} _angle - Internal cache var. + * @private + */ this._angle = 0; + + /** + * @property {number} _dx - Internal cache var. + * @private + */ this._dx = 0; + + /** + * @property {number} _dy - Internal cache var. + * @private + */ this._dy = 0; }; Phaser.Physics.Arcade.prototype = { + /** + * Called automatically by a Physics body, it updates all motion related values on the Body. + * + * @method Phaser.Physics.Arcade#updateMotion + * @param {Phaser.Physics.Arcade.Body} The Body object to be updated. + */ updateMotion: function (body) { // If you're wondering why the velocity is halved and applied twice, read this: http://www.niksula.hut.fi/~hkankaan/Homepages/gravity.html @@ -74,11 +196,13 @@ Phaser.Physics.Arcade.prototype = { /** * A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. * - * @param {number} Velocity Any component of velocity (e.g. 20). - * @param {number} Acceleration Rate at which the velocity is changing. - * @param {number} Drag Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. - * @param {number} Max An absolute value cap for the velocity. - * + * @method Phaser.Physics.Arcade#computeVelocity + * @param {number} axis - 1 for horizontal, 2 for vertical. + * @param {Phaser.Physics.Arcade.Body} body - The Body object to be updated. + * @param {number} velocity - Any component of velocity (e.g. 20). + * @param {number} acceleration - Rate at which the velocity is changing. + * @param {number} drag - Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. + * @param {number} mMax - An absolute value cap for the velocity. * @return {number} The altered Velocity value. */ computeVelocity: function (axis, body, velocity, acceleration, drag, max) { @@ -129,6 +253,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * Called automatically by the core game loop. + * + * @method Phaser.Physics.Arcade#preUpdate + * @protected + */ preUpdate: function () { // Clear the tree @@ -140,6 +270,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * Called automatically by the core game loop. + * + * @method Phaser.Physics.Arcade#postUpdate + * @protected + */ postUpdate: function () { // Clear the tree ready for the next update @@ -148,12 +284,13 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Checks if two Sprite objects intersect. + * Checks if two Sprite objects overlap. * - * @param object1 The first object to check. Can be an instance of Phaser.Sprite or anything that extends it. - * @param object2 The second object to check. Can be an instance of Phaser.Sprite or anything that extends it. + * @method Phaser.Physics.Arcade#overlap + * @param {Phaser.Sprite} object1 - The first object to check. Can be an instance of Phaser.Sprite or anything that extends it. + * @param {Phaser.Sprite} object2 - The second object to check. Can be an instance of Phaser.Sprite or anything that extends it. * @returns {boolean} true if the two objects overlap. - **/ + */ overlap: function (object1, object2) { // Only test valid objects @@ -169,14 +306,16 @@ Phaser.Physics.Arcade.prototype = { /** * Checks for collision between two game objects. The objects can be Sprites, Groups, Emitters or Tilemaps. * You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap or Group vs. Tilemap collisions. + * The objects are also automatically separated. * - * @param object1 The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap - * @param object2 The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap - * @param collideCallback An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap. - * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collideCallback will only be called if processCallback returns true. - * @param callbackContext The context in which to run the callbacks. - * @returns {boolean} true if any collisions were detected, otherwise false. - **/ + * @method Phaser.Physics.Arcade#collide + * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap + * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object2 - The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap + * @param {function} [collideCallback=null] - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap. + * @param {function} [processCallback=null] - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collideCallback will only be called if processCallback returns true. + * @param {object} [callbackContext] - The context in which to run the callbacks. + * @returns {number} The number of collisions that were processed. + */ collide: function (object1, object2, collideCallback, processCallback, callbackContext) { collideCallback = collideCallback || null; @@ -257,6 +396,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideSpriteVsTilemapLayer + * @private + */ collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext) { this._mapData = tilemapLayer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true); @@ -297,6 +442,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideGroupVsTilemapLayer + * @private + */ collideGroupVsTilemapLayer: function (group, tilemapLayer, collideCallback, processCallback, callbackContext) { if (group.length == 0) @@ -321,6 +472,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideSpriteVsSprite + * @private + */ collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext) { this.separate(sprite1.body, sprite2.body); @@ -353,6 +510,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideSpriteVsGroup + * @private + */ collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext) { if (group.length == 0) @@ -389,6 +552,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideGroupVsGroup + * @private + */ collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext) { if (group1.length == 0 || group2.length == 0) @@ -413,12 +582,13 @@ Phaser.Physics.Arcade.prototype = { }, - /** - * The core separation function to separate two physics bodies. - * @param body1 The first Sprite.Body to separate - * @param body2 The second Sprite.Body to separate - * @returns {boolean} Returns true if the bodies were separated, otherwise false. - */ + /** + * The core separation function to separate two physics bodies. + * @method Phaser.Physics.Arcade#separate + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separate: function (body1, body2) { this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); @@ -426,11 +596,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two physics bodies on their X axis - * @param body1 The first Sprite.Body to separate - * @param body2 The second Sprite.Body to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ + * The core separation function to separate two physics bodies on the x axis. + * @method Phaser.Physics.Arcade#separateX + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateX: function (body1, body2) { // Can't separate two immovable bodies @@ -533,11 +704,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two physics bodies on their Y axis - * @param body1 The first Sprite.Body to separate - * @param body2 The second Sprite.Body to separate - * @returns {boolean} Whether the bodys in fact touched and were separated along the Y axis. - */ + * The core separation function to separate two physics bodies on the y axis. + * @method Phaser.Physics.Arcade#separateY + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateY: function (body1, body2) { // Can't separate two immovable or non-existing bodys @@ -652,12 +824,13 @@ Phaser.Physics.Arcade.prototype = { }, - /** - * The core Collision separation function used by Collision.overlap. - * @param object1 The first GameObject to separate - * @param object2 The second GameObject to separate - * @returns {boolean} Returns true if the objects were separated, otherwise false. - */ + /** + * The core separation function to separate a physics body and a tile. + * @method Phaser.Physics.Arcade#separateTile + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Tile} tile - The tile to collide against. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateTile: function (body, tile) { this._result = (this.separateTileX(body, tile, true) || this.separateTileY(body, tile, true)); @@ -665,11 +838,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two objects on their x axis - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ + * The core separation function to separate a physics body and a tile on the x axis. + * @method Phaser.Physics.Arcade#separateTileX + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Tile} tile - The tile to collide against. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateTileX: function (body, tile, separate) { // Can't separate two immovable objects (tiles are always immovable) @@ -748,11 +922,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two objects on their x axis - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ + * The core separation function to separate a physics body and a tile on the x axis. + * @method Phaser.Physics.Arcade#separateTileY + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Tile} tile - The tile to collide against. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateTileY: function (body, tile, separate) { // Can't separate two immovable objects (tiles are always immovable) diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index a2b1f3a5..7827de7c 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -1,84 +1,318 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +*/ + +/** +* The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than +* the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body. +* +* @class Phaser.Physics.Arcade.Body +* @classdesc Arcade Physics Body Constructor +* @constructor +* @param {Phaser.Sprite} sprite - The Sprite object this physics body belongs to. +*/ Phaser.Physics.Arcade.Body = function (sprite) { + /** + * @property {Phaser.Sprite} sprite - Reference to the parent Sprite. + */ this.sprite = sprite; + + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = sprite.game; + /** + * @property {Phaser.Point} offset - The offset of the Physics Body from the Sprite x/y position. + */ this.offset = new Phaser.Point; + /** + * @property {number} x - The x position of the physics body. + * @readonly + */ this.x = sprite.x; + + /** + * @property {number} y - The y position of the physics body. + * @readonly + */ this.y = sprite.y; + + /** + * @property {number} preX - The previous x position of the physics body. + * @readonly + */ this.preX = sprite.x; + + /** + * @property {number} preY - The previous y position of the physics body. + * @readonly + */ this.preY = sprite.y; + + /** + * @property {number} preRotation - The previous rotation of the physics body. + * @readonly + */ this.preRotation = sprite.angle; + + /** + * @property {number} screenX - The x position of the physics body translated to screen space. + * @readonly + */ this.screenX = sprite.x; + + /** + * @property {number} screenY - The y position of the physics body translated to screen space. + * @readonly + */ this.screenY = sprite.y; - // un-scaled original size + /** + * @property {number} sourceWidth - The un-scaled original size. + * @readonly + */ this.sourceWidth = sprite.currentFrame.sourceSizeW; + + /** + * @property {number} sourceHeight - The un-scaled original size. + * @readonly + */ this.sourceHeight = sprite.currentFrame.sourceSizeH; - // calculated (scaled) size + /** + * @property {number} width - The calculated width of the physics body. + */ this.width = sprite.currentFrame.sourceSizeW; + + /** + * @property .numInternal ID cache + */ this.height = sprite.currentFrame.sourceSizeH; + + /** + * @property {number} halfWidth - The calculated width / 2 of the physics body. + */ this.halfWidth = Math.floor(sprite.currentFrame.sourceSizeW / 2); + + /** + * @property {number} halfHeight - The calculated height / 2 of the physics body. + */ this.halfHeight = Math.floor(sprite.currentFrame.sourceSizeH / 2); - // Scale value cache + /** + * @property {number} _sx - Internal cache var. + * @private + */ this._sx = sprite.scale.x; + + /** + * @property {number} _sy - Internal cache var. + * @private + */ this._sy = sprite.scale.y; + /** + * @property {Phaser.Point} velocity - The velocity in pixels per second sq. of the Body. + */ this.velocity = new Phaser.Point; + + /** + * @property {Phaser.Point} acceleration - The velocity in pixels per second sq. of the Body. + */ this.acceleration = new Phaser.Point; + + /** + * @property {Phaser.Point} drag - The drag applied to the motion of the Body. + */ this.drag = new Phaser.Point; + + /** + * @property {Phaser.Point} gravity - A private Gravity setting for the Body. + */ this.gravity = new Phaser.Point; + + /** + * @property {Phaser.Point} bounce - The elasticitiy of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity. + */ this.bounce = new Phaser.Point; + + /** + * @property {Phaser.Point} maxVelocity - The maximum velocity in pixels per second sq. that the Body can reach. + * @default + */ this.maxVelocity = new Phaser.Point(10000, 10000); + /** + * @property {number} angularVelocity - The angular velocity in pixels per second sq. of the Body. + * @default + */ this.angularVelocity = 0; + + /** + * @property {number} angularAcceleration - The angular acceleration in pixels per second sq. of the Body. + * @default + */ this.angularAcceleration = 0; + + /** + * @property {number} angularDrag - The angular drag applied to the rotation of the Body. + * @default + */ this.angularDrag = 0; + + /** + * @property {number} maxAngular - The maximum angular velocity in pixels per second sq. that the Body can reach. + * @default + */ this.maxAngular = 1000; + + /** + * @property {number} mass - The mass of the Body. + * @default + */ this.mass = 1; + /** + * @property {boolean} skipQuadTree - If the Body is an irregular shape you can set this to true to avoid it being added to the World quad tree. + * @default + */ this.skipQuadTree = false; + + /** + * @property {Array} quadTreeIDs - Internal ID cache. + * @protected + */ this.quadTreeIDs = []; + + /** + * @property {number} quadTreeIndex - Internal ID cache. + * @protected + */ this.quadTreeIndex = -1; // Allow collision + + /** + * Set the allowCollision properties to control which directions collision is processed for this Body. + * For example allowCollision.up = false means it won't collide when the collision happened while moving up. + * @property {object} allowCollision - An object containing allowed collision. + */ this.allowCollision = { none: false, any: true, up: true, down: true, left: true, right: true }; + + /** + * This object is populated with boolean values when the Body collides with another. + * touching.up = true means the collision happened to the top of this Body for example. + * @property {object} touching - An object containing touching results. + */ this.touching = { none: true, up: false, down: false, left: false, right: false }; + + /** + * This object is populated with previous touching values from the bodies previous collision. + * @property {object} wasTouching - An object containing previous touching results. + */ this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; + + /** + * @property {number} facing - A const reference to the direction the Body is traveling or facing. + * @default + */ this.facing = Phaser.NONE; + /** + * @property {boolean} immovable - An immovable Body will not receive any impacts from other bodies. + * @default + */ this.immovable = false; + + /** + * @property {boolean} moves - Set to true to allow the Physics system to move this Body, other false to move it manually. + * @default + */ this.moves = true; + + /** + * @property {number} rotation - The amount the Body is rotated. + * @default + */ this.rotation = 0; + + /** + * @property {boolean} allowRotation - Allow this Body to be rotated? (via angularVelocity, etc) + * @default + */ this.allowRotation = true; + + /** + * @property {boolean} allowGravity - Allow this Body to be influenced by the global Gravity? + * @default + */ this.allowGravity = true; - // These two flags allow you to disable the custom separation that takes place - // Used in combination with your own collision processHandler you can create whatever - // type of collision response you need. + /** + * This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate. + * Used in combination with your own collision processHandler you can create whatever type of collision response you need. + * @property {boolean} customSeparateX - Use a custom separation system or the built-in one? + * @default + */ this.customSeparateX = false; + + /** + * This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate. + * Used in combination with your own collision processHandler you can create whatever type of collision response you need. + * @property {boolean} customSeparateY - Use a custom separation system or the built-in one? + * @default + */ this.customSeparateY = false; - // When this body collides with another the amount of overlap is stored in here - // These values are useful if you want to provide your own custom separation logic. + /** + * When this body collides with another, the amount of overlap is stored here. + * @property {number} overlapX - The amount of horizontal overlap during the collision. + */ this.overlapX = 0; + + /** + * When this body collides with another, the amount of overlap is stored here. + * @property {number} overlapY - The amount of vertical overlap during the collision. + */ this.overlapY = 0; + /** + * @property {Phaser.Rectangle} hullX - The dynamically calculated hull used during collision. + */ this.hullX = new Phaser.Rectangle(); + + /** + * @property {Phaser.Rectangle} hullY - The dynamically calculated hull used during collision. + */ this.hullY = new Phaser.Rectangle(); - // If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true + /** + * If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true. + * @property {boolean} embedded - Body embed value. + */ this.embedded = false; + /** + * A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. + * @property {boolean} collideWorldBounds - Should the Body collide with the World bounds? + */ this.collideWorldBounds = false; }; Phaser.Physics.Arcade.Body.prototype = { + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#updateBounds + * @protected + */ updateBounds: function (centerX, centerY, scaleX, scaleY) { if (scaleX != this._sx || scaleY != this._sy) @@ -93,6 +327,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#preUpdate + * @protected + */ preUpdate: function () { // Store and reset collision flags @@ -131,8 +371,7 @@ Phaser.Physics.Arcade.Body.prototype = { this.checkWorldBounds(); } - this.updateHulls(); - } + this.updateHulls();Array } if (this.skipQuadTree == false && this.allowCollision.none == false && this.sprite.visible && this.sprite.alive) { @@ -143,6 +382,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#postUpdate + * @protected + */ postUpdate: function () { // Calculate forward-facing edge @@ -183,6 +428,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#updateHulls + * @protected + */ updateHulls: function () { this.hullX.setTo(this.x, this.preY, this.width, this.height); @@ -190,6 +441,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#checkWorldBounds + * @protected + */ checkWorldBounds: function () { if (this.x < this.game.world.bounds.x) @@ -216,6 +473,17 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * You can modify the size of the physics Body to be any dimension you need. + * So it could be smaller or larger than the parent Sprite. You can also control the x and y offset, which + * is the position of the Body relative to the top-left of the Sprite. + * + * @method Phaser.Physics.Arcade#setSize + * @param {number} width - The width of the Body. + * @param {number} height - The height of the Body. + * @param {number} offsetX - The X offset of the Body from the Sprite position. + * @param {number} offsetY - The Y offset of the Body from the Sprite position. + */ setSize: function (width, height, offsetX, offsetY) { offsetX = offsetX || this.offset.x; @@ -231,6 +499,11 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Resets all Body values (velocity, acceleration, rotation, etc) + * + * @method Phaser.Physics.Arcade#reset + */ reset: function () { this.velocity.setTo(0, 0); @@ -248,18 +521,42 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Returns the absolute delta x value. + * + * @method Phaser.Physics.Arcade.Body#deltaAbsX + * @return {number} The absolute delta value. + */ deltaAbsX: function () { return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); }, + /** + * Returns the absolute delta y value. + * + * @method Phaser.Physics.Arcade.Body#deltaAbsY + * @return {number} The absolute delta value. + */ deltaAbsY: function () { return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); }, + /** + * Returns the delta x value. + * + * @method Phaser.Physics.Arcade.Body#deltaX + * @return {number} The delta value. + */ deltaX: function () { return this.x - this.preX; }, + /** + * Returns the delta y value. + * + * @method Phaser.Physics.Arcade.Body#deltaY + * @return {number} The delta value. + */ deltaY: function () { return this.y - this.preY; }, @@ -270,6 +567,10 @@ Phaser.Physics.Arcade.Body.prototype = { }; +/** +* @name Phaser.Physics.Arcade.Body#bottom +* @property {number} bottom - The bottom value of this Body (same as Body.y + Body.height) +*/ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { /** @@ -301,6 +602,10 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { }); +/** +* @name Phaser.Physics.Arcade.Body#right +* @property {number} right - The right value of this Body (same as Body.x + Body.width) +*/ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", { /** From 65d2bf557b539d1df5be9af0eae8a9e11656a5d3 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 17:30:37 +0100 Subject: [PATCH 121/125] Updated docs and more tidying up. --- README.md | 162 +- docs/Animation.js.html | 70 +- docs/AnimationManager.js.html | 70 +- docs/AnimationParser.js.html | 70 +- docs/ArcadePhysics.js.html | 177 +- docs/BitmapText.js.html | 70 +- docs/Body.js.html | 399 +- docs/Bullet.js.html | 70 +- docs/Button.js.html | 70 +- docs/Cache.js.html | 70 +- docs/Camera.js.html | 70 +- docs/Canvas.js.html | 70 +- docs/Circle.js.html | 70 +- docs/Color.js.html | 70 +- docs/Debug.js.html | 70 +- docs/Device.js.html | 70 +- docs/Easing.js.html | 70 +- docs/Emitter.js.html | 70 +- docs/Events.js.html | 70 +- docs/Frame.js.html | 70 +- docs/FrameData.js.html | 70 +- docs/Game.js.html | 70 +- docs/GameObjectFactory.js.html | 142 +- docs/Graphics.js.html | 70 +- docs/Group.js.html | 70 +- docs/Input.js.html | 70 +- docs/InputHandler.js.html | 70 +- docs/{Intro.js.html => IntroDocs.js.html} | 76 +- docs/Key.js.html | 70 +- docs/Keyboard.js.html | 70 +- docs/LinkedList.js.html | 70 +- docs/Loader.js.html | 70 +- docs/LoaderParser.js.html | 70 +- docs/MSPointer.js.html | 70 +- docs/Math.js.html | 70 +- docs/Mouse.js.html | 70 +- docs/Net.js.html | 70 +- docs/Particles.js.html | 70 +- docs/Phaser.Animation.html | 70 +- docs/Phaser.AnimationManager.html | 70 +- docs/Phaser.AnimationParser.html | 70 +- docs/Phaser.BitmapText.html | 70 +- docs/Phaser.Bullet.html | 72 +- docs/Phaser.Button.html | 70 +- docs/Phaser.Cache.html | 70 +- docs/Phaser.Camera.html | 70 +- docs/Phaser.Canvas.html | 70 +- docs/Phaser.Circle.html | 70 +- docs/Phaser.Color.html | 70 +- docs/Phaser.Device.html | 70 +- docs/Phaser.Easing.Back.html | 70 +- docs/Phaser.Easing.Bounce.html | 70 +- docs/Phaser.Easing.Circular.html | 70 +- docs/Phaser.Easing.Cubic.html | 70 +- docs/Phaser.Easing.Elastic.html | 70 +- docs/Phaser.Easing.Exponential.html | 70 +- docs/Phaser.Easing.Linear.html | 70 +- docs/Phaser.Easing.Quadratic.html | 70 +- docs/Phaser.Easing.Quartic.html | 70 +- docs/Phaser.Easing.Quintic.html | 70 +- docs/Phaser.Easing.Sinusoidal.html | 70 +- docs/Phaser.Easing.html | 70 +- docs/Phaser.Events.html | 70 +- docs/Phaser.Frame.html | 70 +- docs/Phaser.FrameData.html | 70 +- docs/Phaser.Game.html | 70 +- docs/Phaser.GameObjectFactory.html | 3481 +++++++++++- docs/Phaser.Graphics.html | 70 +- docs/Phaser.Group.html | 70 +- docs/Phaser.Input.html | 70 +- docs/Phaser.InputHandler.html | 70 +- docs/Phaser.Key.html | 70 +- docs/Phaser.Keyboard.html | 70 +- docs/Phaser.LinkedList.html | 70 +- docs/Phaser.Loader.html | 70 +- docs/Phaser.LoaderParser.html | 70 +- docs/Phaser.MSPointer.html | 70 +- docs/Phaser.Math.html | 70 +- docs/Phaser.Mouse.html | 70 +- docs/Phaser.Net.html | 70 +- docs/Phaser.Particles.Arcade.Emitter.html | 70 +- docs/Phaser.Particles.html | 70 +- docs/Phaser.Physics.Arcade.Body.html | 6049 +++++++++++++++++++++ docs/Phaser.Physics.Arcade.html | 2154 ++++++-- docs/Phaser.Physics.html | 70 +- docs/Phaser.Plugin.html | 70 +- docs/Phaser.PluginManager.html | 70 +- docs/Phaser.Point.html | 70 +- docs/Phaser.Pointer.html | 70 +- docs/Phaser.QuadTree.html | 70 +- docs/Phaser.RandomDataGenerator.html | 70 +- docs/Phaser.Rectangle.html | 70 +- docs/Phaser.RenderTexture.html | 70 +- docs/Phaser.RequestAnimationFrame.html | 70 +- docs/Phaser.Signal.html | 70 +- docs/Phaser.Sound.html | 70 +- docs/Phaser.SoundManager.html | 70 +- docs/Phaser.Sprite.html | 72 +- docs/Phaser.Stage.html | 70 +- docs/Phaser.StageScaleMode.html | 70 +- docs/Phaser.State.html | 70 +- docs/Phaser.StateManager.html | 70 +- docs/Phaser.Text.html | 70 +- docs/Phaser.TileSprite.html | 70 +- docs/Phaser.Time.html | 70 +- docs/Phaser.Touch.html | 70 +- docs/Phaser.Tween.html | 70 +- docs/Phaser.TweenManager.html | 70 +- docs/Phaser.Utils.Debug.html | 70 +- docs/Phaser.Utils.html | 70 +- docs/Phaser.World.html | 70 +- docs/Phaser.html | 70 +- docs/Phaser.js.html | 70 +- docs/Plugin.js.html | 70 +- docs/PluginManager.js.html | 70 +- docs/Point.js.html | 70 +- docs/Pointer.js.html | 70 +- docs/QuadTree.js.html | 70 +- docs/RandomDataGenerator.js.html | 70 +- docs/Rectangle.js.html | 70 +- docs/RenderTexture.js.html | 70 +- docs/RequestAnimationFrame.js.html | 70 +- docs/Signal.js.html | 70 +- docs/SignalBinding.html | 70 +- docs/SignalBinding.js.html | 70 +- docs/Sound.js.html | 70 +- docs/SoundManager.js.html | 70 +- docs/Sprite.js.html | 70 +- docs/Stage.js.html | 70 +- docs/StageScaleMode.js.html | 70 +- docs/State.js.html | 70 +- docs/StateManager.js.html | 70 +- docs/Text.js.html | 70 +- docs/TileSprite.js.html | 70 +- docs/Time.js.html | 70 +- docs/Touch.js.html | 70 +- docs/Tween.js.html | 70 +- docs/TweenManager.js.html | 70 +- docs/Utils.js.html | 70 +- docs/World.js.html | 70 +- docs/build/conf.json | 5 +- docs/build/conf_dev.json | 2 +- docs/classes.list.html | 73 +- docs/global.html | 3447 +----------- docs/index.html | 76 +- docs/namespaces.list.html | 73 +- src/IntroDocs.js | 29 + src/gameobjects/GameObjectFactory.js | 72 +- src/physics/arcade/ArcadePhysics.js | 2 - src/tilemap_old/Tile.js | 183 - src/tilemap_old/Tilemap.js | 530 -- src/tilemap_old/TilemapLayer.js | 662 --- src/tilemap_old/TilemapRenderer.js | 239 - 153 files changed, 12355 insertions(+), 14922 deletions(-) rename docs/{Intro.js.html => IntroDocs.js.html} (87%) create mode 100644 docs/Phaser.Physics.Arcade.Body.html create mode 100644 src/IntroDocs.js delete mode 100644 src/tilemap_old/Tile.js delete mode 100644 src/tilemap_old/Tilemap.js delete mode 100644 src/tilemap_old/TilemapLayer.js delete mode 100644 src/tilemap_old/TilemapRenderer.js diff --git a/README.md b/README.md index e9241f63..c403ab76 100644 --- a/README.md +++ b/README.md @@ -32,81 +32,32 @@ As before we offer a heart-felt "Thank you!" to everyone who has encouraged us a Phaser is everything we ever wanted from an HTML5 game framework. It powers all of our client work in build today and remains our single most important product, and we've only just scratched the surface of what we have planned for it. -![Blasteroids](http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_blaster.png) -(swap for tanks) +![MiniCybernoid](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser-cybernoid-640x480.png) Change Log ---------- Version 1.1 +What's New: + * JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. * Brand new Example system (no more php!) and over 150 examples to learn from too. * New TypeScript definitions file generated (in the build folder - thanks to TomTom1229 for manually enhancing this). * New Grunt based build system added (thanks to Florent Cailhol) - -* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. -* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. -* Updated ArcadePhysics.separateX/Y to use new body system - much better results now. -* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using localTransform values. -* Fixed the Bounce.In and Bounce.InOut tweens (thanks XekeDeath) -* Renamed Phaser.Text.text to Phaser.Text.content to avoid conflict and overwrite from Pixi local var. -* Renamed Phaser.Text.style to Phaser.Text.font to avoid conflict and overwrite from Pixi local var. -* Phaser.Button now sets useHandCursor to true by default. -* Fixed an issue in Animation.update where if the game was paused it would get an insane delta timer throwing a uuid error. -* Added PixiPatch.js to patch in a few essential features until Pixi is updated. -* Fixed issue in Animation.play where the given frameRate and loop values wouldn't overwrite those set on construction. -* Added Animation.paused - can be set to true/false. * New: Phaser.Animation.generateFrameNames - really useful when creating animation data from texture atlases using file names, not indexes. * Added Sprite.play as a handy short-cut to play an animation already loaded onto a Sprite. -* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly. -* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. -* Change: When you start a new State all active tweens are now purged. -* BUG: Loader conflict if 2 keys are the same even if they are in different packages (i.e. you can't use "title" for both and image and sound file). -* Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath) -* Made animation looping more robust when skipping frames (thanks XekeDeath) -* Fix for incorrect new particle positioning (issue #73) (thanks cottonflop) -* Added support for Body.maxVelocity (thanks cocoademon) -* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead. -* Button.setFrames will set the current frame based on the button state immediately. -* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call. * Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas. -* When the game boots it will now by default disable user-select and touch action events on the game canvas. -* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox. -* Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski) * Added Keyboard.addKey() which creates a new Phaser.Key object that can be polled for updates, pressed states, etc. See the 2 new examples showing use. -* Removed the callbackContext parameter from Group.callAll because it's no longer needed. -* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child. -* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg) -* Fixed bug in LinkedList#remove that could cause first to point to a dead node (thanks onedayitwillmake) -* Moved LinkedList.dump to Debug.dumpLinkedList(list) * Added Button.freezeFrames boolean. Stops the frames being set on mouse events if true. -* Phaser.Animation.Frame is now Phaser.Frame -* Phaser.Animation.FrameData is now Phaser.FrameData -* Phaser.Animation.Parser is now Phaser.AnimationParser (also the file has renamed from Parser.js to AnimationParser.js) -* Phaser.Loader.Parser is now Phaser.LoaderParser (also the file has renamed from Parser.js to LoaderParser.js) -* Fixed Cache.addDefaultImage so the default image works in Canvas as well as WebGL. Updated to a new image (32x32 black square with green outline) * Extended the Loader 404 error to display the url of the file that didn't load as well as the key. -* Change: We've removed the scrollFactor property from all Game Objects. Sorry, but the new Camera system doesn't work with it and it caused all kinds of issues anyway. We will sort out a replacement for it at a later date. -* Change: World now extends Phaser.Group. As a result we've updated GameObjectFactory and other classes that linked to it. If you have anywhere in your code that used to reference world.group you can just remove 'group' from that. So before, world.group.add() is now just world.add(). -* Change: The Camera has been completely revamped. Rather than adjusting the position of all display objects (bad) it now just shifts the position of the single world container (good!), this is much quicker and also stops the game objects positions from self-adjusting all the time, allowing for them to be properly nested with other containers. * New: Direction constants have been added to Sprites and adjust based on body motion. -* World.randomX/Y now returns values anywhere in the world.bounds range (if set, otherwise 0), including negative values. -* Fixed a bug in the Sprite transform cache check that caused the skew/scale cache to get constantly invalidated - now only updates as needed, significant performance increase! * Brand new Sprite.update loop handler. Combined with the transform cache fix and further optimisations this is now much quicker to execute. -* Made Sprite.body optional and added in checks, so you can safely null the Sprite body object if using your own physics system and not impact rendering. -* Fixed typo in StageScaleMode so it's not pageAlignVeritcally any longer, but pageAlignVertically. -* Fixed issue in Group.countLiving / countDead where the value was off by one (thanks mjablonski) -* Fixed issue with a jittery Camera if you moved a Sprite via velocity instead of x/y placement. * Added Keyboard.createCursorKeys() which creates an object with 4 Key objects inside it mapped to up, down, left and right. See the new example in the input folder. * Added Body.skipQuadTree boolean for more fine-grained control over when a body is added to the World QuadTree. * Re-implemented Angular Velocity and Angular Acceleration on the Sprite.body and created 2 new examples to show use. -* Moved the Camera update checks to World.postUpdate, so all the sprites get the correct adjusted camera position. * Added Sprite.fixedToCamera boolean. A Sprite that is fixed to the camera doesn't move with the world, but has its x/y coordinates relative to the top-left of the camera. -* Updated InputHandler to use Math.round rather than Math.floor when snapping an object during drag. -* If you didn't provide the useNumericIndex parameter then AnimationManager.add will set the value by looking at the datatype of the first element in the frames array. * Added Group.createMultiple - useful when you need to create a Group of identical sprites for pooling, such as bullets. -* Group.create now sets the visible and alive properties of the Sprite to the same value as the 'exists' parameter. * Added Group.total. Same as Group.length, but more in line with the rest of the Group naming. * Added Sprite.outOfBoundsKill boolean flag. Will automatically kill a sprite that leaves the game World bounds (off by default). * Lots of changes and fixes in ArcadePhysics, including: @@ -116,48 +67,108 @@ Version 1.1 * New distance functions: distanceBetween, distanceToXY, distanceToPointer * New angle functions: angleBetween, angleToXY, angleToPointer * velocityFromAngle and velocityFromRotation added with examples created. -* Fixed the RandomDataGenerator.sow method so if you give in the same seed you'll now get the same results (thanks Hsaka) -* World.randomX/Y now works with negative World.bounds values. * Added killOnComplete parameter to Animation.play. Really useful in situations where you want a Sprite to animate once then kill itself on complete, like an explosion effect. * Added Sprite.loadTexture(key, frame) which allows you to load a new texture set into an existing sprite rather than having to create a new sprite. -* Tweens .to will now always return the parent (thanks powerfear) -* You can now pass a PIXI.Texture to Sprite (you also need to pass a Phaser.Frame as the frame parameter) but this is useful for Sprites sharing joint canvases. -* Fixed Issue #101 (Mouse Button 0 is not recognised, thanks rezoner) * Added Sprite.destroy back in again and made it a lot more robust at cleaning up child objects. * Added 'return this' to all the core Loader functions so you can chain load calls if you so wish. -* Group.alpha is now exposed publically and changes the Group container object (not the children directly, who can still have their own alpha values) -* Device.webGL uses new inspection code to accurately catch more webGL capable devices. -* Fixed an issue where creating an animation with just one frame with an index of zero would cause a UUID error (thanks SYNYST3R1) -* Fixed Rectangle.union (thanks andron77) -* Debug.renderSpriteBody updated to use a the new Sprite.Body.screenX/Y properties. * Added Text.destroy() and BitmapText.destroy(), also updated Group.remove to make it more bullet-proof when an element doesn't have any events. * Added Phaser.Utils.shuffle to shuffle an array. * Added Graphics.destroy, x, y and updated angle functions. -* Additional checks added to AnimationManager.frame/frameName on the given values. * Added AnimationManager.refreshFrame - will reset the texture being used for a Sprite (useful after a crop rect clear) -* You can now null a Sprite.crop and it will clear down the crop rect area correctly. -* The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils. * Added Physics.overlap(sprite1, sprite2) for quick body vs. body overlap tests with no separation performed. -* Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events. +* On a busy page it's possible for the game to boot with an incorrect stage offset x/y which can cause input events to be calculated wrong. A new property has been added to Stage to combat this issue: Stage.checkOffsetInterval. By default it will check the canvas offset every 2500ms and adjust it accordingly. You can set the value to 'false' to disable the check entirely, or set a higher or lower value. We recommend that you get the value quite low during your games preloader, but once the game has fully loaded hopefully the containing page will have settled down, so it's probably safe to disable the check entirely. +* Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height). + +What's changed: + +* Renamed Phaser.Text.text to Phaser.Text.content to avoid conflict and overwrite from Pixi local var. +* Renamed Phaser.Text.style to Phaser.Text.font to avoid conflict and overwrite from Pixi local var. +* Phaser.Button now sets useHandCursor to true by default. +* Change: When you start a new State all active tweens are now purged. +* When the game boots it will now by default disable user-select and touch action events on the game canvas. +* Moved LinkedList.dump to Debug.dumpLinkedList(list) +* Phaser.Animation.Frame is now Phaser.Frame +* Phaser.Animation.FrameData is now Phaser.FrameData +* Phaser.Animation.Parser is now Phaser.AnimationParser (also the file has renamed from Parser.js to AnimationParser.js) +* Phaser.Loader.Parser is now Phaser.LoaderParser (also the file has renamed from Parser.js to LoaderParser.js) +* Change: We've removed the scrollFactor property from all Game Objects. Sorry, but the new Camera system doesn't work with it and it caused all kinds of issues anyway. We will sort out a replacement for it at a later date. +* Change: World now extends Phaser.Group. As a result we've updated GameObjectFactory and other classes that linked to it. If you have anywhere in your code that used to reference world.group you can just remove 'group' from that. So before, world.group.add() is now just world.add(). +* Change: The Camera has been completely revamped. Rather than adjusting the position of all display objects (bad) it now just shifts the position of the single world container (good!), this is much quicker and also stops the game objects positions from self-adjusting all the time, allowing for them to be properly nested with other containers. +* Made Sprite.body optional and added in checks, so you can safely null the Sprite body object if using your own physics system and not impact rendering. +* Moved the Camera update checks to World.postUpdate, so all the sprites get the correct adjusted camera position. +* The default Game.antialias value is now 'true', so graphics will be smoothed automatically in canvas. Disable it via the Game constructor or Canvas utils. * Phaser.Group now automatically calls updateTransform on any child added to it (avoids temp. frame glitches when new objects are rendered on their first frame). + +What has been updated: + +* Complete overhaul of Physics.Arcade.Body - now significantly more stable and faster too. +* Updated ArcadePhysics.separateX/Y to use new body system - much better results now. +* Added World.postUpdate - all sprite position changes, as a result of physics, happen here before the render. +* Added Animation.paused - can be set to true/false. +* Added support for Body.maxVelocity (thanks cocoademon) +* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call. +* Removed the callbackContext parameter from Group.callAll because it's no longer needed. +* Updated Group.forEach, forEachAlive and forEachDead so you can now pass as many parameters as you want, which will all be given to the callback after the child. +* Updated build script so it can be run from the command-line and includes UMD wrappers (thanks iaincarsberg) +* World.randomX/Y now returns values anywhere in the world.bounds range (if set, otherwise 0), including negative values. +* Updated InputHandler to use Math.round rather than Math.floor when snapping an object during drag. +* If you didn't provide the useNumericIndex parameter then AnimationManager.add will set the value by looking at the datatype of the first element in the frames array. +* Group.create now sets the visible and alive properties of the Sprite to the same value as the 'exists' parameter. +* World.randomX/Y now works with negative World.bounds values. +* Tweens .to will now always return the parent (thanks powerfear) +* You can now pass a PIXI.Texture to Sprite (you also need to pass a Phaser.Frame as the frame parameter) but this is useful for Sprites sharing joint canvases. +* Group.alpha is now exposed publically and changes the Group container object (not the children directly, who can still have their own alpha values) +* Device.webGL uses new inspection code to accurately catch more webGL capable devices. +* Debug.renderSpriteBody updated to use a the new Sprite.Body.screenX/Y properties. +* Additional checks added to AnimationManager.frame/frameName on the given values. +* You can now null a Sprite.crop and it will clear down the crop rect area correctly. * Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas. * Animation.generateFrameNames can now work in reverse, so the start/stop values can create frames that increment or decrement respectively. * Loader updated to use xhr.responseText when loading json, csv or text files. xhr.response is still used for Web Audio binary files (thanks bubba) * Input.onDown and onUp events now dispatch the original event that triggered them (i.e. a MouseEvent or TouchEvent) as the 2nd parameter, after the Pointer (thanks rezoner) -* Game.destroy will now stop the raf from running as well as close down all input related event listeners (issue 92, thanks astrism) -* Fixed issue 105 where a dragged object that was destroyed would cause an Input error (thanks onedayitwillmake) * Updated Sprite.crop significantly. Values are now cached, stopping constant Texture frame updates and you can do sprite.crop.width++ for example (thanks haden) * Change: Sprite.crop needs to be enabled with sprite.cropEnabled = true. -* Added Rectangle.floorAll to floor all values in a Rectangle (x, y, width and height). -* Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora). * Sprite.loadTexture now works correctly with static images, RenderTextures and Animations. * Lots of fixes within Sprite.bounds. The bounds is now correct regardless of rotation, anchor or scale of the Sprite or any of its parent objects. -* On a busy page it's possible for the game to boot with an incorrect stage offset x/y which can cause input events to be calculated wrong. A new property has been added to Stage to combat this issue: Stage.checkOffsetInterval. By default it will check the canvas offset every 2500ms and adjust it accordingly. You can set the value to 'false' to disable the check entirely, or set a higher or lower value. We recommend that you get the value quite low during your games preloader, but once the game has fully loaded hopefully the containing page will have settled down, so it's probably safe to disable the check entirely. + +What has been fixed: + +* QuadTree bug found in 1.0.5 now fixed. The QuadTree is updated properly now using localTransform values. +* Fixed the Bounce.In and Bounce.InOut tweens (thanks XekeDeath) +* Fixed an issue in Animation.update where if the game was paused it would get an insane delta timer throwing a uuid error. +* Added PixiPatch.js to patch in a few essential features until Pixi is updated. +* Fixed issue in Animation.play where the given frameRate and loop values wouldn't overwrite those set on construction. +* Fixed small bug stopping Tween.pause / resume from resuming correctly when called directly. +* Fixed an issue where Tweens.removeAll wasn't clearing tweens in the addition queue. +* Fixed Particle Emitters when using Emitter width/height (thanks XekeDeath) +* Made animation looping more robust when skipping frames (thanks XekeDeath) +* Fix for incorrect new particle positioning (issue #73) (thanks cottonflop) +* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead. +* Button.setFrames will set the current frame based on the button state immediately. +* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox. +* Fixed issue causing Keyboard.justPressed to always fire (thanks stemkoski) +* Fixed bug in LinkedList#remove that could cause first to point to a dead node (thanks onedayitwillmake) +* Fixed Cache.addDefaultImage so the default image works in Canvas as well as WebGL. Updated to a new image (32x32 black square with green outline) +* Fixed a bug in the Sprite transform cache check that caused the skew/scale cache to get constantly invalidated - now only updates as needed, significant performance increase! +* Fixed typo in StageScaleMode so it's not pageAlignVeritcally any longer, but pageAlignVertically. +* Fixed issue in Group.countLiving / countDead where the value was off by one (thanks mjablonski) +* Fixed issue with a jittery Camera if you moved a Sprite via velocity instead of x/y placement. +* Fixed the RandomDataGenerator.sow method so if you give in the same seed you'll now get the same results (thanks Hsaka) +* Fixed Issue #101 (Mouse Button 0 is not recognised, thanks rezoner) +* Fixed an issue where creating an animation with just one frame with an index of zero would cause a UUID error (thanks SYNYST3R1) +* Fixed Rectangle.union (thanks andron77) +* Fixed Sound.resume so it now correctly resumes playback from the point it was paused (fixes issue 51, thanks Yora). +* Fixed issue 105 where a dragged object that was destroyed would cause an Input error (thanks onedayitwillmake) +* Fixed Issue 111 - calling Kill on a Phaser.Graphics instance causes error on undefined events. +* Game.destroy will now stop the raf from running as well as close down all input related event listeners (issue 92, thanks astrism) * Pixel Perfect click detection now works even if the Sprite is part of a texture atlas. +![Tanks](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser_tanks-640x480.png) + Outstanding Tasks ----------------- +* TODY: Loader conflict if 2 keys are the same even if they are in different packages (i.e. you can't use "title" for both and image and sound file). * TODO: d-pad example (http://www.html5gamedevs.com/topic/1574-gameinputondown-question/) * TODO: more touch input examples (http://www.html5gamedevs.com/topic/1556-mobile-touch-event/) * TODO: Sound.addMarker hh:mm:ss:ms @@ -165,6 +176,11 @@ Outstanding Tasks * TODO: rotation offset * TODO: Look at HiDPI Canvas settings +How to Build +------------ + +A Grunt script has been provided that will build Phaser from source as well as the examples. Run `grunt` in the phaser folder for a list of command-line options. + Requirements ------------ @@ -172,7 +188,7 @@ Games created with Phaser require a modern web browser that supports the canvas For developing with Phaser you can use either a plain-vanilla JavaScript approach or [TypeScript](https://typescript.codeplex.com/) using the provided TypeScript definitions file. We made no assumptions about how you like to code your games, and were careful not to impose any form of class/inheritance/structure upon you. -Phaser is 275 KB minified and 62 KB gzipped. +Phaser is 281 KB minified and 66 KB gzipped. Features -------- @@ -242,7 +258,7 @@ We use Phaser every day on our many client projects. As a result it's constantly Although Phaser 1.0 is a brand new release it is born from years of experience building some of the biggest HTML5 games out there. We're not saying it is 100% bug free, but we use it for our client work every day, so issues get resolved fast and we stay on-top of the changing browser landscape. -![Phaser Particles](http://www.photonstorm.com/wp-content/uploads/2013/04/phaser_particles.png) +![FruitParty](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser_fruit_particles-640x480.png) Road Map -------- diff --git a/docs/Animation.js.html b/docs/Animation.js.html index b57a3c32..eb175def 100644 --- a/docs/Animation.js.html +++ b/docs/Animation.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -924,7 +864,7 @@ Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zer Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/AnimationManager.js.html b/docs/AnimationManager.js.html index 3e94389f..f7d9a825 100644 --- a/docs/AnimationManager.js.html +++ b/docs/AnimationManager.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -866,7 +806,7 @@ Object.defineProperty(Phaser.AnimationManager.prototype, "frameName", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/AnimationParser.js.html b/docs/AnimationParser.js.html index d0f3c520..d52e7908 100644 --- a/docs/AnimationParser.js.html +++ b/docs/AnimationParser.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -780,7 +720,7 @@ Phaser.AnimationParser = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/ArcadePhysics.js.html b/docs/ArcadePhysics.js.html index 4c8b318e..ded02953 100644 --- a/docs/ArcadePhysics.js.html +++ b/docs/ArcadePhysics.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -462,45 +402,142 @@ Phaser.Physics = {}; */ Phaser.Physics.Arcade = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + /** + * @property {Phaser.Point} gravity - The World gravity setting. Defaults to x: 0, y: 0, or no gravity. + */ this.gravity = new Phaser.Point; + + /** + * @property {Phaser.Rectangle} bounds - The bounds inside of which the physics world exists. Defaults to match the world bounds. + */ this.bounds = new Phaser.Rectangle(0, 0, game.world.width, game.world.height); /** - * Used by the QuadTree to set the maximum number of objects - * @type {number} + * @property {number} maxObjects - Used by the QuadTree to set the maximum number of objects per quad. */ this.maxObjects = 10; /** - * Used by the QuadTree to set the maximum number of levels - * @type {number} + * @property {number} maxLevels - Used by the QuadTree to set the maximum number of iteration levels. */ this.maxLevels = 4; + /** + * @property {number} OVERLAP_BIAS - A value added to the delta values during collision checks. + */ this.OVERLAP_BIAS = 4; - this.TILE_OVERLAP = false; + /** + * @property {Phaser.QuadTree} quadTree - The world QuadTree. + */ this.quadTree = new Phaser.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels); + + /** + * @property {number} quadTreeID - The QuadTree ID. + */ this.quadTreeID = 0; // Avoid gc spikes by caching these values for re-use + + /** + * @property {Phaser.Rectangle} _bounds1 - Internal cache var. + * @private + */ this._bounds1 = new Phaser.Rectangle; + + /** + * @property {Phaser.Rectangle} _bounds2 - Internal cache var. + * @private + */ this._bounds2 = new Phaser.Rectangle; + + /** + * @property {number} _overlap - Internal cache var. + * @private + */ this._overlap = 0; + + /** + * @property {number} _maxOverlap - Internal cache var. + * @private + */ this._maxOverlap = 0; + + /** + * @property {number} _velocity1 - Internal cache var. + * @private + */ this._velocity1 = 0; + + /** + * @property {number} _velocity2 - Internal cache var. + * @private + */ this._velocity2 = 0; + + /** + * @property {number} _newVelocity1 - Internal cache var. + * @private + */ this._newVelocity1 = 0; + + /** + * @property {number} _newVelocity2 - Internal cache var. + * @private + */ this._newVelocity2 = 0; + + /** + * @property {number} _average - Internal cache var. + * @private + */ this._average = 0; + + /** + * @property {Array} _mapData - Internal cache var. + * @private + */ this._mapData = []; + + /** + * @property {number} _mapTiles - Internal cache var. + * @private + */ this._mapTiles = 0; + + /** + * @property {boolean} _result - Internal cache var. + * @private + */ this._result = false; + + /** + * @property {number} _total - Internal cache var. + * @private + */ this._total = 0; + + /** + * @property {number} _angle - Internal cache var. + * @private + */ this._angle = 0; + + /** + * @property {number} _dx - Internal cache var. + * @private + */ this._dx = 0; + + /** + * @property {number} _dy - Internal cache var. + * @private + */ this._dy = 0; }; @@ -1735,7 +1772,7 @@ Phaser.Physics.Arcade.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/BitmapText.js.html b/docs/BitmapText.js.html index 7c793fa8..66f82bd1 100644 --- a/docs/BitmapText.js.html +++ b/docs/BitmapText.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -688,7 +628,7 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'y', { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Body.js.html b/docs/Body.js.html index 00d0cb23..39daa201 100644 --- a/docs/Body.js.html +++ b/docs/Body.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -441,87 +381,321 @@
    -
    Phaser.Physics.Arcade.Body = function (sprite) {
    +            
    /**
    +* @author       Richard Davey <rich@photonstorm.com>
    +* @copyright    2013 Photon Storm Ltd.
    +* @license      {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
    +*/
     
    +/**
    +* The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than
    +* the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.
    +*
    +* @class Phaser.Physics.Arcade.Body
    +* @classdesc Arcade Physics Body Constructor
    +* @constructor
    +* @param {Phaser.Sprite} sprite - The Sprite object this physics body belongs to.
    +*/
    +Phaser.Physics.Arcade.Body = function (sprite) {
    +
    +    /**
    +    * @property {Phaser.Sprite} sprite - Reference to the parent Sprite.
    +    */
     	this.sprite = sprite;
    +
    +    /**
    +    * @property {Phaser.Game} game - Local reference to game.
    +    */
     	this.game = sprite.game;
     
    +    /**
    +    * @property {Phaser.Point} offset - The offset of the Physics Body from the Sprite x/y position.
    +    */
     	this.offset = new Phaser.Point;
     
    +    /**
    +    * @property {number} x - The x position of the physics body.
    +    * @readonly
    +    */
     	this.x = sprite.x;
    +
    +    /**
    +    * @property {number} y - The y position of the physics body.
    +    * @readonly
    +    */
     	this.y = sprite.y;
    +
    +    /**
    +    * @property {number} preX - The previous x position of the physics body.
    +    * @readonly
    +    */
     	this.preX = sprite.x;
    +
    +    /**
    +    * @property {number} preY - The previous y position of the physics body.
    +    * @readonly
    +    */
     	this.preY = sprite.y;
    +
    +    /**
    +    * @property {number} preRotation - The previous rotation of the physics body.
    +    * @readonly
    +    */
     	this.preRotation = sprite.angle;
    +
    +    /**
    +    * @property {number} screenX - The x position of the physics body translated to screen space.
    +    * @readonly
    +    */
     	this.screenX = sprite.x;
    +
    +    /**
    +    * @property {number} screenY - The y position of the physics body translated to screen space.
    +    * @readonly
    +    */
     	this.screenY = sprite.y;
     
    -	//	un-scaled original size
    +    /**
    +    * @property {number} sourceWidth - The un-scaled original size.
    +    * @readonly
    +    */
     	this.sourceWidth = sprite.currentFrame.sourceSizeW;
    +
    +    /**
    +    * @property {number} sourceHeight - The un-scaled original size.
    +    * @readonly
    +    */
     	this.sourceHeight = sprite.currentFrame.sourceSizeH;
     
    -	//	calculated (scaled) size
    +    /**
    +    * @property {number} width - The calculated width of the physics body.
    +    */
     	this.width = sprite.currentFrame.sourceSizeW;
    +
    +    /**
    +    * @property .numInternal ID cache
    +    */
     	this.height = sprite.currentFrame.sourceSizeH;
    +
    +    /**
    +    * @property {number} halfWidth - The calculated width / 2 of the physics body.
    +    */
     	this.halfWidth = Math.floor(sprite.currentFrame.sourceSizeW / 2);
    +
    +    /**
    +    * @property {number} halfHeight - The calculated height / 2 of the physics body.
    +    */
     	this.halfHeight = Math.floor(sprite.currentFrame.sourceSizeH / 2);
     
    -	//	Scale value cache
    +    /**
    +    * @property {number} _sx - Internal cache var.
    +    * @private
    +    */
     	this._sx = sprite.scale.x;
    +
    +    /**
    +    * @property {number} _sy - Internal cache var.
    +    * @private
    +    */
     	this._sy = sprite.scale.y;
     
    +    /**
    +    * @property {Phaser.Point} velocity - The velocity in pixels per second sq. of the Body.
    +    */
         this.velocity = new Phaser.Point;
    +
    +    /**
    +    * @property {Phaser.Point} acceleration - The velocity in pixels per second sq. of the Body.
    +    */
         this.acceleration = new Phaser.Point;
    +
    +    /**
    +    * @property {Phaser.Point} drag - The drag applied to the motion of the Body.
    +    */
         this.drag = new Phaser.Point;
    +
    +    /**
    +    * @property {Phaser.Point} gravity - A private Gravity setting for the Body.
    +    */
         this.gravity = new Phaser.Point;
    +
    +    /**
    +    * @property {Phaser.Point} bounce - The elasticitiy of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.
    +    */
         this.bounce = new Phaser.Point;
    +
    +    /**
    +    * @property {Phaser.Point} maxVelocity - The maximum velocity in pixels per second sq. that the Body can reach.
    +    * @default
    +    */
         this.maxVelocity = new Phaser.Point(10000, 10000);
     
    +    /**
    +    * @property {number} angularVelocity - The angular velocity in pixels per second sq. of the Body.
    +    * @default
    +    */
         this.angularVelocity = 0;
    +
    +    /**
    +    * @property {number} angularAcceleration - The angular acceleration in pixels per second sq. of the Body.
    +    * @default
    +    */
         this.angularAcceleration = 0;
    +
    +    /**
    +    * @property {number} angularDrag - The angular drag applied to the rotation of the Body.
    +    * @default
    +    */
         this.angularDrag = 0;
    +
    +    /**
    +    * @property {number} maxAngular - The maximum angular velocity in pixels per second sq. that the Body can reach.
    +    * @default
    +    */
         this.maxAngular = 1000;
    +
    +    /**
    +    * @property {number} mass - The mass of the Body.
    +    * @default
    +    */
         this.mass = 1;
     
    +    /**
    +    * @property {boolean} skipQuadTree - If the Body is an irregular shape you can set this to true to avoid it being added to the World quad tree.
    +    * @default
    +    */
         this.skipQuadTree = false;
    +
    +    /**
    +    * @property {Array} quadTreeIDs - Internal ID cache.
    +    * @protected
    +    */
         this.quadTreeIDs = [];
    +
    +    /**
    +    * @property {number} quadTreeIndex - Internal ID cache.
    +    * @protected
    +    */
         this.quadTreeIndex = -1;
     
         //	Allow collision
    +
    +    /**
    +    * Set the allowCollision properties to control which directions collision is processed for this Body.
    +    * For example allowCollision.up = false means it won't collide when the collision happened while moving up.
    +    * @property {object} allowCollision - An object containing allowed collision.
    +    */
         this.allowCollision = { none: false, any: true, up: true, down: true, left: true, right: true };
    +
    +    /**
    +    * This object is populated with boolean values when the Body collides with another.
    +    * touching.up = true means the collision happened to the top of this Body for example.
    +    * @property {object} touching - An object containing touching results.
    +    */
         this.touching = { none: true, up: false, down: false, left: false, right: false };
    +
    +    /**
    +    * This object is populated with previous touching values from the bodies previous collision.
    +    * @property {object} wasTouching - An object containing previous touching results.
    +    */
         this.wasTouching = { none: true, up: false, down: false, left: false, right: false };
    +
    +    /**
    +    * @property {number} facing - A const reference to the direction the Body is traveling or facing.
    +    * @default
    +    */
         this.facing = Phaser.NONE;
     
    +    /**
    +    * @property {boolean} immovable - An immovable Body will not receive any impacts from other bodies.
    +    * @default
    +    */
         this.immovable = false;
    +
    +    /**
    +    * @property {boolean} moves - Set to true to allow the Physics system to move this Body, other false to move it manually.
    +    * @default
    +    */
         this.moves = true;
    +
    +    /**
    +    * @property {number} rotation - The amount the Body is rotated.
    +    * @default
    +    */
         this.rotation = 0;
    +
    +    /**
    +    * @property {boolean} allowRotation - Allow this Body to be rotated? (via angularVelocity, etc)
    +    * @default
    +    */
         this.allowRotation = true;
    +
    +    /**
    +    * @property {boolean} allowGravity - Allow this Body to be influenced by the global Gravity?
    +    * @default
    +    */
         this.allowGravity = true;
     
    -    //	These two flags allow you to disable the custom separation that takes place
    -    //	Used in combination with your own collision processHandler you can create whatever
    -    //	type of collision response you need.
    +    /**
    +    * This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate.
    +    * Used in combination with your own collision processHandler you can create whatever type of collision response you need.
    +    * @property {boolean} customSeparateX - Use a custom separation system or the built-in one?
    +    * @default
    +    */
         this.customSeparateX = false;
    +
    +    /**
    +    * This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate.
    +    * Used in combination with your own collision processHandler you can create whatever type of collision response you need.
    +    * @property {boolean} customSeparateY - Use a custom separation system or the built-in one?
    +    * @default
    +    */
         this.customSeparateY = false;
     
    -    //	When this body collides with another the amount of overlap is stored in here
    -    //	These values are useful if you want to provide your own custom separation logic.
    +    /**
    +    * When this body collides with another, the amount of overlap is stored here.
    +    * @property {number} overlapX - The amount of horizontal overlap during the collision.
    +    */
         this.overlapX = 0;
    +
    +    /**
    +    * When this body collides with another, the amount of overlap is stored here.
    +    * @property {number} overlapY - The amount of vertical overlap during the collision.
    +    */
         this.overlapY = 0;
     
    +    /**
    +    * @property {Phaser.Rectangle} hullX - The dynamically calculated hull used during collision.
    +    */
         this.hullX = new Phaser.Rectangle();
    +
    +    /**
    +    * @property {Phaser.Rectangle} hullY - The dynamically calculated hull used during collision.
    +    */
         this.hullY = new Phaser.Rectangle();
     
    -    //	If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true
    +    /**
    +    * If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true.
    +    * @property {boolean} embedded - Body embed value.
    +    */
         this.embedded = false;
     
    +    /**
    +    * A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World.
    +    * @property {boolean} collideWorldBounds - Should the Body collide with the World bounds?
    +    */
         this.collideWorldBounds = false;
     
     };
     
     Phaser.Physics.Arcade.Body.prototype = {
     
    +    /**
    +    * Internal method.
    +    *
    +    * @method Phaser.Physics.Arcade#updateBounds
    +    * @protected
    +    */
     	updateBounds: function (centerX, centerY, scaleX, scaleY) {
     
     		if (scaleX != this._sx || scaleY != this._sy)
    @@ -536,6 +710,12 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * Internal method.
    +    *
    +    * @method Phaser.Physics.Arcade#preUpdate
    +    * @protected
    +    */
     	preUpdate: function () {
     
     		//	Store and reset collision flags
    @@ -574,8 +754,7 @@ Phaser.Physics.Arcade.Body.prototype = {
     				this.checkWorldBounds();
     			}
     
    -			this.updateHulls();
    -		}
    +			this.updateHulls();Array		}
     
     		if (this.skipQuadTree == false && this.allowCollision.none == false && this.sprite.visible && this.sprite.alive)
     		{
    @@ -586,6 +765,12 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * Internal method.
    +    *
    +    * @method Phaser.Physics.Arcade#postUpdate
    +    * @protected
    +    */
     	postUpdate: function () {
     
     		//	Calculate forward-facing edge
    @@ -626,6 +811,12 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * Internal method.
    +    *
    +    * @method Phaser.Physics.Arcade#updateHulls
    +    * @protected
    +    */
     	updateHulls: function () {
     
     		this.hullX.setTo(this.x, this.preY, this.width, this.height);
    @@ -633,6 +824,12 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * Internal method.
    +    *
    +    * @method Phaser.Physics.Arcade#checkWorldBounds
    +    * @protected
    +    */
     	checkWorldBounds: function () {
     
     		if (this.x < this.game.world.bounds.x)
    @@ -659,6 +856,17 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * You can modify the size of the physics Body to be any dimension you need.
    +    * So it could be smaller or larger than the parent Sprite. You can also control the x and y offset, which
    +    * is the position of the Body relative to the top-left of the Sprite.
    +    *
    +    * @method Phaser.Physics.Arcade#setSize
    +    * @param {number} width - The width of the Body.
    +    * @param {number} height - The height of the Body.
    +    * @param {number} offsetX - The X offset of the Body from the Sprite position.
    +    * @param {number} offsetY - The Y offset of the Body from the Sprite position.
    +    */
     	setSize: function (width, height, offsetX, offsetY) {
     
     		offsetX = offsetX || this.offset.x;
    @@ -674,6 +882,11 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * Resets all Body values (velocity, acceleration, rotation, etc)
    +    *
    +    * @method Phaser.Physics.Arcade#reset
    +    */
     	reset: function () {
     
     		this.velocity.setTo(0, 0);
    @@ -691,18 +904,42 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     	},
     
    +    /**
    +    * Returns the absolute delta x value.
    +    *
    +    * @method Phaser.Physics.Arcade.Body#deltaAbsX
    +    * @return {number} The absolute delta value.
    +    */
         deltaAbsX: function () {
             return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX());
         },
     
    +    /**
    +    * Returns the absolute delta y value.
    +    *
    +    * @method Phaser.Physics.Arcade.Body#deltaAbsY
    +    * @return {number} The absolute delta value.
    +    */
         deltaAbsY: function () {
             return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY());
         },
     
    +    /**
    +    * Returns the delta x value.
    +    *
    +    * @method Phaser.Physics.Arcade.Body#deltaX
    +    * @return {number} The delta value.
    +    */
         deltaX: function () {
             return this.x - this.preX;
         },
     
    +    /**
    +    * Returns the delta y value.
    +    *
    +    * @method Phaser.Physics.Arcade.Body#deltaY
    +    * @return {number} The delta value.
    +    */
         deltaY: function () {
             return this.y - this.preY;
         },
    @@ -713,6 +950,10 @@ Phaser.Physics.Arcade.Body.prototype = {
     
     };
     
    +/**
    +* @name Phaser.Physics.Arcade.Body#bottom
    +* @property {number} bottom - The bottom value of this Body (same as Body.y + Body.height)
    +*/
     Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", {
         
         /**
    @@ -744,6 +985,10 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", {
     
     });
     
    +/**
    +* @name Phaser.Physics.Arcade.Body#right
    +* @property {number} right - The right value of this Body (same as Body.x + Body.width)
    +*/
     Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
         
         /**
    @@ -797,7 +1042,7 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", {
     					
     		
     		Documentation generated by JSDoc 3.3.0-dev
    -		on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template.
    +		on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template.
     		
     				
     			
    diff --git a/docs/Bullet.js.html b/docs/Bullet.js.html
    index 7d551922..fcae3569 100644
    --- a/docs/Bullet.js.html
    +++ b/docs/Bullet.js.html
    @@ -226,6 +226,10 @@
     							Arcade
     						
     						
    +						
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1085,7 +1025,7 @@ Object.defineProperty(Phaser.Bullet.prototype, "inCamera", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Button.js.html b/docs/Button.js.html index 5e9d198d..bb6b3066 100644 --- a/docs/Button.js.html +++ b/docs/Button.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -782,7 +722,7 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Cache.js.html b/docs/Cache.js.html index a8ea6989..8c915f0a 100644 --- a/docs/Cache.js.html +++ b/docs/Cache.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1259,7 +1199,7 @@ Phaser.Cache.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Camera.js.html b/docs/Camera.js.html index dde93b3f..91a6d8e5 100644 --- a/docs/Camera.js.html +++ b/docs/Camera.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -869,7 +809,7 @@ Object.defineProperty(Phaser.Camera.prototype, "height", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Canvas.js.html b/docs/Canvas.js.html index 0296461c..7960c51c 100644 --- a/docs/Canvas.js.html +++ b/docs/Canvas.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -718,7 +658,7 @@ Phaser.Canvas = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Circle.js.html b/docs/Circle.js.html index 9546d9a2..fbc48b91 100644 --- a/docs/Circle.js.html +++ b/docs/Circle.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -932,7 +872,7 @@ Phaser.Circle.intersectsRectangle = function (c, r) { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Color.js.html b/docs/Color.js.html index a8b99a3e..21dad46a 100644 --- a/docs/Color.js.html +++ b/docs/Color.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -789,7 +729,7 @@ Phaser.Color = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Debug.js.html b/docs/Debug.js.html index 8e5b2487..e6047948 100644 --- a/docs/Debug.js.html +++ b/docs/Debug.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1334,7 +1274,7 @@ Phaser.Utils.Debug.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Device.js.html b/docs/Device.js.html index 39e54b21..a7986ed3 100644 --- a/docs/Device.js.html +++ b/docs/Device.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1005,7 +945,7 @@ Phaser.Device.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Easing.js.html b/docs/Easing.js.html index bcd7d229..8f1aae89 100644 --- a/docs/Easing.js.html +++ b/docs/Easing.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1023,7 +963,7 @@ Phaser.Easing = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Emitter.js.html b/docs/Emitter.js.html index 79a282b7..cc9911c7 100644 --- a/docs/Emitter.js.html +++ b/docs/Emitter.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1137,7 +1077,7 @@ Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "bottom", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Events.js.html b/docs/Events.js.html index f6d0fa93..68bb6f91 100644 --- a/docs/Events.js.html +++ b/docs/Events.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -529,7 +469,7 @@ Phaser.Events.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Frame.js.html b/docs/Frame.js.html index ed867b7d..7187b4ae 100644 --- a/docs/Frame.js.html +++ b/docs/Frame.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -622,7 +562,7 @@ Phaser.Frame.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/FrameData.js.html b/docs/FrameData.js.html index 6a66f2c0..7bbe8801 100644 --- a/docs/FrameData.js.html +++ b/docs/FrameData.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -699,7 +639,7 @@ Object.defineProperty(Phaser.FrameData.prototype, "total", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Game.js.html b/docs/Game.js.html index 630772fa..49709934 100644 --- a/docs/Game.js.html +++ b/docs/Game.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -949,7 +889,7 @@ Object.defineProperty(Phaser.Game.prototype, "paused", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/GameObjectFactory.js.html b/docs/GameObjectFactory.js.html index fbd5c909..f427f1f9 100644 --- a/docs/GameObjectFactory.js.html +++ b/docs/GameObjectFactory.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -448,7 +388,7 @@ */ /** -* Description. +* The Game Object Factory is a quick way to create all of the different sorts of core objects that Phaser uses. * * @class Phaser.GameObjectFactory * @constructor @@ -471,20 +411,8 @@ Phaser.GameObjectFactory = function (game) { Phaser.GameObjectFactory.prototype = { /** - * @property {Phaser.Game} game - A reference to the currently running Game. - * @default - */ - game: null, - - /** - * @property {Phaser.World} world - A reference to the game world. - * @default - */ - world: null, - - /** - * Description. - * @method existing. + * Adds an existing object to the game world. + * @method Phaser.GameObjectFactory#existing * @param {*} object - An instance of Phaser.Sprite, Phaser.Button or any other display object.. * @return {*} The child that was added to the Group. */ @@ -497,7 +425,7 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key. * - * @method sprite + * @method Phaser.GameObjectFactory#sprite * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. @@ -513,7 +441,7 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent. * - * @method child + * @method Phaser.GameObjectFactory#child * @param {Phaser.Group} group - The Group to add this child to. * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. @@ -530,7 +458,7 @@ Phaser.GameObjectFactory.prototype = { /** * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. * - * @method tween + * @method Phaser.GameObjectFactory#tween * @param {object} obj - Object the tween will be run on. * @return {Phaser.Tween} Description. */ @@ -543,7 +471,7 @@ Phaser.GameObjectFactory.prototype = { /** * A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * - * @method group + * @method Phaser.GameObjectFactory#group * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. * @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging. * @return {Phaser.Group} The newly created group. @@ -557,7 +485,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new instance of the Sound class. * - * @method audio + * @method Phaser.GameObjectFactory#audio * @param {string} key - The Game.cache key of the sound that this object will use. * @param {number} volume - The volume at which the sound will be played. * @param {boolean} loop - Whether or not the sound will loop. @@ -572,7 +500,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new <code>TileSprite</code>. * - * @method tileSprite + * @method Phaser.GameObjectFactory#tileSprite * @param {number} x - X position of the new tileSprite. * @param {number} y - Y position of the new tileSprite. * @param {number} width - the width of the tilesprite. @@ -590,7 +518,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new <code>Text</code>. * - * @method text + * @method Phaser.GameObjectFactory#text * @param {number} x - X position of the new text object. * @param {number} y - Y position of the new text object. * @param {string} text - The actual text that will be written. @@ -606,7 +534,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new <code>Button</code> object. * - * @method button + * @method Phaser.GameObjectFactory#button * @param {number} [x] X position of the new button object. * @param {number} [y] Y position of the new button object. * @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button. @@ -626,7 +554,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new <code>Graphics</code> object. * - * @method graphics + * @method Phaser.GameObjectFactory#graphics * @param {number} x - X position of the new graphics object. * @param {number} y - Y position of the new graphics object. * @return {Phaser.Graphics} The newly created graphics object. @@ -642,7 +570,7 @@ Phaser.GameObjectFactory.prototype = { * continuous effects like rain and fire. All it really does is launch Particle objects out * at set intervals, and fixes their positions and velocities accorindgly. * - * @method emitter + * @method Phaser.GameObjectFactory#emitter * @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from. * @param {number} [y=0] - The y coordinate within the Emitter that the particles are emitted from. * @param {number} [maxParticles=50] - The total number of particles in this emitter. @@ -657,7 +585,7 @@ Phaser.GameObjectFactory.prototype = { /** * * Create a new <code>BitmapText</code>. * - * @method bitmapText + * @method Phaser.GameObjectFactory#bitmapText * @param {number} x - X position of the new bitmapText object. * @param {number} y - Y position of the new bitmapText object. * @param {string} text - The actual text that will be written. @@ -671,9 +599,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Tilemap object. * - * @method tilemap + * @method Phaser.GameObjectFactory#tilemap * @param {string} key - Asset key for the JSON file. * @return {Phaser.Tilemap} The newly created tilemap object. */ @@ -684,9 +612,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Tileset object. * - * @method tileset + * @method Phaser.GameObjectFactory#tileset * @param {string} key - The image key as defined in the Game.Cache to use as the tileset. * @return {Phaser.Tileset} The newly created tileset object. */ @@ -697,15 +625,15 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. - * - * @method tilemaplayer - * @param {number} x - X position of the new tilemapLayer. - * @param {number} y - Y position of the new tilemapLayer. - * @param {number} width - the width of the tilemapLayer. - * @param {number} height - the height of the tilemapLayer. - * @return {Phaser.TilemapLayer} The newly created tilemaplayer object. - */ + * Creates a new Tilemap Layer object. + * + * @method Phaser.GameObjectFactory#tilemapLayer + * @param {number} x - X position of the new tilemapLayer. + * @param {number} y - Y position of the new tilemapLayer. + * @param {number} width - the width of the tilemapLayer. + * @param {number} height - the height of the tilemapLayer. + * @return {Phaser.TilemapLayer} The newly created tilemaplayer object. + */ tilemapLayer: function (x, y, width, height, tileset, tilemap, layer) { return this.world.add(new Phaser.TilemapLayer(this.game, x, y, width, height, tileset, tilemap, layer)); @@ -713,9 +641,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * A dynamic initially blank canvas to which images can be drawn + * A dynamic initially blank canvas to which images can be drawn. * - * @method renderTexture + * @method Phaser.GameObjectFactory#renderTexture * @param {string} key - Asset key for the render texture. * @param {number} width - the width of the render texture. * @param {number} height - the height of the render texture. @@ -729,7 +657,7 @@ Phaser.GameObjectFactory.prototype = { return texture; - }, + } };
    @@ -752,7 +680,7 @@ Phaser.GameObjectFactory.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Graphics.js.html b/docs/Graphics.js.html index 332169a9..b8fc6189 100644 --- a/docs/Graphics.js.html +++ b/docs/Graphics.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -549,7 +489,7 @@ Object.defineProperty(Phaser.Graphics.prototype, 'y', { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Group.js.html b/docs/Group.js.html index 69a9974b..5c5bacc1 100644 --- a/docs/Group.js.html +++ b/docs/Group.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1716,7 +1656,7 @@ Object.defineProperty(Phaser.Group.prototype, "alpha", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Input.js.html b/docs/Input.js.html index 99543057..767ceaf5 100644 --- a/docs/Input.js.html +++ b/docs/Input.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1274,7 +1214,7 @@ Object.defineProperty(Phaser.Input.prototype, "worldY", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/InputHandler.js.html b/docs/InputHandler.js.html index a7767a3b..c6af8455 100644 --- a/docs/InputHandler.js.html +++ b/docs/InputHandler.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1511,7 +1451,7 @@ Phaser.InputHandler.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Intro.js.html b/docs/IntroDocs.js.html similarity index 87% rename from docs/Intro.js.html rename to docs/IntroDocs.js.html index 82819e1a..51e51dca 100644 --- a/docs/Intro.js.html +++ b/docs/IntroDocs.js.html @@ -3,7 +3,7 @@ - Phaser Source: Intro.js + Phaser Source: IntroDocs.js + + + + + + + + +
    + + +
    + + +
    + +
    + + + +

    Class: Body

    +
    + +
    +

    + Phaser.Physics.Arcade. + + Body +

    + +

    Arcade Physics Body Constructor

    + +
    + +
    +
    + + + + +
    +

    new Body(sprite)

    + + +
    +
    + + +
    +

    The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than +the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + +

    The Sprite object this physics body belongs to.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + +
    + + + + + + + + + + + + +

    Members

    + +
    + +
    +

    acceleration

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    acceleration + + +Phaser.Point + + + +

    The velocity in pixels per second sq. of the Body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    allowCollision

    + + +
    +
    + +
    +

    Set the allowCollision properties to control which directions collision is processed for this Body. +For example allowCollision.up = false means it won't collide when the collision happened while moving up.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    allowCollision + + +object + + + +

    An object containing allowed collision.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    allowGravity

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    allowGravity + + +boolean + + + +

    Allow this Body to be influenced by the global Gravity?

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    allowRotation

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    allowRotation + + +boolean + + + +

    Allow this Body to be rotated? (via angularVelocity, etc)

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    angularAcceleration

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    angularAcceleration + + +number + + + +

    The angular acceleration in pixels per second sq. of the Body.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    angularDrag

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    angularDrag + + +number + + + +

    The angular drag applied to the rotation of the Body.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    angularVelocity

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    angularVelocity + + +number + + + +

    The angular velocity in pixels per second sq. of the Body.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bottom

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bottom + + +number + + + +

    The bottom value of this Body (same as Body.y + Body.height)

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    bounce

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bounce + + +Phaser.Point + + + +

    The elasticitiy of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    collideWorldBounds

    + + +
    +
    + +
    +

    A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    collideWorldBounds + + +boolean + + + +

    Should the Body collide with the World bounds?

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    customSeparateX

    + + +
    +
    + +
    +

    This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate. +Used in combination with your own collision processHandler you can create whatever type of collision response you need.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    customSeparateX + + +boolean + + + +

    Use a custom separation system or the built-in one?

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    customSeparateY

    + + +
    +
    + +
    +

    This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate. +Used in combination with your own collision processHandler you can create whatever type of collision response you need.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    customSeparateY + + +boolean + + + +

    Use a custom separation system or the built-in one?

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    drag

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    drag + + +Phaser.Point + + + +

    The drag applied to the motion of the Body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    embedded

    + + +
    +
    + +
    +

    If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    embedded + + +boolean + + + +

    Body embed value.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    facing

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    facing + + +number + + + +

    A const reference to the direction the Body is traveling or facing.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    game

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Local reference to game.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    gravity

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    gravity + + +Phaser.Point + + + +

    A private Gravity setting for the Body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    halfHeight

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    halfHeight + + +number + + + +

    The calculated height / 2 of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    halfWidth

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    halfWidth + + +number + + + +

    The calculated width / 2 of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    height

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    .numInternal + +

    ID cache

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    hullX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    hullX + + +Phaser.Rectangle + + + +

    The dynamically calculated hull used during collision.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    hullY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    hullY + + +Phaser.Rectangle + + + +

    The dynamically calculated hull used during collision.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    immovable

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    immovable + + +boolean + + + +

    An immovable Body will not receive any impacts from other bodies.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    mass

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    mass + + +number + + + +

    The mass of the Body.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 1
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    maxAngular

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    maxAngular + + +number + + + +

    The maximum angular velocity in pixels per second sq. that the Body can reach.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 1000
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    maxVelocity

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    maxVelocity + + +Phaser.Point + + + +

    The maximum velocity in pixels per second sq. that the Body can reach.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    moves

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    moves + + +boolean + + + +

    Set to true to allow the Physics system to move this Body, other false to move it manually.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • true
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    offset

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    offset + + +Phaser.Point + + + +

    The offset of the Physics Body from the Sprite x/y position.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    overlapX

    + + +
    +
    + +
    +

    When this body collides with another, the amount of overlap is stored here.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    overlapX + + +number + + + +

    The amount of horizontal overlap during the collision.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    overlapY

    + + +
    +
    + +
    +

    When this body collides with another, the amount of overlap is stored here.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    overlapY + + +number + + + +

    The amount of vertical overlap during the collision.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> preRotation

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    preRotation + + +number + + + +

    The previous rotation of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> preX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    preX + + +number + + + +

    The previous x position of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> preY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    preY + + +number + + + +

    The previous y position of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <protected> quadTreeIDs

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    quadTreeIDs + + +Array + + + +

    Internal ID cache.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <protected> quadTreeIndex

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    quadTreeIndex + + +number + + + +

    Internal ID cache.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    + + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    right + + +number + + + +

    The right value of this Body (same as Body.x + Body.width)

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    rotation

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    rotation + + +number + + + +

    The amount the Body is rotated.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • 0
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> screenX

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    screenX + + +number + + + +

    The x position of the physics body translated to screen space.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> screenY

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    screenY + + +number + + + +

    The y position of the physics body translated to screen space.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    skipQuadTree

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    skipQuadTree + + +boolean + + + +

    If the Body is an irregular shape you can set this to true to avoid it being added to the World quad tree.

    +
    + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
    • false
    + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> sourceHeight

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceHeight + + +number + + + +

    The un-scaled original size.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> sourceWidth

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sourceWidth + + +number + + + +

    The un-scaled original size.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    sprite

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    sprite + + +Phaser.Sprite + + + +

    Reference to the parent Sprite.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    touching

    + + +
    +
    + +
    +

    This object is populated with boolean values when the Body collides with another. +touching.up = true means the collision happened to the top of this Body for example.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    touching + + +object + + + +

    An object containing touching results.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    velocity

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    velocity + + +Phaser.Point + + + +

    The velocity in pixels per second sq. of the Body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    wasTouching

    + + +
    +
    + +
    +

    This object is populated with previous touching values from the bodies previous collision.

    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    wasTouching + + +object + + + +

    An object containing previous touching results.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    width

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + +

    The calculated width of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> x

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +number + + + +

    The x position of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    <readonly> y

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    y + + +number + + + +

    The y position of the physics body.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + +
    + + + +

    Methods

    + +
    + +
    +

    deltaAbsX() → {number}

    + + +
    +
    + + +
    +

    Returns the absolute delta x value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The absolute delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    deltaAbsY() → {number}

    + + +
    +
    + + +
    +

    Returns the absolute delta y value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The absolute delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    deltaX() → {number}

    + + +
    +
    + + +
    +

    Returns the delta x value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + + + +
    +

    deltaY() → {number}

    + + +
    +
    + + +
    +

    Returns the delta y value.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    The delta value.

    +
    + + + +
    +
    + Type +
    +
    + +number + + +
    +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + +
    + +
    +
    + + + + Phaser Copyright © 2012-2013 Photon Storm Ltd. + +
    + + + Documentation generated by JSDoc 3.3.0-dev + on Fri Oct 25 2013 17:05:29 GMT+0100 (BST) using the DocStrap template. + +
    +
    + + +
    +
    +
    + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Phaser.Physics.Arcade.html b/docs/Phaser.Physics.Arcade.html index 63aeeb4c..4ef62ed9 100644 --- a/docs/Phaser.Physics.Arcade.html +++ b/docs/Phaser.Physics.Arcade.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -583,6 +523,13 @@ +

    Classes

    + +
    +
    Body
    +
    +
    + @@ -592,33 +539,71 @@
    -

    maxLevels :number

    +

    bounds

    -
    -

    Used by the QuadTree to set the maximum number of levels

    -
    - -
    Type:
    -
      -
    • - -number - - -
    • -
    -
    +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    bounds + + +Phaser.Rectangle + + + +

    The bounds inside of which the physics world exists. Defaults to match the world bounds.

    +
    + + + @@ -638,7 +623,7 @@
    Source:
    @@ -656,33 +641,71 @@
    -

    maxObjects :number

    +

    game

    -
    -

    Used by the QuadTree to set the maximum number of objects

    -
    - -
    Type:
    -
      -
    • - -number - - -
    • -
    -
    +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    game + + +Phaser.Game + + + +

    Local reference to game.

    +
    + + + @@ -702,7 +725,619 @@
    Source:
    + + + + + + + +
    + + + +
    + + + +
    +

    gravity

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    gravity + + +Phaser.Point + + + +

    The World gravity setting. Defaults to x: 0, y: 0, or no gravity.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    maxLevels

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    maxLevels + + +number + + + +

    Used by the QuadTree to set the maximum number of iteration levels.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    maxObjects

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    maxObjects + + +number + + + +

    Used by the QuadTree to set the maximum number of objects per quad.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    OVERLAP_BIAS

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    OVERLAP_BIAS + + +number + + + +

    A value added to the delta values during collision checks.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    quadTree

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    quadTree + + +Phaser.QuadTree + + + +

    The world QuadTree.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + +
    + + + +
    +

    quadTreeID

    + + +
    +
    + + + + + +
    + + +
    Properties:
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    quadTreeID + + +number + + + +

    The QuadTree ID.

    +
    + + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -987,7 +1622,7 @@ Note: The display object doesn't stop moving once it reaches the destination coo
    Source:
    @@ -1301,7 +1936,7 @@ Note: The display object doesn't stop moving once it reaches the destination coo
    Source:
    @@ -1648,7 +2283,7 @@ Note: The display object doesn't stop moving once it reaches the destination coo
    Source:
    @@ -1885,7 +2520,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi
    Source:
    @@ -2051,7 +2686,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi
    Source:
    @@ -2235,7 +2870,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi
    Source:
    @@ -2422,7 +3057,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi
    Source:
    @@ -2468,6 +3103,75 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi +
    + + + +
    +

    <protected> checkWorldBounds()

    + + +
    +
    + + +
    +

    Internal method.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + +
    @@ -2749,7 +3453,7 @@ The objects are also automatically separated.

    Source:
    @@ -2871,7 +3575,7 @@ The objects are also automatically separated.

    -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -3005,7 +3709,7 @@ The objects are also automatically separated.

    Source:
    @@ -3169,7 +3873,7 @@ The objects are also automatically separated.

    Source:
    @@ -3355,7 +4059,7 @@ If you need to calculate from the center of a display object instead use the met
    Source:
    @@ -3544,7 +4248,7 @@ If you need to calculate from the center of a display object instead use the met
    Source:
    @@ -3819,7 +4523,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -4095,7 +4799,7 @@ Note: The display object doesn't stop moving once it reaches the destination coo
    Source:
    @@ -4405,7 +5109,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -4569,7 +5273,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -4661,7 +5365,76 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected> postUpdate()

    + + +
    +
    + + +
    +

    Internal method.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -4730,7 +5503,145 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected> preUpdate()

    + + +
    +
    + + +
    +

    Internal method.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    reset()

    + + +
    +
    + + +
    +

    Resets all Body values (velocity, acceleration, rotation, etc)

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    @@ -4806,7 +5717,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -4829,7 +5740,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -4871,7 +5782,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -4970,335 +5881,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set -Phaser.Physics.Arcade.Body - - - - - - - - - -

    The Body object to separate.

    - - - - - - - tile - - - - - -Phaser.Tile - - - - - - - - - -

    The tile to collide against.

    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Returns true if the bodies were separated, otherwise false.

    -
    - - - -
    -
    - Type -
    -
    - -boolean - - -
    -
    - - - - - -
    - - - -
    -

    separateTileX(body1, tile) → {boolean}

    - - -
    -
    - - -
    -

    The core separation function to separate a physics body and a tile on the x axis.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    body1 - - -Phaser.Physics.Arcade.Body - - - -

    The Body object to separate.

    tile - - -Phaser.Tile - - - -

    The tile to collide against.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Returns true if the bodies were separated, otherwise false.

    -
    - - - -
    -
    - Type -
    -
    - -boolean - - -
    -
    - - - - - -
    - - - -
    -

    separateTileY(body1, tile) → {boolean}

    - - -
    -
    - - -
    -

    The core separation function to separate a physics body and a tile on the x axis.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    body1 - - -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -5384,6 +5967,334 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + + + + + +
    +

    separateTileX(body1, tile) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate a physics body and a tile on the x axis.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    tile + + +Phaser.Tile + + + +

    The tile to collide against.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + +
    +

    Returns true if the bodies were separated, otherwise false.

    +
    + + + +
    +
    + Type +
    +
    + +boolean + + +
    +
    + + + + + +
    + + + +
    +

    separateTileY(body1, tile) → {boolean}

    + + +
    +
    + + +
    +

    The core separation function to separate a physics body and a tile on the x axis.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    body1 + + +Phaser.Physics.Arcade.Body + + + +

    The Body object to separate.

    tile + + +Phaser.Tile + + + +

    The tile to collide against.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + +
    Returns:
    @@ -5462,7 +6373,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -5485,7 +6396,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -5527,7 +6438,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -5626,7 +6537,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -5649,7 +6560,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -5691,7 +6602,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -5737,6 +6648,333 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set + + + + +
    +

    setSize(width, height, offsetX, offsetY)

    + + +
    +
    + + +
    +

    You can modify the size of the physics Body to be any dimension you need. +So it could be smaller or larger than the parent Sprite. You can also control the x and y offset, which +is the position of the Body relative to the top-left of the Sprite.

    +
    + + + + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    width + + +number + + + +

    The width of the Body.

    height + + +number + + + +

    The height of the Body.

    offsetX + + +number + + + +

    The X offset of the Body from the Sprite position.

    offsetY + + +number + + + +

    The Y offset of the Body from the Sprite position.

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected> updateBounds()

    + + +
    +
    + + +
    +

    Internal method.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + + +
    + + + +
    +

    <protected> updateHulls()

    + + +
    +
    + + +
    +

    Internal method.

    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    Source:
    +
    + + + + + + + +
    + + + + + + + + + + + + +
    @@ -5790,7 +7028,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -5832,7 +7070,7 @@ Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set
    Source:
    @@ -6046,7 +7284,7 @@ One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which wil
    Source:
    @@ -6285,7 +7523,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi
    Source:
    @@ -6361,7 +7599,7 @@ One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) whi Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:29 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Physics.html b/docs/Phaser.Physics.html index 339633ee..a339c8db 100644 --- a/docs/Phaser.Physics.html +++ b/docs/Phaser.Physics.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -565,7 +505,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:47 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:29 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Plugin.html b/docs/Phaser.Plugin.html index f5257f37..835ea5ef 100644 --- a/docs/Phaser.Plugin.html +++ b/docs/Phaser.Plugin.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1827,7 +1767,7 @@ It is only called if active is set to true.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:29 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.PluginManager.html b/docs/Phaser.PluginManager.html index a4886e8d..4528a022 100644 --- a/docs/Phaser.PluginManager.html +++ b/docs/Phaser.PluginManager.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1457,7 +1397,7 @@ It only calls plugins who have active=true.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:29 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Point.html b/docs/Phaser.Point.html index 4ef47585..ddee290a 100644 --- a/docs/Phaser.Point.html +++ b/docs/Phaser.Point.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -5017,7 +4957,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:29 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Pointer.html b/docs/Phaser.Pointer.html index 15d132e6..ee5c62c9 100644 --- a/docs/Phaser.Pointer.html +++ b/docs/Phaser.Pointer.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -4860,7 +4800,7 @@ Default size of 44px (Apple's recommended "finger tip" size).

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.QuadTree.html b/docs/Phaser.QuadTree.html index 9947a438..b00f2216 100644 --- a/docs/Phaser.QuadTree.html +++ b/docs/Phaser.QuadTree.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1326,7 +1266,7 @@ Split the node into 4 subnodes

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.RandomDataGenerator.html b/docs/Phaser.RandomDataGenerator.html index c893b200..486e2b58 100644 --- a/docs/Phaser.RandomDataGenerator.html +++ b/docs/Phaser.RandomDataGenerator.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2019,7 +1959,7 @@ Random number generator from Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Rectangle.html b/docs/Phaser.Rectangle.html index f7c069a4..e91b1134 100644 --- a/docs/Phaser.Rectangle.html +++ b/docs/Phaser.Rectangle.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -7404,7 +7344,7 @@ This method checks the x, y, width, and height properties of the Rectangles.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.RenderTexture.html b/docs/Phaser.RenderTexture.html index 4d406da5..62ab2199 100644 --- a/docs/Phaser.RenderTexture.html +++ b/docs/Phaser.RenderTexture.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1405,7 +1345,7 @@ once they update pixi to fix the typo, we'll fix it here too :)

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.RequestAnimationFrame.html b/docs/Phaser.RequestAnimationFrame.html index f2ef9d0d..29f60417 100644 --- a/docs/Phaser.RequestAnimationFrame.html +++ b/docs/Phaser.RequestAnimationFrame.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1329,7 +1269,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Signal.html b/docs/Phaser.Signal.html index f3235e32..c2a4313e 100644 --- a/docs/Phaser.Signal.html +++ b/docs/Phaser.Signal.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2314,7 +2254,7 @@ already dispatched before.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Sound.html b/docs/Phaser.Sound.html index a9813371..c22be39b 100644 --- a/docs/Phaser.Sound.html +++ b/docs/Phaser.Sound.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -5747,7 +5687,7 @@ This allows you to bundle multiple sounds together into a single audio file and Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:48 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.SoundManager.html b/docs/Phaser.SoundManager.html index dedced84..7c994610 100644 --- a/docs/Phaser.SoundManager.html +++ b/docs/Phaser.SoundManager.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2446,7 +2386,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Sprite.html b/docs/Phaser.Sprite.html index 2c251b46..a1212293 100644 --- a/docs/Phaser.Sprite.html +++ b/docs/Phaser.Sprite.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1275,7 +1215,7 @@ A culled sprite has its renderable property set to 'false'.

    -Phaser.Physics.Arcade.Body +Phaser.Physics.Arcade.Body @@ -7752,7 +7692,7 @@ It will dispatch the onRevived event, you can listen to Sprite.events.onRevived Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:30 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Stage.html b/docs/Phaser.Stage.html index e72d9ee0..87fb6ae4 100644 --- a/docs/Phaser.Stage.html +++ b/docs/Phaser.Stage.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1680,7 +1620,7 @@ focus handling, game resizing, scaling and the pause, boot and orientation scree Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.StageScaleMode.html b/docs/Phaser.StageScaleMode.html index 12f9e211..45c915d4 100644 --- a/docs/Phaser.StageScaleMode.html +++ b/docs/Phaser.StageScaleMode.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -3840,7 +3780,7 @@ Please note that this needs to be supported by the web browser and isn't the sam Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.State.html b/docs/Phaser.State.html index 40cf1e4c..37679159 100644 --- a/docs/Phaser.State.html +++ b/docs/Phaser.State.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2594,7 +2534,7 @@ If you need to use the loader, you may need to use them here.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.StateManager.html b/docs/Phaser.StateManager.html index c85cda32..42ce6ae7 100644 --- a/docs/Phaser.StateManager.html +++ b/docs/Phaser.StateManager.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -3451,7 +3391,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Text.html b/docs/Phaser.Text.html index 0bedbd55..142961c0 100644 --- a/docs/Phaser.Text.html +++ b/docs/Phaser.Text.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1839,7 +1779,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.TileSprite.html b/docs/Phaser.TileSprite.html index 0fff887c..e07b7cae 100644 --- a/docs/Phaser.TileSprite.html +++ b/docs/Phaser.TileSprite.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1172,7 +1112,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Time.html b/docs/Phaser.Time.html index 6c4f3228..38ea3d32 100644 --- a/docs/Phaser.Time.html +++ b/docs/Phaser.Time.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2915,7 +2855,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Touch.html b/docs/Phaser.Touch.html index dd046bcb..2967411e 100644 --- a/docs/Phaser.Touch.html +++ b/docs/Phaser.Touch.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2566,7 +2506,7 @@ Doesn't appear to be supported by most browsers on a canvas element yet.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Tween.html b/docs/Phaser.Tween.html index 2bb08d08..0712f3ac 100644 --- a/docs/Phaser.Tween.html +++ b/docs/Phaser.Tween.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -3272,7 +3212,7 @@ Used in combination with repeat you can create endless loops.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.TweenManager.html b/docs/Phaser.TweenManager.html index ee5fce9b..b8ae3f5b 100644 --- a/docs/Phaser.TweenManager.html +++ b/docs/Phaser.TweenManager.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1628,7 +1568,7 @@ Please see https://github.com/sole/tw Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:49 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Utils.Debug.html b/docs/Phaser.Utils.Debug.html index 8ebe3b10..f5156051 100644 --- a/docs/Phaser.Utils.Debug.html +++ b/docs/Phaser.Utils.Debug.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -5981,7 +5921,7 @@ your game set to use Phaser.AUTO then swap it for Phaser.CANVAS to ensure WebGL Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:32 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.Utils.html b/docs/Phaser.Utils.html index 218c7314..fde44034 100644 --- a/docs/Phaser.Utils.html +++ b/docs/Phaser.Utils.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1140,7 +1080,7 @@ dir = 1 (left), 2 (right), 3 (both)

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:31 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.World.html b/docs/Phaser.World.html index bfe1e906..685bc77d 100644 --- a/docs/Phaser.World.html +++ b/docs/Phaser.World.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -2115,7 +2055,7 @@ If you need to adjust the bounds of the world

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:32 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.html b/docs/Phaser.html index e0e7fa60..5b5da4f6 100644 --- a/docs/Phaser.html +++ b/docs/Phaser.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -708,7 +648,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Phaser.js.html b/docs/Phaser.js.html index 62ba15c6..9fc7b1fb 100644 --- a/docs/Phaser.js.html +++ b/docs/Phaser.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -504,7 +444,7 @@ PIXI.InteractionManager = function (dummy) { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Plugin.js.html b/docs/Plugin.js.html index 5fae9c1c..b823ed7f 100644 --- a/docs/Plugin.js.html +++ b/docs/Plugin.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -577,7 +517,7 @@ Phaser.Plugin.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/PluginManager.js.html b/docs/PluginManager.js.html index 3ee07220..e0a609ea 100644 --- a/docs/PluginManager.js.html +++ b/docs/PluginManager.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -694,7 +634,7 @@ Phaser.PluginManager.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Point.js.html b/docs/Point.js.html index e0b13c5b..f1a9a1a0 100644 --- a/docs/Point.js.html +++ b/docs/Point.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -859,7 +799,7 @@ Phaser.Point.rotate = function (a, x, y, angle, asDegrees, distance) { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Pointer.js.html b/docs/Pointer.js.html index 55c1a964..8a8a8b90 100644 --- a/docs/Pointer.js.html +++ b/docs/Pointer.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1151,7 +1091,7 @@ Object.defineProperty(Phaser.Pointer.prototype, "worldY", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/QuadTree.js.html b/docs/QuadTree.js.html index 2bcf4b56..b58109cf 100644 --- a/docs/QuadTree.js.html +++ b/docs/QuadTree.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -726,7 +666,7 @@ Phaser.QuadTree.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/RandomDataGenerator.js.html b/docs/RandomDataGenerator.js.html index 3b234790..aae4f2ff 100644 --- a/docs/RandomDataGenerator.js.html +++ b/docs/RandomDataGenerator.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -708,7 +648,7 @@ Phaser.RandomDataGenerator.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Rectangle.js.html b/docs/Rectangle.js.html index 5a8a1f65..3a2f95a2 100644 --- a/docs/Rectangle.js.html +++ b/docs/Rectangle.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1145,7 +1085,7 @@ Phaser.Rectangle.union = function (a, b, out) { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/RenderTexture.js.html b/docs/RenderTexture.js.html index 3880f0d0..ea651e4f 100644 --- a/docs/RenderTexture.js.html +++ b/docs/RenderTexture.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -531,7 +471,7 @@ Phaser.RenderTexture.prototype.constructor = Phaser.RenderTexture; Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/RequestAnimationFrame.js.html b/docs/RequestAnimationFrame.js.html index 55d15796..5672c631 100644 --- a/docs/RequestAnimationFrame.js.html +++ b/docs/RequestAnimationFrame.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -614,7 +554,7 @@ Phaser.RequestAnimationFrame.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Signal.js.html b/docs/Signal.js.html index e53e8c5a..12d883ad 100644 --- a/docs/Signal.js.html +++ b/docs/Signal.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -759,7 +699,7 @@ Phaser.Signal.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/SignalBinding.html b/docs/SignalBinding.html index 2579d39e..64277efe 100644 --- a/docs/SignalBinding.html +++ b/docs/SignalBinding.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -759,7 +699,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:50 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:32 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/SignalBinding.js.html b/docs/SignalBinding.js.html index 721fddf8..76457202 100644 --- a/docs/SignalBinding.js.html +++ b/docs/SignalBinding.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -624,7 +564,7 @@ Phaser.SignalBinding.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Sound.js.html b/docs/Sound.js.html index 72c02c51..e149bb2c 100644 --- a/docs/Sound.js.html +++ b/docs/Sound.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1289,7 +1229,7 @@ Object.defineProperty(Phaser.Sound.prototype, "volume", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/SoundManager.js.html b/docs/SoundManager.js.html index eaf2cba7..83d398a3 100644 --- a/docs/SoundManager.js.html +++ b/docs/SoundManager.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -911,7 +851,7 @@ Object.defineProperty(Phaser.SoundManager.prototype, "volume", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Sprite.js.html b/docs/Sprite.js.html index c1d87190..3b07c29b 100644 --- a/docs/Sprite.js.html +++ b/docs/Sprite.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1587,7 +1527,7 @@ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Stage.js.html b/docs/Stage.js.html index 4f2f1fce..f10ebda5 100644 --- a/docs/Stage.js.html +++ b/docs/Stage.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -638,7 +578,7 @@ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/StageScaleMode.js.html b/docs/StageScaleMode.js.html index 045b5c29..31be6dd7 100644 --- a/docs/StageScaleMode.js.html +++ b/docs/StageScaleMode.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1033,7 +973,7 @@ Object.defineProperty(Phaser.StageScaleMode.prototype, "isLandscape", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/State.js.html b/docs/State.js.html index 1e6468f2..2d04c7dc 100644 --- a/docs/State.js.html +++ b/docs/State.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -631,7 +571,7 @@ Phaser.State.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/StateManager.js.html b/docs/StateManager.js.html index ba023349..2604fa8f 100644 --- a/docs/StateManager.js.html +++ b/docs/StateManager.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -987,7 +927,7 @@ Phaser.StateManager.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Text.js.html b/docs/Text.js.html index 35a2d3f6..5a0d9205 100644 --- a/docs/Text.js.html +++ b/docs/Text.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -683,7 +623,7 @@ Object.defineProperty(Phaser.Text.prototype, 'font', { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/TileSprite.js.html b/docs/TileSprite.js.html index 812d8964..9d88842c 100644 --- a/docs/TileSprite.js.html +++ b/docs/TileSprite.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -519,7 +459,7 @@ Phaser.TileSprite.prototype.constructor = Phaser.TileSprite; Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Time.js.html b/docs/Time.js.html index b616de5d..e43d0193 100644 --- a/docs/Time.js.html +++ b/docs/Time.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -733,7 +673,7 @@ Phaser.Time.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Touch.js.html b/docs/Touch.js.html index be9a5a3c..ff9954b2 100644 --- a/docs/Touch.js.html +++ b/docs/Touch.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -795,7 +735,7 @@ Phaser.Touch.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Tween.js.html b/docs/Tween.js.html index 16c1ae76..a03cbbfd 100644 --- a/docs/Tween.js.html +++ b/docs/Tween.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -1071,7 +1011,7 @@ Phaser.Tween.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/TweenManager.js.html b/docs/TweenManager.js.html index 7936a498..955b7745 100644 --- a/docs/TweenManager.js.html +++ b/docs/TweenManager.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -648,7 +588,7 @@ Phaser.TweenManager.prototype = { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/Utils.js.html b/docs/Utils.js.html index 6bd7466b..8383ee03 100644 --- a/docs/Utils.js.html +++ b/docs/Utils.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -689,7 +629,7 @@ if (typeof Function.prototype.bind != 'function') { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/World.js.html b/docs/World.js.html index 21d2ad92..37669ab3 100644 --- a/docs/World.js.html +++ b/docs/World.js.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -722,7 +662,7 @@ Object.defineProperty(Phaser.World.prototype, "randomY", { Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/build/conf.json b/docs/build/conf.json index 6bd6894c..4bbe4e6c 100644 --- a/docs/build/conf.json +++ b/docs/build/conf.json @@ -5,7 +5,7 @@ "source": { "include": [ "../../src/Phaser.js", - "../../src/Intro.js", + "../../src/IntroDocs.js", "../../src/animation/", "../../src/core/", "../../src/gameobjects/", @@ -15,10 +15,9 @@ "../../src/math/", "../../src/net/", "../../src/particles/", - "../../src/physics/", + "../../src/physics/arcade/", "../../src/sound/", "../../src/system/", - "../../src/tilemap/", "../../src/time/", "../../src/tween/", "../../src/utils/" diff --git a/docs/build/conf_dev.json b/docs/build/conf_dev.json index e5ba68ae..4bbe4e6c 100644 --- a/docs/build/conf_dev.json +++ b/docs/build/conf_dev.json @@ -5,7 +5,7 @@ "source": { "include": [ "../../src/Phaser.js", - "../../src/Intro.js", + "../../src/IntroDocs.js", "../../src/animation/", "../../src/core/", "../../src/gameobjects/", diff --git a/docs/classes.list.html b/docs/classes.list.html index b1682b66..f3bdbab2 100644 --- a/docs/classes.list.html +++ b/docs/classes.list.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -636,6 +576,9 @@
    Arcade
    +
    Body
    +
    +
    Plugin
    @@ -755,7 +698,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/global.html b/docs/global.html index 90667b5e..283e7b46 100644 --- a/docs/global.html +++ b/docs/global.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -505,405 +445,6 @@
    -
    -

    audio(key, volume, loop) → {Phaser.Sound}

    - - -
    -
    - - -
    -

    Creates a new instance of the Sound class.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    key - - -string - - - -

    The Game.cache key of the sound that this object will use.

    volume - - -number - - - -

    The volume at which the sound will be played.

    loop - - -boolean - - - -

    Whether or not the sound will loop.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created text object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Sound - - -
    -
    - - - - - -
    - - - -
    -

    bitmapText(x, y, text, style) → {Phaser.BitmapText}

    - - -
    -
    - - -
    -
      -
    • Create a new <code>BitmapText</code>.
    • -
    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    x - - -number - - - -

    X position of the new bitmapText object.

    y - - -number - - - -

    Y position of the new bitmapText object.

    text - - -string - - - -

    The actual text that will be written.

    style - - -object - - - -

    The style object containing style attributes like font, font size , etc.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created bitmapText object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.BitmapText - - -
    -
    - - - - - -
    - - -

    bottom() → {number}

    @@ -946,7 +487,7 @@
    Source:
    @@ -1083,7 +624,7 @@
    Source:
    @@ -1106,1426 +647,6 @@ - - - - -
    -

    button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) → {Phaser.Button}

    - - -
    -
    - - -
    -

    Creates a new <code>Button</code> object.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDescription
    x - - -number - - - - - - <optional>
    - - - - - -

    X position of the new button object.

    y - - -number - - - - - - <optional>
    - - - - - -

    Y position of the new button object.

    key - - -string - - - - - - <optional>
    - - - - - -

    The image key as defined in the Game.Cache to use as the texture for this button.

    callback - - -function - - - - - - <optional>
    - - - - - -

    The function to call when this button is pressed

    callbackContext - - -object - - - - - - <optional>
    - - - - - -

    The context in which the callback will be called (usually 'this')

    overFrame - - -string -| - -number - - - - - - <optional>
    - - - - - -

    This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.

    outFrame - - -string -| - -number - - - - - - <optional>
    - - - - - -

    This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.

    downFrame - - -string -| - -number - - - - - - <optional>
    - - - - - -

    This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created button object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Button - - -
    -
    - - - - - -
    - - - -
    -

    child(group, x, y, key, frame) → {Phaser.Sprite}

    - - -
    -
    - - -
    -

    Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDescription
    group - - -Phaser.Group - - - - - - - - - -

    The Group to add this child to.

    x - - -number - - - - - - - - - -

    X position of the new sprite.

    y - - -number - - - - - - - - - -

    Y position of the new sprite.

    key - - -string -| - -RenderTexture - - - - - - <optional>
    - - - - - -

    The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture.

    frame - - -string -| - -number - - - - - - <optional>
    - - - - - -

    If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    the newly created sprite object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Sprite - - -
    -
    - - - - - -
    - - - -
    -

    emitter(x, y, maxParticles) → {Phaser.Emitter}

    - - -
    -
    - - -
    -

    Emitter is a lightweight particle emitter. It can be used for one-time explosions or for -continuous effects like rain and fire. All it really does is launch Particle objects out -at set intervals, and fixes their positions and velocities accorindgly.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    x - - -number - - - - - - <optional>
    - - - - - -
    - - 0 - -

    The x coordinate within the Emitter that the particles are emitted from.

    y - - -number - - - - - - <optional>
    - - - - - -
    - - 0 - -

    The y coordinate within the Emitter that the particles are emitted from.

    maxParticles - - -number - - - - - - <optional>
    - - - - - -
    - - 50 - -

    The total number of particles in this emitter.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created emitter object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Emitter - - -
    -
    - - - - - -
    - - - -
    -

    existing.(object) → {*}

    - - -
    -
    - - -
    -

    Description.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    object - - -* - - - -

    An instance of Phaser.Sprite, Phaser.Button or any other display object..

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The child that was added to the Group.

    -
    - - - -
    -
    - Type -
    -
    - -* - - -
    -
    - - - - - -
    - - - -
    -

    graphics(x, y) → {Phaser.Graphics}

    - - -
    -
    - - -
    -

    Creates a new <code>Graphics</code> object.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    x - - -number - - - -

    X position of the new graphics object.

    y - - -number - - - -

    Y position of the new graphics object.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created graphics object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Graphics - - -
    -
    - - - - - -
    - - - -
    -

    group(parent, name) → {Phaser.Group}

    - - -
    -
    - - -
    -

    A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDefaultDescription
    parent - - -* - - - - - - - - - - - -

    The parent Group or DisplayObjectContainer that will hold this group, if any.

    name - - -string - - - - - - <optional>
    - - - - - -
    - - group - -

    A name for this Group. Not used internally but useful for debugging.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created group.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Group - - -
    -
    - - - - -
    @@ -2663,193 +784,6 @@ at set intervals, and fixes their positions and velocities accorindgly.

    - - - - -
    -

    renderTexture(key, width, height) → {Phaser.RenderTexture}

    - - -
    -
    - - -
    -

    A dynamic initially blank canvas to which images can be drawn

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    key - - -string - - - -

    Asset key for the render texture.

    width - - -number - - - -

    the width of the render texture.

    height - - -number - - - -

    the height of the render texture.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created renderTexture object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.RenderTexture - - -
    -
    - - - - -
    @@ -2897,7 +831,7 @@ However it does affect the width property.

    Source:
    @@ -3035,7 +969,7 @@ However it does affect the width property.

    Source:
    @@ -3058,1369 +992,6 @@ However it does affect the width property.

    - - - - -
    -

    sprite(x, y, key, frame) → {Phaser.Sprite}

    - - -
    -
    - - -
    -

    Create a new Sprite with specific position and sprite sheet key.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeArgumentDescription
    x - - -number - - - - - - - - - -

    X position of the new sprite.

    y - - -number - - - - - - - - - -

    Y position of the new sprite.

    key - - -string -| - -Phaser.RenderTexture -| - -PIXI.Texture - - - - - - - - - -

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame - - -string -| - -number - - - - - - <optional>
    - - - - - -

    If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    the newly created sprite object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Sprite - - -
    -
    - - - - - -
    - - - -
    -

    text(x, y, text, style) → {Phaser.Text}

    - - -
    -
    - - -
    -

    Creates a new <code>Text</code>.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    x - - -number - - - -

    X position of the new text object.

    y - - -number - - - -

    Y position of the new text object.

    text - - -string - - - -

    The actual text that will be written.

    style - - -object - - - -

    The style object containing style attributes like font, font size , etc.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created text object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Text - - -
    -
    - - - - - -
    - - - -
    -

    tilemap(key) → {Phaser.Tilemap}

    - - -
    -
    - - -
    -

    Description.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    key - - -string - - - -

    Asset key for the JSON file.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created tilemap object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Tilemap - - -
    -
    - - - - - -
    - - - -
    -

    tilemaplayer(x, y, width, height) → {Phaser.TilemapLayer}

    - - -
    -
    - - -
    -

    Description.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    x - - -number - - - -

    X position of the new tilemapLayer.

    y - - -number - - - -

    Y position of the new tilemapLayer.

    width - - -number - - - -

    the width of the tilemapLayer.

    height - - -number - - - -

    the height of the tilemapLayer.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created tilemaplayer object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.TilemapLayer - - -
    -
    - - - - - -
    - - - -
    -

    tileset(key) → {Phaser.Tileset}

    - - -
    -
    - - -
    -

    Description.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    key - - -string - - - -

    The image key as defined in the Game.Cache to use as the tileset.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created tileset object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Tileset - - -
    -
    - - - - - -
    - - - -
    -

    tileSprite(x, y, width, height, key, frame) → {Phaser.TileSprite}

    - - -
    -
    - - -
    -

    Creates a new <code>TileSprite</code>.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    x - - -number - - - -

    X position of the new tileSprite.

    y - - -number - - - -

    Y position of the new tileSprite.

    width - - -number - - - -

    the width of the tilesprite.

    height - - -number - - - -

    the height of the tilesprite.

    key - - -string -| - -Phaser.RenderTexture -| - -PIXI.Texture - - - -

    This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

    frame - - -string -| - -number - - - -

    If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    The newly created tileSprite object.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.TileSprite - - -
    -
    - - - - - -
    - - - -
    -

    tween(obj) → {Phaser.Tween}

    - - -
    -
    - - -
    -

    Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

    -
    - - - - - - - -
    Parameters:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    obj - - -object - - - -

    Object the tween will be run on.

    - - - - -
    - - - - - - - - - - - - - - - - - - - -
    Source:
    -
    - - - - - - - -
    - - - - - - - - - - - -
    Returns:
    - - -
    -

    Description.

    -
    - - - -
    -
    - Type -
    -
    - -Phaser.Tween - - -
    -
    - - - - -
    @@ -4449,7 +1020,7 @@ However it does affect the width property.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/docs/index.html b/docs/index.html index 513d1335..deb3dd24 100644 --- a/docs/index.html +++ b/docs/index.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -472,7 +412,7 @@

    - D:\wamp\www\phaser\src/Intro.js + D:\wamp\www\phaser\src/IntroDocs.js

    @@ -484,7 +424,7 @@

    Phaser - http://www.phaser.io

    -

    v<%= version %> - Built at: <%= buildDate %>

    +

    v1.1 - Released October 25th 2013.

    By Richard Davey http://www.photonstorm.com @photonstorm

    A feature-packed 2D HTML5 game framework born from the smouldering pits of Flixel and constructed via plenty of blood, sweat, tears and coffee by Richard Davey (@photonstorm).

    @@ -520,7 +460,7 @@ and my love of game development originate.

    Source:
    @@ -573,7 +513,7 @@ and my love of game development originate.

    Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template.
    diff --git a/docs/namespaces.list.html b/docs/namespaces.list.html index 32b68635..9c0a911e 100644 --- a/docs/namespaces.list.html +++ b/docs/namespaces.list.html @@ -226,6 +226,10 @@ Arcade +
  • + Body +
  • +
  • Plugin
  • @@ -344,82 +348,18 @@ @@ -636,6 +576,9 @@
    Arcade
    +
    Body
    +
    +
    Plugin
    @@ -755,7 +698,7 @@ Documentation generated by JSDoc 3.3.0-dev - on Fri Oct 25 2013 16:16:43 GMT+0100 (BST) using the DocStrap template. + on Fri Oct 25 2013 17:05:24 GMT+0100 (BST) using the DocStrap template. diff --git a/src/IntroDocs.js b/src/IntroDocs.js new file mode 100644 index 00000000..27a04815 --- /dev/null +++ b/src/IntroDocs.js @@ -0,0 +1,29 @@ +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +*/ + +/** +* @overview +* +* Phaser - http://www.phaser.io +* +* v1.1 - Released October 25th 2013. +* +* By Richard Davey http://www.photonstorm.com @photonstorm +* +* A feature-packed 2D HTML5 game framework born from the smouldering pits of Flixel and +* constructed via plenty of blood, sweat, tears and coffee by Richard Davey (@photonstorm). +* +* Phaser uses Pixi.js for rendering, created by Mat Groves http://matgroves.com/ @Doormat23. +* +* Follow Phaser development progress at http://www.photonstorm.com +* +* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel, from both which Phaser +* and my love of game development originate. +* +* "If you want your children to be intelligent, read them fairy tales." +* "If you want them to be more intelligent, read them more fairy tales." +* -- Albert Einstein +*/ diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index ebd37ed5..9f1fd101 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -5,7 +5,7 @@ */ /** -* Description. +* The Game Object Factory is a quick way to create all of the different sorts of core objects that Phaser uses. * * @class Phaser.GameObjectFactory * @constructor @@ -28,20 +28,8 @@ Phaser.GameObjectFactory = function (game) { Phaser.GameObjectFactory.prototype = { /** - * @property {Phaser.Game} game - A reference to the currently running Game. - * @default - */ - game: null, - - /** - * @property {Phaser.World} world - A reference to the game world. - * @default - */ - world: null, - - /** - * Description. - * @method existing. + * Adds an existing object to the game world. + * @method Phaser.GameObjectFactory#existing * @param {*} object - An instance of Phaser.Sprite, Phaser.Button or any other display object.. * @return {*} The child that was added to the Group. */ @@ -54,7 +42,7 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key. * - * @method sprite + * @method Phaser.GameObjectFactory#sprite * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. @@ -70,7 +58,7 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent. * - * @method child + * @method Phaser.GameObjectFactory#child * @param {Phaser.Group} group - The Group to add this child to. * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. @@ -87,7 +75,7 @@ Phaser.GameObjectFactory.prototype = { /** * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. * - * @method tween + * @method Phaser.GameObjectFactory#tween * @param {object} obj - Object the tween will be run on. * @return {Phaser.Tween} Description. */ @@ -100,7 +88,7 @@ Phaser.GameObjectFactory.prototype = { /** * A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * - * @method group + * @method Phaser.GameObjectFactory#group * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. * @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging. * @return {Phaser.Group} The newly created group. @@ -114,7 +102,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new instance of the Sound class. * - * @method audio + * @method Phaser.GameObjectFactory#audio * @param {string} key - The Game.cache key of the sound that this object will use. * @param {number} volume - The volume at which the sound will be played. * @param {boolean} loop - Whether or not the sound will loop. @@ -129,7 +117,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new TileSprite. * - * @method tileSprite + * @method Phaser.GameObjectFactory#tileSprite * @param {number} x - X position of the new tileSprite. * @param {number} y - Y position of the new tileSprite. * @param {number} width - the width of the tilesprite. @@ -147,7 +135,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new Text. * - * @method text + * @method Phaser.GameObjectFactory#text * @param {number} x - X position of the new text object. * @param {number} y - Y position of the new text object. * @param {string} text - The actual text that will be written. @@ -163,7 +151,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new Button object. * - * @method button + * @method Phaser.GameObjectFactory#button * @param {number} [x] X position of the new button object. * @param {number} [y] Y position of the new button object. * @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button. @@ -183,7 +171,7 @@ Phaser.GameObjectFactory.prototype = { /** * Creates a new Graphics object. * - * @method graphics + * @method Phaser.GameObjectFactory#graphics * @param {number} x - X position of the new graphics object. * @param {number} y - Y position of the new graphics object. * @return {Phaser.Graphics} The newly created graphics object. @@ -199,7 +187,7 @@ Phaser.GameObjectFactory.prototype = { * continuous effects like rain and fire. All it really does is launch Particle objects out * at set intervals, and fixes their positions and velocities accorindgly. * - * @method emitter + * @method Phaser.GameObjectFactory#emitter * @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from. * @param {number} [y=0] - The y coordinate within the Emitter that the particles are emitted from. * @param {number} [maxParticles=50] - The total number of particles in this emitter. @@ -214,7 +202,7 @@ Phaser.GameObjectFactory.prototype = { /** * * Create a new BitmapText. * - * @method bitmapText + * @method Phaser.GameObjectFactory#bitmapText * @param {number} x - X position of the new bitmapText object. * @param {number} y - Y position of the new bitmapText object. * @param {string} text - The actual text that will be written. @@ -228,9 +216,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Tilemap object. * - * @method tilemap + * @method Phaser.GameObjectFactory#tilemap * @param {string} key - Asset key for the JSON file. * @return {Phaser.Tilemap} The newly created tilemap object. */ @@ -241,9 +229,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Tileset object. * - * @method tileset + * @method Phaser.GameObjectFactory#tileset * @param {string} key - The image key as defined in the Game.Cache to use as the tileset. * @return {Phaser.Tileset} The newly created tileset object. */ @@ -254,15 +242,15 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. - * - * @method tilemaplayer - * @param {number} x - X position of the new tilemapLayer. - * @param {number} y - Y position of the new tilemapLayer. - * @param {number} width - the width of the tilemapLayer. - * @param {number} height - the height of the tilemapLayer. - * @return {Phaser.TilemapLayer} The newly created tilemaplayer object. - */ + * Creates a new Tilemap Layer object. + * + * @method Phaser.GameObjectFactory#tilemapLayer + * @param {number} x - X position of the new tilemapLayer. + * @param {number} y - Y position of the new tilemapLayer. + * @param {number} width - the width of the tilemapLayer. + * @param {number} height - the height of the tilemapLayer. + * @return {Phaser.TilemapLayer} The newly created tilemaplayer object. + */ tilemapLayer: function (x, y, width, height, tileset, tilemap, layer) { return this.world.add(new Phaser.TilemapLayer(this.game, x, y, width, height, tileset, tilemap, layer)); @@ -270,9 +258,9 @@ Phaser.GameObjectFactory.prototype = { }, /** - * A dynamic initially blank canvas to which images can be drawn + * A dynamic initially blank canvas to which images can be drawn. * - * @method renderTexture + * @method Phaser.GameObjectFactory#renderTexture * @param {string} key - Asset key for the render texture. * @param {number} width - the width of the render texture. * @param {number} height - the height of the render texture. @@ -286,6 +274,6 @@ Phaser.GameObjectFactory.prototype = { return texture; - }, + } }; \ No newline at end of file diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 3aff9dcc..522e12cd 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -49,8 +49,6 @@ Phaser.Physics.Arcade = function (game) { */ this.OVERLAP_BIAS = 4; - // this.TILE_OVERLAP = false; - /** * @property {Phaser.QuadTree} quadTree - The world QuadTree. */ diff --git a/src/tilemap_old/Tile.js b/src/tilemap_old/Tile.js deleted file mode 100644 index 069f1b46..00000000 --- a/src/tilemap_old/Tile.js +++ /dev/null @@ -1,183 +0,0 @@ -/** -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Tile -*/ - - -/** -* Create a new Tile. -* -* @class Phaser.Tile -* @classdesc A Tile is a single representation of a tile within a Tilemap. -* @constructor -* @param {Phaser.Game} game - A reference to the currently running game. -* @param {Tilemap} tilemap - The tilemap this tile belongs to. -* @param {number} index - The index of this tile type in the core map data. -* @param {number} width - Width of the tile. -* @param {number} height - Height of the tile. -*/ -Phaser.Tile = function (game, tilemap, index, width, height) { - - /** - * @property {number} mass - The virtual mass of the tile. - * @default - */ - this.mass = 1.0; - - /** - * @property {boolean} collideNone - Indicating this Tile doesn't collide at all. - * @default - */ - this.collideNone = true; - - /** - * @property {boolean} collideLeft - Indicating collide with any object on the left. - * @default - */ - this.collideLeft = false; - - /** - * @property {boolean} collideRight - Indicating collide with any object on the right. - * @default - */ - this.collideRight = false; - - /** - * @property {boolean} collideUp - Indicating collide with any object on the top. - * @default - */ - this.collideUp = false; - - /** - * @property {boolean} collideDown - Indicating collide with any object on the bottom. - * @default - */ - this.collideDown = false; - - /** - * @property {boolean} separateX - Enable separation at x-axis. - * @default - */ - this.separateX = true; - - /** - * @property {boolean} separateY - Enable separation at y-axis. - * @default - */ - this.separateY = true; - - /** - * @property {Phaser.Game} game - A reference to the currently running game. - */ - this.game = game; - - /** - * @property {boolean} tilemap - The tilemap this tile belongs to. - */ - this.tilemap = tilemap; - - /** - * @property {number} index - The index of this tile type in the core map data. - */ - this.index = index; - - /** - * @property {number} width - The width of the tile. - */ - this.width = width; - - /** - * @property {number} height - The height of the tile. - */ - this.height = height; - -}; - -Phaser.Tile.prototype = { - - /** - * Clean up memory. - * @method destroy - */ - destroy: function () { - this.tilemap = null; - }, - - /** - * Set collision configs. - * @method setCollision - * @param {boolean} left - Indicating collide with any object on the left. - * @param {boolean} right - Indicating collide with any object on the right. - * @param {boolean} up - Indicating collide with any object on the top. - * @param {boolean} down - Indicating collide with any object on the bottom. - * @param {boolean} reset - Description. - * @param {boolean} separateX - Separate at x-axis. - * @param {boolean} separateY - Separate at y-axis. - */ - setCollision: function (left, right, up, down, reset, separateX, separateY) { - - if (reset) - { - this.resetCollision(); - } - - this.separateX = separateX; - this.separateY = separateY; - - this.collideNone = true; - this.collideLeft = left; - this.collideRight = right; - this.collideUp = up; - this.collideDown = down; - - if (left || right || up || down) - { - this.collideNone = false; - } - - }, - - /** - * Reset collision status flags. - * @method resetCollision - */ - resetCollision: function () { - - this.collideNone = true; - this.collideLeft = false; - this.collideRight = false; - this.collideUp = false; - this.collideDown = false; - - } - -}; - -Object.defineProperty(Phaser.Tile.prototype, "bottom", { - - /** - * The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. - * @method bottom - * @return {number} - **/ - get: function () { - return this.y + this.height; - } - -}); - -Object.defineProperty(Phaser.Tile.prototype, "right", { - - /** - * The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties. - * However it does affect the width property. - * @method right - * @return {number} - **/ - get: function () { - return this.x + this.width; - } - -}); diff --git a/src/tilemap_old/Tilemap.js b/src/tilemap_old/Tilemap.js deleted file mode 100644 index ad19fd81..00000000 --- a/src/tilemap_old/Tilemap.js +++ /dev/null @@ -1,530 +0,0 @@ -/** -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.Tilemap -*/ - - -/** -* Create a new Tilemap. -* @class Phaser.Tilemap -* @classdesc This GameObject allows for the display of a tilemap within the game world. Tile maps consist of an image, tile data and a size. -* Internally it creates a TilemapLayer for each layer in the tilemap. -* @constructor -* @param {Phaser.Game} game - Current game instance. -* @param {string} key - Asset key for this map. -* @param {object} x - Description. -* @param {object} y - Description. -* @param {boolean} resizeWorld - Resize the world bound automatically based on this tilemap? -* @param {number} tileWidth - Width of tiles in this map (used for CSV maps). -* @param {number} tileHeight - Height of tiles in this map (used for CSV maps). -*/ -Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight) { - - if (typeof resizeWorld === "undefined") { resizeWorld = true; } - if (typeof tileWidth === "undefined") { tileWidth = 0; } - if (typeof tileHeight === "undefined") { tileHeight = 0; } - - /** - * @property {Phaser.Game} game - A reference to the currently running game. - */ - this.game = game; - - /** - * @property {Description} group - Description. - */ - this.group = null; - - /** - * @property {string} name - The user defined name given to this Description. - * @default - */ - this.name = ''; - - /** - * @property {Description} key - Description. - */ - this.key = key; - - /** - * @property {number} renderOrderID - Render iteration counter - * @default - */ - this.renderOrderID = 0; - - /** - * @property {boolean} collisionCallback - Tilemap collision callback. - * @default - */ - this.collisionCallback = null; - - /** - * @property {boolean} exists - Description. - * @default - */ - this.exists = true; - - /** - * @property {boolean} visible - Description. - * @default - */ - this.visible = true; - - this.width = 0; - this.height = 0; - - /** - * @property {boolean} tiles - Description. - * @default - */ - this.tiles = []; - - /** - * @property {boolean} layers - Description. - * @default - */ - this.layers = []; - - var map = this.game.cache.getTilemap(key); - - PIXI.DisplayObjectContainer.call(this); - - /** - * @property {Description} position - Description. - */ - this.position.x = x; - this.position.y = y; - - /** - * @property {Description} type - Description. - */ - this.type = Phaser.TILEMAP; - - /** - * @property {Description} renderer - Description. - */ - this.renderer = new Phaser.TilemapRenderer(this.game); - - this.fixedToCamera = true; - - /** - * @property {Description} mapFormat - Description. - */ - this.mapFormat = map.format; - - switch (this.mapFormat) - { - case Phaser.Tilemap.CSV: - this.parseCSV(map.mapData, key, tileWidth, tileHeight); - break; - - case Phaser.Tilemap.JSON: - this.parseTiledJSON(map.mapData, key); - break; - } - - if (this.currentLayer && resizeWorld) - { - this.game.world.setBounds(0, 0, this.width, this.heightIn); - } - -}; - -// Needed to keep the PIXI.Sprite constructor in the prototype chain (as the core pixi renderer uses an instanceof check sadly) -Phaser.Tilemap.prototype = Object.create(PIXI.DisplayObjectContainer.prototype); -Phaser.Tilemap.prototype.constructor = Phaser.Tilemap; - -Phaser.Tilemap.CSV = 0; -Phaser.Tilemap.JSON = 1; - -/** -* Parse csv map data and generate tiles. -* -* @method Phaser.Tilemap.prototype.parseCSV -* @param {string} data - CSV map data. -* @param {string} key - Asset key for tileset image. -* @param {number} tileWidth - Width of its tile. -* @param {number} tileHeight - Height of its tile. -*/ -Phaser.Tilemap.prototype.parseCSV = function (data, key, tileWidth, tileHeight) { - - var layer = new Phaser.TilemapLayer(this, 0, key, Phaser.Tilemap.CSV, 'TileLayerCSV' + this.layers.length.toString(), tileWidth, tileHeight); - - // Trim any rogue whitespace from the data - data = data.trim(); - - var rows = data.split("\n"); - - for (var i = 0; i < rows.length; i++) - { - var column = rows[i].split(","); - - if (column.length > 0) - { - layer.addColumn(column); - } - } - - layer.updateBounds(); - layer.createCanvas(); - - var tileQuantity = layer.parseTileOffsets(); - - this.currentLayer = layer; - this.collisionLayer = layer; - this.layers.push(layer); - - this.width = this.currentLayer.widthInPixels; - this.height = this.currentLayer.heightInPixels; - - this.generateTiles(tileQuantity); - -}; - -/** -* Parse JSON map data and generate tiles. -* -* @method Phaser.Tilemap.prototype.parseTiledJSON -* @param {string} data - JSON map data. -* @param {string} key - Asset key for tileset image. -*/ -Phaser.Tilemap.prototype.parseTiledJSON = function (json, key) { - - for (var i = 0; i < json.layers.length; i++) - { - var layer = new Phaser.TilemapLayer(this, i, key, Phaser.Tilemap.JSON, json.layers[i].name, json.tilewidth, json.tileheight); - - // Check it's a data layer - if (!json.layers[i].data) - { - continue; - } - - // layer.createQuadTree(json.tilewidth * json.layers[i].width, json.tileheight * json.layers[i].height); - - layer.alpha = json.layers[i].opacity; - layer.visible = json.layers[i].visible; - layer.tileMargin = json.tilesets[0].margin; - layer.tileSpacing = json.tilesets[0].spacing; - - var c = 0; - var row; - - for (var t = 0; t < json.layers[i].data.length; t++) - { - if (c == 0) - { - row = []; - } - - row.push(json.layers[i].data[t]); - c++; - - if (c == json.layers[i].width) - { - layer.addColumn(row); - c = 0; - } - } - - layer.updateBounds(); - layer.createCanvas(); - - var tileQuantity = layer.parseTileOffsets(); - - this.currentLayer = layer; - this.collisionLayer = layer; - this.layers.push(layer); - - if (this.currentLayer.widthInPixels > this.width) - { - this.width = this.currentLayer.widthInPixels; - } - - if (this.currentLayer.heightInPixels > this.height) - { - this.height = this.currentLayer.heightInPixels; - } - } - - this.generateTiles(tileQuantity); - -}; - -/** -* Create tiles of given quantity. -* @method Phaser.Tilemap.prototype.generateTiles -* @param {number} qty - Quantity of tiles to be generated. -*/ -Phaser.Tilemap.prototype.generateTiles = function (qty) { - - for (var i = 0; i < qty; i++) - { - this.tiles.push(new Phaser.Tile(this.game, this, i, this.currentLayer.tileWidth, this.currentLayer.tileHeight)); - } - -}; - -/** -* Set callback to be called when this tilemap collides. -* -* @method Phaser.Tilemap.prototype.setCollisionCallback -* @param {object} context - Callback will be called with this context. -* @param {Function} callback - Callback function. -*/ -Phaser.Tilemap.prototype.setCollisionCallback = function (context, callback) { - - this.collisionCallbackContext = context; - this.collisionCallback = callback; - -}; - -/** -* Set collision configs of tiles in a range index. -* -* @method Phaser.Tilemap.prototype.setCollisionRange -* @param {number} start - First index of tiles. -* @param {number} end - Last index of tiles. -* @param {number} collision - Bit field of flags. (see Tile.allowCollision) -* @param {boolean} resetCollisions - Reset collision flags before set. -* @param {boolean} separateX - Enable separate at x-axis. -* @param {boolean} separateY - Enable separate at y-axis. -*/ -Phaser.Tilemap.prototype.setCollisionRange = function (start, end, left, right, up, down, resetCollisions, separateX, separateY) { - - if (typeof resetCollisions === "undefined") { resetCollisions = false; } - if (typeof separateX === "undefined") { separateX = true; } - if (typeof separateY === "undefined") { separateY = true; } - - for (var i = start; i < end; i++) - { - this.tiles[i].setCollision(left, right, up, down, resetCollisions, separateX, separateY); - } - -}; - -/** -* Set collision configs of tiles with given index. -* @param {number[]} values - Index array which contains all tile indexes. The tiles with those indexes will be setup with rest parameters. -* @param {number} collision - Bit field of flags (see Tile.allowCollision). -* @param {boolean} resetCollisions - Reset collision flags before set. -* @param {boolean} left - Indicating collide with any object on the left. -* @param {boolean} right - Indicating collide with any object on the right. -* @param {boolean} up - Indicating collide with any object on the top. -* @param {boolean} down - Indicating collide with any object on the bottom. -* @param {boolean} separateX - Enable separate at x-axis. -* @param {boolean} separateY - Enable separate at y-axis. -*/ -Phaser.Tilemap.prototype.setCollisionByIndex = function (values, left, right, up, down, resetCollisions, separateX, separateY) { - - if (typeof resetCollisions === "undefined") { resetCollisions = false; } - if (typeof separateX === "undefined") { separateX = true; } - if (typeof separateY === "undefined") { separateY = true; } - - for (var i = 0; i < values.length; i++) - { - this.tiles[values[i]].setCollision(left, right, up, down, resetCollisions, separateX, separateY); - } - -}; - -// Tile Management - -/** -* Get the tile by its index. -* @param {number} value - Index of the tile you want to get. -* @return {Tile} The tile with given index. -*/ -Phaser.Tilemap.prototype.getTileByIndex = function (value) { - - if (this.tiles[value]) - { - return this.tiles[value]; - } - - return null; - -}; - -/** -* Get the tile located at specific position and layer. -* @param {number} x - X position of this tile located. -* @param {number} y - Y position of this tile located. -* @param {number} [layer] - layer of this tile located. -* @return {Tile} The tile with specific properties. -*/ -Phaser.Tilemap.prototype.getTile = function (x, y, layer) { - - if (typeof layer === "undefined") { layer = this.currentLayer.ID; } - - return this.tiles[this.layers[layer].getTileIndex(x, y)]; - -}; - -/** -* Get the tile located at specific position (in world coordinate) and layer (thus you give a position of a point which is within the tile). -* @param {number} x - X position of the point in target tile. -* @param {number} y - Y position of the point in target tile. -* @param {number} [layer] - layer of this tile located. -* @return {Tile} The tile with specific properties. -*/ -Phaser.Tilemap.prototype.getTileFromWorldXY = function (x, y, layer) { - - if (typeof layer === "undefined") { layer = this.currentLayer.ID; } - - return this.tiles[this.layers[layer].getTileFromWorldXY(x, y)]; - -}; - -/** -* Gets the tile underneath the Input.x/y position. -* @param {number} layer - The layer to check, defaults to 0. -* @return {Tile} -*/ -Phaser.Tilemap.prototype.getTileFromInputXY = function (layer) { - - if (typeof layer === "undefined") { layer = this.currentLayer.ID; } - - return this.tiles[this.layers[layer].getTileFromWorldXY(this.game.input.worldX, this.game.input.worldY)]; - -}; - -/** -* Get tiles overlaps the given object. -* @param {GameObject} object - Tiles you want to get that overlaps this. -* @return {array} Array with tiles information (Each contains x, y and the tile). -*/ -Phaser.Tilemap.prototype.getTileOverlaps = function (object) { - - return this.currentLayer.getTileOverlaps(object); - -}; - -// COLLIDE - -/** -* Check whether this tilemap collides with the given game object or group of objects. -* @param {Function} objectOrGroup - Target object of group you want to check. -* @param {Function} callback - This is called if objectOrGroup collides the tilemap. -* @param {object} context - Callback will be called with this context. -* @return {boolean} Return true if this collides with given object, otherwise return false. -*/ -Phaser.Tilemap.prototype.collide = function (objectOrGroup, callback, context) { - - objectOrGroup = objectOrGroup || this.game.world.group; - callback = callback || null; - context = context || null; - - if (callback && context) - { - this.collisionCallback = callback; - this.collisionCallbackContext = context; - } - - if (objectOrGroup instanceof Phaser.Group) - { - objectOrGroup.forEachAlive(this.collideGameObject, this); - } - else - { - this.collideGameObject(objectOrGroup); - } - -}; - -/** -* Check whether this tilemap collides with the given game object. -* @param {GameObject} object - Target object you want to check. -* @return {boolean} Return true if this collides with given object, otherwise return false. -*/ -Phaser.Tilemap.prototype.collideGameObject = function (object) { - - if (object instanceof Phaser.Group || object instanceof Phaser.Tilemap) - { - return false; - } - - if (object.exists && object.body.allowCollision.none == false) - { - this._tempCollisionData = this.collisionLayer.getTileOverlaps(object); - - if (this.collisionCallback && this._tempCollisionData.length > 0) - { - this.collisionCallback.call(this.collisionCallbackContext, object, this._tempCollisionData); - } - - return true; - } - else - { - return false; - } - -}; - -/** -* Set a tile to a specific layer. -* @param {number} x - X position of this tile. -* @param {number} y - Y position of this tile. -* @param {number} index - The index of this tile type in the core map data. -* @param {number} [layer] - Which layer you want to set the tile to. -*/ -Phaser.Tilemap.prototype.putTile = function (x, y, index, layer) { - - if (typeof layer === "undefined") { layer = this.currentLayer.ID; } - - this.layers[layer].putTile(x, y, index); - -}; - -/** -* Calls the renderer. -*/ -Phaser.Tilemap.prototype.update = function () { - - this.renderer.render(this); - - if (this.fixedToCamera) - { - // this.displayObject.position.x = this.game.camera.view.x + this.x; - // this.displayObject.position.y = this.game.camera.view.y + this.y; - this.position.x = this.game.camera.view.x + 0; - this.position.y = this.game.camera.view.y + 0; - } - -}; - -/** -* Description. -*/ -Phaser.Tilemap.prototype.destroy = function () { - - this.tiles.length = 0; - this.layers.length = 0; - -}; - -/** -* Get width in pixels. -* @return {number} -*/ -Object.defineProperty(Phaser.Tilemap.prototype, "widthInPixels", { - - get: function () { - return this.currentLayer.widthInPixels; - } - -}); - -/** -* Get height in pixels. -* @return {number} -*/ -Object.defineProperty(Phaser.Tilemap.prototype, "heightInPixels", { - - get: function () { - return this.currentLayer.heightInPixels; - } - -}); diff --git a/src/tilemap_old/TilemapLayer.js b/src/tilemap_old/TilemapLayer.js deleted file mode 100644 index 80fd7516..00000000 --- a/src/tilemap_old/TilemapLayer.js +++ /dev/null @@ -1,662 +0,0 @@ -/** -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.TilemapLayer -*/ - -/** -* Create a new TilemapLayer. -* @class Phaser.TilemapLayer -* @classdesc A Tilemap Layer. Tiled format maps can have multiple overlapping layers. -* @constructor -* @param parent {Tilemap} The tilemap that contains this layer. -* @param id {number} The ID of this layer within the Tilemap array. -* @param key {string} Asset key for this map. -* @param mapformat {number} Format of this map data, available: Tilemap.CSV or Tilemap.JSON. -* @param name {string} Name of this layer, so you can get this layer by its name. -* @param tileWidth {number} Width of tiles in this map. -* @param tileHeight {number} Height of tiles in this map. -*/ -Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, tileHeight) { - - /** - * @property {boolean} exists - Controls whether update() and draw() are automatically called. - * @default - */ - this.exists = true; - - /** - * @property {boolean} visible - Controls whether draw() are automatically called. - * @default - */ - this.visible = true; - - /** - * How many tiles in each row. - * Read-only variable, do NOT recommend changing after the map is loaded! - * @property {number} widthInTiles - * @default - */ - this.widthInTiles = 0; - - /** - * How many tiles in each column. - * Read-only variable, do NOT recommend changing after the map is loaded! - * @property {number} heightInTiles - * @default - */ - this.heightInTiles = 0; - - /** - * Read-only variable, do NOT recommend changing after the map is loaded! - * @property {number} widthInPixels - * @default - */ - this.widthInPixels = 0; - - /** - * Read-only variable, do NOT recommend changing after the map is loaded! - * @property {number} heightInPixels - * @default - */ - this.heightInPixels = 0; - - /** - * Distance between REAL tiles to the tileset texture bound. - * @property {number} tileMargin - * @default - */ - this.tileMargin = 0; - - /** - * Distance between every 2 neighbor tile in the tileset texture. - * @property {number} tileSpacing - * @default - */ - this.tileSpacing = 0; - - /** - * @property {Description} parent - Description. - */ - this.parent = parent; - - /** - * @property {Phaser.Game} game - Description. - */ - this.game = parent.game; - - /** - * @property {Description} ID - Description. - */ - this.ID = id; - - /** - * @property {Description} name - Description. - */ - this.name = name; - - /** - * @property {Description} key - Description. - */ - this.key = key; - - /** - * @property {Description} type - Description. - */ - this.type = Phaser.TILEMAPLAYER; - - /** - * @property {tileWidth} mapFormat - Description. - */ - this.mapFormat = mapFormat; - - /** - * @property {Description} tileWidth - Description. - */ - this.tileWidth = tileWidth; - - /** - * @property {Description} tileHeight - Description. - */ - this.tileHeight = tileHeight; - - /** - * @property {Phaser.Rectangle} boundsInTiles - Description. - */ - this.boundsInTiles = new Phaser.Rectangle(); - - var map = this.game.cache.getTilemap(key); - - /** - * @property {Description} tileset - Description. - */ - this.tileset = map.data; - - /** - * @property {Description} _alpha - Description. - * @private - * @default - */ - this._alpha = 1; - - /** - * @property {Description} canvas - Description. - * @default - */ - this.canvas = null; - - /** - * @property {Description} context - Description. - * @default - */ - this.context = null; - - /** - * @property {Description} baseTexture - Description. - * @default - */ - this.baseTexture = null; - - /** - * @property {Description} texture - Description. - * @default - */ - this.texture = null; - - /** - * @property {Description} sprite - Description. - * @default - */ - this.sprite = null; - - /** - * @property {array} mapData - Description. - */ - this.mapData = []; - - /** - * @property {array} _tempTileBlock - Description. - * @private - */ - this._tempTileBlock = []; - - /** - * @property {array} _tempBlockResults - Description. - * @private - * - */ - this._tempBlockResults = []; - -}; - -Phaser.TilemapLayer.prototype = { - - /** - * Set a specific tile with its x and y in tiles. - * @method putTileWorldXY - * @param {number} x - X position of this tile in world coordinates. - * @param {number} y - Y position of this tile in world coordinates. - * @param {number} index - The index of this tile type in the core map data. - */ - putTileWorldXY: function (x, y, index) { - - x = this.game.math.snapToFloor(x, this.tileWidth) / this.tileWidth; - y = this.game.math.snapToFloor(y, this.tileHeight) / this.tileHeight; - - if (y >= 0 && y < this.mapData.length) - { - if (x >= 0 && x < this.mapData[y].length) - { - this.mapData[y][x] = index; - } - } - - }, - - /** - * Set a specific tile with its x and y in tiles. - * @method putTile - * @param {number} x - X position of this tile. - * @param {number} y - Y position of this tile. - * @param {number} index - The index of this tile type in the core map data. - */ - putTile: function (x, y, index) { - - if (y >= 0 && y < this.mapData.length) - { - if (x >= 0 && x < this.mapData[y].length) - { - this.mapData[y][x] = index; - } - } - - }, - - /** - * Swap tiles with 2 kinds of indexes. - * @method swapTile - * @param {number} tileA - First tile index. - * @param {number} tileB - Second tile index. - * @param {number} [x] - specify a Rectangle of tiles to operate. The x position in tiles of Rectangle's left-top corner. - * @param {number} [y] - specify a Rectangle of tiles to operate. The y position in tiles of Rectangle's left-top corner. - * @param {number} [width] - specify a Rectangle of tiles to operate. The width in tiles. - * @param {number} [height] - specify a Rectangle of tiles to operate. The height in tiles. - */ - swapTile: function (tileA, tileB, x, y, width, height) { - - x = x || 0; - y = y || 0; - width = width || this.widthInTiles; - height = height || this.heightInTiles; - - this.getTempBlock(x, y, width, height); - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - // First sweep marking tileA as needing a new index - if (this._tempTileBlock[r].tile.index == tileA) - { - this._tempTileBlock[r].newIndex = true; - } - - // In the same pass we can swap tileB to tileA - if (this._tempTileBlock[r].tile.index == tileB) - { - this.mapData[this._tempTileBlock[r].y][this._tempTileBlock[r].x] = tileA; - } - } - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - // And now swap our newIndex tiles for tileB - if (this._tempTileBlock[r].newIndex == true) - { - this.mapData[this._tempTileBlock[r].y][this._tempTileBlock[r].x] = tileB; - } - } - - }, - - /** - * Fill a tile block with a specific tile index. - * @method fillTile - * @param {number} index - Index of tiles you want to fill with. - * @param {number} [x] - X position (in tiles) of block's left-top corner. - * @param {number} [y] - Y position (in tiles) of block's left-top corner. - * @param {number} [width] - width of block. - * @param {number} [height] - height of block. - */ - fillTile: function (index, x, y, width, height) { - - x = x || 0; - y = y || 0; - width = width || this.widthInTiles; - height = height || this.heightInTiles; - - this.getTempBlock(x, y, width, height); - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - this.mapData[this._tempTileBlock[r].y][this._tempTileBlock[r].x] = index; - } - - }, - - /** - * Set random tiles to a specific tile block. - * @method randomiseTiles - * @param {number[]} tiles - Tiles with indexes in this array will be randomly set to the given block. - * @param {number} [x] - X position (in tiles) of block's left-top corner. - * @param {number} [y] - Y position (in tiles) of block's left-top corner. - * @param {number} [width] - width of block. - * @param {number} [height] - height of block. - */ - randomiseTiles: function (tiles, x, y, width, height) { - - x = x || 0; - y = y || 0; - width = width || this.widthInTiles; - height = height || this.heightInTiles; - - this.getTempBlock(x, y, width, height); - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - this.mapData[this._tempTileBlock[r].y][this._tempTileBlock[r].x] = this.game.math.getRandom(tiles); - } - - }, - - /** - * Replace one kind of tiles to another kind. - * @method replaceTile - * @param {number} tileA - First tile index. - * @param {number} tileB - Second tile index. - * @param {number} [x] - X position (in tiles) of block's left-top corner. - * @param {number} [y] - Y position (in tiles) of block's left-top corner. - * @param {number} [width] - width of block. - * @param {number} [height] - height of block. - */ - replaceTile: function (tileA, tileB, x, y, width, height) { - - x = x || 0; - y = y || 0; - width = width || this.widthInTiles; - height = height || this.heightInTiles; - - this.getTempBlock(x, y, width, height); - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - if (this._tempTileBlock[r].tile.index == tileA) - { - this.mapData[this._tempTileBlock[r].y][this._tempTileBlock[r].x] = tileB; - } - } - - }, - - /** - * Get a tile block with specific position and size (both are in tiles). - * @method getTileBlock - * @param {number} [x] - X position (in tiles) of block's left-top corner. - * @param {number} [y] - Y position (in tiles) of block's left-top corner. - * @param {number} [width] - width of block. - * @param {number} [height] - height of block. - */ - getTileBlock: function (x, y, width, height) { - - var output = []; - - this.getTempBlock(x, y, width, height); - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - output.push({ - x: this._tempTileBlock[r].x, - y: this._tempTileBlock[r].y, - tile: this._tempTileBlock[r].tile - }); - } - - return output; - - }, - - /** - * Get a tile with specific position (in world coordinate). (thus you give a position of a point which is within the tile) - * @method getTileFromWorldXY - * @param {number} [x] - X position (in tiles) of block's left-top corner. - * @param {number} [y] - Y position (in tiles) of block's left-top corner. - */ - getTileFromWorldXY: function (x, y) { - - x = Phaser.Math.snapToFloor(x, this.tileWidth) / this.tileWidth; - y = Phaser.Math.snapToFloor(y, this.tileHeight) / this.tileHeight; - - return this.getTileIndex(x, y); - - }, - - /** - * Get tiles overlaps the given object. - * @method getTileOverlaps - * @param {GameObject} object - Tiles you want to get that overlaps this. - * @return {array} Array with tiles informations (each contains x, y, and the tile). - */ - getTileOverlaps: function (object) { - - this._tempBlockResults.length = 0; - - // If the object is outside of the world coordinates then abort the check (tilemap has to exist within world bounds) - if (object.body.x < 0 || object.body.x > this.widthInPixels || object.body.y < 0 || object.body.bottom > this.heightInPixels) - { - return this._tempBlockResults; - } - - // What tiles do we need to check against? - this._tempTileX = this.game.math.snapToFloor(object.body.x, this.tileWidth) / this.tileWidth; - this._tempTileY = this.game.math.snapToFloor(object.body.y, this.tileHeight) / this.tileHeight; - this._tempTileW = (this.game.math.snapToCeil(object.body.width, this.tileWidth) + this.tileWidth) / this.tileWidth; - this._tempTileH = (this.game.math.snapToCeil(object.body.height, this.tileHeight) + this.tileHeight) / this.tileHeight; - - // Loop through the tiles we've got and check overlaps accordingly (the results are stored in this._tempTileBlock) - this.getTempBlock(this._tempTileX, this._tempTileY, this._tempTileW, this._tempTileH, true); - - for (var r = 0; r < this._tempTileBlock.length; r++) - { - // separateTile: function (object, x, y, width, height, mass, collideLeft, collideRight, collideUp, collideDown, separateX, separateY) - if (this.game.physics.separateTile(object, this._tempTileBlock[r].x * this.tileWidth, this._tempTileBlock[r].y * this.tileHeight, this.tileWidth, this.tileHeight, this._tempTileBlock[r].tile.mass, this._tempTileBlock[r].tile.collideLeft, this._tempTileBlock[r].tile.collideRight, this._tempTileBlock[r].tile.collideUp, this._tempTileBlock[r].tile.collideDown, this._tempTileBlock[r].tile.separateX, this._tempTileBlock[r].tile.separateY)) - { - this._tempBlockResults.push({ x: this._tempTileBlock[r].x, y: this._tempTileBlock[r].y, tile: this._tempTileBlock[r].tile }); - } - } - - return this._tempBlockResults; - - }, - - /** - * Get a tile block with its position and size (this method does not return, it'll set result to _tempTileBlock). - * @method getTempBlock - * @param {number} [x] - X position (in tiles) of block's left-top corner. - * @param {number} [y] - Y position (in tiles) of block's left-top corner. - * @param {number} [width] - width of block. - * @param {number} [height] - height of block. - * @param {boolean} collisionOnly - Whethor or not ONLY return tiles which will collide (its allowCollisions value is not Collision.NONE). - */ - getTempBlock: function (x, y, width, height, collisionOnly) { - - if (typeof collisionOnly === "undefined") { collisionOnly = false; } - - if (x < 0) - { - x = 0; - } - - if (y < 0) - { - y = 0; - } - - if (width > this.widthInTiles) - { - width = this.widthInTiles; - } - - if (height > this.heightInTiles) - { - height = this.heightInTiles; - } - - this._tempTileBlock = []; - - for (var ty = y; ty < y + height; ty++) - { - for (var tx = x; tx < x + width; tx++) - { - if (collisionOnly) - { - // We only want to consider the tile for checking if you can actually collide with it - if (this.mapData[ty] && this.mapData[ty][tx] && this.parent.tiles[this.mapData[ty][tx]].collideNone == false) - { - this._tempTileBlock.push({ - x: tx, - y: ty, - tile: this.parent.tiles[this.mapData[ty][tx]] - }); - } - } - else - { - if (this.mapData[ty] && this.mapData[ty][tx]) - { - this._tempTileBlock.push({ - x: tx, - y: ty, - tile: this.parent.tiles[this.mapData[ty][tx]] - }); - } - } - } - } - }, - - /** - * Get the tile index of specific position (in tiles). - * @method getTileIndex - * @param {number} x - X position of the tile. - * @param {number} y - Y position of the tile. - * @return {number} Index of the tile at that position. Return null if there isn't a tile there. - */ - getTileIndex: function (x, y) { - - if (y >= 0 && y < this.mapData.length) - { - if (x >= 0 && x < this.mapData[y].length) - { - return this.mapData[y][x]; - } - } - - return null; - - }, - - /** - * Add a column of tiles into the layer. - * @method addColumn - * @param {string[]|number[]} column - An array of tile indexes to be added. - */ - addColumn: function (column) { - - var data = []; - - for (var c = 0; c < column.length; c++) - { - data[c] = parseInt(column[c]); - } - - if (this.widthInTiles == 0) - { - this.widthInTiles = data.length; - this.widthInPixels = this.widthInTiles * this.tileWidth; - } - - this.mapData.push(data); - - this.heightInTiles++; - this.heightInPixels += this.tileHeight; - - }, - - /** - * Description. - * @method createCanvas - */ - createCanvas: function () { - - var width = this.game.width; - var height = this.game.height; - - if (this.widthInPixels < width) - { - width = this.widthInPixels; - } - - if (this.heightInPixels < height) - { - height = this.heightInPixels; - } - - this.canvas = Phaser.Canvas.create(width, height); - this.context = this.canvas.getContext('2d'); - - this.baseTexture = new PIXI.BaseTexture(this.canvas); - this.texture = new PIXI.Texture(this.baseTexture); - this.sprite = new PIXI.Sprite(this.texture); - - this.parent.addChild(this.sprite); - - }, - - createQuadTree: function (width, height) { - - this.quadTree = new Phaser.QuadTree(this, 0, 0, width, height, 20, 4); - - }, - - /** - * Update boundsInTiles with widthInTiles and heightInTiles. - * @method updateBounds - */ - updateBounds: function () { - - this.boundsInTiles.setTo(0, 0, this.widthInTiles, this.heightInTiles); - - }, - - /** - * Parse tile offsets from map data. - * Basically this creates a large array of objects that contain the x/y coordinates to grab each tile from - * for the entire map. Yes we could calculate this at run-time by using the tile index and some math, but we're - * trading a quite small bit of memory here to not have to process that in our main render loop. - * @method parseTileOffsets - * @return {number} Length of tileOffsets array. - */ - parseTileOffsets: function () { - - this.tileOffsets = []; - - var i = 0; - - if (this.mapFormat == Phaser.Tilemap.JSON) - { - // For some reason Tiled counts from 1 not 0 - this.tileOffsets[0] = null; - i = 1; - } - - for (var ty = this.tileMargin; ty < this.tileset.height; ty += (this.tileHeight + this.tileSpacing)) - { - for (var tx = this.tileMargin; tx < this.tileset.width; tx += (this.tileWidth + this.tileSpacing)) - { - this.tileOffsets[i] = { - x: tx, - y: ty - }; - i++; - } - } - - return this.tileOffsets.length; - - } - -}; - -/** -* Get -* @return {Description} -*//** -* Set -* @param {Description} value - Description. -*/ -Object.defineProperty(Phaser.TilemapLayer.prototype, 'alpha', { - - get: function() { - return this._alpha; - }, - - set: function(value) { - - if (this.sprite) - { - this.sprite.alpha = value; - } - - this._alpha = value; - } - -}); diff --git a/src/tilemap_old/TilemapRenderer.js b/src/tilemap_old/TilemapRenderer.js deleted file mode 100644 index b37dfbc4..00000000 --- a/src/tilemap_old/TilemapRenderer.js +++ /dev/null @@ -1,239 +0,0 @@ -/** -* @author Richard Davey -* @copyright 2013 Photon Storm Ltd. -* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License -* @module Phaser.TilemapRenderer -*/ - -/** -* Tilemap renderer. -* -* @class Phaser.TilemapRenderer -* @constructor -* @param {Phaser.Game} game - A reference to the currently running game. -*/ -Phaser.TilemapRenderer = function (game) { - - /** - * @property {Phaser.Game} game - A reference to the currently running game. - */ - this.game = game; - - /** - * @property {number} _ga - Local rendering related temp vars to help avoid gc spikes through constant var creation. - * @private - * @default - */ - this._ga = 1; - - /** - * @property {number} _dx - Description. - * @private - * @default - */ - this._dx = 0; - - /** - * @property {number} _dy - Description. - * @private - * @default - */ - this._dy = 0; - - /** - * @property {number} _dw - Description. - * @private - * @default - */ - this._dw = 0; - - /** - * @property {number} _dh - Description. - * @private - * @default - */ - this._dh = 0; - - /** - * @property {number} _tx - Description. - * @private - * @default - */ - this._tx = 0; - - /** - * @property {number} _ty - Description. - * @private - * @default - */ - this._ty = 0; - - /** - * @property {number} _tl - Description. - * @private - * @default - */ - this._tl = 0; - - /** - * @property {number} _maxX - Description. - * @private - * @default - */ - this._maxX = 0; - - /** - * @property {number} _maxY - Description. - * @private - * @default - */ - this._maxY = 0; - - /** - * @property {number} _startX - Description. - * @private - * @default - */ - this._startX = 0; - - /** - * @property {number} _startY - Description. - * @private - * @default - */ - this._startY = 0; - -}; - -Phaser.TilemapRenderer.prototype = { - - /** - * Render a tilemap to a canvas. - * @method render - * @param tilemap {Tilemap} The tilemap data to render. - * @return {boolean} Description. - */ - render: function (tilemap) { - - // Loop through the layers - this._tl = tilemap.layers.length; - - for (var i = 0; i < this._tl; i++) - { - if (tilemap.layers[i].visible == false || tilemap.layers[i].alpha < 0.1) - { - continue; - } - - var layer = tilemap.layers[i]; - - // Work out how many tiles we can fit into our canvas and round it up for the edges - this._maxX = this.game.math.ceil(layer.canvas.width / layer.tileWidth) + 1; - this._maxY = this.game.math.ceil(layer.canvas.height / layer.tileHeight) + 1; - - // And now work out where in the tilemap the camera actually is - this._startX = this.game.math.floor(this.game.camera.x / layer.tileWidth); - this._startY = this.game.math.floor(this.game.camera.y / layer.tileHeight); - - // Tilemap bounds check - if (this._startX < 0) - { - this._startX = 0; - } - - if (this._startY < 0) - { - this._startY = 0; - } - - if (this._maxX > layer.widthInTiles) - { - this._maxX = layer.widthInTiles; - } - - if (this._maxY > layer.heightInTiles) - { - this._maxY = layer.heightInTiles; - } - - if (this._startX + this._maxX > layer.widthInTiles) - { - this._startX = layer.widthInTiles - this._maxX; - } - - if (this._startY + this._maxY > layer.heightInTiles) - { - this._startY = layer.heightInTiles - this._maxY; - } - - // Finally get the offset to avoid the blocky movement - this._dx = -(this.game.camera.x - (this._startX * layer.tileWidth)); - this._dy = -(this.game.camera.y - (this._startY * layer.tileHeight)); - - this._tx = this._dx; - this._ty = this._dy; - - // Alpha - if (layer.alpha !== 1) - { - this._ga = layer.context.globalAlpha; - layer.context.globalAlpha = layer.alpha; - } - - layer.context.clearRect(0, 0, layer.canvas.width, layer.canvas.height); - - for (var row = this._startY; row < this._startY + this._maxY; row++) - { - this._columnData = layer.mapData[row]; - - for (var tile = this._startX; tile < this._startX + this._maxX; tile++) - { - if (layer.tileOffsets[this._columnData[tile]]) - { - layer.context.drawImage( - layer.tileset, - layer.tileOffsets[this._columnData[tile]].x, - layer.tileOffsets[this._columnData[tile]].y, - layer.tileWidth, - layer.tileHeight, - this._tx, - this._ty, - layer.tileWidth, - layer.tileHeight - ); - - if (tilemap.tiles[this._columnData[tile]].collideNone == false) - { - layer.context.fillStyle = 'rgba(255,255,0,0.5)'; - layer.context.fillRect(this._tx, this._ty, layer.tileWidth, layer.tileHeight); - } - } - - - this._tx += layer.tileWidth; - - } - - this._tx = this._dx; - this._ty += layer.tileHeight; - - } - - if (this._ga > -1) - { - layer.context.globalAlpha = this._ga; - } - - // Only needed if running in WebGL, otherwise this array will never get cleared down I don't think! - if (this.game.renderType == Phaser.WEBGL) - { - PIXI.texturesToUpdate.push(layer.baseTexture); - } - - } - - return true; - - } - -}; \ No newline at end of file From f63e8d7d06ea5b9d1bbd0e5a29a033661fa253c6 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 25 Oct 2013 18:00:25 +0100 Subject: [PATCH 122/125] Basic examples created --- examples/games/starstruck.js | 45 ++++++++---------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/examples/games/starstruck.js b/examples/games/starstruck.js index 300f2768..1b23d052 100644 --- a/examples/games/starstruck.js +++ b/examples/games/starstruck.js @@ -1,5 +1,5 @@ -var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create,update:update}); function preload() { @@ -28,25 +28,23 @@ function create() { bg = game.add.tileSprite(0, 0, 800, 600, 'background'); bg.fixedToCamera = true; - map = new Phaser.Tilemap(game, 'level1'); + map = game.add.tilemap('level1'); - tileset = game.cache.getTileset('tiles'); + tileset = game.add.tileset('tiles'); tileset.setCollisionRange(0, tileset.total - 1, true, true, true, true); - tileset.setCollisionRange(12, 17, false, false, false, false); - tileset.setCollisionRange(46, 51, false, false, false, false); + // tileset.setCollisionRange(12, 16, false, false, false, false); + // tileset.setCollisionRange(46, 50, false, false, false, false); - layer = new Phaser.TilemapLayer(game, 0, 0, 800, 600, tileset, map, 0); + layer = game.add.tilemapLayer(0, 0, 800, 600, tileset, map, 0); layer.resizeWorld(); - game.world.add(layer.sprite); - player = game.add.sprite(32, 32, 'dude'); player.body.bounce.y = 0.2; player.body.collideWorldBounds = true; player.body.gravity.y = 6; - player.body.setSize(16, 32, 8, 16); + // player.body.setSize(16, 32, 8, 16); player.animations.add('left', [0, 1, 2, 3], 10, true); player.animations.add('turn', [4], 20, true); @@ -54,28 +52,16 @@ function create() { game.camera.follow(player); + + } function update() { - layer.update(); - // getTiles: function (x, y, width, height, collides, layer) { - overlap = layer.getTiles(player.body.x, player.body.y, player.body.width, player.body.height, true); - - if (overlap.length > 1) - { - for (var i = 1; i < overlap.length; i++) - { - game.physics.separateTile(player.body, overlap[i]); - } - } - - // game.physics.collide(player, map); + game.physics.collide(player, layer); player.body.velocity.x = 0; - // player.body.velocity.y = 0; - // player.body.acceleration.y = 500; if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { @@ -126,14 +112,3 @@ function update() { } } - -function render() { - - layer.render(); - - // game.debug.renderSpriteBody(player); - - // game.debug.renderSpriteInfo(player, 32, 32); - // game.debug.renderSpriteCollision(player, 32, 320); - -} From 8dfe5aee1c88a53cc2517a7d147424c7d3645f2a Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 25 Oct 2013 18:10:03 +0100 Subject: [PATCH 123/125] Second commit, all the basic examples added, and wip files moved --- examples/_site/examples.json | 44 +++++++++---------- examples/basics/02 - click on an image.js | 33 ++++++++++++++ examples/basics/03 - move an image.js | 24 ++++++++++ examples/basics/04 - image follow input.js | 35 +++++++++++++++ .../05 - load an animation.js} | 2 +- examples/basics/06 - render text.js | 11 +++++ examples/text/hello arial.js | 3 +- examples/{tilemaps => wip}/wip1.js | 0 examples/{tilemaps => wip}/wip2.js | 0 examples/{tilemaps => wip}/wip3.js | 0 examples/{tilemaps => wip}/wip4.js | 0 11 files changed, 125 insertions(+), 27 deletions(-) create mode 100644 examples/basics/02 - click on an image.js create mode 100644 examples/basics/03 - move an image.js create mode 100644 examples/basics/04 - image follow input.js rename examples/{animation/texture packer json hash.js => basics/05 - load an animation.js} (85%) create mode 100644 examples/basics/06 - render text.js rename examples/{tilemaps => wip}/wip1.js (100%) rename examples/{tilemaps => wip}/wip2.js (100%) rename examples/{tilemaps => wip}/wip3.js (100%) rename examples/{tilemaps => wip}/wip4.js (100%) diff --git a/examples/_site/examples.json b/examples/_site/examples.json index 88388bb0..19c6c41b 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -19,10 +19,6 @@ { "file": "sprite+sheet.js", "title": "sprite sheet" - }, - { - "file": "texture+packer+json+hash.js", - "title": "texture packer json hash" } ], "audio": [ @@ -43,6 +39,26 @@ { "file": "01+-+load+an+image.js", "title": "01 - load an image" + }, + { + "file": "02+-+click+on+an+image.js", + "title": "02 - click on an image" + }, + { + "file": "03+-+move+an+image.js", + "title": "03 - move an image" + }, + { + "file": "04+-+image+follow+input.js", + "title": "04 - image follow input" + }, + { + "file": "05+-+load+an+animation.js", + "title": "05 - load an animation" + }, + { + "file": "06+-+render+text.js", + "title": "06 - render text" } ], "buttons": [ @@ -504,10 +520,6 @@ "file": "bitmap+fonts.js", "title": "bitmap fonts" }, - { - "file": "hello+arial.js", - "title": "hello arial" - }, { "file": "kern+of+duty.js", "title": "kern of duty" @@ -575,22 +587,6 @@ { "file": "swap+tiles.js", "title": "swap tiles" - }, - { - "file": "wip1.js", - "title": "wip1" - }, - { - "file": "wip2.js", - "title": "wip2" - }, - { - "file": "wip3.js", - "title": "wip3" - }, - { - "file": "wip4.js", - "title": "wip4" } ], "tweens": [ diff --git a/examples/basics/02 - click on an image.js b/examples/basics/02 - click on an image.js new file mode 100644 index 00000000..56c8a0b5 --- /dev/null +++ b/examples/basics/02 - click on an image.js @@ -0,0 +1,33 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + // You can fill the preloader with as many assets as your game requires + + // Here we are loading an image. The first parameter is the unique + // string by which we'll identify the image later in our code. + + // The second parameter is the URL of the image (relative) + game.load.image('einstein', 'assets/pics/ra_einstein.png'); +} + +function create() { + + // This creates a simple sprite that is using our loaded image and + // displays it on-screen + // and assign it to a variable + var image = game.add.sprite(0, 0, 'einstein'); + + //enables all kind of input actions on this image (click, etc) + image.inputEnabled=true; + + image.events.onInputDown.add(listener,this); + + + +} + +function listener () { + alert('clicked'); +} diff --git a/examples/basics/03 - move an image.js b/examples/basics/03 - move an image.js new file mode 100644 index 00000000..0cdd9320 --- /dev/null +++ b/examples/basics/03 - move an image.js @@ -0,0 +1,24 @@ + +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); + +function preload() { + + // You can fill the preloader with as many assets as your game requires + + // Here we are loading an image. The first parameter is the unique + // string by which we'll identify the image later in our code. + + // The second parameter is the URL of the image (relative) + game.load.image('einstein', 'assets/pics/ra_einstein.png'); +} + +function create() { + + // This creates a simple sprite that is using our loaded image and + // displays it on-screen + // and assign it to a variable + var image = game.add.sprite(0, 0, 'einstein'); + + image.body.velocity.x=50; + +} diff --git a/examples/basics/04 - image follow input.js b/examples/basics/04 - image follow input.js new file mode 100644 index 00000000..64af7d3b --- /dev/null +++ b/examples/basics/04 - image follow input.js @@ -0,0 +1,35 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create,update:update,render:render }); + +function preload() { + + // You can fill the preloader with as many assets as your game requires + + // Here we are loading an image. The first parameter is the unique + // string by which we'll identify the image later in our code. + + // The second parameter is the URL of the image (relative) + game.load.image('cactuar', 'assets/pics/cactuar.png'); +} + +var image; + +function create() { + + // This creates a simple sprite that is using our loaded image and + // displays it on-screen + // and assign it to a variable + image = game.add.sprite(0, 0, 'cactuar'); + +} + +function update () { + + //magic formula to make an object follow the mouse + game.physics.moveToPointer(image,300,game.input.activePointer); +} + +function render () { + //debug helper + game.debug.renderInputInfo(32,32); +} diff --git a/examples/animation/texture packer json hash.js b/examples/basics/05 - load an animation.js similarity index 85% rename from examples/animation/texture packer json hash.js rename to examples/basics/05 - load an animation.js index 64c5e456..fb4d24c7 100644 --- a/examples/animation/texture packer json hash.js +++ b/examples/basics/05 - load an animation.js @@ -1,5 +1,5 @@ -var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); +var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.atlasJSONHash('bot', 'assets/sprites/running_bot.png', 'assets/sprites/running_bot.json'); diff --git a/examples/basics/06 - render text.js b/examples/basics/06 - render text.js new file mode 100644 index 00000000..bc3e56f7 --- /dev/null +++ b/examples/basics/06 - render text.js @@ -0,0 +1,11 @@ + +var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create }); + +function create() { + + var text = "- phaser -\n with a sprinkle of \n pixi dust."; + var style = { font: "65px Arial", fill: "#ff0044", align: "center" }; + + var t = game.add.text(game.world.centerX-300, 0, text, style); + +} diff --git a/examples/text/hello arial.js b/examples/text/hello arial.js index bd6e9934..df40c8cb 100644 --- a/examples/text/hello arial.js +++ b/examples/text/hello arial.js @@ -1,4 +1,3 @@ - var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create }); function create() { @@ -10,4 +9,4 @@ function create() { t.anchor.setTo(0.5, 0.5); -} +} \ No newline at end of file diff --git a/examples/tilemaps/wip1.js b/examples/wip/wip1.js similarity index 100% rename from examples/tilemaps/wip1.js rename to examples/wip/wip1.js diff --git a/examples/tilemaps/wip2.js b/examples/wip/wip2.js similarity index 100% rename from examples/tilemaps/wip2.js rename to examples/wip/wip2.js diff --git a/examples/tilemaps/wip3.js b/examples/wip/wip3.js similarity index 100% rename from examples/tilemaps/wip3.js rename to examples/wip/wip3.js diff --git a/examples/tilemaps/wip4.js b/examples/wip/wip4.js similarity index 100% rename from examples/tilemaps/wip4.js rename to examples/wip/wip4.js From 34736fbde5e28ef72ec27069de985a36406e682e Mon Sep 17 00:00:00 2001 From: photonstorm Date: Fri, 25 Oct 2013 18:35:49 +0100 Subject: [PATCH 124/125] Final 1.1 release. Here goes nothing :) --- README.md | 2 +- build/phaser.js | 2117 ++++++++++++++++++++++----------- build/phaser.min.js | 11 +- examples/_site/examples.json | 4 + examples/_site/view_full.html | 2 +- examples/index.html | 2 +- 6 files changed, 1451 insertions(+), 687 deletions(-) diff --git a/README.md b/README.md index c403ab76..7f50bc05 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Version 1.1 What's New: -* JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file. +* JSDoc is go! We've added jsdoc3 blocks to every property and function, in every file and published the API docs to the docs folder. * Brand new Example system (no more php!) and over 150 examples to learn from too. * New TypeScript definitions file generated (in the build folder - thanks to TomTom1229 for manually enhancing this). * New Grunt based build system added (thanks to Florent Cailhol) diff --git a/build/phaser.js b/build/phaser.js index fe82308e..e8cf02ca 100644 --- a/build/phaser.js +++ b/build/phaser.js @@ -1,3 +1,12 @@ +!function(root, factory) { + if (typeof define === "function" && define.amd) { + define(factory); + } else if (typeof exports === "object") { + module.exports = factory(); + } else { + root.Phaser = factory(); + } +}(this, function() { /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. @@ -9,7 +18,7 @@ * * Phaser - http://www.phaser.io * -* v1.1.0 - Built at: Wed, 23 Oct 2013 13:05:12 +0100 +* v1.1.0 - Built at: Fri Oct 25 2013 18:25:28 * * By Richard Davey http://www.photonstorm.com @photonstorm * @@ -27,15 +36,7 @@ * "If you want them to be more intelligent, read them more fairy tales." * -- Albert Einstein */ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - define(factory); - } else if (typeof exports === 'object') { - module.exports = factory(); - } else { - root.Phaser = factory(); - } -}(this, function (b) { + /** * @author Mat Groves http://matgroves.com/ @Doormat23 */ @@ -54,10 +55,10 @@ var PIXI = PIXI || {}; /** * @namespace Phaser */ -var Phaser = Phaser || { +var Phaser = Phaser || { - VERSION: '1.1.0', - GAMES: [], + VERSION: '1.1.0', + GAMES: [], AUTO: 0, CANVAS: 1, WEBGL: 2, @@ -87,6 +88,7 @@ PIXI.InteractionManager = function (dummy) { // We don't need this in Pixi, so we've removed it to save space // however the Stage object expects a reference to it, so here is a dummy entry. }; + /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. @@ -9329,6 +9331,18 @@ Phaser.Stage = function (game, width, height) { */ this.aspectRatio = width / height; + /** + * @property {number} _nextOffsetCheck - The time to run the next offset check. + * @private + */ + this._nextOffsetCheck = 0; + + /** + * @property {number|false} checkOffsetInterval - The time (in ms) between which the stage should check to see if it has moved. + * @default + */ + this.checkOffsetInterval = 2500; + }; Phaser.Stage.prototype = { @@ -9361,6 +9375,24 @@ Phaser.Stage.prototype = { window.onblur = this._onChange; window.onfocus = this._onChange; + }, + + /** + * Runs Stage processes that need periodic updates, such as the offset checks. + * @method Phaser.Stage#update + */ + update: function () { + + if (this.checkOffsetInterval !== false) + { + if (this.game.time.now > this._nextOffsetCheck) + { + Phaser.Canvas.getOffset(this.canvas, this.offset); + this._nextOffsetCheck = this.game.time.now + this.checkOffsetInterval; + } + + } + }, /** @@ -9465,15 +9497,18 @@ Phaser.Group = function (game, parent, name, useStage) { if (parent instanceof Phaser.Group) { parent._container.addChild(this._container); + parent._container.updateTransform(); } else { parent.addChild(this._container); + parent.updateTransform(); } } else { this.game.stage._stage.addChild(this._container); + this.game.stage._stage.updateTransform(); } } @@ -9521,6 +9556,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + + child.updateTransform(); } return child; @@ -9548,6 +9585,8 @@ Phaser.Group.prototype = { } this._container.addChildAt(child, index); + + child.updateTransform(); } return child; @@ -9597,6 +9636,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + + child.updateTransform(); return child; @@ -9632,6 +9673,8 @@ Phaser.Group.prototype = { } this._container.addChild(child); + child.updateTransform(); + } }, @@ -9823,6 +9866,7 @@ Phaser.Group.prototype = { this._container.removeChild(oldChild); this._container.addChildAt(newChild, index); newChild.events.onAddedToGroup.dispatch(newChild, this); + newChild.updateTransform(); } }, @@ -10951,7 +10995,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant if (typeof transparent == 'undefined') { transparent = false; } if (typeof antialias == 'undefined') { antialias = true; } - + /** * @property {number} id - Phaser Game ID (for when Pixi supports multiple instances). */ @@ -11170,7 +11214,7 @@ Phaser.Game.prototype = { /** * Initialize engine sub modules and start the game. - * + * * @method Phaser.Game#boot * @protected */ @@ -11234,10 +11278,13 @@ Phaser.Game.prototype = { console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000'); } - if (Phaser.VERSION.substr(-5) == '-beta') - { - console.warn('You are using a beta version of Phaser. Some things may not work.'); - } + var pos = Phaser.VERSION.indexOf('-'); + var versionQualifier = (pos >= 0) ? Phaser.VERSION.substr(pos + 1) : null; + if (versionQualifier) + { + var article = ['a', 'e', 'i', 'o', 'u', 'y'].indexOf(versionQualifier.charAt(0)) >= 0 ? 'an' : 'a'; + console.warn('You are using %s %s version of Phaser. Some things may not work.', article, versionQualifier); + } this.isRunning = true; this._loadComplete = false; @@ -11248,10 +11295,10 @@ Phaser.Game.prototype = { } }, - + /** * Checks if the device is capable of using the requested renderer and sets it up or an alternative if not. - * + * * @method Phaser.Game#setUpRenderer * @protected */ @@ -11288,7 +11335,7 @@ Phaser.Game.prototype = { /** * Called when the load has finished, after preload was run. - * + * * @method Phaser.Game#loadComplete * @protected */ @@ -11302,7 +11349,7 @@ Phaser.Game.prototype = { /** * The core game loop. - * + * * @method Phaser.Game#update * @protected * @param {number} time - The current time as provided by RequestAnimationFrame. @@ -11316,6 +11363,7 @@ Phaser.Game.prototype = { this.plugins.preUpdate(); this.physics.preUpdate(); + this.stage.update(); this.input.update(); this.tweens.update(); this.sound.update(); @@ -11337,11 +11385,15 @@ Phaser.Game.prototype = { /** * Nuke the entire game from orbit - * + * * @method Phaser.Game#destroy */ destroy: function () { + this.raf.stop(); + + this.input.destroy(); + this.state.destroy(); this.state = null; @@ -11794,6 +11846,19 @@ Phaser.Input.prototype = { this.mspointer.start(); this.mousePointer.active = true; + }, + + /** + * Stops all of the Input Managers from running. + * @method Phaser.Input#destroy + */ + destroy: function () { + + this.mouse.stop(); + this.keyboard.stop(); + this.touch.stop(); + this.mspointer.stop(); + }, /** @@ -12080,28 +12145,6 @@ Phaser.Input.prototype = { return null; - }, - - /** - * Get the distance between two Pointer objects. - * @method Phaser.Input#getDistance - * @param {Pointer} pointer1 - * @param {Pointer} pointer2 - * @return {Description} Description. - */ - getDistance: function (pointer1, pointer2) { - // return Phaser.Vec2Utils.distance(pointer1.position, pointer2.position); - }, - - /** - * Get the angle between two Pointer objects. - * @method Phaser.Input#getAngle - * @param {Pointer} pointer1 - * @param {Pointer} pointer2 - * @return {Description} Description. - */ - getAngle: function (pointer1, pointer2) { - // return Phaser.Vec2Utils.angle(pointer1.position, pointer2.position); } }; @@ -13610,7 +13653,7 @@ Phaser.Pointer.prototype = { this.game.input.x = this.x * this.game.input.scale.x; this.game.input.y = this.y * this.game.input.scale.y; this.game.input.position.setTo(this.x, this.y); - this.game.input.onDown.dispatch(this); + this.game.input.onDown.dispatch(this, event); this.game.input.resetSpeed(this.x, this.y); } @@ -13835,7 +13878,7 @@ Phaser.Pointer.prototype = { if (this.game.input.multiInputOverride == Phaser.Input.MOUSE_OVERRIDES_TOUCH || this.game.input.multiInputOverride == Phaser.Input.MOUSE_TOUCH_COMBINE || (this.game.input.multiInputOverride == Phaser.Input.TOUCH_OVERRIDES_MOUSE && this.game.input.currentPointers == 0)) { - this.game.input.onUp.dispatch(this); + this.game.input.onUp.dispatch(this, event); // Was it a tap? if (this.duration >= 0 && this.duration <= this.game.input.tapRate) @@ -14659,10 +14702,13 @@ Phaser.InputHandler.prototype = { if (this.enabled) { + this.enabled = false; + + this.game.input.interactiveItems.remove(this); + this.stop(); - // Null everything + this.sprite = null; - // etc } }, @@ -14834,24 +14880,15 @@ Phaser.InputHandler.prototype = { { this.sprite.getLocalUnmodifiedPosition(this._tempPoint, pointer.x, pointer.y); - // Check against bounds first (move these to private vars) - var x1 = -(this.sprite.texture.frame.width) * this.sprite.anchor.x; - var y1; - - if (this._tempPoint.x > x1 && this._tempPoint.x < x1 + this.sprite.texture.frame.width) + if (this._tempPoint.x >= 0 && this._tempPoint.x <= this.sprite.currentFrame.width && this._tempPoint.y >= 0 && this._tempPoint.y <= this.sprite.currentFrame.height) { - y1 = -(this.sprite.texture.frame.height) * this.sprite.anchor.y; - - if (this._tempPoint.y > y1 && this._tempPoint.y < y1 + this.sprite.texture.frame.height) + if (this.pixelPerfect) { - if (this.pixelPerfect) - { - return this.checkPixel(this._tempPoint.x, this._tempPoint.y); - } - else - { - return true; - } + return this.checkPixel(this._tempPoint.x, this._tempPoint.y); + } + else + { + return true; } } } @@ -14869,16 +14906,16 @@ Phaser.InputHandler.prototype = { */ checkPixel: function (x, y) { - x += (this.sprite.texture.frame.width * this.sprite.anchor.x); - y += (this.sprite.texture.frame.height * this.sprite.anchor.y); - // Grab a pixel from our image into the hitCanvas and then test it - if (this.sprite.texture.baseTexture.source) { this.game.input.hitContext.clearRect(0, 0, 1, 1); // This will fail if the image is part of a texture atlas - need to modify the x/y values here + + x += this.sprite.texture.frame.x; + y += this.sprite.texture.frame.y; + this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source, x, y, 1, 1, 0, 0, 1, 1); var rgb = this.game.input.hitContext.getImageData(0, 0, 1, 1); @@ -14968,7 +15005,10 @@ Phaser.InputHandler.prototype = { this.game.stage.canvas.style.cursor = "default"; } - this.sprite.events.onInputOut.dispatch(this.sprite, pointer); + if (this.sprite && this.sprite.events) + { + this.sprite.events.onInputOut.dispatch(this.sprite, pointer); + } }, @@ -15408,7 +15448,6 @@ Phaser.InputHandler.prototype = { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Events */ @@ -15477,11 +15516,10 @@ Phaser.Events.prototype = { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.GameObjectFactory */ /** -* Description. +* The Game Object Factory is a quick way to create all of the different sorts of core objects that Phaser uses. * * @class Phaser.GameObjectFactory * @constructor @@ -15504,22 +15542,10 @@ Phaser.GameObjectFactory = function (game) { Phaser.GameObjectFactory.prototype = { /** - * @property {Phaser.Game} game - A reference to the currently running Game. - * @default - */ - game: null, - - /** - * @property {Phaser.World} world - A reference to the game world. - * @default - */ - world: null, - - /** - * Description. - * @method existing. - * @param {object} - Description. - * @return {boolean} Description. + * Adds an existing object to the game world. + * @method Phaser.GameObjectFactory#existing + * @param {*} object - An instance of Phaser.Sprite, Phaser.Button or any other display object.. + * @return {*} The child that was added to the Group. */ existing: function (object) { @@ -15530,12 +15556,12 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key. * - * @method sprite + * @method Phaser.GameObjectFactory#sprite * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. - * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture. + * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @returns {Description} Description. + * @returns {Phaser.Sprite} the newly created sprite object. */ sprite: function (x, y, key, frame) { @@ -15546,13 +15572,13 @@ Phaser.GameObjectFactory.prototype = { /** * Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent. * - * @method child + * @method Phaser.GameObjectFactory#child * @param {Phaser.Group} group - The Group to add this child to. * @param {number} x - X position of the new sprite. * @param {number} y - Y position of the new sprite. * @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture. * @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @returns {Description} Description. + * @returns {Phaser.Sprite} the newly created sprite object. */ child: function (group, x, y, key, frame) { @@ -15563,9 +15589,9 @@ Phaser.GameObjectFactory.prototype = { /** * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. * - * @method tween + * @method Phaser.GameObjectFactory#tween * @param {object} obj - Object the tween will be run on. - * @return {Description} Description. + * @return {Phaser.Tween} Description. */ tween: function (obj) { @@ -15574,12 +15600,12 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * - * @method group - * @param {Description} parent - Description. - * @param {Description} name - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#group + * @param {*} parent - The parent Group or DisplayObjectContainer that will hold this group, if any. + * @param {string} [name=group] - A name for this Group. Not used internally but useful for debugging. + * @return {Phaser.Group} The newly created group. */ group: function (parent, name) { @@ -15588,13 +15614,13 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new instance of the Sound class. * - * @method audio - * @param {Description} key - Description. - * @param {Description} volume - Description. - * @param {Description} loop - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#audio + * @param {string} key - The Game.cache key of the sound that this object will use. + * @param {number} volume - The volume at which the sound will be played. + * @param {boolean} loop - Whether or not the sound will loop. + * @return {Phaser.Sound} The newly created text object. */ audio: function (key, volume, loop) { @@ -15603,16 +15629,16 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new TileSprite. * - * @method tileSprite - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} width - Description. - * @param {Description} height - Description. - * @param {Description} key - Description. - * @param {Description} frame - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#tileSprite + * @param {number} x - X position of the new tileSprite. + * @param {number} y - Y position of the new tileSprite. + * @param {number} width - the width of the tilesprite. + * @param {number} height - the height of the tilesprite. + * @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @return {Phaser.TileSprite} The newly created tileSprite object. */ tileSprite: function (x, y, width, height, key, frame) { @@ -15621,13 +15647,14 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Text. * - * @method text - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} text - Description. - * @param {Description} style - Description. + * @method Phaser.GameObjectFactory#text + * @param {number} x - X position of the new text object. + * @param {number} y - Y position of the new text object. + * @param {string} text - The actual text that will be written. + * @param {object} style - The style object containing style attributes like font, font size , etc. + * @return {Phaser.Text} The newly created text object. */ text: function (x, y, text, style) { @@ -15636,17 +15663,18 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Button object. * - * @method button - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} callback - Description. - * @param {Description} callbackContext - Description. - * @param {Description} overFrame - Description. - * @param {Description} outFrame - Description. - * @param {Description} downFrame - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#button + * @param {number} [x] X position of the new button object. + * @param {number} [y] Y position of the new button object. + * @param {string} [key] The image key as defined in the Game.Cache to use as the texture for this button. + * @param {function} [callback] The function to call when this button is pressed + * @param {object} [callbackContext] The context in which the callback will be called (usually 'this') + * @param {string|number} [overFrame] This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. + * @param {string|number} [outFrame] This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. + * @param {string|number} [downFrame] This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. + * @return {Phaser.Button} The newly created button object. */ button: function (x, y, key, callback, callbackContext, overFrame, outFrame, downFrame) { @@ -15655,12 +15683,12 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Graphics object. * - * @method graphics - * @param {Description} x - Description. - * @param {Description} y - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#graphics + * @param {number} x - X position of the new graphics object. + * @param {number} y - Y position of the new graphics object. + * @return {Phaser.Graphics} The newly created graphics object. */ graphics: function (x, y) { @@ -15669,13 +15697,15 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Emitter is a lightweight particle emitter. It can be used for one-time explosions or for + * continuous effects like rain and fire. All it really does is launch Particle objects out + * at set intervals, and fixes their positions and velocities accorindgly. * - * @method emitter - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} maxParticles - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#emitter + * @param {number} [x=0] - The x coordinate within the Emitter that the particles are emitted from. + * @param {number} [y=0] - The y coordinate within the Emitter that the particles are emitted from. + * @param {number} [maxParticles=50] - The total number of particles in this emitter. + * @return {Phaser.Emitter} The newly created emitter object. */ emitter: function (x, y, maxParticles) { @@ -15684,14 +15714,14 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * * Create a new BitmapText. * - * @method bitmapText - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} text - Description. - * @param {Description} style - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#bitmapText + * @param {number} x - X position of the new bitmapText object. + * @param {number} y - Y position of the new bitmapText object. + * @param {string} text - The actual text that will be written. + * @param {object} style - The style object containing style attributes like font, font size , etc. + * @return {Phaser.BitmapText} The newly created bitmapText object. */ bitmapText: function (x, y, text, style) { @@ -15700,11 +15730,11 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Tilemap object. * - * @method tilemap - * @param {Description} key - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#tilemap + * @param {string} key - Asset key for the JSON file. + * @return {Phaser.Tilemap} The newly created tilemap object. */ tilemap: function (key) { @@ -15713,11 +15743,11 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * Creates a new Tileset object. * - * @method tilemap - * @param {Description} key - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#tileset + * @param {string} key - The image key as defined in the Game.Cache to use as the tileset. + * @return {Phaser.Tileset} The newly created tileset object. */ tileset: function (key) { @@ -15726,17 +15756,15 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. - * - * @method tileSprite - * @param {Description} x - Description. - * @param {Description} y - Description. - * @param {Description} width - Description. - * @param {Description} height - Description. - * @param {Description} key - Description. - * @param {Description} frame - Description. - * @return {Description} Description. - */ + * Creates a new Tilemap Layer object. + * + * @method Phaser.GameObjectFactory#tilemapLayer + * @param {number} x - X position of the new tilemapLayer. + * @param {number} y - Y position of the new tilemapLayer. + * @param {number} width - the width of the tilemapLayer. + * @param {number} height - the height of the tilemapLayer. + * @return {Phaser.TilemapLayer} The newly created tilemaplayer object. + */ tilemapLayer: function (x, y, width, height, tileset, tilemap, layer) { return this.world.add(new Phaser.TilemapLayer(this.game, x, y, width, height, tileset, tilemap, layer)); @@ -15744,13 +15772,13 @@ Phaser.GameObjectFactory.prototype = { }, /** - * Description. + * A dynamic initially blank canvas to which images can be drawn. * - * @method renderTexture - * @param {Description} key - Description. - * @param {Description} width - Description. - * @param {Description} height - Description. - * @return {Description} Description. + * @method Phaser.GameObjectFactory#renderTexture + * @param {string} key - Asset key for the render texture. + * @param {number} width - the width of the render texture. + * @param {number} height - the height of the render texture. + * @return {Phaser.RenderTexture} The newly created renderTexture object. */ renderTexture: function (key, width, height) { @@ -15760,26 +15788,28 @@ Phaser.GameObjectFactory.prototype = { return texture; - }, + } }; /** * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Sprite */ /** -* Create a new Sprite. +* Create a new `Sprite` object. Sprites are the lifeblood of your game, used for nearly everything visual. +* At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. +* They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), +* events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases. +* * @class Phaser.Sprite -* @classdesc Description of class. * @constructor -* @param {Phaser.Game} game - Current game instance. -* @param {Description} x - Description. -* @param {Description} y - Description. -* @param {string} key - Description. -* @param {Description} frame - Description. +* @param {Phaser.Game} game - A reference to the currently running game. +* @param {number} x - The x coordinate (in world space) to position the Sprite at. +* @param {number} y - The y coordinate (in world space) to position the Sprite at. +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ Phaser.Sprite = function (game, x, y, key, frame) { @@ -15806,8 +15836,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.alive = true; /** - * @property {Description} group - Description. - * @default + * @property {Phaser.Group} group - The parent Group of this Sprite. This is usually set after Sprite instantiation by the parent. */ this.group = null; @@ -15818,12 +15847,13 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.name = ''; /** - * @property {Description} type - Description. + * @property {number} type - The const type of this object. + * @default */ this.type = Phaser.SPRITE; /** - * @property {number} renderOrderID - Description. + * @property {number} renderOrderID - Used by the Renderer and Input Manager to control picking order. * @default */ this.renderOrderID = -1; @@ -15831,18 +15861,18 @@ Phaser.Sprite = function (game, x, y, key, frame) { /** * If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc. * The lifespan is decremented by game.time.elapsed each update, once it reaches zero the kill() function is called. - * @property {number} lifespan + * @property {number} lifespan - The lifespan of the Sprite (in ms) before it will be killed. * @default */ this.lifespan = 0; /** - * @property {Events} events - The Signals you can subscribe to that are dispatched when certain things happen on this Sprite or its components + * @property {Events} events - The Events you can subscribe to that are dispatched when certain things happen on this Sprite or its components. */ this.events = new Phaser.Events(this); /** - * @property {Phaser.AnimationManager} animations - This manages animations of the sprite. You can modify animations through it. (see Phaser.AnimationManager) + * @property {Phaser.AnimationManager} animations - This manages animations of the sprite. You can modify animations through it (see Phaser.AnimationManager) */ this.animations = new Phaser.AnimationManager(this); @@ -15852,10 +15882,15 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.input = new Phaser.InputHandler(this); /** - * @property {Description} key - Description. + * @property {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. */ this.key = key; + /** + * @property {Phaser.Frame} currentFrame - A reference to the currently displayed frame. + */ + this.currentFrame = null; + if (key instanceof Phaser.RenderTexture) { PIXI.Sprite.call(this, key); @@ -15873,6 +15908,7 @@ Phaser.Sprite = function (game, x, y, key, frame) { if (key == null || this.game.cache.checkImageKey(key) == false) { key = '__default'; + this.key = key; } PIXI.Sprite.call(this, PIXI.TextureCache[key]); @@ -15905,59 +15941,37 @@ Phaser.Sprite = function (game, x, y, key, frame) { * Setting than anchor to 0.5,0.5 means the textures origin is centered * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right * - * @property {Phaser.Point} anchor + * @property {Phaser.Point} anchor - The anchor around with Sprite rotation and scaling takes place. */ this.anchor = new Phaser.Point(); /** - * @property {Description} _cropUUID - Description. - * @private - * @default - */ - this._cropUUID = null; - - /** - * @property {Description} _cropUUID - Description. - * @private - * @default - */ - this._cropRect = null; - - /** - * @property {number} x - Description. + * @property {number} x - The x coordinate (in world space) of this Sprite. */ this.x = x; /** - * @property {number} y - Description. + * @property {number} y - The y coordinate (in world space) of this Sprite. */ this.y = y; - /** - * @property {Description} position - Description. - */ this.position.x = x; this.position.y = y; /** * Should this Sprite be automatically culled if out of range of the camera? - * A culled sprite has its visible property set to 'false'. - * Note that this check doesn't look at this Sprites children, which may still be in camera range. - * So you should set autoCull to false if the Sprite will have children likely to still be in camera range. + * A culled sprite has its renderable property set to 'false'. * - * @property {boolean} autoCull + * @property {boolean} autoCull - A flag indicating if the Sprite should be automatically camera culled or not. * @default */ this.autoCull = false; /** - * @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one. + * @property {Phaser.Point} scale - The scale of the Sprite when rendered. By default it's set to 1 (no scale). You can modify it via scale.x or scale.y or scale.setTo(x, y). A value of 1 means no change to the scale, 0.5 means "half the size", 2 means "twice the size", etc. */ this.scale = new Phaser.Point(1, 1); - // console.log(this.worldTransform); - // this.worldTransform = []; - /** * @property {Phaser.Point} _cache - A mini cache for storing all of the calculated values. * @private @@ -15981,59 +15995,72 @@ Phaser.Sprite = function (game, x, y, key, frame) { // The actual scale values based on the worldTransform scaleX: 1, scaleY: 1, + // cache scale check + realScaleX: 1, realScaleY: 1, + // The width/height of the image, based on the un-modified frame size multiplied by the final calculated scale size width: this.currentFrame.sourceSizeW, height: this.currentFrame.sourceSizeH, // The actual width/height of the image if from a trimmed atlas, multiplied by the final calculated scale size halfWidth: Math.floor(this.currentFrame.sourceSizeW / 2), halfHeight: Math.floor(this.currentFrame.sourceSizeH / 2), + // The width/height of the image, based on the un-modified frame size multiplied by the final calculated scale size + calcWidth: -1, calcHeight: -1, + // The current frame details - frameID: this.currentFrame.uuid, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height, + // frameID: this.currentFrame.uuid, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height, + frameID: -1, frameWidth: this.currentFrame.width, frameHeight: this.currentFrame.height, boundsX: 0, boundsY: 0, // If this sprite visible to the camera (regardless of being set to visible or not) - cameraVisible: true + cameraVisible: true, + + // Crop cache + cropX: 0, cropY: 0, cropWidth: this.currentFrame.sourceSizeW, cropHeight: this.currentFrame.sourceSizeH }; /** - * @property {Phaser.Point} offset - Corner point defaults. + * @property {Phaser.Point} offset - Corner point defaults. Should not typically be modified. */ this.offset = new Phaser.Point; /** - * @property {Phaser.Point} center - Description. + * @property {Phaser.Point} center - A Point containing the center coordinate of the Sprite. Takes rotation and scale into account. */ this.center = new Phaser.Point(x + Math.floor(this._cache.width / 2), y + Math.floor(this._cache.height / 2)); /** - * @property {Phaser.Point} topLeft - Description. + * @property {Phaser.Point} topLeft - A Point containing the top left coordinate of the Sprite. Takes rotation and scale into account. */ this.topLeft = new Phaser.Point(x, y); /** - * @property {Phaser.Point} topRight - Description. + * @property {Phaser.Point} topRight - A Point containing the top right coordinate of the Sprite. Takes rotation and scale into account. */ this.topRight = new Phaser.Point(x + this._cache.width, y); /** - * @property {Phaser.Point} bottomRight - Description. + * @property {Phaser.Point} bottomRight - A Point containing the bottom right coordinate of the Sprite. Takes rotation and scale into account. */ this.bottomRight = new Phaser.Point(x + this._cache.width, y + this._cache.height); /** - * @property {Phaser.Point} bottomLeft - Description. + * @property {Phaser.Point} bottomLeft - A Point containing the bottom left coordinate of the Sprite. Takes rotation and scale into account. */ this.bottomLeft = new Phaser.Point(x, y + this._cache.height); /** - * @property {Phaser.Rectangle} bounds - Description. + * This Rectangle object fully encompasses the Sprite and is updated in real-time. + * The bounds is the full bounding area after rotation and scale have been taken into account. It should not be modified directly. + * It's used for Camera culling and physics body alignment. + * @property {Phaser.Rectangle} bounds */ this.bounds = new Phaser.Rectangle(x, y, this._cache.width, this._cache.height); /** - * @property {Phaser.Physics.Arcade.Body} body - Set-up the physics body. + * @property {Phaser.Physics.Arcade.Body} body - By default Sprites have a Phaser.Physics Body attached to them. You can operate physics actions via this property, or null it to skip all physics updates. */ this.body = new Phaser.Physics.Arcade.Body(this); @@ -16043,24 +16070,24 @@ Phaser.Sprite = function (game, x, y, key, frame) { this.health = 1; /** - * @property {Description} inWorld - World bounds check. + * @property {boolean} inWorld - This value is set to true if the Sprite is positioned within the World, otherwise false. */ this.inWorld = Phaser.Rectangle.intersects(this.bounds, this.game.world.bounds); /** - * @property {number} inWorldThreshold - World bounds check. + * @property {number} inWorldThreshold - A threshold value applied to the inWorld check. If you don't want a Sprite to be considered "out of the world" until at least 100px away for example then set it to 100. * @default */ this.inWorldThreshold = 0; /** - * @property {boolean} outOfBoundsKill - Kills this sprite as soon as it goes outside of the World bounds. + * @property {boolean} outOfBoundsKill - If true the Sprite is killed as soon as Sprite.inWorld is false. * @default */ this.outOfBoundsKill = false; /** - * @property {boolean} _outOfBoundsFired - Description. + * @property {boolean} _outOfBoundsFired - Internal flag. * @private * @default */ @@ -16073,6 +16100,20 @@ Phaser.Sprite = function (game, x, y, key, frame) { */ this.fixedToCamera = false; + /** + * You can crop the Sprites texture by modifying the crop properties. For example crop.width = 50 would set the Sprite to only render 50px wide. + * The crop is only applied if you have set Sprite.cropEnabled to true. + * @property {Phaser.Rectangle} crop - The crop Rectangle applied to the Sprite texture before rendering. + * @default + */ + this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); + + /** + * @property {boolean} cropEnabled - If true the Sprite.crop property is used to crop the texture before render. Set to false to disable. + * @default + */ + this.cropEnabled = false; + }; // Needed to keep the PIXI.Sprite constructor in the prototype chain (as the core pixi renderer uses an instanceof check sadly) @@ -16080,8 +16121,10 @@ Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype); Phaser.Sprite.prototype.constructor = Phaser.Sprite; /** -* Automatically called by World.preUpdate. You can create your own update in Objects that extend Phaser.Sprite. -* @method Phaser.Sprite.prototype.preUpdate +* Automatically called by World.preUpdate. Handles cache updates, lifespan checks, animation updates and physics updates. +* +* @method Phaser.Sprite#preUpdate +* @memberof Phaser.Sprite */ Phaser.Sprite.prototype.preUpdate = function() { @@ -16120,9 +16163,16 @@ Phaser.Sprite.prototype.preUpdate = function() { this.updateCache(); this.updateAnimation(); + if (this.cropEnabled) + { + this.updateCrop(); + } + // Re-run the camera visibility check if (this._cache.dirty) { + this.updateBounds(); + this._cache.cameraVisible = Phaser.Rectangle.intersects(this.game.world.camera.screenView, this.bounds, 0); if (this.autoCull == true) @@ -16145,6 +16195,12 @@ Phaser.Sprite.prototype.preUpdate = function() { } +/** +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateCache +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.updateCache = function() { // |a c tx| @@ -16179,6 +16235,12 @@ Phaser.Sprite.prototype.updateCache = function() { } +/** +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateAnimation +* @memberof Phaser.Sprite +*/ Phaser.Sprite.prototype.updateAnimation = function() { if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID) @@ -16191,244 +16253,41 @@ Phaser.Sprite.prototype.updateAnimation = function() { if (this._cache.dirty && this.currentFrame) { - this._cache.width = Math.floor(this.currentFrame.sourceSizeW * this._cache.scaleX); - this._cache.height = Math.floor(this.currentFrame.sourceSizeH * this._cache.scaleY); + this._cache.width = this.currentFrame.width; + this._cache.height = this.currentFrame.height; this._cache.halfWidth = Math.floor(this._cache.width / 2); this._cache.halfHeight = Math.floor(this._cache.height / 2); this._cache.id = 1 / (this._cache.a00 * this._cache.a11 + this._cache.a01 * -this._cache.a10); this._cache.idi = 1 / (this._cache.a00 * this._cache.a11 + this._cache.i01 * -this._cache.i10); - - this.updateBounds(); - } - -} - -Phaser.Sprite.prototype.postUpdate = function() { - - if (this.exists) - { - // The sprite is positioned in this call, after taking into consideration motion updates and collision - if (this.body) - { - this.body.postUpdate(); - } - - if (this.fixedToCamera) - { - this._cache.x = this.game.camera.view.x + this.x; - this._cache.y = this.game.camera.view.y + this.y; - } - else - { - this._cache.x = this.x; - this._cache.y = this.y; - } - - if (this.position.x != this._cache.x || this.position.y != this._cache.y) - { - this.position.x = this._cache.x; - this.position.y = this._cache.y; - } - } - -} - -Phaser.Sprite.prototype.loadTexture = function (key, frame) { - - this.key = key; - - if (key instanceof Phaser.RenderTexture) - { - this.currentFrame = this.game.cache.getTextureFrame(key.name); - } - else - { - if (key == null || this.game.cache.checkImageKey(key) == false) - { - key = '__default'; - } - - if (this.game.cache.isSpriteSheet(key)) - { - this.animations.loadFrameData(this.game.cache.getFrameData(key)); - - if (frame !== null) - { - if (typeof frame === 'string') - { - this.frameName = frame; - } - else - { - this.frame = frame; - } - } - } - else - { - this.currentFrame = this.game.cache.getFrame(key); - } - } - - this.updateAnimation(); - -} - -Phaser.Sprite.prototype.deltaAbsX = function () { - return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); -} - -Phaser.Sprite.prototype.deltaAbsY = function () { - return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); -} - -Phaser.Sprite.prototype.deltaX = function () { - return this.x - this.prevX; -} - -Phaser.Sprite.prototype.deltaY = function () { - return this.y - this.prevY; -} - -/** -* Moves the sprite so its center is located on the given x and y coordinates. -* Doesn't change the origin of the sprite. -* -* @method Phaser.Sprite.prototype.centerOn -* @param {number} x - Description. -* @param {number} y - Description. -*/ -Phaser.Sprite.prototype.centerOn = function(x, y) { - - this.x = x + (this.x - this.center.x); - this.y = y + (this.y - this.center.y); - -} - -/** -* Description. -* -* @method Phaser.Sprite.prototype.revive -*/ -Phaser.Sprite.prototype.revive = function(health) { - - if (typeof health === 'undefined') { health = 1; } - - this.alive = true; - this.exists = true; - this.visible = true; - this.health = health; - - this.events.onRevived.dispatch(this); - -} - -/** -* Description. -* -* @method Phaser.Sprite.prototype.kill -*/ -Phaser.Sprite.prototype.kill = function() { - - this.alive = false; - this.exists = false; - this.visible = false; - - if (this.events) - { - this.events.onKilled.dispatch(this); } } /** -* Description. -* -* @method Phaser.Sprite.prototype.destroy -*/ -Phaser.Sprite.prototype.destroy = function() { - - if (this.group) - { - this.group.remove(this); - } - - this.input.destroy(); - this.events.destroy(); - this.animations.destroy(); - - this.alive = false; - this.exists = false; - this.visible = false; - - this.game = null; - -} - -/** -* Description. -* -* @method Phaser.Sprite.prototype.kill -*/ -Phaser.Sprite.prototype.damage = function(amount) { - - if (this.alive) - { - this.health -= amount; - - if (this.health < 0) - { - this.kill(); - } - } - -} - -/** -* Description. -* -* @method Phaser.Sprite.prototype.reset -*/ -Phaser.Sprite.prototype.reset = function(x, y, health) { - - if (typeof health === 'undefined') { health = 1; } - - this.x = x; - this.y = y; - this.position.x = this.x; - this.position.y = this.y; - this.alive = true; - this.exists = true; - this.visible = true; - this.renderable = true; - this._outOfBoundsFired = false; - - this.health = health; - - if (this.body) - { - this.body.reset(); - } - -} - -/** -* Description. -* -* @method Phaser.Sprite.prototype.updateBounds +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateBounds +* @memberof Phaser.Sprite */ Phaser.Sprite.prototype.updateBounds = function() { - // Update the edge points + var sx = 1; + var sy = 1; - this.offset.setTo(this._cache.a02 - (this.anchor.x * this._cache.width), this._cache.a12 - (this.anchor.y * this._cache.height)); + if (this.worldTransform[3] !== 0 || this.worldTransform[1] !== 0) + { + sx = this.scale.x; + sy = this.scale.y; + } - this.getLocalPosition(this.center, this.offset.x + this._cache.halfWidth, this.offset.y + this._cache.halfHeight); - this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y); - this.getLocalPosition(this.topRight, this.offset.x + this._cache.width, this.offset.y); - this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this._cache.height); - this.getLocalPosition(this.bottomRight, this.offset.x + this._cache.width, this.offset.y + this._cache.height); + this.offset.setTo(this._cache.a02 - (this.anchor.x * this.width), this._cache.a12 - (this.anchor.y * this.height)); + + this.getLocalPosition(this.center, this.offset.x + (this.width / 2), this.offset.y + (this.height / 2), sx, sy); + this.getLocalPosition(this.topLeft, this.offset.x, this.offset.y, sx, sy); + this.getLocalPosition(this.topRight, this.offset.x + this.width, this.offset.y, sx, sy); + this.getLocalPosition(this.bottomLeft, this.offset.x, this.offset.y + this.height, sx, sy); + this.getLocalPosition(this.bottomRight, this.offset.x + this.width, this.offset.y + this.height, sx, sy); this._cache.left = Phaser.Math.min(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x); this._cache.right = Phaser.Math.max(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x); @@ -16440,6 +16299,8 @@ Phaser.Sprite.prototype.updateBounds = function() { // This is the coordinate the Sprite was at when the last bounds was created this._cache.boundsX = this._cache.x; this._cache.boundsY = this._cache.y; + + this.updateFrame = true; if (this.inWorld == false) { @@ -16472,45 +16333,407 @@ Phaser.Sprite.prototype.updateBounds = function() { } /** -* Description. +* Gets the local position of a coordinate relative to the Sprite, factoring in rotation and scale. +* Mostly only used internally. * -* @method Phaser.Sprite.prototype.getLocalPosition -* @param {Description} p - Description. -* @param {number} x - Description. -* @param {number} y - Description. -* @return {Description} Description. +* @method Phaser.Sprite#getLocalPosition +* @memberof Phaser.Sprite +* @param {Phaser.Point} p - The Point object to store the results in. +* @param {number} x - x coordinate within the Sprite to translate. +* @param {number} y - x coordinate within the Sprite to translate. +* @param {number} sx - Scale factor to be applied. +* @param {number} sy - Scale factor to be applied. +* @return {Phaser.Point} The translated point. */ -Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) { +Phaser.Sprite.prototype.getLocalPosition = function(p, x, y, sx, sy) { - p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * this._cache.scaleX) + this._cache.a02; - p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * this._cache.scaleY) + this._cache.a12; + p.x = ((this._cache.a11 * this._cache.id * x + -this._cache.a01 * this._cache.id * y + (this._cache.a12 * this._cache.a01 - this._cache.a02 * this._cache.a11) * this._cache.id) * sx) + this._cache.a02; + p.y = ((this._cache.a00 * this._cache.id * y + -this._cache.a10 * this._cache.id * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.a10) * this._cache.id) * sy) + this._cache.a12; return p; } /** -* Description. +* Gets the local unmodified position of a coordinate relative to the Sprite, factoring in rotation and scale. +* Mostly only used internally by the Input Manager, but also useful for custom hit detection. * -* @method Phaser.Sprite.prototype.getLocalUnmodifiedPosition -* @param {Description} p - Description. -* @param {number} x - Description. -* @param {number} y - Description. -* @return {Description} Description. +* @method Phaser.Sprite#getLocalUnmodifiedPosition +* @memberof Phaser.Sprite +* @param {Phaser.Point} p - The Point object to store the results in. +* @param {number} x - x coordinate within the Sprite to translate. +* @param {number} y - x coordinate within the Sprite to translate. +* @return {Phaser.Point} The translated point. */ -Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, x, y) { +Phaser.Sprite.prototype.getLocalUnmodifiedPosition = function(p, gx, gy) { - p.x = this._cache.a11 * this._cache.idi * x + -this._cache.i01 * this._cache.idi * y + (this._cache.a12 * this._cache.i01 - this._cache.a02 * this._cache.a11) * this._cache.idi; - p.y = this._cache.a00 * this._cache.idi * y + -this._cache.i10 * this._cache.idi * x + (-this._cache.a12 * this._cache.a00 + this._cache.a02 * this._cache.i10) * this._cache.idi; + var a00 = this.worldTransform[0], a01 = this.worldTransform[1], a02 = this.worldTransform[2], + a10 = this.worldTransform[3], a11 = this.worldTransform[4], a12 = this.worldTransform[5], + id = 1 / (a00 * a11 + a01 * -a10), + x = a11 * id * gx + -a01 * id * gy + (a12 * a01 - a02 * a11) * id, + y = a00 * id * gy + -a10 * id * gx + (-a12 * a00 + a02 * a10) * id; + + p.x = x + (this.anchor.x * this._cache.width); + p.y = y + (this.anchor.y * this._cache.height); return p; } /** -* Description. +* Internal function called by preUpdate. +* +* @method Phaser.Sprite#updateCrop +* @memberof Phaser.Sprite +*/ +Phaser.Sprite.prototype.updateCrop = function() { + + // This only runs if crop is enabled + if (this.crop.width != this._cache.cropWidth || this.crop.height != this._cache.cropHeight || this.crop.x != this._cache.cropX || this.crop.y != this._cache.cropY) + { + this.crop.floorAll(); + + this._cache.cropX = this.crop.x; + this._cache.cropY = this.crop.y; + this._cache.cropWidth = this.crop.width; + this._cache.cropHeight = this.crop.height; + + this.texture.frame = this.crop; + this.texture.width = this.crop.width; + this.texture.height = this.crop.height; + + this.texture.updateFrame = true; + + PIXI.Texture.frameUpdates.push(this.texture); + } + +} + +/** +* Resets the Sprite.crop value back to the frame dimensions. +* +* @method Phaser.Sprite#resetCrop +* @memberof Phaser.Sprite +*/ +Phaser.Sprite.prototype.resetCrop = function() { + + this.crop = new Phaser.Rectangle(0, 0, this._cache.width, this._cache.height); + this.texture.setFrame(this.crop); + this.cropEnabled = false; + +} + +/** +* Internal function called by the World postUpdate cycle. +* +* @method Phaser.Sprite#postUpdate +* @memberof Phaser.Sprite +*/ +Phaser.Sprite.prototype.postUpdate = function() { + + if (this.exists) + { + // The sprite is positioned in this call, after taking into consideration motion updates and collision + if (this.body) + { + this.body.postUpdate(); + } + + if (this.fixedToCamera) + { + this._cache.x = this.game.camera.view.x + this.x; + this._cache.y = this.game.camera.view.y + this.y; + } + else + { + this._cache.x = this.x; + this._cache.y = this.y; + } + + if (this.position.x != this._cache.x || this.position.y != this._cache.y) + { + this.position.x = this._cache.x; + this.position.y = this._cache.y; + } + } + +} + +/** +* Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. +* This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game. +* +* @method Phaser.Sprite#loadTexture +* @memberof Phaser.Sprite +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. +*/ +Phaser.Sprite.prototype.loadTexture = function (key, frame) { + + this.key = key; + + if (key instanceof Phaser.RenderTexture) + { + this.currentFrame = this.game.cache.getTextureFrame(key.name); + } + else if (key instanceof PIXI.Texture) + { + this.currentFrame = frame; + } + else + { + if (typeof key === 'undefined' || this.game.cache.checkImageKey(key) === false) + { + key = '__default'; + this.key = key; + } + + if (this.game.cache.isSpriteSheet(key)) + { + this.animations.loadFrameData(this.game.cache.getFrameData(key)); + + if (typeof frame !== 'undefined') + { + if (typeof frame === 'string') + { + this.frameName = frame; + } + else + { + this.frame = frame; + } + } + } + else + { + this.currentFrame = this.game.cache.getFrame(key); + this.setTexture(PIXI.TextureCache[key]); + } + } + +} + +/** +* Returns the absolute delta x value. +* +* @method Phaser.Sprite#deltaAbsX +* @memberof Phaser.Sprite +* @return {number} The absolute delta value. +*/ +Phaser.Sprite.prototype.deltaAbsX = function () { + return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); +} + +/** +* Returns the absolute delta y value. +* +* @method Phaser.Sprite#deltaAbsY +* @memberof Phaser.Sprite +* @return {number} The absolute delta value. +*/ +Phaser.Sprite.prototype.deltaAbsY = function () { + return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); +} + +/** +* Returns the delta x value. +* +* @method Phaser.Sprite#deltaX +* @memberof Phaser.Sprite +* @return {number} The delta value. +*/ +Phaser.Sprite.prototype.deltaX = function () { + return this.x - this.prevX; +} + +/** +* Returns the delta y value. +* +* @method Phaser.Sprite#deltaY +* @memberof Phaser.Sprite +* @return {number} The delta value. +*/ +Phaser.Sprite.prototype.deltaY = function () { + return this.y - this.prevY; +} + +/** +* Moves the sprite so its center is located on the given x and y coordinates. +* Doesn't change the anchor point of the sprite. * -* @method Phaser.Sprite.prototype.bringToTop +* @method Phaser.Sprite#centerOn +* @memberof Phaser.Sprite +* @param {number} x - The x coordinate (in world space) to position the Sprite at. +* @param {number} y - The y coordinate (in world space) to position the Sprite at. +* @return (Phaser.Sprite) This instance. +*/ +Phaser.Sprite.prototype.centerOn = function(x, y) { + + this.x = x + (this.x - this.center.x); + this.y = y + (this.y - this.center.y); + return this; + +} + +/** +* Brings a 'dead' Sprite back to life, optionally giving it the health value specified. +* A resurrected Sprite has its alive, exists and visible properties all set to true. +* It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal. +* +* @method Phaser.Sprite#revive +* @memberof Phaser.Sprite +* @param {number} [health=1] - The health to give the Sprite. +* @return (Phaser.Sprite) This instance. +*/ +Phaser.Sprite.prototype.revive = function(health) { + + if (typeof health === 'undefined') { health = 1; } + + this.alive = true; + this.exists = true; + this.visible = true; + this.health = health; + + if (this.events) + { + this.events.onRevived.dispatch(this); + } + + return this; + +} + +/** +* Kills a Sprite. A killed Sprite has its alive, exists and visible properties all set to false. +* It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal. +* Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory. +* If you don't need this Sprite any more you should call Sprite.destroy instead. +* +* @method Phaser.Sprite#kill +* @memberof Phaser.Sprite +* @return (Phaser.Sprite) This instance. +*/ +Phaser.Sprite.prototype.kill = function() { + + this.alive = false; + this.exists = false; + this.visible = false; + + if (this.events) + { + this.events.onKilled.dispatch(this); + } + + return this; + +} + +/** +* Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present +* and nulls its reference to game, freeing it up for garbage collection. +* +* @method Phaser.Sprite#destroy +* @memberof Phaser.Sprite +*/ +Phaser.Sprite.prototype.destroy = function() { + + if (this.group) + { + this.group.remove(this); + } + + if (this.input) + { + this.input.destroy(); + } + + if (this.events) + { + this.events.destroy(); + } + + if (this.animations) + { + this.animations.destroy(); + } + + this.alive = false; + this.exists = false; + this.visible = false; + + this.game = null; + +} + +/** +* Damages the Sprite, this removes the given amount from the Sprites health property. +* If health is then taken below zero Sprite.kill is called. +* +* @method Phaser.Sprite#damage +* @memberof Phaser.Sprite +* @param {number} amount - The amount to subtract from the Sprite.health value. +* @return (Phaser.Sprite) This instance. +*/ +Phaser.Sprite.prototype.damage = function(amount) { + + if (this.alive) + { + this.health -= amount; + + if (this.health < 0) + { + this.kill(); + } + } + + return this; + +} + +/** +* Resets the Sprite. This places the Sprite at the given x/y world coordinates and then +* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. +* If the Sprite has a physics body that too is reset. +* +* @method Phaser.Sprite#reset +* @memberof Phaser.Sprite +* @param {number} x - The x coordinate (in world space) to position the Sprite at. +* @param {number} y - The y coordinate (in world space) to position the Sprite at. +* @param {number} [health=1] - The health to give the Sprite. +* @return (Phaser.Sprite) This instance. +*/ +Phaser.Sprite.prototype.reset = function(x, y, health) { + + if (typeof health === 'undefined') { health = 1; } + + this.x = x; + this.y = y; + this.position.x = this.x; + this.position.y = this.y; + this.alive = true; + this.exists = true; + this.visible = true; + this.renderable = true; + this._outOfBoundsFired = false; + + this.health = health; + + if (this.body) + { + this.body.reset(); + } + + return this; + +} + +/** +* Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only +* bought to the top of that Group, not the entire display list. +* +* @method Phaser.Sprite#bringToTop +* @memberof Phaser.Sprite +* @return (Phaser.Sprite) This instance. */ Phaser.Sprite.prototype.bringToTop = function() { @@ -16523,16 +16746,19 @@ Phaser.Sprite.prototype.bringToTop = function() { this.game.world.bringToTop(this); } + return this; + } /** * Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * -* @method play -* @param {String} name The name of the animation to be played, e.g. "fire", "walk", "jump". -* @param {number} [frameRate=null] The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. -* @param {boolean} [loop=false] Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. +* @method Phaser.Sprite#play +* @memberof Phaser.Sprite +* @param {string} name - The name of the animation to be played, e.g. "fire", "walk", "jump". +* @param {number} [frameRate=null] - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. +* @param {boolean} [loop=false] - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. * @param {boolean} [killOnComplete=false] - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. * @return {Phaser.Animation} A reference to playing Animation instance. */ @@ -16540,7 +16766,7 @@ Phaser.Sprite.prototype.play = function (name, frameRate, loop, killOnComplete) if (this.animations) { - this.animations.play(name, frameRate, loop, killOnComplete); + return this.animations.play(name, frameRate, loop, killOnComplete); } } @@ -16565,11 +16791,8 @@ Object.defineProperty(Phaser.Sprite.prototype, 'angle', { }); /** -* Get the animation frame number. -* @returns {Description} -*//** -* Set the animation frame by frame number. -* @param {Description} value - Description +* @name Phaser.Sprite#frame +* @property {number} frame - Gets or sets the current frame index and updates the Texture Cache for display. */ Object.defineProperty(Phaser.Sprite.prototype, "frame", { @@ -16584,11 +16807,8 @@ Object.defineProperty(Phaser.Sprite.prototype, "frame", { }); /** -* Get the animation frame name. -* @returns {Description} -*//** -* Set the animation frame by frame name. -* @param {Description} value - Description +* @name Phaser.Sprite#frameName +* @property {string} frameName - Gets or sets the current frame name and updates the Texture Cache for display. */ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { @@ -16603,8 +16823,9 @@ Object.defineProperty(Phaser.Sprite.prototype, "frameName", { }); /** -* Is this sprite visible to the camera or not? -* @returns {boolean} +* @name Phaser.Sprite#inCamera +* @property {boolean} inCamera - Is this sprite visible to the camera or not? +* @readonly */ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { @@ -16615,66 +16836,57 @@ Object.defineProperty(Phaser.Sprite.prototype, "inCamera", { }); /** -* Get the input enabled state of this Sprite. -* @returns {Description} -*//** -* Set the ability for this sprite to receive input events. -* @param {Description} value - Description +* The width of the sprite in pixels, setting this will actually modify the scale to acheive the value desired. +* If you wish to crop the Sprite instead see the Sprite.crop value. +* +* @name Phaser.Sprite#width +* @property {number} width - The width of the Sprite in pixels. */ -Object.defineProperty(Phaser.Sprite.prototype, "crop", { - - get: function () { - - return this._cropRect; +Object.defineProperty(Phaser.Sprite.prototype, 'width', { + get: function() { + return this.scale.x * this.currentFrame.width; }, - set: function (value) { + set: function(value) { - if (value instanceof Phaser.Rectangle) - { - if (this._cropUUID == null) - { - this._cropUUID = this.game.rnd.uuid(); + this.scale.x = value / this.currentFrame.width; + this._cache.scaleX = value / this.currentFrame.width; + this._width = value; - PIXI.TextureCache[this._cropUUID] = new PIXI.Texture(PIXI.BaseTextureCache[this.key], { - x: Math.floor(value.x), - y: Math.floor(value.y), - width: Math.floor(value.width), - height: Math.floor(value.height) - }); - } - else - { - PIXI.TextureCache[this._cropUUID].frame = value; - } - - this._cropRect = value; - this.setTexture(PIXI.TextureCache[this._cropUUID]); - } - else - { - this._cropRect = null; - - if (this.animations.isLoaded) - { - this.animations.refreshFrame(); - } - else - { - this.setTexture(PIXI.TextureCache[this.key]); - } - } } }); /** -* Get the input enabled state of this Sprite. -* @returns {Description} -*//** -* Set the ability for this sprite to receive input events. -* @param {Description} value - Description +* The height of the sprite in pixels, setting this will actually modify the scale to acheive the value desired. +* If you wish to crop the Sprite instead see the Sprite.crop value. +* +* @name Phaser.Sprite#height +* @property {number} height - The height of the Sprite in pixels. +*/ +Object.defineProperty(Phaser.Sprite.prototype, 'height', { + + get: function() { + return this.scale.y * this.currentFrame.height; + }, + + set: function(value) { + + this.scale.y = value / this.currentFrame.height; + this._cache.scaleY = value / this.currentFrame.height; + this._height = value; + + } + +}); + +/** +* By default a Sprite won't process any input events at all. By setting inputEnabled to true the Phaser.InputHandler is +* activated for this Sprite instance and it will then start to process click/touch events and more. +* +* @name Phaser.Sprite#inputEnabled +* @property {boolean} inputEnabled - Set to true to allow this Sprite to receive input events, otherwise false. */ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", { @@ -16709,21 +16921,19 @@ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.TileSprite */ /** * Create a new TileSprite. * @class Phaser.Tilemap -* @classdesc Class description. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {object} x - Description. -* @param {object} y - Description. -* @param {number} width - Description. -* @param {number} height - Description. -* @param {string} key - Description. -* @param {Description} frame - Description. +* @param {number} x - X position of the new tileSprite. +* @param {number} y - Y position of the new tileSprite. +* @param {number} width - the width of the tilesprite. +* @param {number} height - the height of the tilesprite. +* @param {string|Phaser.RenderTexture|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. +* @param {string|number} frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ Phaser.TileSprite = function (game, x, y, width, height, key, frame) { @@ -16769,19 +16979,17 @@ Phaser.TileSprite.prototype.constructor = Phaser.TileSprite; * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Text */ /** * Create a new Text. * @class Phaser.Text -* @classdesc Description of class. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {Description} x - Description. -* @param {Description} y - Description. -* @param {string} text - Description. -* @param {string} style - Description. +* @param {number} x - X position of the new text object. +* @param {number} y - Y position of the new text object. +* @param {string} text - The actual text that will be written. +* @param {object} style - The style object containing style attributes like font, font size , */ Phaser.Text = function (game, x, y, text, style) { @@ -16993,20 +17201,17 @@ Object.defineProperty(Phaser.Text.prototype, 'font', { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.BitmapText */ /** -* An Animation instance contains a single animation and the controls to play it. -* It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. -* +* Creates a new BitmapText. * @class Phaser.BitmapText * @constructor * @param {Phaser.Game} game - A reference to the currently running game. -* @param {number} x - X position of Description. -* @param {number} y - Y position of Description. -* @param {string} text - Description. -* @param {string} style - Description. +* @param {number} x - X position of the new bitmapText object. +* @param {number} y - Y position of the new bitmapText object. +* @param {string} text - The actual text that will be written. +* @param {object} style - The style object containing style attributes like font, font size , etc. */ Phaser.BitmapText = function (game, x, y, text, style) { @@ -17223,7 +17428,6 @@ Object.defineProperty(Phaser.BitmapText.prototype, 'y', { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Button */ @@ -17545,18 +17749,17 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.Graphics */ /** -* Description. +* Creates a new Graphics object. * * @class Phaser.Graphics * @constructor * * @param {Phaser.Game} game Current game instance. -* @param {number} [x] X position of Description. -* @param {number} [y] Y position of Description. +* @param {number} x - X position of the new graphics object. +* @param {number} y - Y position of the new graphics object. */ Phaser.Graphics = function (game, x, y) { @@ -17634,18 +17837,16 @@ Object.defineProperty(Phaser.Graphics.prototype, 'y', { * @author Richard Davey * @copyright 2013 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} -* @module Phaser.RenderTexture */ /** -* Description of constructor. +* A dynamic initially blank canvas to which images can be drawn * @class Phaser.RenderTexture -* @classdesc Description of class. * @constructor * @param {Phaser.Game} game - Current game instance. -* @param {string} key - Description. -* @param {number} width - Description. -* @param {number} height - Description. +* @param {string} key - Asset key for the render texture. +* @param {number} width - the width of the render texture. +* @param {number} height - the height of the render texture. */ Phaser.RenderTexture = function (game, key, width, height) { @@ -17655,19 +17856,19 @@ Phaser.RenderTexture = function (game, key, width, height) { this.game = game; /** - * @property {Description} name - Description. + * @property {string} name - the name of the object. */ this.name = key; PIXI.EventTarget.call( this ); /** - * @property {number} width - Description. + * @property {number} width - the width. */ this.width = width || 100; /** - * @property {number} height - Description. + * @property {number} height - the height. */ this.height = height || 100; @@ -18857,6 +19058,16 @@ Phaser.Device.prototype = { this.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob']; this.fileSystem = !!window['requestFileSystem']; this.webGL = ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )(); + + if (this.webGL === null) + { + this.webGL = false; + } + else + { + this.webGL = true; + } + this.worker = !!window['Worker']; if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) { @@ -21875,6 +22086,19 @@ Phaser.Rectangle.prototype = { }, + /** + * Runs Math.floor() on the x, y, width and height values of this Rectangle. + * @method Phaser.Rectangle#floorAll + **/ + floorAll: function () { + + this.x = Math.floor(this.x); + this.y = Math.floor(this.y); + this.width = Math.floor(this.width); + this.height = Math.floor(this.height); + + }, + /** * Copies the x, y, width and height properties from any given object to this Rectangle. * @method Phaser.Rectangle#copyFrom @@ -22278,7 +22502,7 @@ Phaser.Rectangle.inflate = function (a, dx, dy) { * @return {Phaser.Rectangle} The Rectangle object. */ Phaser.Rectangle.inflatePoint = function (a, point) { - return Phaser.Phaser.Rectangle.inflate(a, point.x, point.y); + return Phaser.Rectangle.inflate(a, point.x, point.y); }; /** @@ -22317,6 +22541,10 @@ Phaser.Rectangle.contains = function (a, x, y) { return (x >= a.x && x <= a.right && y >= a.y && y <= a.bottom); }; +Phaser.Rectangle.containsRaw = function (rx, ry, rw, rh, x, y) { + return (x >= rx && x <= (rx + rw) && y >= ry && y <= (ry + rh)); +}; + /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter. * @method Phaser.Rectangle.containsPoint @@ -22325,7 +22553,7 @@ Phaser.Rectangle.contains = function (a, x, y) { * @return {boolean} A value of true if the Rectangle object contains the specified point; otherwise false. */ Phaser.Rectangle.containsPoint = function (a, point) { - return Phaser.Phaser.Rectangle.contains(a, point.x, point.y); + return Phaser.Rectangle.contains(a, point.x, point.y); }; /** @@ -24169,6 +24397,12 @@ Phaser.Time.prototype = { this.lastTime = time + this.timeToCall; this.physicsElapsed = 1.0 * (this.elapsed / 1000); + // Clamp the delta + if (this.physicsElapsed > 1) + { + this.physicsElapsed = 1; + } + // Paused? if (this.game.paused) { @@ -25044,33 +25278,55 @@ Object.defineProperty(Phaser.Animation.prototype, "frame", { * * @method Phaser.Animation.generateFrameNames * @param {string} prefix - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. -* @param {number} min - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the min is 1. -* @param {number} max - The number to count up to. If your frames are named 'explosion_0001' to 'explosion_0034' the max is 34. +* @param {number} start - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1. +* @param {number} stop - The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34. * @param {string} [suffix=''] - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. * @param {number} [zeroPad=0] - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. */ -Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPad) { +Phaser.Animation.generateFrameNames = function (prefix, start, stop, suffix, zeroPad) { if (typeof suffix == 'undefined') { suffix = ''; } var output = []; var frame = ''; - for (var i = min; i <= max; i++) + if (start < stop) { - if (typeof zeroPad == 'number') + for (var i = start; i <= stop; i++) { - // str, len, pad, dir - frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); } - else + } + else + { + for (var i = start; i >= stop; i--) { - frame = i.toString(); + if (typeof zeroPad == 'number') + { + // str, len, pad, dir + frame = Phaser.Utils.pad(i.toString(), zeroPad, '0', 1); + } + else + { + frame = i.toString(); + } + + frame = prefix + frame + suffix; + + output.push(frame); } - - frame = prefix + frame + suffix; - - output.push(frame); } return output; @@ -26060,7 +26316,8 @@ Phaser.Cache.prototype = { addImage: function (key, url, data) { this._images[key] = { url: url, data: data, spriteSheet: false }; - this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, '', ''); + + this._images[key].frame = new Phaser.Frame(0, 0, 0, data.width, data.height, key, this.game.rnd.uuid()); PIXI.BaseTextureCache[key] = new PIXI.BaseTexture(data); PIXI.TextureCache[key] = new PIXI.Texture(PIXI.BaseTextureCache[key]); @@ -26755,6 +27012,7 @@ Phaser.Loader.prototype = { } sprite.crop = this.preloadSprite.crop; + sprite.cropEnabled = true; }, @@ -27529,7 +27787,7 @@ Phaser.Loader.prototype = { break; case 'text': - file.data = this._xhr.response; + file.data = this._xhr.responseText; this.game.cache.addText(file.key, file.url, file.data); break; } @@ -27549,7 +27807,7 @@ Phaser.Loader.prototype = { */ jsonLoadComplete: function (key) { - var data = JSON.parse(this._xhr.response); + var data = JSON.parse(this._xhr.responseText); var file = this._fileList[key]; if (file.type == 'tilemap') @@ -27573,7 +27831,7 @@ Phaser.Loader.prototype = { */ csvLoadComplete: function (key) { - var data = this._xhr.response; + var data = this._xhr.responseText; var file = this._fileList[key]; this.game.cache.addTilemap(file.key, file.url, data, file.format); @@ -27608,7 +27866,7 @@ Phaser.Loader.prototype = { */ xmlLoadComplete: function (key) { - var data = this._xhr.response; + var data = this._xhr.responseText; var xml; try @@ -27902,8 +28160,7 @@ Phaser.Sound = function (game, key, volume, loop) { /** * Description. - * @property {number} autoplay - * @default + * @property {number} stopTime */ this.stopTime = 0; @@ -27914,6 +28171,18 @@ Phaser.Sound = function (game, key, volume, loop) { */ this.paused = false; + /** + * Description. + * @property {number} pausedPosition + */ + this.pausedPosition = 0; + + /** + * Description. + * @property {number} pausedTime + */ + this.pausedTime = 0; + /** * Description. * @property {boolean} isPlaying @@ -28411,10 +28680,13 @@ Phaser.Sound.prototype = { this.stop(); this.isPlaying = false; this.paused = true; + this.pausedPosition = this.currentTime; + this.pausedTime = this.game.time.now; this.onPause.dispatch(this); } }, + /** * Resumes the sound * @method Phaser.Sound#resume @@ -28425,14 +28697,20 @@ Phaser.Sound.prototype = { { if (this.usingWebAudio) { + var p = this.position + (this.pausedPosition / 1000); + + this._sound = this.context.createBufferSource(); + this._sound.buffer = this._buffer; + this._sound.connect(this.gainNode); + if (typeof this._sound.start === 'undefined') { - this._sound.noteGrainOn(0, this.position, this.duration); + this._sound.noteGrainOn(0, p, this.duration); //this._sound.noteOn(0); // the zero is vitally important, crashes iOS6 without it } else { - this._sound.start(0, this.position, this.duration); + this._sound.start(0, p, this.duration); } } else @@ -28442,6 +28720,7 @@ Phaser.Sound.prototype = { this.isPlaying = true; this.paused = false; + this.startTime += (this.game.time.now - this.pausedTime); this.onResume.dispatch(this); } @@ -29241,14 +29520,16 @@ Phaser.Utils.Debug.prototype = { showText = showText || false; showBounds = showBounds || false; - color = color || 'rgb(255,0,255)'; + color = color || 'rgb(255,255,255)'; this.start(0, 0, color); if (showBounds) { - this.context.strokeStyle = 'rgba(255,0,255,0.5)'; + this.context.beginPath(); + this.context.strokeStyle = 'rgba(0, 255, 0, 0.7)'; this.context.strokeRect(sprite.bounds.x, sprite.bounds.y, sprite.bounds.width, sprite.bounds.height); + this.context.closePath(); this.context.stroke(); } @@ -29258,7 +29539,7 @@ Phaser.Utils.Debug.prototype = { this.context.lineTo(sprite.bottomRight.x, sprite.bottomRight.y); this.context.lineTo(sprite.bottomLeft.x, sprite.bottomLeft.y); this.context.closePath(); - this.context.strokeStyle = 'rgba(0,0,255,0.8)'; + this.context.strokeStyle = 'rgba(255, 0, 255, 0.7)'; this.context.stroke(); this.renderPoint(sprite.center); @@ -30238,55 +30519,175 @@ Phaser.Color = { }; +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +*/ + +/** +* @class Phaser.Physics +*/ Phaser.Physics = {}; +/** +* Arcade Physics constructor. +* +* @class Phaser.Physics.Arcade +* @classdesc Arcade Physics Constructor +* @constructor +* @param {Phaser.Game} game reference to the current game instance. +*/ Phaser.Physics.Arcade = function (game) { + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = game; + /** + * @property {Phaser.Point} gravity - The World gravity setting. Defaults to x: 0, y: 0, or no gravity. + */ this.gravity = new Phaser.Point; + + /** + * @property {Phaser.Rectangle} bounds - The bounds inside of which the physics world exists. Defaults to match the world bounds. + */ this.bounds = new Phaser.Rectangle(0, 0, game.world.width, game.world.height); /** - * Used by the QuadTree to set the maximum number of objects - * @type {number} + * @property {number} maxObjects - Used by the QuadTree to set the maximum number of objects per quad. */ this.maxObjects = 10; /** - * Used by the QuadTree to set the maximum number of levels - * @type {number} + * @property {number} maxLevels - Used by the QuadTree to set the maximum number of iteration levels. */ this.maxLevels = 4; + /** + * @property {number} OVERLAP_BIAS - A value added to the delta values during collision checks. + */ this.OVERLAP_BIAS = 4; - this.TILE_OVERLAP = false; + /** + * @property {Phaser.QuadTree} quadTree - The world QuadTree. + */ this.quadTree = new Phaser.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels); + + /** + * @property {number} quadTreeID - The QuadTree ID. + */ this.quadTreeID = 0; // Avoid gc spikes by caching these values for re-use + + /** + * @property {Phaser.Rectangle} _bounds1 - Internal cache var. + * @private + */ this._bounds1 = new Phaser.Rectangle; + + /** + * @property {Phaser.Rectangle} _bounds2 - Internal cache var. + * @private + */ this._bounds2 = new Phaser.Rectangle; + + /** + * @property {number} _overlap - Internal cache var. + * @private + */ this._overlap = 0; + + /** + * @property {number} _maxOverlap - Internal cache var. + * @private + */ this._maxOverlap = 0; + + /** + * @property {number} _velocity1 - Internal cache var. + * @private + */ this._velocity1 = 0; + + /** + * @property {number} _velocity2 - Internal cache var. + * @private + */ this._velocity2 = 0; + + /** + * @property {number} _newVelocity1 - Internal cache var. + * @private + */ this._newVelocity1 = 0; + + /** + * @property {number} _newVelocity2 - Internal cache var. + * @private + */ this._newVelocity2 = 0; + + /** + * @property {number} _average - Internal cache var. + * @private + */ this._average = 0; + + /** + * @property {Array} _mapData - Internal cache var. + * @private + */ this._mapData = []; + + /** + * @property {number} _mapTiles - Internal cache var. + * @private + */ this._mapTiles = 0; + + /** + * @property {boolean} _result - Internal cache var. + * @private + */ this._result = false; + + /** + * @property {number} _total - Internal cache var. + * @private + */ this._total = 0; + + /** + * @property {number} _angle - Internal cache var. + * @private + */ this._angle = 0; + + /** + * @property {number} _dx - Internal cache var. + * @private + */ this._dx = 0; + + /** + * @property {number} _dy - Internal cache var. + * @private + */ this._dy = 0; }; Phaser.Physics.Arcade.prototype = { + /** + * Called automatically by a Physics body, it updates all motion related values on the Body. + * + * @method Phaser.Physics.Arcade#updateMotion + * @param {Phaser.Physics.Arcade.Body} The Body object to be updated. + */ updateMotion: function (body) { // If you're wondering why the velocity is halved and applied twice, read this: http://www.niksula.hut.fi/~hkankaan/Homepages/gravity.html @@ -30314,11 +30715,13 @@ Phaser.Physics.Arcade.prototype = { /** * A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. * - * @param {number} Velocity Any component of velocity (e.g. 20). - * @param {number} Acceleration Rate at which the velocity is changing. - * @param {number} Drag Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. - * @param {number} Max An absolute value cap for the velocity. - * + * @method Phaser.Physics.Arcade#computeVelocity + * @param {number} axis - 1 for horizontal, 2 for vertical. + * @param {Phaser.Physics.Arcade.Body} body - The Body object to be updated. + * @param {number} velocity - Any component of velocity (e.g. 20). + * @param {number} acceleration - Rate at which the velocity is changing. + * @param {number} drag - Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. + * @param {number} mMax - An absolute value cap for the velocity. * @return {number} The altered Velocity value. */ computeVelocity: function (axis, body, velocity, acceleration, drag, max) { @@ -30369,6 +30772,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * Called automatically by the core game loop. + * + * @method Phaser.Physics.Arcade#preUpdate + * @protected + */ preUpdate: function () { // Clear the tree @@ -30380,6 +30789,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * Called automatically by the core game loop. + * + * @method Phaser.Physics.Arcade#postUpdate + * @protected + */ postUpdate: function () { // Clear the tree ready for the next update @@ -30388,12 +30803,13 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Checks if two Sprite objects intersect. + * Checks if two Sprite objects overlap. * - * @param object1 The first object to check. Can be an instance of Phaser.Sprite or anything that extends it. - * @param object2 The second object to check. Can be an instance of Phaser.Sprite or anything that extends it. + * @method Phaser.Physics.Arcade#overlap + * @param {Phaser.Sprite} object1 - The first object to check. Can be an instance of Phaser.Sprite or anything that extends it. + * @param {Phaser.Sprite} object2 - The second object to check. Can be an instance of Phaser.Sprite or anything that extends it. * @returns {boolean} true if the two objects overlap. - **/ + */ overlap: function (object1, object2) { // Only test valid objects @@ -30409,14 +30825,16 @@ Phaser.Physics.Arcade.prototype = { /** * Checks for collision between two game objects. The objects can be Sprites, Groups, Emitters or Tilemaps. * You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap or Group vs. Tilemap collisions. + * The objects are also automatically separated. * - * @param object1 The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap - * @param object2 The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap - * @param collideCallback An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap. - * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collideCallback will only be called if processCallback returns true. - * @param callbackContext The context in which to run the callbacks. - * @returns {boolean} true if any collisions were detected, otherwise false. - **/ + * @method Phaser.Physics.Arcade#collide + * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.Tilemap + * @param {Phaser.Sprite|Phaser.Group|Phaser.Particles.Emitter|Phaser.Tilemap} object2 - The second object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.Tilemap + * @param {function} [collideCallback=null] - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you passed them to Collision.overlap. + * @param {function} [processCallback=null] - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collideCallback will only be called if processCallback returns true. + * @param {object} [callbackContext] - The context in which to run the callbacks. + * @returns {number} The number of collisions that were processed. + */ collide: function (object1, object2, collideCallback, processCallback, callbackContext) { collideCallback = collideCallback || null; @@ -30497,6 +30915,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideSpriteVsTilemapLayer + * @private + */ collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext) { this._mapData = tilemapLayer.getTiles(sprite.body.x, sprite.body.y, sprite.body.width, sprite.body.height, true); @@ -30537,6 +30961,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideGroupVsTilemapLayer + * @private + */ collideGroupVsTilemapLayer: function (group, tilemapLayer, collideCallback, processCallback, callbackContext) { if (group.length == 0) @@ -30561,6 +30991,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideSpriteVsSprite + * @private + */ collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext) { this.separate(sprite1.body, sprite2.body); @@ -30593,6 +31029,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideSpriteVsGroup + * @private + */ collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext) { if (group.length == 0) @@ -30629,6 +31071,12 @@ Phaser.Physics.Arcade.prototype = { }, + /** + * An internal function. Use Phaser.Physics.Arcade.collide instead. + * + * @method Phaser.Physics.Arcade#collideGroupVsGroup + * @private + */ collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext) { if (group1.length == 0 || group2.length == 0) @@ -30653,12 +31101,13 @@ Phaser.Physics.Arcade.prototype = { }, - /** - * The core separation function to separate two physics bodies. - * @param body1 The first Sprite.Body to separate - * @param body2 The second Sprite.Body to separate - * @returns {boolean} Returns true if the bodies were separated, otherwise false. - */ + /** + * The core separation function to separate two physics bodies. + * @method Phaser.Physics.Arcade#separate + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separate: function (body1, body2) { this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); @@ -30666,11 +31115,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two physics bodies on their X axis - * @param body1 The first Sprite.Body to separate - * @param body2 The second Sprite.Body to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ + * The core separation function to separate two physics bodies on the x axis. + * @method Phaser.Physics.Arcade#separateX + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateX: function (body1, body2) { // Can't separate two immovable bodies @@ -30773,11 +31223,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two physics bodies on their Y axis - * @param body1 The first Sprite.Body to separate - * @param body2 The second Sprite.Body to separate - * @returns {boolean} Whether the bodys in fact touched and were separated along the Y axis. - */ + * The core separation function to separate two physics bodies on the y axis. + * @method Phaser.Physics.Arcade#separateY + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The Body object to separate. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateY: function (body1, body2) { // Can't separate two immovable or non-existing bodys @@ -30892,12 +31343,13 @@ Phaser.Physics.Arcade.prototype = { }, - /** - * The core Collision separation function used by Collision.overlap. - * @param object1 The first GameObject to separate - * @param object2 The second GameObject to separate - * @returns {boolean} Returns true if the objects were separated, otherwise false. - */ + /** + * The core separation function to separate a physics body and a tile. + * @method Phaser.Physics.Arcade#separateTile + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Tile} tile - The tile to collide against. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateTile: function (body, tile) { this._result = (this.separateTileX(body, tile, true) || this.separateTileY(body, tile, true)); @@ -30905,11 +31357,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two objects on their x axis - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ + * The core separation function to separate a physics body and a tile on the x axis. + * @method Phaser.Physics.Arcade#separateTileX + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Tile} tile - The tile to collide against. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateTileX: function (body, tile, separate) { // Can't separate two immovable objects (tiles are always immovable) @@ -30988,11 +31441,12 @@ Phaser.Physics.Arcade.prototype = { }, /** - * Separates the two objects on their x axis - * @param object The GameObject to separate - * @param tile The Tile to separate - * @returns {boolean} Whether the objects in fact touched and were separated along the X axis. - */ + * The core separation function to separate a physics body and a tile on the x axis. + * @method Phaser.Physics.Arcade#separateTileY + * @param {Phaser.Physics.Arcade.Body} body1 - The Body object to separate. + * @param {Phaser.Tile} tile - The tile to collide against. + * @returns {boolean} Returns true if the bodies were separated, otherwise false. + */ separateTileY: function (body, tile, separate) { // Can't separate two immovable objects (tiles are always immovable) @@ -31436,87 +31890,321 @@ Phaser.Physics.Arcade.prototype = { }; +/** +* @author Richard Davey +* @copyright 2013 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} +*/ + +/** +* The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than +* the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body. +* +* @class Phaser.Physics.Arcade.Body +* @classdesc Arcade Physics Body Constructor +* @constructor +* @param {Phaser.Sprite} sprite - The Sprite object this physics body belongs to. +*/ Phaser.Physics.Arcade.Body = function (sprite) { + /** + * @property {Phaser.Sprite} sprite - Reference to the parent Sprite. + */ this.sprite = sprite; + + /** + * @property {Phaser.Game} game - Local reference to game. + */ this.game = sprite.game; + /** + * @property {Phaser.Point} offset - The offset of the Physics Body from the Sprite x/y position. + */ this.offset = new Phaser.Point; + /** + * @property {number} x - The x position of the physics body. + * @readonly + */ this.x = sprite.x; + + /** + * @property {number} y - The y position of the physics body. + * @readonly + */ this.y = sprite.y; + + /** + * @property {number} preX - The previous x position of the physics body. + * @readonly + */ this.preX = sprite.x; + + /** + * @property {number} preY - The previous y position of the physics body. + * @readonly + */ this.preY = sprite.y; + + /** + * @property {number} preRotation - The previous rotation of the physics body. + * @readonly + */ this.preRotation = sprite.angle; + + /** + * @property {number} screenX - The x position of the physics body translated to screen space. + * @readonly + */ this.screenX = sprite.x; + + /** + * @property {number} screenY - The y position of the physics body translated to screen space. + * @readonly + */ this.screenY = sprite.y; - // un-scaled original size + /** + * @property {number} sourceWidth - The un-scaled original size. + * @readonly + */ this.sourceWidth = sprite.currentFrame.sourceSizeW; + + /** + * @property {number} sourceHeight - The un-scaled original size. + * @readonly + */ this.sourceHeight = sprite.currentFrame.sourceSizeH; - // calculated (scaled) size + /** + * @property {number} width - The calculated width of the physics body. + */ this.width = sprite.currentFrame.sourceSizeW; + + /** + * @property .numInternal ID cache + */ this.height = sprite.currentFrame.sourceSizeH; + + /** + * @property {number} halfWidth - The calculated width / 2 of the physics body. + */ this.halfWidth = Math.floor(sprite.currentFrame.sourceSizeW / 2); + + /** + * @property {number} halfHeight - The calculated height / 2 of the physics body. + */ this.halfHeight = Math.floor(sprite.currentFrame.sourceSizeH / 2); - // Scale value cache + /** + * @property {number} _sx - Internal cache var. + * @private + */ this._sx = sprite.scale.x; + + /** + * @property {number} _sy - Internal cache var. + * @private + */ this._sy = sprite.scale.y; + /** + * @property {Phaser.Point} velocity - The velocity in pixels per second sq. of the Body. + */ this.velocity = new Phaser.Point; + + /** + * @property {Phaser.Point} acceleration - The velocity in pixels per second sq. of the Body. + */ this.acceleration = new Phaser.Point; + + /** + * @property {Phaser.Point} drag - The drag applied to the motion of the Body. + */ this.drag = new Phaser.Point; + + /** + * @property {Phaser.Point} gravity - A private Gravity setting for the Body. + */ this.gravity = new Phaser.Point; + + /** + * @property {Phaser.Point} bounce - The elasticitiy of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity. + */ this.bounce = new Phaser.Point; + + /** + * @property {Phaser.Point} maxVelocity - The maximum velocity in pixels per second sq. that the Body can reach. + * @default + */ this.maxVelocity = new Phaser.Point(10000, 10000); + /** + * @property {number} angularVelocity - The angular velocity in pixels per second sq. of the Body. + * @default + */ this.angularVelocity = 0; + + /** + * @property {number} angularAcceleration - The angular acceleration in pixels per second sq. of the Body. + * @default + */ this.angularAcceleration = 0; + + /** + * @property {number} angularDrag - The angular drag applied to the rotation of the Body. + * @default + */ this.angularDrag = 0; + + /** + * @property {number} maxAngular - The maximum angular velocity in pixels per second sq. that the Body can reach. + * @default + */ this.maxAngular = 1000; + + /** + * @property {number} mass - The mass of the Body. + * @default + */ this.mass = 1; + /** + * @property {boolean} skipQuadTree - If the Body is an irregular shape you can set this to true to avoid it being added to the World quad tree. + * @default + */ this.skipQuadTree = false; + + /** + * @property {Array} quadTreeIDs - Internal ID cache. + * @protected + */ this.quadTreeIDs = []; + + /** + * @property {number} quadTreeIndex - Internal ID cache. + * @protected + */ this.quadTreeIndex = -1; // Allow collision + + /** + * Set the allowCollision properties to control which directions collision is processed for this Body. + * For example allowCollision.up = false means it won't collide when the collision happened while moving up. + * @property {object} allowCollision - An object containing allowed collision. + */ this.allowCollision = { none: false, any: true, up: true, down: true, left: true, right: true }; + + /** + * This object is populated with boolean values when the Body collides with another. + * touching.up = true means the collision happened to the top of this Body for example. + * @property {object} touching - An object containing touching results. + */ this.touching = { none: true, up: false, down: false, left: false, right: false }; + + /** + * This object is populated with previous touching values from the bodies previous collision. + * @property {object} wasTouching - An object containing previous touching results. + */ this.wasTouching = { none: true, up: false, down: false, left: false, right: false }; + + /** + * @property {number} facing - A const reference to the direction the Body is traveling or facing. + * @default + */ this.facing = Phaser.NONE; + /** + * @property {boolean} immovable - An immovable Body will not receive any impacts from other bodies. + * @default + */ this.immovable = false; + + /** + * @property {boolean} moves - Set to true to allow the Physics system to move this Body, other false to move it manually. + * @default + */ this.moves = true; + + /** + * @property {number} rotation - The amount the Body is rotated. + * @default + */ this.rotation = 0; + + /** + * @property {boolean} allowRotation - Allow this Body to be rotated? (via angularVelocity, etc) + * @default + */ this.allowRotation = true; + + /** + * @property {boolean} allowGravity - Allow this Body to be influenced by the global Gravity? + * @default + */ this.allowGravity = true; - // These two flags allow you to disable the custom separation that takes place - // Used in combination with your own collision processHandler you can create whatever - // type of collision response you need. + /** + * This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate. + * Used in combination with your own collision processHandler you can create whatever type of collision response you need. + * @property {boolean} customSeparateX - Use a custom separation system or the built-in one? + * @default + */ this.customSeparateX = false; + + /** + * This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate. + * Used in combination with your own collision processHandler you can create whatever type of collision response you need. + * @property {boolean} customSeparateY - Use a custom separation system or the built-in one? + * @default + */ this.customSeparateY = false; - // When this body collides with another the amount of overlap is stored in here - // These values are useful if you want to provide your own custom separation logic. + /** + * When this body collides with another, the amount of overlap is stored here. + * @property {number} overlapX - The amount of horizontal overlap during the collision. + */ this.overlapX = 0; + + /** + * When this body collides with another, the amount of overlap is stored here. + * @property {number} overlapY - The amount of vertical overlap during the collision. + */ this.overlapY = 0; + /** + * @property {Phaser.Rectangle} hullX - The dynamically calculated hull used during collision. + */ this.hullX = new Phaser.Rectangle(); + + /** + * @property {Phaser.Rectangle} hullY - The dynamically calculated hull used during collision. + */ this.hullY = new Phaser.Rectangle(); - // If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true + /** + * If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true. + * @property {boolean} embedded - Body embed value. + */ this.embedded = false; + /** + * A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. + * @property {boolean} collideWorldBounds - Should the Body collide with the World bounds? + */ this.collideWorldBounds = false; }; Phaser.Physics.Arcade.Body.prototype = { + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#updateBounds + * @protected + */ updateBounds: function (centerX, centerY, scaleX, scaleY) { if (scaleX != this._sx || scaleY != this._sy) @@ -31531,6 +32219,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#preUpdate + * @protected + */ preUpdate: function () { // Store and reset collision flags @@ -31551,9 +32245,6 @@ Phaser.Physics.Arcade.Body.prototype = { this.screenX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.screenY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.preX = (this.sprite.localTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.preY = (this.sprite.localTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; @@ -31572,8 +32263,7 @@ Phaser.Physics.Arcade.Body.prototype = { this.checkWorldBounds(); } - this.updateHulls(); - } + this.updateHulls();Array } if (this.skipQuadTree == false && this.allowCollision.none == false && this.sprite.visible && this.sprite.alive) { @@ -31584,6 +32274,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#postUpdate + * @protected + */ postUpdate: function () { // Calculate forward-facing edge @@ -31624,6 +32320,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#updateHulls + * @protected + */ updateHulls: function () { this.hullX.setTo(this.x, this.preY, this.width, this.height); @@ -31631,6 +32333,12 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Internal method. + * + * @method Phaser.Physics.Arcade#checkWorldBounds + * @protected + */ checkWorldBounds: function () { if (this.x < this.game.world.bounds.x) @@ -31657,6 +32365,17 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * You can modify the size of the physics Body to be any dimension you need. + * So it could be smaller or larger than the parent Sprite. You can also control the x and y offset, which + * is the position of the Body relative to the top-left of the Sprite. + * + * @method Phaser.Physics.Arcade#setSize + * @param {number} width - The width of the Body. + * @param {number} height - The height of the Body. + * @param {number} offsetX - The X offset of the Body from the Sprite position. + * @param {number} offsetY - The Y offset of the Body from the Sprite position. + */ setSize: function (width, height, offsetX, offsetY) { offsetX = offsetX || this.offset.x; @@ -31672,6 +32391,11 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Resets all Body values (velocity, acceleration, rotation, etc) + * + * @method Phaser.Physics.Arcade#reset + */ reset: function () { this.velocity.setTo(0, 0); @@ -31679,11 +32403,8 @@ Phaser.Physics.Arcade.Body.prototype = { this.angularVelocity = 0; this.angularAcceleration = 0; - this.preX = (this.sprite.worldTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; this.preY = (this.sprite.worldTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; - // this.preX = (this.sprite.localTransform[2] - (this.sprite.anchor.x * this.width)) + this.offset.x; - // this.preY = (this.sprite.localTransform[5] - (this.sprite.anchor.y * this.height)) + this.offset.y; this.preRotation = this.sprite.angle; this.x = this.preX; @@ -31692,18 +32413,42 @@ Phaser.Physics.Arcade.Body.prototype = { }, + /** + * Returns the absolute delta x value. + * + * @method Phaser.Physics.Arcade.Body#deltaAbsX + * @return {number} The absolute delta value. + */ deltaAbsX: function () { return (this.deltaX() > 0 ? this.deltaX() : -this.deltaX()); }, + /** + * Returns the absolute delta y value. + * + * @method Phaser.Physics.Arcade.Body#deltaAbsY + * @return {number} The absolute delta value. + */ deltaAbsY: function () { return (this.deltaY() > 0 ? this.deltaY() : -this.deltaY()); }, + /** + * Returns the delta x value. + * + * @method Phaser.Physics.Arcade.Body#deltaX + * @return {number} The delta value. + */ deltaX: function () { return this.x - this.preX; }, + /** + * Returns the delta y value. + * + * @method Phaser.Physics.Arcade.Body#deltaY + * @return {number} The delta value. + */ deltaY: function () { return this.y - this.preY; }, @@ -31714,6 +32459,10 @@ Phaser.Physics.Arcade.Body.prototype = { }; +/** +* @name Phaser.Physics.Arcade.Body#bottom +* @property {number} bottom - The bottom value of this Body (same as Body.y + Body.height) +*/ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { /** @@ -31745,6 +32494,10 @@ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "bottom", { }); +/** +* @name Phaser.Physics.Arcade.Body#right +* @property {number} right - The right value of this Body (same as Body.x + Body.width) +*/ Object.defineProperty(Phaser.Physics.Arcade.Body.prototype, "right", { /** @@ -34289,7 +35042,5 @@ PIXI.WebGLBatch.prototype.update = function() displayObject = displayObject.__next; } } - - - return Phaser; -})); \ No newline at end of file + return Phaser; +}); \ No newline at end of file diff --git a/build/phaser.min.js b/build/phaser.min.js index 197bc293..07445092 100644 --- a/build/phaser.min.js +++ b/build/phaser.min.js @@ -1 +1,10 @@ -var PIXI=PIXI||{};var Phaser=Phaser||{VERSION:"1.0.5",GAMES:[],AUTO:0,CANVAS:1,WEBGL:2,SPRITE:0,BUTTON:1,BULLET:2,GRAPHICS:3,TEXT:4,TILESPRITE:5,BITMAPTEXT:6,GROUP:7,RENDERTEXTURE:8,TILEMAP:9,TILEMAPLAYER:10,EMITTER:11};PIXI.InteractionManager=function(b){};Phaser.Utils={pad:function(g,b,f,c){if(typeof(b)=="undefined"){var b=0}if(typeof(f)=="undefined"){var f=" "}if(typeof(c)=="undefined"){var c=3}if(b+1>=g.length){switch(c){case 1:g=Array(b+1-g.length).join(f)+g;break;case 3:var d=Math.ceil((padlen=b-g.length)/2);var e=padlen-d;g=Array(e+1).join(f)+g+Array(d+1).join(f);break;default:g=g+Array(b+1-g.length).join(f);break}}return g},isPlainObject:function(c){if(typeof(c)!=="object"||c.nodeType||c===c.window){return false}try{if(c.constructor&&!hasOwn.call(c.constructor.prototype,"isPrototypeOf")){return false}}catch(b){return false}return true},extend:function(){var l,d,b,c,h,j,g=arguments[0]||{},f=1,e=arguments.length,k=false;if(typeof g==="boolean"){k=g;g=arguments[1]||{};f=2}if(e===f){g=this;--f}for(;f>16&255)/255,(b>>8&255)/255,(b&255)/255]}if(typeof Function.prototype.bind!="function"){Function.prototype.bind=(function(){var b=Array.prototype.slice;return function(c){var f=this,g=b.call(arguments,1);if(typeof f!="function"){throw new TypeError()}function d(){var h=g.concat(b.call(arguments));f.apply(this instanceof d?this:c,h)}d.prototype=(function e(h){h&&(e.prototype=h);if(!(this instanceof e)){return new e}})(f.prototype);return d}})()}function determineMatrixArrayType(){PIXI.Matrix=(typeof Float32Array!=="undefined")?Float32Array:Array;return PIXI.Matrix}determineMatrixArrayType();PIXI.mat3={};PIXI.mat3.create=function(){var b=new PIXI.Matrix(9);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=1;b[5]=0;b[6]=0;b[7]=0;b[8]=1;return b};PIXI.mat3.identity=function(b){b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=1;b[5]=0;b[6]=0;b[7]=0;b[8]=1;return b};PIXI.mat4={};PIXI.mat4.create=function(){var b=new PIXI.Matrix(16);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};PIXI.mat3.multiply=function(q,h,i){if(!i){i=q}var v=q[0],u=q[1],t=q[2],g=q[3],f=q[4],e=q[5],o=q[6],n=q[7],m=q[8],l=h[0],k=h[1],j=h[2],s=h[3],r=h[4],p=h[5],d=h[6],c=h[7],b=h[8];i[0]=l*v+k*g+j*o;i[1]=l*u+k*f+j*n;i[2]=l*t+k*e+j*m;i[3]=s*v+r*g+p*o;i[4]=s*u+r*f+p*n;i[5]=s*t+r*e+p*m;i[6]=d*v+c*g+b*o;i[7]=d*u+c*f+b*n;i[8]=d*t+c*e+b*m;return i};PIXI.mat3.clone=function(c){var b=new PIXI.Matrix(9);b[0]=c[0];b[1]=c[1];b[2]=c[2];b[3]=c[3];b[4]=c[4];b[5]=c[5];b[6]=c[6];b[7]=c[7];b[8]=c[8];return b};PIXI.mat3.transpose=function(d,c){if(!c||d===c){var f=d[1],e=d[2],b=d[5];d[1]=d[3];d[2]=d[6];d[3]=f;d[5]=d[7];d[6]=e;d[7]=b;return d}c[0]=d[0];c[1]=d[3];c[2]=d[6];c[3]=d[1];c[4]=d[4];c[5]=d[7];c[6]=d[2];c[7]=d[5];c[8]=d[8];return c};PIXI.mat3.toMat4=function(c,b){if(!b){b=PIXI.mat4.create()}b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=c[8];b[9]=c[7];b[8]=c[6];b[7]=0;b[6]=c[5];b[5]=c[4];b[4]=c[3];b[3]=0;b[2]=c[2];b[1]=c[1];b[0]=c[0];return b};PIXI.mat4.create=function(){var b=new PIXI.Matrix(16);b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};PIXI.mat4.transpose=function(e,d){if(!d||e===d){var i=e[1],g=e[2],f=e[3],b=e[6],h=e[7],c=e[11];e[1]=e[4];e[2]=e[8];e[3]=e[12];e[4]=i;e[6]=e[9];e[7]=e[13];e[8]=g;e[9]=b;e[11]=e[14];e[12]=f;e[13]=h;e[14]=c;return e}d[0]=e[0];d[1]=e[4];d[2]=e[8];d[3]=e[12];d[4]=e[1];d[5]=e[5];d[6]=e[9];d[7]=e[13];d[8]=e[2];d[9]=e[6];d[10]=e[10];d[11]=e[14];d[12]=e[3];d[13]=e[7];d[14]=e[11];d[15]=e[15];return d};PIXI.mat4.multiply=function(p,i,k){if(!k){k=p}var v=p[0],u=p[1],s=p[2],q=p[3];var h=p[4],f=p[5],d=p[6],b=p[7];var o=p[8],n=p[9],m=p[10],l=p[11];var z=p[12],w=p[13],t=p[14],r=p[15];var j=i[0],g=i[1],e=i[2],c=i[3];k[0]=j*v+g*h+e*o+c*z;k[1]=j*u+g*f+e*n+c*w;k[2]=j*s+g*d+e*m+c*t;k[3]=j*q+g*b+e*l+c*r;j=i[4];g=i[5];e=i[6];c=i[7];k[4]=j*v+g*h+e*o+c*z;k[5]=j*u+g*f+e*n+c*w;k[6]=j*s+g*d+e*m+c*t;k[7]=j*q+g*b+e*l+c*r;j=i[8];g=i[9];e=i[10];c=i[11];k[8]=j*v+g*h+e*o+c*z;k[9]=j*u+g*f+e*n+c*w;k[10]=j*s+g*d+e*m+c*t;k[11]=j*q+g*b+e*l+c*r;j=i[12];g=i[13];e=i[14];c=i[15];k[12]=j*v+g*h+e*o+c*z;k[13]=j*u+g*f+e*n+c*w;k[14]=j*s+g*d+e*m+c*t;k[15]=j*q+g*b+e*l+c*r;return k};PIXI.Point=function(b,c){this.x=b||0;this.y=c||0};PIXI.Point.prototype.clone=function(){return new PIXI.Point(this.x,this.y)};PIXI.Point.prototype.constructor=PIXI.Point;PIXI.Rectangle=function(c,e,d,b){this.x=c||0;this.y=e||0;this.width=d||0;this.height=b||0};PIXI.Rectangle.prototype.clone=function(){return new PIXI.Rectangle(this.x,this.y,this.width,this.height)};PIXI.Rectangle.prototype.contains=function(b,e){if(this.width<=0||this.height<=0){return false}var c=this.x;if(b>=c&&b<=c+this.width){var d=this.y;if(e>=d&&e<=d+this.height){return true}}return false};PIXI.Rectangle.prototype.constructor=PIXI.Rectangle;PIXI.DisplayObject=function(){this.last=this;this.first=this;this.position=new PIXI.Point();this.scale=new PIXI.Point(1,1);this.pivot=new PIXI.Point(0,0);this.rotation=0;this.alpha=1;this.visible=true;this.hitArea=null;this.buttonMode=false;this.renderable=false;this.parent=null;this.stage=null;this.worldAlpha=1;this._interactive=false;this.worldTransform=PIXI.mat3.create();this.localTransform=PIXI.mat3.create();this.color=[];this.dynamic=true;this._sr=0;this._cr=1};PIXI.DisplayObject.prototype.constructor=PIXI.DisplayObject;PIXI.DisplayObject.prototype.setInteractive=function(b){this.interactive=b};Object.defineProperty(PIXI.DisplayObject.prototype,"interactive",{get:function(){return this._interactive},set:function(b){this._interactive=b;if(this.stage){this.stage.dirty=true}}});Object.defineProperty(PIXI.DisplayObject.prototype,"mask",{get:function(){return this._mask},set:function(b){this._mask=b;if(b){this.addFilter(b)}else{this.removeFilter()}}});PIXI.DisplayObject.prototype.addFilter=function(j){if(this.filter){return}this.filter=true;var b=new PIXI.FilterBlock();var e=new PIXI.FilterBlock();b.mask=j;e.mask=j;b.first=b.last=this;e.first=e.last=this;b.open=true;var d=b;var f=b;var i;var h;h=this.first._iPrev;if(h){i=h._iNext;d._iPrev=h;h._iNext=d}else{i=this}if(i){i._iPrev=f;f._iNext=i}var d=e;var f=e;var i=null;var h=null;h=this.last;i=h._iNext;if(i){i._iPrev=f;f._iNext=i}d._iPrev=h;h._iNext=d;var c=this;var g=this.last;while(c){if(c.last==g){c.last=e}c=c.parent}this.first=b;if(this.__renderGroup){this.__renderGroup.addFilterBlocks(b,e)}j.renderable=false};PIXI.DisplayObject.prototype.removeFilter=function(){if(!this.filter){return}this.filter=false;var d=this.first;var g=d._iNext;var h=d._iPrev;if(g){g._iPrev=h}if(h){h._iNext=g}this.first=d._iNext;var e=this.last;var g=e._iNext;var h=e._iPrev;if(g){g._iPrev=h}h._iNext=g;var f=e._iPrev;var c=this;while(c.last==e){c.last=f;c=c.parent;if(!c){break}}var b=d.mask;b.renderable=true;if(this.__renderGroup){this.__renderGroup.removeFilterBlocks(d,e)}};PIXI.DisplayObject.prototype.updateTransform=function(){if(this.rotation!==this.rotationCache){this.rotationCache=this.rotation;this._sr=Math.sin(this.rotation);this._cr=Math.cos(this.rotation)}var r=this.localTransform;var f=this.parent.worldTransform;var b=this.worldTransform;r[0]=this._cr*this.scale.x;r[1]=-this._sr*this.scale.y;r[3]=this._sr*this.scale.x;r[4]=this._cr*this.scale.y;var n=this.pivot.x;var m=this.pivot.y;var i=r[0],h=r[1],g=this.position.x-r[0]*n-m*r[1],q=r[3],p=r[4],o=this.position.y-r[4]*m-n*r[3],l=f[0],k=f[1],j=f[2],e=f[3],d=f[4],c=f[5];r[2]=g;r[5]=o;b[0]=l*i+k*q;b[1]=l*h+k*p;b[2]=l*g+k*o+j;b[3]=e*i+d*q;b[4]=e*h+d*p;b[5]=e*g+d*o+c;this.worldAlpha=this.alpha*this.parent.worldAlpha;this.vcount=PIXI.visibleCount};PIXI.visibleCount=0;PIXI.DisplayObjectContainer=function(){PIXI.DisplayObject.call(this);this.children=[]};PIXI.DisplayObjectContainer.prototype=Object.create(PIXI.DisplayObject.prototype);PIXI.DisplayObjectContainer.prototype.constructor=PIXI.DisplayObjectContainer;PIXI.DisplayObjectContainer.prototype.addChild=function(i){if(i.parent!=undefined){i.parent.removeChild(i)}i.parent=this;this.children.push(i);if(this.stage){var f=i;do{if(f.interactive){this.stage.dirty=true}f.stage=this.stage;f=f._iNext}while(f)}var e=i.first;var d=i.last;var g;var h;if(this.filter){h=this.last._iPrev}else{h=this.last}g=h._iNext;var c=this;var b=h;while(c){if(c.last==b){c.last=i.last}c=c.parent}if(g){g._iPrev=d;d._iNext=g}e._iPrev=h;h._iNext=e;if(this.__renderGroup){if(i.__renderGroup){i.__renderGroup.removeDisplayObjectAndChildren(i)}this.__renderGroup.addDisplayObjectAndChildren(i)}};PIXI.DisplayObjectContainer.prototype.addChildAt=function(c,f){if(f>=0&&f<=this.children.length){if(c.parent!=undefined){c.parent.removeChild(c)}c.parent=this;if(this.stage){var e=c;do{if(e.interactive){this.stage.dirty=true}e.stage=this.stage;e=e._iNext}while(e)}var d=c.first;var g=c.last;var j;var i;if(f==this.children.length){i=this.last;var b=this;var h=this.last;while(b){if(b.last==h){b.last=c.last}b=b.parent}}else{if(f==0){i=this}else{i=this.children[f-1].last}}j=i._iNext;if(j){j._iPrev=g;g._iNext=j}d._iPrev=i;i._iNext=d;this.children.splice(f,0,c);if(this.__renderGroup){if(c.__renderGroup){c.__renderGroup.removeDisplayObjectAndChildren(c)}this.__renderGroup.addDisplayObjectAndChildren(c)}}else{throw new Error(c+" The index "+f+" supplied is out of bounds "+this.children.length)}};PIXI.DisplayObjectContainer.prototype.swapChildren=function(c,b){return};PIXI.DisplayObjectContainer.prototype.getChildAt=function(b){if(b>=0&&b1){h=1}var d=Math.sqrt(c.x*c.x+c.y*c.y);var f=this.texture.height/2;c.x/=d;c.y/=d;c.x*=f;c.y*=f;b[g]=m.x+c.x;b[g+1]=m.y+c.y;b[g+2]=m.x-c.x;b[g+3]=m.y-c.y;l=m}PIXI.DisplayObjectContainer.prototype.updateTransform.call(this)};PIXI.Rope.prototype.setTexture=function(b){this.texture=b;this.updateFrame=true};PIXI.TilingSprite=function(d,c,b){PIXI.DisplayObjectContainer.call(this);this.texture=d;this.width=c;this.height=b;this.tileScale=new PIXI.Point(1,1);this.tilePosition=new PIXI.Point(0,0);this.renderable=true;this.blendMode=PIXI.blendModes.NORMAL};PIXI.TilingSprite.prototype=Object.create(PIXI.DisplayObjectContainer.prototype);PIXI.TilingSprite.prototype.constructor=PIXI.TilingSprite;PIXI.TilingSprite.prototype.setTexture=function(b){this.texture=b;this.updateFrame=true};PIXI.TilingSprite.prototype.onTextureUpdate=function(b){this.updateFrame=true};PIXI.FilterBlock=function(b){this.graphics=b;this.visible=true;this.renderable=true};PIXI.MaskFilter=function(b){this.graphics};PIXI.Graphics=function(){PIXI.DisplayObjectContainer.call(this);this.renderable=true;this.fillAlpha=1;this.lineWidth=0;this.lineColor="black";this.graphicsData=[];this.currentPath={points:[]}};PIXI.Graphics.prototype=Object.create(PIXI.DisplayObjectContainer.prototype);PIXI.Graphics.prototype.constructor=PIXI.Graphics;PIXI.Graphics.prototype.lineStyle=function(b,c,d){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.lineWidth=b||0;this.lineColor=c||0;this.lineAlpha=(d==undefined)?1:d;this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[],type:PIXI.Graphics.POLY};this.graphicsData.push(this.currentPath)};PIXI.Graphics.prototype.moveTo=function(b,c){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath=this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[],type:PIXI.Graphics.POLY};this.currentPath.points.push(b,c);this.graphicsData.push(this.currentPath)};PIXI.Graphics.prototype.lineTo=function(b,c){this.currentPath.points.push(b,c);this.dirty=true};PIXI.Graphics.prototype.beginFill=function(b,c){this.filling=true;this.fillColor=b||0;this.fillAlpha=(c==undefined)?1:c};PIXI.Graphics.prototype.endFill=function(){this.filling=false;this.fillColor=null;this.fillAlpha=1};PIXI.Graphics.prototype.drawRect=function(c,e,d,b){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[c,e,d,b],type:PIXI.Graphics.RECT};this.graphicsData.push(this.currentPath);this.dirty=true};PIXI.Graphics.prototype.drawCircle=function(c,d,b){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[c,d,b,b],type:PIXI.Graphics.CIRC};this.graphicsData.push(this.currentPath);this.dirty=true};PIXI.Graphics.prototype.drawElipse=function(c,e,d,b){if(this.currentPath.points.length==0){this.graphicsData.pop()}this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[c,e,d,b],type:PIXI.Graphics.ELIP};this.graphicsData.push(this.currentPath);this.dirty=true};PIXI.Graphics.prototype.clear=function(){this.lineWidth=0;this.filling=false;this.dirty=true;this.clearDirty=true;this.graphicsData=[]};PIXI.Graphics.POLY=0;PIXI.Graphics.RECT=1;PIXI.Graphics.CIRC=2;PIXI.Graphics.ELIP=3;PIXI.CanvasGraphics=function(){};PIXI.CanvasGraphics.renderGraphics=function(u,c){var p=u.worldAlpha;for(var s=0;s1){t=1;console.log("Pixi.js warning: masks in canvas can only mask using the first path in the graphics object")}for(var s=0;s<1;s++){var A=v.graphicsData[s];var r=A.points;if(A.type==PIXI.Graphics.POLY){c.beginPath();c.moveTo(r[0],r[1]);for(var q=1;q0){PIXI.Texture.frameUpdates=[]}};PIXI.CanvasRenderer.prototype.resize=function(c,b){this.width=c;this.height=b;this.view.width=c;this.view.height=b};PIXI.CanvasRenderer.prototype.renderDisplayObject=function(h){var e;var f=this.context;f.globalCompositeOperation="source-over";var d=h.last._iNext;h=h.first;do{e=h.worldTransform;if(!h.visible){h=h.last._iNext;continue}if(!h.renderable){h=h._iNext;continue}if(h instanceof PIXI.Sprite){var g=h.texture.frame;if(g){f.globalAlpha=h.worldAlpha;f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);f.drawImage(h.texture.baseTexture.source,g.x,g.y,g.width,g.height,(h.anchor.x)*-g.width,(h.anchor.y)*-g.height,g.width,g.height)}}else{if(h instanceof PIXI.Strip){f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);this.renderStrip(h)}else{if(h instanceof PIXI.TilingSprite){f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);this.renderTilingSprite(h)}else{if(h instanceof PIXI.CustomRenderable){h.renderCanvas(this)}else{if(h instanceof PIXI.Graphics){f.setTransform(e[0],e[3],e[1],e[4],e[2],e[5]);PIXI.CanvasGraphics.renderGraphics(h,f)}else{if(h instanceof PIXI.FilterBlock){if(h.open){f.save();var c=h.mask.alpha;var b=h.mask.worldTransform;f.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]);h.mask.worldAlpha=0.5;f.worldAlpha=0;PIXI.CanvasGraphics.renderGraphicsMask(h.mask,f);f.clip();h.mask.worldAlpha=c}else{f.restore()}}}}}}}h=h._iNext}while(h!=d)};PIXI.CanvasRenderer.prototype.renderStripFlat=function(d){var e=this.context;var f=d.verticies;var j=d.uvs;var g=f.length/2;this.count++;e.beginPath();for(var k=1;k3){PIXI.WebGLGraphics.buildPoly(d,b._webGL)}}if(d.lineWidth>0){PIXI.WebGLGraphics.buildLine(d,b._webGL)}}else{if(d.type==PIXI.Graphics.RECT){PIXI.WebGLGraphics.buildRectangle(d,b._webGL)}else{if(d.type==PIXI.Graphics.CIRC||d.type==PIXI.Graphics.ELIP){PIXI.WebGLGraphics.buildCircle(d,b._webGL)}}}}b._webGL.lastIndex=b.graphicsData.length;var e=PIXI.gl;b._webGL.glPoints=new Float32Array(b._webGL.points);e.bindBuffer(e.ARRAY_BUFFER,b._webGL.buffer);e.bufferData(e.ARRAY_BUFFER,b._webGL.glPoints,e.STATIC_DRAW);b._webGL.glIndicies=new Uint16Array(b._webGL.indices);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,b._webGL.indexBuffer);e.bufferData(e.ELEMENT_ARRAY_BUFFER,b._webGL.glIndicies,e.STATIC_DRAW)};PIXI.WebGLGraphics.buildRectangle=function(s,i){var f=s.points;var n=f[0];var m=f[1];var d=f[2];var q=f[3];if(s.fill){var h=HEXtoRGB(s.fillColor);var e=s.fillAlpha;var c=h[0]*e;var j=h[1]*e;var l=h[2]*e;var o=i.points;var p=i.indices;var k=o.length/6;o.push(n,m);o.push(c,j,l,e);o.push(n+d,m);o.push(c,j,l,e);o.push(n,m+q);o.push(c,j,l,e);o.push(n+d,m+q);o.push(c,j,l,e);p.push(k,k,k+1,k+2,k+3,k+3)}if(s.lineWidth){s.points=[n,m,n+d,m,n+d,m+q,n,m+q,n,m];PIXI.WebGLGraphics.buildLine(s,i)}};PIXI.WebGLGraphics.buildCircle=function(k,w){var f=k.points;var j=f[0];var h=f[1];var o=f[2];var n=f[3];var l=40;var t=(Math.PI*2)/l;if(k.fill){var p=HEXtoRGB(k.fillColor);var d=k.fillAlpha;var m=p[0]*d;var s=p[1]*d;var u=p[2]*d;var v=w.points;var e=w.indices;var c=v.length/6;e.push(c);for(var q=0;q140*140){h=L-z;f=K-w;m=Math.sqrt(h*h+f*f);h/=m;f/=m;h*=c;f*=c;S.push(B-h,A-f);S.push(M,T,W,Q);S.push(B+h,A+f);S.push(M,T,W,Q);S.push(B-h,A-f);S.push(M,T,W,Q);q++}else{S.push(px,py);S.push(M,T,W,Q);S.push(B-(px-B),A-(py-A));S.push(M,T,W,Q)}}J=H[(u-2)*2];I=H[(u-2)*2+1];B=H[(u-1)*2];A=H[(u-1)*2+1];L=-(I-A);K=J-B;m=Math.sqrt(L*L+K*K);L/=m;K/=m;L*=c;K*=c;S.push(B-L,A-K);S.push(M,T,W,Q);S.push(B+L,A+K);S.push(M,T,W,Q);l.push(U);for(var R=0;R>16&255)/255,(b>>8&255)/255,(b&255)/255]}PIXI._defaultFrame=new PIXI.Rectangle(0,0,1,1);PIXI.gl;PIXI.WebGLRenderer=function(g,b,d,j,c){this.transparent=!!j;this.width=g||800;this.height=b||600;this.view=d||document.createElement("canvas");this.view.width=this.width;this.view.height=this.height;var f=this;this.view.addEventListener("webglcontextlost",function(e){f.handleContextLost(e)},false);this.view.addEventListener("webglcontextrestored",function(e){f.handleContextRestored(e)},false);this.batchs=[];try{PIXI.gl=this.gl=this.view.getContext("experimental-webgl",{alpha:this.transparent,antialias:!!c,premultipliedAlpha:false,stencil:true})}catch(h){throw new Error(" This browser does not support webGL. Try using the canvas renderer"+this)}PIXI.initPrimitiveShader();PIXI.initDefaultShader();PIXI.initDefaultStripShader();PIXI.activateDefaultShader();var i=this.gl;PIXI.WebGLRenderer.gl=i;this.batch=new PIXI.WebGLBatch(i);i.disable(i.DEPTH_TEST);i.disable(i.CULL_FACE);i.enable(i.BLEND);i.colorMask(true,true,true,this.transparent);PIXI.projection=new PIXI.Point(400,300);this.resize(this.width,this.height);this.contextLost=false;this.stageRenderGroup=new PIXI.WebGLRenderGroup(this.gl)};PIXI.WebGLRenderer.prototype.constructor=PIXI.WebGLRenderer;PIXI.WebGLRenderer.getBatch=function(){if(PIXI._batchs.length==0){return new PIXI.WebGLBatch(PIXI.WebGLRenderer.gl)}else{return PIXI._batchs.pop()}};PIXI.WebGLRenderer.returnBatch=function(b){b.clean();PIXI._batchs.push(b)};PIXI.WebGLRenderer.prototype.render=function(b){if(this.contextLost){return}if(this.__stage!==b){this.__stage=b;this.stageRenderGroup.setRenderable(b)}PIXI.WebGLRenderer.updateTextures();PIXI.visibleCount++;b.updateTransform();var d=this.gl;d.colorMask(true,true,true,this.transparent);d.viewport(0,0,this.width,this.height);d.bindFramebuffer(d.FRAMEBUFFER,null);d.clearColor(b.backgroundColorSplit[0],b.backgroundColorSplit[1],b.backgroundColorSplit[2],!this.transparent);d.clear(d.COLOR_BUFFER_BIT);this.stageRenderGroup.backgroundColor=b.backgroundColorSplit;this.stageRenderGroup.render(PIXI.projection);if(b.interactive){if(!b._interactiveEventsAdded){b._interactiveEventsAdded=true;b.interactionManager.setTarget(this)}}if(PIXI.Texture.frameUpdates.length>0){for(var c=0;c0){n=n.children[n.children.length-1];if(n.renderable){b=n}}if(b instanceof PIXI.Sprite){c=b.batch;var l=c.head;if(l==b){h=0}else{h=1;while(l.__next!=b){h++;l=l.__next}}}else{c=b}if(m==c){if(m instanceof PIXI.WebGLBatch){m.render(p,h+1)}else{this.renderSpecial(m,j)}return}d=this.batchs.indexOf(m);q=this.batchs.indexOf(c);if(m instanceof PIXI.WebGLBatch){m.render(p)}else{this.renderSpecial(m,j)}for(var e=d+1;e=2?parseInt(b[b.length-2],10):PIXI.BitmapText.fonts[this.fontName].size;this.dirty=true};PIXI.BitmapText.prototype.updateText=function(){var h=PIXI.BitmapText.fonts[this.fontName];var m=new PIXI.Point();var j=null;var l=[];var q=0;var e=[];var p=0;var f=this.fontSize/h.size;for(var g=0;g0){this.removeChild(this.getChildAt(0))}this.updateText();this.dirty=false}PIXI.DisplayObjectContainer.prototype.updateTransform.call(this)};PIXI.BitmapText.fonts={};PIXI.Text=function(c,b){this.canvas=document.createElement("canvas");this.context=this.canvas.getContext("2d");PIXI.Sprite.call(this,PIXI.Texture.fromCanvas(this.canvas));this.setText(c);this.setStyle(b);this.updateText();this.dirty=false};PIXI.Text.prototype=Object.create(PIXI.Sprite.prototype);PIXI.Text.prototype.constructor=PIXI.Text;PIXI.Text.prototype.setStyle=function(b){b=b||{};b.font=b.font||"bold 20pt Arial";b.fill=b.fill||"black";b.align=b.align||"left";b.stroke=b.stroke||"black";b.strokeThickness=b.strokeThickness||0;b.wordWrap=b.wordWrap||false;b.wordWrapWidth=b.wordWrapWidth||100;this.style=b;this.dirty=true};PIXI.Sprite.prototype.setText=function(b){this.text=b.toString()||" ";this.dirty=true};PIXI.Text.prototype.updateText=function(){this.context.font=this.style.font;var g=this.text;if(this.style.wordWrap){g=this.wordWrap(this.text)}var f=g.split(/(?:\r\n|\r|\n)/);var d=[];var c=0;for(var h=0;hj){return k}else{return arguments.callee(i,l,k,h,j)}}else{return arguments.callee(i,l,m,k,j)}};var f=function(h,j,i){if(h.measureText(j).width<=i||j.length<1){return j}var k=e(h,j,0,j.length,i);return j.substring(0,k)+"\n"+arguments.callee(h,j.substring(k),i)};var b="";var c=g.split("\n");for(var d=0;dthis.baseTexture.width||b.y+b.height>this.baseTexture.height){throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this)}this.updateFrame=true;PIXI.Texture.frameUpdates.push(this)};PIXI.Texture.fromImage=function(c,b){var d=PIXI.TextureCache[c];if(!d){d=new PIXI.Texture(PIXI.BaseTexture.fromImage(c,b));PIXI.TextureCache[c]=d}return d};PIXI.Texture.fromFrame=function(c){var b=PIXI.TextureCache[c];if(!b){throw new Error("The frameId '"+c+"' does not exist in the texture cache "+this)}return b};PIXI.Texture.fromCanvas=function(b){var c=new PIXI.BaseTexture(b);return new PIXI.Texture(c)};PIXI.Texture.addTextureToCache=function(b,c){PIXI.TextureCache[c]=b};PIXI.Texture.removeTextureFromCache=function(c){var b=PIXI.TextureCache[c];PIXI.TextureCache[c]=null;return b};PIXI.Texture.frameUpdates=[];PIXI.RenderTexture=function(c,b){PIXI.EventTarget.call(this);this.width=c||100;this.height=b||100;this.indetityMatrix=PIXI.mat3.create();this.frame=new PIXI.Rectangle(0,0,this.width,this.height);if(PIXI.gl){this.initWebGL()}else{this.initCanvas()}};PIXI.RenderTexture.prototype=Object.create(PIXI.Texture.prototype);PIXI.RenderTexture.prototype.constructor=PIXI.RenderTexture;PIXI.RenderTexture.prototype.initWebGL=function(){var b=PIXI.gl;this.glFramebuffer=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,this.glFramebuffer);this.glFramebuffer.width=this.width;this.glFramebuffer.height=this.height;this.baseTexture=new PIXI.BaseTexture();this.baseTexture.width=this.width;this.baseTexture.height=this.height;this.baseTexture._glTexture=b.createTexture();b.bindTexture(b.TEXTURE_2D,this.baseTexture._glTexture);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,this.width,this.height,0,b.RGBA,b.UNSIGNED_BYTE,null);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);this.baseTexture.isRender=true;b.bindFramebuffer(b.FRAMEBUFFER,this.glFramebuffer);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.baseTexture._glTexture,0);this.projection=new PIXI.Point(this.width/2,this.height/2);this.render=this.renderWebGL};PIXI.RenderTexture.prototype.resize=function(c,b){this.width=c;this.height=b;if(PIXI.gl){this.projection.x=this.width/2;this.projection.y=this.height/2;var d=PIXI.gl;d.bindTexture(d.TEXTURE_2D,this.baseTexture._glTexture);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.width,this.height,0,d.RGBA,d.UNSIGNED_BYTE,null)}else{this.frame.width=this.width;this.frame.height=this.height;this.renderer.resize(this.width,this.height)}};PIXI.RenderTexture.prototype.initCanvas=function(){this.renderer=new PIXI.CanvasRenderer(this.width,this.height,null,0);this.baseTexture=new PIXI.BaseTexture(this.renderer.view);this.frame=new PIXI.Rectangle(0,0,this.width,this.height);this.render=this.renderCanvas};PIXI.RenderTexture.prototype.renderWebGL=function(k,g,h){var f=PIXI.gl;f.colorMask(true,true,true,true);f.viewport(0,0,this.width,this.height);f.bindFramebuffer(f.FRAMEBUFFER,this.glFramebuffer);if(h){f.clearColor(0,0,0,0);f.clear(f.COLOR_BUFFER_BIT)}var c=k.children;var b=k.worldTransform;k.worldTransform=PIXI.mat3.create();k.worldTransform[4]=-1;k.worldTransform[5]=this.projection.y*2;if(g){k.worldTransform[2]=g.x;k.worldTransform[5]-=g.y}PIXI.visibleCount++;k.vcount=PIXI.visibleCount;for(var e=0,d=c.length;e>1;if(k<3){return[]}var u=[];var g=[];for(var s=0;s3){var q=g[(s+0)%o];var m=g[(s+1)%o];var l=g[(s+2)%o];var f=h[2*q],d=h[2*q+1];var v=h[2*m],t=h[2*m+1];var c=h[2*l],b=h[2*l+1];var e=false;if(PIXI.PolyK._convex(f,d,v,t,c,b,z)){e=true;for(var r=0;r3*o){if(z){var u=[];g=[];for(var s=0;s=0)&&(m>=0)&&(n+m<1)};PIXI.PolyK._convex=function(e,d,g,f,b,h,c){return((d-f)*(b-g)+(g-e)*(h-f)>=0)==c};Phaser.Camera=function(d,g,c,f,e,b){this.game=d;this.world=d.world;this.id=0;this.view=new Phaser.Rectangle(c,f,e,b);this.screenView=new Phaser.Rectangle(c,f,e,b);this.deadzone=null;this.visible=true;this.atLimit={x:false,y:false};this.target=null;this._edge=0};Phaser.Camera.FOLLOW_LOCKON=0;Phaser.Camera.FOLLOW_PLATFORMER=1;Phaser.Camera.FOLLOW_TOPDOWN=2;Phaser.Camera.FOLLOW_TOPDOWN_TIGHT=3;Phaser.Camera.prototype={follow:function(f,d){if(typeof d==="undefined"){d=Phaser.Camera.FOLLOW_LOCKON}this.target=f;var e;switch(d){case Phaser.Camera.FOLLOW_PLATFORMER:var b=this.width/8;var c=this.height/3;this.deadzone=new Phaser.Rectangle((this.width-b)/2,(this.height-c)/2-c*0.25,b,c);break;case Phaser.Camera.FOLLOW_TOPDOWN:e=Math.max(this.width,this.height)/4;this.deadzone=new Phaser.Rectangle((this.width-e)/2,(this.height-e)/2,e,e);break;case Phaser.Camera.FOLLOW_TOPDOWN_TIGHT:e=Math.max(this.width,this.height)/8;this.deadzone=new Phaser.Rectangle((this.width-e)/2,(this.height-e)/2,e,e);break;case Phaser.Camera.FOLLOW_LOCKON:default:this.deadzone=null;break}},focusOnXY:function(b,c){this.view.x=Math.round(b-this.view.halfWidth);this.view.y=Math.round(c-this.view.halfHeight)},update:function(){if(this.target!==null){if(this.deadzone){this._edge=this.target.x-this.deadzone.x;if(this.view.x>this._edge){this.view.x=this._edge}this._edge=this.target.x+this.target.width-this.deadzone.x-this.deadzone.width;if(this.view.xthis._edge){this.view.y=this._edge}this._edge=this.target.y+this.target.height-this.deadzone.y-this.deadzone.height;if(this.view.ythis.world.bounds.right-this.width){this.atLimit.x=true;this.view.x=(this.world.bounds.right-this.width)+1}if(this.view.ythis.world.bounds.bottom-this.height){this.atLimit.y=true;this.view.y=(this.world.bounds.bottom-this.height)+1}this.view.floor()},setPosition:function(b,c){this.view.x=b;this.view.y=c;this.checkWorldBounds()},setSize:function(c,b){this.view.width=c;this.view.height=b}};Object.defineProperty(Phaser.Camera.prototype,"x",{get:function(){return this.view.x},set:function(b){this.view.x=b;this.checkWorldBounds()}});Object.defineProperty(Phaser.Camera.prototype,"y",{get:function(){return this.view.y},set:function(b){this.view.y=b;this.checkWorldBounds()}});Object.defineProperty(Phaser.Camera.prototype,"width",{get:function(){return this.view.width},set:function(b){this.view.width=b}});Object.defineProperty(Phaser.Camera.prototype,"height",{get:function(){return this.view.height},set:function(b){this.view.height=b}});Phaser.State=function(){this.game=null;this.add=null;this.camera=null;this.cache=null;this.input=null;this.load=null;this.math=null;this.sound=null;this.stage=null;this.time=null;this.tweens=null;this.world=null;this.particles=null;this.physics=null};Phaser.State.prototype={preload:function(){},create:function(){},update:function(){},render:function(){},paused:function(){},destroy:function(){}};Phaser.StateManager=function(c,b){this.game=c;this.states={};if(b!==null){this._pendingState=b}};Phaser.StateManager.prototype={game:null,_pendingState:null,_created:false,states:{},current:"",onInitCallback:null,onPreloadCallback:null,onCreateCallback:null,onUpdateCallback:null,onRenderCallback:null,onPreRenderCallback:null,onLoadUpdateCallback:null,onLoadRenderCallback:null,onPausedCallback:null,onShutDownCallback:null,boot:function(){if(this._pendingState!==null){if(typeof this._pendingState==="string"){this.start(this._pendingState,false,false)}else{this.add("default",this._pendingState,true)}}},add:function(c,d,b){if(typeof b==="undefined"){b=false}var e;if(d instanceof Phaser.State){e=d}else{if(typeof d==="object"){e=d;e.game=this.game}else{if(typeof d==="function"){e=new d(this.game)}}}this.states[c]=e;if(b){if(this.game.isBooted){this.start(c)}else{this._pendingState=c}}return e},remove:function(b){if(this.current==b){this.callbackContext=null;this.onInitCallback=null;this.onShutDownCallback=null;this.onPreloadCallback=null;this.onLoadRenderCallback=null;this.onLoadUpdateCallback=null;this.onCreateCallback=null;this.onUpdateCallback=null;this.onRenderCallback=null;this.onPausedCallback=null;this.onDestroyCallback=null}delete this.states[b]},start:function(c,b,d){if(typeof b==="undefined"){b=true}if(typeof d==="undefined"){d=false}if(this.game.isBooted==false){this._pendingState=c;return}if(this.checkState(c)==false){return}else{if(this.current){this.onShutDownCallback.call(this.callbackContext)}if(b){this.game.world.destroy();if(d==true){this.game.cache.destroy()}}this.setCurrentState(c)}if(this.onPreloadCallback){this.game.load.reset();this.onPreloadCallback.call(this.callbackContext);if(this.game.load.queueSize==0){this.game.loadComplete()}else{this.game.load.start()}}else{this.game.loadComplete()}},dummy:function(){},checkState:function(b){if(this.states[b]){var c=false;if(this.states[b]["preload"]){c=true}if(c==false&&this.states[b]["loadRender"]){c=true}if(c==false&&this.states[b]["loadUpdate"]){c=true}if(c==false&&this.states[b]["create"]){c=true}if(c==false&&this.states[b]["update"]){c=true}if(c==false&&this.states[b]["preRender"]){c=true}if(c==false&&this.states[b]["render"]){c=true}if(c==false&&this.states[b]["paused"]){c=true}if(c==false){console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions.");return false}return true}else{console.warn("Phaser.StateManager - No state found with the key: "+b);return false}},link:function(b){this.states[b].game=this.game;this.states[b].add=this.game.add;this.states[b].camera=this.game.camera;this.states[b].cache=this.game.cache;this.states[b].input=this.game.input;this.states[b].load=this.game.load;this.states[b].math=this.game.math;this.states[b].sound=this.game.sound;this.states[b].stage=this.game.stage;this.states[b].time=this.game.time;this.states[b].tweens=this.game.tweens;this.states[b].world=this.game.world;this.states[b].particles=this.game.particles;this.states[b].physics=this.game.physics;this.states[b].rnd=this.game.rnd},setCurrentState:function(b){this.callbackContext=this.states[b];this.link(b);this.onInitCallback=this.states[b]["init"]||this.dummy;this.onPreloadCallback=this.states[b]["preload"]||null;this.onLoadRenderCallback=this.states[b]["loadRender"]||null;this.onLoadUpdateCallback=this.states[b]["loadUpdate"]||null;this.onCreateCallback=this.states[b]["create"]||null;this.onUpdateCallback=this.states[b]["update"]||null;this.onPreRenderCallback=this.states[b]["preRender"]||null;this.onRenderCallback=this.states[b]["render"]||null;this.onPausedCallback=this.states[b]["paused"]||null;this.onShutDownCallback=this.states[b]["shutdown"]||this.dummy;this.current=b;this._created=false;this.onInitCallback.call(this.callbackContext)},loadComplete:function(){if(this._created==false&&this.onCreateCallback){this.onCreateCallback.call(this.callbackContext)}this._created=true},update:function(){if(this._created&&this.onUpdateCallback){this.onUpdateCallback.call(this.callbackContext)}else{if(this.onLoadUpdateCallback){this.onLoadUpdateCallback.call(this.callbackContext)}}},preRender:function(){if(this.onPreRenderCallback){this.onPreRenderCallback.call(this.callbackContext)}},render:function(){if(this._created&&this.onRenderCallback){this.onRenderCallback.call(this.callbackContext)}else{if(this.onLoadRenderCallback){this.onLoadRenderCallback.call(this.callbackContext)}}},destroy:function(){this.callbackContext=null;this.onInitCallback=null;this.onShutDownCallback=null;this.onPreloadCallback=null;this.onLoadRenderCallback=null;this.onLoadUpdateCallback=null;this.onCreateCallback=null;this.onUpdateCallback=null;this.onRenderCallback=null;this.onPausedCallback=null;this.onDestroyCallback=null;this.game=null;this.states={};this._pendingState=null}};Phaser.LinkedList=function(){this.next=null;this.prev=null;this.first=null;this.last=null;this.total=0};Phaser.LinkedList.prototype={add:function(b){if(this.total==0&&this.first==null&&this.last==null){this.first=b;this.last=b;this.next=b;b.prev=this;this.total++;return}this.last.next=b;b.prev=this.last;this.last=b;this.total++;return b},remove:function(c){if(this.first==null&&this.last==null){return}this.total--;if(this.first==c&&this.last==c){this.first=null;this.last=null;this.next=null;c.next=null;c.prev=null;return}var b=c.prev;if(c.next){c.next.prev=c.prev}b.next=c.next},callAll:function(c){if(!this.first||!this.last){return}var b=this.first;do{if(b&&b[c]){b[c].call(b)}b=b.next}while(b!=this.last.next)},dump:function(){var j=20;var e="\n"+Phaser.Utils.pad("Node",j)+"|"+Phaser.Utils.pad("Next",j)+"|"+Phaser.Utils.pad("Previous",j)+"|"+Phaser.Utils.pad("First",j)+"|"+Phaser.Utils.pad("Last",j);console.log(e);var e=Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j)+"|"+Phaser.Utils.pad("----------",j);console.log(e);var g=this;var c=g.last.next;g=g.first;do{var d=g.sprite.name||"*";var f="-";var b="-";var h="-";var i="-";if(g.next){f=g.next.sprite.name}if(g.prev){b=g.prev.sprite.name}if(g.first){h=g.first.sprite.name}if(g.last){i=g.last.sprite.name}if(typeof f==="undefined"){f="-"}if(typeof b==="undefined"){b="-"}if(typeof h==="undefined"){h="-"}if(typeof i==="undefined"){i="-"}var e=Phaser.Utils.pad(d,j)+"|"+Phaser.Utils.pad(f,j)+"|"+Phaser.Utils.pad(b,j)+"|"+Phaser.Utils.pad(h,j)+"|"+Phaser.Utils.pad(i,j);console.log(e);g=g.next}while(g!=c)}};Phaser.Signal=function(){this._bindings=[];this._prevParams=null;var b=this;this.dispatch=function(){Phaser.Signal.prototype.dispatch.apply(b,arguments)}};Phaser.Signal.prototype={memorize:false,_shouldPropagate:true,active:true,validateListener:function(b,c){if(typeof b!=="function"){throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",c))}},_registerListener:function(f,d,e,c){var b=this._indexOfListener(f,e),g;if(b!==-1){g=this._bindings[b];if(g.isOnce()!==d){throw new Error("You cannot add"+(d?"":"Once")+"() then add"+(!d?"":"Once")+"() the same listener without removing the relationship first.")}}else{g=new Phaser.SignalBinding(this,f,d,e,c);this._addBinding(g)}if(this.memorize&&this._prevParams){g.execute(this._prevParams)}return g},_addBinding:function(b){var c=this._bindings.length;do{--c}while(this._bindings[c]&&b._priority<=this._bindings[c]._priority);this._bindings.splice(c+1,0,b)},_indexOfListener:function(c,b){var e=this._bindings.length,d;while(e--){d=this._bindings[e];if(d._listener===c&&d.context===b){return e}}return -1},has:function(c,b){return this._indexOfListener(c,b)!==-1},add:function(d,c,b){this.validateListener(d,"add");return this._registerListener(d,false,c,b)},addOnce:function(d,c,b){this.validateListener(d,"addOnce");return this._registerListener(d,true,c,b)},remove:function(d,c){this.validateListener(d,"remove");var b=this._indexOfListener(d,c);if(b!==-1){this._bindings[b]._destroy();this._bindings.splice(b,1)}return d},removeAll:function(){var b=this._bindings.length;while(b--){this._bindings[b]._destroy()}this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=false},dispatch:function(c){if(!this.active){return}var b=Array.prototype.slice.call(arguments),e=this._bindings.length,d;if(this.memorize){this._prevParams=b}if(!e){return}d=this._bindings.slice();this._shouldPropagate=true;do{e--}while(d[e]&&this._shouldPropagate&&d[e].execute(b)!==false)},forget:function(){this._prevParams=null},dispose:function(){this.removeAll();delete this._bindings;delete this._prevParams},toString:function(){return"[Phaser.Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};Phaser.SignalBinding=function(f,e,c,d,b){this._listener=e;this._isOnce=c;this.context=d;this._signal=f;this._priority=b||0};Phaser.SignalBinding.prototype={active:true,params:null,execute:function(b){var d,c;if(this.active&&!!this._listener){c=this.params?this.params.concat(b):b;d=this._listener.apply(this.context,c);if(this._isOnce){this.detach()}}return d},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return(!!this._signal&&!!this._listener)},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal;delete this._listener;delete this.context},toString:function(){return"[Phaser.SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}};Phaser.Plugin=function(b,c){this.game=b;this.parent=c;this.active=false;this.visible=false;this.hasPreUpdate=false;this.hasUpdate=false;this.hasRender=false;this.hasPostRender=false};Phaser.Plugin.prototype={preUpdate:function(){},update:function(){},render:function(){},postRender:function(){},destroy:function(){this.game=null;this.parent=null;this.active=false;this.visible=false}};Phaser.PluginManager=function(b,c){this.game=b;this._parent=c;this.plugins=[];this._pluginsLength=0};Phaser.PluginManager.prototype={add:function(c){var b=false;if(typeof c==="function"){c=new c(this.game,this._parent)}else{c.game=this.game;c.parent=this._parent}if(typeof c.preUpdate==="function"){c.hasPreUpdate=true;b=true}if(typeof c.update==="function"){c.hasUpdate=true;b=true}if(typeof c.render==="function"){c.hasRender=true;b=true}if(typeof c.postRender==="function"){c.hasPostRender=true;b=true}if(b){if(c.hasPreUpdate||c.hasUpdate){c.active=true}if(c.hasRender||c.hasPostRender){c.visible=true}this._pluginsLength=this.plugins.push(c);return c}else{return null}},remove:function(b){this._pluginsLength--},preUpdate:function(){if(this._pluginsLength==0){return}for(this._p=0;this._p0&&this._container.first._iNext){var d=this._container.first._iNext;do{if((c==false||(c&&d.alive))&&(g==false||(g&&d.visible))){this.setProperty(d,e,f,b)}d=d._iNext}while(d!=this._container.last._iNext)}},addAll:function(c,d,b,e){this.setAll(c,d,b,e,1)},subAll:function(c,d,b,e){this.setAll(c,d,b,e,2)},multiplyAll:function(c,d,b,e){this.setAll(c,d,b,e,3)},divideAll:function(c,d,b,e){this.setAll(c,d,b,e,4)},callAllExists:function(f,b,e){var c=Array.prototype.splice.call(arguments,3);if(this._container.children.length>0&&this._container.first._iNext){var d=this._container.first._iNext;do{if(d.exists==e&&d[f]){d[f].apply(d,c)}d=d._iNext}while(d!=this._container.last._iNext)}},callAll:function(e,b){var c=Array.prototype.splice.call(arguments,2);if(this._container.children.length>0&&this._container.first._iNext){var d=this._container.first._iNext;do{if(d[e]){d[e].apply(d,c)}d=d._iNext}while(d!=this._container.last._iNext)}},forEach:function(e,b,d){if(typeof d=="undefined"){d=false}if(this._container.children.length>0&&this._container.first._iNext){var c=this._container.first._iNext;do{if(d==false||(d&&c.exists)){e.call(b,c)}c=c._iNext}while(c!=this._container.last._iNext)}},forEachAlive:function(d,b){if(this._container.children.length>0&&this._container.first._iNext){var c=this._container.first._iNext;do{if(c.alive){d.call(b,c)}c=c._iNext}while(c!=this._container.last._iNext)}},forEachDead:function(d,b){if(this._container.children.length>0&&this._container.first._iNext){var c=this._container.first._iNext;do{if(c.alive==false){d.call(b,c)}c=c._iNext}while(c!=this._container.last._iNext)}},getFirstExists:function(c){if(typeof c!=="boolean"){c=true}if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do{if(b.exists===c){return b}b=b._iNext}while(b!=this._container.last._iNext)}return null},getFirstAlive:function(){if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do{if(b.alive){return b}b=b._iNext}while(b!=this._container.last._iNext)}return null},getFirstDead:function(){if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do{if(!b.alive){return b}b=b._iNext}while(b!=this._container.last._iNext)}return null},countLiving:function(){var c=-1;if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do{if(b.alive){c++}b=b._iNext}while(b!=this._container.last._iNext)}return c},countDead:function(){var c=-1;if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do{if(!b.alive){c++}b=b._iNext}while(b!=this._container.last._iNext)}return c},getRandom:function(c,b){if(this._container.children.length==0){return null}c=c||0;b=b||this._container.children.length;return this.game.math.getRandom(this._container.children,c,b)},remove:function(b){b.events.onRemovedFromGroup.dispatch(b,this);this._container.removeChild(b);b.group=null},removeAll:function(){if(this._container.children.length==0){return}do{if(this._container.children[0].events){this._container.children[0].events.onRemovedFromGroup.dispatch(this._container.children[0],this)}this._container.removeChild(this._container.children[0])}while(this._container.children.length>0)},removeBetween:function(d,c){if(this._container.children.length==0){return}if(d>c||d<0||c>this._container.children.length){return false}for(var b=d;b=this.game.width){this.bounds.width=c}if(b>=this.game.height){this.bounds.height=b}},destroy:function(){this.camera.x=0;this.camera.y=0;this.game.input.reset(true);this.group.removeAll()}};Object.defineProperty(Phaser.World.prototype,"width",{get:function(){return this.bounds.width},set:function(b){this.bounds.width=b}});Object.defineProperty(Phaser.World.prototype,"height",{get:function(){return this.bounds.height},set:function(b){this.bounds.height=b}});Object.defineProperty(Phaser.World.prototype,"centerX",{get:function(){return this.bounds.halfWidth}});Object.defineProperty(Phaser.World.prototype,"centerY",{get:function(){return this.bounds.halfHeight}});Object.defineProperty(Phaser.World.prototype,"randomX",{get:function(){return Math.round(Math.random()*this.bounds.width)}});Object.defineProperty(Phaser.World.prototype,"randomY",{get:function(){return Math.round(Math.random()*this.bounds.height)}});Phaser.Game=function(e,b,g,d,f,h,c){e=e||800;b=b||600;g=g||Phaser.AUTO;d=d||"";f=f||null;h=h||false;c=c||true;this.id=Phaser.GAMES.push(this)-1;this.parent=d;this.width=e;this.height=b;this.transparent=h;this.antialias=c;this.renderer=null;this.state=new Phaser.StateManager(this,f);this._paused=false;this.renderType=g;this._loadComplete=false;this.isBooted=false;this.isRunning=false;this.raf=null;this.add=null;this.cache=null;this.input=null;this.load=null;this.math=null;this.net=null;this.sound=null;this.stage=null;this.time=null;this.tweens=null;this.world=null;this.physics=null;this.rnd=null;this.device=null;this.camera=null;this.canvas=null;this.context=null;this.debug=null;this.particles=null;var i=this;this._onBoot=function(){return i.boot()};if(document.readyState==="complete"||document.readyState==="interactive"){window.setTimeout(this._onBoot,0)}else{document.addEventListener("DOMContentLoaded",this._onBoot,false);window.addEventListener("load",this._onBoot,false)}return this};Phaser.Game.prototype={boot:function(){if(this.isBooted){return}if(!document.body){window.setTimeout(this._onBoot,20)}else{document.removeEventListener("DOMContentLoaded",this._onBoot);window.removeEventListener("load",this._onBoot);this.onPause=new Phaser.Signal;this.onResume=new Phaser.Signal;this.isBooted=true;this.device=new Phaser.Device();this.math=Phaser.Math;this.rnd=new Phaser.RandomDataGenerator([(Date.now()*Math.random()).toString()]);this.stage=new Phaser.Stage(this,this.width,this.height);this.setUpRenderer();this.world=new Phaser.World(this);this.add=new Phaser.GameObjectFactory(this);this.cache=new Phaser.Cache(this);this.load=new Phaser.Loader(this);this.time=new Phaser.Time(this);this.tweens=new Phaser.TweenManager(this);this.input=new Phaser.Input(this);this.sound=new Phaser.SoundManager(this);this.physics=new Phaser.Physics.Arcade(this);this.particles=new Phaser.Particles(this);this.plugins=new Phaser.PluginManager(this,this);this.net=new Phaser.Net(this);this.debug=new Phaser.Utils.Debug(this);this.load.onLoadComplete.add(this.loadComplete,this);this.stage.boot();this.world.boot();this.input.boot();this.sound.boot();this.state.boot();if(this.renderType==Phaser.CANVAS){console.log("%cPhaser "+Phaser.VERSION+" initialized. Rendering to Canvas","color: #ffff33; background: #000000")}else{console.log("%cPhaser "+Phaser.VERSION+" initialized. Rendering to WebGL","color: #ffff33; background: #000000")}this.isRunning=true;this._loadComplete=false;this.raf=new Phaser.RequestAnimationFrame(this);this.raf.start()}},setUpRenderer:function(){if(this.renderType===Phaser.CANVAS||(this.renderType===Phaser.AUTO&&this.device.webGL==false)){if(this.device.canvas){this.renderType=Phaser.CANVAS;this.renderer=new PIXI.CanvasRenderer(this.width,this.height,this.stage.canvas,this.transparent);Phaser.Canvas.setSmoothingEnabled(this.renderer.context,this.antialias);this.canvas=this.renderer.view;this.context=this.renderer.context}else{throw new Error("Phaser.Game - cannot create Canvas or WebGL context, aborting.")}}else{this.renderType=Phaser.WEBGL;this.renderer=new PIXI.WebGLRenderer(this.width,this.height,this.stage.canvas,this.transparent,this.antialias);this.canvas=this.renderer.view;this.context=null}Phaser.Canvas.addToDOM(this.renderer.view,this.parent,true);Phaser.Canvas.setTouchAction(this.renderer.view)},loadComplete:function(){this._loadComplete=true;this.state.loadComplete()},update:function(b){this.time.update(b);if(!this._paused){this.plugins.preUpdate();this.physics.preUpdate();this.input.update();this.tweens.update();this.sound.update();this.world.update();this.particles.update();this.state.update();this.plugins.update();this.renderer.render(this.stage._stage);this.plugins.render();this.state.render();this.plugins.postRender()}},destroy:function(){this.state.destroy();this.state=null;this.cache=null;this.input=null;this.load=null;this.sound=null;this.stage=null;this.time=null;this.world=null;this.isBooted=false}};Object.defineProperty(Phaser.Game.prototype,"paused",{get:function(){return this._paused},set:function(b){if(b===true){if(this._paused==false){this._paused=true;this.onPause.dispatch(this)}}else{if(this._paused){this._paused=false;this.onResume.dispatch(this)}}}});Phaser.Input=function(b){this.game=b;this.hitCanvas=null;this.hitContext=null};Phaser.Input.MOUSE_OVERRIDES_TOUCH=0;Phaser.Input.TOUCH_OVERRIDES_MOUSE=1;Phaser.Input.MOUSE_TOUCH_COMBINE=2;Phaser.Input.prototype={game:null,pollRate:0,_pollCounter:0,_oldPosition:null,_x:0,_y:0,disabled:false,multiInputOverride:Phaser.Input.MOUSE_TOUCH_COMBINE,position:null,speed:null,circle:null,scale:null,maxPointers:10,currentPointers:0,tapRate:200,doubleTapRate:300,holdRate:2000,justPressedRate:200,justReleasedRate:200,recordPointerHistory:false,recordRate:100,recordLimit:100,pointer1:null,pointer2:null,pointer3:null,pointer4:null,pointer5:null,pointer6:null,pointer7:null,pointer8:null,pointer9:null,pointer10:null,activePointer:null,mousePointer:null,mouse:null,keyboard:null,touch:null,mspointer:null,onDown:null,onUp:null,onTap:null,onHold:null,interactiveItems:new Phaser.LinkedList(),boot:function(){this.mousePointer=new Phaser.Pointer(this.game,0);this.pointer1=new Phaser.Pointer(this.game,1);this.pointer2=new Phaser.Pointer(this.game,2);this.mouse=new Phaser.Mouse(this.game);this.keyboard=new Phaser.Keyboard(this.game);this.touch=new Phaser.Touch(this.game);this.mspointer=new Phaser.MSPointer(this.game);this.onDown=new Phaser.Signal();this.onUp=new Phaser.Signal();this.onTap=new Phaser.Signal();this.onHold=new Phaser.Signal();this.scale=new Phaser.Point(1,1);this.speed=new Phaser.Point();this.position=new Phaser.Point();this._oldPosition=new Phaser.Point();this.circle=new Phaser.Circle(0,0,44);this.activePointer=this.mousePointer;this.currentPointers=0;this.hitCanvas=document.createElement("canvas");this.hitCanvas.width=1;this.hitCanvas.height=1;this.hitContext=this.hitCanvas.getContext("2d");this.mouse.start();this.keyboard.start();this.touch.start();this.mspointer.start();this.mousePointer.active=true},addPointer:function(){var c=0;for(var b=10;b>0;b--){if(this["pointer"+b]===null){c=b}}if(c==0){console.warn("You can only have 10 Pointer objects");return null}else{this["pointer"+c]=new Phaser.Pointer(this.game,c);return this["pointer"+c]}},update:function(){if(this.pollRate>0&&this._pollCounter0&&this._pollCounter=this.game.input.holdRate){if(this.game.input.multiInputOverride==Phaser.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==Phaser.Input.MOUSE_TOUCH_COMBINE||(this.game.input.multiInputOverride==Phaser.Input.TOUCH_OVERRIDES_MOUSE&&this.game.input.currentPointers==0)){this.game.input.onHold.dispatch(this)}this._holdSent=true}if(this.game.input.recordPointerHistory&&this.game.time.now>=this._nextDrop){this._nextDrop=this.game.time.now+this.game.input.recordRate;this._history.push({x:this.position.x,y:this.position.y});if(this._history.length>this.game.input.recordLimit){this._history.shift()}}}},move:function(c){if(this.game.input.pollLocked){return}if(c.button){this.button=c.button}this.clientX=c.clientX;this.clientY=c.clientY;this.pageX=c.pageX;this.pageY=c.pageY;this.screenX=c.screenX;this.screenY=c.screenY;this.x=(this.pageX-this.game.stage.offset.x)*this.game.input.scale.x;this.y=(this.pageY-this.game.stage.offset.y)*this.game.input.scale.y;this.position.setTo(this.x,this.y);this.circle.x=this.x;this.circle.y=this.y;if(this.game.input.multiInputOverride==Phaser.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==Phaser.Input.MOUSE_TOUCH_COMBINE||(this.game.input.multiInputOverride==Phaser.Input.TOUCH_OVERRIDES_MOUSE&&this.game.input.currentPointers==0)){this.game.input.activePointer=this;this.game.input.x=this.x;this.game.input.y=this.y;this.game.input.position.setTo(this.game.input.x,this.game.input.y);this.game.input.circle.x=this.game.input.x;this.game.input.circle.y=this.game.input.y}if(this.game.paused){return this}if(this.targetObject!==null&&this.targetObject.isDragged==true){if(this.targetObject.update(this)==false){this.targetObject=null}return this}this._highestRenderOrderID=-1;this._highestRenderObject=null;this._highestInputPriorityID=-1;if(this.game.input.interactiveItems.total>0){var b=this.game.input.interactiveItems.next;do{if(b.priorityID>this._highestInputPriorityID||(b.priorityID==this._highestInputPriorityID&&b.sprite.renderOrderID>this._highestRenderOrderID)){if(b.checkPointerOver(this)){this._highestRenderOrderID=b.sprite.renderOrderID;this._highestInputPriorityID=b.priorityID;this._highestRenderObject=b}}b=b.next}while(b!=null)}if(this._highestRenderObject==null){if(this.targetObject){this.targetObject._pointerOutHandler(this);this.targetObject=null}}else{if(this.targetObject==null){this.targetObject=this._highestRenderObject;this._highestRenderObject._pointerOverHandler(this)}else{if(this.targetObject==this._highestRenderObject){if(this._highestRenderObject.update(this)==false){this.targetObject=null}}else{this.targetObject._pointerOutHandler(this);this.targetObject=this._highestRenderObject;this.targetObject._pointerOverHandler(this)}}}return this},leave:function(b){this.withinGame=false;this.move(b)},stop:function(c){if(this._stateReset){c.preventDefault();return}this.timeUp=this.game.time.now;if(this.game.input.multiInputOverride==Phaser.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==Phaser.Input.MOUSE_TOUCH_COMBINE||(this.game.input.multiInputOverride==Phaser.Input.TOUCH_OVERRIDES_MOUSE&&this.game.input.currentPointers==0)){this.game.input.onUp.dispatch(this);if(this.duration>=0&&this.duration<=this.game.input.tapRate){if(this.timeUp-this.previousTapTime0){this.active=false}this.withinGame=false;this.isDown=false;this.isUp=true;if(this.isMouse==false){this.game.input.currentPointers--}if(this.game.input.interactiveItems.total>0){var b=this.game.input.interactiveItems.next;do{if(b){b._releasedHandler(this)}b=b.next}while(b!=null)}if(this.targetObject){this.targetObject._releasedHandler(this)}this.targetObject=null;return this},justPressed:function(b){b=b||this.game.input.justPressedRate;return(this.isDown===true&&(this.timeDown+b)>this.game.time.now)},justReleased:function(b){b=b||this.game.input.justReleasedRate;return(this.isUp===true&&(this.timeUp+b)>this.game.time.now)},reset:function(){if(this.isMouse==false){this.active=false}this.identifier=null;this.isDown=false;this.isUp=true;this.totalTouches=0;this._holdSent=false;this._history.length=0;this._stateReset=true;if(this.targetObject){this.targetObject._releasedHandler(this)}this.targetObject=null},toString:function(){return"[{Pointer (id="+this.id+" identifer="+this.identifier+" active="+this.active+" duration="+this.duration+" withinGame="+this.withinGame+" x="+this.x+" y="+this.y+" clientX="+this.clientX+" clientY="+this.clientY+" screenX="+this.screenX+" screenY="+this.screenY+" pageX="+this.pageX+" pageY="+this.pageY+")}]"}};Object.defineProperty(Phaser.Pointer.prototype,"duration",{get:function(){if(this.isUp){return -1}return this.game.time.now-this.timeDown}});Object.defineProperty(Phaser.Pointer.prototype,"worldX",{get:function(){return this.game.world.camera.x+this.x}});Object.defineProperty(Phaser.Pointer.prototype,"worldY",{get:function(){return this.game.world.camera.y+this.y}});Phaser.Touch=function(b){this.game=b;this.callbackContext=this.game;this.touchStartCallback=null;this.touchMoveCallback=null;this.touchEndCallback=null;this.touchEnterCallback=null;this.touchLeaveCallback=null;this.touchCancelCallback=null;this.preventDefault=true};Phaser.Touch.prototype={game:null,disabled:false,_onTouchStart:null,_onTouchMove:null,_onTouchEnd:null,_onTouchEnter:null,_onTouchLeave:null,_onTouchCancel:null,_onTouchMove:null,start:function(){var b=this;if(this.game.device.touch){this._onTouchStart=function(c){return b.onTouchStart(c)};this._onTouchMove=function(c){return b.onTouchMove(c)};this._onTouchEnd=function(c){return b.onTouchEnd(c)};this._onTouchEnter=function(c){return b.onTouchEnter(c)};this._onTouchLeave=function(c){return b.onTouchLeave(c)};this._onTouchCancel=function(c){return b.onTouchCancel(c)};this.game.renderer.view.addEventListener("touchstart",this._onTouchStart,false);this.game.renderer.view.addEventListener("touchmove",this._onTouchMove,false);this.game.renderer.view.addEventListener("touchend",this._onTouchEnd,false);this.game.renderer.view.addEventListener("touchenter",this._onTouchEnter,false);this.game.renderer.view.addEventListener("touchleave",this._onTouchLeave,false);this.game.renderer.view.addEventListener("touchcancel",this._onTouchCancel,false)}},consumeDocumentTouches:function(){this._documentTouchMove=function(b){b.preventDefault()};document.addEventListener("touchmove",this._documentTouchMove,false)},onTouchStart:function(c){if(this.touchStartCallback){this.touchStartCallback.call(this.callbackContext,c)}if(this.game.input.disabled||this.disabled){return}if(this.preventDefault){c.preventDefault()}for(var b=0;bb&&this._tempPoint.xc&&this._tempPoint.y=this.pixelPerfectAlpha){return true}}return false},update:function(b){if(this.enabled==false||this.sprite.visible==false){this._pointerOutHandler(b);return false}if(this.draggable&&this._draggedPointerID==b.id){return this.updateDrag(b)}else{if(this._pointerData[b.id].isOver==true){if(this.checkPointerOver(b)){this._pointerData[b.id].x=b.x-this.sprite.x;this._pointerData[b.id].y=b.y-this.sprite.y;return true}else{this._pointerOutHandler(b);return false}}}},_pointerOverHandler:function(b){if(this._pointerData[b.id].isOver==false){this._pointerData[b.id].isOver=true;this._pointerData[b.id].isOut=false;this._pointerData[b.id].timeOver=this.game.time.now;this._pointerData[b.id].x=b.x-this.sprite.x;this._pointerData[b.id].y=b.y-this.sprite.y;if(this.useHandCursor&&this._pointerData[b.id].isDragged==false){this.game.stage.canvas.style.cursor="pointer"}this.sprite.events.onInputOver.dispatch(this.sprite,b)}},_pointerOutHandler:function(b){this._pointerData[b.id].isOver=false;this._pointerData[b.id].isOut=true;this._pointerData[b.id].timeOut=this.game.time.now;if(this.useHandCursor&&this._pointerData[b.id].isDragged==false){this.game.stage.canvas.style.cursor="default"}this.sprite.events.onInputOut.dispatch(this.sprite,b)},_touchedHandler:function(b){if(this._pointerData[b.id].isDown==false&&this._pointerData[b.id].isOver==true){this._pointerData[b.id].isDown=true;this._pointerData[b.id].isUp=false;this._pointerData[b.id].timeDown=this.game.time.now;this.sprite.events.onInputDown.dispatch(this.sprite,b);if(this.draggable&&this.isDragged==false){this.startDrag(b)}if(this.bringToTop){this.sprite.bringToTop()}}return this.consumePointerEvent},_releasedHandler:function(b){if(this._pointerData[b.id].isDown&&b.isUp){this._pointerData[b.id].isDown=false;this._pointerData[b.id].isUp=true;this._pointerData[b.id].timeUp=this.game.time.now;this._pointerData[b.id].downDuration=this._pointerData[b.id].timeUp-this._pointerData[b.id].timeDown;if(this.checkPointerOver(b)){this.sprite.events.onInputUp.dispatch(this.sprite,b)}else{if(this.useHandCursor){this.game.stage.canvas.style.cursor="default"}}if(this.draggable&&this.isDragged&&this._draggedPointerID==b.id){this.stopDrag(b)}}},updateDrag:function(b){if(b.isUp){this.stopDrag(b);return false}if(this.allowHorizontalDrag){this.sprite.x=b.x+this._dragPoint.x+this.dragOffset.x}if(this.allowVerticalDrag){this.sprite.y=b.y+this._dragPoint.y+this.dragOffset.y}if(this.boundsRect){this.checkBoundsRect()}if(this.boundsSprite){this.checkBoundsSprite()}if(this.snapOnDrag){this.sprite.x=Math.floor(this.sprite.x/this.snapX)*this.snapX;this.sprite.y=Math.floor(this.sprite.y/this.snapY)*this.snapY}return true},justOver:function(c,b){c=c||0;b=b||500;return(this._pointerData[c].isOver&&this.overDuration(c)this.boundsRect.right){this.sprite.x=this.boundsRect.right-this.sprite.width}}if(this.sprite.ythis.boundsRect.bottom){this.sprite.y=this.boundsRect.bottom-this.sprite.height}}},checkBoundsSprite:function(){if(this.sprite.x(this.boundsSprite.x+this.boundsSprite.width)){this.sprite.x=(this.boundsSprite.x+this.boundsSprite.width)-this.sprite.width}}if(this.sprite.y(this.boundsSprite.y+this.boundsSprite.height)){this.sprite.y=(this.boundsSprite.y+this.boundsSprite.height)-this.sprite.height}}}};Phaser.Events=function(b){this.parent=b;this.onAddedToGroup=new Phaser.Signal;this.onRemovedFromGroup=new Phaser.Signal;this.onKilled=new Phaser.Signal;this.onRevived=new Phaser.Signal;this.onOutOfBounds=new Phaser.Signal;this.onInputOver=null;this.onInputOut=null;this.onInputDown=null;this.onInputUp=null;this.onDragStart=null;this.onDragStop=null;this.onAnimationStart=null;this.onAnimationComplete=null;this.onAnimationLoop=null};Phaser.GameObjectFactory=function(b){this.game=b;this.world=this.game.world};Phaser.GameObjectFactory.prototype={game:null,world:null,existing:function(b){return this.world.group.add(b)},sprite:function(b,e,c,d){return this.world.group.add(new Phaser.Sprite(this.game,b,e,c,d))},child:function(d,b,g,c,e){var f=this.world.group.add(new Phaser.Sprite(this.game,b,g,c,e));d.addChild(f);return f},tween:function(b){return this.game.tweens.create(b)},group:function(c,b){return new Phaser.Group(this.game,c,b)},audio:function(c,d,b){return this.game.sound.add(c,d,b)},tileSprite:function(c,g,e,b,d,f){return this.world.group.add(new Phaser.TileSprite(this.game,c,g,e,b,d,f))},text:function(b,e,d,c){return this.world.group.add(new Phaser.Text(this.game,b,e,d,c))},button:function(b,i,g,h,e,d,f,c){return this.world.group.add(new Phaser.Button(this.game,b,i,g,h,e,d,f,c))},graphics:function(b,c){return this.world.group.add(new Phaser.Graphics(this.game,b,c))},emitter:function(b,d,c){return this.game.particles.add(new Phaser.Particles.Arcade.Emitter(this.game,b,d,c))},bitmapText:function(b,e,d,c){return this.world.group.add(new Phaser.BitmapText(this.game,b,e,d,c))},tilemap:function(b,g,d,e,f,c){return this.world.group.add(new Phaser.Tilemap(this.game,d,b,g,e,f,c))},renderTexture:function(c,d,b){var e=new Phaser.RenderTexture(this.game,c,d,b);this.game.cache.addRenderTexture(c,e);return e}};Phaser.Sprite=function(c,b,f,d,e){b=b||0;f=f||0;d=d||null;e=e||null;this.game=c;this.exists=true;this.alive=true;this.group=null;this.name="";this.type=Phaser.SPRITE;this.renderOrderID=-1;this.lifespan=0;this.events=new Phaser.Events(this);this.animations=new Phaser.AnimationManager(this);this.input=new Phaser.InputHandler(this);this.key=d;if(d instanceof Phaser.RenderTexture){PIXI.Sprite.call(this,d);this.currentFrame=this.game.cache.getTextureFrame(d.name)}else{if(d==null||this.game.cache.checkImageKey(d)==false){d="__default"}PIXI.Sprite.call(this,PIXI.TextureCache[d]);if(this.game.cache.isSpriteSheet(d)){this.animations.loadFrameData(this.game.cache.getFrameData(d));if(e!==null){if(typeof e==="string"){this.frameName=e}else{this.frame=e}}}else{this.currentFrame=this.game.cache.getFrame(d)}}this.anchor=new Phaser.Point();this._cropUUID=null;this._cropRect=null;this.x=b;this.y=f;this.position.x=b;this.position.y=f;this.autoCull=false;this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:f,id:1,i01:0,i10:0,idi:1,left:null,right:null,top:null,bottom:null,x:-1,y:-1,scaleX:1,scaleY:1,width:this.currentFrame.sourceSizeW,height:this.currentFrame.sourceSizeH,halfWidth:Math.floor(this.currentFrame.sourceSizeW/2),halfHeight:Math.floor(this.currentFrame.sourceSizeH/2),frameID:this.currentFrame.uuid,frameWidth:this.currentFrame.width,frameHeight:this.currentFrame.height,boundsX:0,boundsY:0,cameraVisible:true};this.offset=new Phaser.Point;this.center=new Phaser.Point(b+Math.floor(this._cache.width/2),f+Math.floor(this._cache.height/2));this.topLeft=new Phaser.Point(b,f);this.topRight=new Phaser.Point(b+this._cache.width,f);this.bottomRight=new Phaser.Point(b+this._cache.width,f+this._cache.height);this.bottomLeft=new Phaser.Point(b,f+this._cache.height);this.bounds=new Phaser.Rectangle(b,f,this._cache.width,this._cache.height);this.body=new Phaser.Physics.Arcade.Body(this);this.velocity=this.body.velocity;this.acceleration=this.body.acceleration;this.inWorld=Phaser.Rectangle.intersects(this.bounds,this.game.world.bounds);this.inWorldThreshold=0;this._outOfBoundsFired=false};Phaser.Sprite.prototype=Object.create(PIXI.Sprite.prototype);Phaser.Sprite.prototype.constructor=Phaser.Sprite;Phaser.Sprite.prototype.preUpdate=function(){if(!this.exists){this.renderOrderID=-1;return}if(this.lifespan>0){this.lifespan-=this.game.time.elapsed;if(this.lifespan<=0){this.kill();return}}this._cache.dirty=false;if(this.animations.update()){this._cache.dirty=true}this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}if(this.visible){this.renderOrderID=this.game.world.currentRenderOrderID++}if(this.worldTransform[0]!=this._cache.a00||this.worldTransform[1]!=this._cache.a01){this._cache.a00=this.worldTransform[0];this._cache.a01=this.worldTransform[1];this._cache.i01=this.worldTransform[1];this._cache.scaleX=Math.sqrt((this._cache.a00*this._cache.a00)+(this._cache.a01*this._cache.a01));this._cache.a01*=-1;this._cache.dirty=true}if(this.worldTransform[3]!=this._cache.a10||this.worldTransform[4]!=this._cache.a11){this._cache.a10=this.worldTransform[3];this._cache.i10=this.worldTransform[3];this._cache.a11=this.worldTransform[4];this._cache.scaleY=Math.sqrt((this._cache.a10*this._cache.a10)+(this._cache.a11*this._cache.a11));this._cache.a10*=-1;this._cache.dirty=true}if(this.worldTransform[2]!=this._cache.a02||this.worldTransform[5]!=this._cache.a12){this._cache.a02=this.worldTransform[2];this._cache.a12=this.worldTransform[5];this._cache.dirty=true}if(this.currentFrame.uuid!=this._cache.frameID){this._cache.frameWidth=this.texture.frame.width;this._cache.frameHeight=this.texture.frame.height;this._cache.frameID=this.currentFrame.uuid;this._cache.dirty=true}if(this._cache.dirty){this._cache.width=Math.floor(this.currentFrame.sourceSizeW*this._cache.scaleX);this._cache.height=Math.floor(this.currentFrame.sourceSizeH*this._cache.scaleY);this._cache.halfWidth=Math.floor(this._cache.width/2);this._cache.halfHeight=Math.floor(this._cache.height/2);this._cache.id=1/(this._cache.a00*this._cache.a11+this._cache.a01*-this._cache.a10);this._cache.idi=1/(this._cache.a00*this._cache.a11+this._cache.i01*-this._cache.i10);this.updateBounds()}if(this._cache.dirty){this._cache.cameraVisible=Phaser.Rectangle.intersects(this.game.world.camera.screenView,this.bounds,0);if(this.autoCull==true){this.renderable=this._cache.cameraVisible}this.body.updateBounds(this.center.x,this.center.y,this._cache.scaleX,this._cache.scaleY)}this.body.update()};Phaser.Sprite.prototype.postUpdate=function(){if(this.exists){this.body.postUpdate()}};Phaser.Sprite.prototype.centerOn=function(b,c){this.x=b+(this.x-this.center.x);this.y=c+(this.y-this.center.y)};Phaser.Sprite.prototype.revive=function(){this.alive=true;this.exists=true;this.visible=true;this.events.onRevived.dispatch(this)};Phaser.Sprite.prototype.kill=function(){this.alive=false;this.exists=false;this.visible=false;this.events.onKilled.dispatch(this)};Phaser.Sprite.prototype.reset=function(b,c){this.x=b;this.y=c;this.position.x=b;this.position.y=c;this.alive=true;this.exists=true;this.visible=true;this._outOfBoundsFired=false;this.body.reset()};Phaser.Sprite.prototype.updateBounds=function(){this.offset.setTo(this._cache.a02-(this.anchor.x*this._cache.width),this._cache.a12-(this.anchor.y*this._cache.height));this.getLocalPosition(this.center,this.offset.x+this._cache.halfWidth,this.offset.y+this._cache.halfHeight);this.getLocalPosition(this.topLeft,this.offset.x,this.offset.y);this.getLocalPosition(this.topRight,this.offset.x+this._cache.width,this.offset.y);this.getLocalPosition(this.bottomLeft,this.offset.x,this.offset.y+this._cache.height);this.getLocalPosition(this.bottomRight,this.offset.x+this._cache.width,this.offset.y+this._cache.height);this._cache.left=Phaser.Math.min(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);this._cache.right=Phaser.Math.max(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);this._cache.top=Phaser.Math.min(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);this._cache.bottom=Phaser.Math.max(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);this.bounds.setTo(this._cache.left,this._cache.top,this._cache.right-this._cache.left,this._cache.bottom-this._cache.top);this._cache.boundsX=this._cache.x;this._cache.boundsY=this._cache.y;if(this.inWorld==false){this.inWorld=Phaser.Rectangle.intersects(this.bounds,this.game.world.bounds,this.inWorldThreshold);if(this.inWorld){this._outOfBoundsFired=false}}else{this.inWorld=Phaser.Rectangle.intersects(this.bounds,this.game.world.bounds,this.inWorldThreshold);if(this.inWorld==false){this.events.onOutOfBounds.dispatch(this);this._outOfBoundsFired=true}}};Phaser.Sprite.prototype.getLocalPosition=function(c,b,d){c.x=((this._cache.a11*this._cache.id*b+-this._cache.a01*this._cache.id*d+(this._cache.a12*this._cache.a01-this._cache.a02*this._cache.a11)*this._cache.id)*this._cache.scaleX)+this._cache.a02;c.y=((this._cache.a00*this._cache.id*d+-this._cache.a10*this._cache.id*b+(-this._cache.a12*this._cache.a00+this._cache.a02*this._cache.a10)*this._cache.id)*this._cache.scaleY)+this._cache.a12;return c};Phaser.Sprite.prototype.getLocalUnmodifiedPosition=function(c,b,d){c.x=this._cache.a11*this._cache.idi*b+-this._cache.i01*this._cache.idi*d+(this._cache.a12*this._cache.i01-this._cache.a02*this._cache.a11)*this._cache.idi;c.y=this._cache.a00*this._cache.idi*d+-this._cache.i10*this._cache.idi*b+(-this._cache.a12*this._cache.a00+this._cache.a02*this._cache.i10)*this._cache.idi;return c};Phaser.Sprite.prototype.bringToTop=function(){if(this.group){this.group.bringToTop(this)}else{this.game.world.bringToTop(this)}};Phaser.Sprite.prototype.getBounds=function(d){d=d||new Phaser.Rectangle;var f=Phaser.Math.min(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);var c=Phaser.Math.max(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x);var e=Phaser.Math.min(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);var b=Phaser.Math.max(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y);d.x=f;d.y=e;d.width=c-f;d.height=b-e;return d};Object.defineProperty(Phaser.Sprite.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.Sprite.prototype,"frame",{get:function(){return this.animations.frame},set:function(b){this.animations.frame=b}});Object.defineProperty(Phaser.Sprite.prototype,"frameName",{get:function(){return this.animations.frameName},set:function(b){this.animations.frameName=b}});Object.defineProperty(Phaser.Sprite.prototype,"inCamera",{get:function(){return this._cache.cameraVisible}});Object.defineProperty(Phaser.Sprite.prototype,"crop",{get:function(){return this._cropRect},set:function(b){if(b instanceof Phaser.Rectangle){if(this._cropUUID==null){this._cropUUID=this.game.rnd.uuid();PIXI.TextureCache[this._cropUUID]=new PIXI.Texture(PIXI.BaseTextureCache[this.key],{x:b.x,y:b.y,width:b.width,height:b.height})}else{PIXI.TextureCache[this._cropUUID].frame=b}this._cropRect=b;this.setTexture(PIXI.TextureCache[this._cropUUID])}}});Object.defineProperty(Phaser.Sprite.prototype,"inputEnabled",{get:function(){return(this.input.enabled)},set:function(b){if(b){if(this.input.enabled==false){this.input.start()}}else{if(this.input.enabled){this.input.stop()}}}});Phaser.TileSprite=function(d,c,h,f,b,e,g){c=c||0;h=h||0;f=f||256;b=b||256;e=e||null;g=g||null;Phaser.Sprite.call(this,d,c,h,e,g);this.texture=PIXI.TextureCache[e];PIXI.TilingSprite.call(this,this.texture,f,b);this.type=Phaser.TILESPRITE;this.tileScale=new Phaser.Point(1,1);this.tilePosition=new Phaser.Point(0,0)};Phaser.TileSprite.prototype=Phaser.Utils.extend(true,PIXI.TilingSprite.prototype,Phaser.Sprite.prototype);Phaser.TileSprite.prototype.constructor=Phaser.TileSprite;Phaser.Text=function(c,b,f,e,d){b=b||0;f=f||0;e=e||"";d=d||"";this.exists=true;this.alive=true;this.group=null;this.name="";this.game=c;this._text=e;this._style=d;PIXI.Text.call(this,e,d);this.type=Phaser.TEXT;this.position.x=this.x=b;this.position.y=this.y=f;this.anchor=new Phaser.Point();this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:f,id:1,x:-1,y:-1,scaleX:1,scaleY:1};this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);this.renderable=true};Phaser.Text.prototype=Object.create(PIXI.Text.prototype);Phaser.Text.prototype.constructor=Phaser.Text;Phaser.Text.prototype.update=function(){if(!this.exists){return}this._cache.dirty=false;this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}};Object.defineProperty(Phaser.Text.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.Text.prototype,"text",{get:function(){return this._text},set:function(b){if(b!==this._text){this._text=b;this.dirty=true}}});Object.defineProperty(Phaser.Text.prototype,"style",{get:function(){return this._style},set:function(b){if(b!==this._style){this._style=b;this.dirty=true}}});Phaser.BitmapText=function(c,b,f,e,d){b=b||0;f=f||0;e=e||"";d=d||"";this.exists=true;this.alive=true;this.group=null;this.name="";this.game=c;PIXI.BitmapText.call(this,e,d);this.type=Phaser.BITMAPTEXT;this.position.x=b;this.position.y=f;this.anchor=new Phaser.Point();this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:f,id:1,x:-1,y:-1,scaleX:1,scaleY:1};this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);this.renderable=true};Phaser.BitmapText.prototype=Object.create(PIXI.BitmapText.prototype);Phaser.BitmapText.prototype.constructor=Phaser.BitmapText;Phaser.BitmapText.prototype.update=function(){if(!this.exists){return}this._cache.dirty=false;this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}};Object.defineProperty(Phaser.BitmapText.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.BitmapText.prototype,"x",{get:function(){return this.position.x},set:function(b){this.position.x=b}});Object.defineProperty(Phaser.BitmapText.prototype,"y",{get:function(){return this.position.y},set:function(b){this.position.y=b}});Phaser.Button=function(j,g,f,h,i,c,d,b,e){g=g||0;f=f||0;h=h||null;i=i||null;c=c||this;Phaser.Sprite.call(this,j,g,f,h,b);this.type=Phaser.BUTTON;this._onOverFrameName=null;this._onOutFrameName=null;this._onDownFrameName=null;this._onUpFrameName=null;this._onOverFrameID=null;this._onOutFrameID=null;this._onDownFrameID=null;this._onUpFrameID=null;this.onInputOver=new Phaser.Signal;this.onInputOut=new Phaser.Signal;this.onInputDown=new Phaser.Signal;this.onInputUp=new Phaser.Signal;this.setFrames(d,b,e);if(i!==null){this.onInputUp.add(i,c)}this.input.start(0,false,true);this.events.onInputOver.add(this.onInputOverHandler,this);this.events.onInputOut.add(this.onInputOutHandler,this);this.events.onInputDown.add(this.onInputDownHandler,this);this.events.onInputUp.add(this.onInputUpHandler,this)};Phaser.Button.prototype=Phaser.Utils.extend(true,Phaser.Sprite.prototype,PIXI.Sprite.prototype);Phaser.Button.prototype.constructor=Phaser.Button;Phaser.Button.prototype.setFrames=function(c,d,b){if(c!==null){if(typeof c==="string"){this._onOverFrameName=c}else{this._onOverFrameID=c}}if(d!==null){if(typeof d==="string"){this._onOutFrameName=d;this._onUpFrameName=d}else{this._onOutFrameID=d;this._onUpFrameID=d}}if(b!==null){if(typeof b==="string"){this._onDownFrameName=b}else{this._onDownFrameID=b}}};Phaser.Button.prototype.onInputOverHandler=function(b){if(this._onOverFrameName!=null){this.frameName=this._onOverFrameName}else{if(this._onOverFrameID!=null){this.frame=this._onOverFrameID}}if(this.onInputOver){this.onInputOver.dispatch(this,b)}};Phaser.Button.prototype.onInputOutHandler=function(b){if(this._onOutFrameName!=null){this.frameName=this._onOutFrameName}else{if(this._onOutFrameID!=null){this.frame=this._onOutFrameID}}if(this.onInputOut){this.onInputOut.dispatch(this,b)}};Phaser.Button.prototype.onInputDownHandler=function(b){if(this._onDownFrameName!=null){this.frameName=this._onDownFrameName}else{if(this._onDownFrameID!=null){this.frame=this._onDownFrameID}}if(this.onInputDown){this.onInputDown.dispatch(this,b)}};Phaser.Button.prototype.onInputUpHandler=function(b){if(this._onUpFrameName!=null){this.frameName=this._onUpFrameName}else{if(this._onUpFrameID!=null){this.frame=this._onUpFrameID}}if(this.onInputUp){this.onInputUp.dispatch(this,b)}};Phaser.Graphics=function(c,b,d){this.exists=true;this.alive=true;this.group=null;this.name="";this.game=c;PIXI.DisplayObjectContainer.call(this);this.type=Phaser.GRAPHICS;this.position.x=b;this.position.y=d;this.scale=new Phaser.Point(1,1);this.scrollFactor=new Phaser.Point(1,1);this._cache={dirty:false,a00:1,a01:0,a02:b,a10:0,a11:1,a12:d,id:1,x:-1,y:-1,scaleX:1,scaleY:1};this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);this.renderable=true;this.fillAlpha=1;this.lineWidth=0;this.lineColor="black";this.graphicsData=[];this.currentPath={points:[]}};Phaser.Graphics.prototype=Phaser.Utils.extend(true,PIXI.Graphics.prototype,PIXI.DisplayObjectContainer.prototype,Phaser.Sprite.prototype);Phaser.Graphics.prototype.constructor=Phaser.Graphics;Phaser.Graphics.prototype.update=function(){if(!this.exists){return}this._cache.dirty=false;this._cache.x=this.x-(this.game.world.camera.x*this.scrollFactor.x);this._cache.y=this.y-(this.game.world.camera.y*this.scrollFactor.y);if(this.position.x!=this._cache.x||this.position.y!=this._cache.y){this.position.x=this._cache.x;this.position.y=this._cache.y;this._cache.dirty=true}};Object.defineProperty(Phaser.Graphics.prototype,"angle",{get:function(){return Phaser.Math.radToDeg(this.rotation)},set:function(b){this.rotation=Phaser.Math.degToRad(b)}});Object.defineProperty(Phaser.Graphics.prototype,"x",{get:function(){return this.position.x},set:function(b){this.position.x=b}});Object.defineProperty(Phaser.Graphics.prototype,"y",{get:function(){return this.position.y},set:function(b){this.position.y=b}});Phaser.RenderTexture=function(c,d,e,b){this.game=c;this.name=d;PIXI.EventTarget.call(this);this.width=e||100;this.height=b||100;this.indetityMatrix=PIXI.mat3.create();this.frame=new PIXI.Rectangle(0,0,this.width,this.height);this.type=Phaser.RENDERTEXTURE;if(PIXI.gl){this.initWebGL()}else{this.initCanvas()}};Phaser.RenderTexture.prototype=Phaser.Utils.extend(true,PIXI.RenderTexture.prototype);Phaser.RenderTexture.prototype.constructor=Phaser.RenderTexture;Phaser.Canvas={create:function(d,b){d=d||256;b=b||256;var c=document.createElement("canvas");c.width=d;c.height=b;c.style.display="block";return c},getOffset:function(c,b){b=b||new Phaser.Point;var d=c.getBoundingClientRect();var h=c.clientTop||document.body.clientTop||0;var g=c.clientLeft||document.body.clientLeft||0;var e=window.pageYOffset||c.scrollTop||document.body.scrollTop;var f=window.pageXOffset||c.scrollLeft||document.body.scrollLeft;b.x=d.left+f-g;b.y=d.top+e-h;return b},getAspectRatio:function(b){return b.width/b.height},setBackgroundColor:function(c,b){b=b||"rgb(0,0,0)";c.style.backgroundColor=b;return c},setTouchAction:function(b,c){c=c||"none";b.style.msTouchAction=c;b.style["ms-touch-action"]=c;b.style["touch-action"]=c;return b},addToDOM:function(b,c,d){c=c||"";if(typeof d==="undefined"){d=true}if(c!==""){if(document.getElementById(c)){document.getElementById(c).appendChild(b);if(d){document.getElementById(c).style.overflow="hidden"}}else{document.body.appendChild(b)}}else{document.body.appendChild(b)}return b},setTransform:function(f,h,g,d,b,e,c){f.setTransform(d,e,c,b,h,g);return f},setSmoothingEnabled:function(b,c){b.imageSmoothingEnabled=c;b.mozImageSmoothingEnabled=c;b.oImageSmoothingEnabled=c;b.webkitImageSmoothingEnabled=c;b.msImageSmoothingEnabled=c;return b},setImageRenderingCrisp:function(b){b.style["image-rendering"]="crisp-edges";b.style["image-rendering"]="-moz-crisp-edges";b.style["image-rendering"]="-webkit-optimize-contrast";b.style.msInterpolationMode="nearest-neighbor";return b},setImageRenderingBicubic:function(b){b.style["image-rendering"]="auto";b.style.msInterpolationMode="bicubic";return b}};Phaser.StageScaleMode=function(c,d,b){this._startHeight=0;this.forceLandscape=false;this.forcePortrait=false;this.incorrectOrientation=false;this.pageAlignHorizontally=false;this.pageAlignVeritcally=false;this.minWidth=null;this.maxWidth=null;this.minHeight=null;this.maxHeight=null;this.width=0;this.height=0;this.maxIterations=5;this.game=c;this.enterLandscape=new Phaser.Signal();this.enterPortrait=new Phaser.Signal();if(window.orientation){this.orientation=window.orientation}else{if(window.outerWidth>window.outerHeight){this.orientation=90}else{this.orientation=0}}this.scaleFactor=new Phaser.Point(1,1);this.aspectRatio=0;var e=this;window.addEventListener("orientationchange",function(f){return e.checkOrientation(f)},false);window.addEventListener("resize",function(f){return e.checkResize(f)},false)};Phaser.StageScaleMode.EXACT_FIT=0;Phaser.StageScaleMode.NO_SCALE=1;Phaser.StageScaleMode.SHOW_ALL=2;Phaser.StageScaleMode.prototype={startFullScreen:function(){if(this.isFullScreen){return}var b=this.game.canvas;if(b.requestFullScreen){b.requestFullScreen()}else{if(b.mozRequestFullScreen){b.mozRequestFullScreen()}else{if(b.webkitRequestFullScreen){b.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}}}this.game.stage.canvas.style.width="100%";this.game.stage.canvas.style.height="100%"},stopFullScreen:function(){if(document.cancelFullScreen){document.cancelFullScreen()}else{if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else{if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}}}},checkOrientationState:function(){if(this.incorrectOrientation){if((this.forceLandscape&&window.innerWidth>window.innerHeight)||(this.forcePortrait&&window.innerHeight>window.innerWidth)){this.game.paused=false;this.incorrectOrientation=false;this.refresh()}}else{if((this.forceLandscape&&window.innerWidthwindow.outerHeight){this.orientation=90}else{this.orientation=0}if(this.isLandscape){this.enterLandscape.dispatch(this.orientation,true,false)}else{this.enterPortrait.dispatch(this.orientation,false,true)}if(this.game.stage.scaleMode!==Phaser.StageScaleMode.NO_SCALE){this.refresh()}},refresh:function(){var b=this;if(this.game.device.iPad==false&&this.game.device.webApp==false&&this.game.device.desktop==false){if(this.game.device.android&&this.game.device.chrome==false){window.scrollTo(0,1)}else{window.scrollTo(0,0)}}if(this._check==null&&this.maxIterations>0){this._iterations=this.maxIterations;this._check=window.setInterval(function(){return b.setScreenSize()},10);this.setScreenSize()}},setScreenSize:function(b){if(typeof b=="undefined"){b=false}if(this.game.device.iPad==false&&this.game.device.webApp==false&&this.game.device.desktop==false){if(this.game.device.android&&this.game.device.chrome==false){window.scrollTo(0,1)}else{window.scrollTo(0,0)}}this._iterations--;if(b||window.innerHeight>this._startHeight||this._iterations<0){document.documentElement.style.minHeight=window.innerHeight+"px";if(this.incorrectOrientation==true){this.setMaximum()}else{if(this.game.stage.scaleMode==Phaser.StageScaleMode.EXACT_FIT){this.setExactFit()}else{if(this.game.stage.scaleMode==Phaser.StageScaleMode.SHOW_ALL){this.setShowAll()}}}this.setSize();clearInterval(this._check);this._check=null}},setSize:function(){if(this.incorrectOrientation==false){if(this.maxWidth&&this.width>this.maxWidth){this.width=this.maxWidth}if(this.maxHeight&&this.height>this.maxHeight){this.height=this.maxHeight}if(this.minWidth&&this.widththis.maxWidth){this.width=this.maxWidth}else{this.width=b}if(this.maxHeight&&c>this.maxHeight){this.height=this.maxHeight}else{this.height=c}console.log("setExactFit",this.width,this.height,this.game.stage.offset)}};Object.defineProperty(Phaser.StageScaleMode.prototype,"isFullScreen",{get:function(){if(document.fullscreenElement===null||document.mozFullScreenElement===null||document.webkitFullscreenElement===null){return false}return true}});Object.defineProperty(Phaser.StageScaleMode.prototype,"isPortrait",{get:function(){return this.orientation==0||this.orientation==180}});Object.defineProperty(Phaser.StageScaleMode.prototype,"isLandscape",{get:function(){return this.orientation===90||this.orientation===-90}});Phaser.Device=function(){this.patchAndroidClearRectBug=false;this.desktop=false;this.iOS=false;this.android=false;this.chromeOS=false;this.linux=false;this.macOS=false;this.windows=false;this.canvas=false;this.file=false;this.fileSystem=false;this.localStorage=false;this.webGL=false;this.worker=false;this.touch=false;this.mspointer=false;this.css3D=false;this.pointerLock=false;this.arora=false;this.chrome=false;this.epiphany=false;this.firefox=false;this.ie=false;this.ieVersion=0;this.mobileSafari=false;this.midori=false;this.opera=false;this.safari=false;this.webApp=false;this.audioData=false;this.webAudio=false;this.ogg=false;this.opus=false;this.mp3=false;this.wav=false;this.m4a=false;this.webm=false;this.iPhone=false;this.iPhone4=false;this.iPad=false;this.pixelRatio=0;this._checkAudio();this._checkBrowser();this._checkCSS3D();this._checkDevice();this._checkFeatures();this._checkOS()};Phaser.Device.prototype={_checkOS:function(){var b=navigator.userAgent;if(/Android/.test(b)){this.android=true}else{if(/CrOS/.test(b)){this.chromeOS=true}else{if(/iP[ao]d|iPhone/i.test(b)){this.iOS=true}else{if(/Linux/.test(b)){this.linux=true}else{if(/Mac OS/.test(b)){this.macOS=true}else{if(/Windows/.test(b)){this.windows=true}}}}}}if(this.windows||this.macOS||this.linux){this.desktop=true}},_checkFeatures:function(){this.canvas=!!window.CanvasRenderingContext2D;try{this.localStorage=!!localStorage.getItem}catch(b){this.localStorage=false}this.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob;this.fileSystem=!!window.requestFileSystem;this.webGL=(function(){try{return !!window.WebGLRenderingContext&&!!document.createElement("canvas").getContext("experimental-webgl")}catch(c){return false}})();this.worker=!!window.Worker;if("ontouchstart" in document.documentElement||window.navigator.msPointerEnabled){this.touch=true}if(window.navigator.msPointerEnabled){this.mspointer=true}this.pointerLock="pointerLockElement" in document||"mozPointerLockElement" in document||"webkitPointerLockElement" in document},_checkBrowser:function(){var b=navigator.userAgent;if(/Arora/.test(b)){this.arora=true}else{if(/Chrome/.test(b)){this.chrome=true}else{if(/Epiphany/.test(b)){this.epiphany=true}else{if(/Firefox/.test(b)){this.firefox=true}else{if(/Mobile Safari/.test(b)){this.mobileSafari=true}else{if(/MSIE (\d+\.\d+);/.test(b)){this.ie=true;this.ieVersion=parseInt(RegExp.$1)}else{if(/Midori/.test(b)){this.midori=true}else{if(/Opera/.test(b)){this.opera=true}else{if(/Safari/.test(b)){this.safari=true}}}}}}}}}if(navigator.standalone){this.webApp=true}},_checkAudio:function(){this.audioData=!!(window.Audio);this.webAudio=!!(window.webkitAudioContext||window.AudioContext);var d=document.createElement("audio");var b=false;try{if(b=!!d.canPlayType){if(d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")){this.ogg=true}if(d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")){this.opus=true}if(d.canPlayType("audio/mpeg;").replace(/^no$/,"")){this.mp3=true}if(d.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")){this.wav=true}if(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/aac;").replace(/^no$/,"")){this.m4a=true}if(d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")){this.webm=true}}}catch(c){}},_checkDevice:function(){this.pixelRatio=window.devicePixelRatio||1;this.iPhone=navigator.userAgent.toLowerCase().indexOf("iphone")!=-1;this.iPhone4=(this.pixelRatio==2&&this.iPhone);this.iPad=navigator.userAgent.toLowerCase().indexOf("ipad")!=-1},_checkCSS3D:function(){var d=document.createElement("p");var e;var c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(d,null);for(var b in c){if(d.style[b]!==undefined){d.style[b]="translate3d(1px,1px,1px)";e=window.getComputedStyle(d).getPropertyValue(c[b])}}document.body.removeChild(d);this.css3D=(e!==undefined&&e.length>0&&e!=="none")},canPlayAudio:function(b){if(b=="mp3"&&this.mp3){return true}else{if(b=="ogg"&&(this.ogg||this.opus)){return true}else{if(b=="m4a"&&this.m4a){return true}else{if(b=="wav"&&this.wav){return true}else{if(b=="webm"&&this.webm){return true}}}}}return false},isConsoleOpen:function(){if(window.console&&window.console.firebug){return true}if(window.console){console.profile();console.profileEnd();if(console.clear){console.clear()}return console.profiles.length>0}return false}};Phaser.RequestAnimationFrame=function(c){this.game=c;this._isSetTimeOut=false;this.isRunning=false;var d=["ms","moz","webkit","o"];for(var b=0;b>>0;c-=e;c*=e;e=c>>>0;c-=e;e+=c*4294967296}return(e>>>0)*2.3283064365386963e-10},integer:function(){return this.rnd.apply(this)*4294967296},frac:function(){return this.rnd.apply(this)+(this.rnd.apply(this)*2097152|0)*1.1102230246251565e-16},real:function(){return this.integer()+this.frac()},integerInRange:function(c,b){return Math.floor(this.realInRange(c,b))},realInRange:function(c,b){c=c||0;b=b||0;return this.frac()*(b-c)+c},normal:function(){return 1-2*this.frac()},uuid:function(){var d,c;for(c=d="";d++<36;c+=~d%5|d*3&4?(d^15?8^this.frac()*(d^20?16:4):4).toString(16):"-"){}return c},pick:function(b){return b[this.integerInRange(0,b.length)]},weightedPick:function(b){return b[~~(Math.pow(this.frac(),2)*b.length)]},timestamp:function(d,c){return this.realInRange(d||946684800000,c||1577862000000)},angle:function(){return this.integerInRange(-180,180)}};Phaser.Math={PI2:Math.PI*2,fuzzyEqual:function(d,c,e){if(typeof e==="undefined"){e=0.0001}return Math.abs(d-c)c-e},fuzzyCeil:function(b,c){if(typeof c==="undefined"){c=0.0001}return Math.ceil(b-c)},fuzzyFloor:function(b,c){if(typeof c==="undefined"){c=0.0001}return Math.floor(b+c)},average:function(){var b=[];for(var d=0;d<(arguments.length-0);d++){b[d]=arguments[d+0]}var e=0;for(var c=0;c0)?Math.floor(b):Math.ceil(b)},shear:function(b){return b%1},snapTo:function(b,d,c){if(typeof c==="undefined"){c=0}if(d==0){return b}b-=c;b=d*Math.round(b/d);return c+b},snapToFloor:function(b,d,c){if(typeof c==="undefined"){c=0}if(d==0){return b}b-=c;b=d*Math.floor(b/d);return c+b},snapToCeil:function(b,d,c){if(typeof c==="undefined"){c=0}if(d==0){return b}b-=c;b=d*Math.ceil(b/d);return c+b},snapToInArray:function(d,c,f){if(typeof f==="undefined"){f=true}if(f){c.sort()}if(dd/2){c+=d*2}if(b<-d/2&&c>d/2){b+=d*2}return b-c},interpolateAngles:function(c,b,d,e,f){if(typeof e==="undefined"){e=true}if(typeof f==="undefined"){f=null}c=this.normalizeAngle(c,e);b=this.normalizeAngleToAnother(b,c,e);return(typeof f==="function")?f(d,c,b-c,1):this.interpolateFloat(c,b,d)},chanceRoll:function(b){if(typeof b==="undefined"){b=50}if(b<=0){return false}else{if(b>=100){return true}else{if(Math.random()*100>=b){return false}else{return true}}}},numberArray:function(e,c){var b=[];for(var d=e;d<=c;d++){b.push(d)}return b},maxAdd:function(d,c,b){d+=c;if(d>b){d=b}return d},minSub:function(d,c,b){d-=c;if(d0.5)?1:-1},isOdd:function(b){return(b&1)},isEven:function(b){if(b&1){return false}else{return true}},max:function(){for(var d=1,c=0,b=arguments.length;d=-180&&c<=180){return c}b=(c+180)%360;if(b<0){b+=360}return b-180},angleLimit:function(e,d,c){var b=e;if(e>c){b=c}else{if(e1){return this.linear(d[b],d[b-1],b-g)}return this.linear(d[e],d[e+1>b?b:e+1],g-e)},bezierInterpolation:function(e,d){var c=0;var g=e.length-1;for(var f=0;f<=g;f++){c+=Math.pow(1-d,g-f)*Math.pow(d,f)*e[f]*this.bernstein(g,f)}return c},catmullRomInterpolation:function(d,c){var b=d.length-1;var g=b*c;var e=Math.floor(g);if(d[0]===d[b]){if(c<0){e=Math.floor(g=b*(1+c))}return this.catmullRom(d[(e-1+b)%b],d[e],d[(e+1)%b],d[(e+2)%b],g-e)}else{if(c<0){return d[0]-(this.catmullRom(d[0],d[0],d[1],d[1],-g)-d[0])}if(c>1){return d[b]-(this.catmullRom(d[b],d[b],d[b-1],d[b-1],g-b)-d[b])}return this.catmullRom(d[e?e-1:0],d[e],d[bd.length-e)){b=d.length-e}if(b>0){return d[e+Math.floor(Math.random()*b)]}}return null},floor:function(b){var c=b|0;return(b>0)?(c):((c!=b)?(c-1):(c))},ceil:function(b){var c=b|0;return(b>0)?((c!=b)?(c+1):(c)):(c)},sinCosGenerator:function(b,j,d,h){if(typeof j==="undefined"){j=1}if(typeof d==="undefined"){d=1}if(typeof h==="undefined"){h=1}var i=j;var l=d;var f=h*Math.PI/b;var e=[];var k=[];for(var g=0;g0;d--){var c=Math.floor(Math.random()*(d+1));var b=e[d];e[d]=e[c];e[c]=b}return e},distance:function(e,g,d,f){var c=e-d;var b=g-f;return Math.sqrt(c*c+b*b)},distanceRounded:function(c,e,b,d){return Math.round(Phaser.Math.distance(c,e,b,d))},clamp:function(d,e,c){return(dc)?c:d)},clampBottom:function(b,c){return b=b){return 1}c=(c-d)/(b-d);return c*c*(3-2*c)},smootherstep:function(c,d,b){if(c<=d){return 0}if(c>=b){return 1}c=(c-d)/(b-d);return c*c*c*(c*(c*6-15)+10)},sign:function(b){return(b<0)?-1:((b>0)?1:0)},degToRad:function(){var b=Math.PI/180;return function(c){return c*b}}(),radToDeg:function(){var b=180/Math.PI;return function(c){return c*b}}()};Phaser.QuadTree=function(g,c,i,f,b,e,d,h){this.physicsManager=g;this.ID=g.quadTreeID;g.quadTreeID++;this.maxObjects=e||10;this.maxLevels=d||4;this.level=h||0;this.bounds={x:Math.round(c),y:Math.round(i),width:f,height:b,subWidth:Math.floor(f/2),subHeight:Math.floor(b/2),right:Math.round(c)+Math.floor(f/2),bottom:Math.round(i)+Math.floor(b/2)};this.objects=[];this.nodes=[]};Phaser.QuadTree.prototype={split:function(){this.level++;this.nodes[0]=new Phaser.QuadTree(this.physicsManager,this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level);this.nodes[1]=new Phaser.QuadTree(this.physicsManager,this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level);this.nodes[2]=new Phaser.QuadTree(this.physicsManager,this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level);this.nodes[3]=new Phaser.QuadTree(this.physicsManager,this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level)},insert:function(b){var d=0;var c;if(this.nodes[0]!=null){c=this.getIndex(b);if(c!==-1){this.nodes[c].insert(b);return}}this.objects.push(b);if(this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom)){b=2}}}else{if(c.x>this.bounds.right){if((c.ythis.bounds.bottom)){b=3}}}}return b},retrieve:function(b){var c=this.objects;b.body.quadTreeIndex=this.getIndex(b.body);b.body.quadTreeIDs.push(this.ID);if(this.nodes[0]){if(b.body.quadTreeIndex!==-1){c=c.concat(this.nodes[b.body.quadTreeIndex].retrieve(b))}else{c=c.concat(this.nodes[0].retrieve(b));c=c.concat(this.nodes[1].retrieve(b));c=c.concat(this.nodes[2].retrieve(b));c=c.concat(this.nodes[3].retrieve(b))}}return c},clear:function(){this.objects=[];for(var c=0,b=this.nodes.length;c0){this._radius=c*0.5}else{this._radius=0}};Phaser.Circle.prototype={circumference:function(){return 2*(Math.PI*this._radius)},setTo:function(b,d,c){this.x=b;this.y=d;this._diameter=c;this._radius=c*0.5;return this},copyFrom:function(b){return this.setTo(b.x,b.y,b.diameter)},copyTo:function(b){b[x]=this.x;b[y]=this.y;b[diameter]=this._diameter;return b},distance:function(c,b){if(typeof b==="undefined"){b=false}if(b){return Phaser.Math.distanceRound(this.x,this.y,c.x,c.y)}else{return Phaser.Math.distance(this.x,this.y,c.x,c.y)}},clone:function(b){if(typeof b==="undefined"){b=new Phaser.Circle()}return b.setTo(a.x,a.y,a.diameter)},contains:function(b,c){return Phaser.Circle.contains(this,b,c)},circumferencePoint:function(d,c,b){return Phaser.Circle.circumferencePoint(this,d,c,b)},offset:function(c,b){this.x+=c;this.y+=b;return this},offsetPoint:function(b){return this.offset(b.x,b.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}};Object.defineProperty(Phaser.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(b){if(b>0){this._diameter=b;this._radius=b*0.5}}});Object.defineProperty(Phaser.Circle.prototype,"radius",{get:function(){return this._radius},set:function(b){if(b>0){this._radius=b;this._diameter=b*2}}});Object.defineProperty(Phaser.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(b){if(b>this.x){this._radius=0;this._diameter=0}else{this.radius=this.x-b}}});Object.defineProperty(Phaser.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(b){if(bthis.y){this._radius=0;this._diameter=0}else{this.radius=this.y-b}}});Object.defineProperty(Phaser.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(b){if(b0){return Math.PI*this._radius*this._radius}else{return 0}}});Object.defineProperty(Phaser.Circle.prototype,"empty",{get:function(){return(this._diameter==0)},set:function(b){this.setTo(0,0,0)}});Phaser.Circle.contains=function(d,b,f){if(b>=d.left&&b<=d.right&&f>=d.top&&f<=d.bottom){var e=(d.x-b)*(d.x-b);var c=(d.y-f)*(d.y-f);return(e+c)<=(d.radius*d.radius)}return false};Phaser.Circle.equals=function(d,c){return(d.x==c.x&&d.y==c.y&&d.diameter==c.diameter)};Phaser.Circle.intersects=function(d,c){return(Phaser.Math.distance(d.x,d.y,c.x,c.y)<=(d.radius+c.radius))};Phaser.Circle.circumferencePoint=function(b,e,d,c){if(typeof d==="undefined"){d=false}if(typeof c==="undefined"){c=new Phaser.Point()}if(d===true){e=Phaser.Math.radToDeg(e)}c.x=b.x+b.radius*Math.cos(e);c.y=b.y+b.radius*Math.sin(e);return c};Phaser.Circle.intersectsRectangle=function(m,d){var g=Math.abs(m.x-d.x-d.halfWidth);var l=d.halfWidth+m.radius;if(g>l){return false}var f=Math.abs(m.y-d.y-d.halfHeight);var j=d.halfHeight+m.radius;if(f>j){return false}if(g<=d.halfWidth||f<=d.halfHeight){return true}var h=g-d.halfWidth;var e=f-d.halfHeight;var k=h*h;var b=e*e;var i=m.radius*m.radius;return k+b<=i};Phaser.Point=function(b,c){b=b||0;c=c||0;this.x=b;this.y=c};Phaser.Point.prototype={copyFrom:function(b){return this.setTo(b.x,b.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(b,c){this.x=b;this.y=c;return this},add:function(b,c){this.x+=b;this.y+=c;return this},subtract:function(b,c){this.x-=b;this.y-=c;return this},multiply:function(b,c){this.x*=b;this.y*=c;return this},divide:function(b,c){this.x/=b;this.y/=c;return this},clampX:function(c,b){this.x=Phaser.Math.clamp(this.x,c,b);return this},clampY:function(c,b){this.y=Phaser.Math.clamp(this.y,c,b);return this},clamp:function(c,b){this.x=Phaser.Math.clamp(this.x,c,b);this.y=Phaser.Math.clamp(this.y,c,b);return this},clone:function(b){if(typeof b==="undefined"){b=new Phaser.Point}return b.setTo(this.x,this.y)},copyFrom:function(b){return this.setTo(b.x,b.y)},copyTo:function(b){b[x]=this.x;b[y]=this.y;return b},distance:function(c,b){return Phaser.Point.distance(this,c,b)},equals:function(b){return(b.x==this.x&&b.y==this.y)},rotate:function(b,f,d,c,e){return Phaser.Point.rotate(this,b,f,d,c,e)},toString:function(){return"[{Point (x="+this.x+" y="+this.y+")}]"}};Phaser.Point.add=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x+c.x;e.y=d.y+c.y;return e};Phaser.Point.subtract=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x-c.x;e.y=d.y-c.y;return e};Phaser.Point.multiply=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x*c.x;e.y=d.y*c.y;return e};Phaser.Point.divide=function(d,c,e){if(typeof e==="undefined"){e=new Phaser.Point()}e.x=d.x/c.x;e.y=d.y/c.y;return e};Phaser.Point.equals=function(d,c){return(d.x==c.x&&d.y==c.y)};Phaser.Point.distance=function(d,c,e){if(typeof e==="undefined"){e=false}if(e){return Phaser.Math.distanceRound(d.x,d.y,c.x,c.y)}else{return Phaser.Math.distance(d.x,d.y,c.x,c.y)}},Phaser.Point.rotate=function(c,b,g,e,d,f){d=d||false;f=f||null;if(d){e=Phaser.Math.radToDeg(e)}if(f===null){f=Math.sqrt(((b-c.x)*(b-c.x))+((g-c.y)*(g-c.y)))}return c.setTo(b+f*Math.cos(e),g+f*Math.sin(e))};Phaser.Rectangle=function(c,e,d,b){c=c||0;e=e||0;d=d||0;b=b||0;this.x=c;this.y=e;this.width=d;this.height=b};Phaser.Rectangle.prototype={offset:function(c,b){this.x+=c;this.y+=b;return this},offsetPoint:function(b){return this.offset(b.x,b.y)},setTo:function(c,e,d,b){this.x=c;this.y=e;this.width=d;this.height=b;return this},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y)},copyFrom:function(b){return this.setTo(b.x,b.y,b.width,b.height)},copyTo:function(b){b.x=this.x;b.y=this.y;b.width=this.width;b.height=this.height;return b},inflate:function(c,b){return Phaser.Rectangle.inflate(this,c,b)},size:function(b){return Phaser.Rectangle.size(this,b)},clone:function(b){return Phaser.Rectangle.clone(this,b)},contains:function(b,c){return Phaser.Rectangle.contains(this,b,c)},containsRect:function(c){return Phaser.Rectangle.containsRect(this,c)},equals:function(c){return Phaser.Rectangle.equals(this,c)},intersection:function(c,d){return Phaser.Rectangle.intersection(this,c,output)},intersects:function(c,d){return Phaser.Rectangle.intersects(this,c,d)},intersectsRaw:function(f,d,e,c,b){return Phaser.Rectangle.intersectsRaw(this,f,d,e,c,b)},union:function(c,d){return Phaser.Rectangle.union(this,c,d)},toString:function(){return"[{Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+" empty="+this.empty+")}]"}};Object.defineProperty(Phaser.Rectangle.prototype,"halfWidth",{get:function(){return Math.round(this.width/2)}});Object.defineProperty(Phaser.Rectangle.prototype,"halfHeight",{get:function(){return Math.round(this.height/2)}});Object.defineProperty(Phaser.Rectangle.prototype,"bottom",{get:function(){return this.y+this.height},set:function(b){if(b<=this.y){this.height=0}else{this.height=(this.y-b)}}});Object.defineProperty(Phaser.Rectangle.prototype,"bottomRight",{get:function(){return new Phaser.Point(this.right,this.bottom)},set:function(b){this.right=b.x;this.bottom=b.y}});Object.defineProperty(Phaser.Rectangle.prototype,"left",{get:function(){return this.x},set:function(b){if(b>=this.right){this.width=0}else{this.width=this.right-b}this.x=b}});Object.defineProperty(Phaser.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(b){if(b<=this.x){this.width=0}else{this.width=this.x+b}}});Object.defineProperty(Phaser.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}});Object.defineProperty(Phaser.Rectangle.prototype,"perimeter",{get:function(){return(this.width*2)+(this.height*2)}});Object.defineProperty(Phaser.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(b){this.x=b-this.halfWidth}});Object.defineProperty(Phaser.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(b){this.y=b-this.halfHeight}});Object.defineProperty(Phaser.Rectangle.prototype,"top",{get:function(){return this.y},set:function(b){if(b>=this.bottom){this.height=0;this.y=b}else{this.height=(this.bottom-b)}}});Object.defineProperty(Phaser.Rectangle.prototype,"topLeft",{get:function(){return new Phaser.Point(this.x,this.y)},set:function(b){this.x=b.x;this.y=b.y}});Object.defineProperty(Phaser.Rectangle.prototype,"empty",{get:function(){return(!this.width||!this.height)},set:function(b){this.setTo(0,0,0,0)}});Phaser.Rectangle.inflate=function(c,d,b){c.x-=d;c.width+=2*d;c.y-=b;c.height+=2*b;return c};Phaser.Rectangle.inflatePoint=function(c,b){return Phaser.Phaser.Rectangle.inflate(c,b.x,b.y)};Phaser.Rectangle.size=function(b,c){if(typeof c==="undefined"){c=new Phaser.Point()}return c.setTo(b.width,b.height)};Phaser.Rectangle.clone=function(b,c){if(typeof c==="undefined"){c=new Phaser.Rectangle()}return c.setTo(b.x,b.y,b.width,b.height)};Phaser.Rectangle.contains=function(c,b,d){return(b>=c.x&&b<=c.right&&d>=c.y&&d<=c.bottom)};Phaser.Rectangle.containsPoint=function(c,b){return Phaser.Phaser.Rectangle.contains(c,b.x,b.y)};Phaser.Rectangle.containsRect=function(d,c){if(d.volume>c.volume){return false}return(d.x>=c.x&&d.y>=c.y&&d.right<=c.right&&d.bottom<=c.bottom)};Phaser.Rectangle.equals=function(d,c){return(d.x==c.x&&d.y==c.y&&d.width==c.width&&d.height==c.height)};Phaser.Rectangle.intersection=function(d,c,e){e=e||new Phaser.Rectangle;if(Phaser.Rectangle.intersects(d,c)){e.x=Math.max(d.x,c.x);e.y=Math.max(d.y,c.y);e.width=Math.min(d.right,c.right)-e.x;e.height=Math.min(d.bottom,c.bottom)-e.y}return e};Phaser.Rectangle.intersects=function(d,c,e){e=e||0;return !(d.x>c.right+e||d.rightc.bottom+e||d.bottomb.right+c||eb.bottom+c||d1){if(f&&f==this.decodeURI(d[0])){return this.decodeURI(d[1])}else{c[this.decodeURI(d[0])]=this.decodeURI(d[1])}}}return c},decodeURI:function(b){return decodeURIComponent(b.replace(/\+/g," "))}};Phaser.TweenManager=function(b){this.game=b;this._tweens=[];this._add=[];this.game.onPause.add(this.pauseAll,this);this.game.onResume.add(this.resumeAll,this)};Phaser.TweenManager.prototype={REVISION:"11dev",getAll:function(){return this._tweens},removeAll:function(){this._tweens=[]},add:function(b){this._add.push(b)},create:function(b){return new Phaser.Tween(b,this.game)},remove:function(c){var b=this._tweens.indexOf(c);if(b!==-1){this._tweens[b].pendingDelete=true}},update:function(){if(this._tweens.length===0&&this._add.length===0){return false}var b=0;var c=this._tweens.length;while(b0){this._tweens=this._tweens.concat(this._add);this._add.length=0}return true},pauseAll:function(){for(var b=this._tweens.length-1;b>=0;b--){this._tweens[b].pause()}},resumeAll:function(){for(var b=this._tweens.length-1;b>=0;b--){this._tweens[b].resume()}}};Phaser.Tween=function(c,b){this._object=c;this.game=b;this._manager=this.game.tweens;this._valuesStart={};this._valuesEnd={};this._valuesStartRepeat={};this._duration=1000;this._repeat=0;this._yoyo=false;this._reversed=false;this._delayTime=0;this._startTime=null;this._easingFunction=Phaser.Easing.Linear.None;this._interpolationFunction=Phaser.Math.linearInterpolation;this._chainedTweens=[];this._onStartCallback=null;this._onStartCallbackFired=false;this._onUpdateCallback=null;this._onCompleteCallback=null;this._pausedTime=0;this.pendingDelete=false;for(var d in c){this._valuesStart[d]=parseFloat(c[d],10)}this.onStart=new Phaser.Signal();this.onComplete=new Phaser.Signal();this.isRunning=false};Phaser.Tween.prototype={to:function(d,g,h,c,b,f,e){g=g||1000;h=h||null;c=c||false;b=b||0;f=f||0;e=e||false;this._repeat=f;this._duration=g;this._valuesEnd=d;if(h!==null){this._easingFunction=h}if(b>0){this._delayTime=b}this._yoyo=e;if(c){return this.start()}else{return this}},start:function(c){if(this.game===null||this._object===null){return}this._manager.add(this);this.onStart.dispatch(this._object);this.isRunning=true;this._onStartCallbackFired=false;this._startTime=this.game.time.now+this._delayTime;for(var b in this._valuesEnd){if(this._valuesEnd[b] instanceof Array){if(this._valuesEnd[b].length===0){continue}this._valuesEnd[b]=[this._object[b]].concat(this._valuesEnd[b])}this._valuesStart[b]=this._object[b];if((this._valuesStart[b] instanceof Array)===false){this._valuesStart[b]*=1}this._valuesStartRepeat[b]=this._valuesStart[b]||0}return this},stop:function(){this._manager.remove(this);this.isRunning=false;return this},delay:function(b){this._delayTime=b;return this},repeat:function(b){this._repeat=b;return this},yoyo:function(b){this._yoyo=b;return this},easing:function(b){this._easingFunction=b;return this},interpolation:function(b){this._interpolationFunction=b;return this},chain:function(){this._chainedTweens=arguments;return this},onStartCallback:function(b){this._onStartCallback=b;return this},onUpdateCallback:function(b){this._onUpdateCallback=b;return this},onCompleteCallback:function(b){this._onCompleteCallback=b;return this},pause:function(){this._paused=true},resume:function(){this._paused=false;this._startTime+=this.game.time.pauseDuration},update:function(c){if(this.pendingDelete){return false}if(this._paused||c1?1:k;var h=this._easingFunction(k);for(j in this._valuesEnd){var b=this._valuesStart[j]||0;var d=this._valuesEnd[j];if(d instanceof Array){this._object[j]=this._interpolationFunction(d,h)}else{if(typeof(d)==="string"){d=b+parseFloat(d,10)}if(typeof(d)==="number"){this._object[j]=b+(d-b)*h}}}if(this._onUpdateCallback!==null){this._onUpdateCallback.call(this._object,h)}if(k==1){if(this._repeat>0){if(isFinite(this._repeat)){this._repeat--}for(j in this._valuesStartRepeat){if(typeof(this._valuesEnd[j])==="string"){this._valuesStartRepeat[j]=this._valuesStartRepeat[j]+parseFloat(this._valuesEnd[j],10)}if(this._yoyo){var e=this._valuesStartRepeat[j];this._valuesStartRepeat[j]=this._valuesEnd[j];this._valuesEnd[j]=e;this._reversed=!this._reversed}this._valuesStart[j]=this._valuesStartRepeat[j]}this._startTime=c+this._delayTime;this.onComplete.dispatch(this._object);if(this._onCompleteCallback!==null){this._onCompleteCallback.call(this._object)}return true}else{this.onComplete.dispatch(this._object);if(this._onCompleteCallback!==null){this._onCompleteCallback.call(this._object)}for(var f=0,g=this._chainedTweens.length;fthis._timeLastSecond+1000){this.fps=Math.round((this.frames*1000)/(this.now-this._timeLastSecond));this.fpsMin=this.game.math.min(this.fpsMin,this.fps);this.fpsMax=this.game.math.max(this.fpsMax,this.fps);this._timeLastSecond=this.now;this.frames=0}this.time=this.now;this.lastTime=b+this.timeToCall;this.physicsElapsed=1*(this.elapsed/1000);if(this.game.paused){this.pausedTime=this.now-this._pauseStarted}},gamePaused:function(){this._pauseStarted=this.now},gameResumed:function(){this.time=Date.now();this.pauseDuration=this.pausedTime;this._justResumed=true},elapsedSince:function(b){return this.now-b},elapsedSecondsSince:function(b){return(this.now-b)*0.001},reset:function(){this._started=this.now}};Phaser.AnimationManager=function(b){this.sprite=b;this.game=b.game;this.currentFrame=null;this.updateIfVisible=true;this._frameData=null;this._anims={};this._outputFrames=[]};Phaser.AnimationManager.prototype={loadFrameData:function(b){this._frameData=b;this.frame=0},add:function(e,f,d,c,b){if(this._frameData==null){console.warn("No FrameData available for Phaser.Animation "+e);return}d=d||60;if(typeof c==="undefined"){c=false}if(typeof b==="undefined"){b=true}if(this.sprite.events.onAnimationStart==null){this.sprite.events.onAnimationStart=new Phaser.Signal();this.sprite.events.onAnimationComplete=new Phaser.Signal();this.sprite.events.onAnimationLoop=new Phaser.Signal()}this._outputFrames.length=0;this._frameData.getFrameIndexes(f,b,this._outputFrames);this._anims[e]=new Phaser.Animation(this.game,this.sprite,e,this._frameData,this._outputFrames,d,c);this.currentAnim=this._anims[e];this.currentFrame=this.currentAnim.currentFrame;this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);return this._anims[e]},validateFrames:function(d,b){if(typeof b=="undefined"){b=true}for(var c=0;cthis._frameData.total){return false}}else{if(this._frameData.checkFrameName(d[c])==false){return false}}}return true},play:function(d,c,b){if(this._anims[d]){if(this.currentAnim==this._anims[d]){if(this.currentAnim.isPlaying==false){return this.currentAnim.play(c,b)}}else{this.currentAnim=this._anims[d];return this.currentAnim.play(c,b)}}},stop:function(c,b){if(typeof b=="undefined"){b=false}if(typeof c=="string"){if(this._anims[c]){this.currentAnim=this._anims[c];this.currentAnim.stop(b)}}else{if(this.currentAnim){this.currentAnim.stop(b)}}},update:function(){if(this.updateIfVisible&&this.sprite.visible==false){return false}if(this.currentAnim&&this.currentAnim.update()==true){this.currentFrame=this.currentAnim.currentFrame;this.sprite.currentFrame=this.currentFrame;return true}return false},destroy:function(){this._anims={};this._frameData=null;this._frameIndex=0;this.currentAnim=null;this.currentFrame=null}};Object.defineProperty(Phaser.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}});Object.defineProperty(Phaser.AnimationManager.prototype,"frameTotal",{get:function(){if(this._frameData){return this._frameData.total}else{return -1}}});Object.defineProperty(Phaser.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame){return this._frameIndex}},set:function(b){if(this._frameData&&this._frameData.getFrame(b)!==null){this.currentFrame=this._frameData.getFrame(b);this._frameIndex=b;this.sprite.currentFrame=this.currentFrame;this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}}});Object.defineProperty(Phaser.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame){return this.currentFrame.name}},set:function(b){if(this._frameData&&this._frameData.getFrameByName(b)!==null){this.currentFrame=this._frameData.getFrameByName(b);this._frameIndex=this.currentFrame.index;this.sprite.currentFrame=this.currentFrame;this.sprite.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}else{console.warn("Cannot set frameName: "+b)}}});Phaser.Animation=function(c,g,e,f,h,d,b){this.game=c;this._parent=g;this._frameData=f;this.name=e;this._frames=[];this._frames=this._frames.concat(h);this.delay=1000/d;this.looped=b;this.isFinished=false;this.isPlaying=false;this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])};Phaser.Animation.prototype={play:function(c,b){c=c||null;b=b||null;if(c!==null){this.delay=1000/c}if(b!==null){this.looped=b}this.isPlaying=true;this.isFinished=false;this._timeLastFrame=this.game.time.now;this._timeNextFrame=this.game.time.now+this.delay;this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]);this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);if(this._parent.events){this._parent.events.onAnimationStart.dispatch(this._parent,this)}return this},restart:function(){this.isPlaying=true;this.isFinished=false;this._timeLastFrame=this.game.time.now;this._timeNextFrame=this.game.time.now+this.delay;this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])},stop:function(b){if(typeof b==="undefined"){b=false}this.isPlaying=false;this.isFinished=true;if(b){this.currentFrame=this._frameData.getFrame(this._frames[0])}},update:function(){if(this.isPlaying==true&&this.game.time.now>=this._timeNextFrame){this._frameIndex++;if(this._frameIndex==this._frames.length){if(this.looped){this._frameIndex=0;this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]);this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);this._parent.events.onAnimationLoop.dispatch(this._parent,this)}else{this.onComplete()}}else{this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]);this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}this._timeLastFrame=this.game.time.now;this._timeNextFrame=this.game.time.now+this.delay;return true}return false},destroy:function(){this.game=null;this._parent=null;this._frames=null;this._frameData=null;this.currentFrame=null;this.isPlaying=false},onComplete:function(){this.isPlaying=false;this.isFinished=true;if(this._parent.events){this._parent.events.onAnimationComplete.dispatch(this._parent,this)}}};Object.defineProperty(Phaser.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}});Object.defineProperty(Phaser.Animation.prototype,"frame",{get:function(){if(this.currentFrame!==null){return this.currentFrame.index}else{return this._frameIndex}},set:function(b){this.currentFrame=this._frameData.getFrame(b);if(this.currentFrame!==null){this._frameIndex=b;this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid])}}});Phaser.Animation.Frame=function(e,c,h,g,b,d,f){this.index=e;this.x=c;this.y=h;this.width=g;this.height=b;this.name=d;this.uuid=f;this.centerX=Math.floor(g/2);this.centerY=Math.floor(b/2);this.distance=Phaser.Math.distance(0,0,g,b);this.rotated=false;this.rotationDirection="cw";this.trimmed=false;this.sourceSizeW=g;this.sourceSizeH=b;this.spriteSourceSizeX=0;this.spriteSourceSizeY=0;this.spriteSourceSizeW=0;this.spriteSourceSizeH=0};Phaser.Animation.Frame.prototype={setTrim:function(f,e,h,c,b,d,g){this.trimmed=f;if(f){this.width=e;this.height=h;this.sourceSizeW=e;this.sourceSizeH=h;this.centerX=Math.floor(e/2);this.centerY=Math.floor(h/2);this.spriteSourceSizeX=c;this.spriteSourceSizeY=b;this.spriteSourceSizeW=d;this.spriteSourceSizeH=g}}};Phaser.Animation.FrameData=function(){this._frames=[];this._frameNames=[]};Phaser.Animation.FrameData.prototype={addFrame:function(b){b.index=this._frames.length;this._frames.push(b);if(b.name!==""){this._frameNames[b.name]=b.index}return b},getFrame:function(b){if(this._frames[b]){return this._frames[b]}return null},getFrameByName:function(b){if(typeof this._frameNames[b]==="number"){return this._frames[this._frameNames[b]]}return null},checkFrameName:function(b){if(this._frameNames[b]==null){return false}return true},getFrameRange:function(e,b,c){if(typeof c==="undefined"){c=[]}for(var d=e;d<=b;d++){c.push(this._frames[d])}return c},getFrames:function(f,c,d){if(typeof c==="undefined"){c=true}if(typeof d==="undefined"){d=[]}if(typeof f==="undefined"||f.length==0){for(var e=0;e tag");return}var d=new Phaser.Animation.FrameData();var j=g.getElementsByTagName("SubTexture");var f;for(var e=0;e0){this._progressChunk=100/this._keys.length;this.loadFile()}else{this.progress=100;this.hasLoaded=true;this.onLoadComplete.dispatch()}},loadFile:function(){var b=this._fileList[this._keys.shift()];var c=this;switch(b.type){case"image":case"spritesheet":case"textureatlas":case"bitmapfont":case"tilemap":b.data=new Image();b.data.name=b.key;b.data.onload=function(){return c.fileComplete(b.key)};b.data.onerror=function(){return c.fileError(b.key)};b.data.crossOrigin=this.crossOrigin;b.data.src=this.baseURL+b.url;break;case"audio":b.url=this.getAudioURL(b.url);if(b.url!==null){if(this.game.sound.usingWebAudio){this._xhr.open("GET",this.baseURL+b.url,true);this._xhr.responseType="arraybuffer";this._xhr.onload=function(){return c.fileComplete(b.key)};this._xhr.onerror=function(){return c.fileError(b.key)};this._xhr.send()}else{if(this.game.sound.usingAudioTag){if(this.game.sound.touchLocked){b.data=new Audio();b.data.name=b.key;b.data.preload="auto";b.data.src=this.baseURL+b.url;this.fileComplete(b.key)}else{b.data=new Audio();b.data.name=b.key;b.data.onerror=function(){return c.fileError(b.key)};b.data.preload="auto";b.data.src=this.baseURL+b.url;b.data.addEventListener("canplaythrough",Phaser.GAMES[this.game.id].load.fileComplete(b.key),false);b.data.load()}}}}else{this.fileError(b.key)}break;case"text":this._xhr.open("GET",this.baseURL+b.url,true);this._xhr.responseType="text";this._xhr.onload=function(){return c.fileComplete(b.key)};this._xhr.onerror=function(){return c.fileError(b.key)};this._xhr.send();break}},getAudioURL:function(c){var d;for(var b=0;b100){this.progress=100}if(this.preloadSprite!==null){if(this.preloadSprite.direction==0){this.preloadSprite.crop.width=(this.preloadSprite.width/100)*this.progress}else{this.preloadSprite.crop.height=(this.preloadSprite.height/100)*this.progress}this.preloadSprite.sprite.crop=this.preloadSprite.crop}this.onFileComplete.dispatch(this.progress,b,c,this.queueSize-this._keys.length,this.queueSize);if(this._keys.length>0){this.loadFile()}else{this.hasLoaded=true;this.isLoading=false;this.removeAll();this.onLoadComplete.dispatch()}}};Phaser.Loader.Parser={bitmapFont:function(q,h,l){if(!h.getElementsByTagName("font")){console.warn("Phaser.Loader.Parser.bitmapFont: Invalid XML given, missing tag");return}var m=PIXI.TextureCache[l];var e={};var c=h.getElementsByTagName("info")[0];var j=h.getElementsByTagName("common")[0];e.font=c.attributes.getNamedItem("face").nodeValue;e.size=parseInt(c.attributes.getNamedItem("size").nodeValue,10);e.lineHeight=parseInt(j.attributes.getNamedItem("lineHeight").nodeValue,10);e.chars={};var k=h.getElementsByTagName("char");for(var d=0;d=this.duration){if(this.usingWebAudio){if(this.loop){this.onLoop.dispatch(this);if(this.currentMarker==""){this.currentTime=0;this.startTime=this.game.time.now}else{this.play(this.currentMarker,0,this.volume,true,true)}}else{this.stop()}}else{if(this.loop){this.onLoop.dispatch(this);this.play(this.currentMarker,0,this.volume,true,true)}else{this.stop()}}}}},play:function(d,b,f,c,e){d=d||"";b=b||0;f=f||1;if(typeof c=="undefined"){c=false}if(typeof e=="undefined"){e=false}console.log("play "+d+" position "+b+" volume "+f+" loop "+c);if(this.isPlaying==true&&e==false&&this.override==false){return}if(this.isPlaying&&this.override){if(this.usingWebAudio){if(typeof this._sound.stop==="undefined"){this._sound.noteOff(0)}else{this._sound.stop(0)}}else{if(this.usingAudioTag){this._sound.pause();this._sound.currentTime=0}}}this.currentMarker=d;if(d!==""&&this.markers[d]){this.position=this.markers[d].start;this.volume=this.markers[d].volume;this.loop=this.markers[d].loop;this.duration=this.markers[d].duration*1000;this._tempMarker=d;this._tempPosition=this.position;this._tempVolume=this.volume;this._tempLoop=this.loop}else{this.position=b;this.volume=f;this.loop=c;this.duration=0;this._tempMarker=d;this._tempPosition=b;this._tempVolume=f;this._tempLoop=c}if(this.usingWebAudio){if(this.game.cache.isSoundDecoded(this.key)){if(this._buffer==null){this._buffer=this.game.cache.getSoundData(this.key)}this._sound=this.context.createBufferSource();this._sound.buffer=this._buffer;this._sound.connect(this.gainNode);this.totalDuration=this._sound.buffer.duration;if(this.duration==0){this.duration=this.totalDuration*1000}if(this.loop&&d==""){this._sound.loop=true}if(typeof this._sound.start==="undefined"){this._sound.noteGrainOn(0,this.position,this.duration/1000)}else{this._sound.start(0,this.position,this.duration/1000)}this.isPlaying=true;this.startTime=this.game.time.now;this.currentTime=0;this.stopTime=this.startTime+this.duration;this.onPlay.dispatch(this)}else{this.pendingPlayback=true;if(this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).isDecoding==false){this.game.sound.decode(this.key,this)}}}else{if(this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked){this.game.cache.reloadSound(this.key);this.pendingPlayback=true}else{if(this._sound&&this._sound.readyState==4){this._sound.play();this.totalDuration=this._sound.duration;if(this.duration==0){this.duration=this.totalDuration*1000}this._sound.currentTime=this.position;this._sound.muted=this._muted;if(this._muted){this._sound.volume=0}else{this._sound.volume=this._volume}this.isPlaying=true;this.startTime=this.game.time.now;this.currentTime=0;this.stopTime=this.startTime+this.duration;this.onPlay.dispatch(this)}else{this.pendingPlayback=true}}}},restart:function(d,b,e,c){d=d||"";b=b||0;e=e||1;if(typeof c=="undefined"){c=false}this.play(d,b,e,c,true)},pause:function(){if(this.isPlaying&&this._sound){this.stop();this.isPlaying=false;this.paused=true;this.onPause.dispatch(this)}},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){if(typeof this._sound.start==="undefined"){this._sound.noteGrainOn(0,this.position,this.duration)}else{this._sound.start(0,this.position,this.duration)}}else{this._sound.play()}this.isPlaying=true;this.paused=false;this.onResume.dispatch(this)}},stop:function(){if(this.isPlaying&&this._sound){if(this.usingWebAudio){if(typeof this._sound.stop==="undefined"){this._sound.noteOff(0)}else{this._sound.stop(0)}}else{if(this.usingAudioTag){this._sound.pause();this._sound.currentTime=0}}}this.isPlaying=false;var b=this.currentMarker;this.currentMarker="";this.onStop.dispatch(this,b)}};Object.defineProperty(Phaser.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}});Object.defineProperty(Phaser.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}});Object.defineProperty(Phaser.Sound.prototype,"mute",{get:function(){return this._muted},set:function(b){b=b||null;if(b){this._muted=true;if(this.usingWebAudio){this._muteVolume=this.gainNode.gain.value;this.gainNode.gain.value=0}else{if(this.usingAudioTag&&this._sound){this._muteVolume=this._sound.volume;this._sound.volume=0}}}else{this._muted=false;if(this.usingWebAudio){this.gainNode.gain.value=this._muteVolume}else{if(this.usingAudioTag&&this._sound){this._sound.volume=this._muteVolume}}}this.onMute.dispatch(this)}});Object.defineProperty(Phaser.Sound.prototype,"volume",{get:function(){return this._volume},set:function(b){if(this.usingWebAudio){this._volume=b;this.gainNode.gain.value=b}else{if(this.usingAudioTag&&this._sound){if(b>=0&&b<=1){this._volume=b;this._sound.volume=b}}}}});Phaser.SoundManager=function(b){this.game=b;this.onSoundDecode=new Phaser.Signal;this._muted=false;this._unlockSource=null;this._volume=1;this._sounds=[];this.context=null;this.usingWebAudio=true;this.usingAudioTag=false;this.noAudio=false;this.touchLocked=false;this.channels=32};Phaser.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&this.game.device.webAudio==false){this.channels=1}if(this.game.device.iOS||(window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock)){this.game.input.touch.callbackContext=this;this.game.input.touch.touchStartCallback=this.unlock;this.game.input.mouse.callbackContext=this;this.game.input.mouse.mouseDownCallback=this.unlock;this.touchLocked=true}else{this.touchLocked=false}if(window.PhaserGlobal){if(window.PhaserGlobal.disableAudio==true){this.usingWebAudio=false;this.noAudio=true;return}if(window.PhaserGlobal.disableWebAudio==true){this.usingWebAudio=false;this.usingAudioTag=true;this.noAudio=false;return}}if(!!window.AudioContext){this.context=new window.AudioContext()}else{if(!!window.webkitAudioContext){this.context=new window.webkitAudioContext()}else{if(!!window.Audio){this.usingWebAudio=false;this.usingAudioTag=true}else{this.usingWebAudio=false;this.noAudio=true}}}if(this.context!==null){if(typeof this.context.createGain==="undefined"){this.masterGain=this.context.createGainNode()}else{this.masterGain=this.context.createGain()}this.masterGain.gain.value=1;this.masterGain.connect(this.context.destination)}},unlock:function(){if(this.touchLocked==false){return}if(this.game.device.webAudio==false||(window.PhaserGlobal&&window.PhaserGlobal.disableWebAudio==true)){this.touchLocked=false;this._unlockSource=null;this.game.input.touch.callbackContext=null;this.game.input.touch.touchStartCallback=null;this.game.input.mouse.callbackContext=null;this.game.input.mouse.mouseDownCallback=null}else{var b=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource();this._unlockSource.buffer=b;this._unlockSource.connect(this.context.destination);this._unlockSource.noteOn(0)}},stopAll:function(){for(var b=0;b255){return Phaser.Color.getColor(255,255,255)}if(d>c){return Phaser.Color.getColor(255,255,255)}var f=d+Math.round(Math.random()*(c-d));var e=d+Math.round(Math.random()*(c-d));var b=d+Math.round(Math.random()*(c-d));return Phaser.Color.getColor32(g,f,e,b)},getRGB:function(b){return{alpha:b>>>24,red:b>>16&255,green:b>>8&255,blue:b&255}},getWebRGB:function(c){var f=(c>>>24)/255;var e=c>>16&255;var d=c>>8&255;var b=c&255;return"rgba("+e.toString()+","+d.toString()+","+b.toString()+","+f.toString()+")"},getAlpha:function(b){return b>>>24},getAlphaFloat:function(b){return(b>>>24)/255},getRed:function(b){return b>>16&255},getGreen:function(b){return b>>8&255},getBlue:function(b){return b&255}};Phaser.Physics={};Phaser.Physics.Arcade=function(b){this.game=b;this.gravity=new Phaser.Point;this.bounds=new Phaser.Rectangle(0,0,b.world.width,b.world.height);this.maxObjects=10;this.maxLevels=4;this.OVERLAP_BIAS=4;this.TILE_OVERLAP=false;this.quadTree=new Phaser.QuadTree(this,this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels);this.quadTreeID=0;this._bounds1=new Phaser.Rectangle;this._bounds2=new Phaser.Rectangle;this._overlap=0;this._maxOverlap=0;this._velocity1=0;this._velocity2=0;this._newVelocity1=0;this._newVelocity2=0;this._average=0;this._mapData=[];this._result=false;this._total=0};Phaser.Physics.Arcade.prototype={updateMotion:function(b){this._velocityDelta=(this.computeVelocity(0,false,b.angularVelocity,b.angularAcceleration,b.angularDrag,b.maxAngular)-b.angularVelocity)/2;b.angularVelocity+=this._velocityDelta;b.rotation+=b.angularVelocity*this.game.time.physicsElapsed;this._velocityDelta=(this.computeVelocity(1,b,b.velocity.x,b.acceleration.x,b.drag.x)-b.velocity.x)/2;b.velocity.x+=this._velocityDelta;this._delta=b.velocity.x*this.game.time.physicsElapsed;b.x+=this._delta;this._velocityDelta=(this.computeVelocity(2,b,b.velocity.y,b.acceleration.y,b.drag.y)-b.velocity.y)/2;b.velocity.y+=this._velocityDelta;this._delta=b.velocity.y*this.game.time.physicsElapsed;b.y+=this._delta},computeVelocity:function(e,c,g,f,d,b){b=b||10000;if(e==1&&c.allowGravity){g+=this.gravity.x+c.gravity.x}else{if(e==2&&c.allowGravity){g+=this.gravity.y+c.gravity.y}}if(f!==0){g+=f*this.game.time.physicsElapsed}else{if(d!==0){this._drag=d*this.game.time.physicsElapsed;if(g-this._drag>0){g=g-this._drag}else{if(g+this._drag<0){g+=this._drag}else{g=0}}}}if(g!=0){if(g>b){g=b}else{if(g<-b){g=-b}}}return g},preUpdate:function(){this.quadTree.clear();this.quadTreeID=0;this.quadTree=new Phaser.QuadTree(this,this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels)},postUpdate:function(){this.quadTree.clear()},collide:function(f,e,d,c,b){d=d||null;c=c||null;b=b||d;this._result=false;this._total=0;if(f&&e&&f.exists&&e.exists){if(f.type==Phaser.SPRITE){if(e.type==Phaser.SPRITE){this.collideSpriteVsSprite(f,e,d,c,b)}else{if(e.type==Phaser.GROUP||e.type==Phaser.EMITTER){this.collideSpriteVsGroup(f,e,d,c,b)}else{if(e.type==Phaser.TILEMAP){this.collideSpriteVsTilemap(f,e,d,c,b)}}}}else{if(f.type==Phaser.GROUP){if(e.type==Phaser.SPRITE){this.collideSpriteVsGroup(e,f,d,c,b)}else{if(e.type==Phaser.GROUP||e.type==Phaser.EMITTER){this.collideGroupVsGroup(f,e,d,c,b)}else{if(e.type==Phaser.TILEMAP){this.collideGroupVsTilemap(f,e,d,c,b)}}}}else{if(f.type==Phaser.TILEMAP){if(e.type==Phaser.SPRITE){this.collideSpriteVsTilemap(e,f,d,c,b)}else{if(e.type==Phaser.GROUP||e.type==Phaser.EMITTER){this.collideGroupVsTilemap(e,f,d,c,b)}}}else{if(f.type==Phaser.EMITTER){if(e.type==Phaser.SPRITE){this.collideSpriteVsGroup(e,f,d,c,b)}else{if(e.type==Phaser.GROUP||e.type==Phaser.EMITTER){this.collideGroupVsGroup(f,e,d,c,b)}else{if(e.type==Phaser.TILEMAP){this.collideGroupVsTilemap(f,e,d,c,b)}}}}}}}}return(this._total>0)},collideSpriteVsSprite:function(f,e,d,c,b){this.separate(f.body,e.body);if(this._result){if(c){if(c.call(b,f,e)){this._total++;if(d){d.call(b,f,e)}}}else{this._total++;if(d){d.call(b,f,e)}}}},collideGroupVsTilemap:function(g,f,e,d,b){if(g._container.first._iNext){var c=g._container.first._iNext;do{if(c.exists){this.collideSpriteVsTilemap(c,f,e,d,b)}c=c._iNext}while(c!=g._container.last._iNext)}},collideSpriteVsTilemap:function(d,g,f,e,b){this._mapData=g.collisionLayer.getTileOverlaps(d);var c=this._mapData.length;while(c--){if(e){if(e.call(b,d,this._mapData[c].tile)){this._total++;if(f){f.call(b,d,this._mapData[c].tile)}}}else{this._total++;if(f){f.call(b,d,this._mapData[c].tile)}}}},collideSpriteVsGroup:function(e,h,g,f,c){this._potentials=this.quadTree.retrieve(e);for(var d=0,b=this._potentials.length;d0)?c.deltaX():0),c.lastY,c.width+((c.deltaX()>0)?c.deltaX():-c.deltaX()),c.height);this._bounds2.setTo(b.x-((b.deltaX()>0)?b.deltaX():0),b.lastY,b.width+((b.deltaX()>0)?b.deltaX():-b.deltaX()),b.height);if((this._bounds1.right>this._bounds2.x)&&(this._bounds1.xthis._bounds2.y)&&(this._bounds1.yb.deltaX()){this._overlap=c.x+c.width-b.x;if((this._overlap>this._maxOverlap)||c.allowCollision.right==false||b.allowCollision.left==false){this._overlap=0}else{c.touching.right=true;b.touching.left=true}}else{if(c.deltaX()this._maxOverlap)||c.allowCollision.left==false||b.allowCollision.right==false){this._overlap=0}else{c.touching.left=true;b.touching.right=true}}}}}if(this._overlap!=0){c.overlapX=this._overlap;b.overlapX=this._overlap;if(c.customSeparateX||b.customSeparateX){return true}this._velocity1=c.velocity.x;this._velocity2=b.velocity.x;if(!c.immovable&&!b.immovable){this._overlap*=0.5;c.x=c.x-this._overlap;b.x+=this._overlap;this._newVelocity1=Math.sqrt((this._velocity2*this._velocity2*b.mass)/c.mass)*((this._velocity2>0)?1:-1);this._newVelocity2=Math.sqrt((this._velocity1*this._velocity1*c.mass)/b.mass)*((this._velocity1>0)?1:-1);this._average=(this._newVelocity1+this._newVelocity2)*0.5;this._newVelocity1-=this._average;this._newVelocity2-=this._average;c.velocity.x=this._average+this._newVelocity1*c.bounce.x;b.velocity.x=this._average+this._newVelocity2*b.bounce.x}else{if(!c.immovable){c.x=c.x-this._overlap;c.velocity.x=this._velocity2-this._velocity1*c.bounce.x}else{if(!b.immovable){b.x+=this._overlap;b.velocity.x=this._velocity1-this._velocity2*b.bounce.x}}}return true}else{return false}},separateY:function(c,b){if(c.immovable&&b.immovable){return false}this._overlap=0;if(c.deltaY()!=b.deltaY()){this._bounds1.setTo(c.x,c.y-((c.deltaY()>0)?c.deltaY():0),c.width,c.height+c.deltaAbsY());this._bounds2.setTo(b.x,b.y-((b.deltaY()>0)?b.deltaY():0),b.width,b.height+b.deltaAbsY());if((this._bounds1.right>this._bounds2.x)&&(this._bounds1.xthis._bounds2.y)&&(this._bounds1.yb.deltaY()){this._overlap=c.y+c.height-b.y;if((this._overlap>this._maxOverlap)||c.allowCollision.down==false||b.allowCollision.up==false){this._overlap=0}else{c.touching.down=true;b.touching.up=true}}else{if(c.deltaY()this._maxOverlap)||c.allowCollision.up==false||b.allowCollision.down==false){this._overlap=0}else{c.touching.up=true;b.touching.down=true}}}}}if(this._overlap!=0){c.overlapY=this._overlap;b.overlapY=this._overlap;if(c.customSeparateY||b.customSeparateY){return true}this._velocity1=c.velocity.y;this._velocity2=b.velocity.y;if(!c.immovable&&!b.immovable){this._overlap*=0.5;c.y=c.y-this._overlap;b.y+=this._overlap;this._newVelocity1=Math.sqrt((this._velocity2*this._velocity2*b.mass)/c.mass)*((this._velocity2>0)?1:-1);this._newVelocity2=Math.sqrt((this._velocity1*this._velocity1*c.mass)/b.mass)*((this._velocity1>0)?1:-1);this._average=(this._newVelocity1+this._newVelocity2)*0.5;this._newVelocity1-=this._average;this._newVelocity2-=this._average;c.velocity.y=this._average+this._newVelocity1*c.bounce.y;b.velocity.y=this._average+this._newVelocity2*b.bounce.y}else{if(!c.immovable){c.y=c.y-this._overlap;c.velocity.y=this._velocity2-this._velocity1*c.bounce.y;if(b.active&&b.moves&&(c.deltaY()>b.deltaY())){c.x+=b.x-b.lastX}}else{if(!b.immovable){b.y+=this._overlap;b.velocity.y=this._velocity1-this._velocity2*b.bounce.y;if(c.sprite.active&&c.moves&&(c.deltaY()h)&&(this._bounds1.xg)&&(this._bounds1.y0){this._overlap=c.x+c.width-h;if((this._overlap>this._maxOverlap)||!c.allowCollision.right||!d){this._overlap=0}else{c.touching.right=true}}else{if(c.deltaX()<0){this._overlap=c.x-b-h;if((-this._overlap>this._maxOverlap)||!c.allowCollision.left||!i){this._overlap=0}else{c.touching.left=true}}}}}if(this._overlap!=0){if(e){c.x=c.x-this._overlap;if(c.bounce.x==0){c.velocity.x=0}else{c.velocity.x=-c.velocity.x*c.bounce.x}}return true}else{return false}},separateTileY:function(d,h,g,c,j,f,i,b,e){if(d.immovable){return false}this._overlap=0;if(d.deltaY()!=0){this._bounds1.setTo(d.x,d.y,d.width,d.height);if((this._bounds1.right>h)&&(this._bounds1.xg)&&(this._bounds1.y0){this._overlap=d.bottom-g;if((this._overlap>this._maxOverlap)||!d.allowCollision.down||!b){this._overlap=0}else{d.touching.down=true}}else{this._overlap=d.y-j-g;if((-this._overlap>this._maxOverlap)||!d.allowCollision.up||!i){this._overlap=0}else{d.touching.up=true}}}}if(this._overlap!=0){if(e){d.y=d.y-this._overlap;if(d.bounce.y==0){d.velocity.y=0}else{d.velocity.y=-d.velocity.y*d.bounce.y}}return true}else{return false}},velocityFromAngle:function(e,d,b){d=d||0;b=b||new Phaser.Point;var c=this.game.math.degToRad(e);return b.setTo((Math.cos(c)*d),(Math.sin(c)*d))},moveTowardsObject:function(g,e,f,c){f=f||60;c=c||0;var b=this.angleBetween(g,e);if(c>0){var h=this.distanceBetween(g,e);f=h/(c/1000)}g.body.velocity.x=Math.cos(b)*f;g.body.velocity.y=Math.sin(b)*f},accelerateTowardsObject:function(f,d,e,b,g){b=b||1000;g=g||1000;var c=this.angleBetween(f,d);f.body.velocity.x=0;f.body.velocity.y=0;f.body.acceleration.x=Math.cos(c)*e;f.body.acceleration.y=Math.sin(c)*e;f.body.maxVelocity.x=b;f.body.maxVelocity.y=g},moveTowardsMouse:function(f,e,c){e=e||60;c=c||0;var b=this.angleBetweenMouse(f);if(c>0){var g=this.distanceToMouse(f);e=g/(c/1000)}f.body.velocity.x=Math.cos(b)*e;f.body.velocity.y=Math.sin(b)*e},accelerateTowardsMouse:function(e,d,b,f){b=b||1000;f=f||1000;var c=this.angleBetweenMouse(e);e.body.velocity.x=0;e.body.velocity.y=0;e.body.acceleration.x=Math.cos(c)*d;e.body.acceleration.y=Math.sin(c)*d;e.body.maxVelocity.x=b;e.body.maxVelocity.y=f},moveTowardsPoint:function(f,g,e,c){e=e||60;c=c||0;var b=this.angleBetweenPoint(f,g);if(c>0){var h=this.distanceToPoint(f,g);e=h/(c/1000)}f.body.velocity.x=Math.cos(b)*e;f.body.velocity.y=Math.sin(b)*e},accelerateTowardsPoint:function(e,f,d,b,g){b=b||1000;g=g||1000;var c=this.angleBetweenPoint(e,f);e.body.velocity.x=0;e.body.velocity.y=0;e.body.acceleration.x=Math.cos(c)*d;e.body.acceleration.y=Math.sin(c)*d;e.body.maxVelocity.x=b;e.body.maxVelocity.y=g},distanceBetween:function(e,c){var f=e.center.x-c.center.x;var d=e.center.y-c.center.y;return Math.sqrt(f*f+d*d)},distanceToPoint:function(c,e){var d=c.center.x-e.x;var b=c.center.y-e.y;return Math.sqrt(d*d+b*b)},distanceToMouse:function(c){var d=c.center.x-this.game.input.x;var b=c.center.y-this.game.input.y;return Math.sqrt(d*d+b*b)},angleBetweenPoint:function(c,f,e){e=e||false;var d=f.x-c.center.x;var b=f.y-c.center.y;if(e){return this.game.math.radToDeg(Math.atan2(b,d))}else{return Math.atan2(b,d)}},angleBetween:function(e,c,g){g=g||false;var f=c.center.x-e.center.x;var d=c.center.y-e.center.y;if(g){return this.game.math.radToDeg(Math.atan2(d,f))}else{return Math.atan2(d,f)}},velocityFromFacing:function(b,c){},angleBetweenMouse:function(c,e){e=e||false;var d=this.game.input.x-c.bounds.x;var b=this.game.input.y-c.bounds.y;if(e){return this.game.math.radToDeg(Math.atan2(b,d))}else{return Math.atan2(b,d)}}};Phaser.Physics.Arcade.Body=function(b){this.sprite=b;this.game=b.game;this.offset=new Phaser.Point;this.x=b.x;this.y=b.y;this.lastX=b.x;this.lastY=b.y;this.sourceWidth=b.currentFrame.sourceSizeW;this.sourceHeight=b.currentFrame.sourceSizeH;this.width=b.currentFrame.sourceSizeW;this.height=b.currentFrame.sourceSizeH;this.halfWidth=Math.floor(b.currentFrame.sourceSizeW/2);this.halfHeight=Math.floor(b.currentFrame.sourceSizeH/2);this._sx=b.scale.x;this._sy=b.scale.y;this.velocity=new Phaser.Point;this.acceleration=new Phaser.Point;this.drag=new Phaser.Point;this.gravity=new Phaser.Point;this.bounce=new Phaser.Point;this.maxVelocity=new Phaser.Point(10000,10000);this.angularVelocity=0;this.angularAcceleration=0;this.angularDrag=0;this.maxAngular=1000;this.mass=1;this.quadTreeIDs=[];this.quadTreeIndex=-1;this.allowCollision={none:false,any:true,up:true,down:true,left:true,right:true};this.touching={none:true,up:false,down:false,left:false,right:false};this.wasTouching={none:true,up:false,down:false,left:false,right:false};this.immovable=false;this.moves=true;this.rotation=0;this.allowRotation=true;this.allowGravity=true;this.customSeparateX=false;this.customSeparateY=false;this.overlapX=0;this.overlapY=0;this.collideWorldBounds=false};Phaser.Physics.Arcade.Body.prototype={updateBounds:function(e,d,c,b){if(c!=this._sx||b!=this._sy){this.width=this.sourceWidth*c;this.height=this.sourceHeight*b;this.halfWidth=Math.floor(this.width/2);this.halfHeight=Math.floor(this.height/2);this._sx=c;this._sy=b}},update:function(){this.wasTouching.none=this.touching.none;this.wasTouching.up=this.touching.up;this.wasTouching.down=this.touching.down;this.wasTouching.left=this.touching.left;this.wasTouching.right=this.touching.right;this.touching.none=true;this.touching.up=false;this.touching.down=false;this.touching.left=false;this.touching.right=false;this.lastX=this.x;this.lastY=this.y;this.rotation=this.sprite.angle;this.x=(this.sprite.x-(this.sprite.anchor.x*this.width))+this.offset.x;this.y=(this.sprite.y-(this.sprite.anchor.y*this.height))+this.offset.y;if(this.moves){this.game.physics.updateMotion(this)}if(this.collideWorldBounds){this.checkWorldBounds()}if(this.allowCollision.none==false&&this.sprite.visible&&this.sprite.alive){this.quadTreeIDs=[];this.quadTreeIndex=-1;this.game.physics.quadTree.insert(this)}if(this.deltaX()!=0){this.sprite.x-=this.deltaX()}if(this.deltaY()!=0){this.sprite.y-=this.deltaY()}this.sprite.x=this.x-this.offset.x+(this.sprite.anchor.x*this.width);this.sprite.y=this.y-this.offset.y+(this.sprite.anchor.y*this.height);if(this.allowRotation){this.sprite.angle=this.rotation}},postUpdate:function(){this.sprite.x=this.x-this.offset.x+(this.sprite.anchor.x*this.width);this.sprite.y=this.y-this.offset.y+(this.sprite.anchor.y*this.height);if(this.allowRotation){this.sprite.angle=this.rotation}},checkWorldBounds:function(){if(this.xthis.game.world.bounds.right){this.x=this.game.world.bounds.right-this.width;this.velocity.x*=-this.bounce.x}}if(this.ythis.game.world.bounds.bottom){this.y=this.game.world.bounds.bottom-this.height;this.velocity.y*=-this.bounce.y}}},setSize:function(d,c,b,e){b=b||this.offset.x;e=e||this.offset.y;this.sourceWidth=d;this.sourceHeight=c;this.width=this.sourceWidth*this._sx;this.height=this.sourceHeight*this._sy;this.halfWidth=Math.floor(this.width/2);this.halfHeight=Math.floor(this.height/2);this.offset.setTo(b,e)},reset:function(){this.velocity.setTo(0,0);this.acceleration.setTo(0,0);this.angularVelocity=0;this.angularAcceleration=0;this.x=(this.sprite.x-(this.sprite.anchor.x*this.width))+this.offset.x;this.y=(this.sprite.y-(this.sprite.anchor.y*this.height))+this.offset.y;this.lastX=this.x;this.lastY=this.y},deltaAbsX:function(){return(this.deltaX()>0?this.deltaX():-this.deltaX())},deltaAbsY:function(){return(this.deltaY()>0?this.deltaY():-this.deltaY())},deltaX:function(){return this.x-this.lastX},deltaY:function(){return this.y-this.lastY}};Object.defineProperty(Phaser.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.y+this.height},set:function(b){if(b<=this.y){this.height=0}else{this.height=(this.y-b)}}});Object.defineProperty(Phaser.Physics.Arcade.Body.prototype,"right",{get:function(){return this.x+this.width},set:function(b){if(b<=this.x){this.width=0}else{this.width=this.x+b}}});Phaser.Particles=function(b){this.emitters={};this.ID=0};Phaser.Particles.prototype={emitters:null,add:function(b){this.emitters[b.name]=b;return b},remove:function(b){delete this.emitters[b.name]},update:function(){for(var b in this.emitters){if(this.emitters[b].exists){this.emitters[b].update()}}}};Phaser.Particles.Arcade={};Phaser.Particles.Arcade.Emitter=function(c,b,e,d){d=d||50;Phaser.Group.call(this,c);this.name="emitter"+this.game.particles.ID++;this.type=Phaser.EMITTER;this.x=0;this.y=0;this.width=1;this.height=1;this.minParticleSpeed=new Phaser.Point(-100,-100);this.maxParticleSpeed=new Phaser.Point(100,100);this.minParticleScale=1;this.maxParticleScale=1;this.minRotation=-360;this.maxRotation=360;this.gravity=2;this.particleClass=null;this.particleDrag=new Phaser.Point();this.angularDrag=0;this.frequency=100;this.maxParticles=d;this.lifespan=2000;this.bounce=new Phaser.Point();this._quantity=0;this._timer=0;this._counter=0;this._explode=true;this.on=false;this.exists=true;this.emitX=b;this.emitY=e};Phaser.Particles.Arcade.Emitter.prototype=Object.create(Phaser.Group.prototype);Phaser.Particles.Arcade.Emitter.prototype.constructor=Phaser.Particles.Arcade.Emitter;Phaser.Particles.Arcade.Emitter.prototype.update=function(){if(this.on){if(this._explode){this._counter=0;do{this.emitParticle();this._counter++}while(this._counter=this._timer){this.emitParticle();this._counter++;if(this._quantity>0){if(this._counter>=this._quantity){this.on=false}}this._timer=this.game.time.now+this.frequency}}}};Phaser.Particles.Arcade.Emitter.prototype.makeParticles=function(j,f,c,h,k){if(typeof f=="undefined"){f=0}c=c||this.maxParticles;h=h||0;if(typeof k=="undefined"){k=false}var e;var d=0;var b=j;var g=0;while(d0){e.body.allowCollision.any=true;e.body.allowCollision.none=false}else{e.body.allowCollision.none=true}e.body.collideWorldBounds=k;e.exists=false;e.visible=false;e.anchor.setTo(0.5,0.5);this.add(e);d++}return this};Phaser.Particles.Arcade.Emitter.prototype.kill=function(){this.on=false;this.alive=false;this.exists=false};Phaser.Particles.Arcade.Emitter.prototype.revive=function(){this.alive=true;this.exists=true};Phaser.Particles.Arcade.Emitter.prototype.start=function(b,e,d,c){if(typeof b!=="boolean"){b=true}e=e||0;d=d||250;c=c||0;this.revive();this.visible=true;this.on=true;this._explode=b;this.lifespan=e;this.frequency=d;if(b){this._quantity=c}else{this._quantity+=c}this._counter=0;this._timer=this.game.time.now+d};Phaser.Particles.Arcade.Emitter.prototype.emitParticle=function(){var c=this.getFirstExists(false);if(c==null){return}if(this.width>1||this.height>1){c.reset(this.emiteX-this.game.rnd.integerInRange(this.left,this.right),this.emiteY-this.game.rnd.integerInRange(this.top,this.bottom))}else{c.reset(this.emitX,this.emitY)}c.lifespan=this.lifespan;c.body.bounce.setTo(this.bounce.x,this.bounce.y);if(this.minParticleSpeed.x!=this.maxParticleSpeed.x){c.body.velocity.x=this.game.rnd.integerInRange(this.minParticleSpeed.x,this.maxParticleSpeed.x)}else{c.body.velocity.x=this.minParticleSpeed.x}if(this.minParticleSpeed.y!=this.maxParticleSpeed.y){c.body.velocity.y=this.game.rnd.integerInRange(this.minParticleSpeed.y,this.maxParticleSpeed.y)}else{c.body.velocity.y=this.minParticleSpeed.y}c.body.gravity.y=this.gravity;if(this.minRotation!=this.maxRotation){c.body.angularVelocity=this.game.rnd.integerInRange(this.minRotation,this.maxRotation)}else{c.body.angularVelocity=this.minRotation}if(this.minParticleScale!==1||this.maxParticleScale!==1){var b=this.game.rnd.realInRange(this.minParticleScale,this.maxParticleScale);c.scale.setTo(b,b)}c.body.drag.x=this.particleDrag.x;c.body.drag.y=this.particleDrag.y;c.body.angularDrag=this.angularDrag};Phaser.Particles.Arcade.Emitter.prototype.setSize=function(c,b){this.width=c;this.height=b};Phaser.Particles.Arcade.Emitter.prototype.setXSpeed=function(c,b){c=c||0;b=b||0;this.minParticleSpeed.x=c;this.maxParticleSpeed.x=b};Phaser.Particles.Arcade.Emitter.prototype.setYSpeed=function(c,b){c=c||0;b=b||0;this.minParticleSpeed.y=c;this.maxParticleSpeed.y=b};Phaser.Particles.Arcade.Emitter.prototype.setRotation=function(c,b){c=c||0;b=b||0;this.minRotation=c;this.maxRotation=b};Phaser.Particles.Arcade.Emitter.prototype.at=function(b){this.emitX=b.center.x;this.emitY=b.center.y};Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"alpha",{get:function(){return this._container.alpha},set:function(b){this._container.alpha=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"visible",{get:function(){return this._container.visible},set:function(b){this._container.visible=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(b){this.emitX=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(b){this.emitY=b}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-(this.width/2))}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+(this.width/2))}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-(this.height/2))}});Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+(this.height/2))}});Phaser.Tilemap=function(d,e,b,i,g,h,c){if(typeof g==="undefined"){g=true}if(typeof h==="undefined"){h=0}if(typeof c==="undefined"){c=0}this.game=d;this.group=null;this.name="";this.key=e;this.renderOrderID=0;this.collisionCallback=null;this.exists=true;this.visible=true;this.tiles=[];this.layers=[];var f=this.game.cache.getTilemap(e);PIXI.DisplayObjectContainer.call(this);this.position.x=b;this.position.y=i;this.type=Phaser.TILEMAP;this.renderer=new Phaser.TilemapRenderer(this.game);this.mapFormat=f.format;switch(this.mapFormat){case Phaser.Tilemap.CSV:this.parseCSV(f.mapData,e,h,c);break;case Phaser.Tilemap.JSON:this.parseTiledJSON(f.mapData,e);break}if(this.currentLayer&&g){this.game.world.setSize(this.currentLayer.widthInPixels,this.currentLayer.heightInPixels,true)}};Phaser.Tilemap.prototype=Object.create(PIXI.DisplayObjectContainer.prototype);Phaser.Tilemap.prototype.constructor=Phaser.Tilemap;Phaser.Tilemap.CSV=0;Phaser.Tilemap.JSON=1;Phaser.Tilemap.prototype.parseCSV=function(d,j,h,g){var f=new Phaser.TilemapLayer(this,0,j,Phaser.Tilemap.CSV,"TileLayerCSV"+this.layers.length.toString(),h,g);d=d.trim();var k=d.split("\n");for(var e=0;e0){f.addColumn(c)}}f.updateBounds();f.createCanvas();var b=f.parseTileOffsets();this.currentLayer=f;this.collisionLayer=f;this.layers.push(f);this.generateTiles(b)};Phaser.Tilemap.prototype.parseTiledJSON=function(g,f){for(var e=0;e0){this.collisionCallback.call(this.collisionCallbackContext,b,this._tempCollisionData)}return true}else{return false}};Phaser.Tilemap.prototype.putTile=function(b,e,c,d){if(typeof d==="undefined"){d=this.currentLayer.ID}this.layers[d].putTile(b,e,c)};Phaser.Tilemap.prototype.update=function(){this.renderer.render(this)};Phaser.Tilemap.prototype.destroy=function(){this.tiles.length=0;this.layers.length=0};Object.defineProperty(Phaser.Tilemap.prototype,"widthInPixels",{get:function(){return this.currentLayer.widthInPixels}});Object.defineProperty(Phaser.Tilemap.prototype,"heightInPixels",{get:function(){return this.currentLayer.heightInPixels}});Phaser.TilemapLayer=function(f,i,e,d,c,h,b){this.exists=true;this.visible=true;this.widthInTiles=0;this.heightInTiles=0;this.widthInPixels=0;this.heightInPixels=0;this.tileMargin=0;this.tileSpacing=0;this.parent=f;this.game=f.game;this.ID=i;this.name=c;this.key=e;this.type=Phaser.TILEMAPLAYER;this.mapFormat=d;this.tileWidth=h;this.tileHeight=b;this.boundsInTiles=new Phaser.Rectangle();var g=this.game.cache.getTilemap(e);this.tileset=g.data;this._alpha=1;this.canvas=null;this.context=null;this.baseTexture=null;this.texture=null;this.sprite=null;this.mapData=[];this._tempTileBlock=[];this._tempBlockResults=[]};Phaser.TilemapLayer.prototype={putTileWorldXY:function(b,d,c){b=this.game.math.snapToFloor(b,this.tileWidth)/this.tileWidth;d=this.game.math.snapToFloor(d,this.tileHeight)/this.tileHeight;if(d>=0&&d=0&&b=0&&d=0&&bthis.widthInPixels||b.body.y<0||b.body.bottom>this.heightInPixels){return this._tempBlockResults}this._tempTileX=this.game.math.snapToFloor(b.body.x,this.tileWidth)/this.tileWidth;this._tempTileY=this.game.math.snapToFloor(b.body.y,this.tileHeight)/this.tileHeight;this._tempTileW=(this.game.math.snapToCeil(b.body.width,this.tileWidth)+this.tileWidth)/this.tileWidth;this._tempTileH=(this.game.math.snapToCeil(b.body.height,this.tileHeight)+this.tileHeight)/this.tileHeight;this.getTempBlock(this._tempTileX,this._tempTileY,this._tempTileW,this._tempTileH,true);for(var c=0;cthis.widthInTiles){g=this.widthInTiles}if(c>this.heightInTiles){c=this.heightInTiles}this._tempTileBlock=[];for(var b=h;b=0&&c=0&&bb.widthInTiles){this._maxX=b.widthInTiles}if(this._maxY>b.heightInTiles){this._maxY=b.heightInTiles}if(this._startX+this._maxX>b.widthInTiles){this._startX=b.widthInTiles-this._maxX}if(this._startY+this._maxY>b.heightInTiles){this._startY=b.heightInTiles-this._maxY}this._dx=-(this.game.camera.x-(this._startX*b.tileWidth));this._dy=-(this.game.camera.y-(this._startY*b.tileHeight));this._tx=this._dx;this._ty=this._dy;if(b.alpha!==1){this._ga=b.context.globalAlpha;b.context.globalAlpha=b.alpha}b.context.clearRect(0,0,b.canvas.width,b.canvas.height);for(var f=this._startY;f-1){b.context.globalAlpha=this._ga}if(this.game.renderType==Phaser.WEBGL){PIXI.texturesToUpdate.push(b.baseTexture)}}return true}}; \ No newline at end of file +/*! Phaser v1.1.0 | (c) 2013 Photon Storm Ltd. */ +!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.Phaser=b()}(this,function(){function b(a){return[(255&a>>16)/255,(255&a>>8)/255,(255&a)/255]}function c(){return d.Matrix="undefined"!=typeof Float32Array?Float32Array:Array,d.Matrix}function b(a){return[(255&a>>16)/255,(255&a>>8)/255,(255&a)/255]}var d=d||{},e=e||{VERSION:"1.1.0",GAMES:[],AUTO:0,CANVAS:1,WEBGL:2,SPRITE:0,BUTTON:1,BULLET:2,GRAPHICS:3,TEXT:4,TILESPRITE:5,BITMAPTEXT:6,GROUP:7,RENDERTEXTURE:8,TILEMAP:9,TILEMAPLAYER:10,EMITTER:11,NONE:0,LEFT:1,RIGHT:2,UP:3,DOWN:4};return d.InteractionManager=function(){},e.Utils={shuffle:function(a){for(var b=a.length-1;b>0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c],a[c]=d}return a},pad:function(a,b,c,d){if("undefined"==typeof b)var b=0;if("undefined"==typeof c)var c=" ";if("undefined"==typeof d)var d=3;if(b+1>=a.length)switch(d){case 1:a=Array(b+1-a.length).join(c)+a;break;case 3:var e=Math.ceil((padlen=b-a.length)/2),f=padlen-e;a=Array(f+1).join(c)+a+Array(e+1).join(c);break;default:a+=Array(b+1-a.length).join(c)}return a},isPlainObject:function(a){if("object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!hasOwn.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},extend:function(){var a,b,c,d,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),j===i&&(h=this,--i);j>i;i++)if(null!=(a=arguments[i]))for(b in a)c=h[b],d=a[b],h!==d&&(k&&d&&(e.Utils.isPlainObject(d)||(f=Array.isArray(d)))?(f?(f=!1,g=c&&Array.isArray(c)?c:[]):g=c&&e.Utils.isPlainObject(c)?c:{},h[b]=e.Utils.extend(k,g,d)):void 0!==d&&(h[b]=d));return h}},"function"!=typeof Function.prototype.bind&&(Function.prototype.bind=function(){var a=Array.prototype.slice;return function(b){function c(){var f=e.concat(a.call(arguments));d.apply(this instanceof c?this:b,f)}var d=this,e=a.call(arguments,1);if("function"!=typeof d)throw new TypeError;return c.prototype=function f(a){return a&&(f.prototype=a),this instanceof f?void 0:new f}(d.prototype),c}}()),c(),d.mat3={},d.mat3.create=function(){var a=new d.Matrix(9);return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a},d.mat3.identity=function(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=0,a[7]=0,a[8]=1,a},d.mat4={},d.mat4.create=function(){var a=new d.Matrix(16);return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a},d.mat3.multiply=function(a,b,c){c||(c=a);var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],i=a[5],j=a[6],k=a[7],l=a[8],m=b[0],n=b[1],o=b[2],p=b[3],q=b[4],r=b[5],s=b[6],t=b[7],u=b[8];return c[0]=m*d+n*g+o*j,c[1]=m*e+n*h+o*k,c[2]=m*f+n*i+o*l,c[3]=p*d+q*g+r*j,c[4]=p*e+q*h+r*k,c[5]=p*f+q*i+r*l,c[6]=s*d+t*g+u*j,c[7]=s*e+t*h+u*k,c[8]=s*f+t*i+u*l,c},d.mat3.clone=function(a){var b=new d.Matrix(9);return b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b},d.mat3.transpose=function(a,b){if(!b||a===b){var c=a[1],d=a[2],e=a[5];return a[1]=a[3],a[2]=a[6],a[3]=c,a[5]=a[7],a[6]=d,a[7]=e,a}return b[0]=a[0],b[1]=a[3],b[2]=a[6],b[3]=a[1],b[4]=a[4],b[5]=a[7],b[6]=a[2],b[7]=a[5],b[8]=a[8],b},d.mat3.toMat4=function(a,b){return b||(b=d.mat4.create()),b[15]=1,b[14]=0,b[13]=0,b[12]=0,b[11]=0,b[10]=a[8],b[9]=a[7],b[8]=a[6],b[7]=0,b[6]=a[5],b[5]=a[4],b[4]=a[3],b[3]=0,b[2]=a[2],b[1]=a[1],b[0]=a[0],b},d.mat4.create=function(){var a=new d.Matrix(16);return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a},d.mat4.transpose=function(a,b){if(!b||a===b){var c=a[1],d=a[2],e=a[3],f=a[6],g=a[7],h=a[11];return a[1]=a[4],a[2]=a[8],a[3]=a[12],a[4]=c,a[6]=a[9],a[7]=a[13],a[8]=d,a[9]=f,a[11]=a[14],a[12]=e,a[13]=g,a[14]=h,a}return b[0]=a[0],b[1]=a[4],b[2]=a[8],b[3]=a[12],b[4]=a[1],b[5]=a[5],b[6]=a[9],b[7]=a[13],b[8]=a[2],b[9]=a[6],b[10]=a[10],b[11]=a[14],b[12]=a[3],b[13]=a[7],b[14]=a[11],b[15]=a[15],b},d.mat4.multiply=function(a,b,c){c||(c=a);var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],i=a[5],j=a[6],k=a[7],l=a[8],m=a[9],n=a[10],o=a[11],p=a[12],q=a[13],r=a[14],s=a[15],t=b[0],u=b[1],v=b[2],w=b[3];return c[0]=t*d+u*h+v*l+w*p,c[1]=t*e+u*i+v*m+w*q,c[2]=t*f+u*j+v*n+w*r,c[3]=t*g+u*k+v*o+w*s,t=b[4],u=b[5],v=b[6],w=b[7],c[4]=t*d+u*h+v*l+w*p,c[5]=t*e+u*i+v*m+w*q,c[6]=t*f+u*j+v*n+w*r,c[7]=t*g+u*k+v*o+w*s,t=b[8],u=b[9],v=b[10],w=b[11],c[8]=t*d+u*h+v*l+w*p,c[9]=t*e+u*i+v*m+w*q,c[10]=t*f+u*j+v*n+w*r,c[11]=t*g+u*k+v*o+w*s,t=b[12],u=b[13],v=b[14],w=b[15],c[12]=t*d+u*h+v*l+w*p,c[13]=t*e+u*i+v*m+w*q,c[14]=t*f+u*j+v*n+w*r,c[15]=t*g+u*k+v*o+w*s,c},d.Point=function(a,b){this.x=a||0,this.y=b||0},d.Point.prototype.clone=function(){return new d.Point(this.x,this.y)},d.Point.prototype.constructor=d.Point,d.Rectangle=function(a,b,c,d){this.x=a||0,this.y=b||0,this.width=c||0,this.height=d||0},d.Rectangle.prototype.clone=function(){return new d.Rectangle(this.x,this.y,this.width,this.height)},d.Rectangle.prototype.contains=function(a,b){if(this.width<=0||this.height<=0)return!1;var c=this.x;if(a>=c&&a<=c+this.width){var d=this.y;if(b>=d&&b<=d+this.height)return!0}return!1},d.Rectangle.prototype.constructor=d.Rectangle,d.DisplayObject=function(){this.last=this,this.first=this,this.position=new d.Point,this.scale=new d.Point(1,1),this.pivot=new d.Point(0,0),this.rotation=0,this.alpha=1,this.visible=!0,this.hitArea=null,this.buttonMode=!1,this.renderable=!1,this.parent=null,this.stage=null,this.worldAlpha=1,this._interactive=!1,this.worldTransform=d.mat3.create(),this.localTransform=d.mat3.create(),this.color=[],this.dynamic=!0,this._sr=0,this._cr=1},d.DisplayObject.prototype.constructor=d.DisplayObject,d.DisplayObject.prototype.setInteractive=function(a){this.interactive=a},Object.defineProperty(d.DisplayObject.prototype,"interactive",{get:function(){return this._interactive},set:function(a){this._interactive=a,this.stage&&(this.stage.dirty=!0)}}),Object.defineProperty(d.DisplayObject.prototype,"mask",{get:function(){return this._mask},set:function(a){this._mask=a,a?this.addFilter(a):this.removeFilter()}}),d.DisplayObject.prototype.addFilter=function(a){if(!this.filter){this.filter=!0;var b=new d.FilterBlock,c=new d.FilterBlock;b.mask=a,c.mask=a,b.first=b.last=this,c.first=c.last=this,b.open=!0;var e,f,g=b,h=b;f=this.first._iPrev,f?(e=f._iNext,g._iPrev=f,f._iNext=g):e=this,e&&(e._iPrev=h,h._iNext=e);var g=c,h=c,e=null,f=null;f=this.last,e=f._iNext,e&&(e._iPrev=h,h._iNext=e),g._iPrev=f,f._iNext=g;for(var i=this,j=this.last;i;)i.last==j&&(i.last=c),i=i.parent;this.first=b,this.__renderGroup&&this.__renderGroup.addFilterBlocks(b,c),a.renderable=!1}},d.DisplayObject.prototype.removeFilter=function(){if(this.filter){this.filter=!1;var a=this.first,b=a._iNext,c=a._iPrev;b&&(b._iPrev=c),c&&(c._iNext=b),this.first=a._iNext;var d=this.last,b=d._iNext,c=d._iPrev;b&&(b._iPrev=c),c._iNext=b;for(var e=d._iPrev,f=this;f.last==d&&(f.last=e,f=f.parent););var g=a.mask;g.renderable=!0,this.__renderGroup&&this.__renderGroup.removeFilterBlocks(a,d)}},d.DisplayObject.prototype.updateTransform=function(){this.rotation!==this.rotationCache&&(this.rotationCache=this.rotation,this._sr=Math.sin(this.rotation),this._cr=Math.cos(this.rotation));var a=this.localTransform,b=this.parent.worldTransform,c=this.worldTransform;a[0]=this._cr*this.scale.x,a[1]=-this._sr*this.scale.y,a[3]=this._sr*this.scale.x,a[4]=this._cr*this.scale.y;var e=this.pivot.x,f=this.pivot.y,g=a[0],h=a[1],i=this.position.x-a[0]*e-f*a[1],j=a[3],k=a[4],l=this.position.y-a[4]*f-e*a[3],m=b[0],n=b[1],o=b[2],p=b[3],q=b[4],r=b[5];a[2]=i,a[5]=l,c[0]=m*g+n*j,c[1]=m*h+n*k,c[2]=m*i+n*l+o,c[3]=p*g+q*j,c[4]=p*h+q*k,c[5]=p*i+q*l+r,this.worldAlpha=this.alpha*this.parent.worldAlpha,this.vcount=d.visibleCount},d.visibleCount=0,d.DisplayObjectContainer=function(){d.DisplayObject.call(this),this.children=[]},d.DisplayObjectContainer.prototype=Object.create(d.DisplayObject.prototype),d.DisplayObjectContainer.prototype.constructor=d.DisplayObjectContainer,d.DisplayObjectContainer.prototype.addChild=function(a){if(void 0!=a.parent&&a.parent.removeChild(a),a.parent=this,this.children.push(a),this.stage){var b=a;do b.interactive&&(this.stage.dirty=!0),b.stage=this.stage,b=b._iNext;while(b)}var c,d,e=a.first,f=a.last;d=this.filter?this.last._iPrev:this.last,c=d._iNext;for(var g=this,h=d;g;)g.last==h&&(g.last=a.last),g=g.parent;c&&(c._iPrev=f,f._iNext=c),e._iPrev=d,d._iNext=e,this.__renderGroup&&(a.__renderGroup&&a.__renderGroup.removeDisplayObjectAndChildren(a),this.__renderGroup.addDisplayObjectAndChildren(a))},d.DisplayObjectContainer.prototype.addChildAt=function(a,b){if(!(b>=0&&b<=this.children.length))throw new Error(a+" The index "+b+" supplied is out of bounds "+this.children.length);if(void 0!=a.parent&&a.parent.removeChild(a),a.parent=this,this.stage){var c=a;do c.interactive&&(this.stage.dirty=!0),c.stage=this.stage,c=c._iNext;while(c)}var d,e,f=a.first,g=a.last;if(b==this.children.length){e=this.last;for(var h=this,i=this.last;h;)h.last==i&&(h.last=a.last),h=h.parent}else e=0==b?this:this.children[b-1].last;d=e._iNext,d&&(d._iPrev=g,g._iNext=d),f._iPrev=e,e._iNext=f,this.children.splice(b,0,a),this.__renderGroup&&(a.__renderGroup&&a.__renderGroup.removeDisplayObjectAndChildren(a),this.__renderGroup.addDisplayObjectAndChildren(a))},d.DisplayObjectContainer.prototype.swapChildren=function(){},d.DisplayObjectContainer.prototype.getChildAt=function(a){if(a>=0&&aa;a++)this.children[a].updateTransform()}},d.blendModes={},d.blendModes.NORMAL=0,d.blendModes.SCREEN=1,d.Sprite=function(a){d.DisplayObjectContainer.call(this),this.anchor=new d.Point,this.texture=a,this.blendMode=d.blendModes.NORMAL,this._width=0,this._height=0,a.baseTexture.hasLoaded?this.updateFrame=!0:(this.onTextureUpdateBind=this.onTextureUpdate.bind(this),this.texture.addEventListener("update",this.onTextureUpdateBind)),this.renderable=!0},d.Sprite.prototype=Object.create(d.DisplayObjectContainer.prototype),d.Sprite.prototype.constructor=d.Sprite,Object.defineProperty(d.Sprite.prototype,"width",{get:function(){return this.scale.x*this.texture.frame.width},set:function(a){this.scale.x=a/this.texture.frame.width,this._width=a}}),Object.defineProperty(d.Sprite.prototype,"height",{get:function(){return this.scale.y*this.texture.frame.height},set:function(a){this.scale.y=a/this.texture.frame.height,this._height=a}}),d.Sprite.prototype.setTexture=function(a){this.texture.baseTexture!=a.baseTexture?(this.textureChange=!0,this.texture=a,this.__renderGroup&&this.__renderGroup.updateTexture(this)):this.texture=a,this.updateFrame=!0},d.Sprite.prototype.onTextureUpdate=function(){this._width&&(this.scale.x=this._width/this.texture.frame.width),this._height&&(this.scale.y=this._height/this.texture.frame.height),this.updateFrame=!0},d.Sprite.fromFrame=function(a){var b=d.TextureCache[a];if(!b)throw new Error("The frameId '"+a+"' does not exist in the texture cache"+this);return new d.Sprite(b)},d.Sprite.fromImage=function(a){var b=d.Texture.fromImage(a);return new d.Sprite(b)},d.Stage=function(a,b){d.DisplayObjectContainer.call(this),this.worldTransform=d.mat3.create(),this.interactive=b,this.interactionManager=new d.InteractionManager(this),this.dirty=!0,this.__childrenAdded=[],this.__childrenRemoved=[],this.stage=this,this.stage.hitArea=new d.Rectangle(0,0,1e5,1e5),this.setBackgroundColor(a),this.worldVisible=!0},d.Stage.prototype=Object.create(d.DisplayObjectContainer.prototype),d.Stage.prototype.constructor=d.Stage,d.Stage.prototype.updateTransform=function(){this.worldAlpha=1,this.vcount=d.visibleCount;for(var a=0,b=this.children.length;b>a;a++)this.children[a].updateTransform();this.dirty&&(this.dirty=!1,this.interactionManager.dirty=!0),this.interactive&&this.interactionManager.update()},d.Stage.prototype.setBackgroundColor=function(a){this.backgroundColor=a||0,this.backgroundColorSplit=b(this.backgroundColor);var c=this.backgroundColor.toString(16);c="000000".substr(0,6-c.length)+c,this.backgroundColorString="#"+c},d.Stage.prototype.getMousePosition=function(){return this.interactionManager.mouse.global},d.CustomRenderable=function(){d.DisplayObject.call(this)},d.CustomRenderable.prototype=Object.create(d.DisplayObject.prototype),d.CustomRenderable.prototype.constructor=d.CustomRenderable,d.CustomRenderable.prototype.renderCanvas=function(){},d.CustomRenderable.prototype.initWebGL=function(){},d.CustomRenderable.prototype.renderWebGL=function(){},d.Strip=function(a,b,c){d.DisplayObjectContainer.call(this),this.texture=a,this.blendMode=d.blendModes.NORMAL;try{this.uvs=new Float32Array([0,1,1,1,1,0,0,1]),this.verticies=new Float32Array([0,0,0,0,0,0,0,0,0]),this.colors=new Float32Array([1,1,1,1]),this.indices=new Uint16Array([0,1,2,3])}catch(e){this.uvs=[0,1,1,1,1,0,0,1],this.verticies=[0,0,0,0,0,0,0,0,0],this.colors=[1,1,1,1],this.indices=[0,1,2,3]}this.width=b,this.height=c,a.baseTexture.hasLoaded?(this.width=this.texture.frame.width,this.height=this.texture.frame.height,this.updateFrame=!0):(this.onTextureUpdateBind=this.onTextureUpdate.bind(this),this.texture.addEventListener("update",this.onTextureUpdateBind)),this.renderable=!0},d.Strip.prototype=Object.create(d.DisplayObjectContainer.prototype),d.Strip.prototype.constructor=d.Strip,d.Strip.prototype.setTexture=function(a){this.texture=a,this.width=a.frame.width,this.height=a.frame.height,this.updateFrame=!0},d.Strip.prototype.onTextureUpdate=function(){this.updateFrame=!0},d.Rope=function(a,b){d.Strip.call(this,a),this.points=b;try{this.verticies=new Float32Array(4*b.length),this.uvs=new Float32Array(4*b.length),this.colors=new Float32Array(2*b.length),this.indices=new Uint16Array(2*b.length)}catch(c){this.verticies=verticies,this.uvs=uvs,this.colors=colors,this.indices=indices}this.refresh()},d.Rope.prototype=Object.create(d.Strip.prototype),d.Rope.prototype.constructor=d.Rope,d.Rope.prototype.refresh=function(){var a=this.points;if(!(a.length<1)){var b=this.uvs,c=this.indices,d=this.colors,e=a[0],f=a[0];this.count-=.2,b[0]=0,b[1]=1,b[2]=0,b[3]=1,d[0]=1,d[1]=1,c[0]=0,c[1]=1;for(var g=a.length,h=1;g>h;h++){var f=a[h],i=4*h,j=h/(g-1);h%2?(b[i]=j,b[i+1]=0,b[i+2]=j,b[i+3]=1):(b[i]=j,b[i+1]=0,b[i+2]=j,b[i+3]=1),i=2*h,d[i]=1,d[i+1]=1,i=2*h,c[i]=i,c[i+1]=i+1,e=f}}},d.Rope.prototype.updateTransform=function(){var a=this.points;if(!(a.length<1)){var b,c=this.verticies,e=a[0],f={x:0,y:0},g=a[0];this.count-=.2,c[0]=g.x+f.x,c[1]=g.y+f.y,c[2]=g.x-f.x,c[3]=g.y-f.y;for(var h=a.length,i=1;h>i;i++){var g=a[i],j=4*i;b=i1&&(k=1);var l=Math.sqrt(f.x*f.x+f.y*f.y),m=this.texture.height/2;f.x/=l,f.y/=l,f.x*=m,f.y*=m,c[j]=g.x+f.x,c[j+1]=g.y+f.y,c[j+2]=g.x-f.x,c[j+3]=g.y-f.y,e=g}d.DisplayObjectContainer.prototype.updateTransform.call(this)}},d.Rope.prototype.setTexture=function(a){this.texture=a,this.updateFrame=!0},d.TilingSprite=function(a,b,c){d.DisplayObjectContainer.call(this),this.texture=a,this.width=b,this.height=c,this.tileScale=new d.Point(1,1),this.tilePosition=new d.Point(0,0),this.renderable=!0,this.blendMode=d.blendModes.NORMAL},d.TilingSprite.prototype=Object.create(d.DisplayObjectContainer.prototype),d.TilingSprite.prototype.constructor=d.TilingSprite,d.TilingSprite.prototype.setTexture=function(a){this.texture=a,this.updateFrame=!0},d.TilingSprite.prototype.onTextureUpdate=function(){this.updateFrame=!0},d.FilterBlock=function(a){this.graphics=a,this.visible=!0,this.renderable=!0},d.MaskFilter=function(){this.graphics},d.Graphics=function(){d.DisplayObjectContainer.call(this),this.renderable=!0,this.fillAlpha=1,this.lineWidth=0,this.lineColor="black",this.graphicsData=[],this.currentPath={points:[]}},d.Graphics.prototype=Object.create(d.DisplayObjectContainer.prototype),d.Graphics.prototype.constructor=d.Graphics,d.Graphics.prototype.lineStyle=function(a,b,c){0==this.currentPath.points.length&&this.graphicsData.pop(),this.lineWidth=a||0,this.lineColor=b||0,this.lineAlpha=void 0==c?1:c,this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[],type:d.Graphics.POLY},this.graphicsData.push(this.currentPath)},d.Graphics.prototype.moveTo=function(a,b){0==this.currentPath.points.length&&this.graphicsData.pop(),this.currentPath=this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[],type:d.Graphics.POLY},this.currentPath.points.push(a,b),this.graphicsData.push(this.currentPath)},d.Graphics.prototype.lineTo=function(a,b){this.currentPath.points.push(a,b),this.dirty=!0},d.Graphics.prototype.beginFill=function(a,b){this.filling=!0,this.fillColor=a||0,this.fillAlpha=void 0==b?1:b},d.Graphics.prototype.endFill=function(){this.filling=!1,this.fillColor=null,this.fillAlpha=1},d.Graphics.prototype.drawRect=function(a,b,c,e){0==this.currentPath.points.length&&this.graphicsData.pop(),this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[a,b,c,e],type:d.Graphics.RECT},this.graphicsData.push(this.currentPath),this.dirty=!0},d.Graphics.prototype.drawCircle=function(a,b,c){0==this.currentPath.points.length&&this.graphicsData.pop(),this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[a,b,c,c],type:d.Graphics.CIRC},this.graphicsData.push(this.currentPath),this.dirty=!0},d.Graphics.prototype.drawElipse=function(a,b,c,e){0==this.currentPath.points.length&&this.graphicsData.pop(),this.currentPath={lineWidth:this.lineWidth,lineColor:this.lineColor,lineAlpha:this.lineAlpha,fillColor:this.fillColor,fillAlpha:this.fillAlpha,fill:this.filling,points:[a,b,c,e],type:d.Graphics.ELIP},this.graphicsData.push(this.currentPath),this.dirty=!0},d.Graphics.prototype.clear=function(){this.lineWidth=0,this.filling=!1,this.dirty=!0,this.clearDirty=!0,this.graphicsData=[]},d.Graphics.POLY=0,d.Graphics.RECT=1,d.Graphics.CIRC=2,d.Graphics.ELIP=3,d.CanvasGraphics=function(){},d.CanvasGraphics.renderGraphics=function(a,b){for(var c=a.worldAlpha,e=0;e1&&(c=1,console.log("Pixi.js warning: masks in canvas can only mask using the first path in the graphics object"));for(var e=0;1>e;e++){var f=a.graphicsData[e],g=f.points;if(f.type==d.Graphics.POLY){b.beginPath(),b.moveTo(g[0],g[1]);for(var h=1;h0&&(d.Texture.frameUpdates=[])},d.CanvasRenderer.prototype.resize=function(a,b){this.width=a,this.height=b,this.view.width=a,this.view.height=b},d.CanvasRenderer.prototype.renderDisplayObject=function(a){var b,c=this.context;c.globalCompositeOperation="source-over";var e=a.last._iNext;a=a.first;do if(b=a.worldTransform,a.visible)if(a.renderable){if(a instanceof d.Sprite){var f=a.texture.frame;f&&(c.globalAlpha=a.worldAlpha,c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),c.drawImage(a.texture.baseTexture.source,f.x,f.y,f.width,f.height,a.anchor.x*-f.width,a.anchor.y*-f.height,f.width,f.height))}else if(a instanceof d.Strip)c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),this.renderStrip(a);else if(a instanceof d.TilingSprite)c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),this.renderTilingSprite(a);else if(a instanceof d.CustomRenderable)a.renderCanvas(this);else if(a instanceof d.Graphics)c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),d.CanvasGraphics.renderGraphics(a,c);else if(a instanceof d.FilterBlock)if(a.open){c.save();var g=a.mask.alpha,h=a.mask.worldTransform;c.setTransform(h[0],h[3],h[1],h[4],h[2],h[5]),a.mask.worldAlpha=.5,c.worldAlpha=0,d.CanvasGraphics.renderGraphicsMask(a.mask,c),c.clip(),a.mask.worldAlpha=g}else c.restore();a=a._iNext}else a=a._iNext;else a=a.last._iNext;while(a!=e)},d.CanvasRenderer.prototype.renderStripFlat=function(a){var b=this.context,c=a.verticies;a.uvs;var d=c.length/2;this.count++,b.beginPath();for(var e=1;d-2>e;e++){var f=2*e,g=c[f],h=c[f+2],i=c[f+4],j=c[f+1],k=c[f+3],l=c[f+5];b.moveTo(g,j),b.lineTo(h,k),b.lineTo(i,l)}b.fillStyle="#FF0000",b.fill(),b.closePath()},d.CanvasRenderer.prototype.renderTilingSprite=function(a){var b=this.context;b.globalAlpha=a.worldAlpha,a.__tilePattern||(a.__tilePattern=b.createPattern(a.texture.baseTexture.source,"repeat")),b.beginPath();var c=a.tilePosition,d=a.tileScale;b.scale(d.x,d.y),b.translate(c.x,c.y),b.fillStyle=a.__tilePattern,b.fillRect(-c.x,-c.y,a.width/d.x,a.height/d.y),b.scale(1/d.x,1/d.y),b.translate(-c.x,-c.y),b.closePath()},d.CanvasRenderer.prototype.renderStrip=function(a){var b=this.context,c=a.verticies,d=a.uvs,e=c.length/2;this.count++;for(var f=1;e-2>f;f++){var g=2*f,h=c[g],i=c[g+2],j=c[g+4],k=c[g+1],l=c[g+3],m=c[g+5],n=d[g]*a.texture.width,o=d[g+2]*a.texture.width,p=d[g+4]*a.texture.width,q=d[g+1]*a.texture.height,r=d[g+3]*a.texture.height,s=d[g+5]*a.texture.height;b.save(),b.beginPath(),b.moveTo(h,k),b.lineTo(i,l),b.lineTo(j,m),b.closePath(),b.clip();var t=n*r+q*p+o*s-r*p-q*o-n*s,u=h*r+q*j+i*s-r*j-q*i-h*s,v=n*i+h*p+o*j-i*p-h*o-n*j,w=n*r*j+q*i*p+h*o*s-h*r*p-q*o*j-n*i*s,x=k*r+q*m+l*s-r*m-q*l-k*s,y=n*l+k*p+o*m-l*p-k*o-n*m,z=n*r*m+q*l*p+k*o*s-k*r*p-q*o*m-n*l*s;b.transform(u/t,x/t,v/t,y/t,w/t,z/t),b.drawImage(a.texture.baseTexture.source,0,0),b.restore()}},d._batchs=[],d._getBatch=function(a){return 0==d._batchs.length?new d.WebGLBatch(a):d._batchs.pop()},d._returnBatch=function(a){a.clean(),d._batchs.push(a)},d._restoreBatchs=function(a){for(var b=0;bc;c++){var d=6*c,e=4*c;this.indices[d+0]=e+0,this.indices[d+1]=e+1,this.indices[d+2]=e+2,this.indices[d+3]=e+0,this.indices[d+4]=e+2,this.indices[d+5]=e+3}a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,this.indices,a.STATIC_DRAW)},d.WebGLBatch.prototype.refresh=function(){this.gl,this.dynamicSize3&&d.WebGLGraphics.buildPoly(c,a._webGL),c.lineWidth>0&&d.WebGLGraphics.buildLine(c,a._webGL)):c.type==d.Graphics.RECT?d.WebGLGraphics.buildRectangle(c,a._webGL):(c.type==d.Graphics.CIRC||c.type==d.Graphics.ELIP)&&d.WebGLGraphics.buildCircle(c,a._webGL)}a._webGL.lastIndex=a.graphicsData.length;var e=d.gl;a._webGL.glPoints=new Float32Array(a._webGL.points),e.bindBuffer(e.ARRAY_BUFFER,a._webGL.buffer),e.bufferData(e.ARRAY_BUFFER,a._webGL.glPoints,e.STATIC_DRAW),a._webGL.glIndicies=new Uint16Array(a._webGL.indices),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a._webGL.indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,a._webGL.glIndicies,e.STATIC_DRAW)},d.WebGLGraphics.buildRectangle=function(a,c){var e=a.points,f=e[0],g=e[1],h=e[2],i=e[3];if(a.fill){var j=b(a.fillColor),k=a.fillAlpha,l=j[0]*k,m=j[1]*k,n=j[2]*k,o=c.points,p=c.indices,q=o.length/6;o.push(f,g),o.push(l,m,n,k),o.push(f+h,g),o.push(l,m,n,k),o.push(f,g+i),o.push(l,m,n,k),o.push(f+h,g+i),o.push(l,m,n,k),p.push(q,q,q+1,q+2,q+3,q+3)}a.lineWidth&&(a.points=[f,g,f+h,g,f+h,g+i,f,g+i,f,g],d.WebGLGraphics.buildLine(a,c))},d.WebGLGraphics.buildCircle=function(a,c){var e=a.points,f=e[0],g=e[1],h=e[2],i=e[3],j=40,k=2*Math.PI/j;if(a.fill){var l=b(a.fillColor),m=a.fillAlpha,n=l[0]*m,o=l[1]*m,p=l[2]*m,q=c.points,r=c.indices,s=q.length/6;r.push(s);for(var t=0;j+1>t;t++)q.push(f,g,n,o,p,m),q.push(f+Math.sin(k*t)*h,g+Math.cos(k*t)*i,n,o,p,m),r.push(s++,s++);r.push(s-1)}if(a.lineWidth){a.points=[];for(var t=0;j+1>t;t++)a.points.push(f+Math.sin(k*t)*h,g+Math.cos(k*t)*i);d.WebGLGraphics.buildLine(a,c)}},d.WebGLGraphics.buildLine=function(a,c){var e=a.points;if(0!=e.length){var f=new d.Point(e[0],e[1]),g=new d.Point(e[e.length-2],e[e.length-1]);if(f.x==g.x&&f.y==g.y){e.pop(),e.pop(),g=new d.Point(e[e.length-2],e[e.length-1]);var h=g.x+.5*(f.x-g.x),i=g.y+.5*(f.y-g.y);e.unshift(h,i),e.push(h,i)}var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E=c.points,F=c.indices,G=e.length/2,H=e.length,I=E.length/6,J=a.lineWidth/2,K=b(a.lineColor),L=a.lineAlpha,M=K[0]*L,N=K[1]*L,O=K[2]*L;j=e[0],k=e[1],l=e[2],m=e[3],p=-(k-m),q=j-l,D=Math.sqrt(p*p+q*q),p/=D,q/=D,p*=J,q*=J,E.push(j-p,k-q,M,N,O,L),E.push(j+p,k+q,M,N,O,L);for(var P=1;G-1>P;P++)j=e[2*(P-1)],k=e[2*(P-1)+1],l=e[2*P],m=e[2*P+1],n=e[2*(P+1)],o=e[2*(P+1)+1],p=-(k-m),q=j-l,D=Math.sqrt(p*p+q*q),p/=D,q/=D,p*=J,q*=J,r=-(m-o),s=l-n,D=Math.sqrt(r*r+s*s),r/=D,s/=D,r*=J,s*=J,v=-q+k-(-q+m),w=-p+l-(-p+j),x=(-p+j)*(-q+m)-(-p+l)*(-q+k),y=-s+o-(-s+m),z=-r+l-(-r+n),A=(-r+n)*(-s+m)-(-r+l)*(-s+o),B=v*z-y*w,0==B&&(B+=1),px=(w*A-z*x)/B,py=(y*x-v*A)/B,C=(px-l)*(px-l)+(py-m)+(py-m),C>19600?(t=p-r,u=q-s,D=Math.sqrt(t*t+u*u),t/=D,u/=D,t*=J,u*=J,E.push(l-t,m-u),E.push(M,N,O,L),E.push(l+t,m+u),E.push(M,N,O,L),E.push(l-t,m-u),E.push(M,N,O,L),H++):(E.push(px,py),E.push(M,N,O,L),E.push(l-(px-l),m-(py-m)),E.push(M,N,O,L));j=e[2*(G-2)],k=e[2*(G-2)+1],l=e[2*(G-1)],m=e[2*(G-1)+1],p=-(k-m),q=j-l,D=Math.sqrt(p*p+q*q),p/=D,q/=D,p*=J,q*=J,E.push(l-p,m-q),E.push(M,N,O,L),E.push(l+p,m+q),E.push(M,N,O,L),F.push(I);for(var P=0;H>P;P++)F.push(I++);F.push(I-1)}},d.WebGLGraphics.buildPoly=function(a,c){var e=a.points;if(!(e.length<6)){for(var f=c.points,g=c.indices,h=e.length/2,i=b(a.fillColor),j=a.fillAlpha,k=i[0]*j,l=i[1]*j,m=i[2]*j,n=d.PolyK.Triangulate(e),o=f.length/6,p=0;pp;p++)f.push(e[2*p],e[2*p+1],k,l,m,j)}},d._defaultFrame=new d.Rectangle(0,0,1,1),d.gl,d.WebGLRenderer=function(a,b,c,e,f){this.transparent=!!e,this.width=a||800,this.height=b||600,this.view=c||document.createElement("canvas"),this.view.width=this.width,this.view.height=this.height;var g=this;this.view.addEventListener("webglcontextlost",function(a){g.handleContextLost(a)},!1),this.view.addEventListener("webglcontextrestored",function(a){g.handleContextRestored(a)},!1),this.batchs=[];try{d.gl=this.gl=this.view.getContext("experimental-webgl",{alpha:this.transparent,antialias:!!f,premultipliedAlpha:!1,stencil:!0})}catch(h){throw new Error(" This browser does not support webGL. Try using the canvas renderer"+this)}d.initPrimitiveShader(),d.initDefaultShader(),d.initDefaultStripShader(),d.activateDefaultShader();var i=this.gl;d.WebGLRenderer.gl=i,this.batch=new d.WebGLBatch(i),i.disable(i.DEPTH_TEST),i.disable(i.CULL_FACE),i.enable(i.BLEND),i.colorMask(!0,!0,!0,this.transparent),d.projection=new d.Point(400,300),this.resize(this.width,this.height),this.contextLost=!1,this.stageRenderGroup=new d.WebGLRenderGroup(this.gl)},d.WebGLRenderer.prototype.constructor=d.WebGLRenderer,d.WebGLRenderer.getBatch=function(){return 0==d._batchs.length?new d.WebGLBatch(d.WebGLRenderer.gl):d._batchs.pop()},d.WebGLRenderer.returnBatch=function(a){a.clean(),d._batchs.push(a)},d.WebGLRenderer.prototype.render=function(a){if(!this.contextLost){this.__stage!==a&&(this.__stage=a,this.stageRenderGroup.setRenderable(a)),d.WebGLRenderer.updateTextures(),d.visibleCount++,a.updateTransform();var b=this.gl;if(b.colorMask(!0,!0,!0,this.transparent),b.viewport(0,0,this.width,this.height),b.bindFramebuffer(b.FRAMEBUFFER,null),b.clearColor(a.backgroundColorSplit[0],a.backgroundColorSplit[1],a.backgroundColorSplit[2],!this.transparent),b.clear(b.COLOR_BUFFER_BIT),this.stageRenderGroup.backgroundColor=a.backgroundColorSplit,this.stageRenderGroup.render(d.projection),a.interactive&&(a._interactiveEventsAdded||(a._interactiveEventsAdded=!0,a.interactionManager.setTarget(this))),d.Texture.frameUpdates.length>0){for(var c=0;c0;)n=n.children[n.children.length-1],n.renderable&&(m=n);if(m instanceof d.Sprite){l=m.batch;var k=l.head;if(k==m)g=0;else for(g=1;k.__next!=m;)g++,k=k.__next}else l=m;if(j==l)return j instanceof d.WebGLBatch?j.render(e,g+1):this.renderSpecial(j,b),void 0;f=this.batchs.indexOf(j),h=this.batchs.indexOf(l),j instanceof d.WebGLBatch?j.render(e):this.renderSpecial(j,b);for(var o=f+1;h>o;o++)renderable=this.batchs[o],renderable instanceof d.WebGLBatch?this.batchs[o].render():this.renderSpecial(renderable,b);l instanceof d.WebGLBatch?l.render(0,g+1):this.renderSpecial(l,b)},d.WebGLRenderGroup.prototype.renderSpecial=function(a,b){var c=a.vcount===d.visibleCount;if(a instanceof d.TilingSprite)c&&this.renderTilingSprite(a,b);else if(a instanceof d.Strip)c&&this.renderStrip(a,b);else if(a instanceof d.CustomRenderable)c&&a.renderWebGL(this,b);else if(a instanceof d.Graphics)c&&a.renderable&&d.WebGLGraphics.renderGraphics(a,b);else if(a instanceof d.FilterBlock){var e=d.gl;a.open?(e.enable(e.STENCIL_TEST),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.ALWAYS,1,255),e.stencilOp(e.KEEP,e.KEEP,e.REPLACE),d.WebGLGraphics.renderGraphics(a.mask,b),e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.NOTEQUAL,0,255),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)):e.disable(e.STENCIL_TEST)}},d.WebGLRenderGroup.prototype.updateTexture=function(a){this.removeObject(a);for(var b=a.first;b!=this.root&&(b=b._iPrev,!b.renderable||!b.__renderGroup););for(var c=a.last;c._iNext&&(c=c._iNext,!c.renderable||!c.__renderGroup););this.insertObject(a,b,c)},d.WebGLRenderGroup.prototype.addFilterBlocks=function(a,b){a.__renderGroup=this,b.__renderGroup=this;for(var c=a;c!=this.root&&(c=c._iPrev,!c.renderable||!c.__renderGroup););this.insertAfter(a,c);for(var d=b;d!=this.root&&(d=d._iPrev,!d.renderable||!d.__renderGroup););this.insertAfter(b,d)},d.WebGLRenderGroup.prototype.removeFilterBlocks=function(a,b){this.removeObject(a),this.removeObject(b)},d.WebGLRenderGroup.prototype.addDisplayObjectAndChildren=function(a){a.__renderGroup&&a.__renderGroup.removeDisplayObjectAndChildren(a);for(var b=a.first;b!=this.root.first&&(b=b._iPrev,!b.renderable||!b.__renderGroup););for(var c=a.last;c._iNext&&(c=c._iNext,!c.renderable||!c.__renderGroup););var d=a.first,e=a.last._iNext;do d.__renderGroup=this,d.renderable&&(this.insertObject(d,b,c),b=d),d=d._iNext;while(d!=e)},d.WebGLRenderGroup.prototype.removeDisplayObjectAndChildren=function(a){if(a.__renderGroup==this){a.last;do a.__renderGroup=null,a.renderable&&this.removeObject(a),a=a._iNext;while(a)}},d.WebGLRenderGroup.prototype.insertObject=function(a,b,c){var e=b,f=c;if(a instanceof d.Sprite){var g,h;if(e instanceof d.Sprite){if(g=e.batch,g&&g.texture==a.texture.baseTexture&&g.blendMode==a.blendMode)return g.insertAfter(a,e),void 0}else g=e;if(f)if(f instanceof d.Sprite){if(h=f.batch){if(h.texture==a.texture.baseTexture&&h.blendMode==a.blendMode)return h.insertBefore(a,f),void 0;if(h==g){var i=g.split(f),j=d.WebGLRenderer.getBatch(),k=this.batchs.indexOf(g);return j.init(a),this.batchs.splice(k+1,0,j,i),void 0}}}else h=f;var j=d.WebGLRenderer.getBatch();if(j.init(a),g){var k=this.batchs.indexOf(g);this.batchs.splice(k+1,0,j)}else this.batchs.push(j)}else a instanceof d.TilingSprite?this.initTilingSprite(a):a instanceof d.Strip&&this.initStrip(a),this.insertAfter(a,e)},d.WebGLRenderGroup.prototype.insertAfter=function(a,b){if(b instanceof d.Sprite){var c=b.batch;if(c)if(c.tail==b){var e=this.batchs.indexOf(c);this.batchs.splice(e+1,0,a)}else{var f=c.split(b.__next),e=this.batchs.indexOf(c);this.batchs.splice(e+1,0,a,f)}else this.batchs.push(a)}else{var e=this.batchs.indexOf(b);this.batchs.splice(e+1,0,a)}},d.WebGLRenderGroup.prototype.removeObject=function(a){var b;if(a instanceof d.Sprite){var c=a.batch;if(!c)return;c.remove(a),0==c.size&&(b=c)}else b=a;if(b){var e=this.batchs.indexOf(b);if(-1==e)return;if(0==e||e==this.batchs.length-1)return this.batchs.splice(e,1),b instanceof d.WebGLBatch&&d.WebGLRenderer.returnBatch(b),void 0;if(this.batchs[e-1]instanceof d.WebGLBatch&&this.batchs[e+1]instanceof d.WebGLBatch&&this.batchs[e-1].texture==this.batchs[e+1].texture&&this.batchs[e-1].blendMode==this.batchs[e+1].blendMode)return this.batchs[e-1].merge(this.batchs[e+1]),b instanceof d.WebGLBatch&&d.WebGLRenderer.returnBatch(b),d.WebGLRenderer.returnBatch(this.batchs[e+1]),this.batchs.splice(e,2),void 0;this.batchs.splice(e,1),b instanceof d.WebGLBatch&&d.WebGLRenderer.returnBatch(b)}},d.WebGLRenderGroup.prototype.initTilingSprite=function(a){var b=this.gl;a.verticies=new Float32Array([0,0,a.width,0,a.width,a.height,0,a.height]),a.uvs=new Float32Array([0,0,1,0,1,1,0,1]),a.colors=new Float32Array([1,1,1,1]),a.indices=new Uint16Array([0,1,3,2]),a._vertexBuffer=b.createBuffer(),a._indexBuffer=b.createBuffer(),a._uvBuffer=b.createBuffer(),a._colorBuffer=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,a._vertexBuffer),b.bufferData(b.ARRAY_BUFFER,a.verticies,b.STATIC_DRAW),b.bindBuffer(b.ARRAY_BUFFER,a._uvBuffer),b.bufferData(b.ARRAY_BUFFER,a.uvs,b.DYNAMIC_DRAW),b.bindBuffer(b.ARRAY_BUFFER,a._colorBuffer),b.bufferData(b.ARRAY_BUFFER,a.colors,b.STATIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,a._indexBuffer),b.bufferData(b.ELEMENT_ARRAY_BUFFER,a.indices,b.STATIC_DRAW),a.texture.baseTexture._glTexture?(b.bindTexture(b.TEXTURE_2D,a.texture.baseTexture._glTexture),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.REPEAT),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.REPEAT),a.texture.baseTexture._powerOf2=!0):a.texture.baseTexture._powerOf2=!0},d.WebGLRenderGroup.prototype.renderStrip=function(a,b){var c=this.gl,e=d.shaderProgram;c.useProgram(d.stripShaderProgram);var f=d.mat3.clone(a.worldTransform);d.mat3.transpose(f),c.uniformMatrix3fv(d.stripShaderProgram.translationMatrix,!1,f),c.uniform2f(d.stripShaderProgram.projectionVector,b.x,b.y),c.uniform1f(d.stripShaderProgram.alpha,a.worldAlpha),a.dirty?(a.dirty=!1,c.bindBuffer(c.ARRAY_BUFFER,a._vertexBuffer),c.bufferData(c.ARRAY_BUFFER,a.verticies,c.STATIC_DRAW),c.vertexAttribPointer(e.vertexPositionAttribute,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,a._uvBuffer),c.bufferData(c.ARRAY_BUFFER,a.uvs,c.STATIC_DRAW),c.vertexAttribPointer(e.textureCoordAttribute,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,a.texture.baseTexture._glTexture),c.bindBuffer(c.ARRAY_BUFFER,a._colorBuffer),c.bufferData(c.ARRAY_BUFFER,a.colors,c.STATIC_DRAW),c.vertexAttribPointer(e.colorAttribute,1,c.FLOAT,!1,0,0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,a._indexBuffer),c.bufferData(c.ELEMENT_ARRAY_BUFFER,a.indices,c.STATIC_DRAW)):(c.bindBuffer(c.ARRAY_BUFFER,a._vertexBuffer),c.bufferSubData(c.ARRAY_BUFFER,0,a.verticies),c.vertexAttribPointer(e.vertexPositionAttribute,2,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,a._uvBuffer),c.vertexAttribPointer(e.textureCoordAttribute,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,a.texture.baseTexture._glTexture),c.bindBuffer(c.ARRAY_BUFFER,a._colorBuffer),c.vertexAttribPointer(e.colorAttribute,1,c.FLOAT,!1,0,0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,a._indexBuffer)),c.drawElements(c.TRIANGLE_STRIP,a.indices.length,c.UNSIGNED_SHORT,0),c.useProgram(d.shaderProgram)},d.WebGLRenderGroup.prototype.renderTilingSprite=function(a,b){var c=this.gl;d.shaderProgram;var e=a.tilePosition,f=a.tileScale,g=e.x/a.texture.baseTexture.width,h=e.y/a.texture.baseTexture.height,i=a.width/a.texture.baseTexture.width/f.x,j=a.height/a.texture.baseTexture.height/f.y;a.uvs[0]=0-g,a.uvs[1]=0-h,a.uvs[2]=1*i-g,a.uvs[3]=0-h,a.uvs[4]=1*i-g,a.uvs[5]=1*j-h,a.uvs[6]=0-g,a.uvs[7]=1*j-h,c.bindBuffer(c.ARRAY_BUFFER,a._uvBuffer),c.bufferSubData(c.ARRAY_BUFFER,0,a.uvs),this.renderStrip(a,b)},d.WebGLRenderGroup.prototype.initStrip=function(a){var b=this.gl;this.shaderProgram,a._vertexBuffer=b.createBuffer(),a._indexBuffer=b.createBuffer(),a._uvBuffer=b.createBuffer(),a._colorBuffer=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,a._vertexBuffer),b.bufferData(b.ARRAY_BUFFER,a.verticies,b.DYNAMIC_DRAW),b.bindBuffer(b.ARRAY_BUFFER,a._uvBuffer),b.bufferData(b.ARRAY_BUFFER,a.uvs,b.STATIC_DRAW),b.bindBuffer(b.ARRAY_BUFFER,a._colorBuffer),b.bufferData(b.ARRAY_BUFFER,a.colors,b.STATIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,a._indexBuffer),b.bufferData(b.ELEMENT_ARRAY_BUFFER,a.indices,b.STATIC_DRAW)},d.shaderFragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","void main(void) {","gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));","gl_FragColor = gl_FragColor * vColor;","}"],d.shaderVertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","uniform vec2 projectionVector;","varying vec2 vTextureCoord;","varying float vColor;","void main(void) {","gl_Position = vec4( aVertexPosition.x / projectionVector.x -1.0, aVertexPosition.y / -projectionVector.y + 1.0 , 0.0, 1.0);","vTextureCoord = aTextureCoord;","vColor = aColor;","}"],d.stripShaderFragmentSrc=["precision mediump float;","varying vec2 vTextureCoord;","varying float vColor;","uniform float alpha;","uniform sampler2D uSampler;","void main(void) {","gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y));","gl_FragColor = gl_FragColor * alpha;","}"],d.stripShaderVertexSrc=["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","uniform mat3 translationMatrix;","uniform vec2 projectionVector;","varying vec2 vTextureCoord;","varying float vColor;","void main(void) {","vec3 v = translationMatrix * vec3(aVertexPosition, 1.0);","gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);","vTextureCoord = aTextureCoord;","vColor = aColor;","}"],d.primitiveShaderFragmentSrc=["precision mediump float;","varying vec4 vColor;","void main(void) {","gl_FragColor = vColor;","}"],d.primitiveShaderVertexSrc=["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform vec2 projectionVector;","uniform float alpha;","varying vec4 vColor;","void main(void) {","vec3 v = translationMatrix * vec3(aVertexPosition, 1.0);","gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);","vColor = aColor * alpha;","}"],d.initPrimitiveShader=function(){var a=d.gl,b=d.compileProgram(d.primitiveShaderVertexSrc,d.primitiveShaderFragmentSrc);a.useProgram(b),b.vertexPositionAttribute=a.getAttribLocation(b,"aVertexPosition"),b.colorAttribute=a.getAttribLocation(b,"aColor"),b.projectionVector=a.getUniformLocation(b,"projectionVector"),b.translationMatrix=a.getUniformLocation(b,"translationMatrix"),b.alpha=a.getUniformLocation(b,"alpha"),d.primitiveProgram=b},d.initDefaultShader=function(){var a=this.gl,b=d.compileProgram(d.shaderVertexSrc,d.shaderFragmentSrc);a.useProgram(b),b.vertexPositionAttribute=a.getAttribLocation(b,"aVertexPosition"),b.projectionVector=a.getUniformLocation(b,"projectionVector"),b.textureCoordAttribute=a.getAttribLocation(b,"aTextureCoord"),b.colorAttribute=a.getAttribLocation(b,"aColor"),b.samplerUniform=a.getUniformLocation(b,"uSampler"),d.shaderProgram=b},d.initDefaultStripShader=function(){var a=this.gl,b=d.compileProgram(d.stripShaderVertexSrc,d.stripShaderFragmentSrc);a.useProgram(b),b.vertexPositionAttribute=a.getAttribLocation(b,"aVertexPosition"),b.projectionVector=a.getUniformLocation(b,"projectionVector"),b.textureCoordAttribute=a.getAttribLocation(b,"aTextureCoord"),b.translationMatrix=a.getUniformLocation(b,"translationMatrix"),b.alpha=a.getUniformLocation(b,"alpha"),b.colorAttribute=a.getAttribLocation(b,"aColor"),b.projectionVector=a.getUniformLocation(b,"projectionVector"),b.samplerUniform=a.getUniformLocation(b,"uSampler"),d.stripShaderProgram=b},d.CompileVertexShader=function(a,b){return d._CompileShader(a,b,a.VERTEX_SHADER)},d.CompileFragmentShader=function(a,b){return d._CompileShader(a,b,a.FRAGMENT_SHADER)},d._CompileShader=function(a,b,c){var d=b.join("\n"),e=a.createShader(c);return a.shaderSource(e,d),a.compileShader(e),a.getShaderParameter(e,a.COMPILE_STATUS)?e:(alert(a.getShaderInfoLog(e)),null)},d.compileProgram=function(a,b){var c=d.gl,e=d.CompileFragmentShader(c,b),f=d.CompileVertexShader(c,a),g=c.createProgram();return c.attachShader(g,f),c.attachShader(g,e),c.linkProgram(g),c.getProgramParameter(g,c.LINK_STATUS)||alert("Could not initialise shaders"),g},d.activateDefaultShader=function(){var a=d.gl,b=d.shaderProgram;a.useProgram(b),a.enableVertexAttribArray(b.vertexPositionAttribute),a.enableVertexAttribArray(b.textureCoordAttribute),a.enableVertexAttribArray(b.colorAttribute)},d.activatePrimitiveShader=function(){var a=d.gl;a.disableVertexAttribArray(d.shaderProgram.textureCoordAttribute),a.disableVertexAttribArray(d.shaderProgram.colorAttribute),a.useProgram(d.primitiveProgram),a.enableVertexAttribArray(d.primitiveProgram.vertexPositionAttribute),a.enableVertexAttribArray(d.primitiveProgram.colorAttribute)},d.BitmapText=function(a,b){d.DisplayObjectContainer.call(this),this.setText(a),this.setStyle(b),this.updateText(),this.dirty=!1},d.BitmapText.prototype=Object.create(d.DisplayObjectContainer.prototype),d.BitmapText.prototype.constructor=d.BitmapText,d.BitmapText.prototype.setText=function(a){this.text=a||" ",this.dirty=!0},d.BitmapText.prototype.setStyle=function(a){a=a||{},a.align=a.align||"left",this.style=a;var b=a.font.split(" ");this.fontName=b[b.length-1],this.fontSize=b.length>=2?parseInt(b[b.length-2],10):d.BitmapText.fonts[this.fontName].size,this.dirty=!0},d.BitmapText.prototype.updateText=function(){for(var a=d.BitmapText.fonts[this.fontName],b=new d.Point,c=null,e=[],f=0,g=[],h=0,i=this.fontSize/a.size,j=0;j=j;j++){var n=0;"right"==this.style.align?n=f-g[j]:"center"==this.style.align&&(n=(f-g[j])/2),m.push(n)}for(j=0;j0;)this.removeChild(this.getChildAt(0));this.updateText(),this.dirty=!1}d.DisplayObjectContainer.prototype.updateTransform.call(this)},d.BitmapText.fonts={},d.Text=function(a,b){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),d.Sprite.call(this,d.Texture.fromCanvas(this.canvas)),this.setText(a),this.setStyle(b),this.updateText(),this.dirty=!1},d.Text.prototype=Object.create(d.Sprite.prototype),d.Text.prototype.constructor=d.Text,d.Text.prototype.setStyle=function(a){a=a||{},a.font=a.font||"bold 20pt Arial",a.fill=a.fill||"black",a.align=a.align||"left",a.stroke=a.stroke||"black",a.strokeThickness=a.strokeThickness||0,a.wordWrap=a.wordWrap||!1,a.wordWrapWidth=a.wordWrapWidth||100,this.style=a,this.dirty=!0},d.Sprite.prototype.setText=function(a){this.text=a.toString()||" ",this.dirty=!0},d.Text.prototype.updateText=function(){this.context.font=this.style.font;var a=this.text;this.style.wordWrap&&(a=this.wordWrap(this.text));for(var b=a.split(/(?:\r\n|\r|\n)/),c=[],e=0,f=0;fe?f:arguments.callee(a,b,f,d,e):arguments.callee(a,b,c,f,e)},c=function(a,c,d){if(a.measureText(c).width<=d||c.length<1)return c;var e=b(a,c,0,c.length,d);return c.substring(0,e)+"\n"+arguments.callee(a,c.substring(e),d)},d="",e=a.split("\n"),f=0;fthis.baseTexture.width||a.y+a.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.updateFrame=!0,d.Texture.frameUpdates.push(this)},d.Texture.fromImage=function(a,b){var c=d.TextureCache[a];return c||(c=new d.Texture(d.BaseTexture.fromImage(a,b)),d.TextureCache[a]=c),c},d.Texture.fromFrame=function(a){var b=d.TextureCache[a];if(!b)throw new Error("The frameId '"+a+"' does not exist in the texture cache "+this);return b},d.Texture.fromCanvas=function(a){var b=new d.BaseTexture(a);return new d.Texture(b)},d.Texture.addTextureToCache=function(a,b){d.TextureCache[b]=a},d.Texture.removeTextureFromCache=function(a){var b=d.TextureCache[a];return d.TextureCache[a]=null,b},d.Texture.frameUpdates=[],d.RenderTexture=function(a,b){d.EventTarget.call(this),this.width=a||100,this.height=b||100,this.indetityMatrix=d.mat3.create(),this.frame=new d.Rectangle(0,0,this.width,this.height),d.gl?this.initWebGL():this.initCanvas()},d.RenderTexture.prototype=Object.create(d.Texture.prototype),d.RenderTexture.prototype.constructor=d.RenderTexture,d.RenderTexture.prototype.initWebGL=function(){var a=d.gl;this.glFramebuffer=a.createFramebuffer(),a.bindFramebuffer(a.FRAMEBUFFER,this.glFramebuffer),this.glFramebuffer.width=this.width,this.glFramebuffer.height=this.height,this.baseTexture=new d.BaseTexture,this.baseTexture.width=this.width,this.baseTexture.height=this.height,this.baseTexture._glTexture=a.createTexture(),a.bindTexture(a.TEXTURE_2D,this.baseTexture._glTexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,this.width,this.height,0,a.RGBA,a.UNSIGNED_BYTE,null),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),this.baseTexture.isRender=!0,a.bindFramebuffer(a.FRAMEBUFFER,this.glFramebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.baseTexture._glTexture,0),this.projection=new d.Point(this.width/2,this.height/2),this.render=this.renderWebGL},d.RenderTexture.prototype.resize=function(a,b){if(this.width=a,this.height=b,d.gl){this.projection.x=this.width/2,this.projection.y=this.height/2;var c=d.gl;c.bindTexture(c.TEXTURE_2D,this.baseTexture._glTexture),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,this.width,this.height,0,c.RGBA,c.UNSIGNED_BYTE,null)}else this.frame.width=this.width,this.frame.height=this.height,this.renderer.resize(this.width,this.height)},d.RenderTexture.prototype.initCanvas=function(){this.renderer=new d.CanvasRenderer(this.width,this.height,null,0),this.baseTexture=new d.BaseTexture(this.renderer.view),this.frame=new d.Rectangle(0,0,this.width,this.height),this.render=this.renderCanvas},d.RenderTexture.prototype.renderWebGL=function(a,b,c){var e=d.gl;e.colorMask(!0,!0,!0,!0),e.viewport(0,0,this.width,this.height),e.bindFramebuffer(e.FRAMEBUFFER,this.glFramebuffer),c&&(e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)); +var f=a.children,g=a.worldTransform;a.worldTransform=d.mat3.create(),a.worldTransform[4]=-1,a.worldTransform[5]=2*this.projection.y,b&&(a.worldTransform[2]=b.x,a.worldTransform[5]-=b.y),d.visibleCount++,a.vcount=d.visibleCount;for(var h=0,i=f.length;i>h;h++)f[h].updateTransform();var j=a.__renderGroup;j?a==j.root?j.render(this.projection):j.renderSpecific(a,this.projection):(this.renderGroup||(this.renderGroup=new d.WebGLRenderGroup(e)),this.renderGroup.setRenderable(a),this.renderGroup.render(this.projection)),a.worldTransform=g},d.RenderTexture.prototype.renderCanvas=function(a,b,c){var e=a.children;a.worldTransform=d.mat3.create(),b&&(a.worldTransform[2]=b.x,a.worldTransform[5]=b.y);for(var f=0,g=e.length;g>f;f++)e[f].updateTransform();c&&this.renderer.context.clearRect(0,0,this.width,this.height),this.renderer.renderDisplayObject(a),this.renderer.context.setTransform(1,0,0,1,0,0)},d.EventTarget=function(){var a={};this.addEventListener=this.on=function(b,c){void 0===a[b]&&(a[b]=[]),-1===a[b].indexOf(c)&&a[b].push(c)},this.dispatchEvent=this.emit=function(b){for(var c in a[b.type])a[b.type][c](b)},this.removeEventListener=this.off=function(b,c){var d=a[b].indexOf(c);-1!==d&&a[b].splice(d,1)}},d.PolyK={},d.PolyK.Triangulate=function(a){var b=!0,c=a.length>>1;if(3>c)return[];for(var e=[],f=[],g=0;c>g;g++)f.push(g);for(var g=0,h=c;h>3;){var i=f[(g+0)%h],j=f[(g+1)%h],k=f[(g+2)%h],l=a[2*i],m=a[2*i+1],n=a[2*j],o=a[2*j+1],p=a[2*k],q=a[2*k+1],r=!1;if(d.PolyK._convex(l,m,n,o,p,q,b)){r=!0;for(var s=0;h>s;s++){var t=f[s];if(t!=i&&t!=j&&t!=k&&d.PolyK._PointInTriangle(a[2*t],a[2*t+1],l,m,n,o,p,q)){r=!1;break}}}if(r)e.push(i,j,k),f.splice((g+1)%h,1),h--,g=0;else if(g++>3*h){if(!b)return console.log("PIXI Warning: shape too complex to fill"),[];var e=[];f=[];for(var g=0;c>g;g++)f.push(g);g=0,h=c,b=!1}}return e.push(f[0],f[1],f[2]),e},d.PolyK._PointInTriangle=function(a,b,c,d,e,f,g,h){var i=g-c,j=h-d,k=e-c,l=f-d,m=a-c,n=b-d,o=i*i+j*j,p=i*k+j*l,q=i*m+j*n,r=k*k+l*l,s=k*m+l*n,t=1/(o*r-p*p),u=(r*q-p*s)*t,v=(o*s-p*q)*t;return u>=0&&v>=0&&1>u+v},d.PolyK._convex=function(a,b,c,d,e,f,g){return(b-d)*(e-c)+(c-a)*(f-d)>=0==g},e.Camera=function(a,b,c,d,f,g){this.game=a,this.world=a.world,this.id=0,this.view=new e.Rectangle(c,d,f,g),this.screenView=new e.Rectangle(c,d,f,g),this.bounds=new e.Rectangle(c,d,f,g),this.deadzone=null,this.visible=!0,this.atLimit={x:!1,y:!1},this.target=null,this._edge=0,this.displayObject=null},e.Camera.FOLLOW_LOCKON=0,e.Camera.FOLLOW_PLATFORMER=1,e.Camera.FOLLOW_TOPDOWN=2,e.Camera.FOLLOW_TOPDOWN_TIGHT=3,e.Camera.prototype={follow:function(a,b){"undefined"==typeof b&&(b=e.Camera.FOLLOW_LOCKON),this.target=a;var c;switch(b){case e.Camera.FOLLOW_PLATFORMER:var d=this.width/8,f=this.height/3;this.deadzone=new e.Rectangle((this.width-d)/2,(this.height-f)/2-.25*f,d,f);break;case e.Camera.FOLLOW_TOPDOWN:c=Math.max(this.width,this.height)/4,this.deadzone=new e.Rectangle((this.width-c)/2,(this.height-c)/2,c,c);break;case e.Camera.FOLLOW_TOPDOWN_TIGHT:c=Math.max(this.width,this.height)/8,this.deadzone=new e.Rectangle((this.width-c)/2,(this.height-c)/2,c,c);break;case e.Camera.FOLLOW_LOCKON:default:this.deadzone=null}},focusOn:function(a){this.setPosition(Math.round(a.x-this.view.halfWidth),Math.round(a.y-this.view.halfHeight))},focusOnXY:function(a,b){this.setPosition(Math.round(a-this.view.halfWidth),Math.round(b-this.view.halfHeight))},update:function(){this.target&&this.updateTarget(),this.bounds&&this.checkBounds(),this.view.x!==-this.displayObject.position.x&&(this.displayObject.position.x=-this.view.x),this.view.y!==-this.displayObject.position.y&&(this.displayObject.position.y=-this.view.y)},updateTarget:function(){this.deadzone?(this._edge=this.target.x-this.deadzone.x,this.view.x>this._edge&&(this.view.x=this._edge),this._edge=this.target.x+this.target.width-this.deadzone.x-this.deadzone.width,this.view.xthis._edge&&(this.view.y=this._edge),this._edge=this.target.y+this.target.height-this.deadzone.y-this.deadzone.height,this.view.ythis.bounds.right-this.width&&(this.atLimit.x=!0,this.view.x=this.bounds.right-this.width+1),this.view.ythis.bounds.bottom-this.height&&(this.atLimit.y=!0,this.view.y=this.bounds.bottom-this.height+1),this.view.floor()},setPosition:function(a,b){this.view.x=a,this.view.y=b,this.bounds&&this.checkBounds()},setSize:function(a,b){this.view.width=a,this.view.height=b}},Object.defineProperty(e.Camera.prototype,"x",{get:function(){return this.view.x},set:function(a){this.view.x=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(e.Camera.prototype,"y",{get:function(){return this.view.y},set:function(a){this.view.y=a,this.bounds&&this.checkBounds()}}),Object.defineProperty(e.Camera.prototype,"width",{get:function(){return this.view.width},set:function(a){this.view.width=a}}),Object.defineProperty(e.Camera.prototype,"height",{get:function(){return this.view.height},set:function(a){this.view.height=a}}),e.State=function(){this.game=null,this.add=null,this.camera=null,this.cache=null,this.input=null,this.load=null,this.math=null,this.sound=null,this.stage=null,this.time=null,this.tweens=null,this.world=null,this.particles=null,this.physics=null},e.State.prototype={preload:function(){},loadUpdate:function(){},loadRender:function(){},create:function(){},update:function(){},render:function(){},paused:function(){},destroy:function(){}},e.StateManager=function(a,b){this.game=a,this.states={},null!==b&&(this._pendingState=b)},e.StateManager.prototype={game:null,_pendingState:null,_created:!1,states:{},current:"",onInitCallback:null,onPreloadCallback:null,onCreateCallback:null,onUpdateCallback:null,onRenderCallback:null,onPreRenderCallback:null,onLoadUpdateCallback:null,onLoadRenderCallback:null,onPausedCallback:null,onShutDownCallback:null,boot:function(){null!==this._pendingState&&("string"==typeof this._pendingState?this.start(this._pendingState,!1,!1):this.add("default",this._pendingState,!0))},add:function(a,b,c){"undefined"==typeof c&&(c=!1);var d;return b instanceof e.State?d=b:"object"==typeof b?(d=b,d.game=this.game):"function"==typeof b&&(d=new b(this.game)),this.states[a]=d,c&&(this.game.isBooted?this.start(a):this._pendingState=a),d},remove:function(a){this.current==a&&(this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onPausedCallback=null,this.onDestroyCallback=null),delete this.states[a]},start:function(a,b,c){return"undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=!1),0==this.game.isBooted?(this._pendingState=a,void 0):(0!=this.checkState(a)&&(this.current&&this.onShutDownCallback.call(this.callbackContext),b&&(this.game.tweens.removeAll(),this.game.world.destroy(),1==c&&this.game.cache.destroy()),this.setCurrentState(a),this.onPreloadCallback?(this.game.load.reset(),this.onPreloadCallback.call(this.callbackContext),0==this.game.load.queueSize?this.game.loadComplete():this.game.load.start()):this.game.loadComplete()),void 0)},dummy:function(){},checkState:function(a){if(this.states[a]){var b=!1;return this.states[a].preload&&(b=!0),0==b&&this.states[a].loadRender&&(b=!0),0==b&&this.states[a].loadUpdate&&(b=!0),0==b&&this.states[a].create&&(b=!0),0==b&&this.states[a].update&&(b=!0),0==b&&this.states[a].preRender&&(b=!0),0==b&&this.states[a].render&&(b=!0),0==b&&this.states[a].paused&&(b=!0),0==b?(console.warn("Invalid Phaser State object given. Must contain at least a one of the required functions."),!1):!0}return console.warn("Phaser.StateManager - No state found with the key: "+a),!1},link:function(a){this.states[a].game=this.game,this.states[a].add=this.game.add,this.states[a].camera=this.game.camera,this.states[a].cache=this.game.cache,this.states[a].input=this.game.input,this.states[a].load=this.game.load,this.states[a].math=this.game.math,this.states[a].sound=this.game.sound,this.states[a].stage=this.game.stage,this.states[a].time=this.game.time,this.states[a].tweens=this.game.tweens,this.states[a].world=this.game.world,this.states[a].particles=this.game.particles,this.states[a].physics=this.game.physics,this.states[a].rnd=this.game.rnd},setCurrentState:function(a){this.callbackContext=this.states[a],this.link(a),this.onInitCallback=this.states[a].init||this.dummy,this.onPreloadCallback=this.states[a].preload||null,this.onLoadRenderCallback=this.states[a].loadRender||null,this.onLoadUpdateCallback=this.states[a].loadUpdate||null,this.onCreateCallback=this.states[a].create||null,this.onUpdateCallback=this.states[a].update||null,this.onPreRenderCallback=this.states[a].preRender||null,this.onRenderCallback=this.states[a].render||null,this.onPausedCallback=this.states[a].paused||null,this.onShutDownCallback=this.states[a].shutdown||this.dummy,this.current=a,this._created=!1,this.onInitCallback.call(this.callbackContext)},loadComplete:function(){0==this._created&&this.onCreateCallback?(this._created=!0,this.onCreateCallback.call(this.callbackContext)):this._created=!0},update:function(){this._created&&this.onUpdateCallback?this.onUpdateCallback.call(this.callbackContext):this.onLoadUpdateCallback&&this.onLoadUpdateCallback.call(this.callbackContext)},preRender:function(){this.onPreRenderCallback&&this.onPreRenderCallback.call(this.callbackContext)},render:function(){this._created&&this.onRenderCallback?this.onRenderCallback.call(this.callbackContext):this.onLoadRenderCallback&&this.onLoadRenderCallback.call(this.callbackContext)},destroy:function(){this.callbackContext=null,this.onInitCallback=null,this.onShutDownCallback=null,this.onPreloadCallback=null,this.onLoadRenderCallback=null,this.onLoadUpdateCallback=null,this.onCreateCallback=null,this.onUpdateCallback=null,this.onRenderCallback=null,this.onPausedCallback=null,this.onDestroyCallback=null,this.game=null,this.states={},this._pendingState=null}},e.LinkedList=function(){this.next=null,this.prev=null,this.first=null,this.last=null,this.total=0},e.LinkedList.prototype={add:function(a){return 0==this.total&&null==this.first&&null==this.last?(this.first=a,this.last=a,this.next=a,a.prev=this,this.total++,a):(this.last.next=a,a.prev=this.last,this.last=a,this.total++,a)},remove:function(a){a==this.first?this.first=this.first.next:a==this.last&&(this.last=this.last.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),a.next=a.prev=null,null==this.first&&(this.last=null),this.total--},callAll:function(a){if(this.first&&this.last){var b=this.first;do b&&b[a]&&b[a].call(b),b=b.next;while(b!=this.last.next)}}},e.Signal=function(){this._bindings=[],this._prevParams=null;var a=this;this.dispatch=function(){e.Signal.prototype.dispatch.apply(a,arguments)}},e.Signal.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(a,b){if("function"!=typeof a)throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",b))},_registerListener:function(a,b,c,d){var f,g=this._indexOfListener(a,c);if(-1!==g){if(f=this._bindings[g],f.isOnce()!==b)throw new Error("You cannot add"+(b?"":"Once")+"() then add"+(b?"Once":"")+"() the same listener without removing the relationship first.")}else f=new e.SignalBinding(this,a,b,c,d),this._addBinding(f);return this.memorize&&this._prevParams&&f.execute(this._prevParams),f},_addBinding:function(a){var b=this._bindings.length;do--b;while(this._bindings[b]&&a._priority<=this._bindings[b]._priority);this._bindings.splice(b+1,0,a)},_indexOfListener:function(a,b){for(var c,d=this._bindings.length;d--;)if(c=this._bindings[d],c._listener===a&&c.context===b)return d;return-1},has:function(a,b){return-1!==this._indexOfListener(a,b)},add:function(a,b,c){return this.validateListener(a,"add"),this._registerListener(a,!1,b,c)},addOnce:function(a,b,c){return this.validateListener(a,"addOnce"),this._registerListener(a,!0,b,c)},remove:function(a,b){this.validateListener(a,"remove");var c=this._indexOfListener(a,b);return-1!==c&&(this._bindings[c]._destroy(),this._bindings.splice(c,1)),a},removeAll:function(){for(var a=this._bindings.length;a--;)this._bindings[a]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){var a,b=Array.prototype.slice.call(arguments),c=this._bindings.length;if(this.memorize&&(this._prevParams=b),c){a=this._bindings.slice(),this._shouldPropagate=!0;do c--;while(a[c]&&this._shouldPropagate&&a[c].execute(b)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Phaser.Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}},e.SignalBinding=function(a,b,c,d,e){this._listener=b,this._isOnce=c,this.context=d,this._signal=a,this._priority=e||0},e.SignalBinding.prototype={active:!0,params:null,execute:function(a){var b,c;return this.active&&this._listener&&(c=this.params?this.params.concat(a):a,b=this._listener.apply(this.context,c),this._isOnce&&this.detach()),b},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[Phaser.SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},e.Plugin=function(a,b){"undefined"==typeof b&&(b=null),this.game=a,this.parent=b,this.active=!1,this.visible=!1,this.hasPreUpdate=!1,this.hasUpdate=!1,this.hasRender=!1,this.hasPostRender=!1},e.Plugin.prototype={preUpdate:function(){},update:function(){},render:function(){},postRender:function(){},destroy:function(){this.game=null,this.parent=null,this.active=!1,this.visible=!1}},e.PluginManager=function(a,b){this.game=a,this._parent=b,this.plugins=[],this._pluginsLength=0},e.PluginManager.prototype={add:function(a){var b=!1;return"function"==typeof a?a=new a(this.game,this._parent):(a.game=this.game,a.parent=this._parent),"function"==typeof a.preUpdate&&(a.hasPreUpdate=!0,b=!0),"function"==typeof a.update&&(a.hasUpdate=!0,b=!0),"function"==typeof a.render&&(a.hasRender=!0,b=!0),"function"==typeof a.postRender&&(a.hasPostRender=!0,b=!0),b?((a.hasPreUpdate||a.hasUpdate)&&(a.active=!0),(a.hasRender||a.hasPostRender)&&(a.visible=!0),this._pluginsLength=this.plugins.push(a),a):null},remove:function(){this._pluginsLength--},preUpdate:function(){if(0!=this._pluginsLength)for(this._p=0;this._pthis._nextOffsetCheck&&(e.Canvas.getOffset(this.canvas,this.offset),this._nextOffsetCheck=this.game.time.now+this.checkOffsetInterval)},visibilityChange:function(a){this.disableVisibilityChange||(this.game.paused="pagehide"==a.type||"blur"==a.type||1==document.hidden||1==document.webkitHidden?!0:!1)}},Object.defineProperty(e.Stage.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(a){this._backgroundColor=a,"string"==typeof a&&(a=e.Color.hexToRGB(a)),this._stage.setBackgroundColor(a)}}),e.Group=function(a,b,c,f){"undefined"==typeof b&&(b=a.world),"undefined"==typeof f&&(f=!1),this.game=a,this.name=c||"group",f?this._container=this.game.stage._stage:(this._container=new d.DisplayObjectContainer,this._container.name=this.name,b?b instanceof e.Group?(b._container.addChild(this._container),b._container.updateTransform()):(b.addChild(this._container),b.updateTransform()):(this.game.stage._stage.addChild(this._container),this.game.stage._stage.updateTransform())),this.type=e.GROUP,this.exists=!0,this.scale=new e.Point(1,1)},e.Group.prototype={add:function(a){return a.group!==this&&(a.group=this,a.events&&a.events.onAddedToGroup.dispatch(a,this),this._container.addChild(a),a.updateTransform()),a},addAt:function(a,b){return a.group!==this&&(a.group=this,a.events&&a.events.onAddedToGroup.dispatch(a,this),this._container.addChildAt(a,b),a.updateTransform()),a},getAt:function(a){return this._container.getChildAt(a)},create:function(a,b,c,d,f){"undefined"==typeof f&&(f=!0);var g=new e.Sprite(this.game,a,b,c,d);return g.group=this,g.exists=f,g.visible=f,g.alive=f,g.events&&g.events.onAddedToGroup.dispatch(g,this),this._container.addChild(g),g.updateTransform(),g},createMultiple:function(a,b,c,d){"undefined"==typeof d&&(d=!1);for(var f=0;a>f;f++){var g=new e.Sprite(this.game,0,0,b,c);g.group=this,g.exists=d,g.visible=d,g.alive=d,g.events&&g.events.onAddedToGroup.dispatch(g,this),this._container.addChild(g),g.updateTransform()}},swap:function(a,b){if(a===b||!a.parent||!b.parent)return console.warn("You cannot swap a child with itself or swap un-parented children"),!1;var c=a._iPrev,d=a._iNext,e=b._iPrev,f=b._iNext,g=this._container.last._iNext,h=this.game.stage._stage;do h!==a&&h!==b&&(h.first===a?h.first=b:h.first===b&&(h.first=a),h.last===a?h.last=b:h.last===b&&(h.last=a)),h=h._iNext;while(h!=g);return a._iNext==b?(a._iNext=f,a._iPrev=b,b._iNext=a,b._iPrev=c,c&&(c._iNext=b),f&&(f._iPrev=a),a.__renderGroup&&a.__renderGroup.updateTexture(a),b.__renderGroup&&b.__renderGroup.updateTexture(b),!0):b._iNext==a?(a._iNext=b,a._iPrev=e,b._iNext=d,b._iPrev=a,e&&(e._iNext=a),d&&(f._iPrev=b),a.__renderGroup&&a.__renderGroup.updateTexture(a),b.__renderGroup&&b.__renderGroup.updateTexture(b),!0):(a._iNext=f,a._iPrev=e,b._iNext=d,b._iPrev=c,c&&(c._iNext=b),d&&(d._iPrev=b),e&&(e._iNext=a),f&&(f._iPrev=a),a.__renderGroup&&a.__renderGroup.updateTexture(a),b.__renderGroup&&b.__renderGroup.updateTexture(b),!0)},bringToTop:function(a){return a.group===this&&(this.remove(a),this.add(a)),a},getIndex:function(a){return this._container.children.indexOf(a)},replace:function(a,b){if(this._container.first._iNext){var c=this.getIndex(a);-1!=c&&(void 0!=b.parent&&(b.events.onRemovedFromGroup.dispatch(b,this),b.parent.removeChild(b)),this._container.removeChild(a),this._container.addChildAt(b,c),b.events.onAddedToGroup.dispatch(b,this),b.updateTransform())}},setProperty:function(a,b,c,d){d=d||0,1==b.length?0==d?a[b[0]]=c:1==d?a[b[0]]+=c:2==d?a[b[0]]-=c:3==d?a[b[0]]*=c:4==d&&(a[b[0]]/=c):2==b.length?0==d?a[b[0]][b[1]]=c:1==d?a[b[0]][b[1]]+=c:2==d?a[b[0]][b[1]]-=c:3==d?a[b[0]][b[1]]*=c:4==d&&(a[b[0]][b[1]]/=c):3==b.length?0==d?a[b[0]][b[1]][b[2]]=c:1==d?a[b[0]][b[1]][b[2]]+=c:2==d?a[b[0]][b[1]][b[2]]-=c:3==d?a[b[0]][b[1]][b[2]]*=c:4==d&&(a[b[0]][b[1]][b[2]]/=c):4==b.length&&(0==d?a[b[0]][b[1]][b[2]][b[3]]=c:1==d?a[b[0]][b[1]][b[2]][b[3]]+=c:2==d?a[b[0]][b[1]][b[2]][b[3]]-=c:3==d?a[b[0]][b[1]][b[2]][b[3]]*=c:4==d&&(a[b[0]][b[1]][b[2]][b[3]]/=c))},setAll:function(a,b,c,d,e){if(a=a.split("."),"undefined"==typeof c&&(c=!1),"undefined"==typeof d&&(d=!1),e=e||0,this._container.children.length>0&&this._container.first._iNext){var f=this._container.first._iNext;do(0==c||c&&f.alive)&&(0==d||d&&f.visible)&&this.setProperty(f,a,b,e),f=f._iNext;while(f!=this._container.last._iNext)}},addAll:function(a,b,c,d){this.setAll(a,b,c,d,1)},subAll:function(a,b,c,d){this.setAll(a,b,c,d,2)},multiplyAll:function(a,b,c,d){this.setAll(a,b,c,d,3)},divideAll:function(a,b,c,d){this.setAll(a,b,c,d,4)},callAllExists:function(a,b){var c=Array.prototype.splice.call(arguments,2);if(this._container.children.length>0&&this._container.first._iNext){var d=this._container.first._iNext;do d.exists==b&&d[a]&&d[a].apply(d,c),d=d._iNext;while(d!=this._container.last._iNext)}},callAll:function(a){var b=Array.prototype.splice.call(arguments,1);if(this._container.children.length>0&&this._container.first._iNext){var c=this._container.first._iNext;do c[a]&&c[a].apply(c,b),c=c._iNext;while(c!=this._container.last._iNext)}},forEach:function(a,b,c){"undefined"==typeof c&&(c=!1);var d=Array.prototype.splice.call(arguments,3);if(d.unshift(null),this._container.children.length>0&&this._container.first._iNext){var e=this._container.first._iNext;do(0==c||c&&e.exists)&&(d[0]=e,a.apply(b,d)),e=e._iNext;while(e!=this._container.last._iNext)}},forEachAlive:function(a,b){var c=Array.prototype.splice.call(arguments,2);if(c.unshift(null),this._container.children.length>0&&this._container.first._iNext){var d=this._container.first._iNext;do d.alive&&(c[0]=d,a.apply(b,c)),d=d._iNext;while(d!=this._container.last._iNext)}},forEachDead:function(a,b){var c=Array.prototype.splice.call(arguments,2);if(c.unshift(null),this._container.children.length>0&&this._container.first._iNext){var d=this._container.first._iNext;do 0==d.alive&&(c[0]=d,a.apply(b,c)),d=d._iNext;while(d!=this._container.last._iNext)}},getFirstExists:function(a){if("boolean"!=typeof a&&(a=!0),this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do{if(b.exists===a)return b;b=b._iNext}while(b!=this._container.last._iNext)}return null},getFirstAlive:function(){if(this._container.children.length>0&&this._container.first._iNext){var a=this._container.first._iNext;do{if(a.alive)return a;a=a._iNext}while(a!=this._container.last._iNext)}return null},getFirstDead:function(){if(this._container.children.length>0&&this._container.first._iNext){var a=this._container.first._iNext;do{if(!a.alive)return a;a=a._iNext}while(a!=this._container.last._iNext)}return null},countLiving:function(){var a=0;if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do b.alive&&a++,b=b._iNext;while(b!=this._container.last._iNext)}else a=-1;return a},countDead:function(){var a=0;if(this._container.children.length>0&&this._container.first._iNext){var b=this._container.first._iNext;do b.alive||a++,b=b._iNext;while(b!=this._container.last._iNext)}else a=-1;return a},getRandom:function(a,b){return 0==this._container.children.length?null:(a=a||0,b=b||this._container.children.length,this.game.math.getRandom(this._container.children,a,b))},remove:function(a){a.events&&a.events.onRemovedFromGroup.dispatch(a,this),this._container.removeChild(a),a.group=null},removeAll:function(){if(0!=this._container.children.length)do this._container.children[0].events&&this._container.children[0].events.onRemovedFromGroup.dispatch(this._container.children[0],this),this._container.removeChild(this._container.children[0]);while(this._container.children.length>0)},removeBetween:function(a,b){if(0!=this._container.children.length){if(a>b||0>a||b>this._container.children.length)return!1;for(var c=a;b>c;c++){var d=this._container.children[c];d.events.onRemovedFromGroup.dispatch(d,this),this._container.removeChild(d)}}},destroy:function(){this.removeAll(),this._container.parent.removeChild(this._container),this._container=null,this.game=null,this.exists=!1},dump:function(a){"undefined"==typeof a&&(a=!1);var b=20,c="\n"+e.Utils.pad("Node",b)+"|"+e.Utils.pad("Next",b)+"|"+e.Utils.pad("Previous",b)+"|"+e.Utils.pad("First",b)+"|"+e.Utils.pad("Last",b);console.log(c);var c=e.Utils.pad("----------",b)+"|"+e.Utils.pad("----------",b)+"|"+e.Utils.pad("----------",b)+"|"+e.Utils.pad("----------",b)+"|"+e.Utils.pad("----------",b);if(console.log(c),a)var d=this.game.stage._stage.last._iNext,f=this.game.stage._stage;else var d=this._container.last._iNext,f=this._container;do{var g=f.name||"*",h="-",i="-",j="-",k="-";f._iNext&&(h=f._iNext.name),f._iPrev&&(i=f._iPrev.name),f.first&&(j=f.first.name),f.last&&(k=f.last.name),"undefined"==typeof h&&(h="-"),"undefined"==typeof i&&(i="-"),"undefined"==typeof j&&(j="-"),"undefined"==typeof k&&(k="-");var c=e.Utils.pad(g,b)+"|"+e.Utils.pad(h,b)+"|"+e.Utils.pad(i,b)+"|"+e.Utils.pad(j,b)+"|"+e.Utils.pad(k,b);console.log(c),f=f._iNext}while(f!=d)}},Object.defineProperty(e.Group.prototype,"total",{get:function(){return this._container.children.length}}),Object.defineProperty(e.Group.prototype,"length",{get:function(){return this._container.children.length}}),Object.defineProperty(e.Group.prototype,"x",{get:function(){return this._container.position.x},set:function(a){this._container.position.x=a}}),Object.defineProperty(e.Group.prototype,"y",{get:function(){return this._container.position.y},set:function(a){this._container.position.y=a}}),Object.defineProperty(e.Group.prototype,"angle",{get:function(){return e.Math.radToDeg(this._container.rotation)},set:function(a){this._container.rotation=e.Math.degToRad(a)}}),Object.defineProperty(e.Group.prototype,"rotation",{get:function(){return this._container.rotation},set:function(a){this._container.rotation=a}}),Object.defineProperty(e.Group.prototype,"visible",{get:function(){return this._container.visible},set:function(a){this._container.visible=a}}),Object.defineProperty(e.Group.prototype,"alpha",{get:function(){return this._container.alpha},set:function(a){this._container.alpha=a}}),e.World=function(a){e.Group.call(this,a,null,"__world",!1),this.scale=new e.Point(1,1),this.bounds=new e.Rectangle(0,0,a.width,a.height),this.camera=null,this.currentRenderOrderID=0},e.World.prototype=Object.create(e.Group.prototype),e.World.prototype.constructor=e.World,e.World.prototype.boot=function(){this.camera=new e.Camera(this.game,0,0,0,this.game.width,this.game.height),this.camera.displayObject=this._container,this.game.camera=this.camera},e.World.prototype.update=function(){if(this.currentRenderOrderID=0,this.game.stage._stage.first._iNext){var a=this.game.stage._stage.first._iNext;do a.preUpdate&&a.preUpdate(),a.update&&a.update(),a=a._iNext;while(a!=this.game.stage._stage.last._iNext)}},e.World.prototype.postUpdate=function(){if(this.camera.update(),this.game.stage._stage.first._iNext){var a=this.game.stage._stage.first._iNext;do a.postUpdate&&a.postUpdate(),a=a._iNext;while(a!=this.game.stage._stage.last._iNext)}},e.World.prototype.setBounds=function(a,b,c,d){this.bounds.setTo(a,b,c,d),this.camera.bounds&&this.camera.bounds.setTo(a,b,c,d)},e.World.prototype.destroy=function(){this.camera.x=0,this.camera.y=0,this.game.input.reset(!0),this.removeAll()},Object.defineProperty(e.World.prototype,"width",{get:function(){return this.bounds.width},set:function(a){this.bounds.width=a}}),Object.defineProperty(e.World.prototype,"height",{get:function(){return this.bounds.height},set:function(a){this.bounds.height=a}}),Object.defineProperty(e.World.prototype,"centerX",{get:function(){return this.bounds.halfWidth}}),Object.defineProperty(e.World.prototype,"centerY",{get:function(){return this.bounds.halfHeight}}),Object.defineProperty(e.World.prototype,"randomX",{get:function(){return this.bounds.x<0?this.game.rnd.integerInRange(this.bounds.x,this.bounds.width-Math.abs(this.bounds.x)):this.game.rnd.integerInRange(this.bounds.x,this.bounds.width)}}),Object.defineProperty(e.World.prototype,"randomY",{get:function(){return this.bounds.y<0?this.game.rnd.integerInRange(this.bounds.y,this.bounds.height-Math.abs(this.bounds.y)):this.game.rnd.integerInRange(this.bounds.y,this.bounds.height)}}),e.Game=function(a,b,c,d,f,g,h){a=a||800,b=b||600,c=c||e.AUTO,d=d||"",f=f||null,"undefined"==typeof g&&(g=!1),"undefined"==typeof h&&(h=!0),this.id=e.GAMES.push(this)-1,this.parent=d,this.width=a,this.height=b,this.transparent=g,this.antialias=h,this.renderer=null,this.state=new e.StateManager(this,f),this._paused=!1,this.renderType=c,this._loadComplete=!1,this.isBooted=!1,this.isRunning=!1,this.raf=null,this.add=null,this.cache=null,this.input=null,this.load=null,this.math=null,this.net=null,this.sound=null,this.stage=null,this.time=null,this.tweens=null,this.world=null,this.physics=null,this.rnd=null,this.device=null,this.camera=null,this.canvas=null,this.context=null,this.debug=null,this.particles=null;var i=this;return this._onBoot=function(){return i.boot()},"complete"===document.readyState||"interactive"===document.readyState?window.setTimeout(this._onBoot,0):(document.addEventListener("DOMContentLoaded",this._onBoot,!1),window.addEventListener("load",this._onBoot,!1)),this},e.Game.prototype={boot:function(){if(!this.isBooted)if(document.body){document.removeEventListener("DOMContentLoaded",this._onBoot),window.removeEventListener("load",this._onBoot),this.onPause=new e.Signal,this.onResume=new e.Signal,this.isBooted=!0,this.device=new e.Device,this.math=e.Math,this.rnd=new e.RandomDataGenerator([(Date.now()*Math.random()).toString()]),this.stage=new e.Stage(this,this.width,this.height),this.setUpRenderer(),this.world=new e.World(this),this.add=new e.GameObjectFactory(this),this.cache=new e.Cache(this),this.load=new e.Loader(this),this.time=new e.Time(this),this.tweens=new e.TweenManager(this),this.input=new e.Input(this),this.sound=new e.SoundManager(this),this.physics=new e.Physics.Arcade(this),this.particles=new e.Particles(this),this.plugins=new e.PluginManager(this,this),this.net=new e.Net(this),this.debug=new e.Utils.Debug(this),this.stage.boot(),this.world.boot(),this.input.boot(),this.sound.boot(),this.state.boot(),this.load.onLoadComplete.add(this.loadComplete,this),this.renderType==e.CANVAS?console.log("%cPhaser "+e.VERSION+" initialized. Rendering to Canvas","color: #ffff33; background: #000000"):console.log("%cPhaser "+e.VERSION+" initialized. Rendering to WebGL","color: #ffff33; background: #000000");var a=e.VERSION.indexOf("-"),b=a>=0?e.VERSION.substr(a+1):null;if(b){var c=["a","e","i","o","u","y"].indexOf(b.charAt(0))>=0?"an":"a";console.warn("You are using %s %s version of Phaser. Some things may not work.",c,b)}this.isRunning=!0,this._loadComplete=!1,this.raf=new e.RequestAnimationFrame(this),this.raf.start()}else window.setTimeout(this._onBoot,20)},setUpRenderer:function(){if(this.renderType===e.CANVAS||this.renderType===e.AUTO&&0==this.device.webGL){if(!this.device.canvas)throw new Error("Phaser.Game - cannot create Canvas or WebGL context, aborting."); +this.renderType=e.CANVAS,this.renderer=new d.CanvasRenderer(this.width,this.height,this.stage.canvas,this.transparent),e.Canvas.setSmoothingEnabled(this.renderer.context,this.antialias),this.canvas=this.renderer.view,this.context=this.renderer.context}else this.renderType=e.WEBGL,this.renderer=new d.WebGLRenderer(this.width,this.height,this.stage.canvas,this.transparent,this.antialias),this.canvas=this.renderer.view,this.context=null;e.Canvas.addToDOM(this.renderer.view,this.parent,!0),e.Canvas.setTouchAction(this.renderer.view)},loadComplete:function(){this._loadComplete=!0,this.state.loadComplete()},update:function(a){this.time.update(a),this._paused||(this.plugins.preUpdate(),this.physics.preUpdate(),this.stage.update(),this.input.update(),this.tweens.update(),this.sound.update(),this.world.update(),this.particles.update(),this.state.update(),this.plugins.update(),this.world.postUpdate(),this.renderer.render(this.stage._stage),this.plugins.render(),this.state.render(),this.plugins.postRender())},destroy:function(){this.raf.stop(),this.input.destroy(),this.state.destroy(),this.state=null,this.cache=null,this.input=null,this.load=null,this.sound=null,this.stage=null,this.time=null,this.world=null,this.isBooted=!1}},Object.defineProperty(e.Game.prototype,"paused",{get:function(){return this._paused},set:function(a){a===!0?0==this._paused&&(this._paused=!0,this.onPause.dispatch(this)):this._paused&&(this._paused=!1,this.onResume.dispatch(this))}}),e.Input=function(a){this.game=a,this.hitCanvas=null,this.hitContext=null},e.Input.MOUSE_OVERRIDES_TOUCH=0,e.Input.TOUCH_OVERRIDES_MOUSE=1,e.Input.MOUSE_TOUCH_COMBINE=2,e.Input.prototype={game:null,pollRate:0,_pollCounter:0,_oldPosition:null,_x:0,_y:0,disabled:!1,multiInputOverride:e.Input.MOUSE_TOUCH_COMBINE,position:null,speed:null,circle:null,scale:null,maxPointers:10,currentPointers:0,tapRate:200,doubleTapRate:300,holdRate:2e3,justPressedRate:200,justReleasedRate:200,recordPointerHistory:!1,recordRate:100,recordLimit:100,pointer1:null,pointer2:null,pointer3:null,pointer4:null,pointer5:null,pointer6:null,pointer7:null,pointer8:null,pointer9:null,pointer10:null,activePointer:null,mousePointer:null,mouse:null,keyboard:null,touch:null,mspointer:null,onDown:null,onUp:null,onTap:null,onHold:null,interactiveItems:new e.LinkedList,boot:function(){this.mousePointer=new e.Pointer(this.game,0),this.pointer1=new e.Pointer(this.game,1),this.pointer2=new e.Pointer(this.game,2),this.mouse=new e.Mouse(this.game),this.keyboard=new e.Keyboard(this.game),this.touch=new e.Touch(this.game),this.mspointer=new e.MSPointer(this.game),this.onDown=new e.Signal,this.onUp=new e.Signal,this.onTap=new e.Signal,this.onHold=new e.Signal,this.scale=new e.Point(1,1),this.speed=new e.Point,this.position=new e.Point,this._oldPosition=new e.Point,this.circle=new e.Circle(0,0,44),this.activePointer=this.mousePointer,this.currentPointers=0,this.hitCanvas=document.createElement("canvas"),this.hitCanvas.width=1,this.hitCanvas.height=1,this.hitContext=this.hitCanvas.getContext("2d"),this.mouse.start(),this.keyboard.start(),this.touch.start(),this.mspointer.start(),this.mousePointer.active=!0},destroy:function(){this.mouse.stop(),this.keyboard.stop(),this.touch.stop(),this.mspointer.stop()},addPointer:function(){for(var a=0,b=10;b>0;b--)null===this["pointer"+b]&&(a=b);return 0==a?(console.warn("You can only have 10 Pointer objects"),null):(this["pointer"+a]=new e.Pointer(this.game,a),this["pointer"+a])},update:function(){return this.pollRate>0&&this._pollCounter=b;b++)this["pointer"+b]&&this["pointer"+b].reset();this.currentPointers=0,this.game.stage.canvas.style.cursor="default",1==a&&(this.onDown.dispose(),this.onUp.dispose(),this.onTap.dispose(),this.onHold.dispose(),this.onDown=new e.Signal,this.onUp=new e.Signal,this.onTap=new e.Signal,this.onHold=new e.Signal,this.interactiveItems.callAll("reset")),this._pollCounter=0}},resetSpeed:function(a,b){this._oldPosition.setTo(a,b),this.speed.setTo(0,0)},startPointer:function(a){if(this.maxPointers<10&&this.totalActivePointers==this.maxPointers)return null;if(0==this.pointer1.active)return this.pointer1.start(a);if(0==this.pointer2.active)return this.pointer2.start(a);for(var b=3;10>=b;b++)if(this["pointer"+b]&&0==this["pointer"+b].active)return this["pointer"+b].start(a);return null},updatePointer:function(a){if(this.pointer1.active&&this.pointer1.identifier==a.identifier)return this.pointer1.move(a);if(this.pointer2.active&&this.pointer2.identifier==a.identifier)return this.pointer2.move(a);for(var b=3;10>=b;b++)if(this["pointer"+b]&&this["pointer"+b].active&&this["pointer"+b].identifier==a.identifier)return this["pointer"+b].move(a);return null},stopPointer:function(a){if(this.pointer1.active&&this.pointer1.identifier==a.identifier)return this.pointer1.stop(a);if(this.pointer2.active&&this.pointer2.identifier==a.identifier)return this.pointer2.stop(a);for(var b=3;10>=b;b++)if(this["pointer"+b]&&this["pointer"+b].active&&this["pointer"+b].identifier==a.identifier)return this["pointer"+b].stop(a);return null},getPointer:function(a){if(a=a||!1,this.pointer1.active==a)return this.pointer1;if(this.pointer2.active==a)return this.pointer2;for(var b=3;10>=b;b++)if(this["pointer"+b]&&this["pointer"+b].active==a)return this["pointer"+b];return null},getPointerFromIdentifier:function(a){if(this.pointer1.identifier==a)return this.pointer1;if(this.pointer2.identifier==a)return this.pointer2;for(var b=3;10>=b;b++)if(this["pointer"+b]&&this["pointer"+b].identifier==a)return this["pointer"+b];return null}},Object.defineProperty(e.Input.prototype,"x",{get:function(){return this._x},set:function(a){this._x=Math.floor(a)}}),Object.defineProperty(e.Input.prototype,"y",{get:function(){return this._y},set:function(a){this._y=Math.floor(a)}}),Object.defineProperty(e.Input.prototype,"pollLocked",{get:function(){return this.pollRate>0&&this._pollCounter=a;a++)this["pointer"+a]&&this["pointer"+a].active&&this.currentPointers++;return this.currentPointers}}),Object.defineProperty(e.Input.prototype,"worldX",{get:function(){return this.game.camera.view.x+this.x}}),Object.defineProperty(e.Input.prototype,"worldY",{get:function(){return this.game.camera.view.y+this.y}}),e.Key=function(a,b){this.game=a,this.isDown=!1,this.isUp=!1,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this.keyCode=b,this.onDown=new e.Signal,this.onUp=new e.Signal},e.Key.prototype={processKeyDown:function(a){this.altKey=a.altKey,this.ctrlKey=a.ctrlKey,this.shiftKey=a.shiftKey,this.isDown?(this.duration=a.timeStamp-this.timeDown,this.repeats++):(this.isDown=!0,this.isUp=!1,this.timeDown=a.timeStamp,this.duration=0,this.repeats=0,this.onDown.dispatch(this))},processKeyUp:function(a){this.isDown=!1,this.isUp=!0,this.timeUp=a.timeStamp,this.onUp.dispatch(this)},justPressed:function(a){return"undefined"==typeof a&&(a=250),this.isDown&&this.duration=this.game.input.holdRate&&((this.game.input.multiInputOverride==e.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==e.Input.MOUSE_TOUCH_COMBINE||this.game.input.multiInputOverride==e.Input.TOUCH_OVERRIDES_MOUSE&&0==this.game.input.currentPointers)&&this.game.input.onHold.dispatch(this),this._holdSent=!0),this.game.input.recordPointerHistory&&this.game.time.now>=this._nextDrop&&(this._nextDrop=this.game.time.now+this.game.input.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>this.game.input.recordLimit&&this._history.shift()))},move:function(a){if(!this.game.input.pollLocked){if("undefined"!=typeof a.button&&(this.button=a.button),this.clientX=a.clientX,this.clientY=a.clientY,this.pageX=a.pageX,this.pageY=a.pageY,this.screenX=a.screenX,this.screenY=a.screenY,this.x=(this.pageX-this.game.stage.offset.x)*this.game.input.scale.x,this.y=(this.pageY-this.game.stage.offset.y)*this.game.input.scale.y,this.position.setTo(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(this.game.input.multiInputOverride==e.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==e.Input.MOUSE_TOUCH_COMBINE||this.game.input.multiInputOverride==e.Input.TOUCH_OVERRIDES_MOUSE&&0==this.game.input.currentPointers)&&(this.game.input.activePointer=this,this.game.input.x=this.x,this.game.input.y=this.y,this.game.input.position.setTo(this.game.input.x,this.game.input.y),this.game.input.circle.x=this.game.input.x,this.game.input.circle.y=this.game.input.y),this.game.paused)return this;if(null!==this.targetObject&&1==this.targetObject.isDragged)return 0==this.targetObject.update(this)&&(this.targetObject=null),this;if(this._highestRenderOrderID=-1,this._highestRenderObject=null,this._highestInputPriorityID=-1,this.game.input.interactiveItems.total>0){var b=this.game.input.interactiveItems.next;do(b.pixelPerfect||b.priorityID>this._highestInputPriorityID||b.priorityID==this._highestInputPriorityID&&b.sprite.renderOrderID>this._highestRenderOrderID)&&b.checkPointerOver(this)&&(this._highestRenderOrderID=b.sprite.renderOrderID,this._highestInputPriorityID=b.priorityID,this._highestRenderObject=b),b=b.next;while(null!=b)}return null==this._highestRenderObject?this.targetObject&&(this.targetObject._pointerOutHandler(this),this.targetObject=null):null==this.targetObject?(this.targetObject=this._highestRenderObject,this._highestRenderObject._pointerOverHandler(this)):this.targetObject==this._highestRenderObject?0==this._highestRenderObject.update(this)&&(this.targetObject=null):(this.targetObject._pointerOutHandler(this),this.targetObject=this._highestRenderObject,this.targetObject._pointerOverHandler(this)),this}},leave:function(a){this.withinGame=!1,this.move(a)},stop:function(a){if(this._stateReset)return a.preventDefault(),void 0;if(this.timeUp=this.game.time.now,(this.game.input.multiInputOverride==e.Input.MOUSE_OVERRIDES_TOUCH||this.game.input.multiInputOverride==e.Input.MOUSE_TOUCH_COMBINE||this.game.input.multiInputOverride==e.Input.TOUCH_OVERRIDES_MOUSE&&0==this.game.input.currentPointers)&&(this.game.input.onUp.dispatch(this,a),this.duration>=0&&this.duration<=this.game.input.tapRate&&(this.timeUp-this.previousTapTime0&&(this.active=!1),this.withinGame=!1,this.isDown=!1,this.isUp=!0,0==this.isMouse&&this.game.input.currentPointers--,this.game.input.interactiveItems.total>0){var b=this.game.input.interactiveItems.next;do b&&b._releasedHandler(this),b=b.next;while(null!=b)}return this.targetObject&&this.targetObject._releasedHandler(this),this.targetObject=null,this},justPressed:function(a){return a=a||this.game.input.justPressedRate,this.isDown===!0&&this.timeDown+a>this.game.time.now},justReleased:function(a){return a=a||this.game.input.justReleasedRate,this.isUp===!0&&this.timeUp+a>this.game.time.now},reset:function(){0==this.isMouse&&(this.active=!1),this.identifier=null,this.isDown=!1,this.isUp=!0,this.totalTouches=0,this._holdSent=!1,this._history.length=0,this._stateReset=!0,this.targetObject&&this.targetObject._releasedHandler(this),this.targetObject=null},toString:function(){return"[{Pointer (id="+this.id+" identifer="+this.identifier+" active="+this.active+" duration="+this.duration+" withinGame="+this.withinGame+" x="+this.x+" y="+this.y+" clientX="+this.clientX+" clientY="+this.clientY+" screenX="+this.screenX+" screenY="+this.screenY+" pageX="+this.pageX+" pageY="+this.pageY+")}]"}},Object.defineProperty(e.Pointer.prototype,"duration",{get:function(){return this.isUp?-1:this.game.time.now-this.timeDown}}),Object.defineProperty(e.Pointer.prototype,"worldX",{get:function(){return this.game.world.camera.x+this.x}}),Object.defineProperty(e.Pointer.prototype,"worldY",{get:function(){return this.game.world.camera.y+this.y}}),e.Touch=function(a){this.game=a,this.disabled=!1,this.callbackContext=this.game,this.touchStartCallback=null,this.touchMoveCallback=null,this.touchEndCallback=null,this.touchEnterCallback=null,this.touchLeaveCallback=null,this.touchCancelCallback=null,this.preventDefault=!0,this._onTouchStart=null,this._onTouchMove=null,this._onTouchEnd=null,this._onTouchEnter=null,this._onTouchLeave=null,this._onTouchCancel=null,this._onTouchMove=null},e.Touch.prototype={start:function(){var a=this;this.game.device.touch&&(this._onTouchStart=function(b){return a.onTouchStart(b)},this._onTouchMove=function(b){return a.onTouchMove(b)},this._onTouchEnd=function(b){return a.onTouchEnd(b)},this._onTouchEnter=function(b){return a.onTouchEnter(b)},this._onTouchLeave=function(b){return a.onTouchLeave(b)},this._onTouchCancel=function(b){return a.onTouchCancel(b)},this.game.renderer.view.addEventListener("touchstart",this._onTouchStart,!1),this.game.renderer.view.addEventListener("touchmove",this._onTouchMove,!1),this.game.renderer.view.addEventListener("touchend",this._onTouchEnd,!1),this.game.renderer.view.addEventListener("touchenter",this._onTouchEnter,!1),this.game.renderer.view.addEventListener("touchleave",this._onTouchLeave,!1),this.game.renderer.view.addEventListener("touchcancel",this._onTouchCancel,!1))},consumeDocumentTouches:function(){this._documentTouchMove=function(a){a.preventDefault()},document.addEventListener("touchmove",this._documentTouchMove,!1)},onTouchStart:function(a){if(this.touchStartCallback&&this.touchStartCallback.call(this.callbackContext,a),!this.game.input.disabled&&!this.disabled){this.preventDefault&&a.preventDefault();for(var b=0;bc;c++)this._pointerData[c]={id:c,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1};this.snapOffset=new e.Point,this.enabled=!0,this.sprite.events&&null==this.sprite.events.onInputOver&&(this.sprite.events.onInputOver=new e.Signal,this.sprite.events.onInputOut=new e.Signal,this.sprite.events.onInputDown=new e.Signal,this.sprite.events.onInputUp=new e.Signal,this.sprite.events.onDragStart=new e.Signal,this.sprite.events.onDragStop=new e.Signal)}return this.sprite},reset:function(){this.enabled=!1;for(var a=0;10>a;a++)this._pointerData[a]={id:a,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}},stop:function(){0!=this.enabled&&(this.enabled=!1,this.game.input.interactiveItems.remove(this))},destroy:function(){this.enabled&&(this.enabled=!1,this.game.input.interactiveItems.remove(this),this.stop(),this.sprite=null)},pointerX:function(a){return a=a||0,this._pointerData[a].x},pointerY:function(a){return a=a||0,this._pointerData[a].y},pointerDown:function(a){return a=a||0,this._pointerData[a].isDown},pointerUp:function(a){return a=a||0,this._pointerData[a].isUp},pointerTimeDown:function(a){return a=a||0,this._pointerData[a].timeDown},pointerTimeUp:function(a){return a=a||0,this._pointerData[a].timeUp},pointerOver:function(a){return a=a||0,this._pointerData[a].isOver},pointerOut:function(a){return a=a||0,this._pointerData[a].isOut},pointerTimeOver:function(a){return a=a||0,this._pointerData[a].timeOver},pointerTimeOut:function(a){return a=a||0,this._pointerData[a].timeOut},pointerDragged:function(a){return a=a||0,this._pointerData[a].isDragged},checkPointerOver:function(a){return this.enabled&&this.sprite.visible&&(this.sprite.getLocalUnmodifiedPosition(this._tempPoint,a.x,a.y),this._tempPoint.x>=0&&this._tempPoint.x<=this.sprite.currentFrame.width&&this._tempPoint.y>=0&&this._tempPoint.y<=this.sprite.currentFrame.height)?this.pixelPerfect?this.checkPixel(this._tempPoint.x,this._tempPoint.y):!0:!1},checkPixel:function(a,b){if(this.sprite.texture.baseTexture.source){this.game.input.hitContext.clearRect(0,0,1,1),a+=this.sprite.texture.frame.x,b+=this.sprite.texture.frame.y,this.game.input.hitContext.drawImage(this.sprite.texture.baseTexture.source,a,b,1,1,0,0,1,1);var c=this.game.input.hitContext.getImageData(0,0,1,1);if(c.data[3]>=this.pixelPerfectAlpha)return!0}return!1},update:function(a){return 0==this.enabled||0==this.sprite.visible||this.sprite.group&&0==this.sprite.group.visible?(this._pointerOutHandler(a),!1):this.draggable&&this._draggedPointerID==a.id?this.updateDrag(a):1==this._pointerData[a.id].isOver?this.checkPointerOver(a)?(this._pointerData[a.id].x=a.x-this.sprite.x,this._pointerData[a.id].y=a.y-this.sprite.y,!0):(this._pointerOutHandler(a),!1):void 0},_pointerOverHandler:function(a){0==this._pointerData[a.id].isOver&&(this._pointerData[a.id].isOver=!0,this._pointerData[a.id].isOut=!1,this._pointerData[a.id].timeOver=this.game.time.now,this._pointerData[a.id].x=a.x-this.sprite.x,this._pointerData[a.id].y=a.y-this.sprite.y,this.useHandCursor&&0==this._pointerData[a.id].isDragged&&(this.game.stage.canvas.style.cursor="pointer"),this.sprite.events.onInputOver.dispatch(this.sprite,a))},_pointerOutHandler:function(a){this._pointerData[a.id].isOver=!1,this._pointerData[a.id].isOut=!0,this._pointerData[a.id].timeOut=this.game.time.now,this.useHandCursor&&0==this._pointerData[a.id].isDragged&&(this.game.stage.canvas.style.cursor="default"),this.sprite&&this.sprite.events&&this.sprite.events.onInputOut.dispatch(this.sprite,a) +},_touchedHandler:function(a){return 0==this._pointerData[a.id].isDown&&1==this._pointerData[a.id].isOver&&(this._pointerData[a.id].isDown=!0,this._pointerData[a.id].isUp=!1,this._pointerData[a.id].timeDown=this.game.time.now,this.sprite.events.onInputDown.dispatch(this.sprite,a),this.draggable&&0==this.isDragged&&this.startDrag(a),this.bringToTop&&this.sprite.bringToTop()),this.consumePointerEvent},_releasedHandler:function(a){this._pointerData[a.id].isDown&&a.isUp&&(this._pointerData[a.id].isDown=!1,this._pointerData[a.id].isUp=!0,this._pointerData[a.id].timeUp=this.game.time.now,this._pointerData[a.id].downDuration=this._pointerData[a.id].timeUp-this._pointerData[a.id].timeDown,this.checkPointerOver(a)?this.sprite.events.onInputUp.dispatch(this.sprite,a):this.useHandCursor&&(this.game.stage.canvas.style.cursor="default"),this.draggable&&this.isDragged&&this._draggedPointerID==a.id&&this.stopDrag(a))},updateDrag:function(a){return a.isUp?(this.stopDrag(a),!1):(this.allowHorizontalDrag&&(this.sprite.x=a.x+this._dragPoint.x+this.dragOffset.x),this.allowVerticalDrag&&(this.sprite.y=a.y+this._dragPoint.y+this.dragOffset.y),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(this.sprite.x=Math.round(this.sprite.x/this.snapX)*this.snapX,this.sprite.y=Math.round(this.sprite.y/this.snapY)*this.snapY),!0)},justOver:function(a,b){return a=a||0,b=b||500,this._pointerData[a].isOver&&this.overDuration(a)a;a++)this._pointerData[a].isDragged=!1;this.draggable=!1,this.isDragged=!1,this._draggedPointerID=-1},startDrag:function(a){this.isDragged=!0,this._draggedPointerID=a.id,this._pointerData[a.id].isDragged=!0,this.dragFromCenter?(this.sprite.centerOn(a.x,a.y),this._dragPoint.setTo(this.sprite.x-a.x,this.sprite.y-a.y)):this._dragPoint.setTo(this.sprite.x-a.x,this.sprite.y-a.y),this.updateDrag(a),this.bringToTop&&this.sprite.bringToTop(),this.sprite.events.onDragStart.dispatch(this.sprite,a)},stopDrag:function(a){this.isDragged=!1,this._draggedPointerID=-1,this._pointerData[a.id].isDragged=!1,this.snapOnRelease&&(this.sprite.x=Math.round(this.sprite.x/this.snapX)*this.snapX,this.sprite.y=Math.round(this.sprite.y/this.snapY)*this.snapY),this.sprite.events.onDragStop.dispatch(this.sprite,a),this.sprite.events.onInputUp.dispatch(this.sprite,a)},setDragLock:function(a,b){"undefined"==typeof a&&(a=!0),"undefined"==typeof b&&(b=!0),this.allowHorizontalDrag=a,this.allowVerticalDrag=b},enableSnap:function(a,b,c,d){"undefined"==typeof c&&(c=!0),"undefined"==typeof d&&(d=!1),this.snapX=a,this.snapY=b,this.snapOnDrag=c,this.snapOnRelease=d},disableSnap:function(){this.snapOnDrag=!1,this.snapOnRelease=!1},checkBoundsRect:function(){this.sprite.xthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-this.sprite.width),this.sprite.ythis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-this.sprite.height)},checkBoundsSprite:function(){this.sprite.xthis.boundsSprite.x+this.boundsSprite.width&&(this.sprite.x=this.boundsSprite.x+this.boundsSprite.width-this.sprite.width),this.sprite.ythis.boundsSprite.y+this.boundsSprite.height&&(this.sprite.y=this.boundsSprite.y+this.boundsSprite.height-this.sprite.height)}},e.Events=function(a){this.parent=a,this.onAddedToGroup=new e.Signal,this.onRemovedFromGroup=new e.Signal,this.onKilled=new e.Signal,this.onRevived=new e.Signal,this.onOutOfBounds=new e.Signal,this.onInputOver=null,this.onInputOut=null,this.onInputDown=null,this.onInputUp=null,this.onDragStart=null,this.onDragStop=null,this.onAnimationStart=null,this.onAnimationComplete=null,this.onAnimationLoop=null},e.Events.prototype={destroy:function(){this.parent=null,this.onAddedToGroup.dispose(),this.onRemovedFromGroup.dispose(),this.onKilled.dispose(),this.onRevived.dispose(),this.onOutOfBounds.dispose(),this.onInputOver&&(this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onDragStart.dispose(),this.onDragStop.dispose()),this.onAnimationStart&&(this.onAnimationStart.dispose(),this.onAnimationComplete.dispose(),this.onAnimationLoop.dispose())}},e.GameObjectFactory=function(a){this.game=a,this.world=this.game.world},e.GameObjectFactory.prototype={existing:function(a){return this.world.add(a)},sprite:function(a,b,c,d){return this.world.create(a,b,c,d)},child:function(a,b,c,d,e){return a.create(b,c,d,e)},tween:function(a){return this.game.tweens.create(a)},group:function(a,b){return new e.Group(this.game,a,b)},audio:function(a,b,c){return this.game.sound.add(a,b,c)},tileSprite:function(a,b,c,d,f,g){return this.world.add(new e.TileSprite(this.game,a,b,c,d,f,g))},text:function(a,b,c,d){return this.world.add(new e.Text(this.game,a,b,c,d))},button:function(a,b,c,d,f,g,h,i){return this.world.add(new e.Button(this.game,a,b,c,d,f,g,h,i))},graphics:function(a,b){return this.world.add(new e.Graphics(this.game,a,b))},emitter:function(a,b,c){return this.game.particles.add(new e.Particles.Arcade.Emitter(this.game,a,b,c))},bitmapText:function(a,b,c,d){return this.world.add(new e.BitmapText(this.game,a,b,c,d))},tilemap:function(a){return new e.Tilemap(this.game,a)},tileset:function(a){return this.game.cache.getTileset(a)},tilemapLayer:function(a,b,c,d,f,g,h){return this.world.add(new e.TilemapLayer(this.game,a,b,c,d,f,g,h))},renderTexture:function(a,b,c){var d=new e.RenderTexture(this.game,a,b,c);return this.game.cache.addRenderTexture(a,d),d}},e.Sprite=function(a,b,c,f,g){b=b||0,c=c||0,f=f||null,g=g||null,this.game=a,this.exists=!0,this.alive=!0,this.group=null,this.name="",this.type=e.SPRITE,this.renderOrderID=-1,this.lifespan=0,this.events=new e.Events(this),this.animations=new e.AnimationManager(this),this.input=new e.InputHandler(this),this.key=f,this.currentFrame=null,f instanceof e.RenderTexture?(d.Sprite.call(this,f),this.currentFrame=this.game.cache.getTextureFrame(f.name)):f instanceof d.Texture?(d.Sprite.call(this,f),this.currentFrame=g):((null==f||0==this.game.cache.checkImageKey(f))&&(f="__default",this.key=f),d.Sprite.call(this,d.TextureCache[f]),this.game.cache.isSpriteSheet(f)?(this.animations.loadFrameData(this.game.cache.getFrameData(f)),null!==g&&("string"==typeof g?this.frameName=g:this.frame=g)):this.currentFrame=this.game.cache.getFrame(f)),this.anchor=new e.Point,this.x=b,this.y=c,this.position.x=b,this.position.y=c,this.autoCull=!1,this.scale=new e.Point(1,1),this._cache={dirty:!1,a00:-1,a01:-1,a02:-1,a10:-1,a11:-1,a12:-1,id:-1,i01:-1,i10:-1,idi:-1,left:null,right:null,top:null,bottom:null,x:-1,y:-1,scaleX:1,scaleY:1,realScaleX:1,realScaleY:1,width:this.currentFrame.sourceSizeW,height:this.currentFrame.sourceSizeH,halfWidth:Math.floor(this.currentFrame.sourceSizeW/2),halfHeight:Math.floor(this.currentFrame.sourceSizeH/2),calcWidth:-1,calcHeight:-1,frameID:-1,frameWidth:this.currentFrame.width,frameHeight:this.currentFrame.height,boundsX:0,boundsY:0,cameraVisible:!0,cropX:0,cropY:0,cropWidth:this.currentFrame.sourceSizeW,cropHeight:this.currentFrame.sourceSizeH},this.offset=new e.Point,this.center=new e.Point(b+Math.floor(this._cache.width/2),c+Math.floor(this._cache.height/2)),this.topLeft=new e.Point(b,c),this.topRight=new e.Point(b+this._cache.width,c),this.bottomRight=new e.Point(b+this._cache.width,c+this._cache.height),this.bottomLeft=new e.Point(b,c+this._cache.height),this.bounds=new e.Rectangle(b,c,this._cache.width,this._cache.height),this.body=new e.Physics.Arcade.Body(this),this.health=1,this.inWorld=e.Rectangle.intersects(this.bounds,this.game.world.bounds),this.inWorldThreshold=0,this.outOfBoundsKill=!1,this._outOfBoundsFired=!1,this.fixedToCamera=!1,this.crop=new e.Rectangle(0,0,this._cache.width,this._cache.height),this.cropEnabled=!1},e.Sprite.prototype=Object.create(d.Sprite.prototype),e.Sprite.prototype.constructor=e.Sprite,e.Sprite.prototype.preUpdate=function(){return this.exists?this.lifespan>0&&(this.lifespan-=this.game.time.elapsed,this.lifespan<=0)?(this.kill(),void 0):(this._cache.dirty=!1,this.animations.update()&&(this._cache.dirty=!0),this.visible&&(this.renderOrderID=this.game.world.currentRenderOrderID++),this.prevX=this.x,this.prevY=this.y,this.updateCache(),this.updateAnimation(),this.cropEnabled&&this.updateCrop(),this._cache.dirty&&(this.updateBounds(),this._cache.cameraVisible=e.Rectangle.intersects(this.game.world.camera.screenView,this.bounds,0),1==this.autoCull&&(this.renderable=this._cache.cameraVisible),this.body&&this.body.updateBounds(this.center.x,this.center.y,this._cache.scaleX,this._cache.scaleY)),this.body&&this.body.preUpdate(),void 0):(this.renderOrderID=-1,void 0)},e.Sprite.prototype.updateCache=function(){(this.worldTransform[1]!=this._cache.i01||this.worldTransform[3]!=this._cache.i10)&&(this._cache.a00=this.worldTransform[0],this._cache.a01=this.worldTransform[1],this._cache.a10=this.worldTransform[3],this._cache.a11=this.worldTransform[4],this._cache.i01=this.worldTransform[1],this._cache.i10=this.worldTransform[3],this._cache.scaleX=Math.sqrt(this._cache.a00*this._cache.a00+this._cache.a01*this._cache.a01),this._cache.scaleY=Math.sqrt(this._cache.a10*this._cache.a10+this._cache.a11*this._cache.a11),this._cache.a01*=-1,this._cache.a10*=-1,this._cache.dirty=!0),(this.worldTransform[2]!=this._cache.a02||this.worldTransform[5]!=this._cache.a12)&&(this._cache.a02=this.worldTransform[2],this._cache.a12=this.worldTransform[5],this._cache.dirty=!0)},e.Sprite.prototype.updateAnimation=function(){this.currentFrame&&this.currentFrame.uuid!=this._cache.frameID&&(this._cache.frameWidth=this.texture.frame.width,this._cache.frameHeight=this.texture.frame.height,this._cache.frameID=this.currentFrame.uuid,this._cache.dirty=!0),this._cache.dirty&&this.currentFrame&&(this._cache.width=this.currentFrame.width,this._cache.height=this.currentFrame.height,this._cache.halfWidth=Math.floor(this._cache.width/2),this._cache.halfHeight=Math.floor(this._cache.height/2),this._cache.id=1/(this._cache.a00*this._cache.a11+this._cache.a01*-this._cache.a10),this._cache.idi=1/(this._cache.a00*this._cache.a11+this._cache.i01*-this._cache.i10))},e.Sprite.prototype.updateBounds=function(){var a=1,b=1;(0!==this.worldTransform[3]||0!==this.worldTransform[1])&&(a=this.scale.x,b=this.scale.y),this.offset.setTo(this._cache.a02-this.anchor.x*this.width,this._cache.a12-this.anchor.y*this.height),this.getLocalPosition(this.center,this.offset.x+this.width/2,this.offset.y+this.height/2,a,b),this.getLocalPosition(this.topLeft,this.offset.x,this.offset.y,a,b),this.getLocalPosition(this.topRight,this.offset.x+this.width,this.offset.y,a,b),this.getLocalPosition(this.bottomLeft,this.offset.x,this.offset.y+this.height,a,b),this.getLocalPosition(this.bottomRight,this.offset.x+this.width,this.offset.y+this.height,a,b),this._cache.left=e.Math.min(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x),this._cache.right=e.Math.max(this.topLeft.x,this.topRight.x,this.bottomLeft.x,this.bottomRight.x),this._cache.top=e.Math.min(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y),this._cache.bottom=e.Math.max(this.topLeft.y,this.topRight.y,this.bottomLeft.y,this.bottomRight.y),this.bounds.setTo(this._cache.left,this._cache.top,this._cache.right-this._cache.left,this._cache.bottom-this._cache.top),this._cache.boundsX=this._cache.x,this._cache.boundsY=this._cache.y,this.updateFrame=!0,0==this.inWorld?(this.inWorld=e.Rectangle.intersects(this.bounds,this.game.world.bounds,this.inWorldThreshold),this.inWorld&&(this._outOfBoundsFired=!1)):(this.inWorld=e.Rectangle.intersects(this.bounds,this.game.world.bounds,this.inWorldThreshold),0==this.inWorld&&(this.events.onOutOfBounds.dispatch(this),this._outOfBoundsFired=!0,this.outOfBoundsKill&&this.kill()))},e.Sprite.prototype.getLocalPosition=function(a,b,c,d,e){return a.x=(this._cache.a11*this._cache.id*b+-this._cache.a01*this._cache.id*c+(this._cache.a12*this._cache.a01-this._cache.a02*this._cache.a11)*this._cache.id)*d+this._cache.a02,a.y=(this._cache.a00*this._cache.id*c+-this._cache.a10*this._cache.id*b+(-this._cache.a12*this._cache.a00+this._cache.a02*this._cache.a10)*this._cache.id)*e+this._cache.a12,a},e.Sprite.prototype.getLocalUnmodifiedPosition=function(a,b,c){var d=this.worldTransform[0],e=this.worldTransform[1],f=this.worldTransform[2],g=this.worldTransform[3],h=this.worldTransform[4],i=this.worldTransform[5],j=1/(d*h+e*-g),k=h*j*b+-e*j*c+(i*e-f*h)*j,l=d*j*c+-g*j*b+(-i*d+f*g)*j;return a.x=k+this.anchor.x*this._cache.width,a.y=l+this.anchor.y*this._cache.height,a},e.Sprite.prototype.updateCrop=function(){(this.crop.width!=this._cache.cropWidth||this.crop.height!=this._cache.cropHeight||this.crop.x!=this._cache.cropX||this.crop.y!=this._cache.cropY)&&(this.crop.floorAll(),this._cache.cropX=this.crop.x,this._cache.cropY=this.crop.y,this._cache.cropWidth=this.crop.width,this._cache.cropHeight=this.crop.height,this.texture.frame=this.crop,this.texture.width=this.crop.width,this.texture.height=this.crop.height,this.texture.updateFrame=!0,d.Texture.frameUpdates.push(this.texture))},e.Sprite.prototype.resetCrop=function(){this.crop=new e.Rectangle(0,0,this._cache.width,this._cache.height),this.texture.setFrame(this.crop),this.cropEnabled=!1},e.Sprite.prototype.postUpdate=function(){this.exists&&(this.body&&this.body.postUpdate(),this.fixedToCamera?(this._cache.x=this.game.camera.view.x+this.x,this._cache.y=this.game.camera.view.y+this.y):(this._cache.x=this.x,this._cache.y=this.y),(this.position.x!=this._cache.x||this.position.y!=this._cache.y)&&(this.position.x=this._cache.x,this.position.y=this._cache.y))},e.Sprite.prototype.loadTexture=function(a,b){this.key=a,a instanceof e.RenderTexture?this.currentFrame=this.game.cache.getTextureFrame(a.name):a instanceof d.Texture?this.currentFrame=b:(("undefined"==typeof a||this.game.cache.checkImageKey(a)===!1)&&(a="__default",this.key=a),this.game.cache.isSpriteSheet(a)?(this.animations.loadFrameData(this.game.cache.getFrameData(a)),"undefined"!=typeof b&&("string"==typeof b?this.frameName=b:this.frame=b)):(this.currentFrame=this.game.cache.getFrame(a),this.setTexture(d.TextureCache[a])))},e.Sprite.prototype.deltaAbsX=function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},e.Sprite.prototype.deltaAbsY=function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},e.Sprite.prototype.deltaX=function(){return this.x-this.prevX},e.Sprite.prototype.deltaY=function(){return this.y-this.prevY},e.Sprite.prototype.centerOn=function(a,b){return this.x=a+(this.x-this.center.x),this.y=b+(this.y-this.center.y),this},e.Sprite.prototype.revive=function(a){return"undefined"==typeof a&&(a=1),this.alive=!0,this.exists=!0,this.visible=!0,this.health=a,this.events&&this.events.onRevived.dispatch(this),this},e.Sprite.prototype.kill=function(){return this.alive=!1,this.exists=!1,this.visible=!1,this.events&&this.events.onKilled.dispatch(this),this},e.Sprite.prototype.destroy=function(){this.group&&this.group.remove(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),this.animations&&this.animations.destroy(),this.alive=!1,this.exists=!1,this.visible=!1,this.game=null},e.Sprite.prototype.damage=function(a){return this.alive&&(this.health-=a,this.health<0&&this.kill()),this},e.Sprite.prototype.reset=function(a,b,c){return"undefined"==typeof c&&(c=1),this.x=a,this.y=b,this.position.x=this.x,this.position.y=this.y,this.alive=!0,this.exists=!0,this.visible=!0,this.renderable=!0,this._outOfBoundsFired=!1,this.health=c,this.body&&this.body.reset(),this},e.Sprite.prototype.bringToTop=function(){return this.group?this.group.bringToTop(this):this.game.world.bringToTop(this),this},e.Sprite.prototype.play=function(a,b,c,d){return this.animations?this.animations.play(a,b,c,d):void 0},Object.defineProperty(e.Sprite.prototype,"angle",{get:function(){return e.Math.wrapAngle(e.Math.radToDeg(this.rotation))},set:function(a){this.rotation=e.Math.degToRad(e.Math.wrapAngle(a))}}),Object.defineProperty(e.Sprite.prototype,"frame",{get:function(){return this.animations.frame},set:function(a){this.animations.frame=a}}),Object.defineProperty(e.Sprite.prototype,"frameName",{get:function(){return this.animations.frameName},set:function(a){this.animations.frameName=a}}),Object.defineProperty(e.Sprite.prototype,"inCamera",{get:function(){return this._cache.cameraVisible}}),Object.defineProperty(e.Sprite.prototype,"width",{get:function(){return this.scale.x*this.currentFrame.width},set:function(a){this.scale.x=a/this.currentFrame.width,this._cache.scaleX=a/this.currentFrame.width,this._width=a}}),Object.defineProperty(e.Sprite.prototype,"height",{get:function(){return this.scale.y*this.currentFrame.height},set:function(a){this.scale.y=a/this.currentFrame.height,this._cache.scaleY=a/this.currentFrame.height,this._height=a}}),Object.defineProperty(e.Sprite.prototype,"inputEnabled",{get:function(){return this.input.enabled},set:function(a){a?0==this.input.enabled&&this.input.start():this.input.enabled&&this.input.stop()}}),e.TileSprite=function(a,b,c,f,g,h,i){b=b||0,c=c||0,f=f||256,g=g||256,h=h||null,i=i||null,e.Sprite.call(this,a,b,c,h,i),this.texture=d.TextureCache[h],d.TilingSprite.call(this,this.texture,f,g),this.type=e.TILESPRITE,this.tileScale=new e.Point(1,1),this.tilePosition=new e.Point(0,0)},e.TileSprite.prototype=e.Utils.extend(!0,d.TilingSprite.prototype,e.Sprite.prototype),e.TileSprite.prototype.constructor=e.TileSprite,e.Text=function(a,b,c,f,g){b=b||0,c=c||0,f=f||"",g=g||"",this.exists=!0,this.alive=!0,this.group=null,this.name="",this.game=a,this._text=f,this._style=g,d.Text.call(this,f,g),this.type=e.TEXT,this.position.x=this.x=b,this.position.y=this.y=c,this.anchor=new e.Point,this.scale=new e.Point(1,1),this._cache={dirty:!1,a00:1,a01:0,a02:b,a10:0,a11:1,a12:c,id:1,x:-1,y:-1,scaleX:1,scaleY:1},this._cache.x=this.x,this._cache.y=this.y,this.renderable=!0},e.Text.prototype=Object.create(d.Text.prototype),e.Text.prototype.constructor=e.Text,e.Text.prototype.update=function(){this.exists&&(this._cache.dirty=!1,this._cache.x=this.x,this._cache.y=this.y,(this.position.x!=this._cache.x||this.position.y!=this._cache.y)&&(this.position.x=this._cache.x,this.position.y=this._cache.y,this._cache.dirty=!0))},e.Text.prototype.destroy=function(){this.group&&this.group.remove(this),this.canvas.parentNode?this.canvas.parentNode.removeChild(this.canvas):(this.canvas=null,this.context=null),this.exists=!1,this.group=null},Object.defineProperty(e.Text.prototype,"angle",{get:function(){return e.Math.radToDeg(this.rotation)},set:function(a){this.rotation=e.Math.degToRad(a)}}),Object.defineProperty(e.Text.prototype,"content",{get:function(){return this._text},set:function(a){a!==this._text&&(this._text=a,this.setText(a))}}),Object.defineProperty(e.Text.prototype,"font",{get:function(){return this._style},set:function(a){a!==this._style&&(this._style=a,this.setStyle(a))}}),e.BitmapText=function(a,b,c,f,g){b=b||0,c=c||0,f=f||"",g=g||"",this.exists=!0,this.alive=!0,this.group=null,this.name="",this.game=a,d.BitmapText.call(this,f,g),this.type=e.BITMAPTEXT,this.position.x=b,this.position.y=c,this.anchor=new e.Point,this.scale=new e.Point(1,1),this._cache={dirty:!1,a00:1,a01:0,a02:b,a10:0,a11:1,a12:c,id:1,x:-1,y:-1,scaleX:1,scaleY:1},this._cache.x=this.x,this._cache.y=this.y,this.renderable=!0},e.BitmapText.prototype=Object.create(d.BitmapText.prototype),e.BitmapText.prototype.constructor=e.BitmapText,e.BitmapText.prototype.update=function(){this.exists&&(this._cache.dirty=!1,this._cache.x=this.x,this._cache.y=this.y,(this.position.x!=this._cache.x||this.position.y!=this._cache.y)&&(this.position.x=this._cache.x,this.position.y=this._cache.y,this._cache.dirty=!0),this.pivot.x=this.anchor.x*this.width,this.pivot.y=this.anchor.y*this.height)},e.BitmapText.prototype.destroy=function(){this.group&&this.group.remove(this),this.canvas.parentNode?this.canvas.parentNode.removeChild(this.canvas):(this.canvas=null,this.context=null),this.exists=!1,this.group=null},Object.defineProperty(e.BitmapText.prototype,"angle",{get:function(){return e.Math.radToDeg(this.rotation)},set:function(a){this.rotation=e.Math.degToRad(a)}}),Object.defineProperty(e.BitmapText.prototype,"x",{get:function(){return this.position.x},set:function(a){this.position.x=a}}),Object.defineProperty(e.BitmapText.prototype,"y",{get:function(){return this.position.y},set:function(a){this.position.y=a}}),e.Button=function(a,b,c,d,f,g,h,i,j){b=b||0,c=c||0,d=d||null,f=f||null,g=g||this,e.Sprite.call(this,a,b,c,d,i),this.type=e.BUTTON,this._onOverFrameName=null,this._onOutFrameName=null,this._onDownFrameName=null,this._onUpFrameName=null,this._onOverFrameID=null,this._onOutFrameID=null,this._onDownFrameID=null,this._onUpFrameID=null,this.onInputOver=new e.Signal,this.onInputOut=new e.Signal,this.onInputDown=new e.Signal,this.onInputUp=new e.Signal,this.setFrames(h,i,j),null!==f&&this.onInputUp.add(f,g),this.freezeFrames=!1,this.input.start(0,!0),this.events.onInputOver.add(this.onInputOverHandler,this),this.events.onInputOut.add(this.onInputOutHandler,this),this.events.onInputDown.add(this.onInputDownHandler,this),this.events.onInputUp.add(this.onInputUpHandler,this)},e.Button.prototype=e.Utils.extend(!0,e.Sprite.prototype,d.Sprite.prototype),e.Button.prototype.constructor=e.Button,e.Button.prototype.setFrames=function(a,b,c){null!==a&&("string"==typeof a?(this._onOverFrameName=a,this.input.pointerOver()&&(this.frameName=a)):(this._onOverFrameID=a,this.input.pointerOver()&&(this.frame=a))),null!==b&&("string"==typeof b?(this._onOutFrameName=b,this._onUpFrameName=b,0==this.input.pointerOver()&&(this.frameName=b)):(this._onOutFrameID=b,this._onUpFrameID=b,0==this.input.pointerOver()&&(this.frame=b))),null!==c&&("string"==typeof c?(this._onDownFrameName=c,this.input.pointerOver()&&(this.frameName=c)):(this._onDownFrameID=c,this.input.pointerOver()&&(this.frame=c)))},e.Button.prototype.onInputOverHandler=function(a){0==this.freezeFrames&&(null!=this._onOverFrameName?this.frameName=this._onOverFrameName:null!=this._onOverFrameID&&(this.frame=this._onOverFrameID)),this.onInputOver&&this.onInputOver.dispatch(this,a)},e.Button.prototype.onInputOutHandler=function(a){0==this.freezeFrames&&(null!=this._onOutFrameName?this.frameName=this._onOutFrameName:null!=this._onOutFrameID&&(this.frame=this._onOutFrameID)),this.onInputOut&&this.onInputOut.dispatch(this,a)},e.Button.prototype.onInputDownHandler=function(a){0==this.freezeFrames&&(null!=this._onDownFrameName?this.frameName=this._onDownFrameName:null!=this._onDownFrameID&&(this.frame=this._onDownFrameID)),this.onInputDown&&this.onInputDown.dispatch(this,a)},e.Button.prototype.onInputUpHandler=function(a){0==this.freezeFrames&&(null!=this._onUpFrameName?this.frameName=this._onUpFrameName:null!=this._onUpFrameID&&(this.frame=this._onUpFrameID)),this.onInputUp&&this.onInputUp.dispatch(this,a)},e.Graphics=function(a){this.game=a,d.Graphics.call(this),this.type=e.GRAPHICS},e.Graphics.prototype=Object.create(d.Graphics.prototype),e.Graphics.prototype.constructor=e.Graphics,e.Graphics.prototype.destroy=function(){this.clear(),this.group&&this.group.remove(this),this.game=null},Object.defineProperty(e.Graphics.prototype,"angle",{get:function(){return e.Math.wrapAngle(e.Math.radToDeg(this.rotation))},set:function(a){this.rotation=e.Math.degToRad(e.Math.wrapAngle(a))}}),Object.defineProperty(e.Graphics.prototype,"x",{get:function(){return this.position.x},set:function(a){this.position.x=a}}),Object.defineProperty(e.Graphics.prototype,"y",{get:function(){return this.position.y},set:function(a){this.position.y=a}}),e.RenderTexture=function(a,b,c,f){this.game=a,this.name=b,d.EventTarget.call(this),this.width=c||100,this.height=f||100,this.indetityMatrix=d.mat3.create(),this.frame=new d.Rectangle(0,0,this.width,this.height),this.type=e.RENDERTEXTURE,d.gl?this.initWebGL():this.initCanvas()},e.RenderTexture.prototype=e.Utils.extend(!0,d.RenderTexture.prototype),e.RenderTexture.prototype.constructor=e.RenderTexture,e.Canvas={create:function(a,b){a=a||256,b=b||256;var c=document.createElement("canvas");return c.width=a,c.height=b,c.style.display="block",c},getOffset:function(a,b){b=b||new e.Point;var c=a.getBoundingClientRect(),d=a.clientTop||document.body.clientTop||0,f=a.clientLeft||document.body.clientLeft||0,g=window.pageYOffset||a.scrollTop||document.body.scrollTop,h=window.pageXOffset||a.scrollLeft||document.body.scrollLeft;return b.x=c.left+h-f,b.y=c.top+g-d,b},getAspectRatio:function(a){return a.width/a.height},setBackgroundColor:function(a,b){return b=b||"rgb(0,0,0)",a.style.backgroundColor=b,a},setTouchAction:function(a,b){return b=b||"none",a.style.msTouchAction=b,a.style["ms-touch-action"]=b,a.style["touch-action"]=b,a},setUserSelect:function(a,b){return b=b||"none",a.style["-webkit-touch-callout"]=b,a.style["-webkit-user-select"]=b,a.style["-khtml-user-select"]=b,a.style["-moz-user-select"]=b,a.style["-ms-user-select"]=b,a.style["user-select"]=b,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a},addToDOM:function(a,b,c){return b=b||"","undefined"==typeof c&&(c=!0),""!==b?document.getElementById(b)?(document.getElementById(b).appendChild(a),c&&(document.getElementById(b).style.overflow="hidden")):document.body.appendChild(a):document.body.appendChild(a),a},setTransform:function(a,b,c,d,e,f,g){return a.setTransform(d,f,g,e,b,c),a},setSmoothingEnabled:function(a,b){return a.imageSmoothingEnabled=b,a.mozImageSmoothingEnabled=b,a.oImageSmoothingEnabled=b,a.webkitImageSmoothingEnabled=b,a.msImageSmoothingEnabled=b,a},setImageRenderingCrisp:function(a){return a.style["image-rendering"]="crisp-edges",a.style["image-rendering"]="-moz-crisp-edges",a.style["image-rendering"]="-webkit-optimize-contrast",a.style.msInterpolationMode="nearest-neighbor",a},setImageRenderingBicubic:function(a){return a.style["image-rendering"]="auto",a.style.msInterpolationMode="bicubic",a}},e.StageScaleMode=function(a){this._startHeight=0,this.forceLandscape=!1,this.forcePortrait=!1,this.incorrectOrientation=!1,this.pageAlignHorizontally=!1,this.pageAlignVertically=!1,this.minWidth=null,this.maxWidth=null,this.minHeight=null,this.maxHeight=null,this.width=0,this.height=0,this.maxIterations=5,this.game=a,this.enterLandscape=new e.Signal,this.enterPortrait=new e.Signal,this.orientation=window.orientation?window.orientation:window.outerWidth>window.outerHeight?90:0,this.scaleFactor=new e.Point(1,1),this.aspectRatio=0;var b=this;window.addEventListener("orientationchange",function(a){return b.checkOrientation(a)},!1),window.addEventListener("resize",function(a){return b.checkResize(a)},!1)},e.StageScaleMode.EXACT_FIT=0,e.StageScaleMode.NO_SCALE=1,e.StageScaleMode.SHOW_ALL=2,e.StageScaleMode.prototype={startFullScreen:function(){if(!this.isFullScreen){var a=this.game.canvas;a.requestFullScreen?a.requestFullScreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen&&a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT),this.game.stage.canvas.style.width="100%",this.game.stage.canvas.style.height="100%"}},stopFullScreen:function(){document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},checkOrientationState:function(){this.incorrectOrientation?(this.forceLandscape&&window.innerWidth>window.innerHeight||this.forcePortrait&&window.innerHeight>window.innerWidth)&&(this.game.paused=!1,this.incorrectOrientation=!1,this.refresh()):(this.forceLandscape&&window.innerWidthwindow.outerHeight?90:0,this.isLandscape?this.enterLandscape.dispatch(this.orientation,!0,!1):this.enterPortrait.dispatch(this.orientation,!1,!0),this.game.stage.scaleMode!==e.StageScaleMode.NO_SCALE&&this.refresh()},refresh:function(){var a=this;0==this.game.device.iPad&&0==this.game.device.webApp&&0==this.game.device.desktop&&(this.game.device.android&&0==this.game.device.chrome?window.scrollTo(0,1):window.scrollTo(0,0)),null==this._check&&this.maxIterations>0&&(this._iterations=this.maxIterations,this._check=window.setInterval(function(){return a.setScreenSize()},10),this.setScreenSize())},setScreenSize:function(a){"undefined"==typeof a&&(a=!1),0==this.game.device.iPad&&0==this.game.device.webApp&&0==this.game.device.desktop&&(this.game.device.android&&0==this.game.device.chrome?window.scrollTo(0,1):window.scrollTo(0,0)),this._iterations--,(a||window.innerHeight>this._startHeight||this._iterations<0)&&(document.documentElement.style.minHeight=window.innerHeight+"px",1==this.incorrectOrientation?this.setMaximum():this.game.stage.scaleMode==e.StageScaleMode.EXACT_FIT?this.setExactFit():this.game.stage.scaleMode==e.StageScaleMode.SHOW_ALL&&this.setShowAll(),this.setSize(),clearInterval(this._check),this._check=null)},setSize:function(){0==this.incorrectOrientation&&(this.maxWidth&&this.width>this.maxWidth&&(this.width=this.maxWidth),this.maxHeight&&this.height>this.maxHeight&&(this.height=this.maxHeight),this.minWidth&&this.widththis.maxWidth?this.maxWidth:a,this.height=this.maxHeight&&b>this.maxHeight?this.maxHeight:b,console.log("setExactFit",this.width,this.height,this.game.stage.offset) +}},Object.defineProperty(e.StageScaleMode.prototype,"isFullScreen",{get:function(){return null===document.fullscreenElement||null===document.mozFullScreenElement||null===document.webkitFullscreenElement?!1:!0}}),Object.defineProperty(e.StageScaleMode.prototype,"isPortrait",{get:function(){return 0==this.orientation||180==this.orientation}}),Object.defineProperty(e.StageScaleMode.prototype,"isLandscape",{get:function(){return 90===this.orientation||-90===this.orientation}}),e.Device=function(){this.patchAndroidClearRectBug=!1,this.desktop=!1,this.iOS=!1,this.android=!1,this.chromeOS=!1,this.linux=!1,this.macOS=!1,this.windows=!1,this.canvas=!1,this.file=!1,this.fileSystem=!1,this.localStorage=!1,this.webGL=!1,this.worker=!1,this.touch=!1,this.mspointer=!1,this.css3D=!1,this.pointerLock=!1,this.arora=!1,this.chrome=!1,this.epiphany=!1,this.firefox=!1,this.ie=!1,this.ieVersion=0,this.mobileSafari=!1,this.midori=!1,this.opera=!1,this.safari=!1,this.webApp=!1,this.audioData=!1,this.webAudio=!1,this.ogg=!1,this.opus=!1,this.mp3=!1,this.wav=!1,this.m4a=!1,this.webm=!1,this.iPhone=!1,this.iPhone4=!1,this.iPad=!1,this.pixelRatio=0,this._checkAudio(),this._checkBrowser(),this._checkCSS3D(),this._checkDevice(),this._checkFeatures(),this._checkOS()},e.Device.prototype={_checkOS:function(){var a=navigator.userAgent;/Android/.test(a)?this.android=!0:/CrOS/.test(a)?this.chromeOS=!0:/iP[ao]d|iPhone/i.test(a)?this.iOS=!0:/Linux/.test(a)?this.linux=!0:/Mac OS/.test(a)?this.macOS=!0:/Windows/.test(a)&&(this.windows=!0),(this.windows||this.macOS||this.linux)&&(this.desktop=!0)},_checkFeatures:function(){this.canvas=!!window.CanvasRenderingContext2D;try{this.localStorage=!!localStorage.getItem}catch(a){this.localStorage=!1}this.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),this.fileSystem=!!window.requestFileSystem,this.webGL=function(){try{var a=document.createElement("canvas");return!!window.WebGLRenderingContext&&(a.getContext("webgl")||a.getContext("experimental-webgl"))}catch(b){return!1}}(),this.webGL=null===this.webGL?!1:!0,this.worker=!!window.Worker,("ontouchstart"in document.documentElement||window.navigator.msPointerEnabled)&&(this.touch=!0),window.navigator.msPointerEnabled&&(this.mspointer=!0),this.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document},_checkBrowser:function(){var a=navigator.userAgent;/Arora/.test(a)?this.arora=!0:/Chrome/.test(a)?this.chrome=!0:/Epiphany/.test(a)?this.epiphany=!0:/Firefox/.test(a)?this.firefox=!0:/Mobile Safari/.test(a)?this.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(a)?(this.ie=!0,this.ieVersion=parseInt(RegExp.$1)):/Midori/.test(a)?this.midori=!0:/Opera/.test(a)?this.opera=!0:/Safari/.test(a)&&(this.safari=!0),navigator.standalone&&(this.webApp=!0)},_checkAudio:function(){this.audioData=!!window.Audio,this.webAudio=!(!window.webkitAudioContext&&!window.AudioContext);var a=document.createElement("audio"),b=!1;try{(b=!!a.canPlayType)&&(a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(this.ogg=!0),a.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")&&(this.opus=!0),a.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(this.mp3=!0),a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(this.wav=!0),(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;").replace(/^no$/,""))&&(this.m4a=!0),a.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(this.webm=!0))}catch(c){}},_checkDevice:function(){this.pixelRatio=window.devicePixelRatio||1,this.iPhone=-1!=navigator.userAgent.toLowerCase().indexOf("iphone"),this.iPhone4=2==this.pixelRatio&&this.iPhone,this.iPad=-1!=navigator.userAgent.toLowerCase().indexOf("ipad")},_checkCSS3D:function(){var a,b=document.createElement("p"),c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(b,null);for(var d in c)void 0!==b.style[d]&&(b.style[d]="translate3d(1px,1px,1px)",a=window.getComputedStyle(b).getPropertyValue(c[d]));document.body.removeChild(b),this.css3D=void 0!==a&&a.length>0&&"none"!==a},canPlayAudio:function(a){return"mp3"==a&&this.mp3?!0:"ogg"==a&&(this.ogg||this.opus)?!0:"m4a"==a&&this.m4a?!0:"wav"==a&&this.wav?!0:"webm"==a&&this.webm?!0:!1},isConsoleOpen:function(){return window.console&&window.console.firebug?!0:window.console?(console.profile(),console.profileEnd(),console.clear&&console.clear(),console.profiles.length>0):!1}},e.RequestAnimationFrame=function(a){this.game=a,this._isSetTimeOut=!1,this.isRunning=!1;for(var b=["ms","moz","webkit","o"],c=0;c>>0,b-=d,b*=d,d=b>>>0,b-=d,d+=4294967296*b;return 2.3283064365386963e-10*(d>>>0)},integer:function(){return 4294967296*this.rnd.apply(this)},frac:function(){return this.rnd.apply(this)+1.1102230246251565e-16*(0|2097152*this.rnd.apply(this))},real:function(){return this.integer()+this.frac()},integerInRange:function(a,b){return Math.floor(this.realInRange(a,b))},realInRange:function(a,b){return this.frac()*(b-a)+a},normal:function(){return 1-2*this.frac()},uuid:function(){var a,b;for(b=a="";a++<36;b+=~a%5|4&3*a?(15^a?8^this.frac()*(20^a?16:4):4).toString(16):"-");return b},pick:function(a){return a[this.integerInRange(0,a.length)]},weightedPick:function(a){return a[~~(Math.pow(this.frac(),2)*a.length)]},timestamp:function(a,b){return this.realInRange(a||9466848e5,b||1577862e6)},angle:function(){return this.integerInRange(-180,180)}},e.Math={PI2:2*Math.PI,fuzzyEqual:function(a,b,c){return"undefined"==typeof c&&(c=1e-4),Math.abs(a-b)a},fuzzyGreaterThan:function(a,b,c){return"undefined"==typeof c&&(c=1e-4),a>b-c},fuzzyCeil:function(a,b){return"undefined"==typeof b&&(b=1e-4),Math.ceil(a-b)},fuzzyFloor:function(a,b){return"undefined"==typeof b&&(b=1e-4),Math.floor(a+b)},average:function(){for(var a=[],b=0;b0?Math.floor(a):Math.ceil(a)},shear:function(a){return a%1},snapTo:function(a,b,c){return"undefined"==typeof c&&(c=0),0==b?a:(a-=c,a=b*Math.round(a/b),c+a)},snapToFloor:function(a,b,c){return"undefined"==typeof c&&(c=0),0==b?a:(a-=c,a=b*Math.floor(a/b),c+a)},snapToCeil:function(a,b,c){return"undefined"==typeof c&&(c=0),0==b?a:(a-=c,a=b*Math.ceil(a/b),c+a)},snapToInArray:function(a,b,c){if("undefined"==typeof c&&(c=!0),c&&b.sort(),a=f-a?f:e},roundTo:function(a,b,c){"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=10);var d=Math.pow(c,-b);return Math.round(a*d)/d},floorTo:function(a,b,c){"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=10);var d=Math.pow(c,-b);return Math.floor(a*d)/d},ceilTo:function(a,b,c){"undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=10);var d=Math.pow(c,-b);return Math.ceil(a*d)/d},interpolateFloat:function(a,b,c){return(b-a)*c+a},angleBetween:function(a,b,c,d){return Math.atan2(d-b,c-a)},normalizeAngle:function(a,b){"undefined"==typeof b&&(b=!0);var c=b?GameMath.PI:180;return this.wrap(a,c,-c)},nearestAngleBetween:function(a,b,c){"undefined"==typeof c&&(c=!0);var d=c?Math.PI:180;return a=this.normalizeAngle(a,c),b=this.normalizeAngle(b,c),-d/2>a&&b>d/2&&(a+=2*d),-d/2>b&&a>d/2&&(b+=2*d),b-a},interpolateAngles:function(a,b,c,d,e){return"undefined"==typeof d&&(d=!0),"undefined"==typeof e&&(e=null),a=this.normalizeAngle(a,d),b=this.normalizeAngleToAnother(b,a,d),"function"==typeof e?e(c,a,b-a,1):this.interpolateFloat(a,b,c)},chanceRoll:function(a){return"undefined"==typeof a&&(a=50),0>=a?!1:a>=100?!0:100*Math.random()>=a?!1:!0},numberArray:function(a,b){for(var c=[],d=a;b>=d;d++)c.push(d);return c},maxAdd:function(a,b,c){return a+=b,a>c&&(a=c),a},minSub:function(a,b,c){return a-=b,c>a&&(a=c),a},wrap:function(a,b,c){var d=c-b;if(0>=d)return 0;var e=(a-b)%d;return 0>e&&(e+=d),e+b},wrapValue:function(a,b,c){var d;return a=Math.abs(a),b=Math.abs(b),c=Math.abs(c),d=(a+b)%c},randomSign:function(){return Math.random()>.5?1:-1},isOdd:function(a){return 1&a},isEven:function(a){return 1&a?!1:!0},max:function(){for(var a=1,b=0,c=arguments.length;c>a;a++)arguments[b]a;a++)arguments[a]=-180&&180>=a?a:(b=(a+180)%360,0>b&&(b+=360),b-180)},angleLimit:function(a,b,c){var d=a;return a>c?d=c:b>a&&(d=b),d},linearInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return 0>b?this.linear(a[0],a[1],d):b>1?this.linear(a[c],a[c-1],c-d):this.linear(a[e],a[e+1>c?c:e+1],d-e)},bezierInterpolation:function(a,b){for(var c=0,d=a.length-1,e=0;d>=e;e++)c+=Math.pow(1-b,d-e)*Math.pow(b,e)*a[e]*this.bernstein(d,e);return c},catmullRomInterpolation:function(a,b){var c=a.length-1,d=c*b,e=Math.floor(d);return a[0]===a[c]?(0>b&&(e=Math.floor(d=c*(1+b))),this.catmullRom(a[(e-1+c)%c],a[e],a[(e+1)%c],a[(e+2)%c],d-e)):0>b?a[0]-(this.catmullRom(a[0],a[0],a[1],a[1],-d)-a[0]):b>1?a[c]-(this.catmullRom(a[c],a[c],a[c-1],a[c-1],d-c)-a[c]):this.catmullRom(a[e?e-1:0],a[e],a[e+1>c?c:e+1],a[e+2>c?c:e+2],d-e)},linear:function(a,b,c){return(b-a)*c+a},bernstein:function(a,b){return this.factorial(a)/this.factorial(b)/this.factorial(a-b)},catmullRom:function(a,b,c,d,e){var f=.5*(c-a),g=.5*(d-b),h=e*e,i=e*h;return(2*b-2*c+f+g)*i+(-3*b+3*c-2*f-g)*h+f*e+b},difference:function(a,b){return Math.abs(a-b)},getRandom:function(a,b,c){if("undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=0),null!=a){var d=c;if((0==d||d>a.length-b)&&(d=a.length-b),d>0)return a[b+Math.floor(Math.random()*d)]}return null},floor:function(a){var b=0|a;return a>0?b:b!=a?b-1:b},ceil:function(a){var b=0|a;return a>0?b!=a?b+1:b:b},sinCosGenerator:function(a,b,c,d){"undefined"==typeof b&&(b=1),"undefined"==typeof c&&(c=1),"undefined"==typeof d&&(d=1);for(var e=b,f=c,g=d*Math.PI/a,h=[],i=[],j=0;a>j;j++)f-=e*g,e+=f*g,h[j]=f,i[j]=e;return{sin:i,cos:h}},shift:function(a){var b=a.shift();return a.push(b),b},shuffleArray:function(a){for(var b=a.length-1;b>0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c],a[c]=d}return a},distance:function(a,b,c,d){var e=a-c,f=b-d;return Math.sqrt(e*e+f*f)},distanceRounded:function(a,b,c,d){return Math.round(e.Math.distance(a,b,c,d))},clamp:function(a,b,c){return b>a?b:a>c?c:a},clampBottom:function(a,b){return b>a?b:a},within:function(a,b,c){return Math.abs(a-b)<=c},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},smoothstep:function(a,b,c){return b>=a?0:a>=c?1:(a=(a-b)/(c-b),a*a*(3-2*a))},smootherstep:function(a,b,c){return b>=a?0:a>=c?1:(a=(a-b)/(c-b),a*a*a*(a*(6*a-15)+10))},sign:function(a){return 0>a?-1:a>0?1:0},degToRad:function(){var a=Math.PI/180;return function(b){return b*a}}(),radToDeg:function(){var a=180/Math.PI;return function(b){return b*a}}()},e.QuadTree=function(a,b,c,d,e,f,g,h){this.physicsManager=a,this.ID=a.quadTreeID,a.quadTreeID++,this.maxObjects=f||10,this.maxLevels=g||4,this.level=h||0,this.bounds={x:Math.round(b),y:Math.round(c),width:d,height:e,subWidth:Math.floor(d/2),subHeight:Math.floor(e/2),right:Math.round(b)+Math.floor(d/2),bottom:Math.round(c)+Math.floor(e/2)},this.objects=[],this.nodes=[]},e.QuadTree.prototype={split:function(){this.level++,this.nodes[0]=new e.QuadTree(this.physicsManager,this.bounds.right,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level),this.nodes[1]=new e.QuadTree(this.physicsManager,this.bounds.x,this.bounds.y,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level),this.nodes[2]=new e.QuadTree(this.physicsManager,this.bounds.x,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level),this.nodes[3]=new e.QuadTree(this.physicsManager,this.bounds.right,this.bounds.bottom,this.bounds.subWidth,this.bounds.subHeight,this.maxObjects,this.maxLevels,this.level)},insert:function(a){var b,c=0;if(null!=this.nodes[0]&&(b=this.getIndex(a),-1!==b))return this.nodes[b].insert(a),void 0;if(this.objects.push(a),this.objects.length>this.maxObjects&&this.levelthis.bounds.bottom&&(b=2):a.x>this.bounds.right&&(a.ythis.bounds.bottom&&(b=3)),b},retrieve:function(a){var b=this.objects;return a.body.quadTreeIndex=this.getIndex(a.body),a.body.quadTreeIDs.push(this.ID),this.nodes[0]&&(-1!==a.body.quadTreeIndex?b=b.concat(this.nodes[a.body.quadTreeIndex].retrieve(a)):(b=b.concat(this.nodes[0].retrieve(a)),b=b.concat(this.nodes[1].retrieve(a)),b=b.concat(this.nodes[2].retrieve(a)),b=b.concat(this.nodes[3].retrieve(a)))),b},clear:function(){this.objects=[];for(var a=0,b=this.nodes.length;b>a;a++)this.nodes[a]&&(this.nodes[a].clear(),delete this.nodes[a])}},e.Circle=function(a,b,c){a=a||0,b=b||0,c=c||0,this.x=a,this.y=b,this._diameter=c,this._radius=c>0?.5*c:0},e.Circle.prototype={circumference:function(){return 2*Math.PI*this._radius},setTo:function(a,b,c){return this.x=a,this.y=b,this._diameter=c,this._radius=.5*c,this},copyFrom:function(a){return this.setTo(a.x,a.y,a.diameter)},copyTo:function(a){return a[x]=this.x,a[y]=this.y,a[diameter]=this._diameter,a},distance:function(a,b){return"undefined"==typeof b&&(b=!1),b?e.Math.distanceRound(this.x,this.y,a.x,a.y):e.Math.distance(this.x,this.y,a.x,a.y)},clone:function(b){return"undefined"==typeof b&&(b=new e.Circle),b.setTo(a.x,a.y,a.diameter)},contains:function(a,b){return e.Circle.contains(this,a,b)},circumferencePoint:function(a,b,c){return e.Circle.circumferencePoint(this,a,b,c)},offset:function(a,b){return this.x+=a,this.y+=b,this},offsetPoint:function(a){return this.offset(a.x,a.y)},toString:function(){return"[{Phaser.Circle (x="+this.x+" y="+this.y+" diameter="+this.diameter+" radius="+this.radius+")}]"}},Object.defineProperty(e.Circle.prototype,"diameter",{get:function(){return this._diameter},set:function(a){a>0&&(this._diameter=a,this._radius=.5*a)}}),Object.defineProperty(e.Circle.prototype,"radius",{get:function(){return this._radius},set:function(a){a>0&&(this._radius=a,this._diameter=2*a)}}),Object.defineProperty(e.Circle.prototype,"left",{get:function(){return this.x-this._radius},set:function(a){a>this.x?(this._radius=0,this._diameter=0):this.radius=this.x-a}}),Object.defineProperty(e.Circle.prototype,"right",{get:function(){return this.x+this._radius},set:function(a){athis.y?(this._radius=0,this._diameter=0):this.radius=this.y-a}}),Object.defineProperty(e.Circle.prototype,"bottom",{get:function(){return this.y+this._radius},set:function(a){a0?Math.PI*this._radius*this._radius:0}}),Object.defineProperty(e.Circle.prototype,"empty",{get:function(){return 0==this._diameter},set:function(){this.setTo(0,0,0)}}),e.Circle.contains=function(a,b,c){if(b>=a.left&&b<=a.right&&c>=a.top&&c<=a.bottom){var d=(a.x-b)*(a.x-b),e=(a.y-c)*(a.y-c);return d+e<=a.radius*a.radius}return!1},e.Circle.equals=function(a,b){return a.x==b.x&&a.y==b.y&&a.diameter==b.diameter},e.Circle.intersects=function(a,b){return e.Math.distance(a.x,a.y,b.x,b.y)<=a.radius+b.radius},e.Circle.circumferencePoint=function(a,b,c,d){return"undefined"==typeof c&&(c=!1),"undefined"==typeof d&&(d=new e.Point),c===!0&&(b=e.Math.radToDeg(b)),d.x=a.x+a.radius*Math.cos(b),d.y=a.y+a.radius*Math.sin(b),d},e.Circle.intersectsRectangle=function(a,b){var c=Math.abs(a.x-b.x-b.halfWidth),d=b.halfWidth+a.radius;if(c>d)return!1;var e=Math.abs(a.y-b.y-b.halfHeight),f=b.halfHeight+a.radius;if(e>f)return!1;if(c<=b.halfWidth||e<=b.halfHeight)return!0;var g=c-b.halfWidth,h=e-b.halfHeight,i=g*g,j=h*h,k=a.radius*a.radius;return k>=i+j},e.Point=function(a,b){a=a||0,b=b||0,this.x=a,this.y=b},e.Point.prototype={copyFrom:function(a){return this.setTo(a.x,a.y)},invert:function(){return this.setTo(this.y,this.x)},setTo:function(a,b){return this.x=a,this.y=b,this},add:function(a,b){return this.x+=a,this.y+=b,this},subtract:function(a,b){return this.x-=a,this.y-=b,this},multiply:function(a,b){return this.x*=a,this.y*=b,this},divide:function(a,b){return this.x/=a,this.y/=b,this},clampX:function(a,b){return this.x=e.Math.clamp(this.x,a,b),this},clampY:function(a,b){return this.y=e.Math.clamp(this.y,a,b),this},clamp:function(a,b){return this.x=e.Math.clamp(this.x,a,b),this.y=e.Math.clamp(this.y,a,b),this},clone:function(a){return"undefined"==typeof a&&(a=new e.Point),a.setTo(this.x,this.y)},copyFrom:function(a){return this.setTo(a.x,a.y)},copyTo:function(a){return a[x]=this.x,a[y]=this.y,a},distance:function(a,b){return e.Point.distance(this,a,b)},equals:function(a){return a.x==this.x&&a.y==this.y},rotate:function(a,b,c,d,f){return e.Point.rotate(this,a,b,c,d,f)},toString:function(){return"[{Point (x="+this.x+" y="+this.y+")}]"}},e.Point.add=function(a,b,c){return"undefined"==typeof c&&(c=new e.Point),c.x=a.x+b.x,c.y=a.y+b.y,c},e.Point.subtract=function(a,b,c){return"undefined"==typeof c&&(c=new e.Point),c.x=a.x-b.x,c.y=a.y-b.y,c},e.Point.multiply=function(a,b,c){return"undefined"==typeof c&&(c=new e.Point),c.x=a.x*b.x,c.y=a.y*b.y,c},e.Point.divide=function(a,b,c){return"undefined"==typeof c&&(c=new e.Point),c.x=a.x/b.x,c.y=a.y/b.y,c},e.Point.equals=function(a,b){return a.x==b.x&&a.y==b.y},e.Point.distance=function(a,b,c){return"undefined"==typeof c&&(c=!1),c?e.Math.distanceRound(a.x,a.y,b.x,b.y):e.Math.distance(a.x,a.y,b.x,b.y)},e.Point.rotate=function(a,b,c,d,f,g){return f=f||!1,g=g||null,f&&(d=e.Math.radToDeg(d)),null===g&&(g=Math.sqrt((b-a.x)*(b-a.x)+(c-a.y)*(c-a.y))),a.setTo(b+g*Math.cos(d),c+g*Math.sin(d))},e.Rectangle=function(a,b,c,d){a=a||0,b=b||0,c=c||0,d=d||0,this.x=a,this.y=b,this.width=c,this.height=d},e.Rectangle.prototype={offset:function(a,b){return this.x+=a,this.y+=b,this},offsetPoint:function(a){return this.offset(a.x,a.y)},setTo:function(a,b,c,d){return this.x=a,this.y=b,this.width=c,this.height=d,this},floor:function(){this.x=Math.floor(this.x),this.y=Math.floor(this.y)},floorAll:function(){this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.width=Math.floor(this.width),this.height=Math.floor(this.height)},copyFrom:function(a){return this.setTo(a.x,a.y,a.width,a.height)},copyTo:function(a){return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},inflate:function(a,b){return e.Rectangle.inflate(this,a,b)},size:function(a){return e.Rectangle.size(this,a)},clone:function(a){return e.Rectangle.clone(this,a)},contains:function(a,b){return e.Rectangle.contains(this,a,b)},containsRect:function(a){return e.Rectangle.containsRect(this,a)},equals:function(a){return e.Rectangle.equals(this,a)},intersection:function(a){return e.Rectangle.intersection(this,a,output)},intersects:function(a,b){return e.Rectangle.intersects(this,a,b)},intersectsRaw:function(a,b,c,d,f){return e.Rectangle.intersectsRaw(this,a,b,c,d,f)},union:function(a,b){return e.Rectangle.union(this,a,b)},toString:function(){return"[{Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+" empty="+this.empty+")}]"}},Object.defineProperty(e.Rectangle.prototype,"halfWidth",{get:function(){return Math.round(this.width/2)}}),Object.defineProperty(e.Rectangle.prototype,"halfHeight",{get:function(){return Math.round(this.height/2)}}),Object.defineProperty(e.Rectangle.prototype,"bottom",{get:function(){return this.y+this.height},set:function(a){this.height=a<=this.y?0:this.y-a}}),Object.defineProperty(e.Rectangle.prototype,"bottomRight",{get:function(){return new e.Point(this.right,this.bottom)},set:function(a){this.right=a.x,this.bottom=a.y}}),Object.defineProperty(e.Rectangle.prototype,"left",{get:function(){return this.x},set:function(a){this.width=a>=this.right?0:this.right-a,this.x=a}}),Object.defineProperty(e.Rectangle.prototype,"right",{get:function(){return this.x+this.width},set:function(a){this.width=a<=this.x?0:this.x+a}}),Object.defineProperty(e.Rectangle.prototype,"volume",{get:function(){return this.width*this.height}}),Object.defineProperty(e.Rectangle.prototype,"perimeter",{get:function(){return 2*this.width+2*this.height}}),Object.defineProperty(e.Rectangle.prototype,"centerX",{get:function(){return this.x+this.halfWidth},set:function(a){this.x=a-this.halfWidth}}),Object.defineProperty(e.Rectangle.prototype,"centerY",{get:function(){return this.y+this.halfHeight},set:function(a){this.y=a-this.halfHeight}}),Object.defineProperty(e.Rectangle.prototype,"top",{get:function(){return this.y},set:function(a){a>=this.bottom?(this.height=0,this.y=a):this.height=this.bottom-a}}),Object.defineProperty(e.Rectangle.prototype,"topLeft",{get:function(){return new e.Point(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}}),Object.defineProperty(e.Rectangle.prototype,"empty",{get:function(){return!this.width||!this.height},set:function(){this.setTo(0,0,0,0)}}),e.Rectangle.inflate=function(a,b,c){return a.x-=b,a.width+=2*b,a.y-=c,a.height+=2*c,a},e.Rectangle.inflatePoint=function(a,b){return e.Rectangle.inflate(a,b.x,b.y)},e.Rectangle.size=function(a,b){return"undefined"==typeof b&&(b=new e.Point),b.setTo(a.width,a.height)},e.Rectangle.clone=function(a,b){return"undefined"==typeof b&&(b=new e.Rectangle),b.setTo(a.x,a.y,a.width,a.height)},e.Rectangle.contains=function(a,b,c){return b>=a.x&&b<=a.right&&c>=a.y&&c<=a.bottom},e.Rectangle.containsRaw=function(a,b,c,d,e,f){return e>=a&&a+c>=e&&f>=b&&b+d>=f},e.Rectangle.containsPoint=function(a,b){return e.Rectangle.contains(a,b.x,b.y)},e.Rectangle.containsRect=function(a,b){return a.volume>b.volume?!1:a.x>=b.x&&a.y>=b.y&&a.right<=b.right&&a.bottom<=b.bottom},e.Rectangle.equals=function(a,b){return a.x==b.x&&a.y==b.y&&a.width==b.width&&a.height==b.height},e.Rectangle.intersection=function(a,b,c){return c=c||new e.Rectangle,e.Rectangle.intersects(a,b)&&(c.x=Math.max(a.x,b.x),c.y=Math.max(a.y,b.y),c.width=Math.min(a.right,b.right)-c.x,c.height=Math.min(a.bottom,b.bottom)-c.y),c},e.Rectangle.intersects=function(a,b){return a.xa.right+f||ca.bottom+f||e1){if(a&&a==this.decodeURI(e[0]))return this.decodeURI(e[1]);b[this.decodeURI(e[0])]=this.decodeURI(e[1])}}return b},decodeURI:function(a){return decodeURIComponent(a.replace(/\+/g," "))}},e.TweenManager=function(a){this.game=a,this._tweens=[],this._add=[],this.game.onPause.add(this.pauseAll,this),this.game.onResume.add(this.resumeAll,this)},e.TweenManager.prototype={REVISION:"11dev",getAll:function(){return this._tweens},removeAll:function(){this._tweens=[]},add:function(a){this._add.push(a)},create:function(a){return new e.Tween(a,this.game)},remove:function(a){var b=this._tweens.indexOf(a);-1!==b&&(this._tweens[b].pendingDelete=!0)},update:function(){if(0===this._tweens.length&&0===this._add.length)return!1;for(var a=0,b=this._tweens.length;b>a;)this._tweens[a].update(this.game.time.now)?a++:(this._tweens.splice(a,1),b--);return this._add.length>0&&(this._tweens=this._tweens.concat(this._add),this._add.length=0),!0},pauseAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].pause()},resumeAll:function(){for(var a=this._tweens.length-1;a>=0;a--)this._tweens[a].resume()}},e.Tween=function(a,b){this._object=a,this.game=b,this._manager=this.game.tweens,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._yoyo=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=e.Easing.Linear.None,this._interpolationFunction=e.Math.linearInterpolation,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onCompleteCallback=null,this._pausedTime=0,this.pendingDelete=!1;for(var c in a)this._valuesStart[c]=parseFloat(a[c],10);this.onStart=new e.Signal,this.onComplete=new e.Signal,this.isRunning=!1},e.Tween.prototype={to:function(a,b,c,d,e,f,g){b=b||1e3,c=c||null,d=d||!1,e=e||0,f=f||0,g=g||!1;var h;return this._parent?(h=this._manager.create(this._object),this._lastChild.chain(h),this._lastChild=h):(h=this,this._parent=this,this._lastChild=this),h._repeat=f,h._duration=b,h._valuesEnd=a,null!==c&&(h._easingFunction=c),e>0&&(h._delayTime=e),h._yoyo=g,d?this.start():this},start:function(){if(null!==this.game&&null!==this._object){this._manager.add(this),this.onStart.dispatch(this._object),this.isRunning=!0,this._onStartCallbackFired=!1,this._startTime=this.game.time.now+this._delayTime;for(var a in this._valuesEnd){if(this._valuesEnd[a]instanceof Array){if(0===this._valuesEnd[a].length)continue;this._valuesEnd[a]=[this._object[a]].concat(this._valuesEnd[a])}this._valuesStart[a]=this._object[a],this._valuesStart[a]instanceof Array==!1&&(this._valuesStart[a]*=1),this._valuesStartRepeat[a]=this._valuesStart[a]||0}return this}},stop:function(){return this._manager.remove(this),this.isRunning=!1,this},delay:function(a){return this._delayTime=a,this},repeat:function(a){return this._repeat=a,this},yoyo:function(a){return this._yoyo=a,this},easing:function(a){return this._easingFunction=a,this},interpolation:function(a){return this._interpolationFunction=a,this},chain:function(){return this._chainedTweens=arguments,this},loop:function(){return this._lastChild.chain(this),this},onStartCallback:function(a){return this._onStartCallback=a,this},onUpdateCallback:function(a){return this._onUpdateCallback=a,this},onCompleteCallback:function(a){return this._onCompleteCallback=a,this},pause:function(){this._paused=!0,this._pausedTime=this.game.time.now},resume:function(){this._paused=!1,this._startTime+=this.game.time.now-this._pausedTime},update:function(a){if(this.pendingDelete)return!1;if(this._paused||a1?1:c;var d=this._easingFunction(c);for(b in this._valuesEnd){var e=this._valuesStart[b]||0,f=this._valuesEnd[b];f instanceof Array?this._object[b]=this._interpolationFunction(f,d):("string"==typeof f&&(f=e+parseFloat(f,10)),"number"==typeof f&&(this._object[b]=e+(f-e)*d))}if(null!==this._onUpdateCallback&&this._onUpdateCallback.call(this._object,d),1==c){if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(b in this._valuesStartRepeat){if("string"==typeof this._valuesEnd[b]&&(this._valuesStartRepeat[b]=this._valuesStartRepeat[b]+parseFloat(this._valuesEnd[b],10)),this._yoyo){var g=this._valuesStartRepeat[b];this._valuesStartRepeat[b]=this._valuesEnd[b],this._valuesEnd[b]=g,this._reversed=!this._reversed}this._valuesStart[b]=this._valuesStartRepeat[b]}return this._startTime=a+this._delayTime,this.onComplete.dispatch(this._object),null!==this._onCompleteCallback&&this._onCompleteCallback.call(this._object),!0}this.onComplete.dispatch(this._object),null!==this._onCompleteCallback&&this._onCompleteCallback.call(this._object);for(var h=0,i=this._chainedTweens.length;i>h;h++)this._chainedTweens[h].start(a);return!1}return!0}},e.Easing={Linear:{None:function(a){return a}},Quadratic:{In:function(a){return a*a},Out:function(a){return a*(2-a)},InOut:function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},Cubic:{In:function(a){return a*a*a},Out:function(a){return--a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},Quartic:{In:function(a){return a*a*a*a},Out:function(a){return 1- --a*a*a*a},InOut:function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},Quintic:{In:function(a){return a*a*a*a*a},Out:function(a){return--a*a*a*a*a+1},InOut:function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},Sinusoidal:{In:function(a){return 1-Math.cos(a*Math.PI/2)},Out:function(a){return Math.sin(a*Math.PI/2)},InOut:function(a){return.5*(1-Math.cos(Math.PI*a))}},Exponential:{In:function(a){return 0===a?0:Math.pow(1024,a-1)},Out:function(a){return 1===a?1:1-Math.pow(2,-10*a)},InOut:function(a){return 0===a?0:1===a?1:(a*=2)<1?.5*Math.pow(1024,a-1):.5*(-Math.pow(2,-10*(a-1))+2)}},Circular:{In:function(a){return 1-Math.sqrt(1-a*a)},Out:function(a){return Math.sqrt(1- --a*a)},InOut:function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},Elastic:{In:function(a){var b,c=.1,d=.4;return 0===a?0:1===a?1:(!c||1>c?(c=1,b=d/4):b=d*Math.asin(1/c)/(2*Math.PI),-(c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*2*Math.PI/d)))},Out:function(a){var b,c=.1,d=.4;return 0===a?0:1===a?1:(!c||1>c?(c=1,b=d/4):b=d*Math.asin(1/c)/(2*Math.PI),c*Math.pow(2,-10*a)*Math.sin((a-b)*2*Math.PI/d)+1) +},InOut:function(a){var b,c=.1,d=.4;return 0===a?0:1===a?1:(!c||1>c?(c=1,b=d/4):b=d*Math.asin(1/c)/(2*Math.PI),(a*=2)<1?-.5*c*Math.pow(2,10*(a-=1))*Math.sin((a-b)*2*Math.PI/d):.5*c*Math.pow(2,-10*(a-=1))*Math.sin((a-b)*2*Math.PI/d)+1)}},Back:{In:function(a){var b=1.70158;return a*a*((b+1)*a-b)},Out:function(a){var b=1.70158;return--a*a*((b+1)*a+b)+1},InOut:function(a){var b=2.5949095;return(a*=2)<1?.5*a*a*((b+1)*a-b):.5*((a-=2)*a*((b+1)*a+b)+2)}},Bounce:{In:function(a){return 1-e.Easing.Bounce.Out(1-a)},Out:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},InOut:function(a){return.5>a?.5*e.Easing.Bounce.In(2*a):.5*e.Easing.Bounce.Out(2*a-1)+.5}}},e.Time=function(a){this.game=a,this._started=0,this._timeLastSecond=0,this._pauseStarted=0,this.physicsElapsed=0,this.time=0,this.pausedTime=0,this.now=0,this.elapsed=0,this.fps=0,this.fpsMin=1e3,this.fpsMax=0,this.msMin=1e3,this.msMax=0,this.frames=0,this.pauseDuration=0,this.timeToCall=0,this.lastTime=0,this.game.onPause.add(this.gamePaused,this),this.game.onResume.add(this.gameResumed,this),this._justResumed=!1},e.Time.prototype={totalElapsedSeconds:function(){return.001*(this.now-this._started)},update:function(a){this.now=a,this._justResumed&&(this.time=this.now,this._justResumed=!1),this.timeToCall=this.game.math.max(0,16-(a-this.lastTime)),this.elapsed=this.now-this.time,this.msMin=this.game.math.min(this.msMin,this.elapsed),this.msMax=this.game.math.max(this.msMax,this.elapsed),this.frames++,this.now>this._timeLastSecond+1e3&&(this.fps=Math.round(1e3*this.frames/(this.now-this._timeLastSecond)),this.fpsMin=this.game.math.min(this.fpsMin,this.fps),this.fpsMax=this.game.math.max(this.fpsMax,this.fps),this._timeLastSecond=this.now,this.frames=0),this.time=this.now,this.lastTime=a+this.timeToCall,this.physicsElapsed=1*(this.elapsed/1e3),this.physicsElapsed>1&&(this.physicsElapsed=1),this.game.paused&&(this.pausedTime=this.now-this._pauseStarted)},gamePaused:function(){this._pauseStarted=this.now},gameResumed:function(){this.time=Date.now(),this.pauseDuration=this.pausedTime,this._justResumed=!0},elapsedSince:function(a){return this.now-a},elapsedSecondsSince:function(a){return.001*(this.now-a)},reset:function(){this._started=this.now}},e.AnimationManager=function(a){this.sprite=a,this.game=a.game,this.currentFrame=null,this.updateIfVisible=!0,this.isLoaded=!1,this._frameData=null,this._anims={},this._outputFrames=[]},e.AnimationManager.prototype={loadFrameData:function(a){this._frameData=a,this.frame=0,this.isLoaded=!0},add:function(a,b,c,f,g){return null==this._frameData?(console.warn("No FrameData available for Phaser.Animation "+a),void 0):(c=c||60,"undefined"==typeof f&&(f=!1),"undefined"==typeof g&&(g=b&&"number"==typeof b[0]?!0:!1),null==this.sprite.events.onAnimationStart&&(this.sprite.events.onAnimationStart=new e.Signal,this.sprite.events.onAnimationComplete=new e.Signal,this.sprite.events.onAnimationLoop=new e.Signal),this._outputFrames.length=0,this._frameData.getFrameIndexes(b,g,this._outputFrames),this._anims[a]=new e.Animation(this.game,this.sprite,a,this._frameData,this._outputFrames,c,f),this.currentAnim=this._anims[a],this.currentFrame=this.currentAnim.currentFrame,this.sprite.setTexture(d.TextureCache[this.currentFrame.uuid]),this._anims[a])},validateFrames:function(a,b){"undefined"==typeof b&&(b=!0);for(var c=0;cthis._frameData.total)return!1}else if(0==this._frameData.checkFrameName(a[c]))return!1;return!0},play:function(a,b,c,d){if(this._anims[a]){if(this.currentAnim!=this._anims[a])return this.currentAnim=this._anims[a],this.currentAnim.play(b,c,d);if(0==this.currentAnim.isPlaying)return this.currentAnim.play(b,c,d)}},stop:function(a,b){"undefined"==typeof b&&(b=!1),"string"==typeof a?this._anims[a]&&(this.currentAnim=this._anims[a],this.currentAnim.stop(b)):this.currentAnim&&this.currentAnim.stop(b)},update:function(){return this.updateIfVisible&&0==this.sprite.visible?!1:this.currentAnim&&1==this.currentAnim.update()?(this.currentFrame=this.currentAnim.currentFrame,this.sprite.currentFrame=this.currentFrame,!0):!1},refreshFrame:function(){this.sprite.currentFrame=this.currentFrame,this.sprite.setTexture(d.TextureCache[this.currentFrame.uuid])},destroy:function(){this._anims={},this._frameData=null,this._frameIndex=0,this.currentAnim=null,this.currentFrame=null}},Object.defineProperty(e.AnimationManager.prototype,"frameData",{get:function(){return this._frameData}}),Object.defineProperty(e.AnimationManager.prototype,"frameTotal",{get:function(){return this._frameData?this._frameData.total:-1}}),Object.defineProperty(e.AnimationManager.prototype,"paused",{get:function(){return this.currentAnim.isPaused},set:function(a){this.currentAnim.paused=a}}),Object.defineProperty(e.AnimationManager.prototype,"frame",{get:function(){return this.currentFrame?this._frameIndex:void 0},set:function(a){"number"==typeof a&&this._frameData&&null!==this._frameData.getFrame(a)&&(this.currentFrame=this._frameData.getFrame(a),this._frameIndex=a,this.sprite.currentFrame=this.currentFrame,this.sprite.setTexture(d.TextureCache[this.currentFrame.uuid]))}}),Object.defineProperty(e.AnimationManager.prototype,"frameName",{get:function(){return this.currentFrame?this.currentFrame.name:void 0},set:function(a){"string"==typeof a&&this._frameData&&null!==this._frameData.getFrameByName(a)?(this.currentFrame=this._frameData.getFrameByName(a),this._frameIndex=this.currentFrame.index,this.sprite.currentFrame=this.currentFrame,this.sprite.setTexture(d.TextureCache[this.currentFrame.uuid])):console.warn("Cannot set frameName: "+a)}}),e.Animation=function(a,b,c,d,e,f,g){this.game=a,this._parent=b,this._frameData=d,this.name=c,this._frames=[],this._frames=this._frames.concat(e),this.delay=1e3/f,this.looped=g,this.killOnComplete=!1,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this._pauseStartTime=0,this._frameIndex=0,this._frameDiff=0,this._frameSkip=1,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])},e.Animation.prototype={play:function(a,b,c){return"number"==typeof a&&(this.delay=1e3/a),"boolean"==typeof b&&(this.looped=b),"undefined"!=typeof c&&(this.killOnComplete=c),this.isPlaying=!0,this.isFinished=!1,this._timeLastFrame=this.game.time.now,this._timeNextFrame=this.game.time.now+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this._parent.setTexture(d.TextureCache[this.currentFrame.uuid]),this._parent.events&&this._parent.events.onAnimationStart.dispatch(this._parent,this),this},restart:function(){this.isPlaying=!0,this.isFinished=!1,this._timeLastFrame=this.game.time.now,this._timeNextFrame=this.game.time.now+this.delay,this._frameIndex=0,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex])},stop:function(a){"undefined"==typeof a&&(a=!1),this.isPlaying=!1,this.isFinished=!0,a&&(this.currentFrame=this._frameData.getFrame(this._frames[0]))},update:function(){return this.isPaused?!1:1==this.isPlaying&&this.game.time.now>=this._timeNextFrame?(this._frameSkip=1,this._frameDiff=this.game.time.now-this._timeNextFrame,this._timeLastFrame=this.game.time.now,this._frameDiff>this.delay&&(this._frameSkip=Math.floor(this._frameDiff/this.delay),this._frameDiff-=this._frameSkip*this.delay),this._timeNextFrame=this.game.time.now+(this.delay-this._frameDiff),this._frameIndex+=this._frameSkip,this._frameIndex>=this._frames.length?this.looped?(this._frameIndex%=this._frames.length,this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this.currentFrame&&this._parent.setTexture(d.TextureCache[this.currentFrame.uuid]),this._parent.events.onAnimationLoop.dispatch(this._parent,this)):this.onComplete():(this.currentFrame=this._frameData.getFrame(this._frames[this._frameIndex]),this._parent.setTexture(d.TextureCache[this.currentFrame.uuid])),!0):!1},destroy:function(){this.game=null,this._parent=null,this._frames=null,this._frameData=null,this.currentFrame=null,this.isPlaying=!1},onComplete:function(){this.isPlaying=!1,this.isFinished=!0,this._parent.events&&this._parent.events.onAnimationComplete.dispatch(this._parent,this),this.killOnComplete&&this._parent.kill()}},Object.defineProperty(e.Animation.prototype,"paused",{get:function(){return this.isPaused},set:function(a){this.isPaused=a,a?this._pauseStartTime=this.game.time.now:this.isPlaying&&(this._timeNextFrame=this.game.time.now+this.delay)}}),Object.defineProperty(e.Animation.prototype,"frameTotal",{get:function(){return this._frames.length}}),Object.defineProperty(e.Animation.prototype,"frame",{get:function(){return null!==this.currentFrame?this.currentFrame.index:this._frameIndex},set:function(a){this.currentFrame=this._frameData.getFrame(a),null!==this.currentFrame&&(this._frameIndex=a,this._parent.setTexture(d.TextureCache[this.currentFrame.uuid]))}}),e.Animation.generateFrameNames=function(a,b,c,d,f){"undefined"==typeof d&&(d="");var g=[],h="";if(c>b)for(var i=b;c>=i;i++)h="number"==typeof f?e.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+d,g.push(h);else for(var i=b;i>=c;i--)h="number"==typeof f?e.Utils.pad(i.toString(),f,"0",1):i.toString(),h=a+h+d,g.push(h);return g},e.Frame=function(a,b,c,d,f,g,h){this.index=a,this.x=b,this.y=c,this.width=d,this.height=f,this.name=g,this.uuid=h,this.centerX=Math.floor(d/2),this.centerY=Math.floor(f/2),this.distance=e.Math.distance(0,0,d,f),this.rotated=!1,this.rotationDirection="cw",this.trimmed=!1,this.sourceSizeW=d,this.sourceSizeH=f,this.spriteSourceSizeX=0,this.spriteSourceSizeY=0,this.spriteSourceSizeW=0,this.spriteSourceSizeH=0},e.Frame.prototype={setTrim:function(a,b,c,d,e,f,g){this.trimmed=a,a&&(this.width=b,this.height=c,this.sourceSizeW=b,this.sourceSizeH=c,this.centerX=Math.floor(b/2),this.centerY=Math.floor(c/2),this.spriteSourceSizeX=d,this.spriteSourceSizeY=e,this.spriteSourceSizeW=f,this.spriteSourceSizeH=g)}},e.FrameData=function(){this._frames=[],this._frameNames=[]},e.FrameData.prototype={addFrame:function(a){return a.index=this._frames.length,this._frames.push(a),""!==a.name&&(this._frameNames[a.name]=a.index),a},getFrame:function(a){return this._frames.length>a?this._frames[a]:null},getFrameByName:function(a){return"number"==typeof this._frameNames[a]?this._frames[this._frameNames[a]]:null},checkFrameName:function(a){return null==this._frameNames[a]?!1:!0},getFrameRange:function(a,b,c){"undefined"==typeof c&&(c=[]);for(var d=a;b>=d;d++)c.push(this._frames[d]);return c},getFrames:function(a,b,c){if("undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=[]),"undefined"==typeof a||0==a.length)for(var d=0;dd;d++)b?c.push(this.getFrame(a[d])):c.push(this.getFrameByName(a[d]));return c},getFrameIndexes:function(a,b,c){if("undefined"==typeof b&&(b=!0),"undefined"==typeof c&&(c=[]),"undefined"==typeof a||0==a.length)for(var d=0,e=this._frames.length;e>d;d++)c.push(this._frames[d].index);else for(var d=0,e=a.length;e>d;d++)b?c.push(a[d]):this.getFrameByName(a[d])&&c.push(this.getFrameByName(a[d]).index);return c}},Object.defineProperty(e.FrameData.prototype,"total",{get:function(){return this._frames.length}}),e.AnimationParser={spriteSheet:function(a,b,c,f,g){var h=a.cache.getImage(b);if(null==h)return null;var i=h.width,j=h.height;0>=c&&(c=Math.floor(-i/Math.min(-1,c))),0>=f&&(f=Math.floor(-j/Math.min(-1,f)));var k=Math.round(i/c),l=Math.round(j/f),m=k*l;if(-1!==g&&(m=g),0==i||0==j||c>i||f>j||0===m)return console.warn("Phaser.AnimationParser.spriteSheet: width/height zero or width/height < given frameWidth/frameHeight"),null;for(var n=new e.FrameData,o=0,p=0,q=0;m>q;q++){var r=a.rnd.uuid();n.addFrame(new e.Frame(q,o,p,c,f,"",r)),d.TextureCache[r]=new d.Texture(d.BaseTextureCache[b],{x:o,y:p,width:c,height:f}),o+=c,o===i&&(o=0,p+=f)}return n},JSONData:function(a,b,c){if(!b.frames)return console.warn("Phaser.AnimationParser.JSONData: Invalid Texture Atlas JSON given, missing 'frames' array"),console.log(b),void 0;for(var f,g=new e.FrameData,h=b.frames,i=0;i tag"),void 0;for(var f,g=new e.FrameData,h=b.getElementsByTagName("SubTexture"),i=0;i0?(this._progressChunk=100/this._keys.length,this.loadFile()):(this.progress=100,this.hasLoaded=!0,this.onLoadComplete.dispatch()))},loadFile:function(){var a=this._fileList[this._keys.shift()],b=this;switch(a.type){case"image":case"spritesheet":case"textureatlas":case"bitmapfont":case"tileset":a.data=new Image,a.data.name=a.key,a.data.onload=function(){return b.fileComplete(a.key)},a.data.onerror=function(){return b.fileError(a.key)},a.data.crossOrigin=this.crossOrigin,a.data.src=this.baseURL+a.url;break;case"audio":a.url=this.getAudioURL(a.url),null!==a.url?this.game.sound.usingWebAudio?(this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="arraybuffer",this._xhr.onload=function(){return b.fileComplete(a.key)},this._xhr.onerror=function(){return b.fileError(a.key)},this._xhr.send()):this.game.sound.usingAudioTag&&(this.game.sound.touchLocked?(a.data=new Audio,a.data.name=a.key,a.data.preload="auto",a.data.src=this.baseURL+a.url,this.fileComplete(a.key)):(a.data=new Audio,a.data.name=a.key,a.data.onerror=function(){return b.fileError(a.key)},a.data.preload="auto",a.data.src=this.baseURL+a.url,a.data.addEventListener("canplaythrough",e.GAMES[this.game.id].load.fileComplete(a.key),!1),a.data.load())):this.fileError(a.key);break;case"tilemap":this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="text",a.format==e.Tilemap.TILED_JSON?this._xhr.onload=function(){return b.jsonLoadComplete(a.key)}:a.format==e.Tilemap.CSV&&(this._xhr.onload=function(){return b.csvLoadComplete(a.key)}),this._xhr.onerror=function(){return b.dataLoadError(a.key)},this._xhr.send();break;case"text":this._xhr.open("GET",this.baseURL+a.url,!0),this._xhr.responseType="text",this._xhr.onload=function(){return b.fileComplete(a.key)},this._xhr.onerror=function(){return b.fileError(a.key)},this._xhr.send()}},getAudioURL:function(a){for(var b,c=0;c100&&(this.progress=100),null!==this.preloadSprite&&(0==this.preloadSprite.direction?this.preloadSprite.crop.width=Math.floor(this.preloadSprite.width/100*this.progress):this.preloadSprite.crop.height=Math.floor(this.preloadSprite.height/100*this.progress),this.preloadSprite.sprite.crop=this.preloadSprite.crop),this.onFileComplete.dispatch(this.progress,a,b,this.queueSize-this._keys.length,this.queueSize),this._keys.length>0?this.loadFile():(this.hasLoaded=!0,this.isLoading=!1,this.removeAll(),this.onLoadComplete.dispatch())}},e.LoaderParser={bitmapFont:function(a,b,c){if(!b.getElementsByTagName("font"))return console.warn("Phaser.LoaderParser.bitmapFont: Invalid XML given, missing tag"),void 0;var e=d.TextureCache[c],f={},g=b.getElementsByTagName("info")[0],h=b.getElementsByTagName("common")[0];f.font=g.attributes.getNamedItem("face").nodeValue,f.size=parseInt(g.attributes.getNamedItem("size").nodeValue,10),f.lineHeight=parseInt(h.attributes.getNamedItem("lineHeight").nodeValue,10),f.chars={};for(var i=b.getElementsByTagName("char"),j=0;j=this.durationMS&&(this.usingWebAudio?this.loop?(this.onLoop.dispatch(this),""==this.currentMarker?(this.currentTime=0,this.startTime=this.game.time.now):this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop():this.loop?(this.onLoop.dispatch(this),this.play(this.currentMarker,0,this.volume,!0,!0)):this.stop()))},play:function(a,b,c,d,e){if(a=a||"",b=b||0,c=c||1,"undefined"==typeof d&&(d=!1),"undefined"==typeof e&&(e=!0),1!=this.isPlaying||0!=e||0!=this.override){if(this.isPlaying&&this.override&&(this.usingWebAudio?"undefined"==typeof this._sound.stop?this._sound.noteOff(0):this._sound.stop(0):this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0)),this.currentMarker=a,""!==a){if(!this.markers[a])return console.warn("Phaser.Sound.play: audio marker "+a+" doesn't exist"),void 0;this.position=this.markers[a].start,this.volume=this.markers[a].volume,this.loop=this.markers[a].loop,this.duration=this.markers[a].duration,this.durationMS=this.markers[a].durationMS,this._tempMarker=a,this._tempPosition=this.position,this._tempVolume=this.volume,this._tempLoop=this.loop}else this.position=b,this.volume=c,this.loop=d,this.duration=0,this.durationMS=0,this._tempMarker=a,this._tempPosition=b,this._tempVolume=c,this._tempLoop=d;this.usingWebAudio?this.game.cache.isSoundDecoded(this.key)?(null==this._buffer&&(this._buffer=this.game.cache.getSoundData(this.key)),this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this._sound.connect(this.gainNode),this.totalDuration=this._sound.buffer.duration,0==this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this.loop&&""==a&&(this._sound.loop=!0),"undefined"==typeof this._sound.start?this._sound.noteGrainOn(0,this.position,this.duration):this._sound.start(0,this.position,this.duration),this.isPlaying=!0,this.startTime=this.game.time.now,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):(this.pendingPlayback=!0,this.game.cache.getSound(this.key)&&0==this.game.cache.getSound(this.key).isDecoding&&this.game.sound.decode(this.key,this)):this.game.cache.getSound(this.key)&&this.game.cache.getSound(this.key).locked?(this.game.cache.reloadSound(this.key),this.pendingPlayback=!0):this._sound&&4==this._sound.readyState?(this._sound.play(),this.totalDuration=this._sound.duration,0==this.duration&&(this.duration=this.totalDuration,this.durationMS=1e3*this.totalDuration),this._sound.currentTime=this.position,this._sound.muted=this._muted,this._sound.volume=this._muted?0:this._volume,this.isPlaying=!0,this.startTime=this.game.time.now,this.currentTime=0,this.stopTime=this.startTime+this.durationMS,this.onPlay.dispatch(this)):this.pendingPlayback=!0}},restart:function(a,b,c,d){a=a||"",b=b||0,c=c||1,"undefined"==typeof d&&(d=!1),this.play(a,b,c,d,!0)},pause:function(){this.isPlaying&&this._sound&&(this.stop(),this.isPlaying=!1,this.paused=!0,this.pausedPosition=this.currentTime,this.pausedTime=this.game.time.now,this.onPause.dispatch(this))},resume:function(){if(this.paused&&this._sound){if(this.usingWebAudio){var a=this.position+this.pausedPosition/1e3;this._sound=this.context.createBufferSource(),this._sound.buffer=this._buffer,this._sound.connect(this.gainNode),"undefined"==typeof this._sound.start?this._sound.noteGrainOn(0,a,this.duration):this._sound.start(0,a,this.duration)}else this._sound.play();this.isPlaying=!0,this.paused=!1,this.startTime+=this.game.time.now-this.pausedTime,this.onResume.dispatch(this)}},stop:function(){this.isPlaying&&this._sound&&(this.usingWebAudio?"undefined"==typeof this._sound.stop?this._sound.noteOff(0):this._sound.stop(0):this.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0)),this.isPlaying=!1;var a=this.currentMarker;this.currentMarker="",this.onStop.dispatch(this,a)}},Object.defineProperty(e.Sound.prototype,"isDecoding",{get:function(){return this.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(e.Sound.prototype,"isDecoded",{get:function(){return this.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(e.Sound.prototype,"mute",{get:function(){return this._muted},set:function(a){a=a||null,a?(this._muted=!0,this.usingWebAudio?(this._muteVolume=this.gainNode.gain.value,this.gainNode.gain.value=0):this.usingAudioTag&&this._sound&&(this._muteVolume=this._sound.volume,this._sound.volume=0)):(this._muted=!1,this.usingWebAudio?this.gainNode.gain.value=this._muteVolume:this.usingAudioTag&&this._sound&&(this._sound.volume=this._muteVolume)),this.onMute.dispatch(this)}}),Object.defineProperty(e.Sound.prototype,"volume",{get:function(){return this._volume},set:function(a){this.usingWebAudio?(this._volume=a,this.gainNode.gain.value=a):this.usingAudioTag&&this._sound&&a>=0&&1>=a&&(this._volume=a,this._sound.volume=a)}}),e.SoundManager=function(a){this.game=a,this.onSoundDecode=new e.Signal,this._muted=!1,this._unlockSource=null,this._volume=1,this._sounds=[],this.context=null,this.usingWebAudio=!0,this.usingAudioTag=!1,this.noAudio=!1,this.touchLocked=!1,this.channels=32},e.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&0==this.game.device.webAudio&&(this.channels=1),this.game.device.iOS||window.PhaserGlobal&&window.PhaserGlobal.fakeiOSTouchLock?(this.game.input.touch.callbackContext=this,this.game.input.touch.touchStartCallback=this.unlock,this.game.input.mouse.callbackContext=this,this.game.input.mouse.mouseDownCallback=this.unlock,this.touchLocked=!0):this.touchLocked=!1,window.PhaserGlobal){if(1==window.PhaserGlobal.disableAudio)return this.usingWebAudio=!1,this.noAudio=!0,void 0;if(1==window.PhaserGlobal.disableWebAudio)return this.usingWebAudio=!1,this.usingAudioTag=!0,this.noAudio=!1,void 0}window.AudioContext?this.context=new window.AudioContext:window.webkitAudioContext?this.context=new window.webkitAudioContext:window.Audio?(this.usingWebAudio=!1,this.usingAudioTag=!0):(this.usingWebAudio=!1,this.noAudio=!0),null!==this.context&&(this.masterGain="undefined"==typeof this.context.createGain?this.context.createGainNode():this.context.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this.context.destination))},unlock:function(){if(0!=this.touchLocked)if(0==this.game.device.webAudio||window.PhaserGlobal&&1==window.PhaserGlobal.disableWebAudio)this.touchLocked=!1,this._unlockSource=null,this.game.input.touch.callbackContext=null,this.game.input.touch.touchStartCallback=null,this.game.input.mouse.callbackContext=null,this.game.input.mouse.mouseDownCallback=null;else{var a=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=a,this._unlockSource.connect(this.context.destination),this._unlockSource.noteOn(0)}},stopAll:function(){for(var a=0;a255)return e.Color.getColor(255,255,255);if(a>b)return e.Color.getColor(255,255,255);var d=a+Math.round(Math.random()*(b-a)),f=a+Math.round(Math.random()*(b-a)),g=a+Math.round(Math.random()*(b-a));return e.Color.getColor32(c,d,f,g)},getRGB:function(a){return{alpha:a>>>24,red:255&a>>16,green:255&a>>8,blue:255&a}},getWebRGB:function(a){var b=(a>>>24)/255,c=255&a>>16,d=255&a>>8,e=255&a;return"rgba("+c.toString()+","+d.toString()+","+e.toString()+","+b.toString()+")"},getAlpha:function(a){return a>>>24},getAlphaFloat:function(a){return(a>>>24)/255},getRed:function(a){return 255&a>>16},getGreen:function(a){return 255&a>>8},getBlue:function(a){return 255&a}},e.Physics={},e.Physics.Arcade=function(a){this.game=a,this.gravity=new e.Point,this.bounds=new e.Rectangle(0,0,a.world.width,a.world.height),this.maxObjects=10,this.maxLevels=4,this.OVERLAP_BIAS=4,this.quadTree=new e.QuadTree(this,this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels),this.quadTreeID=0,this._bounds1=new e.Rectangle,this._bounds2=new e.Rectangle,this._overlap=0,this._maxOverlap=0,this._velocity1=0,this._velocity2=0,this._newVelocity1=0,this._newVelocity2=0,this._average=0,this._mapData=[],this._mapTiles=0,this._result=!1,this._total=0,this._angle=0,this._dx=0,this._dy=0},e.Physics.Arcade.prototype={updateMotion:function(a){this._velocityDelta=(this.computeVelocity(0,a,a.angularVelocity,a.angularAcceleration,a.angularDrag,a.maxAngular)-a.angularVelocity)/2,a.angularVelocity+=this._velocityDelta,a.rotation+=a.angularVelocity*this.game.time.physicsElapsed,a.angularVelocity+=this._velocityDelta,this._velocityDelta=(this.computeVelocity(1,a,a.velocity.x,a.acceleration.x,a.drag.x,a.maxVelocity.x)-a.velocity.x)/2,a.velocity.x+=this._velocityDelta,a.x+=a.velocity.x*this.game.time.physicsElapsed,a.velocity.x+=this._velocityDelta,this._velocityDelta=(this.computeVelocity(2,a,a.velocity.y,a.acceleration.y,a.drag.y,a.maxVelocity.y)-a.velocity.y)/2,a.velocity.y+=this._velocityDelta,a.y+=a.velocity.y*this.game.time.physicsElapsed,a.velocity.y+=this._velocityDelta},computeVelocity:function(a,b,c,d,e,f){return f=f||1e4,1==a&&b.allowGravity?c+=this.gravity.x+b.gravity.x:2==a&&b.allowGravity&&(c+=this.gravity.y+b.gravity.y),0!==d?c+=d*this.game.time.physicsElapsed:0!==e&&(this._drag=e*this.game.time.physicsElapsed,c-this._drag>0?c-=this._drag:c+this._drag<0?c+=this._drag:c=0),c>f?c=f:-f>c&&(c=-f),c},preUpdate:function(){this.quadTree.clear(),this.quadTreeID=0,this.quadTree=new e.QuadTree(this,this.game.world.bounds.x,this.game.world.bounds.y,this.game.world.bounds.width,this.game.world.bounds.height,this.maxObjects,this.maxLevels)},postUpdate:function(){this.quadTree.clear()},overlap:function(a,b){return a&&b&&a.exists&&b.exists?e.Rectangle.intersects(a.body,b.body):!1},collide:function(a,b,c,d,f){return c=c||null,d=d||null,f=f||c,this._result=!1,this._total=0,a&&b&&a.exists&&b.exists&&(a.type==e.SPRITE?b.type==e.SPRITE?this.collideSpriteVsSprite(a,b,c,d,f):b.type==e.GROUP||b.type==e.EMITTER?this.collideSpriteVsGroup(a,b,c,d,f):b.type==e.TILEMAPLAYER&&this.collideSpriteVsTilemapLayer(a,b,c,d,f):a.type==e.GROUP?b.type==e.SPRITE?this.collideSpriteVsGroup(b,a,c,d,f):b.type==e.GROUP||b.type==e.EMITTER?this.collideGroupVsGroup(a,b,c,d,f):b.type==e.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,c,d,f):a.type==e.TILEMAPLAYER?b.type==e.SPRITE?this.collideSpriteVsTilemapLayer(b,a,c,d,f):(b.type==e.GROUP||b.type==e.EMITTER)&&this.collideGroupVsTilemapLayer(b,a,c,d,f):a.type==e.EMITTER&&(b.type==e.SPRITE?this.collideSpriteVsGroup(b,a,c,d,f):b.type==e.GROUP||b.type==e.EMITTER?this.collideGroupVsGroup(a,b,c,d,f):b.type==e.TILEMAPLAYER&&this.collideGroupVsTilemapLayer(a,b,c,d,f))),this._total>0},collideSpriteVsTilemapLayer:function(a,b,c,d,e){if(this._mapData=b.getTiles(a.body.x,a.body.y,a.body.width,a.body.height,!0),this._mapData.length>1)for(var f=1;ff;f++)this._potentials[f].sprite.group==b&&(this.separate(a.body,this._potentials[f]),this._result&&d&&(this._result=d.call(e,a,this._potentials[f].sprite)),this._result&&(this._total++,c&&c.call(e,a,this._potentials[f].sprite)))}},collideGroupVsGroup:function(a,b,c,d,e){if(0!=a.length&&0!=b.length&&a._container.first._iNext){var f=a._container.first._iNext;do f.exists&&this.collideSpriteVsGroup(f,b,c,d,e),f=f._iNext;while(f!=a._container.last._iNext)}},separate:function(a,b){this._result=this.separateX(a,b)||this.separateY(a,b)},separateX:function(a,b){return a.immovable&&b.immovable?!1:(this._overlap=0,e.Rectangle.intersects(a,b)&&(this._maxOverlap=a.deltaAbsX()+b.deltaAbsX()+this.OVERLAP_BIAS,0==a.deltaX()&&0==b.deltaX()?(a.embedded=!0,b.embedded=!0):a.deltaX()>b.deltaX()?(this._overlap=a.x+a.width-b.x,this._overlap>this._maxOverlap||0==a.allowCollision.right||0==b.allowCollision.left?this._overlap=0:(a.touching.right=!0,b.touching.left=!0)):a.deltaX()this._maxOverlap||0==a.allowCollision.left||0==b.allowCollision.right?this._overlap=0:(a.touching.left=!0,b.touching.right=!0)),0!=this._overlap)?(a.overlapX=this._overlap,b.overlapX=this._overlap,a.customSeparateX||b.customSeparateX?!0:(this._velocity1=a.velocity.x,this._velocity2=b.velocity.x,a.immovable||b.immovable?a.immovable?b.immovable||(b.x+=this._overlap,b.velocity.x=this._velocity1-this._velocity2*b.bounce.x):(a.x=a.x-this._overlap,a.velocity.x=this._velocity2-this._velocity1*a.bounce.x):(this._overlap*=.5,a.x=a.x-this._overlap,b.x+=this._overlap,this._newVelocity1=Math.sqrt(this._velocity2*this._velocity2*b.mass/a.mass)*(this._velocity2>0?1:-1),this._newVelocity2=Math.sqrt(this._velocity1*this._velocity1*a.mass/b.mass)*(this._velocity1>0?1:-1),this._average=.5*(this._newVelocity1+this._newVelocity2),this._newVelocity1-=this._average,this._newVelocity2-=this._average,a.velocity.x=this._average+this._newVelocity1*a.bounce.x,b.velocity.x=this._average+this._newVelocity2*b.bounce.x),!0)):!1)},separateY:function(a,b){return a.immovable&&b.immovable?!1:(this._overlap=0,e.Rectangle.intersects(a,b)&&(this._maxOverlap=a.deltaAbsY()+b.deltaAbsY()+this.OVERLAP_BIAS,0==a.deltaY()&&0==b.deltaY()?(a.embedded=!0,b.embedded=!0):a.deltaY()>b.deltaY()?(this._overlap=a.y+a.height-b.y,this._overlap>this._maxOverlap||0==a.allowCollision.down||0==b.allowCollision.up?this._overlap=0:(a.touching.down=!0,b.touching.up=!0)):a.deltaY()this._maxOverlap||0==a.allowCollision.up||0==b.allowCollision.down?this._overlap=0:(a.touching.up=!0,b.touching.down=!0)),0!=this._overlap)?(a.overlapY=this._overlap,b.overlapY=this._overlap,a.customSeparateY||b.customSeparateY?!0:(this._velocity1=a.velocity.y,this._velocity2=b.velocity.y,a.immovable||b.immovable?a.immovable?b.immovable||(b.y+=this._overlap,b.velocity.y=this._velocity1-this._velocity2*b.bounce.y,a.sprite.active&&a.moves&&a.deltaY()b.deltaY()&&(a.x+=b.x-b.lastX)):(this._overlap*=.5,a.y=a.y-this._overlap,b.y+=this._overlap,this._newVelocity1=Math.sqrt(this._velocity2*this._velocity2*b.mass/a.mass)*(this._velocity2>0?1:-1),this._newVelocity2=Math.sqrt(this._velocity1*this._velocity1*a.mass/b.mass)*(this._velocity1>0?1:-1),this._average=.5*(this._newVelocity1+this._newVelocity2),this._newVelocity1-=this._average,this._newVelocity2-=this._average,a.velocity.y=this._average+this._newVelocity1*a.bounce.y,b.velocity.y=this._average+this._newVelocity2*b.bounce.y),!0)):!1)},separateTile:function(a,b){this._result=this.separateTileX(a,b,!0)||this.separateTileY(a,b,!0)},separateTileX:function(a,b,c){return a.immovable||0==a.deltaX()||0==e.Rectangle.intersects(a.hullX,b)?!1:(this._overlap=0,this._maxOverlap=a.deltaAbsX()+this.OVERLAP_BIAS,a.deltaX()<0?(this._overlap=b.right-a.hullX.x,this._overlap>this._maxOverlap||0==a.allowCollision.left||0==b.tile.collideRight?this._overlap=0:a.touching.left=!0):(this._overlap=a.hullX.right-b.x,this._overlap>this._maxOverlap||0==a.allowCollision.right||0==b.tile.collideLeft?this._overlap=0:a.touching.right=!0),0!=this._overlap?(c&&(a.x=a.deltaX()<0?a.x+this._overlap:a.x-this._overlap,a.velocity.x=0==a.bounce.x?0:-a.velocity.x*a.bounce.x,a.updateHulls()),!0):!1)},separateTileY:function(a,b,c){return a.immovable||0==a.deltaY()||0==e.Rectangle.intersects(a.hullY,b)?!1:(this._overlap=0,this._maxOverlap=a.deltaAbsY()+this.OVERLAP_BIAS,a.deltaY()<0?(this._overlap=b.bottom-a.hullY.y,this._overlap>this._maxOverlap||0==a.allowCollision.up||0==b.tile.collideDown?this._overlap=0:a.touching.up=!0):(this._overlap=a.hullY.bottom-b.y,this._overlap>this._maxOverlap||0==a.allowCollision.down||0==b.tile.collideUp?this._overlap=0:a.touching.down=!0),0!=this._overlap?(c&&(a.y=a.deltaY()<0?a.y+this._overlap:a.y-this._overlap,a.velocity.y=0==a.bounce.y?0:-a.velocity.y*a.bounce.y,a.updateHulls()),!0):!1)},moveToObject:function(a,b,c,d){return c=c||60,d=d||0,this._angle=Math.atan2(b.y-a.y,b.x-a.x),d>0&&(c=this.distanceBetween(a,b)/(d/1e3)),a.body.velocity.x=Math.cos(this._angle)*c,a.body.velocity.y=Math.sin(this._angle)*c,this._angle},moveToPointer:function(a,b,c,d){return b=b||60,c=c||this.game.input.activePointer,d=d||0,this._angle=this.angleToPointer(a,c),d>0&&(b=this.distanceToPointer(a,c)/(d/1e3)),a.body.velocity.x=Math.cos(this._angle)*b,a.body.velocity.y=Math.sin(this._angle)*b,this._angle},moveToXY:function(a,b,c,d,e){return d=d||60,e=e||0,this._angle=Math.atan2(c-a.y,b-a.x),e>0&&(d=this.distanceToXY(a,b,c)/(e/1e3)),a.body.velocity.x=Math.cos(this._angle)*d,a.body.velocity.y=Math.sin(this._angle)*d,this._angle +},velocityFromAngle:function(a,b,c){return b=b||60,c=c||new e.Point,c.setTo(Math.cos(this.game.math.degToRad(a))*b,Math.sin(this.game.math.degToRad(a))*b)},velocityFromRotation:function(a,b,c){return b=b||60,c=c||new e.Point,c.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerationFromRotation:function(a,b,c){return b=b||60,c=c||new e.Point,c.setTo(Math.cos(a)*b,Math.sin(a)*b)},accelerateToObject:function(a,b,c,d,e){return"undefined"==typeof c&&(c=60),"undefined"==typeof d&&(d=1e3),"undefined"==typeof e&&(e=1e3),this._angle=this.angleBetween(a,b),a.body.acceleration.setTo(Math.cos(this._angle)*c,Math.sin(this._angle)*c),a.body.maxVelocity.setTo(d,e),this._angle},accelerateToPointer:function(a,b,c,d,e){return"undefined"==typeof c&&(c=60),"undefined"==typeof b&&(b=this.game.input.activePointer),"undefined"==typeof d&&(d=1e3),"undefined"==typeof e&&(e=1e3),this._angle=this.angleToPointer(a,b),a.body.acceleration.setTo(Math.cos(this._angle)*c,Math.sin(this._angle)*c),a.body.maxVelocity.setTo(d,e),this._angle},accelerateToXY:function(a,b,c,d,e,f){return"undefined"==typeof d&&(d=60),"undefined"==typeof e&&(e=1e3),"undefined"==typeof f&&(f=1e3),this._angle=this.angleToXY(a,b,c),a.body.acceleration.setTo(Math.cos(this._angle)*d,Math.sin(this._angle)*d),a.body.maxVelocity.setTo(e,f),this._angle},distanceBetween:function(a,b){return this._dx=a.x-b.x,this._dy=a.y-b.y,Math.sqrt(this._dx*this._dx+this._dy*this._dy)},distanceToXY:function(a,b,c){return this._dx=a.x-b,this._dy=a.y-c,Math.sqrt(this._dx*this._dx+this._dy*this._dy)},distanceToPointer:function(a,b){return b=b||this.game.input.activePointer,this._dx=a.worldX-b.x,this._dy=a.worldY-b.y,Math.sqrt(this._dx*this._dx+this._dy*this._dy)},angleBetween:function(a,b){return this._dx=b.x-a.x,this._dy=b.y-a.y,Math.atan2(this._dy,this._dx)},angleToXY:function(a,b,c){return this._dx=b-a.x,this._dy=c-a.y,Math.atan2(this._dy,this._dx)},angleToPointer:function(a,b){return b=b||this.game.input.activePointer,this._dx=b.worldX-a.x,this._dy=b.worldY-a.y,Math.atan2(this._dy,this._dx)}},e.Physics.Arcade.Body=function(a){this.sprite=a,this.game=a.game,this.offset=new e.Point,this.x=a.x,this.y=a.y,this.preX=a.x,this.preY=a.y,this.preRotation=a.angle,this.screenX=a.x,this.screenY=a.y,this.sourceWidth=a.currentFrame.sourceSizeW,this.sourceHeight=a.currentFrame.sourceSizeH,this.width=a.currentFrame.sourceSizeW,this.height=a.currentFrame.sourceSizeH,this.halfWidth=Math.floor(a.currentFrame.sourceSizeW/2),this.halfHeight=Math.floor(a.currentFrame.sourceSizeH/2),this._sx=a.scale.x,this._sy=a.scale.y,this.velocity=new e.Point,this.acceleration=new e.Point,this.drag=new e.Point,this.gravity=new e.Point,this.bounce=new e.Point,this.maxVelocity=new e.Point(1e4,1e4),this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.skipQuadTree=!1,this.quadTreeIDs=[],this.quadTreeIndex=-1,this.allowCollision={none:!1,any:!0,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.facing=e.NONE,this.immovable=!1,this.moves=!0,this.rotation=0,this.allowRotation=!0,this.allowGravity=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.hullX=new e.Rectangle,this.hullY=new e.Rectangle,this.embedded=!1,this.collideWorldBounds=!1},e.Physics.Arcade.Body.prototype={updateBounds:function(a,b,c,d){(c!=this._sx||d!=this._sy)&&(this.width=this.sourceWidth*c,this.height=this.sourceHeight*d,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this._sx=c,this._sy=d)},preUpdate:function(){this.wasTouching.none=this.touching.none,this.wasTouching.up=this.touching.up,this.wasTouching.down=this.touching.down,this.wasTouching.left=this.touching.left,this.wasTouching.right=this.touching.right,this.touching.none=!0,this.touching.up=!1,this.touching.down=!1,this.touching.left=!1,this.touching.right=!1,this.embedded=!1,this.screenX=this.sprite.worldTransform[2]-this.sprite.anchor.x*this.width+this.offset.x,this.screenY=this.sprite.worldTransform[5]-this.sprite.anchor.y*this.height+this.offset.y,this.preX=this.sprite.worldTransform[2]-this.sprite.anchor.x*this.width+this.offset.x,this.preY=this.sprite.worldTransform[5]-this.sprite.anchor.y*this.height+this.offset.y,this.preRotation=this.sprite.angle,this.x=this.preX,this.y=this.preY,this.rotation=this.preRotation,this.moves&&(this.game.physics.updateMotion(this),this.collideWorldBounds&&this.checkWorldBounds(),this.updateHulls()),0==this.skipQuadTree&&0==this.allowCollision.none&&this.sprite.visible&&this.sprite.alive&&(this.quadTreeIDs=[],this.quadTreeIndex=-1,this.game.physics.quadTree.insert(this))},postUpdate:function(){0==this.deltaX()&&0==this.deltaY()&&0==this.sprite.deltaX()&&0==this.sprite.deltaY(),this.deltaX()<0?this.facing=e.LEFT:this.deltaX()>0&&(this.facing=e.RIGHT),this.deltaY()<0?this.facing=e.UP:this.deltaY()>0&&(this.facing=e.DOWN),this.sprite.x+=this.deltaX(),this.sprite.y+=this.deltaY(),this.allowRotation&&(this.sprite.angle+=this.deltaZ())},updateHulls:function(){this.hullX.setTo(this.x,this.preY,this.width,this.height),this.hullY.setTo(this.preX,this.y,this.width,this.height)},checkWorldBounds:function(){this.xthis.game.world.bounds.right&&(this.x=this.game.world.bounds.right-this.width,this.velocity.x*=-this.bounce.x),this.ythis.game.world.bounds.bottom&&(this.y=this.game.world.bounds.bottom-this.height,this.velocity.y*=-this.bounce.y)},setSize:function(a,b,c,d){c=c||this.offset.x,d=d||this.offset.y,this.sourceWidth=a,this.sourceHeight=b,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.setTo(c,d)},reset:function(){this.velocity.setTo(0,0),this.acceleration.setTo(0,0),this.angularVelocity=0,this.angularAcceleration=0,this.preX=this.sprite.worldTransform[2]-this.sprite.anchor.x*this.width+this.offset.x,this.preY=this.sprite.worldTransform[5]-this.sprite.anchor.y*this.height+this.offset.y,this.preRotation=this.sprite.angle,this.x=this.preX,this.y=this.preY,this.rotation=this.preRotation},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.x-this.preX},deltaY:function(){return this.y-this.preY},deltaZ:function(){return this.rotation-this.preRotation}},Object.defineProperty(e.Physics.Arcade.Body.prototype,"bottom",{get:function(){return this.y+this.height},set:function(a){this.height=a<=this.y?0:this.y-a}}),Object.defineProperty(e.Physics.Arcade.Body.prototype,"right",{get:function(){return this.x+this.width},set:function(a){this.width=a<=this.x?0:this.x+a}}),e.Particles=function(){this.emitters={},this.ID=0},e.Particles.prototype={add:function(a){return this.emitters[a.name]=a,a},remove:function(a){delete this.emitters[a.name]},update:function(){for(var a in this.emitters)this.emitters[a].exists&&this.emitters[a].update()}},e.Particles.Arcade={},e.Particles.Arcade.Emitter=function(a,b,c,d){this.maxParticles=d||50,e.Group.call(this,a),this.name="emitter"+this.game.particles.ID++,this.type=e.EMITTER,this.x=0,this.y=0,this.width=1,this.height=1,this.minParticleSpeed=new e.Point(-100,-100),this.maxParticleSpeed=new e.Point(100,100),this.minParticleScale=1,this.maxParticleScale=1,this.minRotation=-360,this.maxRotation=360,this.gravity=2,this.particleClass=null,this.particleDrag=new e.Point,this.angularDrag=0,this.frequency=100,this.lifespan=2e3,this.bounce=new e.Point,this._quantity=0,this._timer=0,this._counter=0,this._explode=!0,this.on=!1,this.exists=!0,this.emitX=b,this.emitY=c},e.Particles.Arcade.Emitter.prototype=Object.create(e.Group.prototype),e.Particles.Arcade.Emitter.prototype.constructor=e.Particles.Arcade.Emitter,e.Particles.Arcade.Emitter.prototype.update=function(){if(this.on)if(this._explode){this._counter=0;do this.emitParticle(),this._counter++;while(this._counter=this._timer&&(this.emitParticle(),this._counter++,this._quantity>0&&this._counter>=this._quantity&&(this.on=!1),this._timer=this.game.time.now+this.frequency)},e.Particles.Arcade.Emitter.prototype.makeParticles=function(a,b,c,d,f){"undefined"==typeof b&&(b=0),c=c||this.maxParticles,d=d||0,"undefined"==typeof f&&(f=!1);for(var g,h=0,i=a,j=0;c>h;)null==this.particleClass&&("object"==typeof a&&(i=this.game.rnd.pick(a)),"object"==typeof b&&(j=this.game.rnd.pick(b)),g=new e.Sprite(this.game,0,0,i,j)),d>0?(g.body.allowCollision.any=!0,g.body.allowCollision.none=!1):g.body.allowCollision.none=!0,g.body.collideWorldBounds=f,g.exists=!1,g.visible=!1,g.anchor.setTo(.5,.5),this.add(g),h++;return this},e.Particles.Arcade.Emitter.prototype.kill=function(){this.on=!1,this.alive=!1,this.exists=!1},e.Particles.Arcade.Emitter.prototype.revive=function(){this.alive=!0,this.exists=!0},e.Particles.Arcade.Emitter.prototype.start=function(a,b,c,d){"boolean"!=typeof a&&(a=!0),b=b||0,c=c||250,d=d||0,this.revive(),this.visible=!0,this.on=!0,this._explode=a,this.lifespan=b,this.frequency=c,a?this._quantity=d:this._quantity+=d,this._counter=0,this._timer=this.game.time.now+c},e.Particles.Arcade.Emitter.prototype.emitParticle=function(){var a=this.getFirstExists(!1);if(null!=a){if(this.width>1||this.height>1?a.reset(this.game.rnd.integerInRange(this.left,this.right),this.game.rnd.integerInRange(this.top,this.bottom)):a.reset(this.emitX,this.emitY),a.lifespan=this.lifespan,a.body.bounce.setTo(this.bounce.x,this.bounce.y),a.body.velocity.x=this.minParticleSpeed.x!=this.maxParticleSpeed.x?this.game.rnd.integerInRange(this.minParticleSpeed.x,this.maxParticleSpeed.x):this.minParticleSpeed.x,a.body.velocity.y=this.minParticleSpeed.y!=this.maxParticleSpeed.y?this.game.rnd.integerInRange(this.minParticleSpeed.y,this.maxParticleSpeed.y):this.minParticleSpeed.y,a.body.gravity.y=this.gravity,a.body.angularVelocity=this.minRotation!=this.maxRotation?this.game.rnd.integerInRange(this.minRotation,this.maxRotation):this.minRotation,1!==this.minParticleScale||1!==this.maxParticleScale){var b=this.game.rnd.realInRange(this.minParticleScale,this.maxParticleScale);a.scale.setTo(b,b)}a.body.drag.x=this.particleDrag.x,a.body.drag.y=this.particleDrag.y,a.body.angularDrag=this.angularDrag}},e.Particles.Arcade.Emitter.prototype.setSize=function(a,b){this.width=a,this.height=b},e.Particles.Arcade.Emitter.prototype.setXSpeed=function(a,b){a=a||0,b=b||0,this.minParticleSpeed.x=a,this.maxParticleSpeed.x=b},e.Particles.Arcade.Emitter.prototype.setYSpeed=function(a,b){a=a||0,b=b||0,this.minParticleSpeed.y=a,this.maxParticleSpeed.y=b},e.Particles.Arcade.Emitter.prototype.setRotation=function(a,b){a=a||0,b=b||0,this.minRotation=a,this.maxRotation=b},e.Particles.Arcade.Emitter.prototype.at=function(a){this.emitX=a.center.x,this.emitY=a.center.y},Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"alpha",{get:function(){return this._container.alpha},set:function(a){this._container.alpha=a}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"visible",{get:function(){return this._container.visible},set:function(a){this._container.visible=a}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"x",{get:function(){return this.emitX},set:function(a){this.emitX=a}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"y",{get:function(){return this.emitY},set:function(a){this.emitY=a}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"left",{get:function(){return Math.floor(this.x-this.width/2)}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"right",{get:function(){return Math.floor(this.x+this.width/2)}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"top",{get:function(){return Math.floor(this.y-this.height/2)}}),Object.defineProperty(e.Particles.Arcade.Emitter.prototype,"bottom",{get:function(){return Math.floor(this.y+this.height/2)}}),e.Tile=function(a,b,c,d,e,f){this.tileset=a,this.index=b,this.width=e,this.height=f,this.x=c,this.y=d,this.mass=1,this.collideNone=!0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.separateX=!0,this.separateY=!0,this.collisionCallback=null,this.collisionCallbackContext=this},e.Tile.prototype={setCollisionCallback:function(a,b){this.collisionCallbackContext=b,this.collisionCallback=a},destroy:function(){this.tileset=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.collideNone=a||b||c||d?!1:!0},resetCollision:function(){this.collideNone=!0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1}},Object.defineProperty(e.Tile.prototype,"bottom",{get:function(){return this.y+this.height}}),Object.defineProperty(e.Tile.prototype,"right",{get:function(){return this.x+this.width}}),e.Tilemap=function(a,b){this.game=a,this.layers,"string"==typeof b?(this.key=b,this.layers=a.cache.getTilemapData(b).layers,this.calculateIndexes()):this.layers=[],this.currentLayer=0,this.debugMap=[],this.dirty=!1,this._results=[],this._tempA=0,this._tempB=0},e.Tilemap.CSV=0,e.Tilemap.TILED_JSON=1,e.Tilemap.prototype={create:function(a,b,c){for(var d=[],f=0;c>f;f++){d[f]=[];for(var g=0;b>g;g++)d[f][g]=0}this.currentLayer=this.layers.push({name:a,width:b,height:c,alpha:1,visible:!0,tileMargin:0,tileSpacing:0,format:e.Tilemap.CSV,data:d,indexes:[]}),this.dirty=!0},calculateIndexes:function(){for(var a=0;a=0&&b=0&&c=0&&a=0&&b=0&&a=0&&b=0&&b=0&&ca&&(a=0),0>b&&(b=0),c>this.layers[e].width&&(c=this.layers[e].width),d>this.layers[e].height&&(d=this.layers[e].height),this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,layer:e});for(var f=b;b+d>f;f++)for(var g=a;a+c>g;g++)this._results.push({x:g,y:f,index:this.layers[e].data[f][g]});return this._results},paste:function(a,b,c,d){if("undefined"==typeof a&&(a=0),"undefined"==typeof b&&(b=0),"undefined"==typeof d&&(d=this.currentLayer),c&&!(c.length<2)){for(var e=c[1].x-a,f=c[1].y-b,g=1;g1?this.debugMap[this.layers[this.currentLayer].data[c][d]]?b.push("background: "+this.debugMap[this.layers[this.currentLayer].data[c][d]]):b.push("background: #ffffff"):b.push("background: rgb(0, 0, 0)");a+="\n"}b[0]=a,console.log.apply(console,b)},destroy:function(){this.removeAllLayers(),this.game=null}},e.TilemapLayer=function(a,b,c,f,g,h,i,j){this.game=a,this.canvas=e.Canvas.create(f,g),this.context=this.canvas.getContext("2d"),this.baseTexture=new d.BaseTexture(this.canvas),this.texture=new d.Texture(this.baseTexture),this.textureFrame=new e.Frame(0,0,0,f,g,"tilemaplayer",a.rnd.uuid()),e.Sprite.call(this,this.game,b,c,this.texture,this.textureFrame),this.type=e.TILEMAPLAYER,this.fixedToCamera=!0,this.tileset=null,this.tileWidth=0,this.tileHeight=0,this.tileMargin=0,this.tileSpacing=0,this.widthInPixels=0,this.heightInPixels=0,this.renderWidth=f,this.renderHeight=g,this._ga=1,this._dx=0,this._dy=0,this._dw=0,this._dh=0,this._tx=0,this._ty=0,this._results=[],this._tw=0,this._th=0,this._tl=0,this._maxX=0,this._maxY=0,this._startX=0,this._startY=0,this.tilemap=null,this.layer=null,this.index=0,this._x=0,this._y=0,this._prevX=0,this._prevY=0,this.dirty=!0,(h instanceof e.Tileset||"string"==typeof h)&&this.updateTileset(h),i instanceof e.Tilemap&&this.updateMapData(i,j)},e.TilemapLayer.prototype=e.Utils.extend(!0,e.Sprite.prototype,d.Sprite.prototype),e.TilemapLayer.prototype.constructor=e.TilemapLayer,e.TilemapLayer.prototype.update=function(){this.scrollX=this.game.camera.x,this.scrollY=this.game.camera.y,this.render()},e.TilemapLayer.prototype.resizeWorld=function(){this.game.world.setBounds(0,0,this.widthInPixels,this.heightInPixels)},e.TilemapLayer.prototype.updateTileset=function(a){if(a instanceof e.Tileset)this.tileset=a;else{if("string"!=typeof a)return;this.tileset=this.game.cache.getTileset("tiles")}this.tileWidth=this.tileset.tileWidth,this.tileHeight=this.tileset.tileHeight,this.tileMargin=this.tileset.tileMargin,this.tileSpacing=this.tileset.tileSpacing,this.updateMax()},e.TilemapLayer.prototype.updateMapData=function(a,b){"undefined"==typeof b&&(b=0),a instanceof e.Tilemap&&(this.tilemap=a,this.layer=this.tilemap.layers[b],this.index=b,this.updateMax(),this.tilemap.dirty=!0)},e.TilemapLayer.prototype.getTileX=function(a){var b=this.tileWidth*this.scale.x;return this.game.math.snapToFloor(a,b)/b},e.TilemapLayer.prototype.getTileY=function(a){var b=this.tileHeight*this.scale.y;return this.game.math.snapToFloor(a,b)/b},e.TilemapLayer.prototype.getTileXY=function(a,b,c){return c.x=this.getTileX(a),c.y=this.getTileY(b),c},e.TilemapLayer.prototype.getTiles=function(a,b,c,d,e){if(null!==this.tilemap){"undefined"==typeof e&&(e=!1),0>a&&(a=0),0>b&&(b=0),c>this.widthInPixels&&(c=this.widthInPixels),d>this.heightInPixels&&(d=this.heightInPixels);var f=this.tileWidth*this.scale.x,g=this.tileHeight*this.scale.y;this._tx=this.game.math.snapToFloor(a,f)/f,this._ty=this.game.math.snapToFloor(b,g)/g,this._tw=(this.game.math.snapToCeil(c,f)+f)/f,this._th=(this.game.math.snapToCeil(d,g)+g)/g,this._results.length=0,this._results.push({x:a,y:b,width:c,height:d,tx:this._tx,ty:this._ty,tw:this._tw,th:this._th});for(var h=0,i=null,j=0,k=0,l=this._ty;lthis.layer.width&&(this._maxX=this.layer.width),this._maxY>this.layer.height&&(this._maxY=this.layer.height),this.widthInPixels=this.layer.width*this.tileWidth,this.heightInPixels=this.layer.height*this.tileHeight),this.dirty=!0},e.TilemapLayer.prototype.render=function(){if(this.tilemap&&this.tilemap.dirty&&(this.dirty=!0),this.dirty&&this.tileset&&this.tilemap&&this.visible){this._prevX=this._dx,this._prevY=this._dy,this._dx=-(this._x-this._startX*this.tileWidth),this._dy=-(this._y-this._startY*this.tileHeight),this._tx=this._dx,this._ty=this._dy,this.context.clearRect(0,0,this.canvas.width,this.canvas.height);for(var a=this._startY;a0?this.deltaX():-this.deltaX()},e.TilemapLayer.prototype.deltaAbsY=function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},e.TilemapLayer.prototype.deltaX=function(){return this._dx-this._prevX},e.TilemapLayer.prototype.deltaY=function(){return this._dy-this._prevY},Object.defineProperty(e.TilemapLayer.prototype,"scrollX",{get:function(){return this._x},set:function(a){a!==this._x&&a>=0&&this.layer&&(this._x=a,this._x>this.widthInPixels-this.renderWidth&&(this._x=this.widthInPixels-this.renderWidth),this._startX=this.game.math.floor(this._x/this.tileWidth),this._startX<0&&(this._startX=0),this._startX+this._maxX>this.layer.width&&(this._startX=this.layer.width-this._maxX),this.dirty=!0)}}),Object.defineProperty(e.TilemapLayer.prototype,"scrollY",{get:function(){return this._y},set:function(a){a!==this._y&&a>=0&&this.layer&&(this._y=a,this._y>this.heightInPixels-this.renderHeight&&(this._y=this.heightInPixels-this.renderHeight),this._startY=this.game.math.floor(this._y/this.tileHeight),this._startY<0&&(this._startY=0),this._startY+this._maxY>this.layer.height&&(this._startY=this.layer.height-this._maxY),this.dirty=!0)}}),e.TilemapParser={tileset:function(a,b,c,d,f,g,h){var i=a.cache.getTilesetImage(b);if(null==i)return null;var j=i.width,k=i.height;0>=c&&(c=Math.floor(-j/Math.min(-1,c))),0>=d&&(d=Math.floor(-k/Math.min(-1,d)));var l=Math.round(j/c),m=Math.round(k/d),n=l*m;if(-1!==f&&(n=f),0==j||0==k||c>j||d>k||0===n)return console.warn("Phaser.TilemapParser.tileSet: width/height zero or width/height < given tileWidth/tileHeight"),null;for(var o=g,p=g,q=new e.Tileset(i,b,c,d,g,h),r=0;n>r;r++)q.addTile(new e.Tile(q,r,o,p,c,d)),o+=c+h,o===j&&(o=g,p+=d+h);return q},parse:function(a,b,c){return c===e.Tilemap.CSV?this.parseCSV(b):c===e.Tilemap.TILED_JSON?this.parseTiledJSON(b):void 0},parseCSV:function(a){a=a.trim();for(var b=[],c=a.split("\n"),d=c.length,e=0,f=0;fa)for(var g=a;b>=g;g++)this.tiles[g].setCollision(c,d,e,f)},setCollision:function(a,b,c,d,e){this.tiles[a]&&this.tiles[a].setCollision(b,c,d,e)}},Object.defineProperty(e.Tileset.prototype,"total",{get:function(){return this.tiles.length}}),d.CanvasRenderer.prototype.renderDisplayObject=function(a){var b,c=this.context;c.globalCompositeOperation="source-over";var e=a.last._iNext;a=a.first;do if(b=a.worldTransform,a.visible)if(a.renderable&&0!=a.alpha){if(a instanceof d.Sprite){var f=a.texture.frame;f&&(c.globalAlpha=a.worldAlpha,a.texture.trimmed?c.setTransform(b[0],b[3],b[1],b[4],b[2]+a.texture.trim.x,b[5]+a.texture.trim.y):c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),c.drawImage(a.texture.baseTexture.source,f.x,f.y,f.width,f.height,a.anchor.x*-f.width,a.anchor.y*-f.height,f.width,f.height))}else if(a instanceof d.Strip)c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),this.renderStrip(a);else if(a instanceof d.TilingSprite)c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),this.renderTilingSprite(a);else if(a instanceof d.CustomRenderable)a.renderCanvas(this);else if(a instanceof d.Graphics)c.setTransform(b[0],b[3],b[1],b[4],b[2],b[5]),d.CanvasGraphics.renderGraphics(a,c);else if(a instanceof d.FilterBlock)if(a.open){c.save();var g=a.mask.alpha,h=a.mask.worldTransform;c.setTransform(h[0],h[3],h[1],h[4],h[2],h[5]),a.mask.worldAlpha=.5,c.worldAlpha=0,d.CanvasGraphics.renderGraphicsMask(a.mask,c),c.clip(),a.mask.worldAlpha=g}else c.restore();a=a._iNext}else a=a._iNext;else a=a.last._iNext;while(a!=e)},d.WebGLBatch.prototype.update=function(){this.gl;for(var a,b,c,e,f,g,h,i,j,k,l,m,n,o,p,q,r=0,s=this.head;s;){if(s.vcount===d.visibleCount){if(b=s.texture.frame.width,c=s.texture.frame.height,e=s.anchor.x,f=s.anchor.y,g=b*(1-e),h=b*-e,i=c*(1-f),j=c*-f,k=8*r,a=s.worldTransform,l=a[0],m=a[3],n=a[1],o=a[4],p=a[2],q=a[5],s.texture.trimmed&&(p+=s.texture.trim.x,q+=s.texture.trim.y),this.verticies[k+0]=l*h+n*j+p,this.verticies[k+1]=o*j+m*h+q,this.verticies[k+2]=l*g+n*j+p,this.verticies[k+3]=o*j+m*g+q,this.verticies[k+4]=l*g+n*i+p,this.verticies[k+5]=o*i+m*g+q,this.verticies[k+6]=l*h+n*i+p,this.verticies[k+7]=o*i+m*h+q,s.updateFrame||s.texture.updateFrame){this.dirtyUVS=!0;var t=s.texture,u=t.frame,v=t.baseTexture.width,w=t.baseTexture.height;this.uvs[k+0]=u.x/v,this.uvs[k+1]=u.y/w,this.uvs[k+2]=(u.x+u.width)/v,this.uvs[k+3]=u.y/w,this.uvs[k+4]=(u.x+u.width)/v,this.uvs[k+5]=(u.y+u.height)/w,this.uvs[k+6]=u.x/v,this.uvs[k+7]=(u.y+u.height)/w,s.updateFrame=!1}if(s.cacheAlpha!=s.worldAlpha){s.cacheAlpha=s.worldAlpha;var x=4*r;this.colors[x]=this.colors[x+1]=this.colors[x+2]=this.colors[x+3]=s.worldAlpha,this.dirtyColors=!0}}else k=8*r,this.verticies[k+0]=0,this.verticies[k+1]=0,this.verticies[k+2]=0,this.verticies[k+3]=0,this.verticies[k+4]=0,this.verticies[k+5]=0,this.verticies[k+6]=0,this.verticies[k+7]=0;r++,s=s.__next}},e}); \ No newline at end of file diff --git a/examples/_site/examples.json b/examples/_site/examples.json index 19c6c41b..e13a5bb5 100644 --- a/examples/_site/examples.json +++ b/examples/_site/examples.json @@ -520,6 +520,10 @@ "file": "bitmap+fonts.js", "title": "bitmap fonts" }, + { + "file": "hello+arial.js", + "title": "hello arial" + }, { "file": "kern+of+duty.js", "title": "kern of duty" diff --git a/examples/_site/view_full.html b/examples/_site/view_full.html index 11eb14b0..f8c2cd99 100644 --- a/examples/_site/view_full.html +++ b/examples/_site/view_full.html @@ -167,7 +167,7 @@
    diff --git a/examples/index.html b/examples/index.html index 9ecc2085..c164a413 100644 --- a/examples/index.html +++ b/examples/index.html @@ -52,7 +52,7 @@