Class Application<VIEW>

Convenience class to create a new PixiJS application.

This class automatically creates the renderer, ticker and root container.

Example

import { Application, Sprite } from 'pixi.js';

// Create the application
const app = new Application();

// Add the view to the DOM
document.body.appendChild(app.view);

// ex, add display objects
app.stage.addChild(Sprite.from('something.png'));
@class

Memberof

PIXI

Type Parameters

Hierarchy

  • Application
    • Application

Constructors

Properties

cancelResize: (() => void)

Type declaration

    • (): void
    • Returns void

queueResize: (() => void)

Type declaration

    • (): void
    • Returns void

renderer: IRenderer<VIEW>

WebGL renderer if available, otherwise CanvasRenderer.

Member

resizeTo: HTMLElement | Window

The root display container that's rendered.

Member

ticker: Ticker
_plugins: IApplicationPlugin[]

Collection of installed plugins.

Accessors

  • get screen(): Rectangle
  • Reference to the renderer's screen rectangle. Its safe to use as filterArea or hitArea for the whole screen.

    Returns Rectangle

    Member

  • get view(): VIEW
  • Reference to the renderer's canvas element.

    Returns VIEW

    Member

Methods

  • Destroy and don't use after this.

    Parameters

    • Optional removeView: boolean

      Automatically remove canvas from DOM.

    • Optional stageOptions: boolean | IDestroyOptions

      Options parameter. A boolean will act as if all options have been set to that value

    Returns void

  • Render the current stage.

    Returns void

  • Returns void

  • Returns void

  • Returns void

Generated using TypeDoc