The pixi application object is responsible for drawing onto a canvas
Is someone requesting that a new screenshot be taken?
Are hitbox/debug outlines currently being drawn?
The most recently-taken screenshot
The "time" in milliseconds, where 0 is when the game started. Unlike
Scene.timer/TimedEvent (which only advance while their own scene is
actually being stepped), this keeps ticking every render frame no matter
what's currently showing.
Add a filter to the whole container
The filter to add
Where to put the filter (WORLD, OVERLAY, HUD, BACKGROUND, or FOREGROUND)
Add a filter to the entire rendered frame, instead of to one specific
SpriteLocation container. This applies to the whole PIXI stage
(world, hud, overlay, background, and foreground, all composited
together), unlike addFilter/addZFilter, which scope to one
container or Z index.
The filter to add
Add a filter to one of the z indices.
The filter to add
The z index on which to add the filter
Where to put the filter (WORLD, OVERLAY, or HUD)
Return the current Frames-Per-Second of the renderer. This can be useful when debugging
Reset the renderer's container state when the stage transitions to a new builder
Change the size of the canvas, because the window changed size. The canvas is drawn with one real pixel per screen pixel (or more, on a high-density display), so the game stays sharp at any size.
The new width of the screen
The new height of the screen
Turn hitbox/debug outline rendering on or off at runtime.
NB: When Config.hitBoxes is false, this doesn't turn debug boxes on. It
just gives a way to show/hide the boxes when Config.hitBoxes is true.
RenderDevice is a wrapper around the PIXI Application object. It initializes the render loop, which fires at a regular interval to tell the game to advance the simulation by some number of milliseconds. Doing this many times per second is what makes our game work :)
TODO: Pixi prefers when sprites are not removed and re-added to containers on each tick. It also has features like "interaction" that can be disabled. There's a fair bit of optimization opportunity.