import { Camera2D } from '../../camera/2d'; import { Vec2 } from '../../math'; import { World } from '../world'; import { World2DConfig } from './world.2d.config'; /** * Concrete World2D, a World EntityManager setting out the 2D-specific properties and behavior of World object management for 2D Games * * Implements and type-narrows the abstract elements of the parent class World so as to produce consumer type-safety on things like Camera * management */ export declare class World2D extends World { /** Concrete 2D active Camera */ readonly activeCamera: Camera2D; /** Concrete mapping of 2D Cameras */ protected readonly cameras: Map; /** * Constructor. Take the type-correct World2DConfig and pass it up to the parent class * * Initialise the default Camera2D based on the 2D-specific configuration * * @param config the World2DConfig */ constructor(config: World2DConfig); /** * Concrete World dimension getter; narrowing the generic type to Vec2 for consumer safety */ get dimensions(): Vec2; /** * Concrete Camera addition routine, narrowing the generic type to ensure the correct configuration of a World2D * * @param name the name of the Camera to add * @param camera the Camera2D to add */ addCamera(camera: Camera2D): void; /** * Concrete Camera retrieval routine, narrowing the return type to Camera2D * * Throws an error if the Camera is not found for runtime safety * * @param name the name of the Camera to retrieve * * @returns the retreived Camera2D */ getCamera(name: string): Camera2D; }