X-Git-Url: https://codewiz.org/gitweb?p=mandelwow.git;a=blobdiff_plain;f=README.md;h=83e0648b1d8bd19100a88f88fd2452315007dd84;hp=dd4f14a2343c90b47dda0a813a49b567fb6c0fa7;hb=595fa92af6e72783e2b7624f5b8e5f5418d4e757;hpb=a9ced736da2b269caa43ce87fb7d8677fd3b01e4 diff --git a/README.md b/README.md index dd4f14a..83e0648 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,59 @@ I wrote this hack to learn Rust & basic GLSL. Mind the mess. ## Building from source +### Native + Install cargo, then simply type: ``` cargo run --release ``` +### WebAssembly / asm.js + +Install emsdk 1.36.14: + +``` +cd ~ +curl -O https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz +tar xf emsdk-portable.tar.gz +source emsdk-portable/emsdk_env.sh +emsdk install emscripten-1.37.9 --build=MinSizeRel +emsdk activate emscripten-1.37.9 --build=MinSizeRel +``` + +Install rustc: + +``` +cd ~ +curl https://sh.rustup.rs -sSf | sh +source ~/.cargo/env +rustup toolchain install nightly +rustup default nightly +rustup target install asmjs-unknown-emscripten +rustup target install wasm32-unknown-emscripten +``` + +Build and run mandelwow: + +``` +cd mandelwow +./release_asmjs.sh +``` + +Build the WebAssembly binary: + +``` +cd mandelwow +./release_wasm.sh +``` ## Requirements -Requires OpenGL 3.1. Should perform well on reasonably modern hardware. -Tested on Linux with Intel HD Graphics 4000 (Ivy Bridge) and NVidia GTX 970. +The native binary requires OpenGL 3.1. Should perform well on reasonably modern +hardware. Tested on Linux with Intel HD Graphics 4000 (Ivy Bridge) and NVidia GTX 970. + +The asmjs and WebAssembly versions were tested on Chromium 57 and Firefox 53. ## License