Crate packr2

Source
Expand description

Rectangle packing algorithm

Structs§

PackerConfig
Configuration for a texture packer.
Rect
Defines a rectangle in pixels with the origin at the top-left of the texture atlas.
RectInput
RectOutput
Rectf
Rect that could be flipped sideway (rotated by 90 degrees clockwise)
Size
SkylinePacker
SplitPacker
Derived from the lightmap packer but uses a vector instead a tree, sourced from rectpack2D
StripPacker
Same implementation used by egui.

Constants§

RECT_SORT_FUNCTIONS

Traits§

Packer

Functions§

pack
Sorts the input data using the heuristics defined in RECT_SORT_FUNCTIONS to find the best possible packing, the results might end up been inside multiple atlases.