Skip to main content

Crate nannou

Crate nannou 

Source
Expand description

An open-source creative-coding toolkit for Rust.

Nannou is a collection of code aimed at making it easy for artists to express themselves with simple, fast, reliable, portable code. Whether working on a 12-month laser installation or a 5 minute sketch, this framework aims to give artists easy access to the tools they need.

If you’re new to nannou, we recommend checking out the examples to get an idea of how nannou applications are structured and how the API works.

Nannou is built on the Bevy game engine. The nannou::app and nannou::sketch builders provide the familiar nannou entry points, while NannouPlugin bundles nannou’s functionality as a Bevy Plugin so it can also be added to an existing Bevy App.

When using nannou as a Bevy plugin, the context::App system param gives your own Bevy systems access to nannou’s conveniences (time, input, the focused window and the Draw API) with no unsafe and no builder machinery. See the context module and the system_param example for details.

Re-exports§

pub use self::context::App;
pub use find_folder;
pub use lyon;
pub use nannou_wgpu as wgpu;

Modules§

app
Items related to the App type and the application context in general.
context
A Bevy-native nannou context.
geom
Types, functions and other items related to geometry. This module is the source of all graphics and lazer primitives and aids work in 2D and 3D space.
glam
glam
image
Items related to working with images. Currently, this module simply re-exports the renown image crate which supports reading and writing PNG, JPEG, GIF, WEBP, BMP and more.
math
A mathematical foundation for nannou including point and vector types and a range of helper/utility functions.
noise
Items related to noise generation, API offered via the noise-rs crate.
prelude
A collection of commonly used items that we recommend importing for ease of use.
rand
Items related to randomness and random number generators. Also provides some high-level helper functions.
time
Extensions and utilities for working with time.

Structs§

NannouPlugin

Functions§

app
Begin building the App.
sketch
Shorthand for building a simple app that has no model, handles no events and simply draws to a single window.