Skip to content

Latest commit

 

History

History
83 lines (44 loc) · 2.21 KB

File metadata and controls

83 lines (44 loc) · 2.21 KB

Latite Scripting Documentation (Exports)


Exports > gfx/Texture > Texture

Texture

Class

Source: gfx/Texture.d.ts:1

Constructors

constructor()

new Texture(): Texture

Returns

Texture

Methods

dispose()

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

Returns

void

reload()

reload(): void

Reloads the (Minecraft renderer) texture.

Source: gfx/Texture.d.ts:17

Returns

void

get()

Static get(textureName: string): Texture

Gets a Minecraft texture. Can only be drawn with the Minecraft renderer

Source: gfx/Texture.d.ts:12

Parameters

Parameter Type Description
textureName string The texture name, example: "textures/items/arrow"

Returns

Texture

load()

Static load(filePath: string): Texture

Loads a texture from file.

Source: gfx/Texture.d.ts:6

Parameters

Parameter Type Description
filePath string The file path to the texture, could be absolute or relative to the script folder

Returns

Texture