copper-rs 1.0.0

Copper.rs is a simple library for 2D games written in Rust targeting HTML5.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
extern {
    fn copperDeltaTime() -> f64;
    fn copperLog(text: String);
}

pub struct Copper;

impl Copper {
    pub fn log(text: String) { copperLog(text); }
    pub fn delta_time() -> f64 { copperDeltaTime() }
}