mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Update to use copy from comment on: github.com/hajimehoshi/ebiten/issues/671
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
|
# Compile your game
|
||||||
|
|
||||||
```sh
|
```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
|
# Copy `wasm_exec.js` to execute the Wasm binary
|
||||||
|
|
||||||
```sh
|
```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
|
# Create an HTML
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user