peeps-generator 1.0.1 → 1.0.3
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/README.md +1 -1
- package/dist/core/randomizer.js +6 -6
- package/package.json +2 -3
- package/dist/assets/hero.jpg +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ✍️ Peeps Generator
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
|
|
5
5
|
**Peeps Generator** es una librería pensada para desarrolladores que necesitan crear avatares divertidos y únicos en sus aplicaciones.
|
|
6
6
|
Con ella podés:
|
package/dist/core/randomizer.js
CHANGED
|
@@ -7,21 +7,21 @@ export function generatePeepAvatar({ peep, seed, enableAccessories = false, enab
|
|
|
7
7
|
: Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);
|
|
8
8
|
return {
|
|
9
9
|
head: peep?.head ?? pickFromArray(heads, currentSeed),
|
|
10
|
-
face: peep?.face ?? pickFromArray(faces, Math.floor(currentSeed /
|
|
10
|
+
face: peep?.face ?? pickFromArray(faces, Math.floor(currentSeed / 2)),
|
|
11
11
|
...(enableAccessories && {
|
|
12
12
|
accessories: peep?.accessories ??
|
|
13
|
-
pickFromArray(accessories, Math.floor(currentSeed /
|
|
13
|
+
pickFromArray(accessories, Math.floor(currentSeed / 3)),
|
|
14
14
|
}),
|
|
15
15
|
...(enableFacialHair && {
|
|
16
16
|
facialHair: peep?.facialHair ??
|
|
17
|
-
pickFromArray(facialHair, Math.floor(currentSeed /
|
|
17
|
+
pickFromArray(facialHair, Math.floor(currentSeed / 4)),
|
|
18
18
|
}),
|
|
19
19
|
...(enableBackground && {
|
|
20
|
-
background: peep?.background ?? generateHexColor(Math.floor(currentSeed /
|
|
20
|
+
background: peep?.background ?? generateHexColor(Math.floor(currentSeed / 5)),
|
|
21
21
|
}),
|
|
22
22
|
...(enableColors && {
|
|
23
|
-
hairColor: peep?.hairColor ?? generateHexColor(Math.floor(currentSeed /
|
|
24
|
-
skinColor: peep?.skinColor ?? generateHexColor(Math.floor(currentSeed /
|
|
23
|
+
hairColor: peep?.hairColor ?? generateHexColor(Math.floor(currentSeed / 6)),
|
|
24
|
+
skinColor: peep?.skinColor ?? generateHexColor(Math.floor(currentSeed / 7)),
|
|
25
25
|
}),
|
|
26
26
|
};
|
|
27
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peeps-generator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Generador de avatares SVG modulares y personalizables inspirado en Open Peeps. Permite crear peeps aleatorios o determinísticos, renderizarlos como SVG y exportarlos a formatos de imagen.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"avatar",
|
|
@@ -25,12 +25,11 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"type": "module",
|
|
27
27
|
"main": "./dist/index.js",
|
|
28
|
-
"module": "./dist/index.esm.js",
|
|
29
28
|
"types": "./dist/index.d.ts",
|
|
30
29
|
"exports": {
|
|
31
30
|
".": {
|
|
32
31
|
"types": "./dist/index.d.ts",
|
|
33
|
-
"import": "./dist/index.
|
|
32
|
+
"import": "./dist/index.js"
|
|
34
33
|
}
|
|
35
34
|
},
|
|
36
35
|
"files": [
|
package/dist/assets/hero.jpg
DELETED
|
Binary file
|