Phaser.CANVAS_PX_ROUND is a boolean. If 'true' the Canvas renderer will Math.floor() all coordinates before drawImage, stopping pixel interpolation. Defaults to false.

Phaser.CANVAS_CLEAR_RECT is a boolean. If 'true' (the default) it will context.clearRect() every frame. If false this is skipped (useful if you know you don't need it)
Collision now works between Sprites positioned via sprite.x/y, sprite.body.x/y or sprite.body.velocity.
If you are tweening a sprite and still want physics collision, set `sprite.body.moves = false` otherwise it will fight against the tween motion.
This commit is contained in:
photonstorm
2014-01-31 04:14:02 +00:00
parent 68b7d22e0d
commit 13a86765cb
6 changed files with 101 additions and 41 deletions
+1 -3
View File
@@ -734,8 +734,6 @@ Phaser.TilemapLayer.prototype.render = function () {
this._ty = this._dy;
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
// this.context.fillStyle = '#ff00ff';
// this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
this.context.fillStyle = this.tileColor;
@@ -802,7 +800,7 @@ Phaser.TilemapLayer.prototype.render = function () {
if (tile.debug)
{
this.context.fillStyle = 'rgba(0,255,0,0.5)';
this.context.fillStyle = 'rgba(0, 255, 0, 0.4)';
this.context.fillRect(Math.floor(this._tx), Math.floor(this._ty), this.map.tileWidth, this.map.tileHeight);
}
}