Interface WebGL2RenderingContextProvider

Interface for a provider of WebGL2RenderingContext. Useful for non-Web environments where HTML Canvas element does not exist.

Hierarchy

  • WebGL2RenderingContextProvider

Accessors

Methods

Accessors

  • get height(): number
  • Returns number

    the canvas height.

  • get width(): number
  • Returns number

    the canvas width.

Methods

  • Gets a WebGLRenderingContext.

    Parameters

    • type: "webgl2"

      WebGL version. Must be 'webgl2'

    • Optional options: WebGLContextAttributes

      optional WebGL rendering context attributes

    Returns null | WebGL2RenderingContext

    a WebGL2RenderingContext, or null if unsupported.

Generated using TypeDoc