https://github.com/semanser/tinygo-wasm-webgl-demo
A basic tinygo-wasm-webgl demo
https://github.com/semanser/tinygo-wasm-webgl-demo
Last synced: 4 days ago
JSON representation
A basic tinygo-wasm-webgl demo
- Host: GitHub
- URL: https://github.com/semanser/tinygo-wasm-webgl-demo
- Owner: semanser
- Created: 2024-01-27T19:14:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-27T19:54:57.000Z (over 1 year ago)
- Last Synced: 2025-01-19T17:09:30.041Z (9 months ago)
- Language: JavaScript
- Size: 1.96 MB
- Stars: 68
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tinygo-wasm-webgl-demo
This repository contains a modified gowebapi/webapi [demo](https://github.com/gowebapi/webapi/blob/41cedfc27a0bd35c1220dd0fe4b4c4505c33b0ea/graphics/webgl/example_cube_test.go) that works with tinygo.
https://github.com/semanser/tinygo-wasm-webgl-demo/assets/4020045/2047caee-491a-4db6-bb49-8e24ec42bb43
# Prerequisites
- Install [tinygo](https://tinygo.org/)
- Install [http-server](https://github.com/http-party/http-server) (or any other static web server of your choice). This is required to host the wasm file.# Compilation
```bash
$ tinygo build -o=main.wasm -target=wasm -no-debug ./main.go184K main.wasm
```# Running
```bash
$ http-server .
```# Resources
- https://tinygo.org/
- https://github.com/gowebapi/webapi
- https://github.com/http-party/http-server