Skip to main content

CameraStrategy <T>

Interface that describes a custom camera strategy for tracking targets

Implemented by

Index

Properties

Properties

action

action: (target: T, camera: Camera, engine: Engine<any>, elapsedMs: number) => Vector

Camera strategies perform an action to calculate a new focus returned out of the strategy

@param

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

@param

The current camera implementation in excalibur running the game

@param

The current engine running the game

@param

The elapsed time in milliseconds since the last frame


Type declaration

    • Camera strategies perform an action to calculate a new focus returned out of the strategy


      Parameters

      • 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<any>

        The current engine running the game

      • elapsedMs: number

        The elapsed time in milliseconds since the last frame

      Returns Vector

target

target: T

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