Re:Show HN: Anime.js – Polyvalent JavaScript Animation Engine
by code_research on Tuesday June 28, 2016 @09:17AM
(#11993527)
thanks, this looks like a good start.
I would like to add "watchers" and "signals" that could trigger sequences. But I do not want to reinvent things, sure there must be something already out there (I am just an occasional user of js animations for gui elements, so I have no clue about the js animation universe).
Re:Show HN: Anime.js – Polyvalent JavaScript Animation Engine
by zachrose on Thursday June 30, 2016 @09:45PM
(#12013326)
Hmm, cool! The way I might go about that using Barrel would be to have many sequences in many players, can hook up your signals to call play() (or pause/rewind/stop, as needed) on the right player.
Also, Barrel has no built-in story for animations or anything HTML specific. But you can include tweening information in the events that make up the sequence, as long as your "doer" function knows how to perform them.
It's called Barrel: https://github.com/zachrose/barrel
You can think of it either as map for setTimeout, or a way to turn sequences into a player object that accepts your own function to perform each point in the sequence.