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

Make parameters independent of rendering speed #43

Closed
CWBudde opened this issue Jan 2, 2022 · 0 comments · Fixed by #85
Closed

Make parameters independent of rendering speed #43

CWBudde opened this issue Jan 2, 2022 · 0 comments · Fixed by #85
Labels
enhancement New feature or request v2.x

Comments

@CWBudde
Copy link
Contributor

CWBudde commented Jan 2, 2022

Several parameters (such as the decay time) are currently dependent on the rendering time. This means that the output is significantly different for a different frame rate. I.e. with 60 fps the rays decay earlier than with 30 fps (twice as fast). In fact it should take the time since the last rendering into account.

To do so, the additional 'timestamp' from the requestAnimationFrame call can be used. This must only be compared to the previous timestamp. The initial timestamp can be retrieved by using window.now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants