feat: new face parts
All checks were successful
Publish Docker Image / build_push (push) Successful in 2m43s

This commit is contained in:
Nisan Coşkun 2025-11-26 14:23:02 +03:00
parent 1633a307ba
commit d2aadec31d
6 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,5 @@
# Random Avatars
This project is a Go clone of [Adorable Avatars](https://github.com/itsthatguy/avatars-api-middleware), an image generator for user friendly placeholder avatars. This project's goal is to enable quickly onboarding users into social networks and providing a human centric starting experience.
This project is a Go clone of [Adorable Avatars](https://github.com/itsthatguy/avatars-api-middleware), an image generator for user friendly placeholder avatars. This project's goal is to enable quickly onboarding users into social networks and providing a human centric starting experience.
Total avatar combination = 11 * 10 * 10 * 9 = 9900

BIN
assets/eyes/eyes8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
assets/mouth/mouth2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
assets/mouth/mouth4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/nose/nose1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -88,9 +88,9 @@ func getPartsById(id string) (draw.Image, image.Image, image.Image, image.Image)
mouthHash := fnv.New32a()
mouthHash.Write(idBytes)
return BaseRects[colorHash.Sum32()%11],
EYES[eyesHash.Sum32()%9],
NOSE[noseHash.Sum32()%8],
MOUTH[mouthHash.Sum32()%8]
EYES[eyesHash.Sum32()%10],
NOSE[noseHash.Sum32()%9],
MOUTH[mouthHash.Sum32()%10]
}
func serveAvatar(w http.ResponseWriter, r *http.Request) {