In the diagrams tutorial the following text appears:
Some backends support rendering animations (typically as individually indexed files of frames).
> -- Animation > > a :: Animation Cairo V2 Double > a = ... > > main = mainWith a
So from here I started working on a little animation. I found Diagrams.Animation
and discovered that the Animation
type is
type Animation b v n = Active (QDiagram b v n Any)
From there I looked at Data.Active
, and was able to build myself a little Animation
.
At this point I attempted to compile but was told that my Animation
was not Mainable
. I supposed that this must mean that my backend Diagrams.Backend.SVG.CmdLine
did not support animations. So I went and looked at some other backends, but none that I could find made Animation
s Mainable
.
What backends is the tutorial talking about? That is, what backends support animation?
diagrams-cairo
anddiagrams-rasterific
can produce animated GIFs from anAnimation
.diagrams-postscript
has aMainable
instance that saves one numbered file for each frame of theAnimation
.