creator3.2.1 bug,动态加载图片,用tween动画问题

列表中,滑动节点动态加载图片,使用tween动画控制透明度,会出现动态加载的图片不显示。
这个bug3.2.0没有,3.2.1上必现。
直接上demo
testTweAlpha.zip (2.7 MB)
test代码有注释

跪求官方大佬康康

你好,可以合并这几个 pr 试试:
https://github.com/cocos-creator/engine/pull/8985
https://github.com/cocos-creator/engine/pull/9049
https://github.com/cocos-creator/engine/pull/9057
https://github.com/cocos-creator/engine/pull/9103

You can use color.a to tween maybe :slight_smile:

这确定是个bug么,代码注释的两种骚操作目测还是能正常的实现功能

不好使,而且这个节点也没有渲染组件,用的是UIOpacity,透明度是对节点和它子节点的:rofl:

I used SpriteComponent.color to tween opacity normally like this :
edited :slight_smile:
this.sprite.color = new Color(255, 255, 255, 0);
tween(this.sprite.color)
.to(duration,{a : 255})
.start();


我这样写对么,图片显示不出来,红框中代码注释掉是正常的

透明度不设置成0,设置1试试。

demo里有两种骚操作,一种是delay等待时间极短,如0.01,一种是设为透明的时候设个大于0的,如0.1,都是看着正常的。:joy:

Is that you check this function
resources.load(path, SpriteFrame, ())
Is it return assets / error?

no problem,刚测试了很多遍,不会报错,图片都是能加载成功的

I saw it.
Maybe it’s bug when you start tween first.
You can try start tween after you changed the spriteFrame.
It’s working perfect for me!

Yeah, it’s OK​:+1:

1赞