Class Texture

Constructors

Properties

canvas: HTMLCanvasElement
ctx: CanvasRenderingContext2D
miniGL: MiniGL
premultiplyAlpha: boolean = true

Param: 是否支持预乘,默认为true,会提前乘好rgb*a,不需要再次乘alpha

webglTexture: WebGLTexture

Methods

  • Parameters

    • __namedParameters: {
          image: HTMLCanvasElement;
          name: string;
          rect: any;
          reverseY: boolean;
      }
      • image: HTMLCanvasElement
      • name: string
      • rect: any
      • reverseY: boolean

    Returns WebGLTexture

  • 更新材质数据

    Parameters

    • texture: WebGLTexture
    • image: HTMLImageElement

    Returns void

Generated using TypeDoc