Class Texture3d

A three-dimensional texture.

Hierarchy (view full)

Constructors

Accessors

  • get isImmutableFormat(): boolean
  • Whether or not this is an immutable-format texture.

    Returns boolean

  • get isTextureComplete(): boolean
  • Whether or not this texture is texture complete.

    Returns boolean

Methods

  • Get the dimensions of the mip at the given level.

    Parameters

    • level: number

      The level of the mip.

    Returns number[]

    The width, height (if applicable), and depth (if applicable) of the mip, in that order.

  • Copy the data in a framebuffer into one of this texture's mips.

    Parameters

    • framebuffer: null | Framebuffer

      The framebuffer to copy into the mip, or null for the default framebuffer.

    • Optionallevel: number

      The level of the mip within its mipmap. Defaults to the top mip.

    • Optionalface: CubeFace

      The mipmap that the mip belongs to. Ignored by non-cubemap textures.

    • Optionalbounds: Rectangle | Prism

      The bounds of the mip to be updated. Defaults to the entire mip if not set.

    • Optionaltype: TextureDataType

      The type of the given data. Must be compatible with the format of the given data.

    • OptionalunpackAlignment:
          | 1
          | 2
          | 4
          | 8

      The alignment to use when unpacking the data, or undefined to let this be automatically determined.

    • Optionalarea: Rectangle | Prism

      The area of the framebuffer to copy into the mip.

    Returns void

    TextureFormatError if the given data type is incompatible with this texture's format.

  • Copy the data in a buffer into one of this texture's mips.

    Parameters

    • buffer: Vbo

      The buffer to copy into the mip.

    • level: undefined | number

      The level of the mip within its mipmap. Defaults to the top mip.

    • face: undefined | CubeFace

      The mipmap that the mip belongs to. Ignored by non-cubemap textures.

    • bounds: undefined | Rectangle | Prism

      The bounds of the mip to be updated. Defaults to the entire mip if not set.

    • type: undefined | TextureDataType

      The type of the given data. Must be compatible with the format of the given data.

    • unpackAlignment:
          | undefined
          | 1
          | 2
          | 4
          | 8

      The alignment to use when unpacking the data, or undefined to let this be automatically determined.

    • size: number

      The number of bytes of data to copy from the buffer.

    • offset: number

      The offset in bytes from the start of the buffer to start copying at.

    Returns void

    TextureFormatError if the given data type is incompatible with this texture's format.

  • Copy data into one of this texture's mips.

    Parameters

    • Optionaldata: TexImageSource

      The data to copy into the mip.

    • Optionallevel: number

      The level of the mip within its mipmap. Defaults to the top mip.

    • Optionalface: CubeFace

      The mipmap that the mip belongs to. Ignored by non-cubemap textures.

    • Optionalbounds: Rectangle | Prism

      The bounds of the mip to be updated. Defaults to the entire mip if not set.

    • Optionaltype: TextureDataType

      The type of the given data. Must be compatible with the format of the given data.

    • OptionalunpackAlignment:
          | 1
          | 2
          | 4
          | 8

      The alignment to use when unpacking the data, or undefined to let this be automatically determined.

    Returns void

    TextureFormatError if the given data type is incompatible with this texture's format.

  • Copy the data in an array into one of this texture's mips.

    Parameters

    • array: ArrayBufferView

      The array to copy into the mip.

    • Optionallevel: number

      The level of the mip within its mipmap. Defaults to the top mip.

    • Optionalface: CubeFace

      The mipmap that the mip belongs to. Ignored by non-cubemap textures.

    • Optionalbounds: Rectangle | Prism

      The bounds of the mip to be updated. Defaults to the entire mip if not set.

    • Optionaltype: TextureDataType

      The type of the given data. Must be compatible with the format of the given data.

    • OptionalunpackAlignment:
          | 1
          | 2
          | 4
          | 8

      The alignment to use when unpacking the data, or undefined to let this be automatically determined.

    • Optionaloffset: number

      The offset from the start of the array to start copying at, or undefined for the start of the array.

    • Optionallength: number

      The number of elements to copy from the array, or undefined for the entire array.

    Returns void

    TextureFormatError if the given data type is incompatible with this texture's format.