Web gravity simulation using Lustre, Gleam's frontend library tedius.tngl.sh/sky
physics gleam
1

Configure Feed

Select the types of activity you want to include in your feed.

JavaScript 71.2%
CSS 15.1%
Gleam 12.4%
Nix 0.8%
HTML 0.4%
67 1 4

Clone this repository

https://tangled.org/tedius.tngl.sh/sky https://tangled.org/did:plc:f65xr56s4h3jy2drjuqthcek
git@tangled.org:tedius.tngl.sh/sky git@tangled.org:did:plc:f65xr56s4h3jy2drjuqthcek

For self-hosted knots, clone URLs may differ based on your setup.



README.md

sky#

Gleam

sky is a n-body simulation to play with. Build using lustre, gleam frontend framework.

About#

sky is a physics sandbox that lets you experiment with gravitational interactions between multiple bodies. Click and drag on the canvas to launch spheres, then watch as they attract each other according to Newton's law of universal gravitation. Built with Lustre, a frontend framework for Gleam, a type-safe language that compiles to Erlang and JavaScript.

TODO#

  • Trail visualization
  • Save/load in local storage
  • Performance optimizations for many bodies
  • Mobile improvements

Development#

Nix#

The proyect includes a flake.nix with a devshell with the dependencies. Run:

# Clone the repo
git clone https://tangled.org/tedius.tngl.sh/sky

# Enter the devshell
nix develop

# Build and run
gleam run -m lustre/dev start

Thanks to#