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 Texture 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

Get a 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

Operators

operator ==(other) bool

The equality operator.

inherited
operator [](String fileName) Texture

Returns a texture by its name.

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