SVG

Posted on September 2, 2022
Tags: javascript
<?xml version="1.0" encoding="iso-8859-1"?>

<svg>
<!-- SVG asset 1 -->
    <symbol id="bleh" x="2.5vh" y="8.5vh" 
    width="5vw" height="5vh" 
    viewBox="0 0 50 20" style = "filter:invert(100)" 
    xmlns="http://www.w3.org/2000/svg">>
        <g>
            <path d="...">
            <path d="...">
        </g>
    </symbol>
    
<!-- SVG asset 2 -->
    <symbol id="hilo"> 
        ...
    </symbol>
</svg>
<svg><use href = "/spritesheet.svg#bleh" ></use></svg>
<svg><use href = "/spritesheet.svg#hilo" ></use></svg>

1 symbol

2 position

3 viewBox for Panning Zooming

4 Group g

5 pixel to vw,vh