const SWAMPS_BLUR = 0.017;
function buildSvg(path, { size: { width, height }, VIEW_BOX }, pathOptions) {
    const svgOptions = {
        viewBox: `0 0 ${VIEW_BOX} ${VIEW_BOX}`,
        'shape-rendering': 'optimizeSpeed',
    };
    const svgOptionsStr = Object.entries(svgOptions).map(([key, value]) =>
        `${key}="${encodeURIComponent(value)}"`)
        .join(' ');
    const pathOptionsStr = Object.entries(pathOptions).map(([key, value]) =>
        `${key}="${encodeURIComponent(value)}"`)
        .join(' ');
    const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" ${
        svgOptionsStr}><path ${pathOptionsStr} d="${path}" /></svg>`;
    const sprite = Sprite.fromImage(`data:image/svg+xml;charset=utf8,${svg}`);
    sprite._generatedSvgTexture = true;
    return sprite;
}