fix image loading
This commit is contained in:
parent
fb61142ca5
commit
25922a4779
|
@ -84,12 +84,12 @@ createApp({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadImages() {
|
loadImages() {
|
||||||
images.forEach((info) => {
|
images.forEach((info, i) => {
|
||||||
img = new Image()
|
img = new Image()
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
--this.imagesToLoad
|
--this.imagesToLoad
|
||||||
++this.imagesLoaded
|
++this.imagesLoaded
|
||||||
this.images.push(info)
|
this.images[i] = info
|
||||||
}
|
}
|
||||||
img.onerror = () => {
|
img.onerror = () => {
|
||||||
--this.imagesToLoad
|
--this.imagesToLoad
|
||||||
|
|
Loading…
Reference in a new issue