Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Texture2D

Hierarchy

Callable

Index

Properties

format

Texture format.

height

height: number

Height of texture.

mag

Texture magnification filter.

min

Texture minification filter.

stats

stats: object

Type declaration

  • size: number

    Size of the texture, in bytes.

type

Texture data type.

width

width: number

Width of texture.

wrapS

Texture wrap mode on S axis.

wrapT

Texture wrap mode on T axis.

Methods

destroy

  • destroy(): void

resize

  • resize(width?: number, height?: number): void
  • Resizes a texture.

    Parameters

    • Optional width: number
    • Optional height: number

    Returns void

subimage

  • subimage(data: Texture2DOptions, x?: number, y?: number, level?: number): void
  • Replaces the part of texture with new data.

    Parameters

    • data: Texture2DOptions

      image data object, similar to arguments for the texture constructor

    • Optional x: number

      horizontal offset of the image within the texture (Default: 0)

    • Optional y: number

      vertical offset of the image within the texture (Default: 0)

    • Optional level: number

      mipmap level of the texture to modify (Default: 0)

    Returns void

Generated using TypeDoc