--- /dev/null
+[submodule "rust-rocket"]
+ path = rust-rocket
+ url = https://github.com/Darksecond/rust-rocket
glium = "0.16.0"
glutin = "0.7.4"
genmesh = "0.4.1"
-image = { version = "0.14.0", features = ["png_codec"] }
+image = { version = "0.14.0", features = ["png_codec"], optional = true }
libxm = "1.0.0"
obj = { version = "0.5", features = ["usegenmesh"] }
+rust-rocket = { path = "rust-rocket", optional = true }
rand = "*"
sdl2 = "*"
-#[replace]
-#"glutin:0.7.4" = { path = "/home/bernie/src/glutin" }
-#"glium:0.16.0" = { path = "/home/bernie/src/glium" }
+[features]
+default = ["rust-rocket", "image"]
+min = []
+
+[replace]
+"glutin:0.7.4" = { path = "/home/bernie/src/glutin" }
+"glium:0.16.0" = { path = "/home/bernie/src/glium" }
[target.armv7-linux-androideabi]
ar = "$ANDROID_NDK_HOME/arm/bin/arm-linux-androideabi-ar"
### WebAssembly / asm.js
-Install emsdk 1.36.14:
+Install emsdk:
```
cd ~
#[macro_use(uniform,program,implement_vertex)]
extern crate glium;
extern crate glutin;
+#[cfg(feature = "image")]
extern crate image;
extern crate libxm;
+#[cfg(feature = "rust_rocket")]
+extern crate rust_rocket;
extern crate sdl2;
pub mod bounding_box;
pub use cube::Cube;
pub use shaded_cube::ShadedCube;
+#[cfg(feature = "image")]
pub fn screenshot(display : &glium::Display) {
let image: glium::texture::RawImage2d<u8> = display.read_front_buffer();
let image = image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned()).unwrap();
image.save(&mut output, image::ImageFormat::PNG).unwrap();
}
+#[cfg(not(feature = "image"))]
+pub fn screenshot(display : &glium::Display) {
+}
set -e
-cargo rustc --target wasm32-unknown-emscripten --release -- -C link-args='-s USE_SDL=2 --preload-file flora.xm'
+cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='-s USE_SDL=2 --preload-file flora.xm'
cp -a target/wasm32-unknown-emscripten/release/mandelwow.js .
cp -a target/wasm32-unknown-emscripten/release/deps/mandelwow-*.{wasm,data} .
emrun .
--- /dev/null
+Subproject commit 3ca2caba4878c73bfa4d2d7a36c2f3b943f9888a