Code Monkey home page Code Monkey logo

playground-elm's Introduction

|> playground-elm

release MIT FOSSA Status build-status quality-grade ELM Boostrap pnpm git3moji StackShare Demo

My playground I use for playing with fancy and exciting technologies. This one's for elm.

๐ŸŽฏ Purpose

The purpose of this playground is to explore, study and assess the elm language โ€” a delightful language for reliable webapps.

demo-link

The showcases are intended to be:

  • simple: Fairly simple and understandable. Every showcase is implemented in a single elm file.
  • exploratory:
    • Highlight some aspects of the elm language, like immutability, reactiveness, performance and interoperability with other JS libraries and CSS frameworks.
    • Explore some architectural/design patterns around reactive static/serverless SPA
  • playable: As much as possible, provides a useful and enjoyable content.

๐Ÿฟ Showcases

Visit the ๐Ÿ”น demo site and play in your browser. The demo is a pure SPA (100% clientside application) written in elm.

Calc

Calc is a very simple and basic calculator.

Links:
Play | Code

Digital clock

Simple digital clock using SVG.

๐Ÿ’ก Demonstrates some capabilities of elm for displaying SVG content.

Links:
Play | Code

Lissajous

Animated Lissajous figures using SVG.

๐Ÿ’ก Demonstrates how elm can deal with some basic mathematical and handle animated SVG rendering using MacCASOutreach/graphicsvg fantastic library.

Links:
Play | Code

Maze generator

Maze generator using a recursive backtracking algorithm with control of the generation process.

Links:
Play | Code

Physics Verlet engine

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.

Links:
Play | Code

Term

A basic terminal (wsowens/term) which simply executes Javascript commands.

๐Ÿ’ก Shows interoperability between elm environment and JavaScript through ports.

Links:
Play | Code

Asteroids Game

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.

Links:
Play | Code

๐Ÿ›  Building and Running

Elm 0.19

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.

Prerequisites

Be sure to have the following properly installed:

Build

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 http://localhost:1234/ endpoint.

๐Ÿ”‹ Technologies

๐Ÿ“œ License

MIT ยฉ Chris Camel

FOSSA Status

playground-elm's People

Contributors

ccamel avatar dependabot-support avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.