Phaser API Documentation

  Version: 
setTrim(actualWidth, actualHeight, destX, destY, destWidth, destHeight)

Description:

If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.

Parameters:

name type description
actualWidth number

The width of the frame before being trimmed.

actualHeight number

The height of the frame before being trimmed.

destX number

The destination X position of the trimmed frame for display.

destY number

The destination Y position of the trimmed frame for display.

destWidth number

The destination width of the trimmed frame for display.

destHeight number

The destination height of the trimmed frame for display.

Returns:
Description:

This Frame object.

Since: 3.0.0
Source: src/textures/Frame.js (Line 404)