misc: Profile SVG - new Headwear added and some things fixed

Co-authored-by: Alan <donosonaumczuk@gmail.com>
This commit is contained in:
vicnaum
2023-11-29 23:04:03 +01:00
parent be25b3456e
commit 1a21d9cce4
25 changed files with 875 additions and 122 deletions

View File

@@ -179,23 +179,23 @@ library Face2 {
} else if (faceVariant == Face.FaceVariants.BABY) {
// baby
return
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none"><path fill="#fff" d="M113 161.9c1.9 2 3 4.6 3 7.6a11 11 0 0 1-22 .1v-.1a11 11 0 0 1 11-11c3.2 0 6 1.3 8 3.4Zm-2.3 7.6c0-1-.2-2-.6-2.8-1-1.9-3-3.1-5.1-3.1a5.8 5.8 0 0 0-5.7 5.9c0 3.2 2.5 5.8 5.7 5.8s5.7-2.6 5.7-5.8Z"/><path class="skinColorDark" d="M109.6 167a8.8 8.8 0 0 1-9.3 0l-.5-.1c1-2 3-3.3 5.2-3.3 2.3 0 4 1.2 5 3l-.4.3ZM97 161.9l-.2-1.8A8.2 8.2 0 1 1 113 162a11 11 0 0 0-16 0Z"/><path class="skinColorLight" d="M96.8 160.1c0 .6 0 1.2.2 1.8a11 11 0 0 0-3 7.7h-1a14.8 14.8 0 0 1-7.3-8.5c-1-3.6-.4-7.9 2-10.8a14 14 0 0 1 8.5-4.4c3.2-.6 5-.7 8.8-.7 3.8 0 5.6 0 8.8.6 3.2.6 6.3 2 8.4 4.4 2.5 3 3.2 7.2 2 10.9a14.8 14.8 0 0 1-7.2 8.5h-1v-.1c0-3-1.1-5.6-3-7.6l.2-1.8a8.2 8.2 0 1 0-16.4 0Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M109.6 166a8.8 8.8 0 0 1-9.3 0"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m97 161.9-.2-1.8A8.2 8.2 0 1 1 113 162"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M94 169.6v-.1a11 11 0 0 1 11-11 11 11 0 0 1 11 11v0a11 11 0 0 1-22 .1Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M110 166.7c.5.8.7 1.8.7 2.8 0 3.2-2.5 5.8-5.7 5.8a5.8 5.8 0 0 1-5.7-5.8 5.8 5.8 0 0 1 5.7-5.9c2.3 0 4 1.2 5 3Zm-17 3a14.8 14.8 0 0 1-7.3-8.6c-1-3.6-.4-7.9 2-10.8a14 14 0 0 1 8.5-4.4c3.2-.6 5-.7 8.8-.7"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M101.2 172.7c1.2.7 6 .6 8 0"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M117 169.6a15 15 0 0 0 7.3-8.5c1-3.7.4-8-2-10.9a14 14 0 0 0-8.5-4.4 48 48 0 0 0-8.8-.6"/><path class="skinColorLight" d="M99.5 157.6h11v7.9h-11z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M98.7 161.6a4 4 0 0 1 4-4h4.6a4 4 0 0 1 4 4v0a4 4 0 0 1-4 4h-4.6a4 4 0 0 1-4-4v0Z"/><circle class="faceFillColor" cx="87.3" cy="135.5" r="4.7"/><circle class="faceFillColor" cx="122.7" cy="135.5" r="4.7"/><path fill="#fff" fill-opacity=".5" d="M78 158.2c-.7 3-4.6 4.6-8.8 3.7-4.1-1-7-4-6.3-7 .7-3 4.6-4.7 8.7-3.7 4.2.9 7 4 6.4 7Zm54 0c.7 3 4.6 4.6 8.7 3.7 4.2-1 7-4 6.3-7-.6-3-4.5-4.7-8.7-3.7-4.1.9-7 4-6.3 7Z"/></svg>';
'<path fill="#fff" d="M113 161.9c1.9 2 3 4.6 3 7.6a11 11 0 0 1-22 .1v-.1a11 11 0 0 1 11-11c3.2 0 6 1.3 8 3.4Zm-2.3 7.6c0-1-.2-2-.6-2.8-1-1.9-3-3.1-5.1-3.1a5.8 5.8 0 0 0-5.7 5.9c0 3.2 2.5 5.8 5.7 5.8s5.7-2.6 5.7-5.8Z"/><path class="skinColorDark" d="M109.6 167a8.8 8.8 0 0 1-9.3 0l-.5-.1c1-2 3-3.3 5.2-3.3 2.3 0 4 1.2 5 3l-.4.3ZM97 161.9l-.2-1.8A8.2 8.2 0 1 1 113 162a11 11 0 0 0-16 0Z"/><path class="skinColorLight" d="M96.8 160.1c0 .6 0 1.2.2 1.8a11 11 0 0 0-3 7.7h-1a14.8 14.8 0 0 1-7.3-8.5c-1-3.6-.4-7.9 2-10.8a14 14 0 0 1 8.5-4.4c3.2-.6 5-.7 8.8-.7 3.8 0 5.6 0 8.8.6 3.2.6 6.3 2 8.4 4.4 2.5 3 3.2 7.2 2 10.9a14.8 14.8 0 0 1-7.2 8.5h-1v-.1c0-3-1.1-5.6-3-7.6l.2-1.8a8.2 8.2 0 1 0-16.4 0Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M109.6 166a8.8 8.8 0 0 1-9.3 0"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m97 161.9-.2-1.8A8.2 8.2 0 1 1 113 162"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M94 169.6v-.1a11 11 0 0 1 11-11 11 11 0 0 1 11 11v0a11 11 0 0 1-22 .1Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M110 166.7c.5.8.7 1.8.7 2.8 0 3.2-2.5 5.8-5.7 5.8a5.8 5.8 0 0 1-5.7-5.8 5.8 5.8 0 0 1 5.7-5.9c2.3 0 4 1.2 5 3Zm-17 3a14.8 14.8 0 0 1-7.3-8.6c-1-3.6-.4-7.9 2-10.8a14 14 0 0 1 8.5-4.4c3.2-.6 5-.7 8.8-.7"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M101.2 172.7c1.2.7 6 .6 8 0"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M117 169.6a15 15 0 0 0 7.3-8.5c1-3.7.4-8-2-10.9a14 14 0 0 0-8.5-4.4 48 48 0 0 0-8.8-.6"/><path class="skinColorLight" d="M99.5 157.6h11v7.9h-11z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M98.7 161.6a4 4 0 0 1 4-4h4.6a4 4 0 0 1 4 4v0a4 4 0 0 1-4 4h-4.6a4 4 0 0 1-4-4v0Z"/><circle class="faceFillColor" cx="87.3" cy="135.5" r="4.7"/><circle class="faceFillColor" cx="122.7" cy="135.5" r="4.7"/><path fill="#fff" fill-opacity=".5" d="M78 158.2c-.7 3-4.6 4.6-8.8 3.7-4.1-1-7-4-6.3-7 .7-3 4.6-4.7 8.7-3.7 4.2.9 7 4 6.4 7Zm54 0c.7 3 4.6 4.6 8.7 3.7 4.2-1 7-4 6.3-7-.6-3-4.5-4.7-8.7-3.7-4.1.9-7 4-6.3 7Z"/></svg>';
} else if (faceVariant == Face.FaceVariants.KAWAII) {
// kawaii
return
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none"><path class="faceFillColor" d="M114.3 138.3c1.8 0 3.3 2 3.3 4.6 0 2.6-1.5 4.6-3.3 4.6-1.8 0-3.3-2-3.3-4.6 0-2.5 1.5-4.6 3.3-4.6Zm-18.5 0c1.8 0 3.2 2 3.2 4.6 0 2.6-1.4 4.6-3.2 4.6-1.9 0-3.3-2-3.3-4.6 0-2.5 1.4-4.6 3.3-4.6Z"/><path fill="#fff" d="M136.9 139.5c2 7.4-.4 15-7.2 19.3-7.5 4.7-20.2 4.5-24.6-3.8h-.1c-4.4 8.3-17.1 8.5-24.6 3.8a17 17 0 0 1-7.2-19.3 17 17 0 0 1 15-13c8-1 16.8 4.7 16.8 11.7 0-7 9-12.7 16.8-11.7a17 17 0 0 1 15 13Zm-19.3 3.4c0-2.5-1.5-4.6-3.3-4.6-1.8 0-3.3 2-3.3 4.6 0 2.6 1.5 4.6 3.3 4.6 1.8 0 3.3-2 3.3-4.6ZM99 143c0-2.5-1.4-4.6-3.2-4.6-1.9 0-3.3 2-3.3 4.6 0 2.6 1.4 4.6 3.3 4.6 1.8 0 3.2-2 3.2-4.6Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 138.1c0-7-9-12.6-16.8-11.7a17 17 0 0 0-15 13c-2 7.5.3 15 7.1 19.3 7.5 4.8 20.2 4.6 24.6-3.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M92.4 142.9c0-2.6 1.5-4.6 3.3-4.6 1.8 0 3.3 2 3.3 4.6 0 2.5-1.5 4.6-3.3 4.6-1.8 0-3.3-2-3.3-4.6Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 138.1c0-7 8.9-12.6 16.8-11.7a17 17 0 0 1 15 13c2 7.5-.4 15-7.1 19.3-7.5 4.8-20.2 4.6-24.6-3.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M117.6 142.9c0-2.6-1.5-4.6-3.3-4.6-1.8 0-3.3 2-3.3 4.6 0 2.5 1.5 4.6 3.3 4.6 1.8 0 3.3-2 3.3-4.6Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-width="2.5" d="m87.9 122 .5 4m-8.7-.6 2 2.7m15.2-3.8-1.6 3m26.8-5.3-.5 4m8.8-.6-2 2.7m-15.2-3.8 1.6 3"/><path fill="#fff" fill-opacity=".5" d="M80 167.2c-.7 3-4.6 4.6-8.7 3.7-4.2-1-7-4-6.4-7 .7-3 4.6-4.7 8.8-3.7 4.1.9 7 4 6.3 7Zm50 0c.7 3 4.6 4.6 8.7 3.7 4.2-1 7-4 6.4-7-.7-3-4.6-4.7-8.8-3.7-4.1.9-7 4-6.3 7Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-width="3" d="M90.5 167.7s4.5 5.1 14.6 5.1c10 0 14.5-5.1 14.5-5.1"/></svg>';
'<path class="faceFillColor" d="M114.3 138.3c1.8 0 3.3 2 3.3 4.6 0 2.6-1.5 4.6-3.3 4.6-1.8 0-3.3-2-3.3-4.6 0-2.5 1.5-4.6 3.3-4.6Zm-18.5 0c1.8 0 3.2 2 3.2 4.6 0 2.6-1.4 4.6-3.2 4.6-1.9 0-3.3-2-3.3-4.6 0-2.5 1.4-4.6 3.3-4.6Z"/><path fill="#fff" d="M136.9 139.5c2 7.4-.4 15-7.2 19.3-7.5 4.7-20.2 4.5-24.6-3.8h-.1c-4.4 8.3-17.1 8.5-24.6 3.8a17 17 0 0 1-7.2-19.3 17 17 0 0 1 15-13c8-1 16.8 4.7 16.8 11.7 0-7 9-12.7 16.8-11.7a17 17 0 0 1 15 13Zm-19.3 3.4c0-2.5-1.5-4.6-3.3-4.6-1.8 0-3.3 2-3.3 4.6 0 2.6 1.5 4.6 3.3 4.6 1.8 0 3.3-2 3.3-4.6ZM99 143c0-2.5-1.4-4.6-3.2-4.6-1.9 0-3.3 2-3.3 4.6 0 2.6 1.4 4.6 3.3 4.6 1.8 0 3.2-2 3.2-4.6Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 138.1c0-7-9-12.6-16.8-11.7a17 17 0 0 0-15 13c-2 7.5.3 15 7.1 19.3 7.5 4.8 20.2 4.6 24.6-3.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M92.4 142.9c0-2.6 1.5-4.6 3.3-4.6 1.8 0 3.3 2 3.3 4.6 0 2.5-1.5 4.6-3.3 4.6-1.8 0-3.3-2-3.3-4.6Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 138.1c0-7 8.9-12.6 16.8-11.7a17 17 0 0 1 15 13c2 7.5-.4 15-7.1 19.3-7.5 4.8-20.2 4.6-24.6-3.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M117.6 142.9c0-2.6-1.5-4.6-3.3-4.6-1.8 0-3.3 2-3.3 4.6 0 2.5 1.5 4.6 3.3 4.6 1.8 0 3.3-2 3.3-4.6Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-width="2.5" d="m87.9 122 .5 4m-8.7-.6 2 2.7m15.2-3.8-1.6 3m26.8-5.3-.5 4m8.8-.6-2 2.7m-15.2-3.8 1.6 3"/><path fill="#fff" fill-opacity=".5" d="M80 167.2c-.7 3-4.6 4.6-8.7 3.7-4.2-1-7-4-6.4-7 .7-3 4.6-4.7 8.8-3.7 4.1.9 7 4 6.3 7Zm50 0c.7 3 4.6 4.6 8.7 3.7 4.2-1 7-4 6.4-7-.7-3-4.6-4.7-8.8-3.7-4.1.9-7 4-6.3 7Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-width="3" d="M90.5 167.7s4.5 5.1 14.6 5.1c10 0 14.5-5.1 14.5-5.1"/></svg>';
} else if (faceVariant == Face.FaceVariants.PIXIE) {
// pixie
return
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none"><path fill="#fff" fill-opacity=".3" d="M105 121.4c-6.4 0-14.3-4-21-4.3-6.6-.4-13.5.9-19.1 4.6a29.3 29.3 0 0 0-11 29.8 39.8 39.8 0 0 0 19.8 25.7 59.8 59.8 0 0 0 30.5 7.8"/><path fill="#fff" fill-opacity=".3" d="M105 121.4c7 0 13.4-4 20-4.3 6.7-.4 13.6.9 19.2 4.6a29.3 29.3 0 0 1 11 29.8 39.8 39.8 0 0 1-19.8 25.7 62.1 62.1 0 0 1-31.2 7.8"/><path class="faceStrokeColor" stroke-width="2.8" d="M105 121.4c-6.4 0-14.3-4-21-4.3-6.6-.4-13.5.9-19.1 4.6a29.3 29.3 0 0 0-11 29.8 39.8 39.8 0 0 0 19.8 25.7 59.8 59.8 0 0 0 30.5 7.8"/><path class="faceStrokeColor" stroke-width="2.8" d="M105 121.4c7 0 13.4-4 20-4.3 6.7-.4 13.6.9 19.2 4.6a29.3 29.3 0 0 1 11 29.8 39.8 39.8 0 0 1-19.8 25.7 62.1 62.1 0 0 1-31.2 7.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 121.4c-6.4 0-14.3-4-21-4.3-6.6-.4-13.5.9-19.1 4.6a29.3 29.3 0 0 0-11 29.8 39.8 39.8 0 0 0 19.8 25.7 59.8 59.8 0 0 0 30.5 7.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 121.4c7 0 13.4-4 20-4.3 6.7-.4 13.6.9 19.2 4.6a29.3 29.3 0 0 1 11 29.8 39.8 39.8 0 0 1-19.8 25.7 62.1 62.1 0 0 1-31.2 7.8"/><path class="faceFillColor" fill-opacity=".5" d="M71.9 158.7h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm-2.2 2.2h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2z"/><path class="faceFillColor" fill-opacity=".5" d="M74.1 163.1h2.2v2.2h-2.2zm-4.4-4.4h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2zm-6.6 0h2.2v2.2h-2.2zm6.6-2.2h2.2v2.2h-2.2zm2.2 2.2h2.2v2.2h-2.2zm58.1-2.2h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm-2.2 2.2h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-4.4-4.4h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2zm-6.6 0h2.2v2.2H130zm6.6-2.2h2.2v2.2h-2.2zm2.2 2.2h2.2v2.2h-2.2z"/><path class="faceFillColor" d="M96 158.7h2.2v2.2H96zm2.2 0h2.2v2.2h-2.2zm2.2 2.2h2.2v2.2h-2.2z"/><path class="faceFillColor" d="M102.6 160.9h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm2.2 0h2.2v2.2H107zm2.2-2.2h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-23-5.5h2.2v2.2h-2.2zm-2.2-11h2.2v2.2h-2.2zm-2.2 3.3h2.2v2.2H84zm0 2.2h2.2v2.2H84zm8.8 0H95v2.2h-2.2zm-8.8 2.2h2.2v2.2H84zm8.8 0H95v2.2h-2.2zm-6.6-5.5h6.6v3.3h-6.6z"/><path class="faceFillColor" d="M86.2 147.7h6.6v2.2h-6.6zm0 2.2h6.6v3.3h-6.6zm6.6-4.4H95v2.2h-2.2zm-4.4-3.3h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-4.4 11h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2zm28.5 0h2.2v2.2h-2.2zm-2.2-11h2.2v2.2h-2.2zm-2.2 3.3h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm8.8 0h2.2v2.2h-2.2zm-8.8 2.2h2.2v2.2h-2.2zm8.8 0h2.2v2.2h-2.2zm-6.6-5.5h6.6v3.3h-6.6z"/><path class="faceFillColor" d="M116.9 147.7h6.6v2.2h-6.6zm0 2.2h6.6v3.3h-6.6zm6.6-4.4h2.2v2.2h-2.2zm-4.4-3.3h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-4.4 11h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2z"/></svg>';
'<path fill="#fff" fill-opacity=".3" d="M105 121.4c-6.4 0-14.3-4-21-4.3-6.6-.4-13.5.9-19.1 4.6a29.3 29.3 0 0 0-11 29.8 39.8 39.8 0 0 0 19.8 25.7 59.8 59.8 0 0 0 30.5 7.8"/><path fill="#fff" fill-opacity=".3" d="M105 121.4c7 0 13.4-4 20-4.3 6.7-.4 13.6.9 19.2 4.6a29.3 29.3 0 0 1 11 29.8 39.8 39.8 0 0 1-19.8 25.7 62.1 62.1 0 0 1-31.2 7.8"/><path class="faceStrokeColor" stroke-width="2.8" d="M105 121.4c-6.4 0-14.3-4-21-4.3-6.6-.4-13.5.9-19.1 4.6a29.3 29.3 0 0 0-11 29.8 39.8 39.8 0 0 0 19.8 25.7 59.8 59.8 0 0 0 30.5 7.8"/><path class="faceStrokeColor" stroke-width="2.8" d="M105 121.4c7 0 13.4-4 20-4.3 6.7-.4 13.6.9 19.2 4.6a29.3 29.3 0 0 1 11 29.8 39.8 39.8 0 0 1-19.8 25.7 62.1 62.1 0 0 1-31.2 7.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 121.4c-6.4 0-14.3-4-21-4.3-6.6-.4-13.5.9-19.1 4.6a29.3 29.3 0 0 0-11 29.8 39.8 39.8 0 0 0 19.8 25.7 59.8 59.8 0 0 0 30.5 7.8"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105 121.4c7 0 13.4-4 20-4.3 6.7-.4 13.6.9 19.2 4.6a29.3 29.3 0 0 1 11 29.8 39.8 39.8 0 0 1-19.8 25.7 62.1 62.1 0 0 1-31.2 7.8"/><path class="faceFillColor" fill-opacity=".5" d="M71.9 158.7h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm-2.2 2.2h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2z"/><path class="faceFillColor" fill-opacity=".5" d="M74.1 163.1h2.2v2.2h-2.2zm-4.4-4.4h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2zm-6.6 0h2.2v2.2h-2.2zm6.6-2.2h2.2v2.2h-2.2zm2.2 2.2h2.2v2.2h-2.2zm58.1-2.2h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm-2.2 2.2h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-4.4-4.4h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2zm-6.6 0h2.2v2.2H130zm6.6-2.2h2.2v2.2h-2.2zm2.2 2.2h2.2v2.2h-2.2z"/><path class="faceFillColor" d="M96 158.7h2.2v2.2H96zm2.2 0h2.2v2.2h-2.2zm2.2 2.2h2.2v2.2h-2.2z"/><path class="faceFillColor" d="M102.6 160.9h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm2.2 0h2.2v2.2H107zm2.2-2.2h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-23-5.5h2.2v2.2h-2.2zm-2.2-11h2.2v2.2h-2.2zm-2.2 3.3h2.2v2.2H84zm0 2.2h2.2v2.2H84zm8.8 0H95v2.2h-2.2zm-8.8 2.2h2.2v2.2H84zm8.8 0H95v2.2h-2.2zm-6.6-5.5h6.6v3.3h-6.6z"/><path class="faceFillColor" d="M86.2 147.7h6.6v2.2h-6.6zm0 2.2h6.6v3.3h-6.6zm6.6-4.4H95v2.2h-2.2zm-4.4-3.3h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-4.4 11h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2zm28.5 0h2.2v2.2h-2.2zm-2.2-11h2.2v2.2h-2.2zm-2.2 3.3h2.2v2.2h-2.2zm0 2.2h2.2v2.2h-2.2zm8.8 0h2.2v2.2h-2.2zm-8.8 2.2h2.2v2.2h-2.2zm8.8 0h2.2v2.2h-2.2zm-6.6-5.5h6.6v3.3h-6.6z"/><path class="faceFillColor" d="M116.9 147.7h6.6v2.2h-6.6zm0 2.2h6.6v3.3h-6.6zm6.6-4.4h2.2v2.2h-2.2zm-4.4-3.3h2.2v2.2h-2.2zm2.2 0h2.2v2.2h-2.2zm-4.4 11h2.2v2.2h-2.2zm4.4 0h2.2v2.2h-2.2z"/></svg>';
} else if (faceVariant == Face.FaceVariants.TODDLER) {
// toddler
return
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none"><path class="faceStrokeColor" stroke-linecap="round" stroke-width="3" d="M93 154.5s3.7 5.2 12 5.2 12-5.2 12-5.2"/><circle class="faceFillColor" cx="87.6" cy="142.4" r="4.6"/><circle class="faceFillColor" cx="122.4" cy="142.4" r="4.6"/><path fill="#fff" fill-opacity=".5" d="M78 156.2c-.7 3-4.6 4.6-8.8 3.7-4.1-1-7-4-6.3-7 .7-3 4.6-4.7 8.7-3.7 4.2.9 7 4 6.4 7Zm54 0c.7 3 4.6 4.6 8.7 3.7 4.2-1 7-4 6.3-7-.6-3-4.5-4.7-8.7-3.7-4.1.9-7 4-6.3 7Z"/></svg>';
'<path class="faceStrokeColor" stroke-linecap="round" stroke-width="3" d="M93 154.5s3.7 5.2 12 5.2 12-5.2 12-5.2"/><circle class="faceFillColor" cx="87.6" cy="142.4" r="4.6"/><circle class="faceFillColor" cx="122.4" cy="142.4" r="4.6"/><path fill="#fff" fill-opacity=".5" d="M78 156.2c-.7 3-4.6 4.6-8.8 3.7-4.1-1-7-4-6.3-7 .7-3 4.6-4.7 8.7-3.7 4.2.9 7 4 6.4 7Zm54 0c.7 3 4.6 4.6 8.7 3.7 4.2-1 7-4 6.3-7-.6-3-4.5-4.7-8.7-3.7-4.1.9-7 4-6.3 7Z"/></svg>';
} else if (faceVariant == Face.FaceVariants.VAMP) {
// vamp
return
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none"><path fill="#fff" fill-opacity=".5" d="M138.7 137.2c-.7 3 2 6.2 6.2 7.2 4.1 1 8-.6 8.8-3.5.7-3-2.1-6.2-6.2-7.2-4.2-1-8.1.6-8.8 3.5Zm-67.4 0c.7 3-2 6.2-6.2 7.2-4.1 1-8-.6-8.8-3.5-.7-3 2.1-6.2 6.2-7.2 4.2-1 8.1.6 8.8 3.5Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-width="3.5" d="M77 133s2.5-4.2 8.7-4.5A11 11 0 0 1 95 132m38 1s-2.5-4.2-8.7-4.5a11 11 0 0 0-9.3 3.6"/><path class="skinColorBase" d="M105.4 142.4c-4.6 0-10.1-2.2-14.8-2.4-4.7-.2-9.6.5-13.5 2.6a14.7 14.7 0 0 0-7.7 16.5c1.6 6.1 7.1 11.3 13.9 14.3 6.8 3 13.7 4.3 21.5 4.3"/><path class="skinColorBase" d="M105.4 142.4c4.8 0 9.3-2.2 14-2.4 4.7-.2 9.6.5 13.5 2.6a14.7 14.7 0 0 1 7.7 16.5c-1.6 6.1-7.1 11.3-13.9 14.3a54 54 0 0 1-22 4.3"/><path fill="#000" fill-opacity=".6" d="M105.4 142.4c-4.6 0-10.1-2.2-14.8-2.4-4.7-.2-9.6.5-13.5 2.6a14.7 14.7 0 0 0-7.7 16.5c1.6 6.1 7.1 11.3 13.9 14.3 6.8 3 13.7 4.3 21.5 4.3"/><path fill="#000" fill-opacity=".6" d="M105.4 142.4c4.8 0 9.3-2.2 14-2.4 4.7-.2 9.6.5 13.5 2.6a14.7 14.7 0 0 1 7.7 16.5c-1.6 6.1-7.1 11.3-13.9 14.3a54 54 0 0 1-22 4.3"/><path fill="#fff" class="faceStrokeColor" stroke-linejoin="round" stroke-width="2" d="m79 141.9 8.4-2.2s12.9 2.2 18 2.2 18.5-2.2 18.5-2.2l7.1 2.2a7 7 0 0 1 2 5.9c-.5 1.7-1 3.4-2 5l-1 1.6a1.8 1.8 0 0 1-3.2 0l-2.9-5c-5.8.3-13.2.6-18.9.6-5.7 0-13.1-.3-19-.6l-2.8 5a1.8 1.8 0 0 1-3.2 0l-1-1.7c-1-1.5-1.5-3.2-1.9-5A7 7 0 0 1 79 142Z"/><path fill="#FFDFE7" class="faceStrokeColor" stroke-width="2" d="M127 172.7c0 1.9-9.9 4.1-22 4.1a64 64 0 0 1-22-4c0-3.7 9.9-9 22-9s22 5.3 22 9Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105.4 142.4c-4.6 0-10.1-2.2-14.8-2.4-4.7-.2-9.6.5-13.5 2.6a14.7 14.7 0 0 0-7.7 16.5c1.6 6.1 7.1 11.3 13.9 14.3 6.8 3 13.7 4.3 21.5 4.3"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105.4 142.4c4.8 0 9.3-2.2 14-2.4 4.7-.2 9.6.5 13.5 2.6a14.7 14.7 0 0 1 7.7 16.5c-1.6 6.1-7.1 11.3-13.9 14.3a54 54 0 0 1-22 4.3"/><path class="faceStrokeColor" stroke-linecap="round" stroke-opacity=".1" stroke-width="2" d="M105 163.7v6.3"/></svg>';
'<path fill="#fff" fill-opacity=".5" d="M138.7 137.2c-.7 3 2 6.2 6.2 7.2 4.1 1 8-.6 8.8-3.5.7-3-2.1-6.2-6.2-7.2-4.2-1-8.1.6-8.8 3.5Zm-67.4 0c.7 3-2 6.2-6.2 7.2-4.1 1-8-.6-8.8-3.5-.7-3 2.1-6.2 6.2-7.2 4.2-1 8.1.6 8.8 3.5Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-width="3.5" d="M77 133s2.5-4.2 8.7-4.5A11 11 0 0 1 95 132m38 1s-2.5-4.2-8.7-4.5a11 11 0 0 0-9.3 3.6"/><path class="skinColorBase" d="M105.4 142.4c-4.6 0-10.1-2.2-14.8-2.4-4.7-.2-9.6.5-13.5 2.6a14.7 14.7 0 0 0-7.7 16.5c1.6 6.1 7.1 11.3 13.9 14.3 6.8 3 13.7 4.3 21.5 4.3"/><path class="skinColorBase" d="M105.4 142.4c4.8 0 9.3-2.2 14-2.4 4.7-.2 9.6.5 13.5 2.6a14.7 14.7 0 0 1 7.7 16.5c-1.6 6.1-7.1 11.3-13.9 14.3a54 54 0 0 1-22 4.3"/><path fill="#000" fill-opacity=".6" d="M105.4 142.4c-4.6 0-10.1-2.2-14.8-2.4-4.7-.2-9.6.5-13.5 2.6a14.7 14.7 0 0 0-7.7 16.5c1.6 6.1 7.1 11.3 13.9 14.3 6.8 3 13.7 4.3 21.5 4.3"/><path fill="#000" fill-opacity=".6" d="M105.4 142.4c4.8 0 9.3-2.2 14-2.4 4.7-.2 9.6.5 13.5 2.6a14.7 14.7 0 0 1 7.7 16.5c-1.6 6.1-7.1 11.3-13.9 14.3a54 54 0 0 1-22 4.3"/><path fill="#fff" class="faceStrokeColor" stroke-linejoin="round" stroke-width="2" d="m79 141.9 8.4-2.2s12.9 2.2 18 2.2 18.5-2.2 18.5-2.2l7.1 2.2a7 7 0 0 1 2 5.9c-.5 1.7-1 3.4-2 5l-1 1.6a1.8 1.8 0 0 1-3.2 0l-2.9-5c-5.8.3-13.2.6-18.9.6-5.7 0-13.1-.3-19-.6l-2.8 5a1.8 1.8 0 0 1-3.2 0l-1-1.7c-1-1.5-1.5-3.2-1.9-5A7 7 0 0 1 79 142Z"/><path fill="#FFDFE7" class="faceStrokeColor" stroke-width="2" d="M127 172.7c0 1.9-9.9 4.1-22 4.1a64 64 0 0 1-22-4c0-3.7 9.9-9 22-9s22 5.3 22 9Z"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105.4 142.4c-4.6 0-10.1-2.2-14.8-2.4-4.7-.2-9.6.5-13.5 2.6a14.7 14.7 0 0 0-7.7 16.5c1.6 6.1 7.1 11.3 13.9 14.3 6.8 3 13.7 4.3 21.5 4.3"/><path class="faceStrokeColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M105.4 142.4c4.8 0 9.3-2.2 14-2.4 4.7-.2 9.6.5 13.5 2.6a14.7 14.7 0 0 1 7.7 16.5c-1.6 6.1-7.1 11.3-13.9 14.3a54 54 0 0 1-22 4.3"/><path class="faceStrokeColor" stroke-linecap="round" stroke-opacity=".1" stroke-width="2" d="M105 163.7v6.3"/></svg>';
} else {
revert(); // Avoid warnings.
}

