import { Transform } from '../../component/3d/transform.component'; import { Entity } from '../../entity/entity'; import { Mat4 } from '../../math/mat4'; import { Vec3 } from '../../math/vec3'; import { CameraBase } from '../camera.base'; import { CameraConfig, CameraFollow, CameraFollowRules } from './camera.config'; /** * Concrete 3D Camera, setting out 3D-specific properties and behavior, providing type safety for Aura3D * * Supports both Orthographic and Perspecitve Projection approaches by way of the projection configuration member 'mode' */ export declare class Camera extends CameraBase { /** Concrete 3D projection matrix */ projection: Mat4; /** Concrete 3D CameraFollow specification */ protected following: CameraFollow | undefined; /** Concrete 3D Transform Component, used as the View Matrix */ protected transform: Transform; /** * Constructor. Pass a 2D CameraConfig to the parent class and initialize the projection and view matrices * * @param config the 3D CameraConfig */ constructor(config: CameraConfig); /** * Attach the 3D Camera to an Entity with the given 3D CameraFollowRules * * If no CameraFollowRules are provided, use defaults: * - position.x - true * - position.y - true * - position.z - true * - angles.x (pitch) - true * - angles.y (yaw) - true * - angles.z (roll) - false * * @param entity the Entity to follow * @param rules the 3D CameraFollowRules to apply in following the Entity */ attachTo(entity: Entity, rules?: CameraFollowRules): void; /** * Compute the 3D Camera's View Matrix * * @returns the 3D View Matrix */ getViewMatrix(): Mat4; /** * Move along the right axis by a given amount (relative to self) * * @param amount the amount to move by */ moveRight(amount: number): void; /** * Move along the up axis by a given amount (relative to self) * * @param amount the amount to move by */ moveUp(amount: number): void; /** * Move along the forward axis by a given amount (relative to self) * * @param amount the amount to move by */ moveForward(amount: number): void; /** * Move along all three axes by a given 3D vector (relative to self) * * @param amounts the 3D vector to move by */ move(amounts: Vec3): void; /** * Move by a given translation vector (relative to world axes) * * @param translate the translation vector */ translate(translate: Vec3): void; /** * Rotate by a given angle (radians) around the X axis; pitch * * @param angle the angle to rotate by */ rotateX(angle: number): void; /** * Rotate by a given angle (radians) around the Y axis; yaw * * @param angle the angle to rotate by */ rotateY(angle: number): void; /** * Rotate by a given angle (radians) around the Z axis; roll * * @param angle the angle to rotate by */ rotateZ(angle: number): void; /** * Rotate around all three axes by 3 given angles (radians) * * @param angles the X, Y and Z angles to rotate by */ rotate(angles: Vec3): void; /** * 'Zoom' the Camera by scaling by a given factor (relative to current scale) * * @param factor the 3D factor to scale by */ zoom(factor: Vec3): void; /** * 'Zoom' the Camera by scaling to a given absolute factor * * @param factor the 3D factor to scale to */ zoomTo(factor: Vec3): void; }