-
Creator 版本: 2.2.1
-
目标平台:ios、android
creator编辑器平台:win10
如题:
let animation = node.getComponent(cc.Animation);
cc.loader.loadRes("frameAtlas/atlas', cc.SpriteAtlas, (err, atlas) => {
let spriteFrames = atlas.getSpriteFrames();
let clip = cc.AnimationClip.createWithSpriteFrames(spriteFrames, 10);
clip.name = 'test';
clip.wrapMode = cc.WrapMode.Loop;
animation.addClip(clip);
animation.play('test');
});
上述帧动画代码release打包后,在native平台显示异常,播放速度貌似加快了不少。此处的合图用的是cocos的自动图集文件。 但是如果用TexturePacker打包的plist合图文件,显示正常。