import { Object3DCompat } from "../core/Object3DCompat.js";
export class CameraCompat extends Object3DCompat {
    type = "Camera";
    near;
    far;
    constructor(near = 0.1, far = 2000) {
        super();
        this.near = near;
        this.far = far;
    }
}
export class PerspectiveCameraCompat extends CameraCompat {
    fov;
    aspect;
    type = "PerspectiveCamera";
    constructor(fov = 50, aspect = 1, near = 0.1, far = 2000) {
        super(near, far);
        this.fov = fov;
        this.aspect = aspect;
    }
    updateProjectionMatrix() {
        if (this.aspect <= 0 || this.fov <= 0 || this.fov >= 180)
            throw new Error("Invalid PerspectiveCameraCompat projection.");
    }
}
export class OrthographicCameraCompat extends CameraCompat {
    left;
    right;
    top;
    bottom;
    type = "OrthographicCamera";
    constructor(left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000) {
        super(near, far);
        this.left = left;
        this.right = right;
        this.top = top;
        this.bottom = bottom;
    }
    updateProjectionMatrix() {
        if (this.left === this.right || this.top === this.bottom)
            throw new Error("Invalid OrthographicCameraCompat projection.");
    }
}
//# sourceMappingURL=index.js.map