Package tripleplay.util
Class TexturePacker
java.lang.Object
tripleplay.util.TexturePacker
A runtime texture packer.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(String id, float width, float height, TexturePacker.Renderer renderer) Add a lazily rendered region to the packer.Add an image to the packer.Pack all images into as few atlases as possible.
-
Constructor Details
-
TexturePacker
public TexturePacker()
-
-
Method Details
-
add
Add an image to the packer. -
add
Add a lazily rendered region to the packer. The renderer will be used to draw the region each time pack() is called. -
pack
Pack all images into as few atlases as possible.- Returns:
- A map containing the new images, keyed by the id they were added with.
-