719332d272
We currently serve icons in the form of 141 separate svg files. This is pretty inefficient: it results in 141 http requests each with its own overheads and costs. Each one is generally less than 1kb of data. This PR merges all of our icons into a single 44kb icon file. Each item in the svg has an ID, and we use the ID in the asset url to target the specific icon. This also fixes a lot of the icon preloading issues: because the icon file is already loaded, there's no extra request needed when panels open etc. I was messing with this whilst killing time before a late meeting so made a shitty overengineered code generator, dont at me ### Change type - [x] `improvement` ### Release notes - Serve icons more efficiently, and make sure they're still available if tldraw goes offline.
7 lines
621 B
XML
7 lines
621 B
XML
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="15" y="19.09" width="2" height="8" rx="1" transform="rotate(45 15 19.09)" fill="black"/>
|
|
<rect x="13.5858" y="20.5042" width="2" height="8" rx="1" transform="rotate(-45 13.5858 20.5042)" fill="black"/>
|
|
<rect x="15" y="10.911" width="2" height="8" rx="1" transform="rotate(-135 15 10.911)" fill="black"/>
|
|
<rect x="16.4142" y="9.49683" width="2" height="8" rx="1" transform="rotate(135 16.4142 9.49683)" fill="black"/>
|
|
<rect x="4" y="16" width="2" height="22" rx="1" transform="rotate(-90 4 16)" fill="black"/>
|
|
</svg>
|