https://github.com/justinclift/tinygo-wasm-basic-triangle
Use TinyGo to create the basic WebGL triangle in Wasm. About 9.5kB compressed.
https://github.com/justinclift/tinygo-wasm-basic-triangle
tinygo wasm webassembly webgl
Last synced: 4 months ago
JSON representation
Use TinyGo to create the basic WebGL triangle in Wasm. About 9.5kB compressed.
- Host: GitHub
- URL: https://github.com/justinclift/tinygo-wasm-basic-triangle
- Owner: justinclift
- License: bsd-3-clause
- Created: 2019-07-03T12:34:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-29T16:43:21.000Z (almost 6 years ago)
- Last Synced: 2025-02-02T01:32:47.744Z (about 1 year ago)
- Topics: tinygo, wasm, webassembly, webgl
- Language: Go
- Homepage: https://justinclift.github.io/tinygo-wasm-basic-triangle/
- Size: 46.9 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is just simple research code, directly copied from bobcob7,
to see if TinyGo wasm can be used for WebGL.
Running demo:
https://justinclift.github.io/tinygo-wasm-basic-triangle/
Original source:
https://github.com/bobcob7/wasm-basic-triangle
To compile the WebAssembly file:
$ tinygo build -target wasm -no-debug -o docs/wasm.wasm main.go
To strip the custom name section from the end (reducing file size
further):
$ wasm2wat docs/wasm.wasm -o docs/wasm.wat
$ wat2wasm docs/wasm.wat -o docs/wasm.wasm
$ rm -f docs/wasm.wat