Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bgourlie/hexthing_wasm
A simple wasm/webgl2 hex grid renderer
https://github.com/bgourlie/hexthing_wasm
rust webassembly
Last synced: 24 days ago
JSON representation
A simple wasm/webgl2 hex grid renderer
- Host: GitHub
- URL: https://github.com/bgourlie/hexthing_wasm
- Owner: bgourlie
- License: apache-2.0
- Created: 2018-10-22T00:12:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-02T01:11:37.000Z (about 6 years ago)
- Last Synced: 2024-10-29T17:23:42.444Z (2 months ago)
- Topics: rust, webassembly
- Language: Rust
- Homepage:
- Size: 88.9 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
This repo contains a simple hex grid renderer written in rust targeting web assembly. It also integrates the specs entity component system (the first such example that exists targeting web assembly as far as I'm aware) but is unable to do rendering within a render loop due to certain constraints outline in [this stackoverflow post](https://stackoverflow.com/questions/53000413/how-can-i-work-around-not-being-able-to-export-functions-with-lifetimes-when-usi).
### Prerequisites
- Works with the most recent stable version of rust (1.30.0 as of the time of this writing)
- You will need to install `wasm-pack`: `cargo install wasm-pack`### Running
- `git clone https://github.com/bgourlie/hexthing_wasm.git`
- `cd hexthing_wasm`
- `npm install`
- `cd crate`
- `wasm-pack build`
- `cd ../`
- `npm run start`### Notes
Specs is currently brought in as a git dependency referencing a specific revision, since changes required to target web-assembly have yet to be released.