mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
TextureSource respects Config.PixelArt setting
This commit is contained in:
parent
e5f5b557b1
commit
ffb2bd5534
2 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '6119e880-4bd3-11e7-aa12-bf3ba1adff6e'
|
||||
build: '739c09e0-4bd6-11e7-ac7d-595a6798b3a1'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -125,11 +125,17 @@ var TextureSource = function (texture, source, width, height)
|
|||
{
|
||||
game.renderer.createTexture(this, width, height);
|
||||
}
|
||||
|
||||
if (game.config.pixelArt)
|
||||
{
|
||||
this.setFilter(1);
|
||||
}
|
||||
};
|
||||
|
||||
TextureSource.prototype.setFilter = function (filterMode)
|
||||
{
|
||||
var game = this.texture.manager.game;
|
||||
|
||||
if (game.config.renderType === CONST.WEBGL)
|
||||
{
|
||||
game.renderer.setTextureFilterMode(this.glTexture, filterMode);
|
||||
|
|
Loading…
Add table
Reference in a new issue