Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CopyTools

Class used to host copy specific utilities

Hierarchy

  • CopyTools

Index

Methods

Static GenerateBase64StringFromPixelDataSearch playground for GenerateBase64StringFromPixelData

  • GenerateBase64StringFromPixelData(pixels: ArrayBufferView, size: ISize, invertY?: boolean): Nullable<string>
  • Transform some pixel data to a base64 string

    Parameters

    • pixels: ArrayBufferView

      defines the pixel data to transform to base64

    • size: ISize

      defines the width and height of the (texture) data

    • Optional invertY: boolean

      true if the data must be inverted for the Y coordinate during the conversion

    Returns Nullable<string>

    The base64 encoded string or null

Static GenerateBase64StringFromTextureSearch playground for GenerateBase64StringFromTexture

  • GenerateBase64StringFromTexture(texture: BaseTexture, faceIndex?: number, level?: number): Nullable<string>
  • Reads the pixels stored in the webgl texture and returns them as a base64 string

    Parameters

    • texture: BaseTexture

      defines the texture to read pixels from

    • Optional faceIndex: number

      defines the face of the texture to read (in case of cube texture)

    • Optional level: number

      defines the LOD level of the texture to read (in case of Mip Maps)

    Returns Nullable<string>

    The base64 encoded string or null

Static GenerateBase64StringFromTextureAsyncSearch playground for GenerateBase64StringFromTextureAsync

  • GenerateBase64StringFromTextureAsync(texture: BaseTexture, faceIndex?: number, level?: number): Promise<Nullable<string>>
  • Reads the pixels stored in the webgl texture and returns them as a base64 string

    Parameters

    • texture: BaseTexture

      defines the texture to read pixels from

    • Optional faceIndex: number

      defines the face of the texture to read (in case of cube texture)

    • Optional level: number

      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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method