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.
5 lines
669 B
XML
5 lines
669 B
XML
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="15.3997" cy="19.4395" r="1.5" fill="black"/>
|
|
<path d="M14.0538 10.4595C14.0244 9.69574 14.6356 9.06055 15.3999 9.06055C16.1643 9.06055 16.7755 9.69574 16.7461 10.4595L16.4384 15.4613C16.4169 16.0193 15.9583 16.4606 15.3999 16.4606C14.8415 16.4606 14.383 16.0193 14.3615 15.4613L14.0538 10.4595Z" fill="black"/>
|
|
<path d="M28.4825 23.8578L15.52 1.33194C15.2892 0.93095 14.7106 0.930951 14.4799 1.33194L1.51747 23.8578C1.2873 24.2578 1.57602 24.7571 2.03752 24.7571H27.9625C28.424 24.7571 28.7127 24.2578 28.4825 23.8578Z" stroke="black" stroke-width="2"/>
|
|
</svg>
|