added a template crate

main
annieversary 2021-08-15 23:32:45 +02:00
parent b58e6dc79d
commit 71b1322869
3 changed files with 38 additions and 0 deletions

8
Cargo.lock generated
View File

@ -2359,6 +2359,14 @@ dependencies = [
"unicode-xid 0.2.2",
]
[[package]]
name = "template"
version = "0.1.0"
dependencies = [
"nannou",
"utils",
]
[[package]]
name = "termcolor"
version = "1.1.2"

View File

@ -0,0 +1,8 @@
[package]
name = "template"
version = "0.1.0"
edition = "2018"
[dependencies]
nannou = "0.17"
utils = { path = "../utils" }

View File

@ -0,0 +1,22 @@
use nannou::prelude::*;
fn main() {
nannou::app(model).update(update).simple_window(view).run();
}
struct Model {}
fn model(_app: &App) -> Model {
Model {}
}
fn update(_app: &App, _model: &mut Model, _update: Update) {}
fn view(app: &App, _model: &Model, frame: Frame) {
let _t = frame.nth() as f32 / 60.0;
let draw = app.draw();
draw.background().color(PLUM);
draw.ellipse().color(STEELBLUE);
draw.to_frame(app, &frame).unwrap();
}