https://github.com/ibaryshnikov/webgl-engine
Demo WebGl engine
https://github.com/ibaryshnikov/webgl-engine
Last synced: 6 months ago
JSON representation
Demo WebGl engine
- Host: GitHub
- URL: https://github.com/ibaryshnikov/webgl-engine
- Owner: ibaryshnikov
- License: mit
- Created: 2019-06-07T20:49:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-07-27T19:41:45.000Z (6 months ago)
- Last Synced: 2025-07-27T21:29:57.047Z (6 months ago)
- Language: Rust
- Size: 15.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Demo WebGl engine
The main goal is to show that using `WebGl` and `DOM` APIs is seamless in Rust with `wasm-bindgen`
It also can give some insights about the performance
## Installation
In order to build the project `wasm-bindgen-cli` version should match the version from `Cargo.toml`
```bash
cargo install wasm-bindgen-cli --version 0.2.100
```
## Building
```bash
cargo build --target wasm32-unknown-unknown
wasm-bindgen --out-dir pkg --target web ./target/wasm32-unknown-unknown/debug/webgl_engine.wasm
```
## Running
```bash
# using https://crates.io/crates/https
http
# using python
python -m SimpleHTTPServer
```
## More details
There are around 3600 rotating cubes on the scene
The main idea for the scene and the shaders are borrowed from
[MDN tutorial](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Creating_3D_objects_using_WebGL)