How to setup saving Animated GIFs from HAniS -- the HTML5 AnimationS webapp
Page updated: July, 2021
When you want to allow users to save an "animated GIF" file of the
current HAniS animation, you should do the following
- In the current (version 4.41 and later) HAniS code ZIP file, you
will find another ZIP file, animated.gif, which you
must also "un-zip" in the same directory as the HAniS
JavaScript code is located. This will add 4 files to your directory.
- Add <script src="gif.js"> </script> to your HTML
along with the hanis.js or hanis_min.js
- In your "configuration", add anigif to the list of
"controls" (or "bottom_controls")
- If you want to provide for a filename to save the animated GIF
to, include the "parameter", anigif_filename=
- If you want the user to be prompted for a different filename,
include the "parameter", anigif_prompt=
When the user clicks the "Make GIF" button (or whatever you relabeled
it as), the label will first change to say "Loading". At this point,
the animation will run through once from the beginning. After this,
the button label will change to show a percent completion as the
"rendering" takes place. After the file is saved, the original label
is restored.
The frame rate of the animated GIF will be the same as the frame rate
in HAniS. Also, the size of the images will be the size of the
images displayed in HAniS.
Back to the HAniS homepage