Hello, I’m following a blog post on stripe
They are using animating a tube curve using setDrawRange.
And it works but when I tried to undraw it by updating the start value on draw range the curve keeps flickering?
const unDrawAnimatedLine = () => {
let drawRangeCount = 1;
const timeElapsed = performance.now() - startTime;
const progress = timeElapsed / 2500;
drawRangeCount = progress * 3000;
if (progress < 0.999) {
console.log(arcRef.current.drawRange);
arcRef.current.setDrawRange(
drawRangeCount,
arcRef.current.drawRange.count
);
requestAnimationFrame(unDrawAnimatedLine);
}
};