fix: 修复Sprite动画最后一帧有偏差的问题#461
Merged
Merged
Conversation
修复renderTxt2ImgBitmap行高全局样式污染
Contributor
Author
|
补充一点,这样修改后,还可以统一画布从头播放、跳过动画直接从中间播放,两种播放方式之间的动画差异。 |
Collaborator
|
我对代码稍作调整,试试应该也能解决问题了吧? |
Contributor
Author
|
有点小问题,如果 iterCount 设置的不是整数,比如设置成1.5,最后process强制为1就不行了,虽然好像一般没人这么干…… 另外还有个新发现的问题,如果动画结束后,元素值和最开始不一样了,比如 0% opacity:1,100% opacity:0,这时跳回开始时间,元素opacity值不会变回1。那是不是把前面时间也强制改成 process=0 那帧?或者备份一下元素属性值,但看代码感觉备份属性值好麻烦 |
Collaborator
|
先这样吧,碰到实际场景再解决; 这个解决方法在 Pro 版运行较长时间了(改动很小,我忘记合入开源版了。。。 另外目前的动画方案其实有一些限制,参考: #389 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
判断当前时间大于动画时间,则统一渲染为动画最后一帧的效果,以避免最后一帧的偏差 #460