Chain animation after a runTiming
#1393
-
So I got my element to move with My code right now: const changeRunnerPosition = (cx, cy, newX, newY) => {
const duration = 400;
runTiming(cx, newX, {duration});
runTiming(cy, newY, {duration});
}; Pseudocode for what I want to achieve: const changeRunnerPosition = (cx, cy, newX, newY) => {
const duration = 400;
runTiming(cx, newX, {duration}, {
onEnd: () => {
//I would assume something like runInterpolate or sth to get it to spin?
}
)});
...
}; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
This is a great question. If you want to build more complex animations, we currently recommend to use Reanimated (UI-thread-level Reanimated integration will be available in the next release if everything goes to plan). If you are looking for more information on this topic, please refer to this thread: #805 |
Beta Was this translation helpful? Give feedback.
This is a great question.
Run timing as a completion callback:
react-native-skia/package/src/animation/timing/runTiming.ts
Line 27 in 94204d6
If you want to build more complex animations, we currently recommend to use Reanimated (UI-thread-level Reanimated integration will be available in the next release if everything goes to plan). If you are looking for more information on this topic, please refer to this thread: #805