Phaser API Documentation

  Version: 
getFrameBounds([sourceIndex])

Description:

Based on the given Texture Source Index, this method will get all of the Frames using that source and then work out the bounds that they encompass, returning them in an object.

This is useful if this Texture is, for example, a sprite sheet within an Atlas, and you need to know the total bounds of the sprite sheet.

Parameters:

name type arguments description
sourceIndex number <optional>

The index of the TextureSource to get the Frame bounds from.

Returns:
Description:

An object containing the bounds of the Frames using the given Texture Source Index.

Since: 3.80.0
Source: src/textures/Texture.js (Line 319)