Skip to main content

Input

Index

Enumerations

Axes

Axes:

Gamepad Axes enumeration

LeftStickX

LeftStickX: 0

Left analogue stick X direction

LeftStickY

LeftStickY: 1

Left analogue stick Y direction

RightStickX

RightStickX: 2

Right analogue stick X direction

RightStickY

RightStickY: 3

Right analogue stick Y direction

Buttons

Buttons:

Gamepad Buttons enumeration

DpadDown

DpadDown: 13

D-pad down

DpadLeft

DpadLeft: 14

D-pad left

DpadRight

DpadRight: 15

D-pad right

DpadUp

DpadUp: 12

D-pad up

Face1

Face1: 0

Face 1 button (e.g. A)

Face2

Face2: 1

Face 2 button (e.g. B)

Face3

Face3: 2

Face 3 button (e.g. X)

Face4

Face4: 3

Face 4 button (e.g. Y)

LeftBumper

LeftBumper: 4

Left bumper button

LeftStick

LeftStick: 10

Left analog stick press (e.g. L3)

LeftTrigger

LeftTrigger: 6

Left trigger button

RightBumper

RightBumper: 5

Right bumper button

RightStick

RightStick: 11

Right analog stick press (e.g. R3)

RightTrigger

RightTrigger: 7

Right trigger button

Select

Select: 8

Select button

Start

Start: 9

Start button

Keys

Keys:

Enum representing physical input key codes

A

A: KeyA

AltLeft

AltLeft: AltLeft

AltRight

AltRight: AltRight

ArrowDown

ArrowDown: ArrowDown

ArrowLeft

ArrowLeft: ArrowLeft

ArrowRight

ArrowRight: ArrowRight

ArrowUp

ArrowUp: ArrowUp

B

B: KeyB

Backquote

Backquote: Backquote

Backslash

Backslash: Backslash

Backspace

Backspace: Backspace

BracketLeft

BracketLeft: BracketLeft

BracketRight

BracketRight: BracketRight

C

C: KeyC

Comma

Comma: Comma

ContextMenu

ContextMenu: ContextMenu

ControlLeft

ControlLeft: ControlLeft

ControlRight

ControlRight: ControlRight

D

D: KeyD

Delete

Delete: Delete

Digit0

Digit0: Digit0

Digit1

Digit1: Digit1

Digit2

Digit2: Digit2

Digit3

Digit3: Digit3

Digit4

Digit4: Digit4

Digit5

Digit5: Digit5

Digit6

Digit6: Digit6

Digit7

Digit7: Digit7

Digit8

Digit8: Digit8

Digit9

Digit9: Digit9

Down

Down: ArrowDown

E

E: KeyE

Enter

Enter: Enter

Equal

Equal: Equal

Esc

Esc: Escape

Escape

Escape: Escape

F

F: KeyF

F1

F1: F1

F10

F10: F10

F11

F11: F11

F12

F12: F12

F2

F2: F2

F3

F3: F3

F4

F4: F4

F5

F5: F5

F6

F6: F6

F7

F7: F7

F8

F8: F8

F9

F9: F9

G

G: KeyG

H

H: KeyH

I

I: KeyI

J

J: KeyJ

K

K: KeyK

Key0

Key0: Digit0

Key1

Key1: Digit1

Key2

Key2: Digit2

Key3

Key3: Digit3

Key4

Key4: Digit4

Key5

Key5: Digit5

Key6

Key6: Digit6

Key7

Key7: Digit7

Key8

Key8: Digit8

Key9

Key9: Digit9

KeyA

KeyA: KeyA

KeyB

KeyB: KeyB

KeyC

KeyC: KeyC

KeyD

KeyD: KeyD

KeyE

KeyE: KeyE

KeyF

KeyF: KeyF

KeyG

KeyG: KeyG

KeyH

KeyH: KeyH

KeyI

KeyI: KeyI

KeyJ

KeyJ: KeyJ

KeyK

KeyK: KeyK

KeyL

KeyL: KeyL

KeyM

KeyM: KeyM

KeyN

KeyN: KeyN

KeyO

KeyO: KeyO

KeyP

KeyP: KeyP

KeyQ

KeyQ: KeyQ

KeyR

KeyR: KeyR

KeyS

KeyS: KeyS

KeyT

KeyT: KeyT

KeyU

KeyU: KeyU

KeyV

KeyV: KeyV

KeyW

KeyW: KeyW

KeyX

KeyX: KeyX

KeyY

KeyY: KeyY

