Function GenerateBase64StringFromTextureAsync
-
GenerateBase64StringFromTextureAsync(
texture: BaseTexture,
faceIndex?: number,
level?: number,
): Promise<Nullable<string>>Parameters
- texture: BaseTexture
defines the texture to read pixels from
- faceIndex: number = 0
defines the face of the texture to read (in case of cube texture)
- level: number = 0
defines the LOD level of the texture to read (in case of Mip Maps)
Returns Promise<Nullable<string>>
The base64 encoded string or null wrapped in a promise
- texture: BaseTexture
Reads the pixels stored in the webgl texture and returns them as a base64 string