Frame#setTrim()

setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

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

Parameters
Name Type Description
trimmed boolean

If this frame was trimmed or not.

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.

Source code: animation/Frame.js (Line 153)
doc_phaser
2017-02-14 10:47:57
Comments
Leave a Comment

Please login to continue.