KeyZ

KeyZ: KeyZ

L

L: KeyL

Left

Left: ArrowLeft

M

M: KeyM

MetaLeft

MetaLeft: MetaLeft

MetaRight

MetaRight: MetaRight

Minus

Minus: Minus

N

N: KeyN

Num0

Num0: Numpad0

Num1

Num1: Numpad1

Num2

Num2: Numpad2

Num3

Num3: Numpad3

Num4

Num4: Numpad4

Num5

Num5: Numpad5

Num6

Num6: Numpad6

Num7

Num7: Numpad7

Num8

Num8: Numpad8

Num9

Num9: Numpad9

NumAdd

NumAdd: NumpadAdd

NumDecimal

NumDecimal: NumpadDecimal

NumDivide

NumDivide: NumpadDivide

NumLock

NumLock: NumLock

NumMultiply

NumMultiply: NumpadMultiply

NumSubtract

NumSubtract: NumpadSubtract

Numpad0

Numpad0: Numpad0

Numpad1

Numpad1: Numpad1

Numpad2

Numpad2: Numpad2

Numpad3

Numpad3: Numpad3

Numpad4

Numpad4: Numpad4

Numpad5

Numpad5: Numpad5

Numpad6

Numpad6: Numpad6

Numpad7

Numpad7: Numpad7

Numpad8

Numpad8: Numpad8

Numpad9

Numpad9: Numpad9

NumpadAdd

NumpadAdd: NumpadAdd

NumpadDecimal

NumpadDecimal: NumpadDecimal

NumpadDivide

NumpadDivide: NumpadDivide

NumpadEnter

NumpadEnter: NumpadEnter

NumpadMultiply

NumpadMultiply: NumpadMultiply

NumpadSubtract

NumpadSubtract: NumpadSubtract

O

O: KeyO

P

P: KeyP

Period

Period: Period

Q

Q: KeyQ

Quote

Quote: Quote

R

R: KeyR

Right

Right: ArrowRight

S

S: KeyS

Semicolon

Semicolon: Semicolon

ShiftLeft

ShiftLeft: ShiftLeft

ShiftRight

ShiftRight: ShiftRight

Slash

Slash: Slash

Space

Space: Space

T

T: KeyT

U

U: KeyU

Up

Up: ArrowUp

V

V: KeyV

W

W: KeyW

X

X: KeyX

Y

Y: KeyY

Z

Z: KeyZ

NativePointerButton

NativePointerButton:

Native browser button enumeration

Left

Left: 0

Middle

Middle: 1

NoButton

NoButton: -1

Right

Right: 2

Unknown

Unknown: 3

PointerButton

PointerButton:

The mouse button being pressed.

Left

Left: Left

Middle

Middle: Middle

NoButton

NoButton: NoButton

Right

Right: Right

Unknown

Unknown: Unknown

PointerScope

PointerScope:

Determines the scope of handling mouse/touch events.

Canvas

Canvas: Canvas

Handle events on the canvas element only. Events originating outside the canvas will not be handled.

Document

Document: Document

Handles events on the entire document. All events will be handled by Excalibur.

PointerType

PointerType:

The type of pointer for a [[PointerEvent]].

Mouse

Mouse: Mouse

Pen

Pen: Pen

Touch

Touch: Touch

Unknown

Unknown: Unknown

WheelDeltaMode

WheelDeltaMode:

Line

Line: Line

Page

Page: Page

Pixel

Pixel: Pixel

Classes

Gamepad

Gamepad:

Gamepad holds state information for a connected controller. See [[Gamepads]] for more information on handling controller input.

constructor

publicconnected

connected: boolean = false

publicevents

events: EventEmitter<GamepadEvents> = ...

publicnavigatorGamepad

navigatorGamepad: NavigatorGamepad

publicemit

  • emit<TEventName>(eventName: TEventName, event: GamepadEvents[TEventName]): void
  • emit(eventName: string, event?: any): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • event: GamepadEvents[TEventName]

    Returns void

publicgetAxes

  • getAxes(axes: Axes): number
  • Gets the given axis value between -1 and 1. Values below [[MinAxisMoveThreshold]] are considered 0.


    Parameters

    Returns number

publicgetButton

  • Gets the given button value between 0 and 1


    Parameters

    Returns number

publicisButtonHeld

  • isButtonHeld(button: Buttons, threshold?: number): boolean
  • Tests if a certain button is held down. This is persisted between frames.


    Parameters

    • button: Buttons

      The button to query

    • threshold: number = 1

      The threshold over which the button is considered to be pressed

    Returns boolean

