abstreet/game/run_web.sh
Dustin Carlino 64bc4ee318
On the web, load different maps by making asynchronous HTTP calls. #21 (#364)
* On the web, load different maps by making asynchronous HTTP calls. #21

This is a very strange, specializd approach; it's unclear how it'll
generalize to reading scenarios and prebaked results. Ideally we could
call abstutil::read_binary as we currently do and somehow hide this async
trickery underneath, but I'm not sure how yet. In the meantime, this
moves us forward with the hack well-contained.

Next steps for web: stop bundling in all of data/system in the .wasm,
now that we can load from HTTP.
2020-10-08 10:51:13 -07:00

7 lines
131 B
Bash
Executable File

#!/bin/bash
set -e
wasm-pack build --dev --target web -- --no-default-features --features wasm
cd pkg
python3 -m http.server 8000