A library for acquiring a backtrace at runtime
This crate gives small utilities for casting between plain data types.
Chrono: Date and Time for Rust
Colorful and clean backtraces on panic.
Tools for concurrent programming.
egui
: an easy-to-use GUI in pure Rust!
Simple plotting library for
egui
.
A simple logger that can be configured via environment variables, for use
with the logging facade exposed by the
log
crate.
A simple 2D graphics library for turning simple 2D shapes and text into textured triangles.
Dynamic texture atlas allocation using the shelf packing algorithm.
Utilities for formatting and printing String
s.
Fontdue is a font parser, rasterizer, and layout tool.
Fx Hash
A handy ECS
Overview
An extension to the include_str!()
and include_bytes!()
macro for
embedding an entire directory tree into your binary.
Tweak any literal directly from your code, changes to the source appear while running the program.
It works by parsing the file when a change occurs.
Kira
A lightweight logging facade.
Cross-platform file system notification library
Numeric traits for generic mathematics
Overview
Pollster
Data-parallelism library that makes it easy to convert sequential
computations into parallel
Small vectors in various sizes. These store a certain number of elements inline, and fall back
to the heap for larger allocations. This can be a useful optimization for improving cache
locality and reducing allocator traffic for workloads that fit within the inline buffer.
Accurate sleeping. Only use native sleep as far as it can be trusted, then spin.
A cross-platform graphics and compute library based on
WebGPU.
This library describes the API surface of WebGPU that is agnostic of the backend.
This API is used for targeting both Web and Native.
Winit is a cross-platform window creation and event loop management library.
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>
.
An integer type which can be safely shared between threads.
Controls audio from gameplay code.
Representation of an owned and self-contained backtrace.
A bimap backed by two HashMap
s.
Applies a threshold filter to the input image to extract the brightest
regions before blurring them and compositing back onto the original image.
These settings are useful when emulating the 1990s-2000s game look.
Applies a bloom effect to an HDR-enabled 2d or 3d camera.
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;
.
Utility methods not meant to be in the main API.
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.
Update the shader source for the given shader ID. This can be used by users who with to
implement their own shader hot reloading.
Clears a previously set error. Use the same ID as when calling report_error
.
Similar to create_shader
but automatically hot reloads the shader on change.
Note that create_reloadable_sprite_shader
will automatically call
sprite_shader_from_fragment
, meaning your source should only contain the fragment part.
Creates a new render target with given dimensions. Among other parameters a label is
required so that graphic debuggers like RenderDoc can display its name properly.
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.
Queue up an entity into a global despawn queue.
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.
Loads a pre-created Texture
with an associated DynamicImage
into the asset store.
Internal use only, checks for shader hot reloads and reloads them if needed.
Returns true if there was any mouse input during the current frame.
Returns true if the mouse was moved during the current frame.
returns a pseudo-random number in the range of 0 to u32::MAX.
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.
Seeds the pseudo-random number generator used by rand()
with the value seed.
Returns a list of entities to despawn.
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.