publicisButtonPressed

  • isButtonPressed(button: Buttons, threshold?: number): boolean
  • Whether or not the given button is pressed

    @deprecated

    will be removed in v0.28.0. Use isButtonHeld instead


    Parameters

    • button: Buttons

      The button to query

    • threshold: number = 1

      The threshold over which the button is considered to be pressed

    Returns boolean

publicoff

  • off<TEventName>(eventName: TEventName, handler: Handler<GamepadEvents[TEventName]>): void
  • off(eventName: string, handler: Handler<unknown>): void
  • off(eventName: string): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<GamepadEvents[TEventName]>

    Returns void

publicon

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<GamepadEvents[TEventName]>

    Returns Subscription

publiconce

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<GamepadEvents[TEventName]>

    Returns Subscription

publicupdate

  • update(): void
  • Returns void

publicupdateAxes

  • updateAxes(axesIndex: number, value: number): void
  • Parameters

    • axesIndex: number
    • value: number

    Returns void

publicupdateButton

  • updateButton(buttonIndex: number, value: number): void
  • Parameters

    • buttonIndex: number
    • value: number

    Returns void

publicwasButtonPressed

  • wasButtonPressed(button: Buttons, threshold?: number): boolean
  • Tests if a certain button was just pressed this frame. This is cleared at the end of the update frame.


    Parameters

    • button: Buttons

      Test whether a button was just pressed

    • threshold: number = 1

      The threshold over which the button is considered to be pressed

    Returns boolean

publicwasButtonReleased

  • wasButtonReleased(button: Buttons): boolean
  • Tests if a certain button was just released this frame. This is cleared at the end of the update frame.


    Parameters

    • button: Buttons

      Test whether a button was just released

    Returns boolean

Gamepads

Gamepads:

Excalibur leverages the HTML5 Gamepad API where it is supported to provide controller support for your games.

constructor

publicenabled

enabled: boolean = false

Whether or not to poll for Gamepad input (default: false)

publicevents

events: EventEmitter<GamepadEvents> = ...

publicsupported

supported: boolean = !!(<any>navigator).getGamepads

Whether or not Gamepad API is supported

publicstaticMinAxisMoveThreshold

MinAxisMoveThreshold: number = 0.05

The minimum value an axis has to move before considering it a change

publicat

  • Safely retrieves a Gamepad at a specific index and creates one if it doesn't yet exist


    Parameters

    • index: number

    Returns Gamepad

publiccount

  • count(): number
  • Gets the number of connected gamepads


    Returns number

publicemit

  • emit<TEventName>(eventName: TEventName, event: GamepadEvents[TEventName]): void
  • emit(eventName: string, event?: any): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • event: GamepadEvents[TEventName]

    Returns void

publicgetValidGamepads

  • Returns a list of all valid gamepads that meet the minimum configuration requirement.


    Returns Gamepad[]

publicinit

  • init(): void
  • Returns void

publicoff

  • off<TEventName>(eventName: TEventName, handler: Handler<GamepadEvents[TEventName]>): void
  • off(eventName: string, handler: Handler<unknown>): void
  • off(eventName: string): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<GamepadEvents[TEventName]>

    Returns void

publicon

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<GamepadEvents[TEventName]>

    Returns Subscription

publiconce

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<GamepadEvents[TEventName]>

    Returns Subscription

publicsetMinimumGamepadConfiguration

  • setMinimumGamepadConfiguration(config: GamepadConfiguration): void
  • Sets the minimum gamepad configuration, for example {axis: 4, buttons: 4} means this game requires at minimum 4 axis inputs and 4 buttons, this is not restrictive all other controllers with more axis or buttons are valid as well. If no minimum configuration is set all pads are valid.


    Parameters

    • config: GamepadConfiguration

    Returns void

publictoggleEnabled

  • toggleEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

publicupdate

  • update(): void
  • Updates Gamepad state and publishes Gamepad events


    Returns void

KeyEvent

KeyEvent:

Event thrown on a game object for a key event

constructor

  • new KeyEvent(key: Keys, value?: string, originalEvent?: KeyboardEvent): KeyEvent
  • Parameters

    • key: Keys

      The key responsible for throwing the event

    • optionalvalue: string

      The key's typed value the browser detected

    • optionaloriginalEvent: KeyboardEvent

      The original keyboard event that Excalibur handled

    Returns KeyEvent

publickey

key: Keys