View File

@@ -13,6 +13,16 @@ import {HeadwearGlasses} from './Headwear/HeadwearGlasses.sol';
import {HeadwearMushroom} from './Headwear/HeadwearMushroom.sol';
import {HeadwearNightcap} from './Headwear/HeadwearNightcap.sol';
import {HeadwearPartyhat} from './Headwear/HeadwearPartyhat.sol';
import {HeadwearBear} from './Headwear/HeadwearBear.sol';
import {HeadwearBee} from './Headwear/HeadwearBee.sol';
import {HeadwearBirdie} from './Headwear/HeadwearBirdie.sol';
import {HeadwearBrains} from './Headwear/HeadwearBrains.sol';
import {HeadwearBull} from './Headwear/HeadwearBull.sol';
import {HeadwearEarrings} from './Headwear/HeadwearEarrings.sol';
import {HeadwearLotus} from './Headwear/HeadwearLotus.sol';
import {HeadwearMajor} from './Headwear/HeadwearMajor.sol';
import {HeadwearScout} from './Headwear/HeadwearScout.sol';
import {HeadwearShaman} from './Headwear/HeadwearShaman.sol';
library Headwear {
enum HeadwearVariants {
@@ -27,14 +37,22 @@ library Headwear {
MUSHROOM,
NIGHTCAP,
PARTYHAT,
ICECREAM
ICECREAM,
BEAR,
BEE,
BIRDIE,
BRAINS,
BULL,
EARRINGS,
LOTUS,
MAJOR,
SCOUT,
SHAMAN
}
enum HeadwearColors {
NONE,
GREEN,
LIGHT,
DARK,
PURPLE,
BLUE,
PINK,
@@ -91,7 +109,7 @@ library Headwear {
} else if (variant == HeadwearVariants.SPARKLES) {
return
HeadwearSparkles.getSparkles(
isGold ? HeadwearSparkles.SparklesColors.GOLD : HeadwearSparkles.SparklesColors.LIGHT
isGold ? HeadwearSparkles.SparklesColors.GOLD : HeadwearSparkles.SparklesColors.NONE
);
} else if (variant == HeadwearVariants.CROWN) {
HeadwearCrown.CrownColors crownColor = isGold
@@ -140,6 +158,80 @@ library Headwear {
uint8(type(HeadwearPartyhat.PartyhatColors).max)
);
return HeadwearPartyhat.getPartyhat(partyhatColor);
} else if (variant == HeadwearVariants.BEAR) {
HeadwearBear.BearColors bearColor = isGold
? HeadwearBear.BearColors.GOLD
: HeadwearBear.BearColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) % uint8(type(HeadwearBear.BearColors).max)
);
return HeadwearBear.getBear(bearColor);
} else if (variant == HeadwearVariants.BEE) {
HeadwearBee.BeeColors beeColor = isGold
? HeadwearBee.BeeColors.GOLD
: HeadwearBee.BeeColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) % uint8(type(HeadwearBee.BeeColors).max)
);
return HeadwearBee.getBee(beeColor);
} else if (variant == HeadwearVariants.BIRDIE) {
HeadwearBirdie.BirdieColors birdieColor = isGold
? HeadwearBirdie.BirdieColors.GOLD
: HeadwearBirdie.BirdieColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) %
uint8(type(HeadwearBirdie.BirdieColors).max)
);
return HeadwearBirdie.getBirdie(birdieColor);
} else if (variant == HeadwearVariants.BRAINS) {
HeadwearBrains.BrainsColors brainsColor = isGold
? HeadwearBrains.BrainsColors.GOLD
: HeadwearBrains.BrainsColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) %
uint8(type(HeadwearBrains.BrainsColors).max)
);
return HeadwearBrains.getBrains(brainsColor);
} else if (variant == HeadwearVariants.BULL) {
HeadwearBull.BullColors bullColor = isGold
? HeadwearBull.BullColors.GOLD
: HeadwearBull.BullColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) % uint8(type(HeadwearBull.BullColors).max)
);
return HeadwearBull.getBull(bullColor);
} else if (variant == HeadwearVariants.EARRINGS) {
HeadwearEarrings.EarringsColors earringsColor = isGold
? HeadwearEarrings.EarringsColors.GOLD
: HeadwearEarrings.EarringsColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) %
uint8(type(HeadwearEarrings.EarringsColors).max)
);
return HeadwearEarrings.getEarrings(earringsColor);
} else if (variant == HeadwearVariants.LOTUS) {
HeadwearLotus.LotusColors lotusColor = isGold
? HeadwearLotus.LotusColors.GOLD
: HeadwearLotus.LotusColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) % uint8(type(HeadwearLotus.LotusColors).max)
);
return HeadwearLotus.getLotus(lotusColor);
} else if (variant == HeadwearVariants.MAJOR) {
HeadwearMajor.MajorColors majorColor = isGold
? HeadwearMajor.MajorColors.GOLD
: HeadwearMajor.MajorColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) % uint8(type(HeadwearMajor.MajorColors).max)
);
return HeadwearMajor.getMajor(majorColor);
} else if (variant == HeadwearVariants.SCOUT) {
HeadwearScout.ScoutColors scoutColor = isGold
? HeadwearScout.ScoutColors.GOLD
: HeadwearScout.ScoutColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) % uint8(type(HeadwearScout.ScoutColors).max)
);
return HeadwearScout.getScout(scoutColor);
} else if (variant == HeadwearVariants.SHAMAN) {
HeadwearShaman.ShamanColors shamanColor = isGold
? HeadwearShaman.ShamanColors.GOLD
: HeadwearShaman.ShamanColors(
Helpers.getColor(seed, Helpers.ComponentBytes.HEADWEAR) %
uint8(type(HeadwearShaman.ShamanColors).max)
);
return HeadwearShaman.getShaman(shamanColor);
} else {
revert(); // Avoid warnings.
}

