Texture
constTexture:object
Defined in: client/api.d.ts:888
Registers DDS textures with the engine so material samplers can be pointed at them by name.
Type Declaration
Section titled “Type Declaration”find()
Section titled “find()”find(
path):bigint
Looks up an already-registered texture without loading it.
Parameters
Section titled “Parameters”string
The same path that was passed to load.
Returns
Section titled “Returns”bigint
The registered name, or 0n when the path has not been loaded.
load()
Section titled “load()”load(
path):bigint
Registers a DDS with the engine, staging it out of the resource package when the path is resource-relative. Loading the same path twice returns the first registration.
Parameters
Section titled “Parameters”string
A path inside the calling resource, or an absolute game virtual-file-system path.
Returns
Section titled “Returns”bigint
The name a sampler binds against, or 0n when the file is missing or is not a DDS the engine decodes.
nameOf()
Section titled “nameOf()”nameOf(
path):bigint
Hashes a path into the name form the texture and material APIs use.
Parameters
Section titled “Parameters”string
Any virtual-file-system path.
Returns
Section titled “Returns”bigint
The 64-bit name hash.
