diff --git a/README.md b/README.md index 7b2d506f..60276bdd 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.1.4-dev -================ +Phaser 1.1.4 +============ 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.4 "Kandor" - Released: -in development- +Version: 1.1.4 "Kandor" - Released: February 5th 2014 By Richard Davey, [Photon Storm](http://www.photonstorm.com) @@ -23,13 +23,23 @@ Read the [documentation online](http://docs.phaser.io) Welcome to Phaser ----------------- -Over 1000 github stars! Wow! The latest release of Phaser represents another hard months work by the development team and the community at large. We've had some great contributions and have not let-up the pace of innovating and pushing Phaser forward. As we march towards the end of 2013 we do so knowing that with every passing month more and more developers are using Phaser, and more games are being made. All while it is getting stronger with each release. +As you may know we had planned to release 1.1.4 at the end of 2013. For various reasons this didn't quite happen, but we're happy to announce it's finally out! There have been some dramatic changes internally, and if you make use of either the physics systems or tilemaps then you are going to need to update your code. Hopefully only a little bit, but there have been a number of core API changes which we detail below. There are also a host of new features, the headliners being: -Our plan is to end 2013 with one final point release (1.1.4 - "Kandor") and then we'll start planning out the features we wish to see in version 1.2 in the New Year. +* New Physics system. Uses SAT.js internally so physics bodies can now be rectangles, circles or polygons and support rotation. +* New Tilemap system. Brand new collision system for tiles, much more advanced layer handling, tile properties, multiple tilesets of layer and more. +* New Timer. This handy new class lets you create timed events easily. +* Your Game can now be configured from an external configuration object. +* Over 150 new features and updates and over 30 reported bug fixes. -As always 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 back then: you are our heroes. It's your kind words and enthusiasm that has kept us going. +This release also brings the TypeScript definitions file as bang up to date as possible. There are still a few areas that need looking at, but with your help hopefully we can iron those final few bits out and have a 100% accruate defs file on offer. -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. +There is a new Contributors Guide which we'd urge you to follow if you wish to help with Phaser development, and we've updated the doc files and added lots more details into key areas. The Examples have grown too! Now over 220 of them including several great ones from the community. + +We're going to settle on this build for a short while as we do some quick iteration bug fixing, so expect to see some small point releases very soon that do nothing but address any issues you may find. But in parallel to this we are also now rebuilding our core to bring it in-line with the latest version of Pixi.js, which has had some dramatic changes under the hood, changes will impact a lot of what Phaser does internally. But the changes are all for the better and once we upgrade Pixi you'll have a significantly faster renderer and a smaller codebase too, as we do away with stacks of linked list code :) + +As always 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. The number of games being released that were made with Phaser is staggering and we really love to see how you use it! You are our heroes. It's your kind words and enthusiasm that has keeps 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 still only just scratched the surface of what we have planned for it. ![MiniCybernoid](http://www.photonstorm.com/wp-content/uploads/2013/10/phaser-cybernoid-640x480.png) @@ -47,7 +57,7 @@ There is also an [un-official Getting Started Guide](http://www.antonoffplus.com Change Log ---------- -Version 1.1.4 - "Kandor" - In development +Version 1.1.4 - "Kandor" - February 5th 2014 Significant API changes: @@ -307,7 +317,7 @@ We've made the loading of assets as simple as one line of code. Images, Sounds, **Physics** -Phaser ships with our Arcade Physics system. An extremely light-weight AABB physics library perfect for low-powered devices and fast collision response. Control velocity, acceleration, bounce, drag and full collision and separation control. +Phaser ships with our Arcade Physics system. A SAT based collision and physics library perfect for low-powered devices and fast collision response. Control velocity, acceleration, bounce, damping and full collision and separation control. As of version 1.1.4 we now support rectangles, circles and polygon collision with full rotation. **Sprites** @@ -368,13 +378,17 @@ Although Phaser 1.0 is a brand new release it is born from years of experience b Road Map -------- -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: +Here is what's on our road map for the coming months: -Version 1.2 ("Saldaea") +Version 1.1.5 ("Saldaea") + +* A fast turn-around point release that will focus on addressing any bugs that occured as a result of the large changes that took place in 1.1.4. + +Version 1.2 ("Shienar") * Update to Pixi 1.4 - this newly released build has lots of internal changes and new features we want to take advantage of. -Version 1.3 ("Shienar") +Version 1.3 ("Tarabon") * Enhance the State Management, so you can perform non-destructive State swaps and persistence. * Dedicated CocoonJS packaging features (screencanvas, etc) diff --git a/examples/collision/circle vs polygon.js b/examples/collision/circle vs polygon.js index 416b81b9..62805d84 100644 --- a/examples/collision/circle vs polygon.js +++ b/examples/collision/circle vs polygon.js @@ -41,7 +41,6 @@ function create() { sprite4 = game.add.sprite(380, 100, 'wizball'); sprite4.body.setCircle(46); sprite4.body.collideWorldBounds = true; - sprite4.body.friction = 0; sprite4.body.bounce.setTo(0.9, 0.9); sprite4.body.velocity.setTo(100, 100); @@ -49,7 +48,7 @@ function create() { function update() { - game.physics.collideArray(sprite4, [ sprite1, sprite2, sprite3 ]); + game.physics.collide(sprite4, [ sprite1, sprite2, sprite3 ]); } diff --git a/examples/games/starstruck.js b/examples/games/starstruck.js index 47468fbd..059d0473 100644 --- a/examples/games/starstruck.js +++ b/examples/games/starstruck.js @@ -25,17 +25,6 @@ var bg; function create() { - $('#step').click(function(){ - console.log('---- STEP', game.stepCount, '-------------------------------'); - game.step(); - }); - - $('#start').click(function(){ - console.log('---- START DEBUGGING -------------------------------'); - game.enableStep(); - player.debug = true; - }); - game.stage.backgroundColor = '#000000'; bg = game.add.tileSprite(0, 0, 800, 600, 'background'); @@ -63,6 +52,9 @@ function create() { player.body.collideWorldBounds = true; player.body.setRectangle(16, 32, 8, 16); + // Un-comment this on to see the body collision areas / data + // player.debug = true; + player.animations.add('left', [0, 1, 2, 3], 10, true); player.animations.add('turn', [4], 20, true); player.animations.add('right', [5, 6, 7, 8], 10, true); @@ -119,10 +111,8 @@ function update() { } } - // if (jumpButton.isDown && player.body.touching.down && game.time.now > jumpTimer) if (jumpButton.isDown && player.body.onFloor() && game.time.now > jumpTimer) { - console.log('jump'); player.body.velocity.y = -250; jumpTimer = game.time.now + 750; } @@ -131,7 +121,10 @@ function update() { function render () { - game.debug.renderPhysicsBody(player.body); - game.debug.renderBodyInfo(player, 16, 24); + if (player.debug) + { + game.debug.renderPhysicsBody(player.body); + game.debug.renderBodyInfo(player, 16, 24); + } } diff --git a/examples/games/tanks.js b/examples/games/tanks.js index 47c7401e..006b6b76 100644 --- a/examples/games/tanks.js +++ b/examples/games/tanks.js @@ -21,7 +21,7 @@ EnemyTank = function (index, game, player, bullets) { this.turret.anchor.setTo(0.3, 0.5); this.tank.name = index.toString(); - this.tank.body.immovable = true; + this.tank.body.immovable = false; this.tank.body.collideWorldBounds = true; this.tank.body.bounce.setTo(1, 1); @@ -77,7 +77,6 @@ EnemyTank.prototype.update = function() { }; var game = new Phaser.Game(800, 600, Phaser.AUTO, '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, render: render }); function preload () { @@ -122,10 +121,9 @@ function create () { tank = game.add.sprite(0, 0, 'tank', 'tank1'); tank.anchor.setTo(0.5, 0.5); tank.animations.add('move', ['tank1', 'tank2', 'tank3', 'tank4', 'tank5', 'tank6'], 20, true); - // tank.play('move'); // This will force it to decelerate and limit its speed - tank.body.friction = 0.2; + tank.body.linearDamping = 0.2; tank.body.maxVelocity.setTo(400, 400); tank.body.collideWorldBounds = true; @@ -194,15 +192,15 @@ function removeLogo () { function update () { - game.physics.collide(enemyBullets, tank, bulletHitPlayer, null, this); + game.physics.overlap(enemyBullets, tank, bulletHitPlayer, null, this); for (var i = 0; i < enemies.length; i++) { if (enemies[i].alive) { - enemies[i].update(); game.physics.collide(tank, enemies[i].tank); - game.physics.collide(bullets, enemies[i].tank, bulletHitEnemy, null, this); + game.physics.overlap(bullets, enemies[i].tank, bulletHitEnemy, null, this); + enemies[i].update(); } } diff --git a/examples/games/wabbits.js b/examples/games/wabbits.js index 56084153..69417e35 100644 --- a/examples/games/wabbits.js +++ b/examples/games/wabbits.js @@ -42,7 +42,7 @@ function create() { wab.name = 'wab' + i; wab.body.collideWorldBounds = true; wab.body.mass = 0.1; - wab.body.friction = 0.2; + wab.body.linearDamping = 0.2; } hill = game.add.sprite(450, 400, 'hill'); @@ -53,7 +53,7 @@ function create() { block = game.add.sprite(575, 300, 'block'); block.body.collideWorldBounds = true; block.body.mass = 5; - block.body..friction = 0.4; + block.body.linearDamping = 0.4; analog = game.add.sprite(200, 450, 'analog'); analog.body.allowGravity = false; diff --git a/examples/input/gamepad tanks.js b/examples/input/gamepad tanks.js index 3ed381ad..79e912d5 100644 --- a/examples/input/gamepad tanks.js +++ b/examples/input/gamepad tanks.js @@ -133,7 +133,7 @@ function create () { // tank.play('move'); // This will force it to decelerate and limit its speed - tank.body.friction = 0.2; + tank.body.linearDamping = 0.2; tank.body.maxVelocity.setTo(400, 400); tank.body.collideWorldBounds = true; diff --git a/examples/physics/launcher follow world.js b/examples/physics/launcher follow world.js index 3d9338b7..e29bdbc1 100644 --- a/examples/physics/launcher follow world.js +++ b/examples/physics/launcher follow world.js @@ -42,7 +42,7 @@ function create() { player.anchor.setTo(0.5, 0.5); player.body.collideWorldBounds = true; player.body.bounce.setTo(0.9, 0.9); - player.body.friction = 0.2; + player.body.linearDamping = 0.2; player.body.gravity.setTo(0, 8); // Enable input. diff --git a/examples/physics/launcher follow.js b/examples/physics/launcher follow.js index c1cacf04..43478243 100644 --- a/examples/physics/launcher follow.js +++ b/examples/physics/launcher follow.js @@ -37,7 +37,7 @@ function create() { player.anchor.setTo(0.5, 0.5); player.body.collideWorldBounds = true; player.body.bounce.setTo(0.9, 0.9); - player.body.friction = 0.2; + player.body.linearDamping = 0.2; // Enable input. player.inputEnabled = true; diff --git a/examples/physics/mass velocity test.js b/examples/physics/mass velocity test.js index 824d79ab..433b6040 100644 --- a/examples/physics/mass velocity test.js +++ b/examples/physics/mass velocity test.js @@ -23,7 +23,7 @@ function create() { s.name = 'alien' + s; s.body.collideWorldBounds = true; s.body.bounce.setTo(0.8, 0.8); - s.body.friction = 0; + s.body.linearDamping = 0; s.body.minVelocity.setTo(0, 0); s.body.velocity.setTo(10 + Math.random() * 40, 10 + Math.random() * 40); } diff --git a/examples/tile sprites/colliding with tiling sprite.js b/examples/tile sprites/colliding with tiling sprite.js index 9cd7a25e..7f95f935 100644 --- a/examples/tile sprites/colliding with tiling sprite.js +++ b/examples/tile sprites/colliding with tiling sprite.js @@ -16,11 +16,12 @@ function create() { ball = game.add.sprite(400, 0, 'ball'); - ball.body.gravity.y = 6; + ball.body.gravity.y = 200; ball.body.bounce.y = 1; tilesprite = game.add.tileSprite(300, 450, 200, 100, 'starfield'); tilesprite.body.immovable = true; + tilesprite.body.setRectangle(200, 100, 0, 0); cursors = game.input.keyboard.createCursorKeys(); @@ -32,13 +33,13 @@ function update() { if (cursors.left.isDown) { - tilesprite.x += 8; - tilesprite.tilePosition.x += 8; + tilesprite.x -= 8; + tilesprite.tilePosition.x -= 8; } else if (cursors.right.isDown) { - tilesprite.x -= 8; - tilesprite.tilePosition.x -= 8; + tilesprite.x += 8; + tilesprite.tilePosition.x += 8; } if (cursors.up.isDown) @@ -54,6 +55,6 @@ function update() { function render() { - game.debug.renderSpriteBounds(tilesprite); + game.debug.renderPhysicsBody(tilesprite.body); } \ No newline at end of file diff --git a/examples/tilemaps/mapcollide.js b/examples/tilemaps/mapcollide.js index a8058f4f..863ff595 100644 --- a/examples/tilemaps/mapcollide.js +++ b/examples/tilemaps/mapcollide.js @@ -43,7 +43,7 @@ function create() { game.physics.gravity.y = 250; p.body.bounce.y = 0.2; - p.body.friction = 1; + p.body.linearDamping = 1; p.body.collideWorldBounds = true; game.camera.follow(p); diff --git a/examples/wip/2ball.js b/examples/wip/2ball.js index c60f739c..8740322e 100644 --- a/examples/wip/2ball.js +++ b/examples/wip/2ball.js @@ -176,7 +176,7 @@ function test7() { // sprite.body.gravity.y = 200; - // sprite.body.friction = 0.2; + // sprite.body.linearDamping = 0.2; game.input.onDown.add(launch7, this); @@ -375,7 +375,7 @@ function update() { if (sprite3) { - game.physics.collideArray(sprite, [sprite2, sprite3]); + game.physics.collide(sprite, [sprite2, sprite3]); game.physics.collide(sprite2, sprite3); } else diff --git a/examples/wip/acceleration.js b/examples/wip/acceleration.js index 5b9438dd..5188e556 100644 --- a/examples/wip/acceleration.js +++ b/examples/wip/acceleration.js @@ -29,7 +29,7 @@ function create() { car.body.collideWorldBounds = true; car.body.bounce.setTo(0.8, 0.8); car.body.allowRotation = true; - car.body.friction = 0.4; + car.body.linearDamping = 0.4; // car.body.acceleration.x = 10; game.input.onDown.add(start, this); diff --git a/examples/wip/blocked.js b/examples/wip/blocked.js index 19080788..22107b80 100644 --- a/examples/wip/blocked.js +++ b/examples/wip/blocked.js @@ -59,13 +59,13 @@ function test8() { sprite.body.bounce.setTo(0.8, 0.8); sprite.body.minBounceVelocity = 1.2; sprite.body.velocity.x = -400; - sprite.body.friction = 1.2; + sprite.body.linearDamping = 1.2; sprite2 = game.add.sprite(500, 100, 'ball'); sprite2.body.collideWorldBounds = true; sprite2.body.bounce.setTo(0.5, 0.5); sprite2.body.minBounceVelocity = 0.8; - sprite2.body.friction = 0.5; + sprite2.body.linearDamping = 0.5; game.input.onDown.add(launch8, this); diff --git a/examples/wip/jitter.js b/examples/wip/jitter.js index 1c85ecca..67ad6dea 100644 --- a/examples/wip/jitter.js +++ b/examples/wip/jitter.js @@ -152,7 +152,7 @@ function test5() { // sprite2.body.checkCollision.down = false; // sprite2.body.mass = 1; sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch5, this); @@ -182,7 +182,7 @@ function test4() { sprite2.body.checkCollision.down = false; // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch4, this); @@ -213,7 +213,7 @@ function test3() { sprite2.body.bounce.setTo(0.9, 0.9); // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch3, this); @@ -237,7 +237,7 @@ function test2() { sprite.body.collideWorldBounds = true; // sprite.body.checkCollision.right = false; sprite.body.bounce.setTo(0.9, 0.9); - // sprite.body.friction = 0; + // sprite.body.linearDamping = 0; // sprite.scale.setTo(2, 2); // sprite.body.mass = 2; @@ -248,7 +248,7 @@ function test2() { // sprite2.body.bounce.setTo(0.9, 0.9); // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch2, this); @@ -274,7 +274,7 @@ function test1() { sprite.body.checkCollision.right = false; // sprite.body.bounce.setTo(0.9, 0.9); // sprite.body.bounce.setTo(1, 1); - // sprite.body.friction = 0; + // sprite.body.linearDamping = 0; // sprite.scale.setTo(2, 2); // sprite.body.mass = 2; @@ -284,7 +284,7 @@ function test1() { sprite2.body.bounce.setTo(0.9, 0.9); // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch1, this); diff --git a/examples/wip/multiball.js b/examples/wip/multiball.js index 5d1732dd..08bea551 100644 --- a/examples/wip/multiball.js +++ b/examples/wip/multiball.js @@ -28,7 +28,7 @@ function create() { sprites.setAll('body.collideWorldBounds', true); sprites.setAll('body.bounce.x', 1); sprites.setAll('body.bounce.y', 1); - sprites.setAll('body.friction', 0); + sprites.setAll('body.linearDamping', 0); sprites.setAll('body.minBounceVelocity', 0); } diff --git a/examples/wip/one way collision.js b/examples/wip/one way collision.js index b891ede2..61a4cc6d 100644 --- a/examples/wip/one way collision.js +++ b/examples/wip/one way collision.js @@ -138,7 +138,7 @@ function test5() { // sprite2.body.checkCollision.down = false; // sprite2.body.mass = 1; sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch5, this); @@ -168,7 +168,7 @@ function test4() { sprite2.body.checkCollision.down = false; // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch4, this); @@ -199,7 +199,7 @@ function test3() { sprite2.body.bounce.setTo(0.9, 0.9); // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch3, this); @@ -223,7 +223,7 @@ function test2() { sprite.body.collideWorldBounds = true; // sprite.body.checkCollision.right = false; sprite.body.bounce.setTo(0.9, 0.9); - // sprite.body.friction = 0; + // sprite.body.linearDamping = 0; // sprite.scale.setTo(2, 2); // sprite.body.mass = 2; @@ -234,7 +234,7 @@ function test2() { // sprite2.body.bounce.setTo(0.9, 0.9); // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch2, this); @@ -260,7 +260,7 @@ function test1() { sprite.body.checkCollision.right = false; // sprite.body.bounce.setTo(0.9, 0.9); // sprite.body.bounce.setTo(1, 1); - // sprite.body.friction = 0; + // sprite.body.linearDamping = 0; // sprite.scale.setTo(2, 2); // sprite.body.mass = 2; @@ -270,7 +270,7 @@ function test1() { sprite2.body.bounce.setTo(0.9, 0.9); // sprite2.body.mass = 1; // sprite2.body.bounce.setTo(1, 1); - // sprite2.body.friction = 0; + // sprite2.body.linearDamping = 0; game.input.onDown.add(launch1, this); diff --git a/examples/wip/physics-motion.js b/examples/wip/physics-motion.js index 4c95be0f..65a19762 100644 --- a/examples/wip/physics-motion.js +++ b/examples/wip/physics-motion.js @@ -34,7 +34,7 @@ function create() { //sprite.body.drag.setTo(0, -20); // sprite.body.drag.setTo(10, 10); - sprite.body.friction = 0.1; + sprite.body.linearDamping = 0.1; // sprite.body.sleepMin.setTo(-50, -20); // sprite.body.sleepMax.setTo(50, 20); diff --git a/examples/wip/platform.js b/examples/wip/platform.js index a4b81f2d..f58a672f 100644 --- a/examples/wip/platform.js +++ b/examples/wip/platform.js @@ -48,7 +48,7 @@ function create() { balls.setAll('body.bounce.x', 0.8); balls.setAll('body.bounce.y', 0.9); balls.setAll('body.minBounceVelocity', 0.9); - balls.setAll('body.friction', 0.5); + balls.setAll('body.linearDamping', 0.5); */ sprite2 = game.add.sprite(340, 250, 'gameboy', 2); @@ -61,7 +61,7 @@ function create() { sprite.body.collideWorldBounds = true; sprite.body.minBounceVelocity = 0.9; sprite.body.bounce.setTo(0.5, 0.9); - sprite.body.friction = 0.5; + sprite.body.linearDamping = 0.5; game.input.onDown.add(launch, this); diff --git a/resources/Screen Shots/phaser_polygons.png b/resources/Screen Shots/phaser_polygons.png new file mode 100644 index 00000000..cf089e5c Binary files /dev/null and b/resources/Screen Shots/phaser_polygons.png differ diff --git a/src/Intro.js b/src/Intro.js index 5112662f..da732d48 100644 --- a/src/Intro.js +++ b/src/Intro.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/IntroDocs.js b/src/IntroDocs.js index 3568417c..1a1ac134 100644 --- a/src/IntroDocs.js +++ b/src/IntroDocs.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -9,7 +9,7 @@ * * Phaser - http://www.phaser.io * -* v1.1.4-dev - Released November 28th 2013. +* v1.1.4 - Released February 5th 2014. * * By Richard Davey http://www.photonstorm.com @photonstorm * diff --git a/src/Phaser.js b/src/Phaser.js index 38e1056a..b8c554ca 100644 --- a/src/Phaser.js +++ b/src/Phaser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/animation/Animation.js b/src/animation/Animation.js index 9e61c0df..b28b4e2d 100644 --- a/src/animation/Animation.js +++ b/src/animation/Animation.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/animation/AnimationManager.js b/src/animation/AnimationManager.js index 1d6878ae..3f81a2bd 100644 --- a/src/animation/AnimationManager.js +++ b/src/animation/AnimationManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/animation/AnimationParser.js b/src/animation/AnimationParser.js index 5882b7d0..d8bcd720 100644 --- a/src/animation/AnimationParser.js +++ b/src/animation/AnimationParser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/animation/Frame.js b/src/animation/Frame.js index a87bf7dc..c7cc3ff6 100644 --- a/src/animation/Frame.js +++ b/src/animation/Frame.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/animation/FrameData.js b/src/animation/FrameData.js index 588c6729..ab790fa0 100644 --- a/src/animation/FrameData.js +++ b/src/animation/FrameData.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Camera.js b/src/core/Camera.js index 951e4362..8d9baa0e 100644 --- a/src/core/Camera.js +++ b/src/core/Camera.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Filter.js b/src/core/Filter.js index 8f79611f..6bedd4e5 100644 --- a/src/core/Filter.js +++ b/src/core/Filter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Game.js b/src/core/Game.js index d0f11e39..13466bc9 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Group.js b/src/core/Group.js index bca7ef02..5fa52339 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -49,7 +49,7 @@ Phaser.Group = function (game, parent, name, useStage) { { if (parent instanceof Phaser.Group) { - parent.add(this); + parent._container.addChild(this._container); } else { @@ -416,8 +416,6 @@ Phaser.Group.prototype = { var child1 = this.getAt(index1); var child2 = this.getAt(index2); - console.log('swapIndex ', index1, ' with ', index2); - this.swap(child1, child2); }, @@ -1454,102 +1452,6 @@ Phaser.Group.prototype = { return true; - }, - - /** - * Dumps out a list of Group children and their index positions to the browser console. Useful for group debugging. - * - * @method Phaser.Group#dump - * @param {boolean} [full=false] - If full the dump will include the entire display list, start from the Stage. Otherwise it will only include this container. - */ - dump: function (full) { - - if (typeof full == 'undefined') - { - full = false; - } - - var spacing = 20; - var output = "\n" + Phaser.Utils.pad('Node', spacing) + "|" + Phaser.Utils.pad('Next', spacing) + "|" + Phaser.Utils.pad('Previous', spacing) + "|" + Phaser.Utils.pad('First', spacing) + "|" + Phaser.Utils.pad('Last', spacing); - - console.log(output); - - var output = Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing) + "|" + Phaser.Utils.pad('----------', spacing); - console.log(output); - - if (full) - { - var testObject = this.game.stage._stage.last._iNext; - var displayObject = this.game.stage._stage; - } - else - { - var testObject = this._container.last._iNext; - var displayObject = this._container; - } - - do - { - var name = displayObject.name || '*'; - - if (this.cursor == displayObject) - { - var name = '> ' + name; - } - - var nameNext = '-'; - var namePrev = '-'; - var nameFirst = '-'; - var nameLast = '-'; - - if (displayObject._iNext) - { - nameNext = displayObject._iNext.name; - } - - if (displayObject._iPrev) - { - namePrev = displayObject._iPrev.name; - } - - if (displayObject.first) - { - nameFirst = displayObject.first.name; - } - - if (displayObject.last) - { - nameLast = displayObject.last.name; - } - - if (typeof nameNext === 'undefined') - { - nameNext = '-'; - } - - if (typeof namePrev === 'undefined') - { - namePrev = '-'; - } - - if (typeof nameFirst === 'undefined') - { - nameFirst = '-'; - } - - if (typeof nameLast === 'undefined') - { - nameLast = '-'; - } - - var output = Phaser.Utils.pad(name, spacing) + "|" + Phaser.Utils.pad(nameNext, spacing) + "|" + Phaser.Utils.pad(namePrev, spacing) + "|" + Phaser.Utils.pad(nameFirst, spacing) + "|" + Phaser.Utils.pad(nameLast, spacing); - console.log(output); - - displayObject = displayObject._iNext; - - } - while(displayObject != testObject) - } }; diff --git a/src/core/LinkedList.js b/src/core/LinkedList.js index e60eaf2f..fd2726c1 100644 --- a/src/core/LinkedList.js +++ b/src/core/LinkedList.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Plugin.js b/src/core/Plugin.js index efca2a28..273f8214 100644 --- a/src/core/Plugin.js +++ b/src/core/Plugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/PluginManager.js b/src/core/PluginManager.js index 46b59ebc..0dd7538a 100644 --- a/src/core/PluginManager.js +++ b/src/core/PluginManager.js @@ -2,7 +2,7 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Signal.js b/src/core/Signal.js index fb80e16b..2c874287 100644 --- a/src/core/Signal.js +++ b/src/core/Signal.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/SignalBinding.js b/src/core/SignalBinding.js index 9bbf8778..8a0a5f7e 100644 --- a/src/core/SignalBinding.js +++ b/src/core/SignalBinding.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/Stage.js b/src/core/Stage.js index 2cf79adb..e766fe6b 100644 --- a/src/core/Stage.js +++ b/src/core/Stage.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/State.js b/src/core/State.js index a4187a77..1a624167 100644 --- a/src/core/State.js +++ b/src/core/State.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/StateManager.js b/src/core/StateManager.js index 2351bb0b..00f70d1a 100644 --- a/src/core/StateManager.js +++ b/src/core/StateManager.js @@ -2,7 +2,7 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/core/World.js b/src/core/World.js index c1a6004d..0bb15ddd 100644 --- a/src/core/World.js +++ b/src/core/World.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -206,6 +206,8 @@ Phaser.World.prototype.setBounds = function (x, y, width, height) { this.camera.bounds.setTo(x, y, width, height); } + this.game.physics.setBoundsToWorld(); + } /** diff --git a/src/gameobjects/BitmapData.js b/src/gameobjects/BitmapData.js index 68939575..ec0c678f 100644 --- a/src/gameobjects/BitmapData.js +++ b/src/gameobjects/BitmapData.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/BitmapText.js b/src/gameobjects/BitmapText.js index a60d66eb..2bab27f2 100644 --- a/src/gameobjects/BitmapText.js +++ b/src/gameobjects/BitmapText.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 33644e66..ad153e26 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/DOMSprite.js b/src/gameobjects/DOMSprite.js index d990bc5b..1ec45e2f 100644 --- a/src/gameobjects/DOMSprite.js +++ b/src/gameobjects/DOMSprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/Events.js b/src/gameobjects/Events.js index fd296007..e3521491 100644 --- a/src/gameobjects/Events.js +++ b/src/gameobjects/Events.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 902faa4d..485f0087 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/Graphics.js b/src/gameobjects/Graphics.js index fc8932fb..742abafc 100644 --- a/src/gameobjects/Graphics.js +++ b/src/gameobjects/Graphics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/RenderTexture.js b/src/gameobjects/RenderTexture.js index 3edd5d9c..0c98b577 100644 --- a/src/gameobjects/RenderTexture.js +++ b/src/gameobjects/RenderTexture.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index ac98a29f..1e7ea7ae 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -390,18 +390,6 @@ Phaser.Sprite = function (game, x, y, key, frame) { Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype); Phaser.Sprite.prototype.constructor = Phaser.Sprite; - -/* -Phaser.Sprite.prototype.initGroup = function() { - - // this.world.setTo(this.parent.position.x + this.x, this.parent.position.y + this.y); - - // console.log('Sprite initGroup', this.world); - console.log('Sprite initGroup', this.group.x, this.group.y); - -} -*/ - /** * Automatically called by World.preUpdate. Handles cache updates, lifespan checks, animation updates and physics updates. * diff --git a/src/gameobjects/Text.js b/src/gameobjects/Text.js index 7d88878d..fbd1b6bd 100644 --- a/src/gameobjects/Text.js +++ b/src/gameobjects/Text.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/gameobjects/TileSprite.js b/src/gameobjects/TileSprite.js index 8d58b530..76ef22e2 100644 --- a/src/gameobjects/TileSprite.js +++ b/src/gameobjects/TileSprite.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/geom/Circle.js b/src/geom/Circle.js index 7b906c7f..86cc21b1 100644 --- a/src/geom/Circle.js +++ b/src/geom/Circle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/geom/Line.js b/src/geom/Line.js index 38174f8b..2e8e4fe5 100644 --- a/src/geom/Line.js +++ b/src/geom/Line.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/geom/Point.js b/src/geom/Point.js index a97ede11..029341c5 100644 --- a/src/geom/Point.js +++ b/src/geom/Point.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/geom/Polygon.js b/src/geom/Polygon.js index 8bb0b875..c81ad370 100644 --- a/src/geom/Polygon.js +++ b/src/geom/Polygon.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/geom/Rectangle.js b/src/geom/Rectangle.js index 6b6b3dcb..0861dcf3 100644 --- a/src/geom/Rectangle.js +++ b/src/geom/Rectangle.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Gamepad.js b/src/input/Gamepad.js index 2d20c9f6..10753344 100644 --- a/src/input/Gamepad.js +++ b/src/input/Gamepad.js @@ -1,6 +1,6 @@ /** * @author @karlmacklin -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/GamepadButton.js b/src/input/GamepadButton.js index 0b915faa..07d63c25 100644 --- a/src/input/GamepadButton.js +++ b/src/input/GamepadButton.js @@ -1,6 +1,6 @@ /** * @author @karlmacklin -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Input.js b/src/input/Input.js index 86e7eaf3..f25e5ab0 100644 --- a/src/input/Input.js +++ b/src/input/Input.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 5d992a70..658735f0 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Key.js b/src/input/Key.js index 7dc1a407..853502bd 100644 --- a/src/input/Key.js +++ b/src/input/Key.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Keyboard.js b/src/input/Keyboard.js index ff1d738d..c0a4c875 100644 --- a/src/input/Keyboard.js +++ b/src/input/Keyboard.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/MSPointer.js b/src/input/MSPointer.js index 11c0ce1d..5d6f4300 100644 --- a/src/input/MSPointer.js +++ b/src/input/MSPointer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Mouse.js b/src/input/Mouse.js index dce9289f..c8ced562 100644 --- a/src/input/Mouse.js +++ b/src/input/Mouse.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 1ae3c7cc..56fc31bb 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/SinglePad.js b/src/input/SinglePad.js index 9b55777e..5c6943e0 100644 --- a/src/input/SinglePad.js +++ b/src/input/SinglePad.js @@ -1,6 +1,6 @@ /** * @author @karlmacklin -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/input/Touch.js b/src/input/Touch.js index ffb5645c..67715f80 100644 --- a/src/input/Touch.js +++ b/src/input/Touch.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -269,13 +269,6 @@ Phaser.Touch.prototype = { event.preventDefault(); } - /* - for (var i = 0; i < event.changedTouches.length; i++) - { - //console.log('touch enter'); - } - */ - }, /** @@ -298,13 +291,6 @@ Phaser.Touch.prototype = { event.preventDefault(); } - /* - for (var i = 0; i < event.changedTouches.length; i++) - { - //console.log('touch leave'); - } - */ - }, /** diff --git a/src/loader/Cache.js b/src/loader/Cache.js index ad5a51bc..0e4cf05f 100644 --- a/src/loader/Cache.js +++ b/src/loader/Cache.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/loader/Loader.js b/src/loader/Loader.js index 0fc5ac00..01ddad88 100644 --- a/src/loader/Loader.js +++ b/src/loader/Loader.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/loader/LoaderParser.js b/src/loader/LoaderParser.js index 0f91830c..5de53f8a 100644 --- a/src/loader/LoaderParser.js +++ b/src/loader/LoaderParser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/math/Math.js b/src/math/Math.js index 7b6dec40..feec5c53 100644 --- a/src/math/Math.js +++ b/src/math/Math.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/math/QuadTree.js b/src/math/QuadTree.js index f2950c01..b145d0d1 100644 --- a/src/math/QuadTree.js +++ b/src/math/QuadTree.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/math/RandomDataGenerator.js b/src/math/RandomDataGenerator.js index e3e41882..6a7e95b6 100644 --- a/src/math/RandomDataGenerator.js +++ b/src/math/RandomDataGenerator.js @@ -2,7 +2,7 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/net/Net.js b/src/net/Net.js index f3066e9a..7537d9cf 100644 --- a/src/net/Net.js +++ b/src/net/Net.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/particles/Particles.js b/src/particles/Particles.js index 6238f762..edad824b 100644 --- a/src/particles/Particles.js +++ b/src/particles/Particles.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/particles/arcade/Emitter.js b/src/particles/arcade/Emitter.js index dec83fe8..444d30fe 100644 --- a/src/particles/arcade/Emitter.js +++ b/src/particles/arcade/Emitter.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index f124dda9..39bba8a6 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 7b6d3a1e..183046f3 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/pixi/filters/DisplacementFilter.js b/src/pixi/filters/DisplacementFilter.js index 40af8703..21853fd5 100644 --- a/src/pixi/filters/DisplacementFilter.js +++ b/src/pixi/filters/DisplacementFilter.js @@ -19,7 +19,6 @@ PIXI.DisplacementFilter = function(texture) texture.baseTexture._powerOf2 = true; // set the uniforms - //console.log() this.uniforms = { displacementMap: {type: 'sampler2D', value:texture}, scale: {type: '2f', value:{x:30, y:30}}, diff --git a/src/pixi/renderers/webgl/WebGLFilterManager.js b/src/pixi/renderers/webgl/WebGLFilterManager.js index 2dd4b759..873b56c6 100644 --- a/src/pixi/renderers/webgl/WebGLFilterManager.js +++ b/src/pixi/renderers/webgl/WebGLFilterManager.js @@ -52,9 +52,6 @@ PIXI.WebGLFilterManager.prototype.pushFilter = function(filterBlock) this.getBounds(filterBlock.target); - // addpadding? - //displayObject.filterArea.x - var filterArea = filterBlock.target.filterArea; var padidng = filter.padding; @@ -72,7 +69,6 @@ PIXI.WebGLFilterManager.prototype.pushFilter = function(filterBlock) //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, filterArea.width, filterArea.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); gl.bindFramebuffer(gl.FRAMEBUFFER, texture.frameBuffer); - //console.log(filterArea) // set view port gl.viewport(0, 0, filterArea.width, filterArea.height); @@ -82,7 +78,6 @@ PIXI.WebGLFilterManager.prototype.pushFilter = function(filterBlock) PIXI.offset.x = -filterArea.x; PIXI.offset.y = -filterArea.y; - //console.log(PIXI.defaultShader.projectionVector) // update projection gl.uniform2f(PIXI.defaultShader.projectionVector, filterArea.width/2, -filterArea.height/2); gl.uniform2f(PIXI.defaultShader.offsetVector, -filterArea.x, -filterArea.y); @@ -92,10 +87,7 @@ PIXI.WebGLFilterManager.prototype.pushFilter = function(filterBlock) gl.clearColor(0,0,0, 0); gl.clear(gl.COLOR_BUFFER_BIT); - //filter.texture = texture; filterBlock._glFilterTexture = texture; - - //console.log("PUSH") }; @@ -292,12 +284,10 @@ PIXI.WebGLFilterManager.prototype.applyFilterPass = function(filter, filterArea, if(filter.uniforms.dimensions) { - //console.log(filter.uniforms.dimensions) filter.uniforms.dimensions.value[0] = this.width;//width; filter.uniforms.dimensions.value[1] = this.height;//height; filter.uniforms.dimensions.value[2] = this.vertexArray[0]; filter.uniforms.dimensions.value[3] = this.vertexArray[5];//filterArea.height; - // console.log(this.vertexArray[5]) } shader.syncUniforms(); @@ -463,14 +453,9 @@ PIXI.WebGLFilterManager.prototype.getBounds = function(displayObject) } while(tempObject !== testObject); - // maximum bounds is the size of the screen.. - //minX = minX > 0 ? minX : 0; - //minY = minY > 0 ? minY : 0; - displayObject.filterArea.x = minX; displayObject.filterArea.y = minY; -// console.log(maxX+ " : " + minX) displayObject.filterArea.width = maxX - minX; displayObject.filterArea.height = maxY - minY; }; diff --git a/src/pixi/renderers/webgl/WebGLRenderGroup.js b/src/pixi/renderers/webgl/WebGLRenderGroup.js index b0f2da76..e3543fe7 100644 --- a/src/pixi/renderers/webgl/WebGLRenderGroup.js +++ b/src/pixi/renderers/webgl/WebGLRenderGroup.js @@ -194,9 +194,6 @@ PIXI.WebGLRenderGroup.prototype.renderSpecific = function(displayObject, project endBatch = lastRenderable; } - //console.log(endBatch); - // TODO - need to fold this up a bit! - if(startBatch == endBatch) { if(startBatch instanceof PIXI.WebGLBatch) diff --git a/src/sound/Sound.js b/src/sound/Sound.js index 56300d67..09f4e8ff 100644 --- a/src/sound/Sound.js +++ b/src/sound/Sound.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/sound/SoundManager.js b/src/sound/SoundManager.js index cb64f213..31988184 100644 --- a/src/sound/SoundManager.js +++ b/src/sound/SoundManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/system/Canvas.js b/src/system/Canvas.js index 76e81e03..46f416cf 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/system/Device.js b/src/system/Device.js index dc9e61c7..ce1452eb 100644 --- a/src/system/Device.js +++ b/src/system/Device.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/system/RequestAnimationFrame.js b/src/system/RequestAnimationFrame.js index fd86aefc..f58dee81 100644 --- a/src/system/RequestAnimationFrame.js +++ b/src/system/RequestAnimationFrame.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/system/StageScaleMode.js b/src/system/StageScaleMode.js index 52dce578..fade08cd 100644 --- a/src/system/StageScaleMode.js +++ b/src/system/StageScaleMode.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -710,8 +710,6 @@ Phaser.StageScaleMode.prototype = { var availableWidth = window.innerWidth; var availableHeight = window.innerHeight; - // console.log('available', availableWidth, availableHeight); - if (this.maxWidth && availableWidth > this.maxWidth) { this.width = this.maxWidth; diff --git a/src/tilemap/Tile.js b/src/tilemap/Tile.js index bf2a8f49..f9dc1b10 100644 --- a/src/tilemap/Tile.js +++ b/src/tilemap/Tile.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index c32c28fe..e9530a30 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tilemap/TilemapLayer.js b/src/tilemap/TilemapLayer.js index 1a667379..0f53eedb 100644 --- a/src/tilemap/TilemapLayer.js +++ b/src/tilemap/TilemapLayer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tilemap/TilemapParser.js b/src/tilemap/TilemapParser.js index efe7180d..b9f1a8eb 100644 --- a/src/tilemap/TilemapParser.js +++ b/src/tilemap/TilemapParser.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tilemap/Tileset.js b/src/tilemap/Tileset.js index 0b41d585..1737a6cf 100644 --- a/src/tilemap/Tileset.js +++ b/src/tilemap/Tileset.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/time/Time.js b/src/time/Time.js index d5702c48..f3fe853a 100644 --- a/src/time/Time.js +++ b/src/time/Time.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/time/Timer.js b/src/time/Timer.js index c1abbfd4..71c1acb0 100644 --- a/src/time/Timer.js +++ b/src/time/Timer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/time/TimerEvent.js b/src/time/TimerEvent.js index 83178444..9bc152c5 100644 --- a/src/time/TimerEvent.js +++ b/src/time/TimerEvent.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tween/Easing.js b/src/tween/Easing.js index 96dbcd79..d22f71cb 100644 --- a/src/tween/Easing.js +++ b/src/tween/Easing.js @@ -2,7 +2,7 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tween/Tween.js b/src/tween/Tween.js index ef49f4f8..0329a790 100644 --- a/src/tween/Tween.js +++ b/src/tween/Tween.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/tween/TweenManager.js b/src/tween/TweenManager.js index 7609bdc8..45facbdc 100644 --- a/src/tween/TweenManager.js +++ b/src/tween/TweenManager.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/utils/Color.js b/src/utils/Color.js index 55bb1192..83406df7 100644 --- a/src/utils/Color.js +++ b/src/utils/Color.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/utils/Debug.js b/src/utils/Debug.js index 195e4c53..b44fc1d5 100644 --- a/src/utils/Debug.js +++ b/src/utils/Debug.js @@ -1,6 +1,6 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 27fef26f..0708c2c3 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -2,7 +2,7 @@ /** * @author Richard Davey -* @copyright 2013 Photon Storm Ltd. +* @copyright 2014 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */