genmesh = "0.4.1"
image = "0.12.0"
obj = { version = "0.5", features = ["usegenmesh"] }
-
-[target.'cfg(not(target_os = "emscripten"))'.dependencies]
libxm = "1.0.0"
sdl2 = "*"
+
+[target.'cfg(not(target_os = "emscripten"))'.dependencies]
backtrace = "0.2.2"
backtrace-sys = "0.1.10"
[target.'cfg(target_os = "emscripten")'.dependencies]
-glutin = "0.6.1"
backtrace = "0.2.3"
[replace]
set -e
-cargo build --target asmjs-unknown-emscripten
+cargo rustc --target asmjs-unknown-emscripten -- -C link-args='-s USE_SDL=2 --preload-file flora.xm'
cp target/asmjs-unknown-emscripten/debug/mandelwow.js .
+cp target/asmjs-unknown-emscripten/debug/deps/mandelwow-ec0c575eb8c2718a.data .
emrun .
extern crate glium;
extern crate glutin;
extern crate image;
-#[cfg(not(target_os = "emscripten"))]
extern crate libxm;
-#[cfg(not(target_os = "emscripten"))]
extern crate sdl2;
//use cgmath::prelude::*;
mod bounding_box;
mod cube;
mod mandelwow;
-#[cfg(not(target_os = "emscripten"))]
-mod sound;
-#[cfg(target_os = "emscripten")]
-#[path = "sound_emscripten.rs"]
mod sound;
mod support;
set -e
-cargo build --target asmjs-unknown-emscripten --release
+cargo rustc --target asmjs-unknown-emscripten --release -- -C link-args='-s USE_SDL=2'
cp target/asmjs-unknown-emscripten/release/mandelwow.js .
emrun .
set -e
-cargo build --target wasm32-unknown-emscripten --release
+cargo rustc --target wasm32-unknown-emscripten --release -- -C link-args='-s USE_SDL=2 --preload-file flora.xm'
cp target/wasm32-unknown-emscripten/release/mandelwow.js .
-cp target/wasm32-unknown-emscripten/release/deps/mandelwow-*.wasm .
+cp target/wasm32-unknown-emscripten/release/deps/mandelwow-*.{wasm,data} .
emrun .
+++ /dev/null
-pub struct SoundPlayer {}
-
-pub fn start() -> SoundPlayer { SoundPlayer {} }