Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InitializationOptions

Hierarchy

  • InitializationOptions

Index

Properties

Optional attributes

attributes: WebGLContextAttributes

The context creation attributes passed to the WebGL context constructor

Optional canvas

canvas: string | HTMLCanvasElement

A reference to an HTML canvas element. (Default created and appending to container)

Optional container

container: string | HTMLElement

A container element which regl inserts a canvas into. (Default document.body)

Optional extensions

extensions: string | string[]

A list of extensions that must be supported by WebGL context. Default []

Optional gl

gl: WebGLRenderingContext

A reference to a WebGL rendering context. (Default created from canvas)

Optional onDone

onDone: function

An optional callback which accepts a pair of arguments, (err, regl) that is called after the application loads. If not specified, context creation errors throw

Type declaration

    • (err: Error | null, regl?: Regl): void
    • Parameters

      • err: Error | null
      • Optional regl: Regl

      Returns void

Optional optionalExtensions

optionalExtensions: string | string[]

A list of extensions which are loaded opportunistically. Default []

Optional pixelRatio

pixelRatio: number

A multiplier which is used to scale the canvas size relative to the container. (Default window.devicePixelRatio)

Optional profile

profile: boolean

If set, turns on profiling for all commands by default. (Default false)

Generated using TypeDoc