Skip to content

Instantly share code, notes, and snippets.

@stakes
Created December 23, 2018 05:24
Show Gist options
  • Save stakes/438e1a9de509adee4948a923690916ed to your computer and use it in GitHub Desktop.
Save stakes/438e1a9de509adee4948a923690916ed to your computer and use it in GitHub Desktop.
Loop Animation: Framer X code override
import { Data, animate, Override, Animatable } from "framer";
const data = Data({ rotation: Animatable(0) });
export const SecondHandRotate: Override = () => {
BeginRotateAnimation();
return {
rotation: data.rotation,
originY: 1
};
};
const BeginRotateAnimation = async () => {
data.rotation = 0;
await animate.linear(data.rotation, 360).finished;
BeginRotateAnimation();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment