/**
 * Add a point light to an object
 * @example
 * ```
const lightSource = getGroup({ p: [0, 2, 5] });
addPointLight(lightSource);
addTo(root, lightSource);
 * ```
 */
export const addPointLight = (target, opt) => {
    const pointlight = {
        ...{
            color: 'white',
            strength: 10,
            radius: 10,
        },
        ...target.pointlight,
        ...opt,
    };
    target.pointlight = pointlight;
    if (target.children) {
        for (const child of target.children) {
            addPointLight(child, opt);
        }
    }
    return target;
};
//# sourceMappingURL=addPointLight.js.map