/**
 * Add a spotlight to an object
 * @example
 * ```
  const sl = addSpotlight(getGroup({ p: [0, 2, 6] }));
  addTo(root, sl);
 * ```
 */
export const addSpotlight = (target, options) => {
    const { color = [255, 213, 97], strength = 25, radius = 10, size = 130, offset } = options ?? {};
    const spotlight = {
        ...target.spotlight,
        ...{
            dir: [0.0, -1.0, 0.0],
            radius,
            color,
            strength,
            openingAngleDegs: size,
            offset,
        },
    };
    target.spotlight = spotlight;
    return target;
};
//# sourceMappingURL=addSpotlight.js.map