Latite Scripting Documentation (Exports)
Exports > gfx/Texture > Texture
Class
Source: gfx/Texture.d.ts:1
new Texture():
Texture
dispose():
void
Destroys the texture. It's highly recommended to set the texture to null after you call this
Source: gfx/Texture.d.ts:22
void
reload():
void
Reloads the (Minecraft renderer) texture.
Source: gfx/Texture.d.ts:17
void
Staticget(textureName:string):Texture
Gets a Minecraft texture. Can only be drawn with the Minecraft renderer
Source: gfx/Texture.d.ts:12
| Parameter | Type | Description |
|---|---|---|
| textureName | string |
The texture name, example: "textures/items/arrow" |
Staticload(filePath:string):Texture
Loads a texture from file.
Source: gfx/Texture.d.ts:6
| Parameter | Type | Description |
|---|---|---|
| filePath | string |
The file path to the texture, could be absolute or relative to the script folder |