/**
 * Add an remote image as a texture.
 * @example
 * ```
  const cube = getPrefab({ p: [0, 0, 6] });
  addImage(cube, 'https://cdn.hibervr.com/demo/img/Mona.jpg');
  addTo(root, cube);
 * ```
 */
export const addImage = (target, url) => {
    target.remoteTexture = { textureUrl: url };
    if (target.children) {
        for (const child of target.children) {
            addImage(child, url);
        }
    }
    return target;
};
//# sourceMappingURL=addImage.js.map