Compare commits

...

4 Commits

Author SHA1 Message Date
AncTe
e9bfbd9f01
Merge 2a59e135ba into 820dc5bf4c 2025-09-30 05:53:31 +00:00
2a59e135ba fix: 大怪物显示错误 2025-09-30 13:53:15 +08:00
237f3b37db chore: 调整抗锯齿设置 2025-09-30 13:36:35 +08:00
3c17b90368 fix: 部分缩放条件下模糊 2025-09-30 13:35:13 +08:00
2 changed files with 5 additions and 2 deletions

View File

@ -1026,6 +1026,8 @@ export class Layer extends Container<ELayerEvent> {
this.autotiles = {};
this.block.size(width, height);
this.block.clearAllCache();
this.bigImages.clear();
this.moving.clear();
for (const ex of this.extend.values()) {
ex.onMapResize?.(this, width, height);
@ -1160,7 +1162,7 @@ export class Layer extends Container<ELayerEvent> {
this.floorImage.forEach(v => {
if (v.disable) return;
const { x, y } = v;
ctx.fillRect(0, 0, 480, 480);
ctx.fillRect(0, 0, MAP_WIDTH, MAP_HEIGHT);
ctx.drawImage(images[v.name], x, y);
});
}

View File

@ -429,7 +429,6 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
const ctx = canvas.ctx;
ctx.save();
canvas.setAntiAliasing(this.antiAliasing);
if (this.type === 'static') transformCanvas(canvas, tran);
ctx.filter = this.filter;
ctx.globalAlpha = this.alpha;
@ -442,8 +441,10 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
this.cacheDirty = false;
}
canvas.setAntiAliasing(false);
canvas.ctx.drawImage(this.cache.canvas, ax, ay, width, height);
} else {
canvas.setAntiAliasing(this.antiAliasing);
canvas.ctx.translate(ax, ay);
this.render(canvas, tran);
this.cacheDirty = false;