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.

Constructors

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

Properties

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

Methods

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

Operators

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