Function getGl

  • Get the WebGL2 context, if it doesn't exist it will be created for the provided canvas element, and memoized

    Parameters

    • selector: string = 'canvas'

      CSS selector for locating the canvas element

    • aa: boolean = true

      Enable antialiasing

    Returns undefined | WebGL2RenderingContext

    • Global WebGL2 context