mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-10-08 20:01:47 +08:00
chore: 调整抗锯齿设置
This commit is contained in:
parent
3c17b90368
commit
237f3b37db
@ -429,7 +429,6 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
|
|||||||
|
|
||||||
const ctx = canvas.ctx;
|
const ctx = canvas.ctx;
|
||||||
ctx.save();
|
ctx.save();
|
||||||
canvas.setAntiAliasing(this.antiAliasing);
|
|
||||||
if (this.type === 'static') transformCanvas(canvas, tran);
|
if (this.type === 'static') transformCanvas(canvas, tran);
|
||||||
ctx.filter = this.filter;
|
ctx.filter = this.filter;
|
||||||
ctx.globalAlpha = this.alpha;
|
ctx.globalAlpha = this.alpha;
|
||||||
@ -442,9 +441,10 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
|
|||||||
this.cacheDirty = false;
|
this.cacheDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas.ctx.imageSmoothingEnabled = false;
|
canvas.setAntiAliasing(false);
|
||||||
canvas.ctx.drawImage(this.cache.canvas, ax, ay, width, height);
|
canvas.ctx.drawImage(this.cache.canvas, ax, ay, width, height);
|
||||||
} else {
|
} else {
|
||||||
|
canvas.setAntiAliasing(this.antiAliasing);
|
||||||
canvas.ctx.translate(ax, ay);
|
canvas.ctx.translate(ax, ay);
|
||||||
this.render(canvas, tran);
|
this.render(canvas, tran);
|
||||||
this.cacheDirty = false;
|
this.cacheDirty = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user