Skip to content

Commit f408c96

Browse files
author
liply
committed
change scale mode by smooth flag
1 parent 852df7d commit f408c96

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/rpg_core/Bitmap.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,14 @@ Bitmap.prototype._createCanvas = function(width, height){
7272
Bitmap.prototype._createBaseTexture = function(source){
7373
this.__baseTexture = new PIXI.BaseTexture(source);
7474
this.__baseTexture.mipmap = false;
75-
this.__baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST;
7675
this.__baseTexture.width = source.width;
7776
this.__baseTexture.height = source.height;
78-
this.smooth = this._smooth;
77+
78+
if (this._smooth) {
79+
this._baseTexture.scaleMode = PIXI.SCALE_MODES.LINEAR;
80+
} else {
81+
this._baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST;
82+
}
7983
};
8084

8185
Bitmap.prototype._clearImgInstance = function(){

0 commit comments

Comments
 (0)