Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
The optional renderer parameters
|
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.fromImage('something.png'));
Members
-
The default options, so we mixin functionality later.
-
loader PIXI.loaders.Loader
-
Loader instance to help with asset loading.
-
renderer PIXI.WebGLRenderer | PIXI.CanvasRenderer
-
WebGL renderer if available, otherwise CanvasRenderer
-
screen PIXI.Rectangle readonly
-
Reference to the renderer's screen rectangle. Its safe to use as filterArea or hitArea for whole screen
-
stage PIXI.Container
-
The root display container that's rendered.
-
ticker PIXI.ticker.Ticker
-
Ticker for doing render updates.
- Default Value:
- PIXI.ticker.shared
-
Reference to the renderer's canvas element.
Methods
-
Destroy and don't use after this.
Name Type Default Description removeView
Boolean false optional Automatically remove canvas from DOM.
stageOptions
object | boolean optional Options parameter. A boolean will act as if all options have been set to that value
Name Type Default Description children
boolean false optional if set to true, all the children will have their destroy method called as well. 'stageOptions' will be passed on to those calls.
texture
boolean false optional Only used for child Sprites if stageOptions.children is set to true. Should it destroy the texture of the child sprite
baseTexture
boolean false optional Only used for child Sprites if stageOptions.children is set to true. Should it destroy the base texture of the child sprite
-
Render the current stage.
-
Convenience method for starting the render.
-
Convenience method for stopping the render.