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:
parent
62ae25c6ae
commit
89694564e0
|
@ -267,7 +267,7 @@ export class Map {
|
||||||
texture.wrapT = ClampToEdgeWrapping;
|
texture.wrapT = ClampToEdgeWrapping;
|
||||||
texture.flipY = false;
|
texture.flipY = false;
|
||||||
texture.flatShading = true;
|
texture.flatShading = true;
|
||||||
texture.needsUpdate = true;
|
texture.image.addEventListener("load", () => texture.needsUpdate = true);
|
||||||
|
|
||||||
this.loadedTextures.push(texture);
|
this.loadedTextures.push(texture);
|
||||||
|
|
||||||
|
|
|
@ -195,6 +195,7 @@ export class TileManager {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.status && error.status === "empty") return;
|
if (error.status && error.status === "empty") return;
|
||||||
if (error.target && error.target.status === 404) 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");
|
alert(this.events, "Failed to load tile: " + error, "warning");
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue