My playground I use for playing with fancy and exciting technologies. This one's for elm.
The purpose of this playground is to explore, study and assess the elm language β a delightful language for reliable webapps.
The showcases are intended to be:
- simple: Fairly simple and understandable. Every showcase is implemented in a single elm file.
- exploratory:
- playable: As much as possible, provides a useful and enjoyable content.
Visit the πΉ demo site and play in your browser. The demo is a pure SPA (100% clientside application) written in elm.
Calc is a very simple and basic calculator.
Simple digital clock using SVG.
π‘ Demonstrates some capabilities of elm for displaying SVG content.
Animated Lissajous figures using SVG.
π‘ Demonstrates how elm can deal with some basic mathematical and handle animated SVG rendering using MacCASOutreach/graphicsvg fantastic library.
Maze generator using a recursive backtracking algorithm with control of the generation process.
Very simple physics engine using Verlet Integration algorithm and rendered through an HTML5 canvas.
π‘ Demonstrates how elm can deal with some basic mathematical and physical calculations, as well as basic rendering of objects in an HTML canvas, using elementary functions from the fantastic joakin/elm-canvas package.
βΉοΈ Implementation is inspired from Making a Verlet Physics Engine in Javascript.
A basic terminal (wsowens/term) which simply executes Javascript commands.
π‘ Shows interoperability between elm environment and JavaScript through ports.
Pure and basic elm Asteroids game.
π‘ Demonstrates how elm can deal with game development using SVG rendering and the ECS (Entity Component System) pattern provided by the awesome harmboschloo/elm-ecs package. Moreover, the explosion effects are generated by the fantastic BrianHicks/elm-particle package.
π§ Under construction. Missing: the management of the collision of the spaceship with the asteroids, the management of the lives, the counting of the points, etc.
Elm 0.19 broke me as many other coders, due to a lot of changes on topics I used in this project with previous version:
elm.json
file- JSON decoding
- String / Int / Float conversions
- Browser application, routing
- Url management
- date time (
Posix
,Zone
) - lots of incompatible packages
- ...
I finally managed to migrate to this new version but instabilities can be noticed though.
Be sure to have the following properly installed:
The project now relies on parceljs, a web application bundler which handles elm builds at free.
At first, all the node packages this project depends on must be installed locally. This can be done with the following command:
pnpm install
The build can be launched with:
pnpm build
Then, open ./dist/index.html
file in your browser.
If you prefer, the site can be published by a local HTTP server. In this mode, if any change is detected, the build of the project will be started again, and the site automatically updated in the browser; which is nice during the development phases.
The publication is launched with the following command:
pnpm serve
The site is accessible through the https://localhost:1234/
endpoint.
-
elm
: ELMWith the following (main and non exhaustive) packages:
-
parceljs
: Web application bundler -
bootstrap
: Free and open-source CSS framework
MIT Β© Chris Camel