You need to write the animation to disk, and then run it through some static interface. Here is an idea on how to do this:
Make your web server item / animation in / var / www / animations
Save the animation in this folder (you can save mp4 and use HTML5, but if you want to save GIF this SO contains information about what you need. Use the model to store the initialization parameters and hash from them (which would make a decent file name).
Change it in your templates with the usual img tag (or video tag if you are using mp4).
source
share