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

FPS rate only works if 'playbackRate' is set to throttle #58

Closed
Mamboleoo opened this issue Jun 1, 2019 · 2 comments
Closed

FPS rate only works if 'playbackRate' is set to throttle #58

Mamboleoo opened this issue Jun 1, 2019 · 2 comments

Comments

@Mamboleoo
Copy link

I was trying to force a lower FPS by setting the property fps: 4 in my settings (as shown in the docs https://github.com/mattdesl/canvas-sketch/blob/master/docs/animated-sketches.md) but I couldn't make it work unless I also defined the playbackRate to throttle.

I dug a bit in the source code and I found that without the playbackRate the fps value was never taken into account.

} else if (playbackRate === 'throttle') {

I don't know if it should be set to throttle as a default but I think it should be mentioned in the docs :)

Thanks for the library btw 💙

@Mamboleoo Mamboleoo changed the title FPS rate only work if 'playbackRate' is set to throttle FPS rate only works if 'playbackRate' is set to throttle Jun 1, 2019
@mattdesl
Copy link
Owner

mattdesl commented Jun 5, 2019

Yup this is something that might need better documentation and a bit more thought around.

I didn't want to throttle FPS by default as the real-time animation will feel slightly less fluid. So without throttling, the fps setting is still used (it affects total frame count and deltaTime interval on animation export), but you won't notice a difference when watching the animation loop in the browser.

@Mamboleoo
Copy link
Author

Thanks for the reply, it makes sense now!

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