Options
All
  • Public
  • Public/Protected
  • All
Menu

Texture class used to store image, video, canvas and data as typed arrays

Hierarchy

Index

Constructors

constructor

Properties

Protected anisotropyExtension

anisotropyExtension: EXT_texture_filter_anisotropic

Protected format

format: number

Protected gl

gl: WebGLRenderingContext

Protected height

height: number

Protected internalFormat

internalFormat: number

Protected target

target: number

Protected texture

texture: null | WebGLTexture

Protected type

type: number

Protected width

width: number

Methods

bind

delete

  • delete(): void

fromData

  • fromData(dataArray: any, width: number, height: number): Texture

fromImage

  • fromImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, width?: number, height?: number): Texture
  • Parameters

    • image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
    • width: number = ...
    • height: number = ...

    Returns Texture

fromSize

  • fromSize(width: number, height: number): Texture

generateMipmap

getTexture

  • getTexture(): null | WebGLTexture

setAnisotropy

  • setAnisotropy(anisotropyLevel: number): Texture

setFormat

  • setFormat(format?: number, internalFormat?: number, type?: number): Texture

setIsFlip

  • setIsFlip(flip?: number): Texture

setMagFilter

  • setMagFilter(filter?: number): Texture

setMinFilter

  • setMinFilter(filter?: number): Texture

setPixelStore

  • setPixelStore(name: number, params: number): Texture

setWrap

  • setWrap(wrapS?: number, wrapT?: number): Texture

unbind

Static isPowerOf2

  • isPowerOf2(width: number, height: number): boolean

Generated using TypeDoc