Skip to main content

ExcaliburGraphicsContext2DOptions

Hierarchy

Index

Properties

optionalantialiasing

antialiasing?: boolean

Enables antialiasing on the canvas context (smooths pixels with default canvas sampling)

optionalbackgroundColor

backgroundColor?: Color

Current clearing color of the context

canvasElement

canvasElement: HTMLCanvasElement

Target existing html canvas element

optionalcontext

context?: CanvasRenderingContext2D

optionalenableTransparency

enableTransparency?: boolean

Enable canvas transparency

optionalmultiSampleAntialiasing

multiSampleAntialiasing?: boolean | { samples: number }

Enable or disable multi-sample antialiasing in the internal render buffer.

If true the max number of samples will be used

By default enabled

optionalpixelArtSampler

pixelArtSampler?: boolean

Enable the sub pixel antialiasing pixel art sampler for nice looking pixel art

optionalpowerPreference

powerPreference?: default | high-performance | low-power

Hint the power preference to the graphics context

optionalsnapToPixel

snapToPixel?: boolean

Snaps the pixel to an integer value (floor)

optionaluseDrawSorting

useDrawSorting?: boolean

Feature flag that enables draw sorting will removed in v0.29

optionaluvPadding

uvPadding?: number

UV padding in pixels to use in the internal image rendering

Recommended .25 - .5 of a pixel