Skip to content

Instantly share code, notes, and snippets.

@tpjnorton
Created October 5, 2020 18:37
Show Gist options
  • Save tpjnorton/4c8514fd2eee96e4dbdd554c4f9a3ccc to your computer and use it in GitHub Desktop.
Save tpjnorton/4c8514fd2eee96e4dbdd554c4f9a3ccc to your computer and use it in GitHub Desktop.
useCode(
() => [
cond(and(not(breathing), clockRunning(clock)), stopClock(clock)),
cond(
and(not(not(breathing)), not(clockRunning(clock))),
startClock(clock)
),
set(animation, [
loop({
duration: 5000,
clock: clock,
easing: Easing.inOut(Easing.ease),
boomerang: true,
autoStart: false,
}),
]),
],
[animation, breathing]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment