SpriteFrameRect

Extends: roAssociativeArray

One frame of a packed sprite sheet (see BGE.SpriteFrames). The rect is where the frame's pixels are on the sheet; the optional offset and source size say where that rect sat in the untrimmed cell, so trimmed frames still line up with each other.

Properties

  • sheet (integer) — Which sheet the frame is on (default 0)
  • x (integer)
  • y (integer)
  • width (integer)
  • height (integer)
  • offsetX (integer) — Position of the rect inside the untrimmed cell (default 0, 0)
  • offsetY (integer)
  • sourceWidth (integer) — Size of the untrimmed cell (default: the rect's own size)
  • sourceHeight (integer)