platformer - v1.0.0
    Preparing search index...
    • ECS system that updates camera components to follow their target entities.

      The camera smoothly interpolates (lerp) toward its target's position, applies zoom, offset, and optional world bounds clamping.

      Parameters

      • ecs: default

        The ECS world instance.

      • ctx: CanvasRenderingContext2D

        Canvas 2D rendering context (used for viewport dimensions).

      Returns void

      • Only entities with a camera component are processed.
      • Camera follows the target entity's transform component.
      • Position is interpolated using linear interpolation (lerp).
      • Optional bounds restrict camera movement within world limits.