Commit ae072eba authored by rockyl's avatar rockyl

增加缓存整个动画集的功能

parent dd15fa4a
......@@ -402,7 +402,7 @@ export default class AssetsManager{
putFrameAnim(img, data);
const animations = [];
const animations = {};
for (let name in data.mc) {
const animation = getFrameAnimation(name);
if (cache) {
......@@ -413,7 +413,11 @@ export default class AssetsManager{
}
this.cacheRes(animation, name, uuid);
}
animations.push(animation);
animations[name] = animation;
}
if (cache) {
this.cacheRes(animations, url, uuid);
}
return animations;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment