SpriteSheet class

A sprite sheet packs a number of smaller images into a single large image.

The placement of the smaller images are defined by a json file. The larger image and json file is typically created by a tool such as TexturePacker. The SpriteSheet class will take a reference to a larger image and a json string. From the image and the string the SpriteSheet creates a number of SpriteTexture objects. The names of the frames in the sprite sheet definition are used to reference the different textures.


SpriteSheet(Image _image, String jsonDefinition)
Creates a new sprite sheet from an _image and a sprite sheet jsonDefinition. [...]


hashCode int
The hash code for this object. [...]
read-only, inherited
image Image
The image used by the sprite sheet. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
textures Map<String, SpriteTexture>


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]
operator [](String fileName) SpriteTexture
Returns a texture by its name. [...]