Interface that describes a custom camera strategy for tracking targets

Type Parameters

  • T


  • CameraStrategy

Implemented by



action: ((target, camera, engine, delta) => Vector)

Type declaration

    • (target, camera, engine, delta): Vector
    • Camera strategies perform an action to calculate a new focus returned out of the strategy


      • target: T

        The target object to apply this camera strategy (if any)

      • camera: Camera

        The current camera implementation in excalibur running the game

      • engine: Engine

        The current engine running the game

      • delta: number

        The elapsed time in milliseconds since the last frame

      Returns Vector

target: T

Target of the camera strategy that will be passed to the action