Texture

The Texture represents the image data on the GPU.

Hierarchy

Constructors

new Texture(context: Context, opts: TextureOptions): Texture

Properties

_filter: TextureFilter

_size: Vec2

context: Context

pixelFormat: PixelFormat

The pixel format of this Texture.

pixelType: PixelType

The pixel type of this Texture.

texture: WebGLTexture

The WebGL texture of this Texture.

Accessors

get filter(): "nearest" | "mipmap-nearest" | "bilinear" | "mipmap-bilinear" | "trilinear"

The filter used in scaling of this Texture.

set filter(filter: TextureFilter): void

The filter used in scaling of this Texture.

    get size(): Vec2

    The size of this Texture.

    set size(size: Vec2): void

    The size of this Texture.

      Methods

      dispose(): void

      generateMipmap(): void

      setData(size: Vec2, data?: ArrayBufferView): void

      setImage(image: ImageSource): void