RendererConfig
Defined in: renderer/src/types.ts:34
Configuration for the renderer plugin.
Properties
Section titled “Properties”backgroundColor?
Section titled “backgroundColor?”
optionalbackgroundColor?:number
Defined in: renderer/src/types.ts:44
Background color as a hex number.
canvas?
Section titled “canvas?”
optionalcanvas?:HTMLCanvasElement
Defined in: renderer/src/types.ts:46
Existing canvas element to use.
container?
Section titled “container?”
optionalcontainer?:HTMLElement
Defined in: renderer/src/types.ts:48
Container element — canvas will be auto-appended here.
optionalfit?:RendererFitOptions
Defined in: renderer/src/types.ts:59
Responsive fit. Defaults to { mode: "letterbox" } against the resolved
target (see RendererFitOptions.target), so the canvas is
responsive out of the box — override to change mode or pin to a specific
host. See RendererFitOptions.
height
Section titled “height”height:
number
Defined in: renderer/src/types.ts:38
Initial canvas height in CSS pixels before responsive fit takes over. Backing-store size is height × resolution.
pixelArtPreset?
Section titled “pixelArtPreset?”
optionalpixelArtPreset?:boolean
Defined in: renderer/src/types.ts:74
One-flag preset for pixel-art games. When true, the plugin:
- Sets
TextureStyle.defaultOptions.scaleMode = "nearest"so freshly loaded textures sample without bilinear blur. - Enables
roundPixelson the PixiApplicationso subpixel transforms don’t smear sprite edges. - Applies
image-rendering: pixelated(with-webkit-optimize-contrastfor Safari) to the canvas element so the browser scales the backing store with nearest-neighbor, not bicubic.
Composes with pixi: explicit pixi.roundPixels: false wins over the
preset. Default: false.
optionalpixi?:Record<string,unknown>
Defined in: renderer/src/types.ts:52
Additional PixiJS Application options.
resolution?
Section titled “resolution?”
optionalresolution?:number
Defined in: renderer/src/types.ts:50
Device pixel ratio. Defaults to window.devicePixelRatio for crisp rendering on HiDPI displays. Set to 1 to disable.
virtualHeight?
Section titled “virtualHeight?”
optionalvirtualHeight?:number
Defined in: renderer/src/types.ts:42
Game coordinate height (default: height).
virtualWidth?
Section titled “virtualWidth?”
optionalvirtualWidth?:number
Defined in: renderer/src/types.ts:40
Game coordinate width (default: width).
width:
number
Defined in: renderer/src/types.ts:36
Initial canvas width in CSS pixels before responsive fit takes over. Backing-store size is width × resolution.