Interface IRendererOptionsAuto

Renderer options supplied to autoDetectRenderer.

Memberof

PIXI

interface IRendererOptionsAuto {
    antialias: boolean;
    autoDensity?: boolean;
    background?: ColorSource;
    backgroundAlpha: number;
    backgroundColor: ColorSource;
    clearBeforeRender: boolean;
    context: null | IRenderingContext;
    eventFeatures?: Partial<EventSystemFeatures>;
    eventMode?: EventMode;
    forceCanvas?: boolean;
    height?: number;
    hello: boolean;
    powerPreference: WebGLPowerPreference;
    premultipliedAlpha: boolean;
    preserveDrawingBuffer: boolean;
    resolution?: number;
    useContextAlpha?: boolean | "notMultiplied";
    view?: ICanvas;
    width?: number;
}

Hierarchy (view full)

Properties

antialias: boolean

WebGL Only. Whether to enable anti-aliasing. This may affect performance.

Memberof

PIXI.IRendererOptions

autoDensity?: boolean

Whether the CSS dimensions of the renderer's view should be resized automatically.

Memberof

PIXI.IRendererOptions

background?: ColorSource

Alias for PIXI.IRendererOptions.backgroundColor

Memberof

PIXI.IRendererOptions

backgroundAlpha: number

Transparency of the background color, value from 0 (fully transparent) to 1 (fully opaque).

Memberof

PIXI.IRendererOptions

backgroundColor: ColorSource

The background color used to clear the canvas. See PIXI.ColorSource for accepted color values.

Memberof

PIXI.IRendererOptions

clearBeforeRender: boolean

Whether to clear the canvas before new render passes.

Memberof

PIXI.IRendererOptions

context: null | IRenderingContext

WebGL Only. User-provided WebGL rendering context object.

Memberof

PIXI.IRendererOptions

eventFeatures?: Partial<EventSystemFeatures>

The event features that are enabled by the EventSystem.

Since

7.2.0

eventMode?: EventMode

The default event mode for all display objects.

Since

7.2.0

forceCanvas?: boolean

Force CanvasRenderer even if WebGL is supported. Only available with pixi.js-legacy.

Default

false
height?: number

The height of the renderer's view.

Memberof

PIXI.IRendererOptions

hello: boolean

Whether to log the version and type information of renderer to console.

Memberof

PIXI.IRendererOptions

powerPreference: WebGLPowerPreference

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.

Memberof

PIXI.IRendererOptions

premultipliedAlpha: boolean

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

Memberof

PIXI.IRendererOptions

preserveDrawingBuffer: boolean

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.

Memberof

PIXI.IRendererOptions

resolution?: number

The resolution / device pixel ratio of the renderer.

Memberof

PIXI.IRendererOptions

useContextAlpha?: boolean | "notMultiplied"

Deprecated since 7.0.0, use premultipliedAlpha and 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.

Deprecated

since 7.0.0

Memberof

PIXI.IRendererOptions

view?: ICanvas

The canvas to use as the view. If omitted, a new canvas will be created.

Memberof

PIXI.IRendererOptions

width?: number

The width of the renderer's view.

Memberof

PIXI.IRendererOptions

Generated using TypeDoc