Update to use copy from comment on: github.com/hajimehoshi/ebiten/issues/671

Jake Bentvelzen 2018-08-26 16:42:05 +10:00
parent 464cd46ee1
commit 5834665acf

@ -1,20 +1,22 @@
As there are differences between the latest Go and Go 1.11 beta, I recommend to use the latest Go here.
The easiest way is to use [WasmServe](https://github.com/hajimehoshi/wasmserve) with the latest Go.
The easiest way is to use [WasmServe](https://github.com/hajimehoshi/wasmserve) with Go 1.11 or later.
# Requirements
Note that you'd need the master branch of Ebiten (v1.7.x doesn't work with WebAssembly).
* Go 1.11
* Ebiten 2.0.0-alpha / master branch
# Compile your game
```sh
GOOS=js GOARCH=wasm /usr/local/go/bin/go build -o yourgame.wasm github.com/yourname/yourgame
GOOS=js GOARCH=wasm go build -o yourgame.wasm github.com/yourname/yourgame
```
# Copy `wasm_exec.js` to execute the Wasm binary
```sh
cp /usr/local/go/misc/wasm_exec.js .
cp $GOROOT/misc/wasm/wasm_exec.js .
```
Source: [https://github.com/golang/go/tree/master/misc/wasm](https://github.com/golang/go/tree/master/misc/wasm)
# Create an HTML