[−][src]Module nannou::prelude
A collection of commonly used items that we recommend importing for ease of use.
Reexports
pub use crate::app; 
pub use crate::app::App; 
pub use crate::app::LoopMode; 
pub use crate::color::gray; 
pub use crate::color::hsl; 
pub use crate::color::hsla; 
pub use crate::color::hsv; 
pub use crate::color::hsva; 
pub use crate::color::lin_srgb; 
pub use crate::color::lin_srgba; 
pub use crate::color::rgb; 
pub use crate::color::rgb8; 
pub use crate::color::rgba; 
pub use crate::color::rgba8; 
pub use crate::color::srgb; 
pub use crate::color::srgb8; 
pub use crate::color::srgba; 
pub use crate::color::srgba8; 
pub use crate::color::Gray; 
pub use crate::color::Rgb; 
pub use crate::color::Rgb8; 
pub use crate::color::Rgba; 
pub use crate::color::Rgba8; 
pub use crate::draw::Draw; 
pub use crate::event::WindowEvent::*; 
pub use crate::event::AxisMotion; 
pub use crate::event::Event; 
pub use crate::event::TouchEvent; 
pub use crate::event::TouchpadPressure; 
pub use crate::event::Update; 
pub use crate::event::WindowEvent; 
pub use crate::frame::Frame; 
pub use crate::frame::RawFrame; 
pub use crate::geom; 
pub use crate::geom::pt2; 
pub use crate::geom::pt3; 
pub use crate::geom::vec2; 
pub use crate::geom::vec3; 
pub use crate::geom::vec4; 
pub use crate::geom::Cuboid; 
pub use crate::geom::Point2; 
pub use crate::geom::Point3; 
pub use crate::geom::Rect; 
pub use crate::geom::Vector2; 
pub use crate::geom::Vector3; 
pub use crate::geom::Vector4; 
pub use crate::io::load_from_json; 
pub use crate::io::load_from_toml; 
pub use crate::io::safe_file_save; 
pub use crate::io::save_to_json; 
pub use crate::io::save_to_toml; 
pub use crate::math::clamp; 
pub use crate::math::deg_to_rad; 
pub use crate::math::fmod; 
pub use crate::math::map_range; 
pub use crate::math::partial_max; 
pub use crate::math::partial_min; 
pub use crate::math::rad_to_deg; 
pub use crate::math::rad_to_turns; 
pub use crate::math::turns_to_rad; 
pub use crate::rand::random_ascii; 
pub use crate::rand::random_f32; 
pub use crate::rand::random_f64; 
pub use crate::rand::random_range; 
pub use crate::text; 
pub use crate::text::text; 
pub use crate::time::DurationF64; 
pub use crate::ui; 
pub use crate::wgpu; 
pub use crate::wgpu::blend::ADD as BLEND_ADD; 
pub use crate::wgpu::blend::DARKEST as BLEND_DARKEST; 
pub use crate::wgpu::blend::LIGHTEST as BLEND_LIGHTEST; 
pub use crate::wgpu::blend::NORMAL as BLEND_NORMAL; 
pub use crate::wgpu::blend::REVERSE_SUBTRACT as BLEND_REVERSE_SUBTRACT; 
pub use crate::wgpu::blend::SUBTRACT as BLEND_SUBTRACT; 
pub use crate::window; 
pub use crate::window::Window; 
Modules
bounds  
cast  
float  
identities  
int  
ops  
pow  
real  
rgb  RGB types, spaces and standards. 
sign 
Structs
Hsl  Linear HSL color space. 
Hsv  Linear HSV color space. 
ParseFloatError  
WindowId  Identifier of a window. Unique for each window. 
Enums
FloatErrorKind  
Fullscreen  
Key  Symbolic name for a keyboard key. 
MouseButton  Describes a button of a mouse controller. 
MouseScrollDelta  Describes a difference in the mouse scroll wheel state. 
TouchPhase  Describes touchscreen input state. 
Constants
Traits
Angle  Angles and their associated trigonometric functions. 
Array  An array containing elements of type 
AsPrimitive  A generic interface for casting between machine scalars with the

