popmotion icon indicating copy to clipboard operation
popmotion copied to clipboard

How to have more values in short duration?

Open humbleCoder1990 opened this issue 3 years ago • 1 comments

I want to have a lot of grains in short duration. but no success. I have this.

animate ({ onUpdate : v => {console.log(v)}, duration : 50 })

This code only displays 4 values (0.22, 0.77, 0.99, 1). I want to have more longer values, like 0.01, 0.02, 0.03, 0.04, 0.05 etc even in 50ms.

Is there any option what i'm missing?

humbleCoder1990 avatar Oct 20 '21 18:10 humbleCoder1990

If you need it to be in actual time duration, making a driver that runs off of setTimeout can increase the frequency of updates but even then the interval will be at the smallest ~4ms and no guarantee of a consistent interval.

There are also the iterators which could be used to synchronously produce all the values at any granularity you like.

stokesman avatar Oct 21 '21 15:10 stokesman