import { Camera3D } from '../../camera/3d'; import { Vec3 } from '../../math'; import { World } from '../world'; import { World3DConfig } from './world.3d.config'; /** * Concrete World3D, a World EntityManager setting out the 3D-specific properties and behavior of World object management for 3D 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 * * NB: the default 3D Camera uses Perspective Projection */ export declare class World3D extends World { /** Concrete 3D active Camera */ readonly activeCamera: Camera3D; /** Concrete mapping of 3D Cameras */ protected readonly cameras: Map; /** * Constructor. Take the type-correct World3DConfig and pass it up to the parent class * * Initialise the default Camera3D based on the 3D-specific configuration * * @param config the World3DConfig */ constructor(config: World3DConfig); /** * Concrete World dimension getter; narrowing the generic type to Vec3 for consumer safety */ get dimensions(): Vec3; /** * Concrete Camera addition routine, narrowing the generic type to ensure the correct configuration of a World3D * * @param name the name of the Camera to add * @param camera the Camera3D to add */ addCamera(camera: Camera3D): void; /** * Concrete Camera retrieval routine, narrowing the return type to Camera3D * * Throws an error if the Camera is not found for runtime safety * * @param name the name of the Camera to retrieve * * @returns the retreived Camera3D */ getCamera(name: string): Camera3D; }