# rust.snippets
# vim: set ts=8 sw=8 sts=8 noet list:
# Eryn Wells <eryn@erynwells.me>

snippet nnapp
// Eryn Wells <eryn@erynwells.me>

use nannou::prelude::*;

struct Model {
	_window: window::Id,
}

impl Model {
	fn new(app: &App) -> Self {
		let window = app.new_window().view(view).build().unwrap();
		Self {
			_window: window,
		}
	}

	fn update(app: &App, model: &mut Model, update: Update) {
		model.update(app, update)
	}

	fn update(&mut self, app: &App, update: Update) {
		// TODO: Update the model here.
	}
}

fn view(app: &App, model: &Model, frame: Frame) {
	// TODO: Draw the view here.
}

fn main() {
	nannou::app(Model::new).update(update).run();	
}
endsnippet