The key responsible for throwing the event

publicoptionaloriginalEvent

originalEvent?: KeyboardEvent

The original keyboard event that Excalibur handled

publicother

other: any

Other target object for this event

publictarget

target: any

Target object for this event.

publicoptionalvalue

value?: string

The key's typed value the browser detected

publicbubbles

  • get bubbles(): boolean
  • set bubbles(value: boolean): void
  • If set to false, prevents event from propagating to other actors. If true it will be propagated to all actors that apply.


    Returns boolean

  • Parameters

    • value: boolean

    Returns void

publicstopPropagation

  • stopPropagation(): void
  • Prevents event from bubbling


    Returns void

Keyboard

Keyboard:

Provides keyboard support for Excalibur.

constructor

publicevents

events: EventEmitter<KeyEvents> = ...

publicemit

  • emit<TEventName>(eventName: TEventName, event: KeyEvents[TEventName]): void
  • emit(eventName: string, event?: any): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • event: KeyEvents[TEventName]

    Returns void

publicgetKeys

  • Gets list of keys being pressed down


    Returns Keys[]

init

  • Initialize Keyboard event listeners


    Parameters

    Returns void

publicisHeld

  • isHeld(key: Keys): boolean
  • Tests if a certain key is held down. This is persisted between frames.


    Parameters

    • key: Keys

      Test whether a key is held down

    Returns boolean

publicoff

  • off<TEventName>(eventName: TEventName, handler: Handler<KeyEvents[TEventName]>): void
  • off(eventName: string, handler: Handler<unknown>): void
  • off(eventName: string): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<KeyEvents[TEventName]>

    Returns void

publicon

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<KeyEvents[TEventName]>

    Returns Subscription

publiconce

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<KeyEvents[TEventName]>

    Returns Subscription

toggleEnabled

  • toggleEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

publictriggerEvent

  • triggerEvent(type: down | up, key: Keys, character?: string): void
  • Trigger a manual key event


    Parameters

    • type: down | up
    • key: Keys
    • optionalcharacter: string

    Returns void

publicupdate

  • update(): void
  • Returns void

publicwasPressed

  • wasPressed(key: Keys): boolean
  • Tests if a certain key was just pressed this frame. This is cleared at the end of the update frame.


    Parameters

    • key: Keys

      Test whether a key was just pressed

    Returns boolean

publicwasReleased

  • wasReleased(key: Keys): boolean
  • Tests if a certain key was just released this frame. This is cleared at the end of the update frame.


    Parameters

    • key: Keys

      Test whether a key was just released

    Returns boolean

PointerComponent

PointerComponent:

Add this component to optionally configure how the pointer system detects pointer events.

By default the collider shape is used and graphics bounds is not.

If both collider shape and graphics bounds are enabled it will fire events if either or are intersecting the pointer.

constructor

  • Parameters

    • optionaloptions: PointerComponentOptions

    Returns PointerComponent

optionalreadonlydependencies

dependencies?: ComponentCtor<Component>[]

Optionally list any component types this component depends on If the owner entity does not have these components, new components will be added to the entity

Only components with zero-arg constructors are supported as automatic component dependencies

publicoptionallocalBounds

localBounds?: BoundingBox

Optionally use other bounds for pointer testing

optionalowner

owner?: Entity<any> = undefined

Current owning [[Entity]], if any, of this component. Null if not added to any [[Entity]]

publicuseColliderShape

useColliderShape: boolean = true

Use any existing Collider component geometry for pointer events. This is useful if you want user pointer events only to trigger on the same collision geometry used in the collider component for collision resolution. Default is true.

publicuseGraphicsBounds

useGraphicsBounds: boolean = true

Use any existing Graphics component bounds for pointers. This is useful if you want the axis aligned bounds around the graphic to trigger pointer events. Default is true.

clone

  • Clones any properties on this component, if that property value has a clone() method it will be called


    Returns Component

optionalonAdd

  • onAdd(owner: Entity<any>): void
  • Optional callback called when a component is added to an entity


    Parameters

    Returns void

optionalonRemove

  • onRemove(previousOwner: Entity<any>): void
  • Optional callback called when a component is removed from an entity


    Parameters

    Returns void

PointerEvent

PointerEvent:

constructor

publicactive

active: boolean = true

publicbutton

publiccoordinates

coordinates: GlobalCoordinates

publicnativeEvent

nativeEvent: Event

publicpointerId

pointerId: number

publicpointerType

pointerType: PointerType

publictype

