mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
implement texture bleeding for dynamic atlas (#2728)
This commit is contained in:
@@ -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] = {
|
||||
|
||||
Reference in New Issue
Block a user