Class Application<VIEW>

Convenience class to create a new PixiJS application.

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

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

PIXI

Type Parameters

Hierarchy

  • Application
    • Application

Constructors

Properties

cancelResize: () => void
queueResize: () => void
renderer: IRenderer<VIEW>

WebGL renderer if available, otherwise CanvasRenderer.

resizeTo: HTMLElement | Window

The root display container that's rendered.

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

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

    Returns VIEW

Methods

  • Destroy and don't use after this.

    Parameters

    • OptionalremoveView: boolean

      Automatically remove canvas from DOM.

    • OptionalstageOptions: boolean | IDestroyOptions

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

      • boolean
      • IDestroyOptions
        • OptionalbaseTexture?: boolean
        • Optionalchildren?: boolean
        • Optionaltexture?: boolean

    Returns void

  • Render the current stage.

    Returns void

  • Returns void

  • Returns void

  • Returns void