OptionalaudioOptionalautoSuspends the loop and silences audio while the page is hidden, resuming both on
show. True unless a game drives its own loop (or its own visibility handling), in
which case set false and call suspend/resume itself.
Optionalbackgroundbackground colour behind everything, as 0xRRGGBB
Optionalcanvasthe canvas to draw into; one is created and appended if omitted
OptionalextensionsPixi extension registrations to run before the renderer is built.
TintedSprite (and everything built on it - AnimatedSprite, TileMap,
DialogueStage) registers its own colour-transform pipe automatically, at module
scope, the moment a game imports it; a game never has to pass anything here for that.
TiledSprite and NinePatch carry the same guarantee through a different mechanism:
Pixi's own TilingSprite/NineSliceSprite modules each side-effect-import their own
init module, which registers their render pipe unconditionally the moment the class
is imported - true of Pixi's package itself, not something mwg implements or could
accidentally omit, and confirmed directly against Pixi's own source rather than assumed
(tests/builtin-pipes.test.ts checks it stays true). This stays as an escape hatch for
a game defining its own Pixi extension - a custom render pipe, its own batcher - which
still has to be registered before app.init() builds the renderer, the same constraint
registerColorTransform works around by self-registering on import instead of needing a
caller to remember it.
OptionalmaxLongest frame the game will simulate, in seconds.
A backgrounded tab reports an enormous delta on its first frame back, which would teleport everything that moves. Frames longer than this are treated as this long, so the game slows down rather than jumping.
OptionalpixelPixel art is never smoothed when scaled - both inside the game (texture sampling) and in the browser's own compositing of the canvas element onto the page, which is a separate step and blurs on its own if left at the default. Set false for a game whose art is not pixel art and should smooth when magnified.
OptionalqualityFrame-time quality scaling over the static device fit, off unless given: the backing
store steps down after sustained over-budget frames and recovers only after a much
longer streak inside budget. The ceiling stays the fitResolution answer, so this
never asks for more than the device can make.
OptionalresizeWhat the renderer sizes itself to. Defaults to the window.
Sizing to the canvas's parent looks tidier but circles: a canvas styled to fill its parent gives the parent no height of its own, so both collapse. Pass an element only when that element has a size the canvas does not depend on.
the game's own audio rig, silenced while the page is hidden - an
Orchestratorfits