The view system manages the main canvas that is attached to the DOM. This main role is to deal with how the holding the view reference and dealing with how it is resized.

Memberof

PIXI

Implements

Constructors

Properties

autoDensity: boolean

Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.

Member

element: ICanvas

The canvas element that everything is drawn to.

Member

resolution: number

The resolution / device pixel ratio of the renderer.

Member

Default

PIXI.settings.RESOLUTION
screen: Rectangle

Measurements of the screen. (0, 0, screenWidth, screenHeight).

Its safe to use as filterArea or hitArea for the whole stage.

Member

Methods

  • Destroys this System and optionally removes the canvas from the dom.

    Parameters

    • Optional removeView: boolean

      Whether to remove the canvas from the DOM.

    Returns void

  • initiates the view system

    Parameters

    Returns void

  • Resizes the screen and canvas to the specified dimensions.

    Parameters

    • desiredScreenWidth: number

      The new width of the screen.

    • desiredScreenHeight: number

      The new height of the screen.

    Returns void

Generated using TypeDoc