A 2D affine transform, which can represent translation, rotation, scaling and shear.
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically
Reference Counted’.
Container that can have elements inserted into it and removed from it.
A thread-safe mutable memory location.
A wrapper type for an immutably borrowed value from an AtomicRefCell<T>
.
A threadsafe analogue to RefCell.
A wrapper type for a mutably borrowed value from an AtomicRefCell<T>
.
Controls audio from gameplay code.
Representation of an owned and self-contained backtrace.
A bimap backed by two HashMap
s.
Records operations for future application to a
World
A complex number in Cartesian form.
A Duration
type to represent a span of time, typically used for system
timeouts.
Lightweight unique ID, or handle, of an entity
Configures a filter effect.
Controls a filter effect.
Opaque handle to a user font.
A
hash map implemented with quadratic probing and SIMD lookup.
A
hash set implemented as a
HashMap
where the value is
()
.
A 2-dimensional vector.
Index type for
Arena
that has a generation attached to it.
A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration
.
A value which is initialized on the first access.
A 3x3 column major matrix.
A 4x4 column major matrix.
A thread-safe cell which can be written to only once.
A wrapper around floats providing implementations of Eq
, Ord
, and Hash
.
A slice of a path (akin to
str
).
A pointer which pins its pointee in place.
A (half-open) range bounded inclusively below and exclusively above
(start..end
).
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference
Counted’.
A mutable memory location with dynamically checked borrow rules
Stores both a static source code for a shader as well as path to its file in development. This
is used for automatic shader hot reloading.
Configures a reverb effect.
Opaque handle to a shader. The ID is exposed for debugging purposes.
If you set it manually, you’re on your own :)
Represents a set of shader uniform parameters.
A Vec
-like container that can store a small number of elements inline.
A piece of audio loaded into memory all at once.
Controls a static sound.
Settings for a static sound.
A Stopwatch is a struct that track elapsed time when started.
Tracks elapsed time. Enters the finished state once duration
is reached.
Configures a mixer track.
Controls a mixer track.
A 2-dimensional vector.
A 2-dimensional vector.
A 3-dimensional vector.
A 4-dimensional vector.
A double-ended queue implemented with a growable ring buffer.
A distribution using weighted sampling of discrete items
Represents a window.
An unordered collection of entities, each having any number of distinctly typed components
A trait to emulate dynamic typing.
Used for mutable dereferencing operations, like in *v = 1;
.
Types (distributions) that can be used to create a random instance of T
.
A dynamically typed collection of components
FromParallelIterator
implements the creation of a collection
from a
ParallelIterator
. By implementing
FromParallelIterator
for a given type, you define how it will be
created from an iterator.
A future represents an asynchronous computation obtained by use of
async
.
A hashable type.
A trait for hashing an arbitrary stream of bytes.
An iterator that supports “random access” to its data, meaning
that you can split it at arbitrary indices and draw data from
those points.
IntoParallelRefIterator
implements the conversion to a
ParallelIterator
, providing shared references to the data.
IntoParallelRefMutIterator
implements the conversion to a
ParallelIterator
, providing mutable references to the data.
Extension trait on iterators, providing random sampling methods.
An
Iterator
blanket implementation that provides extra adaptors and
methods.
The multiplication operator *
.
Conversion trait to convert an Iterator
to a ParallelIterator
.
ParallelDrainFull
creates a parallel iterator that moves all items
from a collection while retaining the original capacity.
ParallelDrainRange
creates a parallel iterator that moves a range of items
from a collection while retaining the original capacity.
ParallelExtend
extends an existing collection with items from a
ParallelIterator
.
Parallel version of the standard iterator trait.
Parallel extensions for slices.
Parallel extensions for mutable slices.
Parallel extensions for strings.
An automatically-implemented extension trait on
RngCore
providing high-level
generic methods for sampling values and other convenience methods.
The core of a random number generator.
Helper trait for creating objects using the correct implementation of
UniformSampler
for the sampling type.
Extension trait on slices, providing random mutation and sampling methods.
Returns the total number of assets loaded by the parallel
asset loader.
Returns the total number of assets queued for loading
by the parallel asset loader.
Clears a previously set error. Use the same ID as when calling report_error
.
Creates a new shader and returns its ID. The source
parameter should only contain the
fragment function, as the rest of the shader is automatically generated.
Draws a sprite on the screen.
This is a first iteration of Comfy’s rich text rendering.
Generates a new ShaderId. This is intended for internal use only.
Returns the current ShaderInstance
if any. Currently intended only for internal use.
Returns the current setting of sprite culling.
Creates a 2-dimensional vector.
Returns true if there was any mouse input during the current frame.
Returns true if the mouse was moved during the current frame.
Stores an error message with the given ID. This is useful for immediate mode error reporting
when you don’t want to pollute the log on every frame.
A linear easing that goes from 1.0
to 0.0
.
A linear easing that goes from 0.0
to 1.0
and back to 0.0
. That might be used in
combination with other easing functions.
When set to true
(default) sprites that are outside of the camera’s viewport will
not be drawn. This only affects sprites that are drawn using draw_sprite_pro
, or using
the Sprite/AnimatedSprite
components.
Sets a f32
uniform value by name. The uniform must exist in the shader.
Parses a simple subset of markdown-like syntax.
Retrieve the lazily-initialized thread-local random number generator,
seeded by the system. Intended to be used in method chaining style,
e.g. thread_rng().gen::<i32>()
, or cached locally, e.g.
let mut rng = thread_rng();
. Invoked by the Default
trait, making
ThreadRng::default()
equivalent.
Add a timing value to a given timer, measured in f32 seconds.
Switches back to the default shader.
Switches to the shader with the given ID. The shader must already exist. To revert back to the
default shader simply call use_default_shader()
.
Creates a 2-dimensional vector.
Creates a 2-dimensional vector.
Creates a 3-dimensional vector.
Creates a 4-dimensional vector.