Module nannou::prelude [−][src]
Expand description
A collection of commonly used items that we recommend importing for ease of use.
Re-exports
pub use crate::app; | |
pub use crate::app::App; | |
pub use crate::app::LoopMode; | |
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::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::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 | |
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. |
identities | |
int | |
ops | |
pow | |
real | |
rgb | RGB types, spaces and standards. |
sign |
Structs
Affine2 | A 2D affine transform, which can represent translation, rotation, scaling and shear. |
Affine3A | A 3D affine transform, which can represent translation, rotation, scaling and shear. |
BVec2 | A 2-dimensional boolean vector. |
BVec3 | A 3-dimensional boolean vector. |
BVec4 | A 4-dimensional boolean vector. |
BufferInitDescriptor | Describes a Buffer when allocating. |
Cuboid | A light-weight |
DAffine2 | A 2D affine transform, which can represent translation, rotation, scaling and shear. |
DAffine3 | A 3D affine transform, which can represent translation, rotation, scaling and shear. |
DMat2 | A 2x2 column major matrix. |
DMat3 | A 3x3 column major matrix. |
DMat4 | A 4x4 column major matrix. |
DQuat | A quaternion representing an orientation. |
DVec2 | A 2-dimensional vector. |
DVec3 | A 3-dimensional vector. |
DVec4 | A 4-dimensional vector. |
Hsl | Linear HSL color space. |
Hsv | Linear HSV color space. |
IVec2 | A 2-dimensional vector. |
IVec3 | A 3-dimensional vector. |
IVec4 | A 4-dimensional vector. |
Mat2 | A 2x2 column major matrix. |
Mat3 | A 3x3 column major matrix. |
Mat3A | A 3x3 column major matrix. |
Mat4 | A 4x4 column major matrix. |
ParseFloatError | |
Quat | A quaternion representing an orientation. |
Rect | Defines a Rectangle’s bounds across the x and y axes. |
UVec2 | A 2-dimensional vector. |
UVec3 | A 3-dimensional vector. |
UVec4 | A 4-dimensional vector. |
Vec2 | A 2-dimensional vector. |
Vec3 | A 3-dimensional vector without SIMD support. |
Vec3A | A 3-dimensional vector with SIMD support. |
Vec4 | A 4-dimensional vector. |
WindowId | Identifier of a window. Unique for each window. |
Enums
FloatErrorKind | |
Fullscreen | Fullscreen modes. |
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 touch-screen input state. |
Constants
Traits
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 |
DeviceExt | Utility methods not meant to be in the main API. |
Float | Generic trait for floating point numbers |
FloatConst | |
FromPrimitive | A generic trait for converting a number to a value. |
Inv | Unary operator for retrieving the multiplicative inverse, or reciprocal, of a value. |
Mat4LookTo | Create a transformation matrix that will cause a vector to point at |
MulAdd | Fused multiply-add. Computes |
MulAddAssign | The fused multiply-add 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. |
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). |
ToPrimitive | A generic trait for converting a value to a number. |
Unsigned | A trait for values which cannot be negative |
Vec2Angle | Short-hand for retrieving the angle of the vector in radians. |
Vec2Rotate | |
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 | Clamp a value between some range. |
clamp_max | A value bounded by a maximum value |
clamp_min | A value bounded by a minimum value |
deg_to_rad | Convert the given angle in degrees to the same angle in radians. |
dmat2 | Creates a 2x2 matrix from two column vectors. |
dmat3 | Creates a 3x3 matrix from three column vectors. |
dmat4 | Creates a 4x4 matrix from four column vectors. |
dquat | Creates a quaternion from |
dvec2 | Creates a 2-dimensional vector. |
dvec3 | Creates a 3-dimensional vector. |
dvec4 | Creates a 4-dimensional vector. |
fmod | Models the C++ fmod function. |
gray | A short-hand constructor for |
hsl | A short-hand constructor for |
hsla | A short-hand constructor for |
hsv | A short-hand constructor for |
hsva | A short-hand constructor for |
ivec2 | Creates a 2-dimensional vector. |
ivec3 | Creates a 3-dimensional vector. |
ivec4 | Creates a 4-dimensional vector. |
lin_srgb | A short-hand constructor for |
lin_srgba | A short-hand constructor for |
map_range | Maps a value from an input range to an output range. |
mat2 | Creates a 2x2 matrix from two column vectors. |
mat3 | Creates a 3x3 matrix from three column vectors. |
mat3a | Creates a 3x3 matrix from three column vectors. |
mat4 | Creates a 4x4 matrix from four column vectors. |
one | Returns the multiplicative identity, |
partial_max | The max between two partially ordered values. |
partial_min | The min between two partially ordered values. |
pow | Raises a value to the power of exp, using exponentiation by squaring. |
pt2 | Construct a 2-dimensional point. |
pt3 | Construct a 3-dimensional point. |
quat | Creates a quaternion from |
rad_to_deg | Convert the given angle in radians to the same angle in degrees. |
rad_to_turns | Convert the given value in radians to the equivalent value as a number of turns. |
random | Generates a random value using the thread-local random number generator. |
random_ascii | Generates and returns a random ascii character. |
random_f32 | A wrapper function around the |
random_f64 | A wrapper function around the |
random_range | A function for generating a random value within the given range. |
rgb | A short-hand constructor for |
rgb8 | A short-hand constructor for |
rgba | A short-hand constructor for |
rgba8 | A short-hand constructor for |
signum | Returns the sign of the number. |
srgb | A short-hand constructor for |
srgb8 | A short-hand constructor for |
srgba | A short-hand constructor for |
srgba8 | A short-hand constructor for |
turns_to_rad | Convert the given value as a number of “turns” into the equivalent angle in radians. |
vec2 | Creates a 2-dimensional vector. |
vec3 | Creates a 3-dimensional vector. |
vec3a | Creates a 3-dimensional vector. |
vec4 | Creates a 4-dimensional vector. |
zero | Returns the additive identity, |
Type Definitions
Gray | A color represented as gray intensity. |
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. |
Point2 | A 2-dimensional point type. |
Point3 | A 3-dimensional point type. |
Rgb | A color represented as red, green and blue intensities. |
Rgb8 | The same as |
Rgba | The same as |
Rgba8 | The same as |
Srgb | Nonlinear sRGB. |
Srgba | Nonlinear sRGB with an alpha component. |
Vector2 | Deprecated A common alias for the |
Vector3 | Deprecated A common alias for the |
Vector4 | Deprecated A common alias for the |