bgporter / animator

Flexible animation controller for JUCE applications
MIT License
75 stars 12 forks source link

[Feature] Allow duration to be specified in seconds #3

Closed sudara closed 1 year ago

sudara commented 2 years ago

Hi Brett!

Back to working with animator and enjoying it! I might add a few issues as a way of communicating my usage. No pressure though, they are mainly that "first time user's friction" as well as some excited ideas. I've worked with a few other animation libraries. If any of the things I say can be helpful, then woo!

The most useful change to me would be able to specify duration in seconds, especially to Parametric. This is common in [other animation libraries](https://greensock.com/docs/v3/GSAP/gsap.to()) and a nice way to think of the actual animation itself, discuss with my designer, etc. (And I don't have to pepper my code with some math).

Abstracting frame would also allow for some nice features like throttling the frame-rate on some platforms without having to re-write code (I'm defaulting to 60fps).

I understand a concern might be that there's not a "time guarantee" — for example if there's some heavy duty painting which slows rendering calls. This is greensock's thinking about it and I also think that maybe just a bit of documentation (and maybe an assert?) would be enough, as in most use cases the benefit to working in seconds would outweigh the potential risk.

Thanks!

bgporter commented 1 year ago

All times changed to ms with 2.0.0!