mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-10 14:48:15 -05:00
misc: Profile SVG - new body Shibyua added
This commit is contained in:
@@ -7,6 +7,7 @@ import {BodyJacket} from './Body/BodyJacket.sol';
|
||||
import {BodyHoodie} from './Body/BodyHoodie.sol';
|
||||
import {BodyTanktop} from './Body/BodyTanktop.sol';
|
||||
import {BodyTShirt} from './Body/BodyTShirt.sol';
|
||||
import {BodyShibyua} from './Body/BodyShibyua.sol';
|
||||
|
||||
import {LensColors} from './LensColors.sol';
|
||||
|
||||
@@ -15,7 +16,8 @@ library Body {
|
||||
HOODIE,
|
||||
JACKET,
|
||||
TANKTOP,
|
||||
TSHIRT
|
||||
TSHIRT,
|
||||
SHIBYUA
|
||||
}
|
||||
|
||||
enum BodyColors {
|
||||
@@ -53,6 +55,8 @@ library Body {
|
||||
return BodyTanktop.getBody(handsVariant);
|
||||
} else if (bodyVariant == BodyVariants.TSHIRT) {
|
||||
return BodyTShirt.getBody(handsVariant);
|
||||
} else if (bodyVariant == BodyVariants.SHIBYUA) {
|
||||
return BodyShibyua.getBody(handsVariant);
|
||||
} else {
|
||||
revert(); // Avoid warnings.
|
||||
}
|
||||
@@ -68,7 +72,7 @@ library Body {
|
||||
'<style>.bodyColor1 {fill: ',
|
||||
getPrimaryBodyColor(bodyVariant, bodyColor),
|
||||
'}.bodyColor2 {fill: ',
|
||||
getSecondaryBodyColor(bodyColor),
|
||||
getSecondaryBodyColor(bodyVariant, bodyColor),
|
||||
'}.handsColor {fill: ',
|
||||
Skin.getSkinColor(Skin.SkinColors(uint8(handsColor))),
|
||||
'}.bStr1 {stroke: #000;stroke-linecap: round;stroke-miterlimit: 10;}.bStr2 {stroke: #000;stroke-linecap: round;stroke-linejoin: round;}.bStr3 {stroke: #000;stroke-linecap: round;stroke-opacity: .1;stroke-width: 2;}</style>'
|
||||
@@ -83,6 +87,8 @@ library Body {
|
||||
} else if (bodyColor == BodyColors.DARK) {
|
||||
if (bodyVariant == BodyVariants.JACKET) {
|
||||
return LensColors.lightGray;
|
||||
} else if (bodyVariant == BodyVariants.SHIBYUA) {
|
||||
return LensColors.gray;
|
||||
} else {
|
||||
return LensColors.dark;
|
||||
}
|
||||
@@ -98,11 +104,15 @@ library Body {
|
||||
}
|
||||
|
||||
// We don't need variant because this is only used in Jacket
|
||||
function getSecondaryBodyColor(BodyColors bodyColor) public pure returns (string memory) {
|
||||
function getSecondaryBodyColor(BodyVariants bodyVariant, BodyColors bodyColor) public pure returns (string memory) {
|
||||
if (bodyColor == BodyColors.GREEN) {
|
||||
return LensColors.darkGreen;
|
||||
} else if (bodyColor == BodyColors.LIGHT) {
|
||||
return LensColors.lightGray;
|
||||
if (bodyVariant == BodyVariants.SHIBYUA) {
|
||||
return LensColors.gray;
|
||||
} else {
|
||||
return LensColors.lightGray;
|
||||
}
|
||||
} else if (bodyColor == BodyColors.DARK) {
|
||||
return LensColors.dark;
|
||||
} else if (bodyColor == BodyColors.PINK) {
|
||||
|
||||
21
contracts/libraries/svgs/Profile/Body/BodyShibyua.sol
Normal file
21
contracts/libraries/svgs/Profile/Body/BodyShibyua.sol
Normal file
@@ -0,0 +1,21 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import {Hands} from '../Hands.sol';
|
||||
|
||||
library BodyShibyua {
|
||||
function getBody(Hands.HandsVariants handsVariant) public pure returns (string memory) {
|
||||
if (handsVariant == Hands.HandsVariants.HANDSDOWN) {
|
||||
return
|
||||
'<path class="handsColor" d="m55.9 209.2 13.9 6.7-4.5 17.8 2 12-3 5.8-8.4 1.4H44.4l-9.4-7.2 1.5-13.4 10.4-6.8 9-16.3Zm98.3 1-14 6.7 4.5 17.8-2 12 3 4.8 8.5 2.4h11.4l9.4-7.2-1.5-13.5-10.4-6.7-9-16.3Z"/><path class="bStr1" stroke-width="4" d="M55.9 209.4c-2.6 4.3-5.1 8.6-7.7 13.5a16.2 16.2 0 0 1-6 5.8 15 15 0 0 0-7 10.1 13.6 13.6 0 0 0 7.4 14.1c4.2 2 9.5 1.4 13.3-1.2"/><path class="bStr1" stroke-width="2" d="M57.8 247.6a11.2 11.2 0 0 1-5 4.8m99.4-4.8a11 11 0 0 0 5 4.8"/><path class="bStr1" stroke-width="4" d="M56 251.7a8 8 0 0 0 7.9 0 7.1 7.1 0 0 0 3.7-6.5m86.4-35.8c2.5 4.3 5 8.6 7.6 13.5 1.3 2.5 3.7 4.3 6.1 5.8a15 15 0 0 1 7 10.1c.9 5.6-2.2 11.6-7.4 14.1-4.2 2-9.6 1.4-13.3-1.2m-.2 0a8 8 0 0 1-7.8 0c-2.4-1.4-3.9-3.3-3.8-6"/><path class="bodyColor2" d="m68.8 187.6 20.5-5.6h29.5l20.5 5.6 10 8.2 5 7 5.5 11.8 3.7 4.2 2.9 4.7-7.7 6.2-13.3 3.8v8l-5 5.6-8.8 4.2-11.9 4.6-12.9 1.6H97L84.2 254l-13.6-7-6.5-5.7V233l-14.2-3.6-6.6-6.2 5.5-7.6 5.3-9.4 8.5-13.3 6.2-5.3Z"/><path class="bStr2" stroke-width="4" d="m65.2 233.5 6.7-24.6"/><path class="bodyColor1" d="M126.3 227.2c6 5.7 8.8 15.2 5.1 22.6l.3.7a64.3 64.3 0 0 1-53.4 0l.3-.7c-3.6-7.4-.9-17 5-22.6 6-5.7 11.8-7.7 21.4-7.7 9.6 0 15.4 2 21.3 7.7Z"/><path class="bStr2" stroke-width="3" d="M78.6 249.8c-3.6-7.4-.9-17 5-22.6 6-5.7 11.8-7.7 21.4-7.7m26.4 30.3c3.7-7.4 1-17-5-22.6-6-5.7-11.8-7.7-21.4-7.7"/><path class="bStr2" stroke-width="4" d="M69.4 187.8c-5.6 1.8-9.7 6.9-12.7 12.2-3 5.3-5 11.1-8.5 16.1a10.4 10.4 0 0 0-4.9 7.3c5.3 5.7 14 9 22.1 9.2-.7 3-1.5 6 0 8.5a16 16 0 0 0 5.5 6 67.4 67.4 0 0 0 34 10.4"/><path class="bStr2" stroke-width="4" d="M140.3 187.8c5.6 1.8 9.7 6.9 12.7 12.2 3 5.3 5 11.1 8.5 16.1 2.6 1.6 4.4 4.3 5 7.3-5.3 5.7-14.1 9-22.2 9.2.7 3 1.5 6 0 8.5-1.5 2.6-3 4.5-5.5 6a66.8 66.8 0 0 1-34 10.4m39.8-24-6.8-24.6"/><path stroke="#000" stroke-linecap="round" stroke-width="2" d="M49.3 216.5s2.3 2 4 3c1.8 1 5.5 2 5.5 2m101-5s-2.3 2-4 3c-1.8 1-5.5 2-5.5 2"/><path fill="#fff" fill-rule="evenodd" d="M125.5 205.3c7.4-1.4 14.7-8 17.5-15.8 0 0-7.2-3.8-12.2-5.2-9.9-2.8-25.6-1.5-25.6-1.5s-15.5-.7-24.8 1.5a86.5 86.5 0 0 0-13.6 5.2 25.4 25.4 0 0 0 17.5 15.8c6.2 1.3 12.9-.8 18-5.4a6.6 6.6 0 0 0 2.9-3.9 8.4 8.4 0 0 0 2.3 3.9 20.9 20.9 0 0 0 18 5.4Z" clip-rule="evenodd"/><path class="bStr2" stroke-width="3.5" d="M66.8 189.5a25.4 25.4 0 0 0 17.5 15.8c6.2 1.3 12.9-.8 18-5.4a25 25 0 0 0 2.6-2.8m38.1-7.6a25.4 25.4 0 0 1-17.5 15.8 20.9 20.9 0 0 1-18-5.4c-1-.9-1.8-1.8-2.6-2.8"/><path class="bStr2" stroke-width="2.5" d="M89.4 199.7a16 16 0 0 0 5-5.5M82 197.5c1.3-.8 2.4-2 3.1-3.4m35.1 5.6a16 16 0 0 1-5-5.5m12.4 3.3c-1.3-.8-2.4-2-3.1-3.4"/><path class="bStr2" stroke-width="4" d="M69.4 187.8s4.5-6.3 35.5-6.3 35.4 6.3 35.4 6.3"/></svg>';
|
||||
} else if (handsVariant == Hands.HandsVariants.PEACEDOUBLE) {
|
||||
return
|
||||
'<path class="bodyColor2" d="m68.8 187.6 20.5-5.6h29.5l20.5 5.6 10 8.2 5 7 5.5 11.8 4.3 4-7.4 5.9-13 4 1.7 5v8l-5 5.6-8.8 4.2-11.9 4.6-12.9 1.6H97L84.2 254l-13.6-7-6.5-5.7 3-13-13.7-2.8-7-5.3 2.4-4.7 5.3-9.4 8.5-13.3 6.2-5.3Z"/><path class="bStr2" stroke-width="4" d="m66.2 233.5 6.7-24.6"/><path class="bodyColor1" d="M126.3 227.2c6 5.7 8.8 15.2 5.1 22.6l.3.7a64.3 64.3 0 0 1-53.4 0l.3-.7c-3.6-7.4-.9-17 5-22.6 6-5.7 11.8-7.7 21.4-7.7 9.6 0 15.4 2 21.3 7.7Z"/><path class="bStr2" stroke-width="3" d="M78.6 249.8c-3.6-7.4-.9-17 5-22.6 6-5.7 11.8-7.7 21.4-7.7m26.4 30.3c3.7-7.4 1-17-5-22.6-6-5.7-11.8-7.7-21.4-7.7"/><path class="bStr2" stroke-width="4" d="M69.4 187.8c-5.6 1.8-9.7 6.9-12.7 12.2-3 5.3-5 11.1-8.5 16.1-2.6 1.6-2 1.2-2.5 4.1 4.5 5 21.8 7.9 21.8 7.9l-1.1 4.5s-1.5 7.4 0 10c1.5 2.5 2 3 4.5 4.5a67.4 67.4 0 0 0 34 10.4"/><path class="bStr2" stroke-width="4" d="M140.3 187.8c5.6 1.8 9.7 6.9 12.7 12.2 3 5.3 5 11.1 8.5 16.1 2.6 1.6 1.3 1.2 1.8 4.1-4.5 5-20.2 7.9-20.2 7.9l1.2 4.5c.7 3 1.5 6 0 8.5-1.5 2.6-3 4.5-5.5 6a66.8 66.8 0 0 1-34 10.4m39.8-24-6.8-24.6"/><path stroke="#000" stroke-linecap="round" stroke-width="2" d="M49.3 216.5s2.3 2 4 3c1.8 1 5.5 2 5.5 2m101-5s-2.3 2-4 3c-1.8 1-5.5 2-5.5 2"/><path fill="#fff" fill-rule="evenodd" d="M125.5 205.3c7.4-1.4 14.7-8 17.5-15.8 0 0-7.2-3.8-12.2-5.2-9.9-2.8-25.6-1.5-25.6-1.5s-15.5-.7-24.8 1.5a86.5 86.5 0 0 0-13.6 5.2 25.4 25.4 0 0 0 17.5 15.8c6.2 1.3 12.9-.8 18-5.4a6.6 6.6 0 0 0 2.9-3.9 8.4 8.4 0 0 0 2.3 3.9 20.9 20.9 0 0 0 18 5.4Z" clip-rule="evenodd"/><path class="bStr2" stroke-width="3.5" d="M66.8 189.5a25.4 25.4 0 0 0 17.5 15.8c6.2 1.3 12.9-.8 18-5.4a25 25 0 0 0 2.6-2.8m38.1-7.6a25.4 25.4 0 0 1-17.5 15.8 20.9 20.9 0 0 1-18-5.4c-1-.9-1.8-1.8-2.6-2.8"/><path class="bStr2" stroke-width="2.5" d="M89.4 199.7a16 16 0 0 0 5-5.5M82 197.5c1.3-.8 2.4-2 3.1-3.4m35.1 5.6a16 16 0 0 1-5-5.5m12.4 3.3c-1.3-.8-2.4-2-3.1-3.4"/><path class="bStr2" stroke-width="4" d="M69.4 187.8s4.5-6.3 35.5-6.3 35.4 6.3 35.4 6.3"/></svg>';
|
||||
} else if (handsVariant == Hands.HandsVariants.PEACESINGLE) {
|
||||
return
|
||||
'<path class="handsColor" d="m55.9 209.2 13.9 6.7-4.5 17.8 2 12-3 5.8-8.4 1.4H44.4l-9.4-7.2 1.5-13.4 10.4-6.8 9-16.3Z"/><path class="bStr1" stroke-width="4" d="M55.9 209.4c-2.6 4.3-5.1 8.6-7.7 13.5a16.2 16.2 0 0 1-6 5.8 15 15 0 0 0-7 10.1 13.6 13.6 0 0 0 7.4 14.1c4.2 2 9.5 1.4 13.3-1.2"/><path class="bStr1" stroke-width="2" d="M57.8 247.6a11.2 11.2 0 0 1-5 4.8"/><path class="bStr1" stroke-width="4" d="M56 251.7a8 8 0 0 0 7.9 0 7.1 7.1 0 0 0 3.7-6.5"/><path class="bodyColor2" d="m68.8 187.6 20.5-5.6h29.5l20.5 5.6 10 8.2 5 7 5.5 11.8 4.3 4-7.4 5.9-13 4 1.7 5v8l-5 5.6-8.8 4.2-11.9 4.6-12.9 1.6H97L84.2 254l-13.6-7-6.5-5.7V233l-14.2-3.6-6.6-6.2 5.5-7.6 5.3-9.4 8.5-13.3 6.2-5.3Z"/><path class="bStr2" stroke-width="4" d="m66.2 233.5 6.7-24.6"/><path class="bodyColor1" d="M126.3 227.2c6 5.7 8.8 15.2 5.1 22.6l.3.7a64.3 64.3 0 0 1-53.4 0l.3-.7c-3.6-7.4-.9-17 5-22.6 6-5.7 11.8-7.7 21.4-7.7 9.6 0 15.4 2 21.3 7.7Z"/><path class="bStr2" stroke-width="3" d="M78.6 249.8c-3.6-7.4-.9-17 5-22.6 6-5.7 11.8-7.7 21.4-7.7m26.4 30.3c3.7-7.4 1-17-5-22.6-6-5.7-11.8-7.7-21.4-7.7"/><path class="bStr2" stroke-width="4" d="M69.4 187.8c-5.6 1.8-9.7 6.9-12.7 12.2-3 5.3-5 11.1-8.5 16.1a10.4 10.4 0 0 0-4.9 7.3c5.3 5.7 15 9.1 23.1 9.2-.7 3-1.5 7.4 0 10 1.5 2.5 2 3 4.5 4.5a67.4 67.4 0 0 0 34 10.4"/><path class="bStr2" stroke-width="4" d="M140.3 187.8c5.6 1.8 9.7 6.9 12.7 12.2 3 5.3 5 11.1 8.5 16.1 2.6 1.6 1.3 1.2 1.8 4.1-4.5 5-20.2 7.9-20.2 7.9l1.2 4.5c.7 3 1.5 6 0 8.5-1.5 2.6-3 4.5-5.5 6a66.8 66.8 0 0 1-34 10.4m39.8-24-6.8-24.6"/><path stroke="#000" stroke-linecap="round" stroke-width="2" d="M49.3 216.5s2.3 2 4 3c1.8 1 5.5 2 5.5 2m101-5s-2.3 2-4 3c-1.8 1-5.5 2-5.5 2"/><path fill="#fff" fill-rule="evenodd" d="M125.5 205.3c7.4-1.4 14.7-8 17.5-15.8 0 0-7.2-3.8-12.2-5.2-9.9-2.8-25.6-1.5-25.6-1.5s-15.5-.7-24.8 1.5a86.5 86.5 0 0 0-13.6 5.2 25.4 25.4 0 0 0 17.5 15.8c6.2 1.3 12.9-.8 18-5.4a6.6 6.6 0 0 0 2.9-3.9 8.4 8.4 0 0 0 2.3 3.9 20.9 20.9 0 0 0 18 5.4Z" clip-rule="evenodd"/><path class="bStr2" stroke-width="3.5" d="M66.8 189.5a25.4 25.4 0 0 0 17.5 15.8c6.2 1.3 12.9-.8 18-5.4a25 25 0 0 0 2.6-2.8m38.1-7.6a25.4 25.4 0 0 1-17.5 15.8 20.9 20.9 0 0 1-18-5.4c-1-.9-1.8-1.8-2.6-2.8"/><path class="bStr2" stroke-width="2.5" d="M89.4 199.7a16 16 0 0 0 5-5.5M82 197.5c1.3-.8 2.4-2 3.1-3.4m35.1 5.6a16 16 0 0 1-5-5.5m12.4 3.3c-1.3-.8-2.4-2-3.1-3.4"/><path class="bStr2" stroke-width="4" d="M69.4 187.8s4.5-6.3 35.5-6.3 35.4 6.3 35.4 6.3"/></svg>';
|
||||
} else {
|
||||
revert(); // Avoid warnings.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ library Hands {
|
||||
}
|
||||
|
||||
function _getRightHand(Body.BodyVariants bodyVariant) internal pure returns (string memory) {
|
||||
if (bodyVariant == Body.BodyVariants.HOODIE) {
|
||||
if (bodyVariant == Body.BodyVariants.HOODIE || bodyVariant == Body.BodyVariants.SHIBYUA) {
|
||||
return
|
||||
'<path class="handsColor" d="M180.8 202.2c.1.4-.5 3.7-2.3 7-1.1 2-2.7 4.2-4.8 5.5-5.6 3.6-10 3.5-17 1.9a25 25 0 0 1-11.9-6.7 17.5 17.5 0 0 1-3.6-6c-.6-1.6.3-3.8-.5-5.3-1.9-3.2.5-6.9.5-6.9l2-4.6 3.4-3.5c0-3 .4-5.4 0-11.7-.4-7.3-1-10.1 0-12.5 3.1-7.7 12.8-6.6 15.7 0 .8 1.9.6 7.8.6 7.8v15l4-15s1.7-7 3-8.6a7.8 7.8 0 0 1 14.2 4.2c.3 2.5-.7 4.7-3 11.6l-3.2 9.3c5.1 2.4 8.4 10.9 3.6 17.7l-.7.8Z"/><path class="armColor" d="M164.4 219.5c-1.2 1.8-2.1 5.2-3.6 7-4.3 4.9-14.5 1.4-14.5 1.4l-.2-4.5-1.5-2.5v-3.5l1.7-4.5s2.6 1.4 8.1 2.6c6 1.6 16.7 1 16.7 1s-2.5-3-5.4.7c-1 1.3 1 1.2-1.3 2.3Z"/><path class="hLine3" d="M149.6 202.6h.8c1.6 0 3.5-.4 5.3-1 5.3-2.1 10.2-6.8 6.3-12.9a7 7 0 0 0-6.1-3.2c-3.3.3-4.6 2.3-8 2.8m-1.2-4.7c0-3 0-5.3-.5-11.6-.5-7.3-1-10.2 0-12.5 3-7.7 12.7-7 15.5-.4.8 1.9 1 8.4 1 8.4v14.9m15.2 1.3 3.3-9.3c2.2-7 3.2-9 2.9-11.6-.9-8.2-10.4-9.6-14.7-3.8a40 40 0 0 0-2.8 8.3l-4 15m18.2 20 .7-1c4.8-6.7 1.5-15.2-3.6-17.6"/><path class="hLine3" d="M180.8 202.2c.1.4-.5 3.7-2.3 7-1.1 2-2.7 4.2-4.8 5.5-5.6 3.6-14.7 3.2-22.7 0"/><path class="hLine4" d="M165.6 218c-3 11-16.3 13-22.3 7.4"/><path class="hLine3" d="M146.6 183.6c-2.7.6-6.7 7.7-6 15 1.6 13.8 10.8 16.9 16 17.9m8.5-15.6c2 3.4 11.5 7 17-.5"/>';
|
||||
} else if (bodyVariant == Body.BodyVariants.JACKET) {
|
||||
@@ -70,7 +70,7 @@ library Hands {
|
||||
}
|
||||
|
||||
function _getLeftHand(Body.BodyVariants bodyVariant) internal pure returns (string memory) {
|
||||
if (bodyVariant == Body.BodyVariants.HOODIE) {
|
||||
if (bodyVariant == Body.BodyVariants.HOODIE || bodyVariant == Body.BodyVariants.SHIBYUA) {
|
||||
return
|
||||
'<path class="handsColor" d="M28.3 202.2c0 .4.5 3.7 2.3 7 1.2 2 2.7 4.2 4.9 5.5 5.5 3.6 10 3.5 16.9 1.9a25 25 0 0 0 11.9-6.7c1.8-1.8 2.7-3.9 3.6-6 .7-1.6-.3-3.8.6-5.3 1.8-3.2-.6-6.9-.6-6.9l-2-4.6-3.4-3.5c0-3-.4-5.4 0-11.7.5-7.3 1-10.1 0-12.5-3-7.7-12.8-6.6-15.7 0-.7 1.9-.5 7.8-.5 7.8v15l-4-15s-1.8-7-3-8.6a7.8 7.8 0 0 0-14.3 4.2c-.2 2.5.7 4.7 3 11.6l3.2 9.3c-5 2.4-8.4 10.9-3.5 17.7l.6.8Z"/><path class="armColor" d="M44.8 219.5c1 1.8 2 5.2 3.5 7 4.3 4.9 14.5 1.4 14.5 1.4l.3-4.5 1.5-2.5v-3.5l-1.8-4.5s-2.6 1.4-8.1 2.6c-6 1.6-16.6 1-16.6 1s2.4-3 5.4.7c1 1.3-1.1 1.2 1.3 2.3Z"/><path class="hLine3" d="M59.5 202.6a15.7 15.7 0 0 1-6-1c-5.4-2.1-10.3-6.8-6.4-12.9a7 7 0 0 1 6.1-3.2c3.4.3 4.7 2.3 8 2.8m1.2-4.7c0-3 .1-5.3.5-11.6.5-7.3 1-10.2 0-12.5-3-7.7-12.7-7-15.5-.4a39 39 0 0 0-.9 8.4v14.9m-15.3 1.3-3.2-9.3c-2.3-7-3.2-9-3-11.6.9-8.2 10.4-9.6 14.7-3.8 1.2 1.6 2.9 8.3 2.9 8.3l3.9 15m-18.2 20a12 12 0 0 1-.6-1c-5-6.7-1.6-15.2 3.5-17.6"/><path class="hLine3" d="M28.3 202.2c0 .4.5 3.7 2.3 7 1.2 2 2.7 4.2 4.9 5.5 5.5 3.6 14.6 3.2 22.6 0"/><path class="hLine4" d="M43.6 218c3 11 16.9 13 22.9 7.4"/><path class="hLine3" d="M62.5 183.6c2.8.6 6.7 7.7 6 15-1.5 13.8-10.8 16.9-16 17.9m-8.4-15.6c-2.1 3.4-11.5 7-17-.5"/>';
|
||||
} else if (bodyVariant == Body.BodyVariants.JACKET) {
|
||||
@@ -102,6 +102,7 @@ library Hands {
|
||||
);
|
||||
}
|
||||
|
||||
// Arm or sleeve color (depends on which clothing on body)
|
||||
function _getArmColor(
|
||||
HandsColors handsColor,
|
||||
Body.BodyVariants bodyVariant,
|
||||
@@ -114,7 +115,9 @@ library Hands {
|
||||
} else if (bodyVariant == Body.BodyVariants.TANKTOP) {
|
||||
return Skin.getSkinColor(Skin.SkinColors(uint8(handsColor)));
|
||||
} else if (bodyVariant == Body.BodyVariants.JACKET) {
|
||||
return Body.getSecondaryBodyColor(bodyColor);
|
||||
return Body.getSecondaryBodyColor(bodyVariant, bodyColor);
|
||||
} else if (bodyVariant == Body.BodyVariants.SHIBYUA) {
|
||||
return Body.getSecondaryBodyColor(bodyVariant, bodyColor);
|
||||
} else {
|
||||
revert(); // Avoid warnings.
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ library Logo {
|
||||
return getLogoTshirtTanktop(logoVariant, logoColor);
|
||||
} else if (bodyVariant == Body.BodyVariants.JACKET) {
|
||||
return getLogoJacket(logoVariant, logoColor);
|
||||
} else if (bodyVariant == Body.BodyVariants.SHIBYUA) {
|
||||
return ''; // No logo for Shibyua
|
||||
} else {
|
||||
revert(); // Avoid warnings.
|
||||
}
|
||||
|
||||
@@ -81,12 +81,16 @@ library ProfileSVG {
|
||||
string memory stringBackgroundColor;
|
||||
if (backgroundColor == Background.BackgroundColors.GREEN) {
|
||||
stringBackgroundColor = 'Green';
|
||||
} else if (backgroundColor == Background.BackgroundColors.PINK) {
|
||||
stringBackgroundColor = 'Pink';
|
||||
} else if (backgroundColor == Background.BackgroundColors.PURPLE) {
|
||||
stringBackgroundColor = 'Purple';
|
||||
} else if (backgroundColor == Background.BackgroundColors.BLUE) {
|
||||
stringBackgroundColor = 'Blue';
|
||||
} else if (backgroundColor == Background.BackgroundColors.GOLD) {
|
||||
stringBackgroundColor = 'Gold';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Background","value":"', stringBackgroundColor, '"},');
|
||||
}
|
||||
@@ -95,12 +99,16 @@ library ProfileSVG {
|
||||
string memory stringSkinColor;
|
||||
if (skinColor == Skin.SkinColors.GREEN) {
|
||||
stringSkinColor = 'Green';
|
||||
} else if (skinColor == Skin.SkinColors.PINK) {
|
||||
stringSkinColor = 'Pink';
|
||||
} else if (skinColor == Skin.SkinColors.PURPLE) {
|
||||
stringSkinColor = 'Purple';
|
||||
} else if (skinColor == Skin.SkinColors.BLUE) {
|
||||
stringSkinColor = 'Blue';
|
||||
} else if (skinColor == Skin.SkinColors.GOLD) {
|
||||
stringSkinColor = 'Gold';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Skin","value":"', stringSkinColor, '"},');
|
||||
}
|
||||
@@ -113,6 +121,14 @@ library ProfileSVG {
|
||||
stringLegColor = 'Dark';
|
||||
} else if (legColor == Legs.LegColors.LIGHT) {
|
||||
stringLegColor = 'Light';
|
||||
} else if (legColor == Legs.LegColors.PURPLE) {
|
||||
stringLegColor = 'Purple';
|
||||
} else if (legColor == Legs.LegColors.BLUE) {
|
||||
stringLegColor = 'Blue';
|
||||
} else if (legColor == Legs.LegColors.PINK) {
|
||||
stringLegColor = 'Pink';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Legs","value":"', stringLegColor, '"},');
|
||||
}
|
||||
@@ -125,6 +141,14 @@ library ProfileSVG {
|
||||
stringShoeColor = 'Dark';
|
||||
} else if (shoeColor == Shoes.ShoeColors.LIGHT) {
|
||||
stringShoeColor = 'Light';
|
||||
} else if (shoeColor == Shoes.ShoeColors.PURPLE) {
|
||||
stringShoeColor = 'Purple';
|
||||
} else if (shoeColor == Shoes.ShoeColors.BLUE) {
|
||||
stringShoeColor = 'Blue';
|
||||
} else if (shoeColor == Shoes.ShoeColors.PINK) {
|
||||
stringShoeColor = 'Pink';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Shoes","value":"', stringShoeColor, '"},');
|
||||
}
|
||||
@@ -137,6 +161,8 @@ library ProfileSVG {
|
||||
stringHandsVariant = 'Double Peace';
|
||||
} else if (handsVariant == Hands.HandsVariants.PEACESINGLE) {
|
||||
stringHandsVariant = 'Peace';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Hands","value":"', stringHandsVariant, '"},');
|
||||
}
|
||||
@@ -151,6 +177,10 @@ library ProfileSVG {
|
||||
stringBodyVariant = 'Tanktop';
|
||||
} else if (bodyVariant == Body.BodyVariants.TSHIRT) {
|
||||
stringBodyVariant = 'Tshirt';
|
||||
} else if (bodyVariant == Body.BodyVariants.SHIBYUA) {
|
||||
stringBodyVariant = 'Shibyua';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Body","value":"', stringBodyVariant, '"},');
|
||||
}
|
||||
@@ -167,6 +197,10 @@ library ProfileSVG {
|
||||
stringBodyColor = 'Purple';
|
||||
} else if (bodyColor == Body.BodyColors.BLUE) {
|
||||
stringBodyColor = 'Blue';
|
||||
} else if (bodyColor == Body.BodyColors.PINK) {
|
||||
stringBodyColor = 'Pink';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Body Color","value":"', stringBodyColor, '"},');
|
||||
}
|
||||
@@ -181,6 +215,8 @@ library ProfileSVG {
|
||||
stringLogoVariant = 'Lens';
|
||||
} else if (logoVariant == Logo.LogoVariants.PEACE) {
|
||||
stringLogoVariant = 'Peace';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Logo","value":"', stringLogoVariant, '"},');
|
||||
}
|
||||
@@ -189,6 +225,8 @@ library ProfileSVG {
|
||||
string memory stringLogoColor;
|
||||
if (logoColor == Logo.LogoColors.GREEN) {
|
||||
stringLogoColor = 'Green';
|
||||
} else if (logoColor == Logo.LogoColors.PINK) {
|
||||
stringLogoColor = 'Pink';
|
||||
} else if (logoColor == Logo.LogoColors.PURPLE) {
|
||||
stringLogoColor = 'Purple';
|
||||
} else if (logoColor == Logo.LogoColors.BLUE) {
|
||||
@@ -197,6 +235,8 @@ library ProfileSVG {
|
||||
stringLogoColor = 'Light';
|
||||
} else if (logoColor == Logo.LogoColors.DARK) {
|
||||
stringLogoColor = 'Dark';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Logo Color","value":"', stringLogoColor, '"},');
|
||||
}
|
||||
@@ -231,6 +271,8 @@ library ProfileSVG {
|
||||
stringFaceVariant = 'Wow Tongue';
|
||||
} else if (faceVariant == Face.FaceVariants.WOW) {
|
||||
stringFaceVariant = 'Wow';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat('{"trait_type":"Face","value":"', stringFaceVariant, '"}');
|
||||
}
|
||||
@@ -261,6 +303,8 @@ library ProfileSVG {
|
||||
stringHeadwearVariant = 'Partyhat';
|
||||
} else if (headwearVariant == Headwear.HeadwearVariants.ICECREAM) {
|
||||
stringHeadwearVariant = 'Icecream';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat(',{"trait_type":"Headwear","value":"', stringHeadwearVariant, '"}');
|
||||
}
|
||||
@@ -279,8 +323,12 @@ library ProfileSVG {
|
||||
stringHeadwearColor = 'Purple';
|
||||
} else if (headwearColor == Headwear.HeadwearColors.BLUE) {
|
||||
stringHeadwearColor = 'Blue';
|
||||
} else if (headwearColor == Headwear.HeadwearColors.PINK) {
|
||||
stringHeadwearColor = 'Pink';
|
||||
} else if (headwearColor == Headwear.HeadwearColors.GOLD) {
|
||||
stringHeadwearColor = 'Gold';
|
||||
} else {
|
||||
revert();
|
||||
}
|
||||
return string.concat(',{"trait_type":"Headwear Color","value":"', stringHeadwearColor, '"}');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user