Merge pull request #385 from fsih/fixBlurry

Always use nearest for raster textures
This commit is contained in:
Chris Willis-Ford
2019-01-03 14:00:29 -05:00
committed by GitHub

View File

@@ -426,16 +426,16 @@ class Drawable {
* Should the drawable use NEAREST NEIGHBOR or LINEAR INTERPOLATION mode
*/
get useNearest () {
// We can't use nearest neighbor unless we are a multiple of 90 rotation
if (this._direction % 90 !== 0) {
return false;
}
// Raster skins (bitmaps) should always prefer nearest neighbor
if (this.skin.isRaster) {
return true;
}
// We can't use nearest neighbor unless we are a multiple of 90 rotation
if (this._direction % 90 !== 0) {
return false;
}
// If the scale of the skin is very close to 100 (0.99999 variance is okay I guess)
if (Math.abs(this.scale[0]) > 99 && Math.abs(this.scale[0]) < 101 &&
Math.abs(this.scale[1]) > 99 && Math.abs(this.scale[1]) < 101) {