https://github.com/demonstrandum/zoids
Boids in Zig (GLFW+NanoVG / WASM+WebGL).
https://github.com/demonstrandum/zoids
boids glfw opengl wasm webgl zig
Last synced: about 1 month ago
JSON representation
Boids in Zig (GLFW+NanoVG / WASM+WebGL).
- Host: GitHub
- URL: https://github.com/demonstrandum/zoids
- Owner: Demonstrandum
- License: gpl-3.0
- Created: 2022-09-15T19:24:23.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-29T14:29:23.000Z (over 3 years ago)
- Last Synced: 2025-04-14T15:18:12.836Z (about 1 year ago)
- Topics: boids, glfw, opengl, wasm, webgl, zig
- Language: Zig
- Homepage: https://demonstrandum.github.io/Zoids
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zoids
Boids, in OpenGL+GLFW using NanoVG. Written in Zig.
Just for trying out the language and tools.
## WASM Web Version
See the boids compiled to WASM online here: [demonstrandum.github.io/Zoids](https://demonstrandum.github.io/Zoids/).
## Dependencies
You must have `glfw` and `nanovg` installed as system packages.
Clone with
```sh
git clone --recurse-submodules -j8 https://github.com/Demonstrandum/Zoids.git
```
## Run
```sh
zig build run
```
## Build WASM
Build `zoids.wasm` and construct a website to `deployment/`.
Must run web-server to serve local files, using Python `http.server`, for example.
```sh
zig build website -Dtarget=wasm32-freestanding
python3 -m http.server 8080 --directory ./deployment/
open http://localhost:8080/
```
---
