implement texture bleeding for dynamic atlas (#2728)

This commit is contained in:
yinkaile
2018-06-05 11:15:43 +08:00
committed by pandamicro
parent bde33ce208
commit 423a698e4f
@@ -1,4 +1,4 @@
const space = 1;
const space = 2;
class Atlas {
constructor (width, height) {
@@ -46,6 +46,11 @@ class Atlas {
return false;
}
// texture bleeding
this._texture.drawTextureAt(texture, this._x-1, this._y);
this._texture.drawTextureAt(texture, this._x+1, this._y);
this._texture.drawTextureAt(texture, this._x, this._y-1);
this._texture.drawTextureAt(texture, this._x, this._y+1);
this._texture.drawTextureAt(texture, this._x, this._y);
this._innerTextureInfos[texture._id] = {