Skip to main content

DebugConfig

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.

Index

Constructors

constructor

Properties

publicbody

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

publiccamera

camera: { focusColor: Color; showAll: boolean; showFocus: boolean; showZoom: boolean } = ...

Camera debug settings


Type declaration

  • focusColor: Color
  • showAll: boolean
  • showFocus: boolean
  • showZoom: boolean

publiccollider

collider: { boundsColor: Color; geometryColor: Color; geometryLineWidth: number; geometryPointSize: number; showAll: boolean; showBounds: boolean; showGeometry: boolean; showOwner: boolean } = ...

Collider component debug settings


Type declaration

  • boundsColor: Color
  • geometryColor: Color
  • geometryLineWidth: number
  • geometryPointSize: number
  • showAll: boolean
  • showBounds: boolean
  • showGeometry: boolean
  • showOwner: boolean

publiccolorBlindMode

colorBlindMode: ColorBlindFlags

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

@warning

Will reduce FPS.

publicentity

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

Entity debug settings


Type declaration

  • showAll: boolean
  • showId: boolean
  • showName: boolean

publicfilter

filter: { ids: number[]; nameQuery: string; useFilter: boolean } = ...

Filter debug context to named entities or entity ids


Type declaration

  • ids: number[]
  • nameQuery: string
  • useFilter: boolean

publicgraphics

graphics: { boundsColor: Color; showAll: boolean; showBounds: boolean } = ...

Graphics component debug settings


Type declaration

  • boundsColor: Color
  • showAll: boolean
  • showBounds: boolean

publicisometric

isometric: { gridColor: Color; gridWidth: number; positionColor: Color; positionSize: number; showAll: boolean; showColliderGeometry: boolean; showGrid: boolean; showPosition: boolean } = ...

Type declaration

  • gridColor: Color
  • gridWidth: number
  • positionColor: Color
  • positionSize: number
  • showAll: boolean
  • showColliderGeometry: boolean
  • showGrid: boolean
  • showPosition: boolean

publicmotion

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

publicphysics

physics: { collisionContactColor: Color; collisionNormalColor: Color; contactSize: number; showAll: boolean; showBroadphaseSpacePartitionDebug: boolean; showCollisionContacts: boolean; showCollisionNormals: boolean } = ...

Physics simulation debug settings


Type declaration

  • collisionContactColor: Color
  • collisionNormalColor: Color
  • contactSize: number
  • showAll: boolean
  • showBroadphaseSpacePartitionDebug: boolean
  • showCollisionContacts: boolean
  • showCollisionNormals: boolean

publicstats

stats: DebugStats = ...

Performance statistics

publictilemap

tilemap: { gridColor: Color; gridWidth: number; showAll: boolean; showColliderGeometry: boolean; showGrid: boolean; showSolidBounds: boolean; solidBoundsColor: Color } = ...

Type declaration

  • gridColor: Color
  • gridWidth: number
  • showAll: boolean
  • showColliderGeometry: boolean
  • showGrid: boolean
  • showSolidBounds: boolean
  • solidBoundsColor: Color

publictransform

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

Transform component debug settings


Type declaration

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

Methods

publicuseStandardClock

  • 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

publicuseTestClock

  • 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