Make flame with Elm

Presently sponsored by Serverless Guru: Your guide to cloud excellence, helping you every step of your serverless journey, including team training, pattern development, mass service migrations, architecting, and developing new solutions. Speak to a Guru today.

A friend of mine, Roger Engelber, pointed me to a nice article  on doing functional programming in Lua. The article detailed the steps to generate a flame like effects using a simple particle system.

Of course, it naturally lead to me trying to do the same in Elm!

 

To translate the approach was really straight forward, though there are some minor differences, e.g. alpha values in Elm are between 0 to 1 but 0 to 255 in Lua.

 

The code is available on github, feel free to poke around.

Here are two variations in action:

 

Links

Source code

Live demo 1

Live demo 2

Live demo 3

Live demo 4

Leave a Comment

Your email address will not be published. Required fields are marked *