Options
All
  • Public
  • Public/Protected
  • All
Menu

Convenience class to create a new PIXI application.

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

example

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

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

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

memberof

PIXI

Hierarchy

  • Application
    • Application

Index

Constructors

constructor

  • Parameters

    Returns Application

Properties

loader

loader: Loader

renderer

WebGL renderer if available, otherwise CanvasRenderer.

member

{PIXI.Renderer|PIXI.CanvasRenderer}

resizeTo

resizeTo: HTMLElement | Window

stage

stage: Container

The root display container that's rendered.

member

{PIXI.Container}

ticker

ticker: Ticker

Static Private _plugins

_plugins: any

Collection of installed plugins.

Accessors

screen

  • Reference to the renderer's screen rectangle. Its safe to use as filterArea or hitArea for the whole screen.

    member

    {PIXI.Rectangle}

    readonly

    Returns Rectangle

view

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

    member

    {HTMLCanvasElement}

    readonly

    Returns HTMLCanvasElement

Methods

destroy

  • destroy(removeView?: boolean, stageOptions?: boolean | IDestroyOptions): void
  • Destroy and don't use after this.

    Parameters

    • Optional removeView: boolean
    • Optional stageOptions: boolean | IDestroyOptions

    Returns void

render

  • render(): void
  • Render the current stage.

    Returns void

resize

  • resize(): void
  • Returns void

start

  • start(): void
  • Returns void

stop

  • stop(): void
  • Returns void

Static registerPlugin

  • Register a middleware plugin for the application

    static

    Parameters

    Returns void

Generated using TypeDoc