Bounded  Numbers which have upper and lower bounds 
CheckedAdd  Performs addition that returns 
CheckedDiv  Performs division that returns 
CheckedMul  Performs multiplication that returns 
CheckedNeg  Performs negation that returns 
CheckedRem  Performs an integral remainder that returns 
CheckedShl  Performs a left shift that returns 
CheckedShr  Performs a right shift that returns 
CheckedSub  Performs subtraction that returns 
ElementWise  Elementwise arithmetic operations. These are supplied for pragmatic reasons, but will usually fall outside of traditional algebraic properties. 
EuclideanSpace  Points in a Euclidean space with an associated space of displacement vectors. 
Float  Generic trait for floating point numbers 
FloatConst  
FromPrimitive  A generic trait for converting a number to a value. 
InnerSpace  
Inv  Unary operator for retrieving the multiplicative inverse, or reciprocal, of a value. 
Matrix  A columnmajor matrix of arbitrary dimensions. 
MetricSpace  A type with a distance function between values. 
MulAdd  Fused multiplyadd. Computes 
MulAddAssign  The fused multiplyadd assignment operation. 
Num  The base trait for numeric types, covering 
NumAssign  The trait for 
NumAssignOps  The trait for types implementing numeric assignment operators (like 
NumAssignRef  The trait for 
NumCast  An interface for casting between machine scalars. 
NumOps  The trait for types implementing basic numeric operations 
NumRef  The trait for 
One  Defines a multiplicative identity element for 
Pow  Binary operator for raising a value to a power. 
PrimInt  Generic trait for primitive integers. 
RefNum  The trait for references which implement numeric operations, taking the second operand either by value or by reference. 
Rotation  A trait for a generic rotation. A rotation is a transformation that creates a circular motion, and preserves at least one point in the space. 
Rotation2  A twodimensional rotation. 
Rotation3  A threedimensional rotation. 
Saturating  Saturating math operations. Deprecated, use 
SaturatingAdd  Performs addition that saturates at the numeric bounds instead of overflowing. 
SaturatingMul  Performs multiplication that saturates at the numeric bounds instead of overflowing. 
SaturatingSub  Performs subtraction that saturates at the numeric bounds instead of overflowing. 
Signed  Useful functions for signed numbers (i.e. numbers that can be negative). 
SquareMatrix  A columnmajor major matrix where the rows and column vectors are of the same dimensions. 
ToPrimitive  A generic trait for converting a value to a number. 
Transform  A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which 
Transform2  
Transform3  
Unsigned  A trait for values which cannot be negative 
VectorSpace  Vectors that can be added together and multiplied by scalars. 
WrappingAdd  Performs addition that wraps around on overflow. 
WrappingMul  Performs multiplication that wraps around on overflow. 
WrappingNeg  Performs a negation that does not panic. 
WrappingShl  Performs a left shift that does not panic. 
WrappingShr  Performs a right shift that does not panic. 
WrappingSub  Performs subtraction that wraps around on overflow. 
Zero  Defines an additive identity element for 
Functions
abs  Computes the absolute value. 
abs_sub  The positive difference of two numbers. 
cast  Cast from one machine scalar to another. 
checked_pow  Raises a value to the power of exp, returning 
clamp  A value bounded by a minimum and a maximum 
clamp_max  A value bounded by a maximum value 
clamp_min  A value bounded by a minimum value 
from_str  Get a SVG/CSS3 color by name. Can be toggled with the 
one  Returns the multiplicative identity, 
pow  Raises a value to the power of exp, using exponentiation by squaring. 
random  Generates a random value using the threadlocal random number generator. 
signum  Returns the sign of the number. 
zero  Returns the additive identity, 
Type Definitions
Hsla  Linear HSL with an alpha component. See the 
Hsva  Linear HSV with an alpha component. See the 
LinSrgb  Linear sRGB. 
LinSrgba  Linear sRGB with an alpha component. 
Srgb  Nonlinear sRGB. 
Srgba  Nonlinear sRGB with an alpha component. 