Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add introduce of Spine and DragonBones function. #834

Merged
merged 4 commits into from Feb 14, 2019

Conversation

sunnylanwanjun
Copy link

@sunnylanwanjun sunnylanwanjun commented Feb 13, 2019

dragonbones spine 新增合批,缓存功能文档说明

@@ -16,9 +16,11 @@ The operation of the DragonBones component in the script refer to the [DragonBon
| Dragon Atlas Asset | The json data contains the Texture information. You can drag and drop the Atlas resources exported from DragonBones here.
| Armature | The name of current armature.
| Animation | The name of current playing animation.
| Render Mode | Render mode, default is realtime mode.<br>'realtime' mode, realtime calculate, support all function of dragonbones.<br>'sharedCache' mode, cache animation data and share it, similar to frame animation, has good performace and use less memery, not support animation blend, only support start and complete event, it is appropriate for effect, npc and so on.<br>'privateCache' mode, similar to 'sharedCache' mode, but do not share animation data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. support all function -> support all functions
  2. 'sharedCache' 各模式的符号不对,参考image的写法
  3. SHAREDCACHE mode, caching and sharing dragonbones animation data, similar to converting dragonbones animation to frame animation. Has higher performance and less memory usage. And animation blend is not supported, only action start and end events are supported. It is appropriate for special effects, NPC animation and so on.
    PRIVATECACHE mode, similar to SHAREDCACHE, but does not share animation data.

| Time Scale | The time scale of this armature.
| Play Times | The play times of the default animation.<br>-1 means using the value of config file.<br>0 means repeat for ever.<br>>0 means repeat times.
| Premultiplied Alpha| Indicates whether to enable premultiplied alpha, default is True. (New in v2.0.7)<br>You should disable this option when image's transparent area appears to have opaque pixels.<br>or enable this option when image's half transparent area appears to be darken.
| Debug Bones | Indicates whether open debug bones.
| Enabled Batch | Indicates whether open batch, default is close.<br>If open it, will reduce drawcall, it's appropriate for a lot of same and simple animation playing together.<br>If close it, will rise drawcall, but will reduce pressure of cpu, it's appropriate for complex animation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whether to enable animation batch.
When enable, drawcall will reduce, which is suitable for a large number of simple animations to play at the same time.
When not enabled, drawcall will rise, but it can reduce the computational burden of the CPU. Suitable for complex animations.

| Time Scale | 当前骨骼中所有动画的时间缩放率
| Play Times | 播放默认动画的循环次数。<br>-1 表示使用配置文件中的默认值;<br>0 表示无限循环;<br>>0 表示循环次数
| Premultiplied Alpha| 图片是否启用贴图预乘,默认为 True。(v2.0.7 中新增)<br>当图片的透明区域出现色块时需要关闭该项。<br>当图片的半透明区域颜色变黑时需要启用该项
| Debug Bones | 是否显示 bone 的 debug 信息
| Enabled Batch | 是否开启动画合批,默认关闭。<br>开启时,能减少drawcall,适合于大量且简单动画同时播放的情况。关闭时,drawcall会上升,但能减少cpu的运算负担,适用于复杂的动画。
Copy link
Contributor

@xunyi0 xunyi0 Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当启用时,drawcall 将减少。适合于同时播放大量的简单动画。
当未启用时,drawcall 将上升,但是可以减少 CPU 的计算负担。适合复杂的动画。

@xunyi0 xunyi0 merged commit 3cfd555 into cocos:next Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants