OptionalwidthWidth of the console in pixels.
OptionalheightHeight of the console in pixels.
OptionalvisibleWhether the console starts visible.
OptionalcaptureWhich console methods are captured. true captures every level, false none.
Can be changed later via PixiConsole.captureConsole.
OptionalcaptureCapture uncaught errors and unhandled promise rejections.
OptionalcaptureClear the console when console.clear() is called.
OptionalshowShow the console automatically when an error is logged or thrown.
OptionalfilterLevels that are displayed. Hidden levels are still recorded and can be re-enabled later. Command-line input and results are always displayed.
OptionalmaxMaximum number of entries kept in memory. Oldest entries are dropped first. Can be changed later via PixiConsole.maxEntries.
OptionalcollapseMerge consecutive identical messages into one line with a (×N) counter.
Can be changed later via PixiConsole.collapseRepeats.
OptionaltimestampsPrefix every entry with its time (HH:MM:SS.mmm).
Can be changed later via PixiConsole.timestamps.
OptionaltextHow text is rendered.
"bitmap": BitmapText using a glyph atlas generated on the fly. Cheap to update, recommended."canvas": Text, better for scripts with huge glyph sets (CJK) or colour emoji.OptionalfontOptionalfontOptionallineHeight of one line of text.
OptionalresolutionResolution of the rendered glyphs. By default they follow the renderer's resolution (before the
console is first rendered, the autoResize renderer's or window.devicePixelRatio).
OptionalpaddingInner padding in pixels.
OptionalbackgroundOptionalbackgroundOptionaltoolbarShow the toolbar with per-level filter toggles, clear and close buttons. Can be changed later via PixiConsole.toolbar.
OptionalinteractiveEnable wheel and drag scrolling and toolbar buttons. Set to false to let pointer events pass
through. The command line stays tappable when prompt is on.
OptionaltoggleKeyboardEvent.code or KeyboardEvent.key that toggles the console, or null to disable.
Ignored while typing in a text field. With prompt, opening the console with it focuses
the command line when nothing else on the page has focus.
OptionalautoKeep the console sized to the renderer screen, e.g. across orientation changes.
OptionalpromptShow a command line under the log. Entering a line runs a command or, when
no command matches, the evaluator. It is a native <input> placed over the canvas, so
on-screen keyboards, IME and paste work as usual (autocorrect and autocapitalize are off). Keys
typed into it don't reach your game's keydown listeners (capture-phase ones still see them)
or the toggleKey; keyup still does, so no key gets stuck. Opening the console with
toggleKey focuses it when nothing else on the page has focus. Needs pixi.js 8.7+ or
autoResize to find the canvas. Can be changed later via PixiConsole.prompt.
OptionalcommandsCommands for the command line and PixiConsole.execute, by name, added to the built-in
help and clear. A function is shorthand for { run }. Names are one word
(/^[a-z][\w:-]*$/i) and case-insensitive; a command named like a built-in replaces it.
OptionalevaluatorRuns lines whose first word is not a command, e.g. createJsEvaluator to evaluate
JavaScript. null answers "Unknown command" instead. Whoever can type into the console can run
it: keep JavaScript evaluation out of production builds.
Can be changed later via PixiConsole.evaluator.
OptionalcolorsText colour per level. Levels left out keep their colour from DEFAULT_COLORS.
OptionalformatOptions for turning logged values into text. Fields left out keep their default.
Options accepted by the PixiConsole constructor. Every field is optional.