type: down | up | move | cancel

pagePos

screenPos

worldPos

publiccancel

  • cancel(): void
  • Returns void

PointerEventReceiver

PointerEventReceiver:

The PointerEventProcessor is responsible for collecting all the events from the canvas and transforming them into GlobalCoordinates

constructor

publiccurrentFrameCancel

currentFrameCancel: PointerEvent[] = []

publiccurrentFrameDown

currentFrameDown: PointerEvent[] = []

publiccurrentFrameMove

currentFrameMove: PointerEvent[] = []

publiccurrentFramePointerCoords

currentFramePointerCoords: Map<number, GlobalCoordinates> = ...

publiccurrentFramePointerDown

currentFramePointerDown: Map<number, boolean> = ...

publiccurrentFrameUp

currentFrameUp: PointerEvent[] = []

publiccurrentFrameWheel

currentFrameWheel: WheelEvent[] = []

publicengine

engine: Engine<any>

publicevents

events: EventEmitter<PointerEvents> = ...

publiclastFramePointerCoords

lastFramePointerCoords: Map<number, GlobalCoordinates> = ...

publiclastFramePointerDown

lastFramePointerDown: Map<number, boolean> = ...

publicprimary

primary: PointerAbstraction = ...

publicreadonlytarget

target: GlobalEventHandlers & EventTarget

publicat

  • Locates a specific pointer by id, creates it if it doesn't exist


    Parameters

    • index: number

    Returns PointerAbstraction

publicclear

  • clear(): void
  • Clears the current frame event and pointer data


    Returns void

publiccount

  • count(): number
  • The number of pointers currently being tracked by excalibur


    Returns number

publicdetach

  • detach(): void
  • Returns void

publicemit

  • emit<TEventName>(eventName: TEventName, event: PointerEvents[TEventName]): void
  • emit(eventName: string, event?: any): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • event: PointerEvents[TEventName]

    Returns void

publicinit

  • Initializes the pointer event receiver so that it can start listening to native browser events.


    Parameters

    Returns void

publicisDown

  • isDown(pointerId: number): boolean
  • Is the specified pointer id down this frame


    Parameters

    • pointerId: number

    Returns boolean

publicisDragEnd

  • isDragEnd(pointerId: number): boolean
  • Whether the Pointer just ended dragging.


    Parameters

    • pointerId: number

    Returns boolean

publicisDragStart

  • isDragStart(pointerId: number): boolean
  • Whether the Pointer just started dragging.


    Parameters

    • pointerId: number

    Returns boolean

publicisDragging

  • isDragging(pointerId: number): boolean
  • Whether the Pointer is currently dragging.


    Parameters

    • pointerId: number

    Returns boolean

publicoff

  • off<TEventName>(eventName: TEventName, handler: Handler<PointerEvents[TEventName]>): void
  • off(eventName: string, handler: Handler<unknown>): void
  • off(eventName: string): void
  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<PointerEvents[TEventName]>

    Returns void

publicon

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<PointerEvents[TEventName]>

    Returns Subscription

publiconce

  • Type parameters

    Parameters

    • eventName: TEventName
    • handler: Handler<PointerEvents[TEventName]>

    Returns Subscription

publicrecreate

  • Creates a new PointerEventReceiver with a new target and engine while preserving existing pointer event handlers.


    Parameters

    • target: GlobalEventHandlers & EventTarget
    • engine: Engine<any>

    Returns PointerEventReceiver

