worklet.cancelAnimation

worklet.cancelAnimation(SharedValue SharedValue)

小程序插件:不支持

相关文档: worklet 动画

功能描述

取消由 SharedValue 驱动的动画。

参数

SharedValue SharedValue

共享变量。

示例代码

const { shared, timing, cancelAnimation } = wx.worklet
const offset = shared(0);
offset.value = timing(100);
cancelAnimation(offset)
posted on 2025-01-02 09:29  AtlasLapetos  阅读(9)  评论(0)    收藏  举报