Skip to content

Class: PalettedTextures ​

Defined in: packages/minerender/src/texture/PalettedTextures.ts:10

Recolours textures using indexed pairs of palette images.

Constructors ​

Constructor ​

ts
new PalettedTextures(): PalettedTextures;

Returns ​

PalettedTextures

Methods ​

get() ​

ts
static get(
   texture, 
   key, 
   permutation
): Promise<Maybe<ExtractableImageData>>;

Defined in: packages/minerender/src/texture/PalettedTextures.ts:12

Loads a texture with a palette permutation, sharing the resulting canvas between callers.

Parameters ​

ParameterType
textureAssetKey
keyAssetKey
permutationAssetKey

Returns ​

Promise<Maybe<ExtractableImageData>>