import { PerspectiveCamera, Vector2, Vector3 } from 'three'; /** * Maps from 3D world coordinates to normalized screen coordinates * relative to the canvas being rendered to. X and Y will * be in range [0, 1]. Z is in range [-1, 1] if the coordinate * is inside the camera near and far planes. * @param camera Camera used to project point from 3D to NDC coordinates * @param position3D World position in 3D * @param out Optionally pre-allocated Vector3 * @returns Relative screen coordinates in X, Y and Z in range [-1, 1] if point * is within near/far of camera. */ export declare function worldToNormalizedViewportCoordinates(camera: PerspectiveCamera, position3D: Vector3, out?: Vector3): Vector3; /** * Maps from 3D world coordinates to screen coordinates * relative to the canvas. X and Y will be in absolute * coordinates (0,0 being the top left of the canvas). Z is * in range [-1, 1] if the coordinate * is inside the camera near and far planes. * @param canvas Renderer canvas used to render the "world" * @param camera Camera used to project point from 3D to NDC coordinates * @param position3D World position in 3D * @param out Optionally pre-allocated Vector3 * @returns Relative screen coordinates in X, Y and Z in range [-1, 1] if point * is within near/far of camera. */ export declare function worldToViewportCoordinates(canvas: HTMLCanvasElement, camera: PerspectiveCamera, position3D: Vector3, out?: Vector3): Vector3; /** * Converts a pixel coordinate to normalized device coordinate (in range [-1, 1]) */ export declare function getNormalizedPixelCoordinatesBySize(pixelX: number, pixelY: number, width: number, height: number): Vector2; export declare function getNormalizedPixelCoordinates(domElement: HTMLElement, pixelX: number, pixelY: number): Vector2;