Compare commits

..

No commits in common. "2a59e135ba1fdb2000d765d1d414f07f4f1dee81" and "e65ea56a6848ab24f95f58a7092c928683a589c1" have entirely different histories.

2 changed files with 2 additions and 5 deletions

View File

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

View File

@ -429,6 +429,7 @@ 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;
@ -441,10 +442,8 @@ export abstract class RenderItem<E extends ERenderItemEvent = ERenderItemEvent>
this.cacheDirty = false; this.cacheDirty = 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;