X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=README.md;h=56b6c192f27cc4fa07d74aa4ecc735d3db8344bf;hb=4bffab48bf2013c60962e848a98ce4064973cf5e;hp=dd4f14a2343c90b47dda0a813a49b567fb6c0fa7;hpb=a9ced736da2b269caa43ce87fb7d8677fd3b01e4;p=mandelwow.git diff --git a/README.md b/README.md index dd4f14a..56b6c19 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 ``` +### 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.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