import '../../assert/js/assert.js';
import '../../globals.js';
import Bounds2 from '../../dot/js/Bounds2.js';
import Ray3 from '../../dot/js/Ray3.js';
import Vector2 from '../../dot/js/Vector2.js';
import Vector3 from '../../dot/js/Vector3.js';
import { Color } from '../../scenery/js/imports.js';
import TReadOnlyProperty from '../../axon/js/TReadOnlyProperty.js';
import TEmitter from '../../axon/js/TEmitter.js';
export type ThreeStageOptions = {
    backgroundColorProperty?: TReadOnlyProperty<Color>;
    cameraPosition?: Vector3;
    threeRendererOptions?: THREE.WebGLRendererParameters;
    threeRendererPixelRatio?: number;
};
export default class ThreeStage {
    activeScale: number;
    canvasWidth: number;
    canvasHeight: number;
    readonly threeScene: THREE.Scene;
    readonly threeCamera: THREE.PerspectiveCamera;
    threeRenderer: THREE.WebGLRenderer | null;
    private readonly backgroundColorProperty;
    private readonly colorListener;
    readonly dimensionsChangedEmitter: TEmitter;
    readonly contextLostEmitter: TEmitter;
    readonly contextRestoredEmitter: TEmitter;
    constructor(providedOptions?: ThreeStageOptions);
    /**
     * Returns a Canvas containing the displayed content in this scene.
     */
    renderToCanvas(supersampleMultiplier?: number, backingMultiplier?: number, scale?: Vector2): HTMLCanvasElement;
    /**
     * Scale contents of the provided canvas, returning the same canvas instance (for
     * chaining). This method is more complicated than just calling context.scale() because we need to ensure that the
     * scale is applied to the output of `toDataURL()`.
     *
     * Help found in:
     * https://stackoverflow.com/questions/15845334/scale-a-canvas-so-that-the-base64-todataurl-is-scaled-as-well
     * https://stackoverflow.com/questions/8168217/html-canvas-how-to-draw-a-flipped-mirrored-image
     */
    private static scaleCanvas;
    /**
     * Returns a three.js Raycaster meant for ray operations.
     */
    private getRaycasterFromScreenPoint;
    /**
     * Projects a 3d point in the global coordinate frame to one within the 2d global coordinate frame.
     */
    projectPoint(point: Vector3): Vector2;
    /**
     * Project a 2d global screen coordinate into 3d global coordinates using THREE/Vector3.unproject()
     *
     */
    unprojectPoint(point: Vector2, modelZ?: number): Vector3;
    /**
     * Given a screen point, returns a 3D ray representing the camera's position and direction that point would be in the
     * 3D scene.
     */
    getRayFromScreenPoint(screenPoint: Vector2): Ray3;
    setDimensions(width: number, height: number): void;
    /**
     * Adjusts the camera's view offsets so that it displays the camera's main output within the specified cameraBounds.
     * This is a generalization of the isometric FOV computation, as it also supports other combinations such as properly
     * handling pan/zoom. See https://github.com/phetsims/density/issues/50
     */
    adjustViewOffset(cameraBounds: Bounds2): void;
    get width(): number;
    get height(): number;
    /**
     * Renders the simulation to a specific rendering target
     *
     * @param target - undefined for the default target
     * @param autoClear - when true, THREE will clear all pixels prior to rendering the next frame onto it. This is
     *                    expensive, but can clean up animations where objects look laggy/warped in certain contexts.
     */
    render(target: THREE.WebGLRenderTarget | undefined, autoClear?: boolean): void;
    /**
     * Releases references.
     */
    dispose(): void;
    /**
     * It's a bit tricky, since if we are vertically-constrained, we don't need to adjust the camera's FOV (since the
     * width of the scene will scale proportionally to the scale we display our contents at). It's only when our view
     * is horizontally-constrained where we have to account for the changed aspect ratio, and adjust the FOV so that
     * the content shows up at a scale of "sy / sx" compared to the normal case. Note that sx === sy is where our
     * layout bounds fit perfectly in the window, so we don't really have a constraint.
     * Most of the complexity here is that threeCamera.fov is in degrees, and our ideal vertically-constrained FOV is
     * 50 (so there's conversion factors in place).
     */
    static computeIsometricFOV(fov: number, canvasWidth: number, canvasHeight: number, layoutWidth: number, layoutHeight: number): number;
}
//# sourceMappingURL=ThreeStage.d.ts.map