twors 0.4.0

A simple Rust 2D game engine based on canvas and WASM
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// This will output an assertion failure message (with the failed expression) via the logger
/// before panicking - this results in a readable error message in the browser.
#[macro_export]
macro_rules! wasm_assert {
    ($cond:expr) => {
        if (!($cond)) {
            let message = format!("Assertion failed: {}", stringify!($cond));
            log::error!("{}", message);
            panic!("{}", message);
        }
    };
}