hadertoy

Haskell implementation of Glumpy

APACHE-2.0 License

Stars
12

hadertoy

The goal of hadertoy is to provide an Haskell library similar to Glumpy to enable simple data visualisation.

See the library header and example cli for documentation.

Usage

In its present form, hadertoy can be used to load a shader and update the range and center uniform values using mouse scroll and click:

$ hadertoy ./shaders/mandelbrot.glsl

In map/julia mode, middle click on the map update the julia seed.

When an uniform is prefixed by // dear-scale initial-value min-value max-value, a dear-imgui controller is created to adjust the value.

Development

Setup

Without nix, first install dear-imgui.hs with

$ cabal install --lib --flags="+glfw"

Then install the dependency with cabal install

Otherwise with nix, run nix-shell

Build

$ cabal build && cabal test

Get documentation and hoogle service by running:

$ nix-shell --command "hoogle server -p 8080 --local --haskell"

When using nix, use nixGL to run the build, for example:

$ nixGLIntel cabal run hadertoy