Cube.getUV() - Mtax-Development/GML-OOP GitHub Wiki

Arguments

Name
Type
Optional
sprite?
Yes
normalizeToFrame?
Yes

Returns

{any[+]}

Description

Return the UV coordinates for every vertex of each Sprite frame used by this Shape, along with pointers to respective texture. If specified, UV values will be normalized to Sprite frames of each pointer, instead of entire texture page, so its top-left corner will be treated as 0 and bottom-right corner as 1. An array will be returned, containing data for every side, nested in arrays with data then represented at following array positions:
  • array[0]: Sprite frame texture {pointer}
  • array[1]: UV coordinates {real[]}
  • array[1][0]: U coordinate {real[]}
  • array[1][1]: V coordinate {real[]}

⚠️ **GitHub.com Fallback** ⚠️