TextureSource respects Config.PixelArt setting

This commit is contained in:
Richard Davey 2017-06-08 00:12:22 +01:00
parent e5f5b557b1
commit ffb2bd5534
2 changed files with 7 additions and 1 deletions

View file

@ -1,4 +1,4 @@
var CHECKSUM = {
build: '6119e880-4bd3-11e7-aa12-bf3ba1adff6e'
build: '739c09e0-4bd6-11e7-ac7d-595a6798b3a1'
};
module.exports = CHECKSUM;

View file

@ -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);