Crate sprite

Crate sprite 

Source
Expand description

Provides 2D sprite functionality.

Modules§

prelude
The sprite prelude.

Structs§

Anchor
Normalized (relative to its size) offset of a 2d renderable entity from its Transform.
BorderRect
Defines the extents of the border of a rectangle.
Sprite
Describes a sprite to be rendered to a 2D camera
SpritePlugin
Adds support for 2D sprites.
Text2d
The top-level 2D text component.
Text2dShadow
Adds a shadow behind Text2d text
TextureSlice
Single texture slice, representing a texture rect to draw in a given area
TextureSlicer
Slices a texture using the 9-slicing technique. This allows to reuse an image at various sizes without needing to prepare multiple assets. The associated texture will be split into nine portions, so that on resize the different portions scale or tile in different ways to keep the texture in proportion.

Enums§

ScalingMode
Represents various modes for proportional scaling of a texture.
SliceScaleMode
Defines how a texture slice scales when resized
SpriteImageMode
Controls how the image is altered when scaled.
SpriteSystems
System set for sprite rendering.

Functions§

calculate_bounds_2d
System calculating and inserting an Aabb component to entities with either:
calculate_bounds_text2d
System calculating and inserting an Aabb component to entities with some TextLayoutInfo and Anchor components, and without a NoFrustumCulling component.
update_text2d_layout
Updates the layout and size information whenever the text or style is changed. This information is computed by the TextPipeline on insertion, then stored.

Type Aliases§

SpriteSystemDeprecated
Deprecated alias for SpriteSystems.
Text2dReader
2d alias for TextReader.
Text2dWriter
2d alias for TextWriter.