Browse Source

updated readme

master
Inderjit Gill 8 months ago
parent
commit
471669cf11
1 changed files with 10 additions and 34 deletions
  1. +10
    -34
      README.md

+ 10
- 34
README.md View File

@@ -8,43 +8,19 @@ A Game
## ensure that the correct toolchain is installed
```sh
$ rustup update
$ rustup install nightly
$ rustup target add wasm32-unknown-unknown --toolchain nightly
$ cargo +nightly install wasm-bindgen-cli

$ npm install
$ npm run build:server
```

## during dev
```sh
$ npm run build:dev:wasm
$ npm run build:dev
$ npm run serve:dev
```

can now visit http://localhost:8080


## for 'release'
```sh
$ npm run build:release
$ npm run serve:release
$ rustup target add wasm32-unknown-unknown
$ cargo install wasm-bindgen-cli
```

can now visit http://localhost:3000
build with:
$ ./build.sh

build release version with:
$ ./build.sh release

# misc. notes
once built, launch a server in /www
$ cd www
$ basic-http-server

## graphics
- origin is in the bottom left
- rendering order for a square is: bl, br, tl, tr

## file structure
/dist -> destination directory for webpack output (npm run build)
index.html
/src -> rust source for top-level program + wasm declarations
/target -> destination directory for rust
/web -> destination for wasm-bindgen generated files (*.js, *.ts, *.wasm)
/web/js -> js files
visit the apropriate url in a browser

Loading…
Cancel
Save