Brillo hides the pain of drawing simple vector graphics and raster images behind a nice data type and a few display functions.
Getting something on the screen is as easy as:
import Brillo
main = display
(InWindow "Nice Window" (200, 200) (10, 10))
white
(Circle 80)
Explore and run the example projects with stack:
stack run brillo-boids
Once the window is open you can use the following:
- Quit
- esc-key
- Move Viewport
- arrow keys
- left-click drag
- Zoom Viewport
- page up/down-keys
- control-left-click drag
- right-click drag
- mouse wheel
- Rotate Viewport
- home/end-keys
- alt-left-click drag
- Reset Viewport
- 'r'-key
- Animations and simulations can be constructed similarly
using the
animate
andsimulate
functions - Games with user input can be constructed with the
play
function. - See the brillo-examples directory for more.
Install necessary native dependencies like this:
sudo dnf install glfw-devel libXxf86vm-devel
sudo pacman -S glfw libxxf86vm
Contributions are very welcome!
Please test that all the brillo-examples
still work
before submitting your pull request.
This library is a fork of gloss and improves upon it in several ways. Check out the CHANGELOG for more details.