Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EngineOptions

Defines the available options to configure the Excalibur engine at constructor time.

Hierarchy

  • EngineOptions

Index

Properties

Optional backgroundColor

backgroundColor: Color

Optionally set the background color

Optional canvasElement

canvasElement: HTMLCanvasElement

Optionally specify the target canvas DOM element directly

Optional canvasElementId

canvasElementId: string

Optionally specify the target canvas DOM element to render the game in

Optional displayMode

displayMode: DisplayMode

The DisplayMode of the game. Depending on this value, width and height may be ignored.

Optional enableCanvasTransparency

enableCanvasTransparency: boolean

Optionally configure the native canvas transparent backdrop

Optional height

height: number

Optionally configure the native canvas height of the game

Optional pointerScope

pointerScope: PointerScope

Configures the pointer scope. Pointers scoped to the 'Canvas' can only fire events within the canvas viewport; whereas, 'Document' (default) scoped will fire anywhere on the page.

Optional position

position: string | AbsolutePosition

Specify how the game window is to be positioned when the DisplayMode.Position is chosen. This option MUST be specified if the DisplayMode is set as DisplayMode.Position. The position can be either a string or an AbsolutePosition. String must be in the format of css style background-position. The vertical position must precede the horizontal position in strings.

Valid String examples: "top left", "top", "bottom", "middle", "middle center", "bottom right" Valid AbsolutePosition examples: {top: 5, right: 10%}, {bottom: 49em, left: 10px}, {left: 10, bottom: 40}

Optional scrollPreventionMode

scrollPreventionMode: ScrollPreventionMode

Scroll prevention method.

Optional suppressConsoleBootMessage

suppressConsoleBootMessage: boolean

Suppress boot up console message, which contains the "powered by Excalibur message"

Optional suppressHiDPIScaling

suppressHiDPIScaling: boolean

Suppress HiDPI auto detection and scaling, it is not recommended users of excalibur switch off this feature. This feature detects and scales the drawing canvas appropriately to accommodate HiDPI screens.

Optional suppressMinimumBrowserFeatureDetection

suppressMinimumBrowserFeatureDetection: boolean

Suppress minimum browser feature detection, it is not recommended users of excalibur switch this off. This feature ensures that the currently running browser meets the minimum requirements for running excalibur. This can be useful if running on non-standard browsers or if there is a bug in excalibur preventing execution.

Optional suppressPlayButton

suppressPlayButton: boolean

Suppress play button, it is not recommended users of excalibur switch this feature. Some browsers require a user gesture (like a click) for certain browser features to work like web audio.

Optional width

width: number

Optionally configure the native canvas width of the game