mirror of
https://github.com/wassname/phaser.git
synced 2026-08-12 12:20:38 +08:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user