TiledAtlas class

One image atlas for all Tiled image sets in a map.

Please note that TiledAtlas should not be reused without clone as it may have a different batch instance.

Properties

atlas Image?
Single atlas for all renders.
final
batch → SpriteBatch?
The single batch operation for this atlas.
final
hashCode int
The hash code for this object.
no setterinherited
key String
Image key for this atlas.
final
offsets Map<String, Offset>
Map of all source images to their new offset.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useAtlas bool
If SpriteBatch should use atlas or not.
final

Methods

clone() TiledAtlas
Create a new atlas from this object with the intent of getting a new SpriteBatch.
contains(String? source) bool
Returns whether or not this atlas contains source.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

atlasMap Map<String, TiledAtlas>
Maps of tilesets compiled to TiledAtlas.
final

Static Methods

atlasKey(Iterable<TiledImage> images) String
clearCache() → void
Clears images cached in TiledAtlas
fromTiledMap(TiledMap map, {double? maxX, double? maxY, Images? images, bool tsxPackingFilter(Tileset)?, bool useAtlas = true, double spacingX = 0, double spacingY = 0}) Future<TiledAtlas>
Loads all the tileset images for the map into one TiledAtlas.