This commit is contained in:
Dennis Postma 2025-01-10 21:03:02 +01:00
parent fb18841c91
commit 4067ec2585
4 changed files with 12 additions and 13 deletions

12
package-lock.json generated
View File

@ -3085,9 +3085,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.79",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.79.tgz",
"integrity": "sha512-nYOxJNxQ9Om4EC88BE4pPoNI8xwSFf8pU/BAeOl4Hh/b/i6V4biTAzwV7pXi3ARKeoYO5JZKMIXTryXSVer5RA==",
"version": "1.5.80",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.80.tgz",
"integrity": "sha512-LTrKpW0AqIuHwmlVNV+cjFYTnXtM9K37OGhpe0ZI10ScPSxqVSryZHIY3WnCS5NSYbBODRTZyhRMS2h5FAEqAw==",
"dev": true,
"license": "ISC"
},
@ -4916,9 +4916,9 @@
"license": "BlueOak-1.0.0"
},
"node_modules/papaparse": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.5.0.tgz",
"integrity": "sha512-rlVJyYL5QMvue8f/RNGpchWAiTc42GzJD/dqD/YgxJxmQ7TWQh5/7aN3p/aqxkYTRl/BkODi6Qsau1r2bt42JQ==",
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.5.1.tgz",
"integrity": "sha512-EuEKUhyxrHVozD7g3/ztsJn6qaKse8RPfR6buNB2dMJvdtXNhcw8jccVi/LxNEY3HVrV6GO6Z4OoeCG9Iy9wpA==",
"dev": true,
"license": "MIT"
},

View File

@ -74,10 +74,9 @@ onMounted(() => {
})
onBeforeUnmount(() => {
if (tileMap) {
if (!tileMap) return
tileMap.destroyLayer('tiles')
tileMap.removeAllLayers()
tileMap.destroy()
}
})
</script>

View File

View File

@ -11,7 +11,7 @@ export async function loadTexture(scene: Phaser.Scene, textureData: TextureData)
// Check if the texture is already loaded in Phaser
if (gameStore.game.loadedTextures.find((texture) => texture === textureData.key)) {
return Promise.resolve(true)
return true
}
// If there's already a loading promise for this texture, return it
@ -49,7 +49,7 @@ export async function loadTexture(scene: Phaser.Scene, textureData: TextureData)
}
textureLoadingPromises.delete(textureData.key) // Clean up the promise
return Promise.resolve(false)
return false
})()
// Store the loading promise