diff --git a/README.md b/README.md index cb058f15..4a31cd0b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,15 @@ Change Log Version 1.0.6 (in progress) * Added check into Pointer.move to always consider a Sprite that has pixelPerfect enabled, regardless of render ID. -* BUG Found: The pixel perfect click check doesn't work if the sprite is part of a texture atlas yet. +* 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) + Version 1.0.5 (September 20th 2013) diff --git a/examples/display/graphics.php b/examples/display/graphics.php index 3c89137c..70f011f6 100644 --- a/examples/display/graphics.php +++ b/examples/display/graphics.php @@ -1,5 +1,5 @@ @@ -9,14 +9,7 @@ (function () { - var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update, render: render }); - - function preload() { - - game.load.image('atari1', 'assets/sprites/atari130xe.png'); - - } - + var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { create: create }); function create() { @@ -27,12 +20,12 @@ graphics.lineStyle(10, 0xffd900, 1); // draw a shape - graphics.moveTo(50,50); + graphics.moveTo(0,50); graphics.lineTo(250, 50); graphics.lineTo(100, 100); graphics.lineTo(250, 220); graphics.lineTo(50, 220); - graphics.lineTo(50, 50); + graphics.lineTo(0, 50); graphics.endFill(); // set a fill and line style again @@ -49,7 +42,7 @@ graphics.lineTo(210,300); graphics.endFill(); - // draw a rectangel + // draw a rectangle graphics.lineStyle(2, 0x0000FF, 1); graphics.drawRect(50, 250, 100, 100); @@ -64,15 +57,6 @@ game.add.tween(graphics).to({ x: 200 }, 2000, Phaser.Easing.Linear.None, true, 0, 1000, true); - // graphics.rotation = 1.2; - // graphics.angle = 10; - - } - - function update() { - } - - function render() { } })(); diff --git a/src/Phaser.js b/src/Phaser.js index 65640f6e..fce79be0 100644 --- a/src/Phaser.js +++ b/src/Phaser.js @@ -3,7 +3,7 @@ */ var Phaser = Phaser || { - VERSION: '1.0.5', + VERSION: '1.0.6', GAMES: [], AUTO: 0, CANVAS: 1, diff --git a/src/gameobjects/Graphics.js b/src/gameobjects/Graphics.js index a28f45ff..9bafc76b 100644 --- a/src/gameobjects/Graphics.js +++ b/src/gameobjects/Graphics.js @@ -8,38 +8,12 @@ Phaser.Graphics = function (game, x, y) { }; -Phaser.Graphics.prototype = Object.create( PIXI.Graphics.prototype ); +Phaser.Graphics.prototype = Object.create(PIXI.Graphics.prototype); Phaser.Graphics.prototype.constructor = Phaser.Graphics; - Phaser.Graphics.prototype = Phaser.Utils.extend(true, Phaser.Graphics.prototype, Phaser.Sprite.prototype); // Add our own custom methods -/** - * Automatically called by World.update - */ -Phaser.Graphics.prototype.OLDupdate = 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() { @@ -51,29 +25,3 @@ Object.defineProperty(Phaser.Graphics.prototype, 'angle', { } }); - -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; - } - -}); - -*/