- See:
Properties:
Name | Type | Default | Description |
---|---|---|---|
antialias |
boolean | false |
WebGL Only. Whether to enable anti-aliasing. This may affect performance. |
autoDensity |
boolean | false |
Whether the CSS dimensions of the renderer's view should be resized automatically. |
backgroundAlpha |
number | 1 |
Transparency of the background color, value from |
backgroundColor |
number | 0x000000 |
The background color used to clear the canvas. It accepts hex numbers (e.g. |
clearBeforeRender |
boolean | true |
Whether to clear the canvas before new render passes. |
context |
IRenderingContext |
WebGL Only. User-provided WebGL rendering context object. |
|
height |
number | 600 |
The height of the renderer's view. |
powerPreference |
WebGLPowerPreference |
WebGL Only. A hint indicating what configuration of GPU is suitable for the WebGL context,
can be |
|
preserveDrawingBuffer |
boolean | false |
WebGL Only. 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 |
resolution |
number | PIXI.settings.RESOLUTION |
The resolution / device pixel ratio of the renderer. |
transparent |
boolean |
Use |
|
useContextAlpha |
boolean | "notMultiplied" | true |
Pass-through value for canvas' context attribute WebGL Only: When set to |
view |
HTMLCanvasElement |
The canvas to use as the view. If omitted, a new canvas will be created. |
|
width |
number | 800 |
The width of the renderer's view. |
Extends
- GlobalMixins.IRendererOptions
Members
WebGL Only. Whether to enable anti-aliasing. This may affect performance.
- Default Value:
- false
Whether the CSS dimensions of the renderer's view should be resized automatically.
- Default Value:
- false
Transparency of the background color, value from 0
(fully transparent) to 1
(fully opaque).
- Default Value:
- 1
The background color used to clear the canvas. It accepts hex numbers (e.g. 0xff0000
).
- Default Value:
- 0x000000
Whether to clear the canvas before new render passes.
- Default Value:
- true
context IRenderingContext
WebGL Only. User-provided WebGL rendering context object.
The height of the renderer's view.
- Default Value:
- 600
WebGL Only. A hint indicating what configuration of GPU is suitable for the WebGL context,
can be 'default'
, '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.
WebGL Only. 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
The resolution / device pixel ratio of the renderer.
- Default Value:
- PIXI.settings.RESOLUTION
Use backgroundAlpha
instead.
Pass-through value for canvas' context attribute alpha
. This option is for cases where the
canvas needs to be opaque, possibly for performance reasons on some older devices.
If you want to set transparency, please use backgroundAlpha
.
WebGL Only: When set to 'notMultiplied'
, the canvas' context attribute alpha
will be
set to true
and premultipliedAlpha
will be to false
.
- Default Value:
- true
The canvas to use as the view. If omitted, a new canvas will be created.
The width of the renderer's view.
- Default Value:
- 800