publictoggleEnabled

  • toggleEnabled(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

publictriggerEvent

  • triggerEvent(type: down | up | move | cancel, pos: Vector): void
  • Triggers an excalibur pointer event in a world space pos

    Useful for testing pointers in excalibur


    Parameters

    • type: down | up | move | cancel
    • pos: Vector

    Returns void

publicupdate

  • update(): void
  • Called internally by excalibur

    Updates the current frame pointer info and emits raw pointer events

    This does not emit events to entities, see PointerSystem


    Returns void

publicwasDown

  • wasDown(pointerId: number): boolean
  • Was the specified pointer id down last frame


    Parameters

    • pointerId: number

    Returns boolean

PointerSystem

PointerSystem:

The PointerSystem is responsible for dispatching pointer events to entities that need them.

The PointerSystem can be optionally configured by the [[PointerComponent]], by default Entities use the [[Collider]]'s shape for pointer events.

constructor

publiccurrentFrameEntityToPointers

currentFrameEntityToPointers: Map<number, number[]> = ...

publiclastFrameEntityToPointers

lastFrameEntityToPointers: Map<number, number[]> = ...

publicoverrideUseColliderShape

overrideUseColliderShape: boolean = false

Optionally override component configuration for all entities

publicoverrideUseGraphicsBounds

overrideUseGraphicsBounds: boolean = false

Optionally override component configuration for all entities

publicpriority

priority: -5 = SystemPriority.Higher

System can execute in priority order, by default all systems are priority 0. Lower values indicated higher priority. For a system to execute before all other a lower priority value (-1 for example) must be set. For a system to execute after all other a higher priority value (10 for example) must be set.

query

query: Query<typeof PointerComponent | typeof TransformComponent>

publicreadonlysystemType

systemType: Update = SystemType.Update

Determine whether the system is called in the [[SystemType.Update]] or the [[SystemType.Draw]] phase. Update is first, then Draw.

publicworld

world: World

publicaddPointerToEntity

  • addPointerToEntity(entity: Entity<any>, pointerId: number): void
  • Parameters

    • entity: Entity<any>
    • pointerId: number

    Returns void

publicentered

  • entered(entity: Entity<any>, pointerId: number): boolean
  • Parameters

    • entity: Entity<any>
    • pointerId: number

    Returns boolean

publicentityCurrentlyUnderPointer

  • entityCurrentlyUnderPointer(entity: Entity<any>, pointerId: number): boolean
  • Parameters

    • entity: Entity<any>
    • pointerId: number

    Returns boolean

publicentityWasUnderPointer

  • entityWasUnderPointer(entity: Entity<any>, pointerId: number): boolean
  • Parameters

    • entity: Entity<any>
    • pointerId: number

    Returns boolean

publicinitialize

  • initialize(world: World, scene: Scene<unknown>): void
  • Optionally specify an initialize handler


    Parameters

    Returns void

publicleft

  • left(entity: Entity<any>, pointerId: number): boolean
  • Parameters

    • entity: Entity<any>
    • pointerId: number

    Returns boolean

optionalpostupdate

  • postupdate(scene: Scene<unknown>, elapsedMs: number): void
  • Optionally run a postupdate after the system processes matching entities


    Parameters

    • scene: Scene<unknown>
    • elapsedMs: number

      Time in milliseconds since the last frame

    Returns void

publicpreupdate

  • preupdate(): void
  • Optionally run a preupdate before the system processes matching entities


    Returns void

publicupdate

  • update(): void
  • Update all entities that match this system's types


    Returns void

WheelEvent

WheelEvent:

constructor

  • new WheelEvent(x: number, y: number, pageX: number, pageY: number, screenX: number, screenY: number, index: number, deltaX: number, deltaY: number, deltaZ: number, deltaMode: WheelDeltaMode, ev: Event): WheelEvent
  • Parameters

    • x: number
    • y: number
    • pageX: number
    • pageY: number
    • screenX: number
    • screenY: number
    • index: number
    • deltaX: number
    • deltaY: number
    • deltaZ: number
    • deltaMode: WheelDeltaMode
    • ev: Event

    Returns WheelEvent

publicactive

active: boolean = true

publicdeltaMode

deltaMode: WheelDeltaMode

publicdeltaX

deltaX: number

publicdeltaY

deltaY: number

publicdeltaZ

deltaZ: number

publicev

ev: Event

publicindex

index: number

publicpageX

pageX: number

publicpageY

pageY: number

publicscreenX

screenX: number

publicscreenY

screenY: number

publicx

x: number

publicy

y: number

publiccancel

  • cancel(): void
  • Returns void

Interfaces

CapturePointerConfig

CapturePointerConfig:

Turn on move and drag events for an [[Actor]]

captureDragEvents

captureDragEvents: boolean

Capture PointerDrag events (may be expensive!)

captureMoveEvents

captureMoveEvents: boolean

Capture PointerMove events (may be expensive!)

KeyboardInitOptions

KeyboardInitOptions:

optionalglobal

global?: GlobalEventHandlers

optionalgrabWindowFocus

grabWindowFocus?: boolean

PointerInitOptions

PointerInitOptions:

optionalgrabWindowFocus

grabWindowFocus?: boolean

Type Aliases

NativeMouseEvent

NativeMouseEvent: globalThis.MouseEvent

NativePointerEvent

NativePointerEvent: globalThis.PointerEvent

NativeTouchEvent

NativeTouchEvent: globalThis.TouchEvent

NativeWheelEvent

NativeWheelEvent: globalThis.WheelEvent