4 ms·
If you like this, also check out the Haskell reanimate[1] library. It's a library for animated diagrams inspired by Manim but with a different API design and fe
by tikhonj 6y ago
If you like this, also check out the Haskell reanimate[1] library. It's a library for animated diagrams inspired by Manim but with a different API design and feature set.
Here's a snippet to trace out a rotating rectangle:
do s <- fork $ newSpriteA drawBox
v <- spriteVar s 0 rotate
tweenVar v 2 $ \val -> fromToS val 90
The API docs[2] have a bunch of small examples like this illustrated with inline gifs, which I think is a great touch.
[1]: https://github.com/reanimate/reanimate https://github.com/reanimate/reanimate
[2]: https://hackage.haskell.org/package/reanimate-1.1.2.1/docs/Reanimate.html https://hackage.haskell.org/package/reanimate-1.1.2.1/docs/R...
- jevgeni 6y agoThank you for the library tip!
- monkpit 6y agoIt’s too bad the gifs seem to be just file references instead of real-time animations. Looks like some of the code snippets do not match their animations. For example, parLoopA and parDropA seem to have the same sample code, but have different animations.
- Lemmih 6y agoGood catch. Fixed in HEAD.