dino-ge
    Preparing search index...

    Class default

    Manages the viewport and transformation of the game world.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    position: default = ...

    Current camera position in world space.

    zoom: number = 1

    Zoom level of the camera.

    Methods

    • centres the camera on a target object.

      Parameters

      • target: default

        The object to follow.

      • viewportWidth: number

        Width of the viewport.

      • viewportHeight: number

        Height of the viewport.

      Returns void

    • Returns the current viewport bounds in world space.

      Parameters

      • width: number

        Width of the viewport in pixels.

      • height: number

        Height of the viewport in pixels.

      Returns { height: number; width: number; x: number; y: number }

      An object representing the x, y, width, and height of the visible area.