Interface: ContextSystemOptions

ContextSystemOptions

Options for the context system.

Properties:
Name Type Attributes Default Description
antialias boolean <optional>

Whether to enable antialiasing.

context WebGL2RenderingContext | unknown <optional>
null

User-provided WebGL rendering context object.

powerPreference GpuPowerPreference <optional>
'default'

An optional hint indicating what configuration of GPU is suitable for the WebGL context, can be 'high-performance' or 'low-power'. Setting to 'high-performance' will prioritize rendering performance over power consumption, while setting to 'low-power' will prioritize power saving over rendering performance.

preferWebGLVersion 1 | 2 <optional>
2

The preferred WebGL version to use.

premultipliedAlpha boolean <optional>
true

Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha.

preserveDrawingBuffer boolean <optional>
false

Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve its value until cleared or overwritten. Enable this if you need to call toDataUrl on the WebGL context.

Members

antialias boolean

Whether to enable antialiasing.

context WebGL2RenderingContext | unknown

User-provided WebGL rendering context object.

Default Value:
  • null

powerPreference GpuPowerPreference

An optional hint indicating what configuration of GPU is suitable for the WebGL context, can be 'high-performance' or 'low-power'. Setting to 'high-performance' will prioritize rendering performance over power consumption, while setting to 'low-power' will prioritize power saving over rendering performance.

Default Value:
  • 'default'

preferWebGLVersion 1 | 2

The preferred WebGL version to use.

Default Value:
  • 2

premultipliedAlpha boolean

Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha.

Default Value:
  • true

preserveDrawingBuffer boolean

Whether to enable drawing buffer preservation. If enabled, the drawing buffer will preserve its value until cleared or overwritten. Enable this if you need to call toDataUrl on the WebGL context.

Default Value:
  • false