06-14-2018 16:06 - edited 06-14-2018 16:06
06-14-2018 16:06 - edited 06-14-2018 16:06
I'm developing a watch face for the versa and was looking to do a arc rotation animation. I was using RequestAnimationFrame. However, when I use it, theres a ridiculous amount of lag on the versa and it looks super choppy and not smooth. Is this happening for anyone else and I've added my code to see if anyone has any suggestions on better ways to do it. Thanks!
export function animateBody(curr, targetAngle, arcBody) { arcBody.sweepAngle = curr; if (curr < targetAngle+10) { requestAnimationFrame(function () { animateBody(curr, targetAngle, arcBody); }); } curr += 10; }
06-30-2018 07:06
06-30-2018 07:06
Have you tried defining it as a property animation in SVG, then starting and stopping the animation via JS.
https://dev.fitbit.com/build/guides/user-interface/animations/