Skip to content
M2O Scripting APIScripting reference
Global objectClient APIGenerated

Texture

const Texture: object

Defined in: client/api.d.ts:888

Registers DDS textures with the engine so material samplers can be pointed at them by name.

find(path): bigint

Looks up an already-registered texture without loading it.

string

The same path that was passed to load.

bigint

The registered name, or 0n when the path has not been loaded.

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.

string

A path inside the calling resource, or an absolute game virtual-file-system path.

bigint

The name a sampler binds against, or 0n when the file is missing or is not a DDS the engine decodes.

nameOf(path): bigint

Hashes a path into the name form the texture and material APIs use.

string

Any virtual-file-system path.

bigint

The 64-bit name hash.