import { ValidationError } from "../core/index.js";
import { Light } from "./Light.js";
export class SpotLight extends Light {
    currentAngle = Math.PI / 4;
    currentPenumbra = 0;
    currentRange = 10;
    constructor(name = "SpotLight", id) {
        super("spot", name, id);
    }
    get angle() {
        return this.currentAngle;
    }
    set angle(value) {
        if (!(value > 0 && value < Math.PI / 2))
            throw new ValidationError("SPOT_LIGHT_ANGLE", "Spot light angle must be within (0, PI / 2).");
        this.currentAngle = value;
    }
    get penumbra() {
        return this.currentPenumbra;
    }
    set penumbra(value) {
        if (!(value >= 0 && value <= 1))
            throw new ValidationError("SPOT_LIGHT_PENUMBRA", "Spot light penumbra must be within [0, 1].");
        this.currentPenumbra = value;
    }
    get range() {
        return this.currentRange;
    }
    set range(value) {
        if (!(value > 0) || !Number.isFinite(value))
            throw new ValidationError("SPOT_LIGHT_RANGE", "Spot light range must be positive.");
        this.currentRange = value;
    }
}
//# sourceMappingURL=SpotLight.js.map