我创建了一个加载 Tiled Map 文件的类,并将其作为包含大量位图的 createjs Container 进行电子竞技。它可以工作,但是我想在加载地图后对其进行缓存。
地图显示得很好,但是当我打电话时,我打电话给 that.sprite.cache()
Uncaught Error: InvalidStateError: DOM Exception 11 easeljs-min.js:63
b.draw easeljs-min.js:63 b.draw easeljs-min.js:74
b.draw easeljs-min.js:75 b.update easeljs-min.js:84
(anonymous function) Main.js:43
b.dispatchEvent easeljs-min.js:14
c._tick easeljs-min.js:20 c._handleTimeout
https://gist.github.com/anonymous/5924127
我该如何解决?我读到未加载图像时会引发错误,但即使我在 10 秒后调用它也会引发错误!:/