Function: GetTextureInfo()
Call Signature
function GetTextureInfo(this: void, name: string): TEX_INFO;Get texture metadata and throw if it is missing.
Parameters
| Parameter | Type | Description |
|---|---|---|
this | void | - |
name | string | Texture atlas entry name. |
Returns
Texture metadata.
Remarks
This overload verifies that the texture exists. Use an output-object overload when missing textures are expected.
Call Signature
function GetTextureInfo(
this: void,
name: string,
default_name: string): TEX_INFO;Get texture metadata, falling back to another texture name.
Parameters
| Parameter | Type | Description |
|---|---|---|
this | void | - |
name | string | Texture atlas entry name. |
default_name | string | Fallback texture name. |
Returns
Texture metadata.
Remarks
This overload verifies that either name or default_name exists.
Call Signature
function GetTextureInfo(
this: void,
name: string,
tex_info: TEX_INFO): boolean;Try to get texture metadata into an output object.
Parameters
| Parameter | Type | Description |
|---|---|---|
this | void | - |
name | string | Texture atlas entry name. |
tex_info | TEX_INFO | Output 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
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
| Parameter | Type | Description |
|---|---|---|
this | void | - |
name | string | Texture atlas entry name. |
default_name | string | Fallback texture name. |
tex_info | TEX_INFO | Output 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.