Buy Me a Coffee at ko-fi.com

A global API which allows for creating textures at runtime

Creates a copy of the texture
The copy is registered with the given name

overload 1:
TextureAPI.copy(name: String, texture: Texture): Texture
typings.-1808118735typings.246836475typings.246836475
Method PropertyFluent DescriptionRepresentation
name accepts
texture accepts
Return Value

Returns a copy of a resource texture as a texture object for modifying

overload 1:
TextureAPI.fromVanilla(name: String, path: String): Texture
typings.-1808118735typings.-1808118735typings.246836475
Method PropertyFluent DescriptionRepresentation
name accepts
path accepts
Return Value

Gets a registered texture based on its name, or nil if no texture was found with that name

overload 1:
TextureAPI.get(name: String): Texture | nil
typings.-1808118735typings.-361746168
Method PropertyFluent DescriptionRepresentation
name accepts
Return Value

Returns a table with all textures used by this avatar
Do not include generated textures from this API

overload 1:
TextureAPI.getTextures(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Creates a new texture with the given name, width and height
The texture is filled with a solid color

overload 1:
TextureAPI.newTexture(name: String, width: Integer, height: Integer): Texture
typings.-1808118735typings.-672261858typings.-672261858typings.246836475
Method PropertyFluent DescriptionRepresentation
name accepts
width accepts
height accepts
Return Value

Reads a texture from a base64 string or a byte array

overload 1:
TextureAPI.read(name: String, base64Text: String): Texture
typings.-1808118735typings.-1808118735typings.246836475
Method PropertyFluent DescriptionRepresentation
name accepts
base64Text accepts
Return Value
overload 2:
TextureAPI.read(name: String, byteArray: Table): Texture
typings.-1808118735typings.80563118typings.246836475
Method PropertyFluent DescriptionRepresentation
name accepts
byteArray accepts
Return Value