fix image loading

This commit is contained in:
Simon Vieille 2023-03-12 22:53:59 +01:00
parent fb61142ca5
commit 25922a4779
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -84,12 +84,12 @@ createApp({
}
},
loadImages() {
images.forEach((info) => {
images.forEach((info, i) => {
img = new Image()
img.onload = () => {
--this.imagesToLoad
++this.imagesLoaded
this.images.push(info)
this.images[i] = info
}
img.onerror = () => {
--this.imagesToLoad