import type { Observable } from "rxjs"; import type { WasCameraUpdatedEvent } from "../Events/WasCameraUpdatedEvent"; import { IframeApiContribution } from "./IframeApiContribution"; export declare class WorkAdventureCameraCommands extends IframeApiContribution { callbacks: { type: "wasCameraUpdated"; callback: (event: { height: number; width: number; x: number; y: number; zoom: number; }) => void; }[]; /** * Set camera to follow the player. * {@link https://docs.workadventu.re/map-building/api-camera.md#start-following-player | Website documentation} * * @param smooth Smooth transition */ followPlayer(smooth?: boolean, duration?: number): void; /** * Set camera to look at given spot. Setting width and height will adjust zoom. * Set lock to true to lock camera in this position. * Set smooth to true for smooth transition. * {@link https://docs.workadventu.re/map-building/api-camera.md#set-spot-for-camera-to-look-at | Website documentation} * * @param {number} x Horizontal position * @param {number} y Vertical position * @param {number} width Width size * @param {number} height Height size * @param {boolean} lock Zoom locked * @param {boolean} smooth Smooth transition */ set(x: number, y: number, width?: number, height?: number, lock?: boolean, smooth?: boolean, duration?: number): void; /** * Listens to updates of the camera viewport. * It will trigger for every update of the camera's properties (position or scale for instance). * {@link https://docs.workadventu.re/map-building/api-camera.md#listen-to-camera-updates | Website documentation} * * @returns {Subject} An observable firing event when the camera is updated */ onCameraUpdate(): Observable; } declare const _default: WorkAdventureCameraCommands; export default _default;