Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

clarified update function #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/tutorials/basics/anatomy-of-a-nannou-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ will just return an instance of our empty **Model**.
> You can learn more about what the **App** is responsible for and capable of
> [here](https://docs.rs/nannou/latest/nannou/app/struct.App.html).

## **event** - updating the Model on app events
## **update** and **event** - updating the Model (on app events)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for backets


```rust,no_run
# #![allow(dead_code)]
Expand Down Expand Up @@ -270,7 +270,8 @@ fn update(_app: &App, _model: &mut Model, _update: Update) {
```

Now, our new **update** function will only run each time a timed update
occurs.
occurs. The update function will only update the state of your model.
It can not be used for drawing.

> Note: Nannou provides a whole suite of different events that may be registered
> while building an app or window in this way. See the [all_functions.rs
Expand Down