mochikao 0.1.1 → 0.1.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.fr.md +19 -0
- package/README.md +19 -0
- package/package.json +2 -2
package/README.fr.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · **Français**
|
|
4
4
|
|
|
5
|
+
[Site](https://mochikao.alexvolkihar.ovh) · [npm](https://www.npmjs.com/package/mochikao) · [GitHub](https://github.com/Alexvolkihar/mochikao)
|
|
6
|
+
|
|
5
7
|
Un visage pour chaque nom. `mochikao` transforme n'importe quelle chaîne (pseudo, e-mail, id) en un petit personnage SVG. Le même nom donne toujours le même mochikao.
|
|
6
8
|
|
|
7
9
|

|
|
@@ -20,6 +22,21 @@ Un visage pour chaque nom. `mochikao` transforme n'importe quelle chaîne (pseud
|
|
|
20
22
|
|
|
21
23
|
Inspiré de [blobatar](https://blobatar.dev).
|
|
22
24
|
|
|
25
|
+
## Quand l'utiliser
|
|
26
|
+
|
|
27
|
+
- **Avatars par défaut** pour les utilisateurs sans photo : donne-lui un pseudo ou un id et chaque compte a un visage, sans rien à stocker.
|
|
28
|
+
- **Personnes anonymes ou pseudonymes** : commentateurs, participants d'un chat ou d'un jeu multijoueur, invités, relecteurs. Chacun se reconnaît d'un coup d'œil sans révéler qui il est.
|
|
29
|
+
- **Maquettes et données de test** dans des listes, démos et captures d'écran, à la place des ronds gris ou des photos de banque d'images.
|
|
30
|
+
- **Partout où l'on ne peut pas ou ne veut pas appeler un service** : l'avatar se calcule à partir de la seule chaîne, donc il s'affiche pareil dans le navigateur, sur le serveur, en edge ou dans un script, sans requête réseau.
|
|
31
|
+
- **Un visage qui montre une humeur** : les 8 expressions collent à des statuts (`thinking` pendant un chargement, `sick` sur une erreur, `happy` après un succès) sans que le personnage change.
|
|
32
|
+
- **Un style ludique et reconnaissable** pour une communauté, un jeu ou un projet perso, quand un identicon générique paraît trop froid.
|
|
33
|
+
|
|
34
|
+
Quand **ne pas** l'utiliser :
|
|
35
|
+
|
|
36
|
+
- Il te faut une vraie photo ou une identité vérifiée. Un mochikao est un remplaçant, pas une preuve de qui est la personne.
|
|
37
|
+
- Il te faut une unicité garantie pour chaque utilisateur. Deux noms différents peuvent, en théorie, se ressembler.
|
|
38
|
+
- Choisis une **clé stable** (un id plutôt qu'un pseudo que l'utilisateur peut renommer) : si la chaîne change, le visage change.
|
|
39
|
+
|
|
23
40
|
## Démarrer
|
|
24
41
|
|
|
25
42
|
```bash
|
|
@@ -142,6 +159,8 @@ Mêmes attributs que les options ; `gaze` fait suivre le pointeur aux yeux.
|
|
|
142
159
|
GET /api/<nom>.svg?size=&bg=&hue=&tone=&color=&expression=&animate=&family=&shape=&eyes=&mouth=&extra=
|
|
143
160
|
```
|
|
144
161
|
|
|
162
|
+
Instance hébergée : `https://mochikao.alexvolkihar.ovh/api/<nom>.svg`. À essayer dans l'[éditeur](https://mochikao.alexvolkihar.ovh/editor.html).
|
|
163
|
+
|
|
145
164
|
Réponse `image/svg+xml` avec `Cache-Control: immutable` (même entrée → même sortie). Les paramètres invalides sont ignorés. Le handler (`api/handler.ts`) est une simple fonction `(req, res)` de `node:http`, à brancher où tu veux.
|
|
146
165
|
|
|
147
166
|
### CLI
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
**English** · [Français](README.fr.md)
|
|
4
4
|
|
|
5
|
+
[Website](https://mochikao.alexvolkihar.ovh) · [npm](https://www.npmjs.com/package/mochikao) · [GitHub](https://github.com/Alexvolkihar/mochikao)
|
|
6
|
+
|
|
5
7
|
A face for every name. `mochikao` turns any string (username, email, ID) into a little SVG character. The same name always gives the same mochikao.
|
|
6
8
|
|
|
7
9
|

|
|
@@ -20,6 +22,21 @@ A face for every name. `mochikao` turns any string (username, email, ID) into a
|
|
|
20
22
|
|
|
21
23
|
Inspired by [blobatar](https://blobatar.dev).
|
|
22
24
|
|
|
25
|
+
## When to use it
|
|
26
|
+
|
|
27
|
+
- **Default avatars** for users who haven't uploaded a photo: feed it a username or an ID and every account gets a face, with nothing to store.
|
|
28
|
+
- **Anonymous or pseudonymous people**: commenters, chat and multiplayer participants, guest users, reviewers. Each one is recognizable at a glance without revealing who they are.
|
|
29
|
+
- **Placeholders and seed data** in lists, mockups, demos and screenshots, instead of grey circles or stock photos.
|
|
30
|
+
- **Anywhere you can't or don't want to call a service**: the avatar is computed from the string alone, so it renders the same in the browser, on the server, at the edge or in a script, with no network request.
|
|
31
|
+
- **A face that shows a mood**: the 8 expressions fit statuses (`thinking` while loading, `sick` on an error, `happy` on success) while the character stays the same.
|
|
32
|
+
- **A playful, recognizable look** for a community, a game or a side project, where a generic identicon feels too cold.
|
|
33
|
+
|
|
34
|
+
When **not** to use it:
|
|
35
|
+
|
|
36
|
+
- You need a real photo or a verified identity. A mochikao is a stand-in, not proof of who someone is.
|
|
37
|
+
- You need every user to be guaranteed unique. Two different names can, in theory, look alike.
|
|
38
|
+
- Pick a **stable key** (an ID rather than a pseudonym a user can rename): change the string and the face changes.
|
|
39
|
+
|
|
23
40
|
## Getting started
|
|
24
41
|
|
|
25
42
|
```bash
|
|
@@ -142,6 +159,8 @@ Same attributes as the options; `gaze` makes the eyes follow the pointer.
|
|
|
142
159
|
GET /api/<name>.svg?size=&bg=&hue=&tone=&color=&expression=&animate=&family=&shape=&eyes=&mouth=&extra=
|
|
143
160
|
```
|
|
144
161
|
|
|
162
|
+
Hosted instance: `https://mochikao.alexvolkihar.ovh/api/<name>.svg`. Try it in the [editor](https://mochikao.alexvolkihar.ovh/editor.html).
|
|
163
|
+
|
|
145
164
|
Responds with `image/svg+xml` and `Cache-Control: immutable` (same input → same output). Invalid parameters are ignored. The handler (`api/handler.ts`) is a plain `node:http` `(req, res)` function you can mount anywhere.
|
|
146
165
|
|
|
147
166
|
### CLI
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mochikao",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Deterministic avatars: any string becomes a cute, unique SVG character. Zero dependencies, React / Vue / Svelte / Solid / web component.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"avatar",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"type": "git",
|
|
23
23
|
"url": "git+https://github.com/Alexvolkihar/mochikao.git"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://
|
|
25
|
+
"homepage": "https://mochikao.alexvolkihar.ovh",
|
|
26
26
|
"bugs": {
|
|
27
27
|
"url": "https://github.com/Alexvolkihar/mochikao/issues"
|
|
28
28
|
},
|