Expand description
Items for sprites, rects, texture atlases, etc.
Modules
- Utilities for detecting if and on which side two axis-aligned bounding boxes (AABB) collide.
Structs
- A 2d material that renders 2d meshes with a texture tinted by a uniform color
- The GPU representation of the uniform data of a
ColorMaterial
. - Helper utility to update
TextureAtlas
on the fly. - Render pipeline data for a given
Material2d
- Adds the necessary ECS resources and render logic to enable rendering entities using the given
Material2d
asset type (which includesMaterial2d
types). - A component bundle for entities with a
Mesh2dHandle
and aMaterial2d
. - Component for rendering with meshes in the 2d pipeline, usually with a 2d material such as
ColorMaterial
. - All
Material2d
values of a given type that should be prepared next frame. - Data prepared for a
Material2d
instance. - Stores all prepared representations of
Material2d
assets for as long as they exist. - A Bundle of components for drawing a single sprite from a sprite sheet (also referred to as a
TextureAtlas
) - An atlas containing multiple textures (like a spritesheet or a tilemap). Example usage animating sprite. Example usage loading sprite sheet.
- A builder which is used to create a texture atlas from many individual sprites.
Enums
- How a sprite is positioned relative to its
Transform
. It defaults toAnchor::Center
.
Constants
Traits
- Materials are used alongside
Material2dPlugin
andMaterialMesh2dBundle
to spawn entities that are rendered with a specificMaterial2d
type. They serve as an easy to use high level way to renderMesh2dHandle
entities with custom shader logic.
Functions
- System calculating and inserting an
Aabb
component to entities with either: - This system extracts all created or modified assets of the corresponding
Material2d
type into the “render world”. - This system prepares all assets of the corresponding
Material2d
type which where extracted this frame for the GPU.
Type Definitions
- A component bundle for entities with a
Mesh2dHandle
and aColorMaterial
.