Events
Index
Enumerations
Classes
- ActionCompleteEvent
- ActionStartEvent
- ActivateEvent
- AddEvent
- 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
- RemoveEvent
- VisibleEvent
Type Aliases
- activate
- add
- 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
- remove
- start
- stop
- subscribe
- unsubscribe
- up
- visible
- wheel
Enumerations
EventTypes
ActionComplete
ActionStart
Activate
Add
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
Remove
Start
Stop
Up
Visible
Wheel
Classes
ActionCompleteEvent
constructor
Parameters
Returns ActionCompleteEvent
publicaction
publicother
Other target object for this event
publicself
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
publicself
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
constructor
Type parameters
- TData = undefined
Parameters
context: SceneActivationContext<TData>
The context for the scene activation
self: Scene<unknown>
Returns ActivateEvent<TData>
publiccontext
The context for the scene activation
publicother
Other target object for this event
publicself
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
AddEvent
constructor
publicengine
publicother
Other target object for this event
publicself
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
is no longer colliding with another
constructor
Type parameters
Parameters
self: T
other: T
side: Side
lastContact: CollisionContact
Returns CollisionEndEvent<T>
publiclastContact
publicother
Other target object for this event
publicself
publicside
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
CollisionPostSolveEvent
constructor
Type parameters
Parameters
self: T
other: T
side: Side
intersection: Vector
contact: CollisionContact
Returns CollisionPostSolveEvent<T>
publiccontact
publicintersection
publicother
publicself
publicside
CollisionPreSolveEvent
constructor
Type parameters
Parameters
self: T
other: T
side: Side
intersection: Vector
contact: CollisionContact
Returns CollisionPreSolveEvent<T>
publiccontact
publicintersection
publicother
publicself
publicside
CollisionStartEvent
Event thrown the first time an actor
collides with another, after an actor is in contact normal collision events are fired.
constructor
Type parameters
Parameters
self: T
other: T
side: Side
contact: CollisionContact
Returns CollisionStartEvent<T>
publiccontact
publicother
publicself
publicside
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
ContactEndEvent
constructor
Type parameters
Parameters
self: T
other: T
side: Side
lastContact: CollisionContact
Returns ContactEndEvent<T>
publiclastContact
publicother
publicself
publicside
ContactStartEvent
constructor
Type parameters
Parameters
self: T
other: T
side: Side
contact: CollisionContact
Returns ContactStartEvent<T>
publiccontact
publicother
publicself
publicside
DeactivateEvent
Event thrown on a Scene on deactivation
constructor
Parameters
context: SceneActivationContext<never>
The context for the scene deactivation
self: Scene<unknown>
Returns DeactivateEvent
publiccontext
The context for the scene deactivation
publicother
Other target object for this event
publicself
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
publicentity
publicother
Other target object for this event
publicself
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
self: Entity<any>
Returns EnterViewPortEvent
publicother
Other target object for this event
publicself
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
publicentity
publicother
Other target object for this event
publicself
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
self: Entity<any>
Returns ExitViewPortEvent
publicother
Other target object for this event
publicself
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
self: Engine<any>
Returns GameStartEvent
publicother
Other target object for this event
publicself
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
self: Engine<any>
Returns GameStopEvent
publicother
Other target object for this event
publicself
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
constructor
Parameters
Returns GamepadAxisEvent
publicaxis
The Gamepad axis
publicother
Other target object for this event
publicself
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
constructor
Parameters
Returns GamepadButtonEvent
publicbutton
The Gamepad button
publicother
Other target object for this event
publicself
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
self: Engine<any>
Returns HiddenEvent
publicother
Other target object for this event
publicself
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
Type parameters
- T: OnInitialize = Entity
constructor
Type parameters
- T: OnInitialize = Entity<any>
Parameters
engine: Engine<any>
The reference to the current engine
self: T
Returns InitializeEvent<T>
publicengine
The reference to the current engine
publicother
Other target object for this event
publicself
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
publicself
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
when a collision has been resolved (body reacted) this frame
constructor
Type parameters
Parameters
self: 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
publicself
The actor the event was thrown on
publicside
The side that did collide 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
PostDebugDrawEvent
The 'postdebugdraw' event is emitted on actors, scenes, and engine after debug drawing starts.
constructor
Parameters
ctx: ExcaliburGraphicsContext
self: Entity<any> | Actor | Engine<any> | Scene<unknown>
Returns PostDebugDrawEvent
publicctx
publicother
Other target object for this event
publicself
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
elapsedMs: number
self: Entity<any> | Engine<any> | TileMap | Scene<unknown>
Returns PostDrawEvent
publicctx
publicelapsedMs
publicother
Other target object for this event
publicself
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
self: Actor
Returns PostKillEvent
publicother
Other target object for this event
publicself
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
elapsedMs: number
self: Entity<any>
Returns PostTransformDrawEvent
publicctx
publicelapsedMs
publicother
Other target object for this event
publicself
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>
elapsedMs: number
self: T
Returns PostUpdateEvent<T>
publicelapsedMs
publicengine
publicother
Other target object for this event
publicself
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
when a collision will occur this frame if it resolves
constructor
Type parameters
Parameters
self: 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
publicself
The actor the event was thrown on
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
self: Entity<any> | Actor | Engine<any> | Scene<unknown>
Returns PreDebugDrawEvent
publicctx
publicother
Other target object for this event
publicself
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
elapsedMs: number
self: Entity<any> | Engine<any> | TileMap | Scene<unknown>
Returns PreDrawEvent
publicctx
publicelapsedMs
publicother
Other target object for this event
publicself
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
self: Actor
Returns PreKillEvent
publicother
Other target object for this event
publicself
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
elapsedMs: number
self: Entity<any>
Returns PreTransformDrawEvent
publicctx
publicelapsedMs
publicother
Other target object for this event
publicself
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>
elapsedMs: number
self: T
Returns PreUpdateEvent<T>
publicelapsedMs
publicengine
publicother
Other target object for this event
publicself
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
RemoveEvent
constructor
Type parameters
- T: OnRemove
Parameters
engine: Engine<any>
self: T
Returns RemoveEvent<T>
publicengine
publicother
Other target object for this event
publicself
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
self: Engine<any>
Returns VisibleEvent
publicother
Other target object for this event
publicself
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.