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

Arguments

Name
Type
Optional
location?
Yes
scale?
Yes
angle?
Yes
sprite?
Yes

Returns

{any[+]} | On error: {undefined}

Description

Return an array containg rendering data for each vertex resulting in this Shape, consisting of its primitive type, location and UV of each vertex nested in arrays for each side, using its current data or temporarily replaced parts. Format of that data depends on whether location is specified:
  • If it is, data for three-dimensional rendering will be returned.
  • If not, flat two-dimensional data will be returned, with location prepared for rendering performed by altering the world matrix and UV values normalized to each Sprite frame used, instead of the entire texture. In both cases, data will be represented at following array positions:
  • array[0]: primitive type {constant:pr_*}
  • array[1]: vertex location data {real[+]}
  • array[2]: texture data {any[+]}

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