Gleam-0.1.0.0: HTML Canvas graphics, animations and simulations.

Safe HaskellNone
LanguageHaskell2010

Gleam

Synopsis

Documentation

play Source #

Arguments

:: GleamConfig

Canvas size.

-> model

Initial model for the simulation.

-> (model -> Picture)

Function to generate a picture from a model.

-> (model -> model)

Function to update the state of the simulation.

-> (InputEvent -> model -> model)

Function to handle input events.

-> IO () 

Run a simulation in a window. You decide how the model is represented, how to convert the model to a picture and how to update the model. This function does the rest. The simulation can be seen on `127.0.0.1:8023`

playMultiple :: [Simulation] -> IO () Source #

Run multiple simulations in a window. You decide how each model is represented, how to convert each model to a picture and how to update the model. This function does the rest. The simulations can be seen on `127.0.0.1:8023`

module Picture

module InputEvent

module Color

module Settings