mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 06:30:38 +00:00
If you set pixelArt
to true in your game config (or antialias
to false) then TileSprites will now respect this when using the Canvas Renderer and disable smoothing on the internal fill canvas.
This commit is contained in:
parent
e48d6bfb01
commit
66445c9fb1
2 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
### Bug Fixes
|
||||
|
||||
* Fixed a bug in the canvas rendering of both the Static and Dynamic Tilemap Layers where the camera matrix was being multiplied twice with the layer, causing the scale and placement to be off (thanks galerijanamar)
|
||||
* If you set `pixelArt` to true in your game config (or `antialias` to false) then TileSprites will now respect this when using the Canvas Renderer and disable smoothing on the internal fill canvas.
|
||||
|
||||
### Examples and TypeScript
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ var Components = require('../components');
|
|||
var CONST = require('../../const');
|
||||
var GameObject = require('../GameObject');
|
||||
var GetPowerOfTwo = require('../../math/pow2/GetPowerOfTwo');
|
||||
var Smoothing = require('../../display/canvas/Smoothing');
|
||||
var TileSpriteRender = require('./TileSpriteRender');
|
||||
var Vector2 = require('../../math/Vector2');
|
||||
|
||||
|
@ -504,6 +505,11 @@ var TileSprite = new Class({
|
|||
|
||||
var ctx = this.context;
|
||||
|
||||
if (!this.scene.sys.game.config.antialias)
|
||||
{
|
||||
Smoothing.disable(ctx);
|
||||
}
|
||||
|
||||
var scaleX = this._tileScale.x;
|
||||
var scaleY = this._tileScale.y;
|
||||
|
||||
|
|
Loading…
Reference in a new issue