The name of the image collection in the map data.
The first image index this image collection contains.
Optionalwidth: number
Width of widest image (in pixels). Default 32.
Optionalheight: number
Height of tallest image (in pixels). Default 32.
Optionalmargin: number
The margin around all images in the collection (in pixels). Default 0.
Optionalspacing: number
The spacing between each image in the collection (in pixels). Default 0.
Optionalproperties: object
Custom Image Collection properties. Default {}.
The Tiled firstgid value. This is the starting index of the first image index this Image Collection contains.
ReadonlyimageThe height of the tallest image (in pixels).
ReadonlyimageThe margin around the images in the collection (in pixels).
ReadonlyimagesThe cached images that are a part of this collection.
ReadonlyimageThe spacing between each image in the collection (in pixels).
ReadonlyimageThe width of the widest image (in pixels).
The name of the Image Collection.
Image Collection-specific properties that are typically defined in the Tiled editor.
ReadonlytotalThe total number of images in the image collection.
Add an image to this Image Collection.
The gid of the image in the Image Collection.
The key of the image in the Image Collection and in the cache.
The width of the image in the Image Collection.
The height of the image in the Image Collection.
This ImageCollection object.
Returns true if and only if this image collection contains the given image index.
The image index to search for.
True if this Image Collection contains the given index.
An Image Collection is a special Tile Set where each entry is a complete, individual image rather than a tile sliced from a larger spritesheet. Unlike a standard Tile Set, every image in the collection is its own standalone asset referenced by a unique global ID (GID).
Image Collections are normally created automatically when Tiled map data is loaded. You would encounter them when a Tiled map uses the "Collection of Images" tile set type instead of the standard single-image tile set type.