Skip to content

Function: GetTextureInfo() ​

Call Signature ​

ts
function GetTextureInfo(this: void, name: string): TEX_INFO;

Get texture metadata and throw if it is missing.

Parameters ​

ParameterTypeDescription
thisvoid-
namestringTexture atlas entry name.

Returns ​

TEX_INFO

Texture metadata.

Remarks ​

This overload verifies that the texture exists. Use an output-object overload when missing textures are expected.

Call Signature ​

ts
function GetTextureInfo(
   this: void, 
   name: string, 
   default_name: string): TEX_INFO;

Get texture metadata, falling back to another texture name.

Parameters ​

ParameterTypeDescription
thisvoid-
namestringTexture atlas entry name.
default_namestringFallback texture name.

Returns ​

TEX_INFO

Texture metadata.

Remarks ​

This overload verifies that either name or default_name exists.

Call Signature ​

ts
function GetTextureInfo(
   this: void, 
   name: string, 
   tex_info: TEX_INFO): boolean;

Try to get texture metadata into an output object.

Parameters ​

ParameterTypeDescription
thisvoid-
namestringTexture atlas entry name.
tex_infoTEX_INFOOutput texture metadata.

Returns ​

boolean

Whether the texture was found.

Remarks ​

The passed tex_info object is overwritten when the texture is found. Missing textures return false instead of failing native verification.

Call Signature ​

ts
function GetTextureInfo(
   this: void, 
   name: string, 
   default_name: string, 
   tex_info: TEX_INFO): boolean;

Try to get texture metadata into an output object, with a fallback texture name.

Parameters ​

ParameterTypeDescription
thisvoid-
namestringTexture atlas entry name.
default_namestringFallback texture name.
tex_infoTEX_INFOOutput texture metadata.

Returns ​

boolean

Whether the texture or fallback was found.

Remarks ​

The passed tex_info object is overwritten when either texture is found. Missing primary and fallback textures return false.