View File

@@ -10,8 +10,6 @@ library HeadwearBeanie {
PINK,
PURPLE,
BLUE,
LIGHT,
DARK,
GOLD
}
@@ -49,10 +47,6 @@ library HeadwearBeanie {
return LensColors.lightBlue;
} else if (beanieColor == BeanieColors.PURPLE) {
return LensColors.lightPurple;
} else if (beanieColor == BeanieColors.LIGHT) {
return LensColors.white;
} else if (beanieColor == BeanieColors.DARK) {
return LensColors.dark;
} else if (beanieColor == BeanieColors.GOLD) {
return LensColors.lightGold;
} else {
@@ -67,10 +61,6 @@ library HeadwearBeanie {
return Headwear.HeadwearColors.PINK;
} else if (beanieColor == BeanieColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (beanieColor == BeanieColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (beanieColor == BeanieColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (beanieColor == BeanieColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (beanieColor == BeanieColors.GOLD) {

View File

@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearBear {
enum BearColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getBear(
BearColors bearColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getBearStyle(bearColor),
'<path class="headwearColorL" d="M205.8 92.3a35 35 0 0 0 14.5 13.8c-9.6-3.6-23-5.1-41.4-8-18-2.8-36.8-3.7-55.2-3.7-18.5 0-37.2.9-55.2 3.7-18.4 2.9-31.8 4.4-41.5 8a34.4 34.4 0 0 0 14.5-13.8c3-5.5 13.6-21 13.6-21S58.6 51.9 71.7 46c15.1-6.7 28 3.6 28 3.6s17.5-2.4 24-2.4c6.4 0 23.9 2.4 23.9 2.4s14.8-10.9 30.2-3.6c11.7 3.6 14.5 25.4 14.5 25.4s10.6 15.4 13.5 21Z"/><path class="headwearColorL" d="M241.2 115.7c2.6 2.8 4.3 6.6 3.6 10.4.5-3.3-2.7-5.8-5.7-7.3-8.7-4.6-18.3-3.4-27.9-5.6-28.8-6.5-61-10-87.5-10-26.6 0-58.8 3.5-87.6 10-9.6 2.2-19.3 2.6-28 7.1-3 1.5-6 2.6-5.5 5.8-.8-3.7.7-7.9 3.3-10.6 2.5-2.6 9-4.6 21-8.7 9.7-3.3 23.2-4.8 41.6-7.4a374.7 374.7 0 0 1 110.4 0c18.3 2.6 31.9 3.8 41.6 7 12 4.2 18.2 6.8 20.7 9.3Z"/><path class="hwStr1" stroke-width="4" d="M123.7 104.5c-26.6 0-58.8 2.9-87.6 7.9a140 140 0 0 0-27.9 7.1c-3 1.2-6.1 3.1-5.6 5.7.3 1.5 5 5.3 19.2 7.2m101.9-27.9c26.5 0 58.7 2.9 87.5 7.9a140 140 0 0 1 28 7.1c2.9 1.2 6 3.1 5.6 5.7-.4 1.5-5 5.3-19.3 7.2"/><path class="hwStr1" stroke-width="4" d="M2.6 123.1s0 0 0 0c-.8-3 1-6.2 3.6-8.4 2.5-2 8.7-5.3 20.8-8.6m217.8 17s0 0 0 0c.7-3-1-6.2-3.6-8.4-2.5-2-8.7-5.3-20.9-8.6"/><path class="headwearColorL" d="M4.5 124.7c-2-2.6 17.4-7.4 17.4-7.4s-1.3 4-1.8 6.8c-.3 2.3-.4 6-.4 6s-12-1.3-15.2-5.4Zm238.4 0c2-2.6-17.4-7.4-17.4-7.4s1.3 4 1.7 6.8c.4 2.3.5 6 .5 6s12-1.3 15.2-5.4Z"/><path fill="#000" fill-opacity=".3" d="M4.5 124.7c-2-2.6 17.4-7.4 17.4-7.4s-1.3 4-1.8 6.8c-.3 2.3-.4 6-.4 6s-12-1.3-15.2-5.4Zm238.4 0c2-2.6-17.4-7.4-17.4-7.4s1.3 4 1.7 6.8c.4 2.3.5 6 .5 6s12-1.3 15.2-5.4Z"/><path class="hwStr1" stroke-width="3" d="M27 106.6c9.7-2.7 23.1-5.4 41.5-7.5a476 476 0 0 1 110.4 0c18.3 2.1 31.8 4.8 41.4 7.5"/><path stroke="#000" stroke-dasharray="9 9" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".2" stroke-width="2.5" d="M37.5 98.7c8.3-1.8 18.5-3.5 31-5a476 476 0 0 1 110.4 0c12.9 1.5 23.4 3.3 31.8 5.1"/><path class="headwearColorB" d="M172.6 53.5a27 27 0 0 1 10.8 13.8c-8.9-4.8-18-9-27.5-12.4 4.2-4.3 11.5-4.4 16.7-1.4Z"/><path fill="#000" d="M98.6 60a2.1 2.1 0 1 1 0 4.1 2.1 2.1 0 0 1 0-4.2Z"/><path class="headwearColorB" d="M74.8 53.5c5.2-3 12.4-2.9 16.6 1.4C82 58.3 72.8 62.5 64 67.3a26.5 26.5 0 0 1 10.8-13.8Z"/><path class="hwStr1" stroke-width="3" d="M64 67.3c8.8-4.8 18-9 27.4-12.4-4.2-4.3-11.4-4.4-16.6-1.4-5.2 3-8.7 8.3-10.8 13.8Z"/><path class="hwStr1" stroke-width="4" d="M27 106s0 0 0 0a34.4 34.4 0 0 0 14.5-13.7c3-5.5 5.4-11.4 9.2-16.2 1.5-1.8 3.1-3.4 4.9-4.9A27.5 27.5 0 0 1 70.4 46a27.5 27.5 0 0 1 29 3.8 60 60 0 0 1 24-4m97 60.3s0 0 0 0a34.4 34.4 0 0 1-14.6-13.8c-3-5.5-5.3-11.4-9.2-16.2a33 33 0 0 0-4.7-4.7c.3-10.3-5.6-21-15-25.4a27.5 27.5 0 0 0-29 3.8 60 60 0 0 0-24-4"/><path class="hwStr1" stroke-width="3" d="M183.4 67.3c-8.9-4.8-18-9-27.5-12.4 4.2-4.3 11.5-4.4 16.7-1.4a27 27 0 0 1 10.8 13.8Z"/><path fill="#fff" d="M123.7 68c1.1-.9 2.3-1.7 3-2.6.2-.3.4-.6.4-1 0-.6-1-1.3-1.6-1.4-.6-.2-1.2-.1-1.8-.1h-1.9c-.6.2-1.5.9-1.5 1.5 0 .4.2.7.4 1 .7.9 1.8 1.7 3 2.5Zm15.1 3.7c.5 3.2-2 6.3-5 7.6a22 22 0 0 1-9.6 1h-1c-3.3.2-6.7.2-9.7-1-3-1.3-5.5-4.4-5-7.6a7 7 0 0 1 4.3-5.2 11 11 0 0 1 3.8-6.4c2-1.6 4.4-2.5 7-2.6h.2c2.5.1 5 1 7 2.6a11 11 0 0 1 3.7 6.4 7 7 0 0 1 4.3 5.2Z"/><path class="headwearColorB" d="M127 64.4c0 .4-.1.7-.4 1-.6.9-1.8 1.7-3 2.5-1-.8-2.2-1.6-2.9-2.5-.2-.3-.4-.6-.4-1 0-.6.9-1.3 1.5-1.4.7-.2 1.2-.1 1.9-.1h1.8c.6.2 1.6.9 1.6 1.5Z"/><path class="hwStr1" stroke-width="4" d="M96.5 64a2.1 2.1 0 1 1 4.2 0 2.1 2.1 0 0 1-4.2 0Z"/><path class="hwStr1" stroke-width="3" d="M123.5 57.5c-2.5.1-5 1-6.9 2.6a11 11 0 0 0-3.8 6.4 7 7 0 0 0-4.3 5.2c-.5 3.2 2 6.3 5 7.6 3 1.2 6.4 1.2 9.6 1"/><path class="hwStr1" stroke-width="3" d="M123.7 73.7c-2.1.8-4.9-.3-6-2.2m6-8.6h-1.9c-.6.2-1.5.9-1.5 1.5 0 .4.2.7.4 1 .7.9 1.8 1.7 3 2.5"/><path fill="#000" class="hwStr1" stroke-width="4" d="M150.8 64a2.1 2.1 0 1 0-4.2 0 2.1 2.1 0 0 0 4.2 0Z"/><path class="hwStr1" stroke-width="3" d="M123.8 57.5c2.5.1 5 1 7 2.6a11 11 0 0 1 3.7 6.4 7 7 0 0 1 4.3 5.2c.5 3.2-2 6.3-5 7.6a22 22 0 0 1-9.6 1"/><path class="hwStr1" stroke-width="3" d="M123.7 62.9h1.8c.6.2 1.6.9 1.6 1.5 0 .4-.2.7-.5 1-.6.9-1.8 1.7-3 2.5v5.8c2.2.8 5-.3 6-2.2"/></svg>'
),
Headwear.HeadwearVariants.BEAR,
_getHeadwearColor(bearColor)
);
}
function _getBearStyle(BearColors bearColor) internal pure returns (string memory) {
(string memory lightColor, string memory baseColor) = _getBearColor(bearColor);
return
string.concat(
'<style>.headwearColorL { fill:',
lightColor,
'}.headwearColorB { fill:',
baseColor,
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getBearColor(BearColors bearColor) internal pure returns (string memory, string memory) {
if (bearColor == BearColors.GREEN) {
return (LensColors.lightGreen, LensColors.baseGreen);
} else if (bearColor == BearColors.PURPLE) {
return (LensColors.lightPurple, LensColors.basePurple);
} else if (bearColor == BearColors.BLUE) {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (bearColor == BearColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (bearColor == BearColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(BearColors bearColor) internal pure returns (Headwear.HeadwearColors) {
if (bearColor == BearColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (bearColor == BearColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (bearColor == BearColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (bearColor == BearColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (bearColor == BearColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearBee {
enum BeeColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getBee(
BeeColors beeColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getBeeStyle(beeColor),
'<path class="headwearColorB" d="m158.7 77 .3.3a35.6 35.6 0 0 1-8 5.6l-.1-.9c0-7-2.3-14-6.6-19.5v-.2c2.5-.7 4.9-1.8 7-3.3 4.3 4.8 7 10.3 7.4 18Z"/><path class="headwearColorL" d="M151 82.9a37 37 0 0 1-9.1 3l-.2-1.3c0-8-3-16.1-8.2-22.2l-.7-.3a21 21 0 0 1 8-2.6h.6a27 27 0 0 1-.6 3.4c1.2-.1 2.3-.3 3.4-.6v.2A31.8 31.8 0 0 1 151 82v.9Z"/><path class="headwearColorB" d="m141.7 84.6.2 1.3c-2 .3-4 .3-6 0a16 16 0 0 1-5.4-1.9l1.8-.2c.7-5.9-1-12-4.6-16.6l-.4-.3a21 21 0 0 1 5.5-4.8l.7.3a34.2 34.2 0 0 1 8.2 22.2Z"/><path class="headwearColorL" d="M130.5 84c-2.2-1.2-4-3-5.2-5.1a11.2 11.2 0 0 1-1.1-7.7h.5a19 19 0 0 1 2.6-4.3l.4.3a22.6 22.6 0 0 1 4.6 16.6l-1.8.2Z"/><path fill="#fff" d="M140.9 59.5a19.6 19.6 0 0 0-13.6 7.4 19 19 0 0 0-2.6 4.3h-.5a9.2 9.2 0 0 1 2.3-4.5 8.4 8.4 0 0 1-3-9.7 10 10 0 0 1 7.8-6.3 13 13 0 0 1 10 2.9c0-4.2.1-8.4 2.5-11.4l1.4-1.4.3.2a18 18 0 0 0-3.6 10.4c-.2 2.7-.2 5.4-.5 8.2h-.5Z"/><path fill="#fff" d="m140.8 62.9.6-3.3c.3-2.8.3-5.5.5-8.2a18 18 0 0 1 3.6-10.4l-.3-.2a9.2 9.2 0 0 1 9.7-1c3.3 1.8 5 5.6 4.5 9.2h-.3a21.7 21.7 0 0 1-18.3 13.9Z"/><path class="headwearColorL" d="M159 50.5c3.3.7 6 2.5 7.5 5.1 1.5 2.6 1.7 5.7 1 8.6-.6 2.8-2 5.5-3.8 7.9a35 35 0 0 1-4.7 5.2l-.3-.4c-.4-7.6-3-13.1-7.4-18a21 21 0 0 0 7.8-10l.3.1-.3 1.5Zm2.7 8.9c.1-.5-.6-1.4-1.1-1-.5.2-.6 1-.2 1.3.3.4 1.1.2 1.3-.3Z"/><path class="hwStr1" stroke-width="4" d="M49.9 86.4a15.2 15.2 0 0 1 .4-5.3m2.7-5.3 2.4-3.8m5.2-4c1-1 2.4-1.8 3.8-2.3m7-1.2c1.3-.4 2.8-.3 4.1 0m7.3 2.5 3.5 2.1m7 4 4 2m7.5 1.3c1.8.4 3.6.6 5.4.5m48.8.4a35 35 0 0 0 4.7-5.2c1.7-2.4 3.2-5 3.8-8 .7-2.8.5-6-1-8.5a11 11 0 0 0-7.4-5.1l.3-1.5a9.2 9.2 0 0 0-4.5-9.2 9.2 9.2 0 0 0-11.1 2.4c-2.4 3-2.5 7.2-2.5 11.4a13 13 0 0 0-10-2.9c-3.5.6-6.7 3-7.9 6.3a8.4 8.4 0 0 0 3.1 9.7 9.2 9.2 0 0 0-2.3 4.5c-.6 2.5-.2 5.4 1 7.7 1.3 2.2 3.1 3.9 5.3 5.1a16 16 0 0 0 5.4 1.9c2 .3 4 .3 6 0a28.2 28.2 0 0 0 9-3c3-1.5 5.7-3.4 8.1-5.6Z"/><path class="hwStr1" stroke-width="3" d="m145.6 40.8-.1.2a18 18 0 0 0-3.6 10.4c-.2 2.7-.2 5.4-.5 8.2a27 27 0 0 1-.6 3.3 21.9 21.9 0 0 0 18.3-14m-34.4 22.3a20.4 20.4 0 0 1 16.2-11.7"/><path class="hwStr1" stroke-width="3" d="M142 61.3c3.6-3.2 6.4-7.2 8.4-11.5M131.2 58c1.5 1 3.2 1.7 5 2.1m-8.5 7.1a22.6 22.6 0 0 1 4.6 16.6m1.2-21.4a34.2 34.2 0 0 1 8.2 22.2m2.6-22.1a31.8 31.8 0 0 1 6.6 19.5m.4-23s0 0 0 0c4.3 4.8 7 10.3 7.4 18"/><path fill="#000" d="M160.6 58.3c-.5.3-.6 1-.2 1.4.3.4 1.1.2 1.3-.3.1-.5-.6-1.4-1.1-1Z"/><path class="hwStr1" stroke-width="3" d="M160.6 58.3c-.5.3-.6 1-.2 1.4.3.4 1.1.2 1.3-.3.1-.5-.6-1.4-1.1-1Z"/></svg>'
),
Headwear.HeadwearVariants.BEE,
_getHeadwearColor(beeColor)
);
}
function _getBeeStyle(BeeColors beeColor) internal pure returns (string memory) {
(string memory lightColor, string memory baseColor) = _getBeeColor(beeColor);
return
string.concat(
'<style>.headwearColorL { fill:',
lightColor,
'}.headwearColorB { fill:',
baseColor,
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getBeeColor(BeeColors beeColor) internal pure returns (string memory, string memory) {
if (beeColor == BeeColors.GREEN) {
return (LensColors.lightGreen, LensColors.baseGreen);
} else if (beeColor == BeeColors.PURPLE) {
return (LensColors.lightPurple, LensColors.basePurple);
} else if (beeColor == BeeColors.BLUE) {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (beeColor == BeeColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (beeColor == BeeColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(BeeColors beeColor) internal pure returns (Headwear.HeadwearColors) {
if (beeColor == BeeColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (beeColor == BeeColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (beeColor == BeeColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (beeColor == BeeColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (beeColor == BeeColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearBirdie {
enum BirdieColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getBirdie(
BirdieColors birdieColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getBirdieStyle(birdieColor),
'<path fill="#fff" d="M130.8 106.3c.3 6.9-2.9 11.5-7.2 13.8a62.3 62.3 0 0 1-18 2.2c-6.4 0-12.2-.5-18-2.2-4.2-2.3-7.4-7-7-13.8.1-6 3.5-11.8 8-15.7a27 27 0 0 1 17-5.9 27 27 0 0 1 17 5.9c4.6 4 8 9.7 8.2 15.7Z"/><path class="headwearColorB" d="M110.6 26.7a6.7 6.7 0 0 1-4.8 6.6h-.3a6.7 6.7 0 0 1-4.7-6.6 7.3 7.3 0 0 1 4.9-6.5c2.7.9 4.8 3.6 4.9 6.5Z"/><path class="headwearColorL" d="M105.8 33.3a14.8 14.8 0 0 1 12.9 7.5c1 1.8 1.4 3.8 1.4 5.8l.2 15.5c9 2.7 17.3 9.5 21.8 17.7a28 28 0 0 1 0 27 30.4 30.4 0 0 1-18.4 13.3c4.2-2.3 7.4-7 7.1-13.8-.2-6-3.6-11.8-8.1-15.7a27 27 0 0 0-17-5.9 27 27 0 0 0-17 5.9c-4.6 4-8 9.7-8.2 15.7-.3 6.9 3 11.5 7.2 13.8l-2.4-.7a30.4 30.4 0 0 1-16-12.7 28 28 0 0 1 0-26.9c4.4-8.2 12.8-15 21.7-17.7l.2-15.5c0-2 .5-4 1.5-5.8a14.4 14.4 0 0 1 12.8-7.5h.3Z"/><path class="hwStr1" stroke-width="4" d="M105.5 33.3h.2m0-13.1a7.3 7.3 0 0 0-5 6.5 6.7 6.7 0 0 0 4.8 6.6"/><path class="hwStr1" stroke-width="3" d="M87.7 120.1c-4.3-2.3-7.5-7-7.2-13.8.2-6 3.6-11.8 8.2-15.7a27 27 0 0 1 17-5.9"/><path class="hwStr1" stroke-width="4" d="M105.8 33.3h-.1m0-13.1c2.7.9 4.8 3.6 4.9 6.5a6.7 6.7 0 0 1-4.8 6.6"/><path class="hwStr1" stroke-width="4" d="M105.7 33.3h-.2a14.4 14.4 0 0 0-12.8 7.5c-1 1.8-1.4 3.8-1.5 5.8v8.9c-.1 3.9-2.7 7.2-6.2 9a38.1 38.1 0 0 0-15.7 15.3 28 28 0 0 0 0 27A30.4 30.4 0 0 0 87.6 120a62.3 62.3 0 0 0 18 2.2m0-89h.1a14.8 14.8 0 0 1 12.9 7.5c1 1.8 1.4 3.8 1.4 5.8l.1 8.9c0 3.9 2.7 7.2 6.1 9A38.2 38.2 0 0 1 142 79.7a28 28 0 0 1 0 27 30.4 30.4 0 0 1-18.4 13.3 62.3 62.3 0 0 1-18 2.2"/><path class="hwStr1" stroke-width="3" d="M123.7 120.1c4.2-2.3 7.4-7 7.1-13.8-.2-6-3.6-11.8-8.1-15.7a27 27 0 0 0-17-5.9"/><path class="headwearColorB" d="m111.8 53.3-.3.3-5.9 3.4-6-3.4-.2-.3c2-1.7 4-3.1 6.2-4.7 2.2 1.6 4.2 3 6.2 4.7Z"/><path class="headwearColorB" d="M105.6 63.6c-2.4-2.7-5-6.5-7.1-9.5l1-.8.2.3 6 3.4 5.8-3.4.3-.3 1 .8c-2.1 3-4.8 6.8-7.2 9.5Z"/><path class="hwStr1" stroke-width="3" d="M108 50.4a4 4 0 0 0-4.8 0l-3.8 2.9v0c-.5.4-.6 1.2-.2 1.8a94 94 0 0 0 6.4 8.5"/><path class="hwStr1" stroke-width="3" d="M103.2 50.4a4 4 0 0 1 4.8 0l3.8 2.9v0c.5.4.6 1.2.2 1.8a93 93 0 0 1-6.4 8.5"/><path class="hwStr1" stroke-width="2.5" d="m99.7 53.6 6 3.4 5.8-3.4"/><circle cx="99.7" cy="45.1" r="2" fill="#000"/><circle cx="111.7" cy="45.1" r="2" fill="#000"/></svg>'
),
Headwear.HeadwearVariants.BIRDIE,
_getHeadwearColor(birdieColor)
);
}
function _getBirdieStyle(BirdieColors birdieColor) internal pure returns (string memory) {
(string memory lightColor, string memory baseColor) = _getBirdieColor(birdieColor);
return
string.concat(
'<style>.headwearColorL { fill:',
lightColor,
'}.headwearColorB { fill:',
baseColor,
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getBirdieColor(BirdieColors birdieColor) internal pure returns (string memory, string memory) {
if (birdieColor == BirdieColors.GREEN) {
return (LensColors.lightGreen, LensColors.baseGreen);
} else if (birdieColor == BirdieColors.PURPLE) {
return (LensColors.lightPurple, LensColors.basePurple);
} else if (birdieColor == BirdieColors.BLUE) {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (birdieColor == BirdieColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (birdieColor == BirdieColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(BirdieColors birdieColor) internal pure returns (Headwear.HeadwearColors) {
if (birdieColor == BirdieColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (birdieColor == BirdieColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (birdieColor == BirdieColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (birdieColor == BirdieColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (birdieColor == BirdieColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -0,0 +1,70 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearBrains {
enum BrainsColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getBrains(
BrainsColors brainsColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getBrainsStyle(brainsColor),
'<path fill="#fff" d="M151 95.3c.5 3.3-.6 6.7-3.2 8.7a13 13 0 0 1-3.5 2 211 211 0 0 1-38.5 3.6h-.2c-9.7 0-33.8-1.7-38.6-3.6a13 13 0 0 1-3.5-2 9.2 9.2 0 0 1-3.1-8.7l.5-3c.4 1.1 2 2 4.5 2.7a63 63 0 0 0 9.6 1.6 406.9 406.9 0 0 0 30.6 1.3h.2a407.3 407.3 0 0 0 30.6-1.3c3.7-.4 7-1 9.5-1.6 2.5-.7 4.2-1.6 4.5-2.7l.5 3Z"/><path class="headwearColorL" d="M138.7 81.1c4 3.2 6.6 8 7 13l.2.9a62 62 0 0 1-9.5 1.6l-.1-.8a19 19 0 0 0-4.8-8.6l-1 .5c-3.4 1.9-6.1 5-7.3 8.8v1c-7.1.4-13.9.4-17.4.4h-.2c-3.6 0-10.3 0-17.5-.3v-1.1c-1.1-3.7-3.8-7-7.3-8.8l-1-.5a19 19 0 0 0-4.7 8.6l-.1.8c-3.7-.4-7-1-9.6-1.6l.3-1c.3-5 3-9.7 7-12.9h-.1a13.5 13.5 0 0 1 11.8-15v.3c.3 1.8.2 3.7-.2 5.7h.4a17 17 0 0 1 7.7 9.4h.2a21 21 0 0 1 12-.2h2.3a21 21 0 0 1 12 .1h.2c1.4-3.8 4.1-7.3 7.7-9.3h.4a22 22 0 0 1-.2-5.7v-.3a15 15 0 0 1 9 5c2.2 2.8 3.3 6.5 2.8 10Z"/><path class="headwearColorL" d="m136.3 95.8.1.8c-4.1.5-8.7.8-13.2 1v-1.1c1.2-3.7 3.9-7 7.3-8.8l1-.5a19 19 0 0 1 4.8 8.6Zm-30.7-33h.2a20.7 20.7 0 0 1 20.8 3.3h.3v.3a22 22 0 0 0 .2 5.7h-.4c-3.6 2-6.3 5.5-7.7 9.4h-.1a21 21 0 0 0-12.1-.2h-2.2a21 21 0 0 0-12.1.1h-.2c-1.3-3.8-4-7.3-7.7-9.3h-.4c.4-2 .5-3.9.2-5.7v-.3h.4c5.4-4.8 14-6 20.8-3.3ZM88.2 96.5v1c-4.5-.1-9.1-.4-13.2-.9v-.8a19 19 0 0 1 4.9-8.6l1 .5c3.4 1.9 6 5 7.3 8.8Z"/><path class="hwStr1" stroke-width="4" d="M65.7 94a18.5 18.5 0 0 1 9.5-14.6"/><path class="hwStr1" stroke-width="4" d="M72.6 81.1a13.5 13.5 0 0 1 11.8-15h.4c5.4-4.8 14-6 20.8-3.3h-.2m-9.9 7.4c2.9 2.1 6.5 3.2 10 3.1"/><path class="hwStr1" stroke-width="4" d="M84.4 66.4c.3 1.8.2 3.7-.2 5.7l-3.3 3.2m3.7-3.3a17.2 17.2 0 0 1 8.5 13.5m-.6-4.1a21 21 0 0 1 12 0m-6.8 8.8a12 12 0 0 0-3.4 6.5m-6.1-.2c-1.2-3.7-4-7-7.4-8.8"/><path class="hwStr1" stroke-width="4" d="M86.2 82.8a19 19 0 0 0-11.1 13m70.6-1.8a18.5 18.5 0 0 0-9.5-14.6"/><path class="hwStr1" stroke-width="4" d="M138.7 81.1a13.6 13.6 0 0 0-11.8-15h-.3c-5.4-4.8-14.1-6-20.8-3.3h.2m9.8 7.4a16.3 16.3 0 0 1-10 3.1"/><path class="hwStr1" stroke-width="4" d="M126.9 66.4a22 22 0 0 0 .2 5.7l3.3 3.2m-3.7-3.3a17.3 17.3 0 0 0-8.5 13.5"/><path class="hwStr1" stroke-width="4" d="M118.9 81.4a21 21 0 0 0-12.1 0m6.8 8.8c1.8 1.7 3 4 3.4 6.5m6.2-.2c1.2-3.7 3.9-7 7.3-8.8"/><path class="hwStr1" stroke-width="4" d="M125.1 82.8a19 19 0 0 1 11.2 13m-30.5-33V98M61 92.3c.3 1.1 2 2 4.4 2.7a63 63 0 0 0 9.6 1.6 415.4 415.4 0 0 0 30.8 1.3"/><path class="hwStr1" stroke-width="4" d="M150.4 92.3c-.3 1.1-2 2-4.5 2.7a62 62 0 0 1-9.5 1.6 407.3 407.3 0 0 1-30.6 1.3"/><g clip-path="url(#a)"><path fill="#fff" fill-opacity=".3" d="M105.4 47C80.4 47 60 64.8 60 86.4c0 2.3.2 4 .6 6 .4 1.1 2 2 4.5 2.7a63 63 0 0 0 9.6 1.6 415.4 415.4 0 0 0 61.4 0c3.7-.4 7-1 9.5-1.6 2.5-.7 4.2-1.6 4.5-2.7.5-2 .7-3.7.7-6 0-21.6-20.3-39.2-45.4-39.2Z"/></g><path stroke="#000" stroke-width="4" d="M60.9 92.9c-.4-2.1-.6-4.3-.6-6.6 0-21.6 20.3-39.2 45.4-39.2 25 0 45.4 17.6 45.4 39.2 0 2.3-.2 4.5-.7 6.6"/><path class="hwStr1" stroke-width="4" d="M61 92.3c.3 1.1 2 2 4.4 2.7a63 63 0 0 0 9.6 1.6 415.4 415.4 0 0 0 61.4 0c3.7-.4 7-1 9.5-1.6 2.5-.7 4.2-1.6 4.5-2.7"/><path stroke="#000" stroke-opacity=".3" stroke-width="2" d="M62.3 101.2s16.2 3.4 43.4 3.4c27.1 0 43.4-3.4 43.4-3.4"/><defs><clipPath id="a"><path fill="#fff" d="M60 47h90.8v51H60z"/></clipPath></defs></svg>'
),
Headwear.HeadwearVariants.BRAINS,
_getHeadwearColor(brainsColor)
);
}
function _getBrainsStyle(BrainsColors brainsColor) internal pure returns (string memory) {
return
string.concat(
'<style>.headwearColorL { fill:',
_getBrainsColor(brainsColor),
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getBrainsColor(BrainsColors brainsColor) internal pure returns (string memory) {
if (brainsColor == BrainsColors.GREEN) {
return LensColors.lightGreen;
} else if (brainsColor == BrainsColors.PURPLE) {
return LensColors.lightPurple;
} else if (brainsColor == BrainsColors.BLUE) {
return LensColors.lightBlue;
} else if (brainsColor == BrainsColors.PINK) {
return LensColors.lightPink;
} else if (brainsColor == BrainsColors.GOLD) {
return LensColors.lightGold;
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(BrainsColors brainsColor) internal pure returns (Headwear.HeadwearColors) {
if (brainsColor == BrainsColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (brainsColor == BrainsColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (brainsColor == BrainsColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (brainsColor == BrainsColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (brainsColor == BrainsColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearBull {
enum BullColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getBull(
BullColors bullColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getBullStyle(bullColor),
'<path class="headwearColorL" d="M203.8 88.7s11.1 15 16.5 17.4c-9.6-3.6-23-5.1-41.4-8-18-2.8-36.8-3.7-55.2-3.7-18.5 0-37.2.9-55.2 3.7-18.4 2.9-31.8 4.4-41.5 8 5.4-2.4 16.7-17.6 16.7-17.6S35.2 76.2 41 69c6-7.6 20.7-2.9 20.7-2.9S91.8 49.6 104.9 48a141 141 0 0 1 37.5 0c13.1 1.7 42 17.8 42 17.8s16.5-3.8 21.8 3c6.9 8.6-2.4 20-2.4 20Z"/><path class="headwearColorL" d="M241.2 115.7c2.6 2.8 4.3 6.6 3.6 10.4.5-3.3-2.7-5.8-5.7-7.3-8.7-4.6-18.3-3.4-27.9-5.6-28.8-6.5-61-10-87.5-10-26.6 0-58.8 3.5-87.6 10-9.6 2.2-19.3 2.6-28 7.1-3 1.5-6 2.6-5.5 5.8-.8-3.7.7-7.9 3.3-10.6 2.5-2.6 9-4.6 21-8.7 9.7-3.3 23.2-4.8 41.6-7.4a374.7 374.7 0 0 1 110.4 0c18.3 2.6 31.9 3.8 41.6 7 12 4.2 18.2 6.8 20.7 9.3Z"/><path class="hwStr1" stroke-width="4" d="M123.7 104.5c-26.6 0-58.8 2.9-87.6 7.9a140 140 0 0 0-27.9 7.1c-3 1.2-6.1 3.1-5.6 5.7.3 1.5 5 5.3 19.2 7.2M27 106s0 0 0 0a34.4 34.4 0 0 0 16.5-17.6m80.2 16.1c26.5 0 58.7 2.9 87.5 7.9a140 140 0 0 1 28 7.1c2.9 1.2 6 3.1 5.6 5.7-.4 1.5-5 5.3-19.3 7.2"/><path class="hwStr1" stroke-width="4" d="M2.6 123.1s0 0 0 0c-.8-3 1-6.2 3.6-8.4 2.5-2 8.7-5.3 20.8-8.6m217.8 17s0 0 0 0c.7-3-1-6.2-3.6-8.4-2.5-2-8.7-5.3-20.9-8.6m.1-.1s0 0 0 0A34.4 34.4 0 0 1 204 88.7"/><path class="headwearColorL" d="M4.5 124.7c-2-2.6 17.4-7.4 17.4-7.4s-1.3 4-1.8 6.8c-.3 2.3-.4 6-.4 6s-12-1.3-15.2-5.4Zm238.4 0c2-2.6-17.4-7.4-17.4-7.4s1.3 4 1.7 6.8c.4 2.3.5 6 .5 6s12-1.3 15.2-5.4Z"/><path fill="#000" fill-opacity=".3" d="M4.5 124.7c-2-2.6 17.4-7.4 17.4-7.4s-1.3 4-1.8 6.8c-.3 2.3-.4 6-.4 6s-12-1.3-15.2-5.4Zm238.4 0c2-2.6-17.4-7.4-17.4-7.4s1.3 4 1.7 6.8c.4 2.3.5 6 .5 6s12-1.3 15.2-5.4Z"/><path class="hwStr1" stroke-width="3" d="M27 106.6c9.7-2.7 23.1-5.4 41.5-7.5a476 476 0 0 1 110.4 0c18.3 2.1 31.8 4.8 41.4 7.5"/><path stroke="#000" stroke-dasharray="9 9" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".2" stroke-width="2.5" d="M37.5 98.7c8.3-1.8 18.5-3.5 31-5a476 476 0 0 1 110.4 0c12.9 1.5 23.4 3.3 31.8 5.1"/><path fill="#fff" d="m184.4 66.2-.4.7c-5 1.4-10.7.7-15.2-1.9a19 19 0 0 1-9.3-12.5 34.3 34.3 0 0 0 16.9-30 35 35 0 0 1 8 43.7ZM71 22.5a34.4 34.4 0 0 0 16.8 30A19 19 0 0 1 78.6 65a20.4 20.4 0 0 1-15.2 2l-.4-.8c-4-7.1-5.3-15.3-4-23.1a35 35 0 0 1 12-20.6Z"/><path class="hwStr1" stroke-width="4" d="M88.7 51.8a98 98 0 0 1 34.7-5.3M63 66.2l.4.7c5 1.4 10.6.7 15.2-1.9 4.5-2.6 8-7 9.2-12.5l-1-.6A34.4 34.4 0 0 1 71 22.5a35 35 0 0 0-8 43.7Z"/><path class="hwStr1" stroke-width="3" d="M71.6 59a25 25 0 0 0 11.3-9m-12.2-6.7c1.7 0 3.5-.4 5-1.3M64 43.6h1.7"/><path class="hwStr1" stroke-width="4" d="M158.6 51.8a98 98 0 0 0-34.7-5.3m35.6 6a34.3 34.3 0 0 0 16.9-30 35 35 0 0 1 7.6 44.4c-5 1.4-10.7.7-15.2-1.9a19 19 0 0 1-9.3-12.5Z"/><path class="hwStr1" stroke-width="3" d="M175.7 59a24.8 24.8 0 0 1-11.3-9m12.3-6.7a10 10 0 0 1-5.1-1.3m11.7 1.6h-1.6"/><path fill="#000" class="hwStr1" stroke-width="4" d="M96.7 64a2.1 2.1 0 1 1 4.2 0 2.1 2.1 0 0 1-4.2 0Zm54 0a2.1 2.1 0 1 0-4.2 0 2.1 2.1 0 0 0 4.2 0Z"/><path fill="#fff" d="M133.9 66.9c2.2 1.2 3.2 4.1 2.6 6.6a8.4 8.4 0 0 1-5 5.4c-2.4 1-5.2.7-7.8.7-2.7 0-5.5.3-7.8-.7-2.4-1-4.4-3-5-5.4-.7-2.5.3-5.4 2.6-6.6 1.5-.8 3.3-.8 5-.7 1.7.2 3.3.3 5 .3h.3a50 50 0 0 0 5-.3c1.8-.1 3.6-.1 5 .7Zm-4.3 7.5c.2-.2.3-.4.3-.7a2 2 0 0 0-.2-.7l-.5-1c-.3-.2-.6-.3-1-.3-.3 0-.5.3-.6.5v.7a2 2 0 0 0 1 1.4c.2.2.7.3 1 0Zm-9.8-1.5v-.7c-.2-.2-.4-.5-.7-.5-.4 0-.7.1-1 .4-.2.2-.3.6-.4.9a2 2 0 0 0-.2.7c0 .3 0 .5.2.7.3.2.8.1 1.1 0 .5-.4 1-1 1-1.5Z"/><path class="hwStr1" stroke-width="3" d="M123.6 66.5a50 50 0 0 1-5.1-.3 8.6 8.6 0 0 0-5 .7c-2.3 1.2-3.3 4.1-2.6 6.6a8.4 8.4 0 0 0 5 5.4c2.3 1 5.1.7 7.8.7"/><path class="hwStr1" stroke-width="3" d="M119 71.7a1 1 0 0 0-.8.4c-.3.2-.4.6-.5.9a2 2 0 0 0-.2.7c0 .3 0 .5.2.7.3.2.8.1 1.1 0 .5-.4 1-1 1-1.5v-.7c-.2-.2-.4-.5-.7-.5Zm4.8-5.2a50 50 0 0 0 5-.3c1.8-.1 3.6-.1 5 .7 2.3 1.2 3.3 4.1 2.7 6.6a8.4 8.4 0 0 1-5 5.4c-2.4 1-5.2.7-7.8.7"/><path class="hwStr1" stroke-width="3" d="M128.3 71.7c.3 0 .6.1.9.4l.5.9.2.7c0 .3 0 .5-.3.7-.3.2-.8.1-1 0-.6-.4-1-1-1-1.5v-.7c.1-.2.3-.5.7-.5Z"/><path class="hwStr1" stroke-width="4" d="M43.3 88.2S33 77.2 40.8 69c7.6-8 15.2-2.4 21.2-3m142.3 22.1s10-11 2.3-19c-7.6-8.2-15.3-2.5-21.3-3.2"/><path class="headwearColorB" d="M46 72.8a8 8 0 0 1 8.6-2.4c-3.7 3.3-6.7 7-9 11.3a7.5 7.5 0 0 1 .4-8.9Z"/><path class="hwStr1" stroke-width="2.5" d="M45.7 81.7a40 40 0 0 1 8.9-11.3 8 8 0 0 0-8.6 2.4 7.4 7.4 0 0 0-.3 8.9Z"/><path class="headwearColorB" d="M201.3 72.8a8 8 0 0 0-8.5-2.4c3.6 3.3 6.6 7 8.9 11.3a7.5 7.5 0 0 0-.4-8.9Z"/><path class="hwStr1" stroke-width="2.5" d="M201.7 81.7c-2.3-4.2-5.3-8-9-11.3 3-1 6.6 0 8.6 2.4s2.3 6.2.4 8.9Z"/></svg>'
),
Headwear.HeadwearVariants.BULL,
_getHeadwearColor(bullColor)
);
}
function _getBullStyle(BullColors bullColor) internal pure returns (string memory) {
(string memory lightColor, string memory baseColor) = _getBullColor(bullColor);
return
string.concat(
'<style>.headwearColorL { fill:',
lightColor,
'}.headwearColorB { fill:',
baseColor,
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getBullColor(BullColors bullColor) internal pure returns (string memory, string memory) {
if (bullColor == BullColors.GREEN) {
return (LensColors.lightGreen, LensColors.baseGreen);
} else if (bullColor == BullColors.PURPLE) {
return (LensColors.lightPurple, LensColors.basePurple);
} else if (bullColor == BullColors.BLUE) {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (bullColor == BullColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (bullColor == BullColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(BullColors bullColor) internal pure returns (Headwear.HeadwearColors) {
if (bullColor == BullColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (bullColor == BullColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (bullColor == BullColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (bullColor == BullColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (bullColor == BullColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -10,8 +10,6 @@ library HeadwearCrown {
PURPLE,
BLUE,
PINK,
LIGHT,
DARK,
GOLD
}
@@ -50,10 +48,6 @@ library HeadwearCrown {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (crownColor == CrownColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (crownColor == CrownColors.LIGHT) {
return (LensColors.white, LensColors.lightGray);
} else if (crownColor == CrownColors.DARK) {
return (LensColors.gray, LensColors.gray);
} else if (crownColor == CrownColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
@@ -70,10 +64,6 @@ library HeadwearCrown {
return Headwear.HeadwearColors.BLUE;
} else if (crownColor == CrownColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (crownColor == CrownColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (crownColor == CrownColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (crownColor == CrownColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -0,0 +1,70 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearEarrings {
enum EarringsColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getEarrings(
EarringsColors earringsColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getEarringsStyle(earringsColor),
'<path class="headwearColorL" d="m26 165.5.5.9c-5 4.9-9 10-13.7 14.5L1.7 163.6l.3-.4c3.5 2 8 4.1 12 5.4 5-.7 8.2-2.2 12-3Z"/><path fill="#000" fill-opacity=".2" d="m26 165.5.5.9c-5 4.9-9 10-13.7 14.5L1.7 163.6l.3-.4c3.5 2 8 4.1 12 5.4 5-.7 8.2-2.2 12-3Z"/><path class="headwearColorL" d="M15.4 148.1c5.1 8 6.5 10.4 10.6 17.4-3.8 1-7 2.4-12 3.1a72 72 0 0 1-12-5.4c4.6-5.3 9-10.2 13.4-15Z"/><path fill="#000" d="M15.7 149.3a2.6 2.6 0 1 0 0-5.2 2.6 2.6 0 0 0 0 5.2Z"/><path class="hwStr1" stroke-width="2" d="M15.7 149.3a2.6 2.6 0 1 0 0-5.2 2.6 2.6 0 0 0 0 5.2Z"/><path class="hwStr1" stroke-width="3" d="M15.4 148.1 2 163.2l-.3.4 11 17.3c4.8-4.5 8.8-9.6 13.8-14.5l-.5-.9c-4-7-5.5-9.4-10.6-17.4Z"/><path class="hwStr1" stroke-width="2.5" d="M2 163.2c3.5 2 8 4.1 12 5.4 5-.7 8.2-2.2 12-3"/><path class="headwearColorL" d="m187.4 165.5-.5.9c5 4.9 9 10 13.7 14.5l11-17.3-.2-.4c-3.5 2-8 4.1-12.1 5.4-5-.7-8.1-2.2-12-3Z"/><path fill="#000" fill-opacity=".2" d="m187.4 165.5-.5.9c5 4.9 9 10 13.7 14.5l11-17.3-.2-.4c-3.5 2-8 4.1-12.1 5.4-5-.7-8.1-2.2-12-3Z"/><path class="headwearColorL" d="M197.9 148.1c-5 8-6.5 10.4-10.5 17.4 3.8 1 7 2.4 11.9 3.1a72 72 0 0 0 12-5.4c-4.6-5.3-9-10.2-13.4-15Z"/><path fill="#000" d="M197.7 149.3a2.6 2.6 0 1 1 0-5.2 2.6 2.6 0 0 1 0 5.2Z"/><path class="hwStr1" stroke-width="2" d="M197.7 149.3a2.6 2.6 0 1 1 0-5.2 2.6 2.6 0 0 1 0 5.2Z"/><path class="hwStr1" stroke-width="3" d="m197.9 148.1 13.5 15.1c0 .2.2.3.3.4l-11.1 17.3c-4.7-4.5-8.7-9.6-13.7-14.5l.5-.9c4-7 5.4-9.4 10.5-17.4Z"/><path class="hwStr1" stroke-width="2.5" d="M211.4 163.2c-3.5 2-8 4.1-12.1 5.4-5-.7-8.1-2.2-12-3"/></svg>'
),
Headwear.HeadwearVariants.EARRINGS,
_getHeadwearColor(earringsColor)
);
}
function _getEarringsStyle(EarringsColors earringsColor) internal pure returns (string memory) {
return
string.concat(
'<style>.headwearColorL { fill:',
_getEarringsColor(earringsColor),
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getEarringsColor(EarringsColors earringsColor) internal pure returns (string memory) {
if (earringsColor == EarringsColors.GREEN) {
return LensColors.lightGreen;
} else if (earringsColor == EarringsColors.PURPLE) {
return LensColors.lightPurple;
} else if (earringsColor == EarringsColors.BLUE) {
return LensColors.lightBlue;
} else if (earringsColor == EarringsColors.PINK) {
return LensColors.lightPink;
} else if (earringsColor == EarringsColors.GOLD) {
return LensColors.lightGold;
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(EarringsColors earringsColor) internal pure returns (Headwear.HeadwearColors) {
if (earringsColor == EarringsColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (earringsColor == EarringsColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (earringsColor == EarringsColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (earringsColor == EarringsColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (earringsColor == EarringsColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -10,14 +10,12 @@ library HeadwearFloral {
PINK,
PURPLE,
BLUE,
LIGHT,
DARK,
GOLD
}
function getFloral(
FloralColors floralColor
) internal pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
@@ -50,10 +48,6 @@ library HeadwearFloral {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (floralColor == FloralColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (floralColor == FloralColors.LIGHT) {
return (LensColors.white, LensColors.lightGray);
} else if (floralColor == FloralColors.DARK) {
return (LensColors.gray, LensColors.gray);
} else if (floralColor == FloralColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
@@ -70,10 +64,6 @@ library HeadwearFloral {
return Headwear.HeadwearColors.BLUE;
} else if (floralColor == FloralColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (floralColor == FloralColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (floralColor == FloralColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (floralColor == FloralColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -10,14 +10,12 @@ library HeadwearGlasses {
PINK,
PURPLE,
BLUE,
LIGHT,
DARK,
GOLD
}
function getGlasses(
GlassesColors glassesColor
) internal pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
@@ -42,10 +40,6 @@ library HeadwearGlasses {
return LensColors.lightBlue;
} else if (glassesColor == GlassesColors.PINK) {
return LensColors.lightPink;
} else if (glassesColor == GlassesColors.LIGHT) {
return LensColors.white;
} else if (glassesColor == GlassesColors.DARK) {
return LensColors.dark;
} else if (glassesColor == GlassesColors.GOLD) {
return LensColors.lightGold;
} else {
@@ -62,10 +56,6 @@ library HeadwearGlasses {
return Headwear.HeadwearColors.BLUE;
} else if (glassesColor == GlassesColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (glassesColor == GlassesColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (glassesColor == GlassesColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (glassesColor == GlassesColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -8,8 +8,6 @@ library HeadwearHat {
enum HatColors {
GREEN,
PINK,
LIGHT,
DARK,
BLUE,
PURPLE,
GOLD
@@ -19,7 +17,7 @@ library HeadwearHat {
// uint8 color = uint8((seed >> 152) & 0xFF) % 5;
function getHat(
HatColors hatColor
) internal pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
@@ -48,10 +46,6 @@ library HeadwearHat {
return (LensColors.darkGreen, LensColors.lightGreen);
} else if (hatColor == HatColors.PINK) {
return (LensColors.darkPink, LensColors.lightPink);
} else if (hatColor == HatColors.LIGHT) {
return (LensColors.lightGray, LensColors.white);
} else if (hatColor == HatColors.DARK) {
return (LensColors.gray, LensColors.dark);
} else if (hatColor == HatColors.BLUE) {
return (LensColors.darkBlue, LensColors.lightBlue);
} else if (hatColor == HatColors.PURPLE) {
@@ -68,10 +62,6 @@ library HeadwearHat {
return Headwear.HeadwearColors.GREEN;
} else if (hatColor == HatColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (hatColor == HatColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (hatColor == HatColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (hatColor == HatColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (hatColor == HatColors.PURPLE) {

View File

@@ -10,8 +10,6 @@ library HeadwearIcecream {
PINK,
BLUE,
PURPLE,
LIGHT,
DARK,
GOLD
}
@@ -38,10 +36,6 @@ library HeadwearIcecream {
return LensColors.basePurple;
} else if (icecreamColor == IcecreamColors.BLUE) {
return LensColors.baseBlue;
} else if (icecreamColor == IcecreamColors.LIGHT) {
return LensColors.lightGray;
} else if (icecreamColor == IcecreamColors.DARK) {
return LensColors.gray;
} else if (icecreamColor == IcecreamColors.GOLD) {
return LensColors.baseGold;
} else {
@@ -58,10 +52,6 @@ library HeadwearIcecream {
return Headwear.HeadwearColors.PURPLE;
} else if (icecreamColor == IcecreamColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (icecreamColor == IcecreamColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (icecreamColor == IcecreamColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (icecreamColor == IcecreamColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearLotus {
enum LotusColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getLotus(
LotusColors lotusColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getLotusStyle(lotusColor),
'<path class="headwearColorL" d="M169.2 68.6c2 0 3.5 1.8 3.5 3.8A35 35 0 0 1 161.9 97a39.6 39.6 0 0 1-30.8 9.3 28 28 0 0 0 4.8-3.7c2.2-2 2-5 .3-7.4a53.9 53.9 0 0 0-11.6-12 64.7 64.7 0 0 1 44.6-14.6Z"/><path class="headwearColorL" d="M161 49.4c1 6.2-.2 12.8-2.8 18.7l.1.8c-7.3.8-14.4 2.9-21 6l-.3-1a49.6 49.6 0 0 0-26.2-11.4v-.3a89.4 89.4 0 0 1 45.6-16.6 4.4 4.4 0 0 1 4.6 3.8Z"/><path class="headwearColorB" d="m137 74 .3 1a60 60 0 0 0-12.7 8.2 38.1 38.1 0 0 0-18.6-8.8h-.2c-3.7 0-11.3 3.1-18.6 8.8-4.2-3.6-9-6.6-14-8.9l1.6-.4a49.6 49.6 0 0 1 31-11.7h.2a49.6 49.6 0 0 1 31 11.7Z"/><path class="headwearColorL" d="M136.2 95.2c1.7 2.4 1.9 5.4-.3 7.4a32 32 0 0 1-4.8 3.7 47.5 47.5 0 0 1-25.1 6.5h-.2c-8.5 0-17.7-1.8-25.1-6.5a32 32 0 0 1-4.8-3.7c-2.2-2-2-5-.3-7.4a53 53 0 0 1 11.6-12 38.1 38.1 0 0 1 18.6-8.8h.2c3.7 0 11.3 3.1 18.6 8.8a53 53 0 0 1 11.6 12ZM106 39c4.8 0 14.6 8.4 18.6 15-4.8 2.3-9.4 5-13.7 8.2v.3a41.4 41.4 0 0 0-9.9 0v-.3c-4.4-3.1-9-5.9-13.8-8.2 4-6.6 13.8-15 18.6-15h.2Z"/><path class="headwearColorL" d="M101 62.2v.3c-9.6 1-19 5.3-26.2 11.4l-1.6.4A64.6 64.6 0 0 0 53.5 69l.1-.8a34.6 34.6 0 0 1-2.9-18.7 4.4 4.4 0 0 1 4.7-3.8 87.2 87.2 0 0 1 45.5 16.6Z"/><path class="headwearColorL" d="M87.2 83.2a54.3 54.3 0 0 0-11.6 12c-1.7 2.4-1.9 5.4.3 7.4a32 32 0 0 0 4.8 3.7A39.5 39.5 0 0 1 49.9 97a35 35 0 0 1-10.8-24.6c0-2 1.5-3.7 3.5-3.8a66 66 0 0 1 30.6 5.7c5 2.3 9.8 5.3 14 8.9Z"/><path class="hwStr1" stroke-width="4" d="M105.8 112.8c-8.5 0-17.7-1.8-25.1-6.5a32 32 0 0 1-4.8-3.7c-2.2-2-2-5-.3-7.4a53 53 0 0 1 11.6-12 38.1 38.1 0 0 1 18.6-8.8"/><path class="hwStr1" stroke-width="4" d="M87.2 83.2a64.6 64.6 0 0 0-44.6-14.6c-2 0-3.5 1.8-3.5 3.8A35 35 0 0 0 50 97c7.6 7 20.5 11 30.8 9.3m-6-32.3a49.6 49.6 0 0 1 31-11.8m-4.8 0a88.6 88.6 0 0 0-45.6-16.6 4.4 4.4 0 0 0-4.7 3.8c-.9 6.2.3 12.8 2.9 18.7"/><path class="hwStr1" stroke-width="4" d="M87.2 54c4-6.6 13.8-15 18.6-15m0 73.8h.2c8.5 0 17.6-1.8 25.1-6.5a32 32 0 0 0 4.8-3.7c2.2-2 2-5 .3-7.4a53.9 53.9 0 0 0-11.6-12 38.1 38.1 0 0 0-18.6-8.8"/><path class="hwStr1" stroke-width="4" d="M124.6 83.2a64.7 64.7 0 0 1 44.6-14.6c2 0 3.5 1.8 3.5 3.8A35 35 0 0 1 161.9 97a39.6 39.6 0 0 1-30.8 9.3M137 74a49.6 49.6 0 0 0-31-11.8m4.9 0a89.4 89.4 0 0 1 45.5-16.6 4.4 4.4 0 0 1 4.6 3.8c1 6.2-.2 12.8-2.8 18.7"/><path class="hwStr1" stroke-width="4" d="M124.6 54c-4-6.6-13.8-15-18.6-15"/><path class="hwStr1" stroke-opacity=".1" stroke-width="3" d="M105.9 88.3v24.5"/><path class="hwStr1" stroke-opacity=".1" stroke-width="2.5" d="M105.9 51.4v11.5"/><path class="hwStr1" stroke-opacity=".1" stroke-width="3" d="M68.2 60.2s3.7 3.5 6.4 5.3c2.2 1.4 5.9 3.2 5.9 3.2m62.5-8.5s-3.7 3.5-6.4 5.3a62 62 0 0 1-6 3.2m-77 19.4s2.4 6 6.1 10.5c5.4 6.7 17.5 8.8 17.5 8.8m81-19.3s-2.4 6-6.1 10.5c-5.4 6.7-17.5 8.8-17.5 8.8"/></svg>'
),
Headwear.HeadwearVariants.LOTUS,
_getHeadwearColor(lotusColor)
);
}
function _getLotusStyle(LotusColors lotusColor) internal pure returns (string memory) {
(string memory lightColor, string memory baseColor) = _getLotusColor(lotusColor);
return
string.concat(
'<style>.headwearColorL { fill:',
lightColor,
'}.headwearColorB { fill:',
baseColor,
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getLotusColor(LotusColors lotusColor) internal pure returns (string memory, string memory) {
if (lotusColor == LotusColors.GREEN) {
return (LensColors.lightGreen, LensColors.baseGreen);
} else if (lotusColor == LotusColors.PURPLE) {
return (LensColors.lightPurple, LensColors.basePurple);
} else if (lotusColor == LotusColors.BLUE) {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (lotusColor == LotusColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (lotusColor == LotusColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(LotusColors lotusColor) internal pure returns (Headwear.HeadwearColors) {
if (lotusColor == LotusColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (lotusColor == LotusColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (lotusColor == LotusColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (lotusColor == LotusColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (lotusColor == LotusColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -0,0 +1,70 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearMajor {
enum MajorColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getMajor(
MajorColors majorColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getMajorStyle(majorColor),
'<path fill="#000" d="M35.8 160.6 21.6 157l6.6 5.9 11 2.3-3.4-4.6Zm166.1 0L216 157l-6.6 5.9-11 2.3 3.5-4.6Z"/><path class="hwStr1" stroke-width="4" d="M75.5 192.9c4.2-1.2 8.8-2.5 13-3.1m73.5 3.1a94.6 94.6 0 0 0-13-3.1"/><path class="headwearColorB" fill-rule="evenodd" d="M148.4 191.2h-.2l-.6.2a178 178 0 0 1-9.7 2.2c-6 1.2-13.4 2.4-19.2 2.4a104 104 0 0 1-19.1-2.4 206.5 206.5 0 0 1-9.6-2.2l-.6-.1h-.7l-1 .1a51.5 51.5 0 0 0-5.8 1.4h-.3l-.5.2.4.2a14.3 14.3 0 0 0 .7.2 61.4 61.4 0 0 0 9.5 2.6 126 126 0 0 0 64-2.8h.2l.5-.2-.5-.1-.3-.1-.9-.2a72.3 72.3 0 0 0-6.2-1.4Zm7.5 2v-.2.2Zm-74.4 0v-.2.2Zm7.7-2v.2-.2Z" clip-rule="evenodd"/><path fill="#000" fill-opacity=".3" fill-rule="evenodd" d="M148.4 191.2h-.2l-.6.2a178 178 0 0 1-9.7 2.2c-6 1.2-13.4 2.4-19.2 2.4a104 104 0 0 1-19.1-2.4 206.5 206.5 0 0 1-9.6-2.2l-.6-.1h-.7l-1 .1a51.5 51.5 0 0 0-5.8 1.4h-.3l-.5.2.4.2a14.3 14.3 0 0 0 .7.2 61.4 61.4 0 0 0 9.5 2.6 126 126 0 0 0 64-2.8h.2l.5-.2-.5-.1-.3-.1-.9-.2a72.3 72.3 0 0 0-6.2-1.4Zm7.5 2v-.2.2Zm-74.4 0v-.2.2Zm7.7-2v.2-.2Z" clip-rule="evenodd"/><path fill="#fff" fill-opacity=".3" d="M75 192.9a124.3 124.3 0 0 1-44-23.7c-12.8-11.2-23.5-25-22.6-42a49.4 49.4 0 0 1 24-38.3c13-7.1 29.9-7 42.8.4a50.7 50.7 0 0 1 16.4-23 43 43 0 0 1 27-8.6 43 43 0 0 1 27 8.6 50.7 50.7 0 0 1 16.5 23c13-7.4 29.7-7.5 42.8-.4a49.4 49.4 0 0 1 24 38.3c.9 17-9.8 30.8-22.6 42a124.3 124.3 0 0 1-44.2 23.7 100 100 0 0 1-21.4 5.9A135.6 135.6 0 0 1 75 193v-.1Z"/><path class="hwStr1" stroke-width="4" d="M90 197.3c-5-1-10-2.6-14.7-4.4A124.4 124.4 0 0 1 31.1 169a99 99 0 0 1-9.6-9.6 46 46 0 0 1-13-32.5c.5-7.6 3.4-15.6 7.8-22.6a46 46 0 0 1 16.2-15.6c13.1-7.2 29.9-7 42.9.4a50.7 50.7 0 0 1 16.4-23 43 43 0 0 1 27-8.6 43 43 0 0 1 27 8.5 50.7 50.7 0 0 1 16.4 23.1c13-7.4 29.8-7.6 42.9-.4a46 46 0 0 1 16.2 15.6c4.4 7 7.3 15 7.7 22.6a45.6 45.6 0 0 1-13 32.5 99 99 0 0 1-9.6 9.6 124.4 124.4 0 0 1-44.1 23.8 100 100 0 0 1-21.5 5.8 135.6 135.6 0 0 1-50.8-1.4Z"/><path fill="#fff" d="M90 197.3c-5-1-10-2.6-14.7-4.4A124.4 124.4 0 0 1 31.1 169a99 99 0 0 1-9.6-9.6s38 20.7 97.3 20.7 97.2-20.7 97.2-20.7a99 99 0 0 1-9.6 9.6 124.4 124.4 0 0 1-44.1 23.8 100 100 0 0 1-21.5 5.8 135.6 135.6 0 0 1-50.8-1.4Z"/><path class="hwStr1" stroke-width="4" d="M90 197.3c-5-1-10-2.6-14.7-4.4A124.4 124.4 0 0 1 31.1 169a99 99 0 0 1-9.6-9.6s38 20.7 97.3 20.7 97.2-20.7 97.2-20.7a99 99 0 0 1-9.6 9.6 124.4 124.4 0 0 1-44.1 23.8 100 100 0 0 1-21.5 5.8 135.6 135.6 0 0 1-50.8-1.4Z"/><path class="hwStr1" stroke-opacity=".3" stroke-width="3" d="M49 180.5c11.7 3.6 28.6 7.7 48.2 9.6m91.2-9.8c-12 3.7-29.3 8-49.6 9.9"/><circle class="headwearColorB" cx="118.3" cy="192.3" r="2.7"/><circle cx="118.3" cy="192.3" r="2.7" stroke="#000" stroke-width="2.5"/><circle class="headwearColorB" cx="106.7" cy="191.8" r="2.2"/><circle cx="106.7" cy="191.8" r="2.2" stroke="#000" stroke-width="2.5"/><circle class="headwearColorB" cx="129.9" cy="191.8" r="2.2"/><circle cx="129.9" cy="191.8" r="2.2" stroke="#000" stroke-width="2.5"/><path fill="#fff" d="M3.2 115.6h7.5s-2 5.2-2 13.5 2 13.5 2 13.5H3.2s-2-4.2-2-13.5 2-13.5 2-13.5Z"/><path class="hwStr1" stroke-width="4" d="M3.1 118.8c.4-2 2.2-3.2 4.2-3.2h3.4S9 120.8 9 129.1s1.8 13.5 1.8 13.5H7.3c-2 0-3.8-1.3-4.2-3.2a56.1 56.1 0 0 1 .1-20.6Z"/><path fill="#fff" d="M234.1 115.6h-7.5s2 5.2 2 13.5-2 13.5-2 13.5h7.5s2-4.2 2-13.5-2-13.5-2-13.5Z"/><path class="hwStr1" stroke-width="4" d="M234.2 118.8c-.4-2-2.1-3.2-4.1-3.2h-3.5s1.8 5.2 1.8 13.5-1.8 13.5-1.8 13.5h3.5c2 0 3.7-1.3 4.1-3.2a51.6 51.6 0 0 0 0-20.6Z"/><path stroke="#000" stroke-linecap="round" stroke-width="4" d="M9 116V93.4M228.4 116V93.4"/><circle cx="8.9" cy="91" r="4.7" fill="#fff"/><circle cx="8.9" cy="91" r="6.7" stroke="#000" stroke-width="4"/><circle cx="228.4" cy="91" r="4.7" fill="#fff"/><circle cx="228.4" cy="91" r="6.7" stroke="#000" stroke-width="4"/></svg>'
),
Headwear.HeadwearVariants.MAJOR,
_getHeadwearColor(majorColor)
);
}
function _getMajorStyle(MajorColors majorColor) internal pure returns (string memory) {
return
string.concat(
'<style>.headwearColorB { fill:',
_getMajorColor(majorColor),
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getMajorColor(MajorColors majorColor) internal pure returns (string memory) {
if (majorColor == MajorColors.GREEN) {
return LensColors.baseGreen;
} else if (majorColor == MajorColors.PURPLE) {
return LensColors.basePurple;
} else if (majorColor == MajorColors.BLUE) {
return LensColors.baseBlue;
} else if (majorColor == MajorColors.PINK) {
return LensColors.basePink;
} else if (majorColor == MajorColors.GOLD) {
return LensColors.baseGold;
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(MajorColors majorColor) internal pure returns (Headwear.HeadwearColors) {
if (majorColor == MajorColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (majorColor == MajorColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (majorColor == MajorColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (majorColor == MajorColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (majorColor == MajorColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

View File

@@ -10,8 +10,6 @@ library HeadwearMushroom {
PURPLE,
BLUE,
PINK,
LIGHT,
DARK,
GOLD
}
@@ -65,10 +63,6 @@ library HeadwearMushroom {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (mushroomColor == MushroomColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (mushroomColor == MushroomColors.LIGHT) {
return (LensColors.white, LensColors.white);
} else if (mushroomColor == MushroomColors.DARK) {
return (LensColors.gray, LensColors.white);
} else if (mushroomColor == MushroomColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
@@ -85,10 +79,6 @@ library HeadwearMushroom {
return Headwear.HeadwearColors.BLUE;
} else if (mushroomColor == MushroomColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (mushroomColor == MushroomColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (mushroomColor == MushroomColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (mushroomColor == MushroomColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -10,14 +10,12 @@ library HeadwearNightcap {
PINK,
PURPLE,
BLUE,
LIGHT,
DARK,
GOLD
}
function getNightcap(
NightcapColors nightcapColor
) internal pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
@@ -42,10 +40,6 @@ library HeadwearNightcap {
return LensColors.lightPurple;
} else if (nightcapColor == NightcapColors.BLUE) {
return LensColors.lightBlue;
} else if (nightcapColor == NightcapColors.LIGHT) {
return LensColors.white;
} else if (nightcapColor == NightcapColors.DARK) {
return LensColors.gray;
} else if (nightcapColor == NightcapColors.GOLD) {
return LensColors.lightGold;
} else {
@@ -62,10 +56,6 @@ library HeadwearNightcap {
return Headwear.HeadwearColors.PURPLE;
} else if (nightcapColor == NightcapColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (nightcapColor == NightcapColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (nightcapColor == NightcapColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (nightcapColor == NightcapColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -10,14 +10,12 @@ library HeadwearPartyhat {
PURPLE,
BLUE,
PINK,
LIGHT,
DARK,
GOLD
}
function getPartyhat(
PartyhatColors partyhatColor
) internal pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="211" height="335" fill="none">',
@@ -52,10 +50,6 @@ library HeadwearPartyhat {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (partyhatColor == PartyhatColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (partyhatColor == PartyhatColors.LIGHT) {
return (LensColors.gray, LensColors.white);
} else if (partyhatColor == PartyhatColors.DARK) {
return (LensColors.gray, LensColors.dark);
} else if (partyhatColor == PartyhatColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
@@ -72,10 +66,6 @@ library HeadwearPartyhat {
return Headwear.HeadwearColors.BLUE;
} else if (partyhatColor == PartyhatColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (partyhatColor == PartyhatColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (partyhatColor == PartyhatColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (partyhatColor == PartyhatColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -10,8 +10,6 @@ library HeadwearPlants {
PINK,
BLUE,
PURPLE,
LIGHT,
DARK,
GOLD
}
@@ -50,10 +48,6 @@ library HeadwearPlants {
return LensColors.basePurple;
} else if (plantsColor == PlantsColors.BLUE) {
return LensColors.baseBlue;
} else if (plantsColor == PlantsColors.LIGHT) {
return LensColors.lightGray;
} else if (plantsColor == PlantsColors.DARK) {
return LensColors.gray;
} else if (plantsColor == PlantsColors.GOLD) {
return LensColors.baseGold;
} else {
@@ -70,10 +64,6 @@ library HeadwearPlants {
return Headwear.HeadwearColors.PURPLE;
} else if (plantsColor == PlantsColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (plantsColor == PlantsColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
} else if (plantsColor == PlantsColors.DARK) {
return Headwear.HeadwearColors.DARK;
} else if (plantsColor == PlantsColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Headwear} from 'contracts/libraries/svgs/Profile/Headwear.sol';
import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearScout {
enum ScoutColors {
GREEN,
PINK,
PURPLE,
BLUE,
GOLD
}
function getScout(
ScoutColors scoutColor
) external pure returns (string memory, Headwear.HeadwearVariants, Headwear.HeadwearColors) {
return (
string.concat(
'<svg xmlns="http://www.w3.org/2000/svg" width="210" height="335" fill="none">',
_getScoutStyle(scoutColor),
'<path class="headwearColorL" d="M205.8 92.3a35 35 0 0 0 14.5 13.8c-9.6-3.6-23-5.1-41.4-8-18-2.8-36.8-3.7-55.2-3.7-18.5 0-37.2.9-55.2 3.7-18.4 2.9-31.8 4.4-41.5 8a34.4 34.4 0 0 0 14.5-13.8c3-5.5 5.4-11.4 9.2-16.2 4.5-5.5 10.6-9 16.8-12a124.5 124.5 0 0 1 56.2-12.3A124.5 124.5 0 0 1 179.9 64c6.1 3 12.2 6.5 16.7 12 3.9 4.8 6.3 10.7 9.2 16.2Z"/><path class="headwearColorB" d="M142.4 52.9c-6-.8-12.3-1.1-18.7-1.1 0-6.5 2.8-14 8.4-17.6a29 29 0 0 1 19.3-4c1 4.4 1.8 9 .7 13.3a13 13 0 0 1-9.7 9.4Zm-27.1-18.7c5.5 3.7 8.4 11.1 8.4 17.6-6.5 0-12.7.3-18.8 1-4.4-.6-8.6-5-9.7-9.3a30 30 0 0 1 .7-13.3 29 29 0 0 1 19.4 4Z"/><path class="headwearColorL" d="M241.2 115.7c2.6 2.8 4.3 6.6 3.6 10.4.5-3.3-2.7-5.8-5.7-7.3-8.7-4.6-18.3-3.4-27.9-5.6-28.8-6.5-61-10-87.5-10-26.6 0-58.8 3.5-87.6 10-9.6 2.2-19.3 2.6-28 7.1-3 1.5-6 2.6-5.5 5.8-.8-3.7.7-7.9 3.3-10.6 2.5-2.6 9-4.6 21-8.7 9.7-3.3 23.2-4.8 41.6-7.4a374.7 374.7 0 0 1 110.4 0c18.3 2.6 31.9 3.8 41.6 7 12 4.2 18.2 6.8 20.7 9.3Z"/><path class="hwStr1" stroke-width="4" d="M123.7 104.5c-26.6 0-58.8 2.9-87.6 7.9a140 140 0 0 0-27.9 7.1c-3 1.2-6.1 3.1-5.6 5.7.3 1.5 5 5.3 19.2 7.2M27 106s0 0 0 0a34.4 34.4 0 0 0 14.5-13.7c3-5.5 5.4-11.4 9.2-16.2a46.4 46.4 0 0 1 16.8-12 124.6 124.6 0 0 1 56.2-12.3"/><path class="hwStr1" stroke-width="4" d="M105 52.9c-4.5-.7-8.7-5-9.8-9.4a30 30 0 0 1 .7-13.3 29 29 0 0 1 19.4 4c5.5 3.7 8.4 11.1 8.4 17.6"/><path class="hwStr1" stroke-width="3" d="M107.4 42c4 1.8 7.3 5.3 9 9.5"/><path class="hwStr1" stroke-width="4" d="M123.7 104.5c26.5 0 58.7 2.9 87.5 7.9a140 140 0 0 1 28 7.1c2.9 1.2 6 3.1 5.6 5.7-.4 1.5-5 5.3-19.3 7.2"/><path class="hwStr1" stroke-width="4" d="M2.6 123.1s0 0 0 0c-.8-3 1-6.2 3.6-8.4 2.5-2 8.7-5.3 20.8-8.6m217.8 17s0 0 0 0c.7-3-1-6.2-3.6-8.4-2.5-2-8.7-5.3-20.9-8.6m.1-.1s0 0 0 0a34.4 34.4 0 0 1-14.6-13.7c-3-5.5-5.3-11.4-9.2-16.2a46.4 46.4 0 0 0-16.8-12 124.6 124.6 0 0 0-56.1-12.3"/><path class="hwStr1" stroke-width="4" d="M142.4 52.9a13 13 0 0 0 9.7-9.4c1-4.3.4-8.9-.7-13.3a29 29 0 0 0-19.3 4c-5.6 3.7-8.4 11.1-8.4 17.6"/><path class="hwStr1" stroke-width="3" d="M140 42a17.1 17.1 0 0 0-9 9.5"/><path class="headwearColorL" d="M4.5 124.7c-2-2.6 17.4-7.4 17.4-7.4s-1.3 4-1.8 6.8c-.3 2.3-.4 6-.4 6s-12-1.3-15.2-5.4Zm238.4 0c2-2.6-17.4-7.4-17.4-7.4s1.3 4 1.7 6.8c.4 2.3.5 6 .5 6s12-1.3 15.2-5.4Z"/><path fill="#000" fill-opacity=".3" d="M4.5 124.7c-2-2.6 17.4-7.4 17.4-7.4s-1.3 4-1.8 6.8c-.3 2.3-.4 6-.4 6s-12-1.3-15.2-5.4Zm238.4 0c2-2.6-17.4-7.4-17.4-7.4s1.3 4 1.7 6.8c.4 2.3.5 6 .5 6s12-1.3 15.2-5.4Z"/><path fill="#fff" d="M130.7 67.7c-.1.2-.4 0-.4-.1v-.7c-.2-8.4-13-8.4-13.3 0v.7c0 .2-.2.3-.4.1l-.4-.4c-6.2-5.8-15.2 3.2-9.4 9.3l.5.5c7 7 16.4 7 16.4 7s9.4 0 16.4-7l.4-.5c5.8-6.1-3.2-15.1-9.4-9.3l-.4.4Z"/><path stroke="#000" stroke-linecap="square" stroke-linejoin="round" stroke-width="3" d="M130.7 67.7v0c-.1.2-.4 0-.4-.1v0-.7c-.2-8.4-13-8.4-13.3 0v.7c0 .2-.2.3-.4.1v0l-.4-.4c-6.2-5.8-15.2 3.2-9.4 9.3l.5.5c7 7 16.4 7 16.4 7s9.4 0 16.4-7l.4-.5c5.8-6.1-3.2-15.1-9.4-9.3l-.4.4Z"/><path class="hwStr1" stroke-width="3" d="M27 106.6c9.7-2.7 23.1-5.4 41.5-7.5a476 476 0 0 1 110.4 0c18.3 2.1 31.8 4.8 41.4 7.5"/><path stroke="#000" stroke-dasharray="9 9" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".2" stroke-width="2.5" d="M37.5 98.7c8.3-1.8 18.5-3.5 31-5a476 476 0 0 1 110.4 0c12.9 1.5 23.4 3.3 31.8 5.1"/><path class="headwearColorL" fill-rule="evenodd" d="m30.6 113.6.9 1.5c9.6 13 8.5 26 6.1 38.4l-1.3 6.4c-2 10.2-4 19.7-1.6 29.2l.4 1.3a2 2 0 0 1-1.6 2.5l-4.3.7a2 2 0 0 1-2.3-1.4l-.4-1.7c-2.8-11-.5-22 1.7-32.2l1.2-5.9c2.3-12 3-23-5-33.6l-2.2-3 8.4-2.2Z" clip-rule="evenodd"/><path stroke="#000" stroke-linecap="round" stroke-width="3" d="m26 187.4 8-1.5"/><path class="hwStr1" stroke-width="3" d="m30.6 113.6.9 1.5c9.6 13 8.5 26 6.1 38.4l-1.3 6.4c-2 10.2-4 19.7-1.6 29.2l.4 1.3a2 2 0 0 1-1.6 2.5l-4.3.7a2 2 0 0 1-2.3-1.4l-.4-1.7c-2.8-11-.5-22 1.7-32.2l1.2-5.9c2.3-12 3-23-5-33.6l-2.2-3 8.4-2.2Z" clip-rule="evenodd"/><path fill="#000" fill-opacity=".2" d="m33.8 186.6-7.9 1.5 1.5 6h3.8l4-2.1-1.4-5.4Z"/><path class="headwearColorL" fill-rule="evenodd" d="m216.7 113.6-.8 1.5c-9.7 13-8.6 26-6.2 38.4l1.3 6.4c2.1 10.2 4 19.7 1.6 29.2l-.3 1.3a2 2 0 0 0 1.6 2.5l4.2.7c1 .2 2-.4 2.3-1.4l.4-1.7c2.8-11 .5-22-1.6-32.2l-1.2-5.9c-2.3-12-3-23 5-33.6l2.2-3-8.5-2.2Z" clip-rule="evenodd"/><path stroke="#000" stroke-linecap="round" stroke-width="3" d="m221.4 187.4-8-1.5"/><path class="hwStr1" stroke-width="3" d="m216.7 113.6-.8 1.5c-9.7 13-8.6 26-6.2 38.4l1.3 6.4c2.1 10.2 4 19.7 1.6 29.2l-.3 1.3a2 2 0 0 0 1.6 2.5l4.2.7c1 .2 2-.4 2.3-1.4l.4-1.7c2.8-11 .5-22-1.6-32.2l-1.2-5.9c-2.3-12-3-23 5-33.6l2.2-3-8.5-2.2Z" clip-rule="evenodd"/><path fill="#000" fill-opacity=".2" d="m213.5 186.6 7.9 1.5-1.5 6h-3.8l-3.9-2.1 1.3-5.4Z"/></svg>'
),
Headwear.HeadwearVariants.SCOUT,
_getHeadwearColor(scoutColor)
);
}
function _getScoutStyle(ScoutColors scoutColor) internal pure returns (string memory) {
(string memory lightColor, string memory baseColor) = _getScoutColor(scoutColor);
return
string.concat(
'<style>.headwearColorL { fill:',
lightColor,
'}.headwearColorB { fill:',
baseColor,
'}.hwStr1 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}</style>'
);
}
function _getScoutColor(ScoutColors scoutColor) internal pure returns (string memory, string memory) {
if (scoutColor == ScoutColors.GREEN) {
return (LensColors.lightGreen, LensColors.baseGreen);
} else if (scoutColor == ScoutColors.PURPLE) {
return (LensColors.lightPurple, LensColors.basePurple);
} else if (scoutColor == ScoutColors.BLUE) {
return (LensColors.lightBlue, LensColors.baseBlue);
} else if (scoutColor == ScoutColors.PINK) {
return (LensColors.lightPink, LensColors.basePink);
} else if (scoutColor == ScoutColors.GOLD) {
return (LensColors.lightGold, LensColors.baseGold);
} else {
revert(); // Avoid warnings.
}
}
function _getHeadwearColor(ScoutColors scoutColor) internal pure returns (Headwear.HeadwearColors) {
if (scoutColor == ScoutColors.GREEN) {
return Headwear.HeadwearColors.GREEN;
} else if (scoutColor == ScoutColors.PURPLE) {
return Headwear.HeadwearColors.PURPLE;
} else if (scoutColor == ScoutColors.BLUE) {
return Headwear.HeadwearColors.BLUE;
} else if (scoutColor == ScoutColors.PINK) {
return Headwear.HeadwearColors.PINK;
} else if (scoutColor == ScoutColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {
revert(); // Avoid warnings.
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -6,7 +6,7 @@ import {LensColors} from 'contracts/libraries/svgs/Profile/LensColors.sol';
library HeadwearSparkles {
enum SparklesColors {
LIGHT,
NONE,
GOLD
}
@@ -35,7 +35,7 @@ library HeadwearSparkles {
}
function _getSparklesColor(SparklesColors sparklesColor) internal pure returns (string memory) {
if (sparklesColor == SparklesColors.LIGHT) {
if (sparklesColor == SparklesColors.NONE) {
return LensColors.black;
} else if (sparklesColor == SparklesColors.GOLD) {
return LensColors.darkGold;
@@ -45,8 +45,8 @@ library HeadwearSparkles {
}
function _getHeadwearColor(SparklesColors sparklesColor) internal pure returns (Headwear.HeadwearColors) {
if (sparklesColor == SparklesColors.LIGHT) {
return Headwear.HeadwearColors.LIGHT;
if (sparklesColor == SparklesColors.NONE) {
return Headwear.HeadwearColors.NONE;
} else if (sparklesColor == SparklesColors.GOLD) {
return Headwear.HeadwearColors.GOLD;
} else {

View File

@@ -271,6 +271,16 @@ library ProfileSVG {
stringFaceVariant = 'Wow Tongue';
} else if (faceVariant == Face.FaceVariants.WOW) {
stringFaceVariant = 'Wow';
} else if (faceVariant == Face.FaceVariants.BABY) {
stringFaceVariant = 'Baby';
} else if (faceVariant == Face.FaceVariants.KAWAII) {
stringFaceVariant = 'Kawaii';
} else if (faceVariant == Face.FaceVariants.PIXIE) {
stringFaceVariant = 'Pixie';
} else if (faceVariant == Face.FaceVariants.TODDLER) {
stringFaceVariant = 'Toddler';
} else if (faceVariant == Face.FaceVariants.VAMP) {
stringFaceVariant = 'Vamp';
} else {
revert();
}
@@ -303,6 +313,26 @@ library ProfileSVG {
stringHeadwearVariant = 'Partyhat';
} else if (headwearVariant == Headwear.HeadwearVariants.ICECREAM) {
stringHeadwearVariant = 'Icecream';
} else if (headwearVariant == Headwear.HeadwearVariants.BEAR) {
stringHeadwearVariant = 'Bear';
} else if (headwearVariant == Headwear.HeadwearVariants.BEE) {
stringHeadwearVariant = 'Bee';
} else if (headwearVariant == Headwear.HeadwearVariants.BIRDIE) {
stringHeadwearVariant = 'Birdie';
} else if (headwearVariant == Headwear.HeadwearVariants.BRAINS) {
stringHeadwearVariant = 'Brains';
} else if (headwearVariant == Headwear.HeadwearVariants.BULL) {
stringHeadwearVariant = 'Bull';
} else if (headwearVariant == Headwear.HeadwearVariants.EARRINGS) {
stringHeadwearVariant = 'Earrings';
} else if (headwearVariant == Headwear.HeadwearVariants.LOTUS) {
stringHeadwearVariant = 'Lotus';
} else if (headwearVariant == Headwear.HeadwearVariants.MAJOR) {
stringHeadwearVariant = 'Major';
} else if (headwearVariant == Headwear.HeadwearVariants.SCOUT) {
stringHeadwearVariant = 'Scout';
} else if (headwearVariant == Headwear.HeadwearVariants.SHAMAN) {
stringHeadwearVariant = 'Shaman';
} else {
revert();
}
@@ -315,10 +345,6 @@ library ProfileSVG {
return '';
} else if (headwearColor == Headwear.HeadwearColors.GREEN) {
stringHeadwearColor = 'Green';
} else if (headwearColor == Headwear.HeadwearColors.LIGHT) {
stringHeadwearColor = 'Light';
} else if (headwearColor == Headwear.HeadwearColors.DARK) {
stringHeadwearColor = 'Dark';
} else if (headwearColor == Headwear.HeadwearColors.PURPLE) {
stringHeadwearColor = 'Purple';
} else if (headwearColor == Headwear.HeadwearColors.BLUE) {

View File

@@ -94,6 +94,20 @@ contract ProfileSVGGen is Test {
);
}
}
for (uint8 c = 0; c <= uint8(type(Skin.SkinColors).max) + 1; c++) {
uint256 seed = setVariant(uint8(Face.FaceVariants.BABY), Helpers.ComponentBytes.FACE) +
setColor(c, Helpers.ComponentBytes.SKIN);
string memory result = profileNFT.tryWithSeed(seed, c == uint8(Skin.SkinColors.GOLD));
vm.writeFile(string.concat(dir, 'faces/face_baby_', vm.toString(c), '.svg'), result);
}
for (uint8 c = 0; c <= uint8(type(Skin.SkinColors).max) + 1; c++) {
uint256 seed = setVariant(uint8(Face.FaceVariants.VAMP), Helpers.ComponentBytes.FACE) +
setColor(c, Helpers.ComponentBytes.SKIN);
string memory result = profileNFT.tryWithSeed(seed, c == uint8(Skin.SkinColors.GOLD));
vm.writeFile(string.concat(dir, 'faces/face_vamp_', vm.toString(c), '.svg'), result);
}
}
function testHandsAndBody() public {