import Vector2 from '../math/Vector2.js'; import type GameObject from './GameObject.js'; /** * Manages the viewport and transformation of the game world. */ export default class Camera { /** Current camera position in world space. */ position: Vector2; /** Zoom level of the camera. */ zoom: number; /** * initialises a new instance of Camera. */ constructor(); /** * centres the camera on a target object. * @param target The object to follow. * @param viewportWidth Width of the viewport. * @param viewportHeight Height of the viewport. */ follow(target: GameObject, viewportWidth: number, viewportHeight: number): void; /** * Returns the current viewport bounds in world space. * @param width Width of the viewport in pixels. * @param height Height of the viewport in pixels. * @returns An object representing the x, y, width, and height of the visible area. */ getViewportBounds(width: number, height: number): { x: number; y: number; width: number; height: number; }; /** * Resets the camera position to the origin (0, 0) and zoom to 1. */ reset(): void; }