Module nannou::app[][src]

Expand description

Items related to the App type and the application context in general.

See here for items relating to the event loop, device access, creating and managing windows, streams and more.

  • App - provides a context and API for windowing, devices, etc.
  • Proxy - a handle to an App that may be used from a non-main thread.
  • LoopMode - describes the behaviour of the application event loop.

Structs

App

Each nannou application has a single App instance. This App represents the entire context of the application.

Builder

A nannou App builder.

Proxy

A handle to the App that can be shared across threads. This may be used to “wake up” the App’s inner event loop.

SketchBuilder

A nannou Sketch builder.

Enums

LoopMode

The mode in which the App is currently running the event loop and emitting Update events.

Functions

find_assets_path

Attempt to find the assets directory path relative to the executable location.

find_project_path

Attempt to find the assets directory path relative to the executable location.

Type Definitions

EventFn

The user function type for updating their model in accordance with some event.

ExitFn

The user function type allowing them to consume the model when the application exits.

ModelFn

The user function type for initialising their model.

SketchViewFn

A shorthand version of ViewFn for sketches where the user does not need a model.

UpdateFn

The user function type for updating the user model within the application loop.

ViewFn

The user function type for drawing their model to the surface of a single window.