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

Frame drawing is bad #26

Closed
Rudxain opened this issue May 18, 2022 · 2 comments
Closed

Frame drawing is bad #26

Rudxain opened this issue May 18, 2022 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Rudxain
Copy link
Owner

Rudxain commented May 18, 2022

The animation has a max FPS locked at 30, and if requestAnimationFrame is called at a lower frequency, both the FPS and the speed of animation get lower.

I should find a way to let the FPS be independent of the animation speed

@Rudxain Rudxain added bug Something isn't working help wanted Extra attention is needed labels May 18, 2022
@Rudxain
Copy link
Owner Author

Rudxain commented May 19, 2022

I know know that I have to compute a delta value and change the global dimming to have a transparency proportional to that value. I was thinking on still drawing new chars "instantaneously" (draw them on a regular interval) but I realized this may cause artifacts (too many chars) when pausing and resuming the animation (when the user leaves the tab, enters, then exits the tab immediately again, also when the display refresh rate is low), so I guess I have to dim the new chars in the same way the global dimming would do based on the delta. I haven't tested that, so IDK if I'm right.

The problem with that is that low Hz displays will have slower animation speed. This can become a serious problem when I do #5 to allow changing the speed, because the speed will be limited by the users' display Hz

@Rudxain

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant