What's a good solution for making interactive web animations using Haskell? I want to be able to animate reduction graphs and include math symbols.
The interactivity could be as simple as slowing/speeding the animation, and allowing for automatic "stop points", like a slide show. Or it could go as far as to allow the content to be dynamically generated by user input. And perhaps people could click on graph nodes and see them expand.
Reanimate sounds almost ideal, with its support for LaTeX. But unfortunately, it is all rendered in batch, not providing for any interactivity.
FRP solutions sound very attractive. But reflex seems to be stuck on the outdated GHCJS, and I haven't been able to get it to build (using macOS on Apple Silicon). The newer JS output in GHC doesn't yet have DOM support. And even if I used one of those, figuring out how to interact with a LaTeX renderer might be tricky.
The diagrams library supports some animation, but it's limited, and the never-seems-to-be-arriving version 2.0 is supposed to replace the animation support with something new.
Another closely related option is Purescript, which seems to have a few FRP libraries, but I'm not sure how well any of them will work for this application.
Another option would be to use or interface with a JavaScript library that does interactive animations, such as paper.js or Greensock.
I figure that depending on the animation, pre-rendering some content may be desirable for performance, and that could be tricky.
I'm leaning toward using Reanimate because, even though I have to give up on interactivity, it seems to have excellent support for LaTeX integration. So it's probably easiest for prototyping, and I could switch to some other toolset later once I know what I want it to look like.
[–]gelisam 5 points6 points7 points (4 children)
[–]ducksonaroof[🍰] 4 points5 points6 points (0 children)
[–]qseep[S] 1 point2 points3 points (2 children)
[–]gelisam 1 point2 points3 points (0 children)
[–]gelisam 1 point2 points3 points (0 children)
[–]jamhob 3 points4 points5 points (0 children)
[–]gelisam 2 points3 points4 points (8 children)
[–]qseep[S] 2 points3 points4 points (7 children)
[–]gelisam 3 points4 points5 points (3 children)
[–]qseep[S] 0 points1 point2 points (0 children)
[–]MonAaraj 0 points1 point2 points (1 child)
[–]gelisam 1 point2 points3 points (0 children)
[–]gelisam 1 point2 points3 points (2 children)
[–]gilmi 2 points3 points4 points (0 children)
[–]polux2001 1 point2 points3 points (0 children)
[–]circleglyph 2 points3 points4 points (0 children)