export class BufferGeometryCompat {
    type = "BufferGeometry";
    attributes = new Map();
    index = null;
    drawRange = { start: 0, count: Number.POSITIVE_INFINITY };
    setAttribute(name, attribute) {
        this.attributes.set(name, attribute);
        return this;
    }
    getAttribute(name) {
        return this.attributes.get(name);
    }
    deleteAttribute(name) {
        this.attributes.delete(name);
        return this;
    }
    setIndex(index) {
        this.index = index;
        return this;
    }
    setDrawRange(start, count) {
        if (!Number.isInteger(start) || start < 0 || !(Number.isFinite(count) || count === Number.POSITIVE_INFINITY) || count < 0) {
            throw new RangeError("BufferGeometryCompat drawRange requires a non-negative integer start and non-negative finite count.");
        }
        this.drawRange = { start, count };
        return this;
    }
}
export class InstancedBufferGeometryCompat extends BufferGeometryCompat {
    type = "InstancedBufferGeometry";
    instanceCount = 1;
}
export class BoxGeometryCompat extends BufferGeometryCompat {
    width;
    height;
    depth;
    type = "BoxGeometry";
    constructor(width = 1, height = 1, depth = 1) {
        super();
        this.width = width;
        this.height = height;
        this.depth = depth;
    }
}
export class SphereGeometryCompat extends BufferGeometryCompat {
    radius;
    widthSegments;
    heightSegments;
    type = "SphereGeometry";
    constructor(radius = 1, widthSegments = 32, heightSegments = 16) {
        super();
        this.radius = radius;
        this.widthSegments = widthSegments;
        this.heightSegments = heightSegments;
    }
}
export class PlaneGeometryCompat extends BufferGeometryCompat {
    width;
    height;
    type = "PlaneGeometry";
    constructor(width = 1, height = 1) {
        super();
        this.width = width;
        this.height = height;
    }
}
export class CylinderGeometryCompat extends BufferGeometryCompat {
    radiusTop;
    radiusBottom;
    height;
    type = "CylinderGeometry";
    constructor(radiusTop = 1, radiusBottom = 1, height = 1) {
        super();
        this.radiusTop = radiusTop;
        this.radiusBottom = radiusBottom;
        this.height = height;
    }
}
export class TorusGeometryCompat extends BufferGeometryCompat {
    radius;
    tube;
    type = "TorusGeometry";
    constructor(radius = 1, tube = 0.4) {
        super();
        this.radius = radius;
        this.tube = tube;
    }
}
export class ConeGeometryCompat extends CylinderGeometryCompat {
    type = "ConeGeometry";
    constructor(radius = 1, height = 1) { super(0, radius, height); }
}
export class CircleGeometryCompat extends BufferGeometryCompat {
    radius;
    segments;
    type = "CircleGeometry";
    constructor(radius = 1, segments = 32) {
        super();
        this.radius = radius;
        this.segments = segments;
    }
}
export const THREE_COMPAT_COMPAT_GEOMETRY_TYPES = [
    "BoxGeometry",
    "SphereGeometry",
    "PlaneGeometry",
    "CylinderGeometry",
    "TorusGeometry",
    "ConeGeometry",
    "CircleGeometry",
    "BufferGeometry",
    "InstancedBufferGeometry"
];
//# sourceMappingURL=index.js.map