/**
 * Add an audio source to a HNode.
 * @example
 * ```
 * const cube = getPrefab({ p: [0, 0, 5] });
 * addAudio(cube, { id: 'a_m_iconic_bullet_01' });
 * addTo(root, cube);
 * ```
 */
export const addAudio = (target, options) => {
    const audio = {
        id: 'a_am_birds_and_insects_01',
        volume: 2,
        attenuationModel: 'LINEAR_DISTANCE',
        looping: true,
        rollOffFactor: 1,
        minAttenuationDist: 5,
        maxAttenuationDist: 20,
        startPlayingDist: 20.1,
        ...target.audio,
        ...options,
    };
    target.audio = audio;
    return target;
};
//# sourceMappingURL=addAudio.js.map