Crate sprite_dicing

Source

Structs§

Artifacts
Final products of a dicing operation.
DicedSprite
Generated dicing product of a SourceSprite containing mesh data and reference to the associated atlas texture required to reconstruct and render sprite at runtime.
Pivot
Relative (in 0.0-1.0 range) XY distance of the sprite pivot (origin point), counted from top-left corner of the sprite mesh rectangle.
Pixel
A texture pixel represented as 8-bit RGBA components.
Prefs
Preferences for a dicing operation.
Progress
Progress of a dicing operation.
Rect
A rectangle in conventional units space.
SourceSprite
Original sprite specified as input for a dicing operation.
Texture
A set of pixels forming sprite texture.
Uv
Represents position on a texture, relative to its dimensions.
Vertex
Represents position of a mesh vertex in a local space coordinated with conventional units.

Enums§

Error
Error occurred in a dicing operation.

Functions§

dice
Splits specified sprite textures into chunks, discards identical ones, joins unique chunks into atlas textures and generates sprite meshes with texture coordinates mapped to the atlas textures allowing to render original sprites without the source textures.

Type Aliases§

ProgressCallback
Callback for notifying on dicing progress updates.
Result
Result of a dicing operation.