raylib

Package VersionHex Docs

gleam add raylib
bun add raylib@0.14.0
bun pm trust raylib # be careful with this one!
# use this if CMake gives versioning problems:
CMAKE_POLICY_VERSION_MINIMUM=3.5 bun pm trust raylib
import raylib as rl
import raylib/inputs
pub fn main() -> Nil {
use r, state <- rl.start(1920, 1080, "Simulation", rl.get_color(0xff000000))
use d <- rl.draw(r)
rl.clear_background(d, state)
case rl.is_key_down(r, inputs.key_space) {
True -> rl.get_color(0x00ff0000)
False -> rl.get_color(0xff000000)
}
}

This currently only supports a subset of 2D rendering. Additional help in porting the rest would be greatly appreciated!

Further documentation can be found at https://hexdocs.pm/raylib.