diff --git a/src/main.rs b/src/main.rs index 719cf32..7958cb8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,9 @@ fn event(app: &App, model: &mut Model, event: WindowEvent) { println!("{:?}", event); } +// Update the state of your application here. By default, this gets called right before `view`. +fn update(_app: &App, _model: &mut Model, _update: Update) {} + // Draw the state of your `Model` into the given `Frame` here. fn view(app: &App, model: &Model, frame: Frame) { let canvas = app.draw(); @@ -72,5 +75,5 @@ fn view(app: &App, model: &Model, frame: Frame) { } fn main() { - nannou::app(model).run(); + nannou::app(model).update(update).run(); }