mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-31 21:14:28 +01:00
Updated WebAssembly (markdown)
parent
12ca64f36b
commit
ff4f99593e
@ -5,14 +5,18 @@ As there are differences between the latest Go and Go 1.11 beta, I recommend to
|
|||||||
1. Checkout the latest Go (https://go.googlesource.com/go)
|
1. Checkout the latest Go (https://go.googlesource.com/go)
|
||||||
2. Compile the compiler by running `./make.bash`
|
2. Compile the compiler by running `./make.bash`
|
||||||
|
|
||||||
After that, use the compiled `go` binary.
|
|
||||||
|
|
||||||
# Compile your game
|
# Compile your game
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
GOOS=js GOARCH=wasm /path/to/latest/gocode/bin/go build -o yourgame.wasm github.com/yourname/yourgame
|
GOOS=js GOARCH=wasm /path/to/latest/gocode/bin/go build -o yourgame.wasm github.com/yourname/yourgame
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Copy `wasm_exec.js` to execute the Wasm binary
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cp /path/to/latest/gocode/bin/go/misc/wasm_exec.js .
|
||||||
|
```
|
||||||
|
|
||||||
# Create an HTML
|
# Create an HTML
|
||||||
|
|
||||||
```html
|
```html
|
||||||
|
Loading…
Reference in New Issue
Block a user