How to create an animation?

65 views
Skip to first unread message

cass...@gmail.com

unread,
Jun 21, 2016, 11:21:22 PM6/21/16
to Elm Discuss
How can I make a .gif?

Robert Walter

unread,
Jun 22, 2016, 6:08:00 AM6/22/16
to Elm Discuss
Not sure what you mean exactly.
Have you had a look at the Elm Architecture tutorial? It actually uses an example where it renders a gif: http://guide.elm-lang.org/architecture/effects/http.html

If that's what you want, Html.img is the function you are looking for: http://package.elm-lang.org/packages/evancz/elm-html/4.0.1/Html#img

A simple example:

import Html exposing (img)
import Html.Attributes exposing (src)

main =
  img [ src "gif.gif" ] [ ] 

Frederick Yankowski

unread,
Jun 22, 2016, 9:50:56 AM6/22/16
to Elm Discuss
I would start with https://github.com/jamesmacaulay/elm-gif-lab.

However, it doesn't appear to be updated to Elm 0.17.
Reply all
Reply to author
Forward
0 new messages