rsify / pico

Take browser screenshots in Javascript 📸
MIT License
1.96k stars 45 forks source link

Support running animations #4

Open rsify opened 4 years ago

rsify commented 4 years ago

Some cutting edge animation libraries (like elm-animator) render the animated UI using generated CSS keyframes, instead of setting properties manually on every frame with requestAnimationFrame.

Currently all animations render out the initial state, which for the described case is completely breaking, and for other smaller cases perhaps unintuitive at the least.

To achieve the desired behavior we need to collapse each animation into frames which could be possible with the new Web Animations API, but I haven't looked into it in much detail.