pixi.js
    Preparing search index...

    Class ViewSystemAdvanced

    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.

    Implements

    Index

    Constructors

    Properties

    antialias: boolean

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

    canvas: ICanvas

    The canvas element that everything is drawn to.

    renderTarget: RenderTarget

    The render target that the view is drawn to.

    screen: Rectangle

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

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

    The texture that is used to draw the canvas to the screen.

    defaultOptions: ViewSystemOptions = ...

    The default options for the view system.

    Accessors

    • get autoDensity(): boolean

      Whether CSS dimensions of canvas view should be resized to screen dimensions automatically. This is only supported for HTMLCanvasElement and will be ignored if the canvas is an OffscreenCanvas.

      Returns boolean

    • set autoDensity(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get resolution(): number

      The resolution / device pixel ratio of the renderer.

      Returns number

    • set resolution(value: number): void

      Parameters

      • value: number

      Returns void

    Methods

    • 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.

      • resolution: number

      Returns void