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 |
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 |
Members
Whether to enable antialiasing.
User-provided WebGL rendering context object.
- Default Value:
- null
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'
The preferred WebGL version to use.
- Default Value:
- 2
Whether the compositor will assume the drawing buffer contains colors with premultiplied alpha.
- Default Value:
- true
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