Events
Index
Enumerations
Classes
- ActionCompleteEvent
- ActionStartEvent
- ActivateEvent
- CollisionEndEvent
- CollisionPostSolveEvent
- CollisionPreSolveEvent
- CollisionStartEvent
- ContactEndEvent
- ContactStartEvent
- DeactivateEvent
- EnterTriggerEvent
- EnterViewPortEvent
- ExitTriggerEvent
- ExitViewPortEvent
- GameEvent
- GameStartEvent
- GameStopEvent
- GamepadAxisEvent
- GamepadButtonEvent
- GamepadConnectEvent
- GamepadDisconnectEvent
- HiddenEvent
- InitializeEvent
- KillEvent
- PostCollisionEvent
- PostDebugDrawEvent
- PostDrawEvent
- PostFrameEvent
- PostKillEvent
- PostTransformDrawEvent
- PostUpdateEvent
- PreCollisionEvent
- PreDebugDrawEvent
- PreDrawEvent
- PreFrameEvent
- PreKillEvent
- PreTransformDrawEvent
- PreUpdateEvent
- VisibleEvent
Type Aliases
- activate
- axis
- button
- cancel
- collisionend
- collisionstart
- connect
- deactivate
- disconnect
- down
- enter
- entertrigger
- enterviewport
- exittrigger
- exitviewport
- hidden
- hold
- initialize
- kill
- leave
- move
- pointercancel
- pointerdown
- pointerdragend
- pointerdragenter
- pointerdragleave
- pointerdragmove
- pointerdragstart
- pointerenter
- pointerleave
- pointermove
- pointerup
- pointerwheel
- postcollision
- postdebugdraw
- postdraw
- postframe
- postkill
- postupdate
- precollision
- predebugdraw
- predraw
- preframe
- prekill
- press
- preupdate
- release
- start
- stop
- subscribe
- unsubscribe
- up
- visible
- wheel
Enumerations
EventTypes
ActionComplete
ActionStart
Activate
Axis
Button
Cancel
CollisionEnd
CollisionStart
Connect
Deactivate
Disconnect
Down
Enter
EnterTrigger
EnterViewport
ExitTrigger
ExitViewport
Hidden
Hold
Initialize
Kill
Leave
Move
PointerCancel
PointerDown
PointerDragEnd
PointerDragEnter
PointerDragLeave
PointerDragMove
PointerDragStart
PointerEnter
PointerLeave
PointerMove
PointerUp
PointerWheel
PostCollision
PostDebugDraw
PostDraw
PostFrame
PostKill
PostUpdate
PreCollision
PreDebugDraw
PreDraw
PreFrame
PreKill
PreUpdate
Press
Release
Start
Stop
Up
Visible
Wheel
Classes
ActionCompleteEvent
constructor
Parameters
Returns ActionCompleteEvent
publicaction
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
ActionStartEvent
Event thrown on an [[Actor]] when an action starts.
constructor
Parameters
Returns ActionStartEvent
publicaction
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
ActivateEvent
Event thrown on a [[Scene]] on activation
Type parameters
- TData = undefined
constructor
Type parameters
- TData = undefined
Parameters
context: SceneActivationContext<TData>
The context for the scene activation
target: Scene<unknown>
Returns ActivateEvent<TData>
publiccontext
The context for the scene activation
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
CollisionEndEvent
Event thrown when the [[Actor|actor]] is no longer colliding with another
Type parameters
- T: BodyComponent | Collider | Entity = Actor
constructor
Type parameters
- T: Entity<any> | BodyComponent | Collider = Actor
Parameters
actor: T
other: T
side: Side
lastContact: CollisionContact
Returns CollisionEndEvent<T>
publiclastContact
publicother
Other target object for this event
publicside
publictarget
Target object for this event.
publicactor
Returns T
Parameters
actor: T
Returns void
publicbubbles
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
Prevents event from bubbling
Returns void
CollisionPostSolveEvent
Type parameters
- T
constructor
Type parameters
- T
Parameters
target: T
other: T
side: Side
intersection: Vector
contact: CollisionContact
Returns CollisionPostSolveEvent<T>
publiccontact
publicintersection
publicother
publicside
publictarget
CollisionPreSolveEvent
Type parameters
- T
constructor
Type parameters
- T
Parameters
target: T
other: T
side: Side
intersection: Vector
contact: CollisionContact
Returns CollisionPreSolveEvent<T>
publiccontact
publicintersection
publicother
publicside
publictarget
CollisionStartEvent
Event thrown the first time an [[Actor|actor]] collides with another, after an actor is in contact normal collision events are fired.
Type parameters
- T: BodyComponent | Collider | Entity = Actor
constructor
Type parameters
- T: Entity<any> | BodyComponent | Collider = Actor
Parameters
actor: T
other: T
side: Side
contact: CollisionContact
Returns CollisionStartEvent<T>
publiccontact
publicother
publicside
publictarget
Target object for this event.
publicactor
Returns T
Parameters
actor: T
Returns void
publicbubbles
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
Prevents event from bubbling
Returns void
ContactEndEvent
Type parameters
- T
constructor
Type parameters
- T
Parameters
target: T
other: T
side: Side
lastContact: CollisionContact
Returns ContactEndEvent<T>
publiclastContact
publicother
publicside
publictarget
ContactStartEvent
Type parameters
- T
constructor
Type parameters
- T
Parameters
target: T
other: T
side: Side
contact: CollisionContact
Returns ContactStartEvent<T>
publiccontact
publicother
publicside
publictarget
DeactivateEvent
Event thrown on a [[Scene]] on deactivation
constructor
Parameters
context: SceneActivationContext<never>
The context for the scene deactivation
target: Scene<unknown>
Returns DeactivateEvent
publiccontext
The context for the scene deactivation
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
EnterTriggerEvent
Base event type in Excalibur that all other event types derive from. Not all event types are thrown on all Excalibur game objects, some events are unique to a type, others are not.
constructor
Parameters
Returns EnterTriggerEvent
publicactor
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
EnterViewPortEvent
Event thrown on an [[Actor]] when any part of the graphics bounds are on screen.
constructor
Parameters
target: Entity<any>
Returns EnterViewPortEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
ExitTriggerEvent
Base event type in Excalibur that all other event types derive from. Not all event types are thrown on all Excalibur game objects, some events are unique to a type, others are not.
constructor
Parameters
Returns ExitTriggerEvent
publicactor
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
ExitViewPortEvent
Event thrown on an [[Actor]] when the graphics bounds completely leaves the screen.
constructor
Parameters
target: Entity<any>
Returns ExitViewPortEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
GameEvent
Base event type in Excalibur that all other event types derive from. Not all event types are thrown on all Excalibur game objects, some events are unique to a type, others are not.
Type parameters
- T
- U = T
constructor
Type parameters
- T
- U = T
Returns GameEvent<T, U>
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
GameStartEvent
The 'start' event is emitted on engine when has started and is ready for interaction.
constructor
Parameters
target: Engine<any>
Returns GameStartEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
GameStopEvent
The 'stop' event is emitted on engine when has been stopped and will no longer take input, update or draw.
constructor
Parameters
target: Engine<any>
Returns GameStopEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
GamepadAxisEvent
Gamepad axis event. See [[Gamepads]] for information on responding to controller input. [[Gamepad]] instances receive this event;
constructor
Parameters
Returns GamepadAxisEvent
publicaxis
The Gamepad axis
publicother
Other target object for this event
publictarget
Target object for this event.
publicvalue
A numeric value between -1 and 1
publicbubbles
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
Prevents event from bubbling
Returns void
GamepadButtonEvent
Gamepad button event. See [[Gamepads]] for information on responding to controller input. [[Gamepad]] instances receive this event;
constructor
Parameters
Returns GamepadButtonEvent
publicbutton
The Gamepad button
publicother
Other target object for this event
publictarget
Target object for this event.
publicvalue
A numeric value between 0 and 1
publicbubbles
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
Prevents event from bubbling
Returns void
GamepadConnectEvent
Event received when a gamepad is connected to Excalibur. [[Gamepads]] receives this event.
constructor
Parameters
index: number
gamepad: Gamepad
Returns GamepadConnectEvent
publicgamepad
publicindex
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
GamepadDisconnectEvent
Event received when a gamepad is disconnected from Excalibur. [[Gamepads]] receives this event.
constructor
Parameters
index: number
gamepad: Gamepad
Returns GamepadDisconnectEvent
publicgamepad
publicindex
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
HiddenEvent
Event received by the [[Engine]] when the browser window is hidden from all screens.
constructor
Parameters
target: Engine<any>
Returns HiddenEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
InitializeEvent
Event thrown on an [[Actor]], [[Scene]], and [[Engine]] only once before the first update call
Type parameters
- T: OnInitialize = Entity
constructor
Type parameters
- T: OnInitialize = Entity<any>
Parameters
engine: Engine<any>
The reference to the current engine
target: T
Returns InitializeEvent<T>
publicengine
The reference to the current engine
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
KillEvent
The 'kill' event is emitted on actors when it is killed. The target is the actor that was killed.
constructor
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PostCollisionEvent
Event thrown on an [[Actor|actor]] when a collision has been resolved (body reacted) this frame
constructor
Type parameters
Parameters
actor: T
The actor the event was thrown on
other: T
The actor that did collide with the current actor
side: Side
The side that did collide with the current actor
intersection: Vector
Intersection vector
contact: CollisionContact
Returns PostCollisionEvent<T>
publiccontact
publicintersection
Intersection vector
publicother
The actor that did collide with the current actor
publicside
The side that did collide with the current actor
publictarget
Target object for this event.
publicactor
Returns T
Parameters
actor: T
Returns void
publicbubbles
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
Prevents event from bubbling
Returns void
PostDebugDrawEvent
The 'postdebugdraw' event is emitted on actors, scenes, and engine after debug drawing starts.
constructor
Parameters
ctx: ExcaliburGraphicsContext
target: Actor | Entity<any> | Engine<any> | Scene<unknown>
Returns PostDebugDrawEvent
publicctx
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PostDrawEvent
The 'postdraw' event is emitted on actors, scenes, and engine after drawing finishes. Actors' postdraw happens inside their graphics transform so that all drawing takes place with the actor as the origin.
constructor
Parameters
ctx: ExcaliburGraphicsContext
delta: number
target: Entity<any> | Engine<any> | Scene<unknown> | TileMap
Returns PostDrawEvent
publicctx
publicdelta
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PostFrameEvent
The 'postframe' event is emitted on the engine, after a frame ends.
constructor
Parameters
engine: Engine<any>
stats: FrameStats
Returns PostFrameEvent
publicengine
publicother
Other target object for this event
publicstats
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PostKillEvent
The 'postkill' event is emitted directly after the actor is killed.
constructor
Parameters
target: Actor
Returns PostKillEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PostTransformDrawEvent
The 'posttransformdraw' event is emitted on actors/entities after all graphics have been draw and transforms reset. Useful if you need to completely custom the draw after everything is done.
constructor
Parameters
ctx: ExcaliburGraphicsContext
delta: number
target: Entity<any>
Returns PostTransformDrawEvent
publicctx
publicdelta
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PostUpdateEvent
The 'postupdate' event is emitted on actors, scenes, camera, and engine after the update ends.
Type parameters
- T: OnPostUpdate = Entity
constructor
Type parameters
- T: OnPostUpdate = Entity<any>
Parameters
engine: Engine<any>
delta: number
target: T
Returns PostUpdateEvent<T>
publicdelta
publicengine
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreCollisionEvent
Event thrown on an [[Actor|actor]] when a collision will occur this frame if it resolves
Type parameters
- T: BodyComponent | Collider | Entity = Actor
constructor
Type parameters
- T: Entity<any> | BodyComponent | Collider = Actor
Parameters
actor: T
The actor the event was thrown on
other: T
The actor that will collided with the current actor
side: Side
The side that will be collided with the current actor
intersection: Vector
Intersection vector
contact: CollisionContact
Returns PreCollisionEvent<T>
publiccontact
publicintersection
Intersection vector
publicother
The actor that will collided with the current actor
publicside
The side that will be collided with the current actor
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreDebugDrawEvent
The 'predebugdraw' event is emitted on actors, scenes, and engine before debug drawing starts.
constructor
Parameters
ctx: ExcaliburGraphicsContext
target: Actor | Entity<any> | Engine<any> | Scene<unknown>
Returns PreDebugDrawEvent
publicctx
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreDrawEvent
The 'predraw' event is emitted on actors, scenes, and engine before drawing starts. Actors' predraw happens inside their graphics transform so that all drawing takes place with the actor as the origin.
constructor
Parameters
ctx: ExcaliburGraphicsContext
delta: number
target: Entity<any> | Engine<any> | Scene<unknown> | TileMap
Returns PreDrawEvent
publicctx
publicdelta
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreFrameEvent
The 'preframe' event is emitted on the engine, before the frame begins.
constructor
Parameters
engine: Engine<any>
prevStats: FrameStats
Returns PreFrameEvent
publicengine
publicother
Other target object for this event
publicprevStats
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreKillEvent
The 'prekill' event is emitted directly before an actor is killed.
constructor
Parameters
target: Actor
Returns PreKillEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreTransformDrawEvent
The 'pretransformdraw' event is emitted on actors/entities before any graphics transforms have taken place. Useful if you need to completely customize the draw or modify the transform before drawing in the draw step (for example needing latest camera positions)
constructor
Parameters
ctx: ExcaliburGraphicsContext
delta: number
target: Entity<any>
Returns PreTransformDrawEvent
publicctx
publicdelta
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
PreUpdateEvent
The 'preupdate' event is emitted on actors, scenes, camera, and engine before the update starts.
Type parameters
- T: OnPreUpdate = Entity
constructor
Type parameters
- T: OnPreUpdate = Entity<any>
Parameters
engine: Engine<any>
delta: number
target: T
Returns PreUpdateEvent<T>
publicdelta
publicengine
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
VisibleEvent
Event received by the [[Engine]] when the browser window is visible on a screen.
constructor
Parameters
target: Engine<any>
Returns VisibleEvent
publicother
Other target object for this event
publictarget
Target object for this event.
publicbubbles
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
Prevents event from bubbling
Returns void
Event thrown on an [[Actor]] when an action completes.