Utility class to perform various graphics operations like copying textures to canvas

Constructors

Methods

  • Copy a texture to a new texture

    Parameters

    • texture: Texture

      the texture to copy

    • OptionalblitMaterial: ShaderMaterial

      the material to use for copying (optional)

    Returns Texture

    the newly created, copied texture

  • Create a blit material for copying textures

    Parameters

    • fragment: string

    Returns ShaderMaterial

  • Copy a texture to a HTMLCanvasElement

    Parameters

    • texture: Texture

      the texture convert

    • force: boolean = false

      if true the texture will be copied to a new texture before converting

    Returns null | HTMLCanvasElement

    the HTMLCanvasElement with the texture or null if the texture could not be copied