boxes-and-bubbles

A simple-as-possible 2D physics rigid-body physics engine for Elm.

BSD-3-CLAUSE License

Stars
35
Committers
7

Boxes and Bubbles

A simple-as-possible 2D physics rigid-body physics engine for Elm. Supports only bubbles (circles) and boxes (axis-aligned rectangles).

Here's an example (source) of the engine in action. To run the example locally, start elm-reactor in the examples directory.

It does this:

  • resolve collisions between bodies of different mass and bounciness.
  • gravity (ignores mass) / global time-varying forces (mass-dependent)

It doesn't do:

  • arbitrary polygons
  • friction / drag
  • rotation
  • time-integrated movement
  • graphics
  • colliding unstoppable forces with immovable objects (infinite masses will be glitchy)