UNPKG

@tolokoban/tgd

Version:

ToloGameDev library for WebGL2

35 lines 1.21 kB
import { TgdMat4, TgdVec3 } from "../math"; import { TgdCamera, TgdCameraOptions } from "./camera"; export interface TgdCameraPerspectiveOptions extends TgdCameraOptions { /** * Vertical field of view in radians. * * The revealed space at a distance of 1 from the camera * will have a height of `2 * tan(fovy / 2)`. */ fovy?: number; } export declare class TgdCameraPerspective extends TgdCamera { private readonly _matrixProjection; private _fovy; private readonly _ray; constructor(options?: TgdCameraPerspectiveOptions); copyProjectionFrom(camera: TgdCameraPerspective): this; castRay(screenX: number, screenY: number): Readonly<{ origin: TgdVec3; direction: TgdVec3; }>; /** * Vertical field of view in radians. * * The revealed space at a distance of 1 from the camera * will have a height of `2 * tan(fovy / 2)`. */ get fovy(): number; set fovy(v: number); get matrixProjection(): TgdMat4; protected getSpaceHeightAtTarget(): number; protected setSpaceHeightAtTarget(v: number): void; private updateProjectionIfNeeded; } //# sourceMappingURL=camera-perspective.d.ts.map