mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Updated WebAssembly (markdown)
parent
7b7914152b
commit
1bdc919404
@ -1,4 +1,4 @@
|
||||
~The easiest way is to use [WasmServe](https://github.com/hajimehoshi/wasmserve) with the latest Go.~ WasmServe doesn't work well with modules. Stay tuned!
|
||||
The easiest way is to use [WasmServe](https://github.com/hajimehoshi/wasmserve) with the latest Go.
|
||||
|
||||
This article introduces a regular way to build an Ebiten app as a WebAssembly port.
|
||||
|
||||
@ -7,13 +7,24 @@ This article introduces a regular way to build an Ebiten app as a WebAssembly po
|
||||
* Go 1.11
|
||||
* Ebiten master branch (1.8.0-alpha.0.XXX) / 2.0.0-alpha
|
||||
|
||||
# Compile your game
|
||||
# 1. WasmServe
|
||||
|
||||
```sh
|
||||
cd yourgame
|
||||
wasmserve
|
||||
```
|
||||
|
||||
Then access `http://localhost:8080/`.
|
||||
|
||||
# 2. Regular
|
||||
|
||||
## Compile your game
|
||||
|
||||
```sh
|
||||
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
|
||||
cp $GOROOT/misc/wasm/wasm_exec.js .
|
||||
|
Loading…
Reference in New Issue
Block a user