Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to have more values in short duration? #921

Open
humbleCoder1990 opened this issue Oct 20, 2021 · 1 comment
Open

How to have more values in short duration? #921

humbleCoder1990 opened this issue Oct 20, 2021 · 1 comment

Comments

@humbleCoder1990
Copy link

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 humbleCoder1990 changed the title How to have long values in short duration? How to have more values in short duration? Oct 20, 2021
@stokesman
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants