我有一个简单的补丁:
const grass = styler(/* some element */)
const from = +grass.get('opacity')
const tweener = tween({from, to: 0, duration: 5000, ease: easing.linear}).start(v => grass.set('opacity', v))我如何让它跳到补间的结尾,然后立即停止补间?例如,在这种情况下,跳到0不透明度并停止补间?我知道我能做到:
grass.set('opacity', 0)
tweener.stop()但我相信有一个更自然的解决方案。类似于:
tweener.jumpToEndAndStop()提亚
发布于 2021-05-21 09:36:06
基于https://code.tutsplus.com/tutorials/introduction-to-popmotion-part-1-tween--cms-30431,我想这就是我想要的:
tweener.seek(1)
tweener.stop()https://stackoverflow.com/questions/67629531
复制相似问题