notan 0.14.0

A simple portable multimedia layer to create apps or games easily
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use notan::prelude::*;

#[notan_main]
fn main() -> Result<(), String> {
    notan::init().update(update).build()
}

fn update(app: &mut App) {
    // Closes the App pressing the Escape key.
    // On browsers the requestAnimationFrame will stop but the canvas will still be visible
    if app.keyboard.was_pressed(KeyCode::Escape) {
        app.exit();
    }
}