Fix for two js warnings

"Failed to load tile" when reloading the page during a tile-load
"Texture marked as update..."
This commit is contained in:
Blue (Lukas Rieger) 2021-03-23 13:37:55 +01:00
parent 62ae25c6ae
commit 89694564e0
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800
2 changed files with 2 additions and 1 deletions

View File

@ -267,7 +267,7 @@ export class Map {
texture.wrapT = ClampToEdgeWrapping;
texture.flipY = false;
texture.flatShading = true;
texture.needsUpdate = true;
texture.image.addEventListener("load", () => texture.needsUpdate = true);
this.loadedTextures.push(texture);

View File

@ -195,6 +195,7 @@ export class TileManager {
.catch(error => {
if (error.status && error.status === "empty") return;
if (error.target && error.target.status === 404) return;
if (error.type && error.type === "abort") return;
alert(this.events, "Failed to load tile: " + error, "warning");
})