Debug statistics and flags for Excalibur. If polling these values, it would be best to do so on the postupdate event for [[Engine]], after all values have been updated during a frame.

Hierarchy

  • Debug

Implements

Constructors

Properties

body: {
    showAll: boolean;
    showCollisionGroup: boolean;
    showCollisionType: boolean;
    showMass: boolean;
    showMotion: boolean;
    showSleeping: boolean;
} = ...

Body component debug settings

Type declaration

  • showAll: boolean
  • showCollisionGroup: boolean
  • showCollisionType: boolean
  • showMass: boolean
  • showMotion: boolean
  • showSleeping: boolean
camera: {
    focusColor: Color;
    showAll: boolean;
    showFocus: boolean;
    showZoom: boolean;
} = ...

Camera debug settings

Type declaration

  • focusColor: Color
  • showAll: boolean
  • showFocus: boolean
  • showZoom: boolean
collider: {
    boundsColor: Color;
    geometryColor: Color;
    showAll: boolean;
    showBounds: boolean;
    showGeometry: boolean;
    showOwner: boolean;
} = ...

Collider component debug settings

Type declaration

  • boundsColor: Color
  • geometryColor: Color
  • showAll: boolean
  • showBounds: boolean
  • showGeometry: boolean
  • showOwner: boolean
colorBlindMode: ColorBlindFlags

Correct or simulate color blindness using [[ColorBlindnessPostProcessor]].

Warning

Will reduce FPS.

entity: {
    showAll: boolean;
    showId: boolean;
    showName: boolean;
} = ...

Entity debug settings

Type declaration

  • showAll: boolean
  • showId: boolean
  • showName: boolean
filter: {
    ids: number[];
    nameQuery: string;
    useFilter: boolean;
} = ...

Filter debug context to named entities or entity ids

Type declaration

  • ids: number[]
  • nameQuery: string
  • useFilter: boolean
graphics: {
    boundsColor: Color;
    showAll: boolean;
    showBounds: boolean;
} = ...

Graphics component debug settings

Type declaration

  • boundsColor: Color
  • showAll: boolean
  • showBounds: boolean
motion: {
    accelerationColor: Color;
    showAcceleration: boolean;
    showAll: boolean;
    showVelocity: boolean;
    velocityColor: Color;
} = ...

Motion component debug settings

Type declaration

  • accelerationColor: Color
  • showAcceleration: boolean
  • showAll: boolean
  • showVelocity: boolean
  • velocityColor: Color
physics: {
    collisionContactColor: Color;
    collisionNormalColor: Color;
    showAll: boolean;
    showBroadphaseSpacePartitionDebug: boolean;
    showCollisionContacts: boolean;
    showCollisionNormals: boolean;
} = ...

Physics simulation debug settings

Type declaration

  • collisionContactColor: Color
  • collisionNormalColor: Color
  • showAll: boolean
  • showBroadphaseSpacePartitionDebug: boolean
  • showCollisionContacts: boolean
  • showCollisionNormals: boolean
stats: DebugStats = ...

Performance statistics

transform: {
    positionColor: Color;
    rotationColor: Color;
    scaleColor: Color;
    showAll: boolean;
    showPosition: boolean;
    showPositionLabel: boolean;
    showRotation: boolean;
    showScale: boolean;
    showZIndex: boolean;
} = ...

Transform component debug settings

Type declaration

  • positionColor: Color
  • rotationColor: Color
  • scaleColor: Color
  • showAll: boolean
  • showPosition: boolean
  • showPositionLabel: boolean
  • showRotation: boolean
  • showScale: boolean
  • showZIndex: boolean

Methods

  • Switch the current excalibur clock with the [[StandardClock]] and return it in the same running state.

    This is useful when you need to switch back to normal mode after debugging.

    Returns StandardClock

  • Switch the current excalibur clock with the [[TestClock]] and return it in the same running state.

    This is useful when you need to debug frame by frame.

    Returns TestClock