import type { Disposable } from "@goldenratio/core-utils"; import type { EnvProvider } from "./env_provider/env_provider.js"; import type { Camera2D, Point, Rectangle, Size } from "./types/types.js"; export declare class Camera2DUtil implements Disposable { private readonly env; private readonly canvas_size; constructor(env: EnvProvider, canvas_size: Size); dispose(): void; /** * Compute the world→screen transform matrix for the given camera. * This mirrors the logic in draw_mode_2d. */ get_camera_transform(camera: Camera2D): DOMMatrix; /** * Helper to apply a DOMMatrix to a point. */ private transform_point; /** * Returns true if the given world-space axis-aligned rectangle is visible * in the camera's view (intersects the canvas in screen-space). * * padding: extra screen pixels around the canvas to treat as "visible". * (Useful to draw slightly offscreen objects for smooth entry.) */ is_rect_in_camera_view(rect: Rectangle, camera: Camera2D, padding?: number): boolean; /** * Returns true if the given world-space point is inside the camera view. */ is_point_in_camera_view(point: Point, camera: Camera2D, padding?: number): boolean; }