Expand description
Provides 2D sprite rendering functionality.
Modules§
- prelude
- The sprite prelude.
Structs§
- Color
Material - A 2d material that renders 2d meshes with a texture tinted by a uniform color
- Color
Material Flags - Color
Material Plugin - Color
Material Uniform - The GPU representation of the uniform data of a
ColorMaterial. - Draw
Mesh2d - Draw
Sprite Batch - Entities
Needing Specialization - Temporarily stores entities that were determined to either need their specialized pipelines updated or to have their specialized pipelines removed.
- Extracted
Slice - Extracted
Slices - Extracted
Sprite - Extracted
Sprites - Extracted
Wireframe Color - Image
Bind Groups - Material2d
Bind Group Id - Material2d
Key - Material2d
Pipeline - Render pipeline data for a given
Material2d - Material2d
Plugin - Adds the necessary ECS resources and render logic to enable rendering entities using the given
Material2dasset type (which includesMaterial2dtypes). - Material2d
Properties - Common
Material2dproperties, calculated for a specific material instance. - Mesh2d
Bind Group - Mesh2d
Marker - Mesh2d
Pipeline - Mesh2d
Pipeline Key - Mesh2d
Render Plugin - Mesh2d
Transforms - Mesh2d
Uniform - Mesh2d
View Bind Group - Mesh2d
Wireframe - Mesh2d
Wireframe Template - Mesh
Flags - Mesh
Material2d - A material used for rendering a
Mesh2d. - Mesh
Material2d Template - NoWireframe2d
- Disables wireframe rendering for any entity it is attached to.
It will ignore the
Wireframe2dConfigglobal setting. - Packed
Tile Data - Packed per-tile data for use in the
Rgba16Uinttile data texture inTilemapChunkMaterial. - Pending
Mesh Material2d Queues - Holds all entities with 2D mesh materials that couldn’t be specialized and/or queued because their materials hadn’t loaded yet.
- Pending
Wireframe2d Queues - Prepared
Material2d - Data prepared for a
Material2dinstance. - Render
Material2d Bind Group Ids - Render
Material2d Ids - Render
Material2d Instances - Render
Mesh2d Instance - Render
Mesh2d Instances - Render
Wireframe Instances - Render
Wireframe Material - SetMaterial2d
Bind Group - SetMesh2d
Bind Group - SetMesh2d
View Bind Group - SetSprite
Texture Bind Group - SetSprite
View Bind Group - SetWireframe2d
Immediates - Specialized
Material2d Pipeline Cache - Stores the
SpecializedMaterial2dViewPipelineCachefor each view. - Specialized
Material2d View Pipeline Cache - Stores the cached render pipeline ID for each entity in a single view, as well as the last time it was changed.
- Specialized
Wireframe Pipeline Cache - Stores the
SpecializedWireframeViewPipelineCachefor each view. - Specialized
Wireframe View Pipeline Cache - Stores the cached render pipeline ID for each entity in a single view, as well as the last time it was changed.
- Sprite
Asset Events - Sprite
Batch - Sprite
Batches - Sprite
Material - Sprite
Material Flags - Sprite
Material Plugin - Sprite
Material Uniform - Sprite
Mesh Plugin - Sprite
Meta - Sprite
Pipeline - Sprite
Pipeline Key - Sprite
Render Plugin - Adds support for 2D sprite rendering.
- Sprite
View Bind Group - Tile
Data - Data for a single tile in the tilemap chunk.
- Tilemap
Chunk - A component representing a chunk of a tilemap. Each chunk is a rectangular section of tiles that is rendered as a single mesh.
- Tilemap
Chunk Material - Material used for rendering tilemap chunks.
- Tilemap
Chunk Material Plugin - Plugin that adds support for tilemap chunk materials.
- Tilemap
Chunk Mesh Cache - A resource storing the meshes for each tilemap chunk size.
- Tilemap
Chunk Plugin - Plugin that handles the initialization and updating of tilemap chunks. Adds systems for processing newly added tilemap chunks and updating their indices.
- Tilemap
Chunk Template - Tilemap
Chunk Tile Data - Component storing the data of tiles within a chunk.
Each index corresponds to a specific tile in the tileset.
Noneindicates an empty tile. - View
KeyCache - Wireframe2d
- Enables wireframe rendering for any entity it is attached to.
It will ignore the
Wireframe2dConfigglobal setting. - Wireframe2d
Batch SetKey - Wireframe2d
BinKey - Data that must be identical in order to batch phase items together.
- Wireframe2d
Color - Sets the color of the
Wireframe2dof the entity it is attached to. - Wireframe2d
Config - Wireframe2d
Material - Wireframe2d
Phase Item - Wireframe2d
Pipeline - Wireframe2d
Plugin - A
Pluginthat draws wireframes for 2D meshes. - Wireframe
Entities Needing Specialization - Temporarily stores entities that were determined to either need their specialized pipelines for wireframes updated or to have their specialized pipelines for wireframes removed.
Enums§
- Alpha
Mode2d - Sets how a 2d material’s base color alpha channel is used for transparency.
Currently, this only works with
Mesh2d. Sprites are always transparent. - Extracted
Sprite Kind - Sprite
Systems - System set for sprite rendering.
- Tile
Orientation - The set of possible tile orientations. These represent all possible results of mirroring the tile horizontally and/or vertically, and/or rotation by 90 degree increments.
Constants§
Traits§
- Material2d
- Materials are used alongside
Material2dPlugin,Mesh2d, andMeshMaterial2dto spawn entities that are rendered with a specificMaterial2dtype. They serve as an easy to use high level way to renderMesh2dentities with custom shader logic.
Functions§
- alpha_
mode_ pipeline_ key - check_
entities_ needing_ specialization - Finds 2D entities that have changed in such a way as to potentially require
specialization and adds them to the
EntitiesNeedingSpecializationlist. - check_
views_ need_ specialization - check_
wireframe_ entities_ needing_ specialization - Finds 2D wireframe entities that have changed in such a way as to
potentially require specialization and adds them to the
WireframeEntitiesNeedingSpecializationlist. - extract_
entities_ needs_ specialization - extract_
entities_ that_ need_ specializations_ removed - A system that adds entities that were judged to need their specializations
removed to the appropriate table in
DirtySpecializations. - extract_
mesh2d - extract_
mesh_ materials_ 2d - extract_
sprite_ events - extract_
sprites - extract_
text2d_ sprite bevy_text - This system extracts the sprites from the 2D text components and adds them to the “render world”.
- extract_
wireframe_ 2d_ entities_ needing_ specialization - extract_
wireframe_ 2d_ entities_ that_ need_ specializations_ removed - A system that adds entities that were judged to need their specializations
removed to the appropriate table in
DirtyWireframeSpecializations. - extract_
wireframe_ materials - init_
batched_ instance_ buffer - init_
material_ 2d_ pipeline - init_
mesh_ 2d_ pipeline - init_
sprite_ pipeline - init_
wireframe_ 2d_ pipeline - make_
chunk_ tile_ data_ image - prepare_
mesh2d_ bind_ group - prepare_
mesh2d_ view_ bind_ groups - prepare_
pending_ mesh_ material2d_ queues - Prepares the
PendingMeshMaterial2dQueuesfor a new frame by swapping the current and previous frame queues for each view. - prepare_
sprite_ image_ bind_ groups - prepare_
sprite_ view_ bind_ groups - queue_
material2d_ meshes - queue_
sprites - specialize_
material2d_ meshes - specialize_
wireframes - tonemapping_
pipeline_ key - update_
tilemap_ chunk_ indices
Type Aliases§
- Draw
Sprite RenderCommandfor sprite rendering.- Draw
Wireframe2d