@testpig/avataaars 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/avataaars.iml +12 -0
- package/.idea/codeStyles/Project.xml +67 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/git_toolbox_blame.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierrc +10 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/settings.json +14 -0
- package/LICENSE +21 -0
- package/README.md +80 -0
- package/dist/avatar/Avatar.d.ts +5 -0
- package/dist/avatar/Avatar.js +60 -0
- package/dist/avatar/AvatarContext.d.ts +4 -0
- package/dist/avatar/AvatarContext.js +8 -0
- package/dist/avatar/AvatarProps.d.ts +25 -0
- package/dist/avatar/AvatarProps.js +2 -0
- package/dist/avatar/Color.d.ts +7 -0
- package/dist/avatar/Color.js +30 -0
- package/dist/avatar/Skin.d.ts +5 -0
- package/dist/avatar/Skin.js +37 -0
- package/dist/avatar/SkinColor.d.ts +10 -0
- package/dist/avatar/SkinColor.js +13 -0
- package/dist/avatar/clothes/BlazerShirt.d.ts +1 -0
- package/dist/avatar/clothes/BlazerShirt.js +21 -0
- package/dist/avatar/clothes/BlazerSweater.d.ts +1 -0
- package/dist/avatar/clothes/BlazerSweater.js +21 -0
- package/dist/avatar/clothes/ClotheColor.d.ts +4 -0
- package/dist/avatar/clothes/ClotheColor.js +53 -0
- package/dist/avatar/clothes/ClotheColorName.d.ts +18 -0
- package/dist/avatar/clothes/ClotheColorName.js +21 -0
- package/dist/avatar/clothes/ClotheType.d.ts +12 -0
- package/dist/avatar/clothes/ClotheType.js +15 -0
- package/dist/avatar/clothes/Clothes.d.ts +1 -0
- package/dist/avatar/clothes/Clothes.js +43 -0
- package/dist/avatar/clothes/CollarSweater.d.ts +1 -0
- package/dist/avatar/clothes/CollarSweater.js +25 -0
- package/dist/avatar/clothes/GraphicShirt.d.ts +1 -0
- package/dist/avatar/clothes/GraphicShirt.js +28 -0
- package/dist/avatar/clothes/GraphicType.d.ts +14 -0
- package/dist/avatar/clothes/GraphicType.js +17 -0
- package/dist/avatar/clothes/Graphics.d.ts +21 -0
- package/dist/avatar/clothes/Graphics.js +105 -0
- package/dist/avatar/clothes/Hoodie.d.ts +1 -0
- package/dist/avatar/clothes/Hoodie.js +25 -0
- package/dist/avatar/clothes/Overall.d.ts +1 -0
- package/dist/avatar/clothes/Overall.js +25 -0
- package/dist/avatar/clothes/ShirtCrewNeck.d.ts +1 -0
- package/dist/avatar/clothes/ShirtCrewNeck.js +25 -0
- package/dist/avatar/clothes/ShirtScoopNeck.d.ts +1 -0
- package/dist/avatar/clothes/ShirtScoopNeck.js +25 -0
- package/dist/avatar/clothes/ShirtVNeck.d.ts +1 -0
- package/dist/avatar/clothes/ShirtVNeck.js +25 -0
- package/dist/avatar/clothes/index.d.ts +3 -0
- package/dist/avatar/clothes/index.js +12 -0
- package/dist/avatar/face/Face.d.ts +1 -0
- package/dist/avatar/face/Face.js +25 -0
- package/dist/avatar/face/eyebrow/Angry.d.ts +1 -0
- package/dist/avatar/face/eyebrow/Angry.js +18 -0
- package/dist/avatar/face/eyebrow/AngryNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/AngryNatural.js +18 -0
- package/dist/avatar/face/eyebrow/Default.d.ts +1 -0
- package/dist/avatar/face/eyebrow/Default.js +18 -0
- package/dist/avatar/face/eyebrow/DefaultNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/DefaultNatural.js +18 -0
- package/dist/avatar/face/eyebrow/Eyebrow.d.ts +1 -0
- package/dist/avatar/face/eyebrow/Eyebrow.js +51 -0
- package/dist/avatar/face/eyebrow/EyebrowType.d.ts +15 -0
- package/dist/avatar/face/eyebrow/EyebrowType.js +18 -0
- package/dist/avatar/face/eyebrow/FlatNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/FlatNatural.js +18 -0
- package/dist/avatar/face/eyebrow/FrownNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/FrownNatural.js +18 -0
- package/dist/avatar/face/eyebrow/RaisedExcited.d.ts +1 -0
- package/dist/avatar/face/eyebrow/RaisedExcited.js +18 -0
- package/dist/avatar/face/eyebrow/RaisedExcitedNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/RaisedExcitedNatural.js +18 -0
- package/dist/avatar/face/eyebrow/SadConcerned.d.ts +1 -0
- package/dist/avatar/face/eyebrow/SadConcerned.js +18 -0
- package/dist/avatar/face/eyebrow/SadConcernedNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/SadConcernedNatural.js +18 -0
- package/dist/avatar/face/eyebrow/UnibrowNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/UnibrowNatural.js +18 -0
- package/dist/avatar/face/eyebrow/UpDown.d.ts +1 -0
- package/dist/avatar/face/eyebrow/UpDown.js +18 -0
- package/dist/avatar/face/eyebrow/UpDownNatural.d.ts +1 -0
- package/dist/avatar/face/eyebrow/UpDownNatural.js +18 -0
- package/dist/avatar/face/eyebrow/index.d.ts +2 -0
- package/dist/avatar/face/eyebrow/index.js +10 -0
- package/dist/avatar/face/eyes/Close.d.ts +1 -0
- package/dist/avatar/face/eyes/Close.js +18 -0
- package/dist/avatar/face/eyes/Cry.d.ts +1 -0
- package/dist/avatar/face/eyes/Cry.js +18 -0
- package/dist/avatar/face/eyes/Default.d.ts +1 -0
- package/dist/avatar/face/eyes/Default.js +18 -0
- package/dist/avatar/face/eyes/Dizzy.d.ts +1 -0
- package/dist/avatar/face/eyes/Dizzy.js +18 -0
- package/dist/avatar/face/eyes/EyeRoll.d.ts +1 -0
- package/dist/avatar/face/eyes/EyeRoll.js +18 -0
- package/dist/avatar/face/eyes/EyeType.d.ts +15 -0
- package/dist/avatar/face/eyes/EyeType.js +18 -0
- package/dist/avatar/face/eyes/Eyes.d.ts +1 -0
- package/dist/avatar/face/eyes/Eyes.js +51 -0
- package/dist/avatar/face/eyes/Happy.d.ts +1 -0
- package/dist/avatar/face/eyes/Happy.js +18 -0
- package/dist/avatar/face/eyes/Hearts.d.ts +1 -0
- package/dist/avatar/face/eyes/Hearts.js +18 -0
- package/dist/avatar/face/eyes/Side.d.ts +1 -0
- package/dist/avatar/face/eyes/Side.js +18 -0
- package/dist/avatar/face/eyes/Squint.d.ts +1 -0
- package/dist/avatar/face/eyes/Squint.js +23 -0
- package/dist/avatar/face/eyes/Surprised.d.ts +1 -0
- package/dist/avatar/face/eyes/Surprised.js +18 -0
- package/dist/avatar/face/eyes/Wink.d.ts +1 -0
- package/dist/avatar/face/eyes/Wink.js +18 -0
- package/dist/avatar/face/eyes/WinkWacky.d.ts +1 -0
- package/dist/avatar/face/eyes/WinkWacky.js +18 -0
- package/dist/avatar/face/eyes/index.d.ts +2 -0
- package/dist/avatar/face/eyes/index.js +10 -0
- package/dist/avatar/face/index.d.ts +5 -0
- package/dist/avatar/face/index.js +26 -0
- package/dist/avatar/face/mouth/Concerned.d.ts +1 -0
- package/dist/avatar/face/mouth/Concerned.js +21 -0
- package/dist/avatar/face/mouth/Default.d.ts +1 -0
- package/dist/avatar/face/mouth/Default.js +18 -0
- package/dist/avatar/face/mouth/Disbelief.d.ts +1 -0
- package/dist/avatar/face/mouth/Disbelief.js +18 -0
- package/dist/avatar/face/mouth/Eating.d.ts +1 -0
- package/dist/avatar/face/mouth/Eating.js +18 -0
- package/dist/avatar/face/mouth/Grimace.d.ts +1 -0
- package/dist/avatar/face/mouth/Grimace.js +21 -0
- package/dist/avatar/face/mouth/Mouth.d.ts +1 -0
- package/dist/avatar/face/mouth/Mouth.js +51 -0
- package/dist/avatar/face/mouth/MouthType.d.ts +15 -0
- package/dist/avatar/face/mouth/MouthType.js +18 -0
- package/dist/avatar/face/mouth/Sad.d.ts +1 -0
- package/dist/avatar/face/mouth/Sad.js +18 -0
- package/dist/avatar/face/mouth/ScreamOpen.d.ts +1 -0
- package/dist/avatar/face/mouth/ScreamOpen.js +21 -0
- package/dist/avatar/face/mouth/Serious.d.ts +1 -0
- package/dist/avatar/face/mouth/Serious.js +18 -0
- package/dist/avatar/face/mouth/Smile.d.ts +1 -0
- package/dist/avatar/face/mouth/Smile.js +21 -0
- package/dist/avatar/face/mouth/Tongue.d.ts +1 -0
- package/dist/avatar/face/mouth/Tongue.js +21 -0
- package/dist/avatar/face/mouth/Twinkle.d.ts +1 -0
- package/dist/avatar/face/mouth/Twinkle.js +18 -0
- package/dist/avatar/face/mouth/Vomit.d.ts +1 -0
- package/dist/avatar/face/mouth/Vomit.js +23 -0
- package/dist/avatar/face/mouth/index.d.ts +2 -0
- package/dist/avatar/face/mouth/index.js +10 -0
- package/dist/avatar/face/nose/Default.d.ts +1 -0
- package/dist/avatar/face/nose/Default.js +18 -0
- package/dist/avatar/face/nose/index.d.ts +1 -0
- package/dist/avatar/face/nose/index.js +8 -0
- package/dist/avatar/index.d.ts +5 -0
- package/dist/avatar/index.js +25 -0
- package/dist/avatar/top/Eyepatch.d.ts +1 -0
- package/dist/avatar/top/Eyepatch.js +25 -0
- package/dist/avatar/top/HairColor.d.ts +5 -0
- package/dist/avatar/top/HairColor.js +43 -0
- package/dist/avatar/top/HairColorName.d.ts +13 -0
- package/dist/avatar/top/HairColorName.js +16 -0
- package/dist/avatar/top/Hat.d.ts +4 -0
- package/dist/avatar/top/Hat.js +29 -0
- package/dist/avatar/top/HatColor.d.ts +5 -0
- package/dist/avatar/top/HatColor.js +54 -0
- package/dist/avatar/top/HatColorName.d.ts +18 -0
- package/dist/avatar/top/HatColorName.js +21 -0
- package/dist/avatar/top/Hijab.d.ts +4 -0
- package/dist/avatar/top/Hijab.js +29 -0
- package/dist/avatar/top/LongHairBigHair.d.ts +4 -0
- package/dist/avatar/top/LongHairBigHair.js +31 -0
- package/dist/avatar/top/LongHairBob.d.ts +4 -0
- package/dist/avatar/top/LongHairBob.js +29 -0
- package/dist/avatar/top/LongHairBun.d.ts +4 -0
- package/dist/avatar/top/LongHairBun.js +29 -0
- package/dist/avatar/top/LongHairCurly.d.ts +4 -0
- package/dist/avatar/top/LongHairCurly.js +29 -0
- package/dist/avatar/top/LongHairCurvy.d.ts +4 -0
- package/dist/avatar/top/LongHairCurvy.js +29 -0
- package/dist/avatar/top/LongHairDreads.d.ts +4 -0
- package/dist/avatar/top/LongHairDreads.js +29 -0
- package/dist/avatar/top/LongHairFrida.d.ts +4 -0
- package/dist/avatar/top/LongHairFrida.js +34 -0
- package/dist/avatar/top/LongHairFro.d.ts +4 -0
- package/dist/avatar/top/LongHairFro.js +30 -0
- package/dist/avatar/top/LongHairFroBand.d.ts +4 -0
- package/dist/avatar/top/LongHairFroBand.js +29 -0
- package/dist/avatar/top/LongHairMiaWallace.d.ts +4 -0
- package/dist/avatar/top/LongHairMiaWallace.js +29 -0
- package/dist/avatar/top/LongHairNotTooLong.d.ts +4 -0
- package/dist/avatar/top/LongHairNotTooLong.js +29 -0
- package/dist/avatar/top/LongHairShavedSides.d.ts +4 -0
- package/dist/avatar/top/LongHairShavedSides.js +32 -0
- package/dist/avatar/top/LongHairStraight.d.ts +4 -0
- package/dist/avatar/top/LongHairStraight.js +29 -0
- package/dist/avatar/top/LongHairStraight2.d.ts +4 -0
- package/dist/avatar/top/LongHairStraight2.js +30 -0
- package/dist/avatar/top/LongHairStraightStrand.d.ts +4 -0
- package/dist/avatar/top/LongHairStraightStrand.js +30 -0
- package/dist/avatar/top/NoHair.d.ts +4 -0
- package/dist/avatar/top/NoHair.js +27 -0
- package/dist/avatar/top/PrinceCut.d.ts +4 -0
- package/dist/avatar/top/PrinceCut.js +29 -0
- package/dist/avatar/top/ShortHairDreads01.d.ts +4 -0
- package/dist/avatar/top/ShortHairDreads01.js +30 -0
- package/dist/avatar/top/ShortHairDreads02.d.ts +4 -0
- package/dist/avatar/top/ShortHairDreads02.js +30 -0
- package/dist/avatar/top/ShortHairFrizzle.d.ts +4 -0
- package/dist/avatar/top/ShortHairFrizzle.js +30 -0
- package/dist/avatar/top/ShortHairShaggy.d.ts +4 -0
- package/dist/avatar/top/ShortHairShaggy.js +30 -0
- package/dist/avatar/top/ShortHairShaggyMullet.d.ts +4 -0
- package/dist/avatar/top/ShortHairShaggyMullet.js +30 -0
- package/dist/avatar/top/ShortHairShortCurly.d.ts +4 -0
- package/dist/avatar/top/ShortHairShortCurly.js +30 -0
- package/dist/avatar/top/ShortHairShortFlat.d.ts +4 -0
- package/dist/avatar/top/ShortHairShortFlat.js +30 -0
- package/dist/avatar/top/ShortHairShortRound.d.ts +4 -0
- package/dist/avatar/top/ShortHairShortRound.js +30 -0
- package/dist/avatar/top/ShortHairShortWaved.d.ts +4 -0
- package/dist/avatar/top/ShortHairShortWaved.js +30 -0
- package/dist/avatar/top/ShortHairSides.d.ts +4 -0
- package/dist/avatar/top/ShortHairSides.js +30 -0
- package/dist/avatar/top/ShortHairTheCaesar.d.ts +4 -0
- package/dist/avatar/top/ShortHairTheCaesar.js +30 -0
- package/dist/avatar/top/ShortHairTheCaesarSidePart.d.ts +4 -0
- package/dist/avatar/top/ShortHairTheCaesarSidePart.js +30 -0
- package/dist/avatar/top/Top.d.ts +4 -0
- package/dist/avatar/top/Top.js +128 -0
- package/dist/avatar/top/TopType.d.ts +39 -0
- package/dist/avatar/top/TopType.js +42 -0
- package/dist/avatar/top/Turban.d.ts +4 -0
- package/dist/avatar/top/Turban.js +32 -0
- package/dist/avatar/top/WinterHat1.d.ts +4 -0
- package/dist/avatar/top/WinterHat1.js +31 -0
- package/dist/avatar/top/WinterHat2.d.ts +4 -0
- package/dist/avatar/top/WinterHat2.js +30 -0
- package/dist/avatar/top/WinterHat3.d.ts +4 -0
- package/dist/avatar/top/WinterHat3.js +31 -0
- package/dist/avatar/top/WinterHat4.d.ts +4 -0
- package/dist/avatar/top/WinterHat4.js +35 -0
- package/dist/avatar/top/accessories/AccessoriesType.d.ts +10 -0
- package/dist/avatar/top/accessories/AccessoriesType.js +13 -0
- package/dist/avatar/top/accessories/Accessory.d.ts +1 -0
- package/dist/avatar/top/accessories/Accessory.js +35 -0
- package/dist/avatar/top/accessories/Kurt.d.ts +1 -0
- package/dist/avatar/top/accessories/Kurt.js +20 -0
- package/dist/avatar/top/accessories/Prescription01.d.ts +1 -0
- package/dist/avatar/top/accessories/Prescription01.js +20 -0
- package/dist/avatar/top/accessories/Prescription02.d.ts +1 -0
- package/dist/avatar/top/accessories/Prescription02.js +20 -0
- package/dist/avatar/top/accessories/Round.d.ts +1 -0
- package/dist/avatar/top/accessories/Round.js +21 -0
- package/dist/avatar/top/accessories/Sunglasses.d.ts +1 -0
- package/dist/avatar/top/accessories/Sunglasses.js +24 -0
- package/dist/avatar/top/accessories/Wayfarers.d.ts +1 -0
- package/dist/avatar/top/accessories/Wayfarers.js +23 -0
- package/dist/avatar/top/accessories/index.d.ts +2 -0
- package/dist/avatar/top/accessories/index.js +10 -0
- package/dist/avatar/top/facialHair/BeardLight.d.ts +1 -0
- package/dist/avatar/top/facialHair/BeardLight.js +25 -0
- package/dist/avatar/top/facialHair/BeardMajestic.d.ts +1 -0
- package/dist/avatar/top/facialHair/BeardMajestic.js +25 -0
- package/dist/avatar/top/facialHair/BeardMedium.d.ts +1 -0
- package/dist/avatar/top/facialHair/BeardMedium.js +25 -0
- package/dist/avatar/top/facialHair/FacialHair.d.ts +1 -0
- package/dist/avatar/top/facialHair/FacialHair.js +33 -0
- package/dist/avatar/top/facialHair/FacialHairColor.d.ts +5 -0
- package/dist/avatar/top/facialHair/FacialHairColor.js +51 -0
- package/dist/avatar/top/facialHair/FacialHairColorName.d.ts +11 -0
- package/dist/avatar/top/facialHair/FacialHairColorName.js +14 -0
- package/dist/avatar/top/facialHair/FacialHairType.d.ts +9 -0
- package/dist/avatar/top/facialHair/FacialHairType.js +12 -0
- package/dist/avatar/top/facialHair/MoustacheFancy.d.ts +1 -0
- package/dist/avatar/top/facialHair/MoustacheFancy.js +25 -0
- package/dist/avatar/top/facialHair/MoustacheMagnum.d.ts +1 -0
- package/dist/avatar/top/facialHair/MoustacheMagnum.js +25 -0
- package/dist/avatar/top/facialHair/index.d.ts +2 -0
- package/dist/avatar/top/facialHair/index.js +10 -0
- package/dist/avatar/top/index.d.ts +4 -0
- package/dist/avatar/top/index.js +26 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -0
- package/dist/util/uniqueId.d.ts +18 -0
- package/dist/util/uniqueId.js +28 -0
- package/package.json +47 -0
- package/src/avatar/Avatar.tsx +74 -0
- package/src/avatar/AvatarContext.ts +6 -0
- package/src/avatar/AvatarProps.ts +27 -0
- package/src/avatar/Color.tsx +14 -0
- package/src/avatar/Skin.tsx +34 -0
- package/src/avatar/SkinColor.ts +11 -0
- package/src/avatar/clothes/BlazerShirt.tsx +41 -0
- package/src/avatar/clothes/BlazerSweater.tsx +34 -0
- package/src/avatar/clothes/ClotheColor.tsx +50 -0
- package/src/avatar/clothes/ClotheColorName.ts +19 -0
- package/src/avatar/clothes/ClotheType.ts +13 -0
- package/src/avatar/clothes/Clothes.tsx +36 -0
- package/src/avatar/clothes/CollarSweater.tsx +23 -0
- package/src/avatar/clothes/GraphicShirt.tsx +25 -0
- package/src/avatar/clothes/GraphicType.ts +15 -0
- package/src/avatar/clothes/Graphics.tsx +218 -0
- package/src/avatar/clothes/Hoodie.tsx +25 -0
- package/src/avatar/clothes/Overall.tsx +23 -0
- package/src/avatar/clothes/ShirtCrewNeck.tsx +26 -0
- package/src/avatar/clothes/ShirtScoopNeck.tsx +21 -0
- package/src/avatar/clothes/ShirtVNeck.tsx +21 -0
- package/src/avatar/clothes/index.tsx +3 -0
- package/src/avatar/face/Face.tsx +15 -0
- package/src/avatar/face/eyebrow/Angry.tsx +10 -0
- package/src/avatar/face/eyebrow/AngryNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/Default.tsx +12 -0
- package/src/avatar/face/eyebrow/DefaultNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/Eyebrow.tsx +45 -0
- package/src/avatar/face/eyebrow/EyebrowType.ts +16 -0
- package/src/avatar/face/eyebrow/FlatNatural.tsx +11 -0
- package/src/avatar/face/eyebrow/FrownNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/RaisedExcited.tsx +12 -0
- package/src/avatar/face/eyebrow/RaisedExcitedNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/SadConcerned.tsx +10 -0
- package/src/avatar/face/eyebrow/SadConcernedNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/UnibrowNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/UpDown.tsx +10 -0
- package/src/avatar/face/eyebrow/UpDownNatural.tsx +10 -0
- package/src/avatar/face/eyebrow/index.ts +2 -0
- package/src/avatar/face/eyes/Close.tsx +10 -0
- package/src/avatar/face/eyes/Cry.tsx +10 -0
- package/src/avatar/face/eyes/Default.tsx +8 -0
- package/src/avatar/face/eyes/Dizzy.tsx +10 -0
- package/src/avatar/face/eyes/EyeRoll.tsx +10 -0
- package/src/avatar/face/eyes/EyeType.ts +16 -0
- package/src/avatar/face/eyes/Eyes.tsx +45 -0
- package/src/avatar/face/eyes/Happy.tsx +10 -0
- package/src/avatar/face/eyes/Hearts.tsx +10 -0
- package/src/avatar/face/eyes/Side.tsx +10 -0
- package/src/avatar/face/eyes/Squint.tsx +32 -0
- package/src/avatar/face/eyes/Surprised.tsx +10 -0
- package/src/avatar/face/eyes/Wink.tsx +9 -0
- package/src/avatar/face/eyes/WinkWacky.tsx +10 -0
- package/src/avatar/face/eyes/index.tsx +2 -0
- package/src/avatar/face/index.tsx +5 -0
- package/src/avatar/face/mouth/Concerned.tsx +27 -0
- package/src/avatar/face/mouth/Default.tsx +7 -0
- package/src/avatar/face/mouth/Disbelief.tsx +8 -0
- package/src/avatar/face/mouth/Eating.tsx +12 -0
- package/src/avatar/face/mouth/Grimace.tsx +21 -0
- package/src/avatar/face/mouth/Mouth.tsx +45 -0
- package/src/avatar/face/mouth/MouthType.ts +16 -0
- package/src/avatar/face/mouth/Sad.tsx +8 -0
- package/src/avatar/face/mouth/ScreamOpen.tsx +26 -0
- package/src/avatar/face/mouth/Serious.tsx +7 -0
- package/src/avatar/face/mouth/Smile.tsx +26 -0
- package/src/avatar/face/mouth/Tongue.tsx +22 -0
- package/src/avatar/face/mouth/Twinkle.tsx +8 -0
- package/src/avatar/face/mouth/Vomit.tsx +34 -0
- package/src/avatar/face/mouth/index.tsx +2 -0
- package/src/avatar/face/nose/Default.tsx +7 -0
- package/src/avatar/face/nose/index.tsx +1 -0
- package/src/avatar/index.tsx +5 -0
- package/src/avatar/top/Eyepatch.tsx +25 -0
- package/src/avatar/top/HairColor.tsx +40 -0
- package/src/avatar/top/HairColorName.ts +14 -0
- package/src/avatar/top/Hat.tsx +48 -0
- package/src/avatar/top/HatColor.tsx +51 -0
- package/src/avatar/top/HatColorName.ts +20 -0
- package/src/avatar/top/Hijab.tsx +47 -0
- package/src/avatar/top/LongHairBigHair.tsx +51 -0
- package/src/avatar/top/LongHairBob.tsx +38 -0
- package/src/avatar/top/LongHairBun.tsx +36 -0
- package/src/avatar/top/LongHairCurly.tsx +40 -0
- package/src/avatar/top/LongHairCurvy.tsx +44 -0
- package/src/avatar/top/LongHairDreads.tsx +44 -0
- package/src/avatar/top/LongHairFrida.tsx +147 -0
- package/src/avatar/top/LongHairFro.tsx +43 -0
- package/src/avatar/top/LongHairFroBand.tsx +38 -0
- package/src/avatar/top/LongHairMiaWallace.tsx +40 -0
- package/src/avatar/top/LongHairNotTooLong.tsx +42 -0
- package/src/avatar/top/LongHairShavedSides.tsx +53 -0
- package/src/avatar/top/LongHairStraight.tsx +40 -0
- package/src/avatar/top/LongHairStraight2.tsx +43 -0
- package/src/avatar/top/LongHairStraightStrand.tsx +43 -0
- package/src/avatar/top/NoHair.tsx +35 -0
- package/src/avatar/top/PrinceCut.tsx +50 -0
- package/src/avatar/top/ShortHairDreads01.tsx +41 -0
- package/src/avatar/top/ShortHairDreads02.tsx +41 -0
- package/src/avatar/top/ShortHairFrizzle.tsx +45 -0
- package/src/avatar/top/ShortHairShaggy.tsx +47 -0
- package/src/avatar/top/ShortHairShaggyMullet.tsx +41 -0
- package/src/avatar/top/ShortHairShortCurly.tsx +45 -0
- package/src/avatar/top/ShortHairShortFlat.tsx +45 -0
- package/src/avatar/top/ShortHairShortRound.tsx +45 -0
- package/src/avatar/top/ShortHairShortWaved.tsx +45 -0
- package/src/avatar/top/ShortHairSides.tsx +41 -0
- package/src/avatar/top/ShortHairTheCaesar.tsx +47 -0
- package/src/avatar/top/ShortHairTheCaesarSidePart.tsx +47 -0
- package/src/avatar/top/Top.tsx +122 -0
- package/src/avatar/top/TopType.ts +40 -0
- package/src/avatar/top/Turban.tsx +62 -0
- package/src/avatar/top/WinterHat1.tsx +49 -0
- package/src/avatar/top/WinterHat2.tsx +61 -0
- package/src/avatar/top/WinterHat3.tsx +49 -0
- package/src/avatar/top/WinterHat4.tsx +64 -0
- package/src/avatar/top/accessories/AccessoriesType.ts +11 -0
- package/src/avatar/top/accessories/Accessory.tsx +29 -0
- package/src/avatar/top/accessories/Kurt.tsx +28 -0
- package/src/avatar/top/accessories/Prescription01.tsx +32 -0
- package/src/avatar/top/accessories/Prescription02.tsx +28 -0
- package/src/avatar/top/accessories/Round.tsx +23 -0
- package/src/avatar/top/accessories/Sunglasses.tsx +54 -0
- package/src/avatar/top/accessories/Wayfarers.tsx +49 -0
- package/src/avatar/top/accessories/index.ts +2 -0
- package/src/avatar/top/facialHair/BeardLight.tsx +21 -0
- package/src/avatar/top/facialHair/BeardMajestic.tsx +21 -0
- package/src/avatar/top/facialHair/BeardMedium.tsx +21 -0
- package/src/avatar/top/facialHair/FacialHair.tsx +26 -0
- package/src/avatar/top/facialHair/FacialHairColor.tsx +41 -0
- package/src/avatar/top/facialHair/FacialHairColorName.ts +12 -0
- package/src/avatar/top/facialHair/FacialHairType.ts +10 -0
- package/src/avatar/top/facialHair/MoustacheFancy.tsx +21 -0
- package/src/avatar/top/facialHair/MoustacheMagnum.tsx +21 -0
- package/src/avatar/top/facialHair/index.tsx +2 -0
- package/src/avatar/top/index.tsx +4 -0
- package/src/index.tsx +2 -0
- package/src/util/uniqueId.ts +30 -0
- package/tsconfig.json +19 -0
- package/tslint.json +13 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
|
+
};
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
+
exports.TopType = exports.default = void 0;
|
21
|
+
var Top_1 = require("./Top");
|
22
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Top_1).default; } });
|
23
|
+
var TopType_1 = require("./TopType");
|
24
|
+
Object.defineProperty(exports, "TopType", { enumerable: true, get: function () { return __importDefault(TopType_1).default; } });
|
25
|
+
__exportStar(require("./accessories"), exports);
|
26
|
+
__exportStar(require("./facialHair"), exports);
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
|
+
};
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
+
exports.default = void 0;
|
21
|
+
var avatar_1 = require("./avatar");
|
22
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(avatar_1).default; } });
|
23
|
+
__exportStar(require("./avatar"), exports);
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
3
|
+
*
|
4
|
+
* @since 0.1.0
|
5
|
+
* @category Util
|
6
|
+
* @param {string} [prefix=''] The value to prefix the ID with.
|
7
|
+
* @returns {string} Returns the unique ID.
|
8
|
+
* @see random
|
9
|
+
* @example
|
10
|
+
*
|
11
|
+
* uniqueId('contact_')
|
12
|
+
* // => 'contact_104'
|
13
|
+
*
|
14
|
+
* uniqueId()
|
15
|
+
* // => '105'
|
16
|
+
*/
|
17
|
+
declare function uniqueId(prefix: string): string;
|
18
|
+
export default uniqueId;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
/** Used to generate unique IDs. */
|
4
|
+
var idCounter = {};
|
5
|
+
/**
|
6
|
+
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
|
7
|
+
*
|
8
|
+
* @since 0.1.0
|
9
|
+
* @category Util
|
10
|
+
* @param {string} [prefix=''] The value to prefix the ID with.
|
11
|
+
* @returns {string} Returns the unique ID.
|
12
|
+
* @see random
|
13
|
+
* @example
|
14
|
+
*
|
15
|
+
* uniqueId('contact_')
|
16
|
+
* // => 'contact_104'
|
17
|
+
*
|
18
|
+
* uniqueId()
|
19
|
+
* // => '105'
|
20
|
+
*/
|
21
|
+
function uniqueId(prefix) {
|
22
|
+
if (!idCounter[prefix]) {
|
23
|
+
idCounter[prefix] = 0;
|
24
|
+
}
|
25
|
+
var id = ++idCounter[prefix];
|
26
|
+
return "".concat(prefix).concat(id);
|
27
|
+
}
|
28
|
+
exports.default = uniqueId;
|
package/package.json
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"name": "@testpig/avataaars",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "React component for avataaars ",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"keywords": [
|
8
|
+
"react",
|
9
|
+
"avatar"
|
10
|
+
],
|
11
|
+
"repository": "git@github.com:testpig-io/avataaars.git",
|
12
|
+
"contributors": [
|
13
|
+
"Fang-Pen Lin <hello@fangpenlin.com>",
|
14
|
+
"Romain Fromi <romain@game-park.com>",
|
15
|
+
"Kerry McKeever <kerry@testpig.io>"
|
16
|
+
],
|
17
|
+
"license": "MIT",
|
18
|
+
"publishConfig": {
|
19
|
+
"access": "public"
|
20
|
+
},
|
21
|
+
"scripts": {
|
22
|
+
"build": "tsc",
|
23
|
+
"prepublishOnly": "tsc"
|
24
|
+
},
|
25
|
+
"peerDependencies": {
|
26
|
+
"react": ">=18"
|
27
|
+
},
|
28
|
+
"devDependencies": {
|
29
|
+
"@types/react": "^18.3.12",
|
30
|
+
"import-sort-style-renke": "^6.0.0",
|
31
|
+
"tslint": "^6.1.3",
|
32
|
+
"tslint-config-standard": "^9.0.0",
|
33
|
+
"tslint-react": "^5.0.0",
|
34
|
+
"typescript": "^4.9.5"
|
35
|
+
},
|
36
|
+
"importSort": {
|
37
|
+
".js, .jsx, .es6, .es": {
|
38
|
+
"parser": "babylon",
|
39
|
+
"style": "import-sort-style-renke"
|
40
|
+
},
|
41
|
+
".ts, .tsx": {
|
42
|
+
"parser": "typescript",
|
43
|
+
"style": "import-sort-style-renke"
|
44
|
+
}
|
45
|
+
},
|
46
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
47
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { SVGProps, useId } from 'react'
|
2
|
+
import AvatarContext from './AvatarContext'
|
3
|
+
import AvatarProps from './AvatarProps'
|
4
|
+
import Clothe from './clothes'
|
5
|
+
import Face from './face'
|
6
|
+
import Skin from './Skin'
|
7
|
+
import Top from './top'
|
8
|
+
import Accessories from './top/accessories'
|
9
|
+
|
10
|
+
type Props = AvatarProps & SVGProps<SVGSVGElement>
|
11
|
+
|
12
|
+
export default function Avatar ({
|
13
|
+
style, circle, topType, accessoriesType, hairColor, facialHairType, facialHairColor, clotheType, clotheColor, graphicType,
|
14
|
+
eyeType, eyebrowType, mouthType, skinColor, hatColor, ...props
|
15
|
+
}: Props) {
|
16
|
+
const path1 = useId()
|
17
|
+
const path2 = useId()
|
18
|
+
const path3 = useId()
|
19
|
+
const mask1 = useId()
|
20
|
+
const mask2 = useId()
|
21
|
+
const mask3 = useId()
|
22
|
+
return (
|
23
|
+
<AvatarContext.Provider value={{
|
24
|
+
topType, accessoriesType, hairColor, facialHairType, facialHairColor, clotheType, clotheColor, graphicType, eyeType, eyebrowType, mouthType, skinColor,
|
25
|
+
hatColor
|
26
|
+
}}>
|
27
|
+
<svg width='264px' height='280px' viewBox='0 0 264 280' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlnsXlink='http://www.w3.org/1999/xlink'
|
28
|
+
style={style} {...props}>
|
29
|
+
<desc>Created with getavataaars.com</desc>
|
30
|
+
<defs>
|
31
|
+
<circle id={path1} cx='120' cy='120' r='120'/>
|
32
|
+
<path id={path2}
|
33
|
+
d='M12,160 C12,226.27417 65.72583,280 132,280 C198.27417,280 252,226.27417 252,160 L264,160 L264,-1.42108547e-14 L-3.19744231e-14,-1.42108547e-14 L-3.19744231e-14,160 L12,160 Z'/>
|
34
|
+
<path id={path3}
|
35
|
+
d='M124,144.610951 L124,163 L128,163 L128,163 C167.764502,163 200,195.235498 200,235 L200,244 L0,244 L0,235 C-4.86974701e-15,195.235498 32.235498,163 72,163 L72,163 L76,163 L76,144.610951 C58.7626345,136.422372 46.3722246,119.687011 44.3051388,99.8812385 C38.4803105,99.0577866 34,94.0521096 34,88 L34,74 C34,68.0540074 38.3245733,63.1180731 44,62.1659169 L44,56 L44,56 C44,25.072054 69.072054,5.68137151e-15 100,0 L100,0 L100,0 C130.927946,-5.68137151e-15 156,25.072054 156,56 L156,62.1659169 C161.675427,63.1180731 166,68.0540074 166,74 L166,88 C166,94.0521096 161.51969,99.0577866 155.694861,99.8812385 C153.627775,119.687011 141.237365,136.422372 124,144.610951 Z'/>
|
36
|
+
</defs>
|
37
|
+
<g stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>
|
38
|
+
{circle && (
|
39
|
+
<g strokeWidth='1' fillRule='evenodd' transform='translate(12, 40)'>
|
40
|
+
<mask id={mask1} fill='white'>
|
41
|
+
<use xlinkHref={'#' + path1}/>
|
42
|
+
</mask>
|
43
|
+
<use fill='#E6E6E6' xlinkHref={'#' + path1}/>
|
44
|
+
<g mask={'url(#' + mask1 + ')'} fill='#65C9FF'>
|
45
|
+
<rect x='0' y='0' width='240' height='240'/>
|
46
|
+
</g>
|
47
|
+
</g>
|
48
|
+
)}
|
49
|
+
{circle && (
|
50
|
+
<mask id={mask2} fill='white'>
|
51
|
+
<use xlinkHref={'#' + path2}/>
|
52
|
+
</mask>
|
53
|
+
)}
|
54
|
+
<g strokeWidth='1' fillRule='evenodd' mask={'url(#' + mask2 + ')'}>
|
55
|
+
<g transform='translate(32, 36)'>
|
56
|
+
<mask id={mask3} fill='white'>
|
57
|
+
<use xlinkHref={'#' + path3}/>
|
58
|
+
</mask>
|
59
|
+
<use fill='#D0C6AC' xlinkHref={'#' + path3}/>
|
60
|
+
<Skin maskID={mask3}/>
|
61
|
+
<path fillOpacity='0.100000001' fill='#000000' mask={'url(#' + mask3 + ')'}
|
62
|
+
d='M156,79 L156,102 C156,132.927946 130.927946,158 100,158 C69.072054,158 44,132.927946 44,102 L44,79 L44,94 C44,124.927946 69.072054,150 100,150 C130.927946,150 156,124.927946 156,94 L156,79 Z'/>
|
63
|
+
</g>
|
64
|
+
<Clothe/>
|
65
|
+
<Face/>
|
66
|
+
<Top>
|
67
|
+
<Accessories/>
|
68
|
+
</Top>
|
69
|
+
</g>
|
70
|
+
</g>
|
71
|
+
</svg>
|
72
|
+
</AvatarContext.Provider>
|
73
|
+
)
|
74
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import ClotheType from './clothes/ClotheType'
|
2
|
+
import GraphicType from './clothes/GraphicType'
|
3
|
+
import EyebrowType from './face/eyebrow/EyebrowType'
|
4
|
+
import AccessoriesType from './top/accessories/AccessoriesType'
|
5
|
+
import FacialHairType from './top/facialHair/FacialHairType'
|
6
|
+
import TopType from './top/TopType'
|
7
|
+
import EyeType from './face/eyes/EyeType'
|
8
|
+
import MouthType from './face/mouth/MouthType'
|
9
|
+
|
10
|
+
type AvatarProps = {
|
11
|
+
circle?: boolean
|
12
|
+
topType?: TopType
|
13
|
+
accessoriesType?: AccessoriesType
|
14
|
+
hairColor?: string
|
15
|
+
facialHairType?: FacialHairType
|
16
|
+
facialHairColor?: string
|
17
|
+
clotheType?: ClotheType
|
18
|
+
clotheColor?: string
|
19
|
+
graphicType?: GraphicType
|
20
|
+
eyeType?: EyeType
|
21
|
+
eyebrowType?: EyebrowType
|
22
|
+
mouthType?: MouthType
|
23
|
+
skinColor?: string
|
24
|
+
hatColor?: string
|
25
|
+
}
|
26
|
+
|
27
|
+
export default AvatarProps
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { SVGProps } from 'react'
|
2
|
+
|
3
|
+
type Props = {
|
4
|
+
maskID: string
|
5
|
+
color: string
|
6
|
+
} & SVGProps<SVGGElement>
|
7
|
+
|
8
|
+
export default function Color ({ maskID, color, ...props }: Props) {
|
9
|
+
return (
|
10
|
+
<g mask={`url(#${maskID})`} fill={color} {...props}>
|
11
|
+
<rect x='0' y='0' width='264' height='280'/>
|
12
|
+
</g>
|
13
|
+
)
|
14
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { useContext } from 'react'
|
2
|
+
import AvatarContext from './AvatarContext'
|
3
|
+
import SkinColor from './SkinColor'
|
4
|
+
import Color from './Color'
|
5
|
+
|
6
|
+
type Props = {
|
7
|
+
maskID: string
|
8
|
+
}
|
9
|
+
|
10
|
+
export default function Skin ({ maskID }: Props) {
|
11
|
+
const color = useContext(AvatarContext).skinColor
|
12
|
+
return <Color maskID={maskID} color={getSkinColor(color)}/>
|
13
|
+
}
|
14
|
+
|
15
|
+
function getSkinColor (color?: string) {
|
16
|
+
if (color && color.startsWith('#')) return color
|
17
|
+
switch (color) {
|
18
|
+
case SkinColor.Tanned:
|
19
|
+
return '#FD9841'
|
20
|
+
case SkinColor.Yellow:
|
21
|
+
return '#F8D25C'
|
22
|
+
case SkinColor.Pale:
|
23
|
+
return '#FFDBB4'
|
24
|
+
case SkinColor.Brown:
|
25
|
+
return '#D08B5B'
|
26
|
+
case SkinColor.DarkBrown:
|
27
|
+
return '#AE5D29'
|
28
|
+
case SkinColor.Black:
|
29
|
+
return '#614335'
|
30
|
+
case SkinColor.Light:
|
31
|
+
default:
|
32
|
+
return '#EDB98A'
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { useId } from 'react'
|
2
|
+
|
3
|
+
export default function BlazerShirt () {
|
4
|
+
const path1 = useId()
|
5
|
+
const mask1 = useId()
|
6
|
+
|
7
|
+
return (
|
8
|
+
<g transform='translate(0, 170)'>
|
9
|
+
<defs>
|
10
|
+
<path id={path1}
|
11
|
+
d='M133.960472,0.294916112 C170.936473,3.32499816 200,34.2942856 200,72.0517235 L200,81 L0,81 L0,72.0517235 C1.22536245e-14,33.9525631 29.591985,2.76498122 67.0454063,0.219526408 C67.0152598,0.593114549 67,0.969227185 67,1.34762511 C67,13.2107177 81.9984609,22.8276544 100.5,22.8276544 C119.001539,22.8276544 134,13.2107177 134,1.34762511 C134,0.994669088 133.986723,0.64370138 133.960472,0.294916112 Z'/>
|
12
|
+
</defs>
|
13
|
+
<g transform='translate(32, 29)'>
|
14
|
+
<mask id={mask1} fill='white'>
|
15
|
+
<use xlinkHref={'#' + path1}/>
|
16
|
+
</mask>
|
17
|
+
<use fill='#E6E6E6' xlinkHref={'#' + path1}/>
|
18
|
+
<g mask={`url(#${mask1})`} fill='#262E33'>
|
19
|
+
<g transform='translate(-32, -29)'>
|
20
|
+
<rect x='0' y='0' width='264' height='110'/>
|
21
|
+
</g>
|
22
|
+
</g>
|
23
|
+
<g opacity='0.599999964' mask={`url(#${mask1})`} fillOpacity='0.16' fill='#000000'>
|
24
|
+
<g transform='translate(60, -25)'>
|
25
|
+
<ellipse cx='40.5' cy='27.8476251' rx='39.6351047' ry='26.9138272'/>
|
26
|
+
</g>
|
27
|
+
</g>
|
28
|
+
</g>
|
29
|
+
<g transform='translate(32, 28)'>
|
30
|
+
<path fill='#3A4C5A'
|
31
|
+
d='M68.784807,1.12222847 C30.512317,2.80409739 -1.89486556e-14,34.3646437 -1.42108547e-14,73.0517235 L0,73.0517235 L0,82 L69.3616767,82 C65.9607412,69.9199941 64,55.7087296 64,40.5 C64,26.1729736 65.7399891,12.7311115 68.784807,1.12222847 Z M131.638323,82 L200,82 L200,73.0517235 C200,34.7067641 170.024954,3.36285166 132.228719,1.17384225 C135.265163,12.7709464 137,26.1942016 137,40.5 C137,55.7087296 135.039259,69.9199941 131.638323,82 Z'/>
|
32
|
+
<path fill='#E6E6E6'
|
33
|
+
d='M149,58 L158.555853,50.83311 L158.555853,50.83311 C159.998897,49.7508275 161.987779,49.7682725 163.411616,50.8757011 L170,56 L149,58 Z'/>
|
34
|
+
<path fill='#2F4351'
|
35
|
+
d='M69,1.13686838e-13 C65,19.3333333 66.6666667,46.6666667 74,82 L58,82 L44,46 L50,37 L44,31 L63,1 C65.027659,0.369238637 67.027659,0.0359053037 69,1.13686838e-13 Z'/>
|
36
|
+
<path fill='#2F4351' transform='translate(141, 41) scale(-1, 1) translate(-141, -41)'
|
37
|
+
d='M151,1.13686838e-13 C147,19.3333333 148.666667,46.6666667 156,82 L140,82 L126,46 L132,37 L126,31 L145,1 C147.027659,0.369238637 149.027659,0.0359053037 151,1.13686838e-13 Z'/>
|
38
|
+
</g>
|
39
|
+
</g>
|
40
|
+
)
|
41
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { useId } from 'react'
|
2
|
+
|
3
|
+
export default function BlazerSweater () {
|
4
|
+
const path1 = useId()
|
5
|
+
const mask1 = useId()
|
6
|
+
|
7
|
+
return (
|
8
|
+
<g transform='translate(0, 170)'>
|
9
|
+
<defs>
|
10
|
+
<path id={path1}
|
11
|
+
d='M105.192402,29.0517235 L104,29.0517235 L104,29.0517235 C64.235498,29.0517235 32,61.2872215 32,101.051724 L32,110 L232,110 L232,101.051724 C232,61.2872215 199.764502,29.0517235 160,29.0517235 L160,29.0517235 L158.807598,29.0517235 C158.934638,30.0353144 159,31.0364513 159,32.0517235 C159,45.8588423 146.911688,57.0517235 132,57.0517235 C117.088312,57.0517235 105,45.8588423 105,32.0517235 C105,31.0364513 105.065362,30.0353144 105.192402,29.0517235 Z'/>
|
12
|
+
</defs>
|
13
|
+
<mask id={mask1} fill='white'>
|
14
|
+
<use xlinkHref={'#' + path1}/>
|
15
|
+
</mask>
|
16
|
+
<use fill='#E6E6E6' fillRule='evenodd' xlinkHref={'#' + path1}/>
|
17
|
+
<g mask={`url(#${mask1})`} fillRule='evenodd' fill='#262E33'>
|
18
|
+
<rect x='0' y='0' width='264' height='110'/>
|
19
|
+
</g>
|
20
|
+
<g strokeWidth='1' fillRule='evenodd' transform='translate(32, 28)'>
|
21
|
+
<path fill='#3A4C5A'
|
22
|
+
d='M68.784807,1.12222847 C30.512317,2.80409739 1.24427139e-14,34.3646437 0,73.0517235 L0,82 L69.3616767,82 C65.9607412,69.9199941 64,55.7087296 64,40.5 C64,26.1729736 65.7399891,12.7311115 68.784807,1.12222847 Z M131.638323,82 L200,82 L200,73.0517235 C200,34.7067641 170.024954,3.36285166 132.228719,1.17384225 C135.265163,12.7709464 137,26.1942016 137,40.5 C137,55.7087296 135.039259,69.9199941 131.638323,82 Z'/>
|
23
|
+
<path fill='#E6E6E6'
|
24
|
+
d='M149,58 L158.555853,50.83311 L158.555853,50.83311 C159.998897,49.7508275 161.987779,49.7682725 163.411616,50.8757011 L170,56 L149,58 Z'/>
|
25
|
+
<path fill='#2F4351'
|
26
|
+
d='M69,1.13686838e-13 C65,19.3333333 66.6666667,46.6666667 74,82 L58,82 L44,46 L50,37 L44,31 L63,1 C65.027659,0.369238637 67.027659,0.0359053037 69,1.13686838e-13 Z'/>
|
27
|
+
<path fill='#2F4351' transform='translate(141, 41) scale(-1, 1) translate(-141, -41)'
|
28
|
+
d='M151,1.13686838e-13 C147,19.3333333 148.666667,46.6666667 156,82 L140,82 L126,46 L132,37 L126,31 L145,1 C147.027659,0.369238637 149.027659,0.0359053037 151,1.13686838e-13 Z'/>
|
29
|
+
</g>
|
30
|
+
<path fill='#F2F2F2' fillRule='evenodd'
|
31
|
+
d='M156,21.5390062 C162.772319,26.1359565 167,32.6563196 167,39.8878801 C167,47.2887711 162.572015,53.9447688 155.520105,58.5564942 L149.57933,53.8764929 L145,54.207887 L146,51.0567821 L145.922229,50.995516 C152.022491,47.8530505 156,42.7003578 156,36.8768102 L156,21.5390062 Z M108,21.5390062 C101.227681,26.1359565 97,32.6563196 97,39.8878801 C97,47.2887711 101.427985,53.9447688 108.479895,58.5564942 L114.42067,53.8764929 L119,54.207887 L118,51.0567821 L118.077771,50.995516 C111.977509,47.8530505 108,42.7003578 108,36.8768102 L108,21.5390062 Z'/>
|
32
|
+
</g>
|
33
|
+
)
|
34
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import ClotheColorName from './ClotheColorName'
|
2
|
+
import { useContext } from 'react'
|
3
|
+
import AvatarContext from '../AvatarContext'
|
4
|
+
import Color from '../Color'
|
5
|
+
|
6
|
+
export interface Props {
|
7
|
+
maskID: string
|
8
|
+
}
|
9
|
+
|
10
|
+
export default function ClotheColor ({ maskID }: Props) {
|
11
|
+
const color = useContext(AvatarContext).clotheColor
|
12
|
+
return <Color maskID={maskID} color={getClothColor(color)} fillRule='evenodd'/>
|
13
|
+
}
|
14
|
+
|
15
|
+
function getClothColor (color?: string) {
|
16
|
+
if (color && color.startsWith('#')) return color
|
17
|
+
switch (color) {
|
18
|
+
case ClotheColorName.Black:
|
19
|
+
return '#262E33'
|
20
|
+
case ClotheColorName.Blue01:
|
21
|
+
return '#65C9FF'
|
22
|
+
case ClotheColorName.Blue02:
|
23
|
+
return '#5199E4'
|
24
|
+
case ClotheColorName.Blue03:
|
25
|
+
return '#25557C'
|
26
|
+
case ClotheColorName.Gray02:
|
27
|
+
return '#929598'
|
28
|
+
case ClotheColorName.Heather:
|
29
|
+
return '#3C4F5C'
|
30
|
+
case ClotheColorName.PastelBlue:
|
31
|
+
return '#B1E2FF'
|
32
|
+
case ClotheColorName.PastelGreen:
|
33
|
+
return '#A7FFC4'
|
34
|
+
case ClotheColorName.PastelOrange:
|
35
|
+
return '#FFDEB5'
|
36
|
+
case ClotheColorName.PastelRed:
|
37
|
+
return '#FFAFB9'
|
38
|
+
case ClotheColorName.PastelYellow:
|
39
|
+
return '#FFFFB1'
|
40
|
+
case ClotheColorName.Red:
|
41
|
+
return '#FF5C5C'
|
42
|
+
case ClotheColorName.Pink:
|
43
|
+
return '#FF488E'
|
44
|
+
case ClotheColorName.White:
|
45
|
+
return '#FFFFFF'
|
46
|
+
case ClotheColorName.Gray01:
|
47
|
+
default:
|
48
|
+
return '#E6E6E6'
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
enum ClotheColorName {
|
2
|
+
Black = 'Black',
|
3
|
+
Blue01 = 'Blue01',
|
4
|
+
Blue02 = 'Blue02',
|
5
|
+
Blue03 = 'Blue03',
|
6
|
+
Gray01 = 'Gray01',
|
7
|
+
Gray02 = 'Gray02',
|
8
|
+
Heather = 'Heather',
|
9
|
+
PastelBlue = 'PastelBlue',
|
10
|
+
PastelGreen = 'PastelGreen',
|
11
|
+
PastelOrange = 'PastelOrange',
|
12
|
+
PastelRed = 'PastelRed',
|
13
|
+
PastelYellow = 'PastelYellow',
|
14
|
+
Pink = 'Pink',
|
15
|
+
Red = 'Red',
|
16
|
+
White = 'White'
|
17
|
+
}
|
18
|
+
|
19
|
+
export default ClotheColorName
|
@@ -0,0 +1,13 @@
|
|
1
|
+
enum ClotheType {
|
2
|
+
BlazerShirt = 'BlazerShirt',
|
3
|
+
BlazerSweater = 'BlazerSweater',
|
4
|
+
CollarSweater = 'CollarSweater',
|
5
|
+
GraphicShirt = 'GraphicShirt',
|
6
|
+
Hoodie = 'Hoodie',
|
7
|
+
Overall = 'Overall',
|
8
|
+
ShirtCrewNeck = 'ShirtCrewNeck',
|
9
|
+
ShirtScoopNeck = 'ShirtScoopNeck',
|
10
|
+
ShirtVNeck = 'ShirtVNeck'
|
11
|
+
}
|
12
|
+
|
13
|
+
export default ClotheType
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import ClotheType from './ClotheType'
|
2
|
+
import ShirtCrewNeck from './ShirtCrewNeck'
|
3
|
+
import ShirtScoopNeck from './ShirtScoopNeck'
|
4
|
+
import ShirtVNeck from './ShirtVNeck'
|
5
|
+
import BlazerShirt from './BlazerShirt'
|
6
|
+
import GraphicShirt from './GraphicShirt'
|
7
|
+
import Hoodie from './Hoodie'
|
8
|
+
import CollarSweater from './CollarSweater'
|
9
|
+
import BlazerSweater from './BlazerSweater'
|
10
|
+
import Overall from './Overall'
|
11
|
+
import { useContext } from 'react'
|
12
|
+
import AvatarContext from '../AvatarContext'
|
13
|
+
|
14
|
+
export default function Clothes () {
|
15
|
+
const type = useContext(AvatarContext).clotheType ?? ClotheType.BlazerShirt
|
16
|
+
switch (type) {
|
17
|
+
case ClotheType.BlazerShirt:
|
18
|
+
return <BlazerShirt/>
|
19
|
+
case ClotheType.BlazerSweater:
|
20
|
+
return <BlazerSweater/>
|
21
|
+
case ClotheType.CollarSweater:
|
22
|
+
return <CollarSweater/>
|
23
|
+
case ClotheType.GraphicShirt:
|
24
|
+
return <GraphicShirt/>
|
25
|
+
case ClotheType.Hoodie:
|
26
|
+
return <Hoodie/>
|
27
|
+
case ClotheType.Overall:
|
28
|
+
return <Overall/>
|
29
|
+
case ClotheType.ShirtCrewNeck:
|
30
|
+
return <ShirtCrewNeck/>
|
31
|
+
case ClotheType.ShirtScoopNeck:
|
32
|
+
return <ShirtScoopNeck/>
|
33
|
+
case ClotheType.ShirtVNeck:
|
34
|
+
return <ShirtVNeck/>
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { useId } from 'react'
|
2
|
+
import ClotheColor from './ClotheColor'
|
3
|
+
|
4
|
+
export default function CollarSweater () {
|
5
|
+
const path1 = useId()
|
6
|
+
const mask1 = useId()
|
7
|
+
|
8
|
+
return (
|
9
|
+
<g transform='translate(0, 170)'>
|
10
|
+
<defs>
|
11
|
+
<path id={path1}
|
12
|
+
d='M105.192402,29.0517235 L104,29.0517235 L104,29.0517235 C64.235498,29.0517235 32,61.2872215 32,101.051724 L32,110 L232,110 L232,101.051724 C232,61.2872215 199.764502,29.0517235 160,29.0517235 L160,29.0517235 L158.807598,29.0517235 C158.934638,30.0353144 159,31.0364513 159,32.0517235 C159,45.8588423 146.911688,57.0517235 132,57.0517235 C117.088312,57.0517235 105,45.8588423 105,32.0517235 C105,31.0364513 105.065362,30.0353144 105.192402,29.0517235 Z'/>
|
13
|
+
</defs>
|
14
|
+
<mask id={mask1} fill='white'>
|
15
|
+
<use xlinkHref={'#' + path1}/>
|
16
|
+
</mask>
|
17
|
+
<use fill='#E6E6E6' fillRule='evenodd' xlinkHref={'#' + path1}/>
|
18
|
+
<ClotheColor maskID={mask1}/>
|
19
|
+
<path fill='#F2F2F2' fillRule='evenodd'
|
20
|
+
d='M156,22.2794906 C162.181647,26.8351858 166,33.1057265 166,40.027915 C166,47.2334941 161.862605,53.7329769 155.228997,58.3271669 L149.57933,53.8764929 L145,54.207887 L146,51.0567821 L145.922229,50.995516 C152.022491,47.8530505 156,42.7003578 156,36.8768102 L156,22.2794906 Z M108,21.5714994 C101.232748,26.1740081 97,32.7397769 97,40.027915 C97,47.4261549 101.361602,54.080035 108.308428,58.6915723 L114.42067,53.8764929 L119,54.207887 L118,51.0567821 L118.077771,50.995516 C111.977509,47.8530505 108,42.7003578 108,36.8768102 L108,21.5714994 Z'/>
|
21
|
+
</g>
|
22
|
+
)
|
23
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { useContext, useId } from 'react'
|
2
|
+
import Graphics from './Graphics'
|
3
|
+
import ClotheColor from './ClotheColor'
|
4
|
+
import AvatarContext from '../AvatarContext'
|
5
|
+
|
6
|
+
export default function GraphicShirt () {
|
7
|
+
const graphicType = useContext(AvatarContext).graphicType
|
8
|
+
const path1 = useId()
|
9
|
+
const mask1 = useId()
|
10
|
+
|
11
|
+
return (
|
12
|
+
<g transform='translate(0, 170)'>
|
13
|
+
<defs>
|
14
|
+
<path id={path1}
|
15
|
+
d='M165.624032,29.2681342 C202.760022,32.1373245 232,63.1798426 232,101.051724 L232,110 L32,110 L32,101.051724 C32,62.8348009 61.7752018,31.5722494 99.3929298,29.1967444 C99.1342224,30.2735458 99,31.3767131 99,32.5 C99,44.3741221 113.998461,54 132.5,54 C151.001539,54 166,44.3741221 166,32.5 C166,31.4015235 165.871641,30.3222877 165.624025,29.2681336 Z'/>
|
16
|
+
</defs>
|
17
|
+
<mask id={mask1} fill='white'>
|
18
|
+
<use xlinkHref={'#' + path1}/>
|
19
|
+
</mask>
|
20
|
+
<use fill='#E6E6E6' fillRule='evenodd' xlinkHref={'#' + path1}/>
|
21
|
+
<ClotheColor maskID={mask1}/>
|
22
|
+
<Graphics maskID={mask1} type={graphicType}/>
|
23
|
+
</g>
|
24
|
+
)
|
25
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
enum GraphicType {
|
2
|
+
Bat = 'Bat',
|
3
|
+
Cumbia = 'Cumbia',
|
4
|
+
Deer = 'Deer',
|
5
|
+
Diamond = 'Diamond',
|
6
|
+
Hola = 'Hola',
|
7
|
+
Pizza = 'Pizza',
|
8
|
+
Resist = 'Resist',
|
9
|
+
Selena = 'Selena',
|
10
|
+
Bear = 'Bear',
|
11
|
+
SkullOutline = 'SkullOutline',
|
12
|
+
Skull = 'Skull'
|
13
|
+
}
|
14
|
+
|
15
|
+
export default GraphicType
|