What it does
SpriteUV sets UV on a Sprite object. It takes iSpriteIndex (an integer), u1 (a float), v1 (a float), u2 (a float), v2 (a float), u3 (a float), v3 (a float), u4 (a float) and v4 (a float), and returns nothing. iSpriteIndex is the id of a Sprite object, the one CreateSprite returned: it is how the call knows what to act on.
Syntax
SpriteUV(iSpriteIndex integer, u1 float, v1 float, u2 float, v2 float, u3 float, v3 float, u4 float, v4 float)Parameters
| Name | Type |
|---|---|
| iSpriteIndex | integer |
| u1 | float |
| v1 | float |
| u2 | float |
| v2 | float |
| u3 | float |
| v3 | float |
| u4 | float |
| v4 | float |
Every form returns
nothing
Example · generated
image = LoadImage("assets/sprite.png", 1)sprite = CreateSprite(image)SpriteUV(sprite, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)DO Sync()LOOPLoadImage and CreateSprite are there to give the call something to act on; SpriteUV is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.