fixed flickering issue with maps module

pull/95/head
jmoenig 2020-03-25 12:20:04 +01:00
rodzic 6fc9d726ea
commit c455f416c2
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -38,7 +38,7 @@
// Global stuff ////////////////////////////////////////////////////////
modules.maps = '2020-March-19';
modules.maps = '2020-March-25';
// WorldMap /////////////////////////////////////////////////////////////
@ -287,7 +287,10 @@ WorldMap.prototype.render = function () {
}
}
this.canvas = newCanvas(this.extent, true, this.canvas);
// create a new canvas. Note, we cannot reuse the existing canvas,
// because it could be queried while tiles are still rendering
this.canvas = newCanvas(this.extent, true);
ctx = this.canvas.getContext('2d');
for (x = 0; x < tileGrid.x; x += 1) {
for (y = 0; y < tileGrid.y; y += 1) {

Wyświetl plik

@ -3484,6 +3484,7 @@ SpriteMorph.prototype.wearCostume = function (costume, noShadow) {
y = this.yPosition ? this.yPosition() : null,
idx = isNil(costume) ? null : this.costumes.asArray().indexOf(costume),
isWarped = this.isWarped;
if (isWarped) {
this.endWarp();
}