@7ots/cli 0.1.19 → 0.1.37
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/.env.example +14 -0
- package/brand/logos/base.svg +1 -0
- package/brand/logos/clawpump.png +0 -0
- package/brand/logos/conductors.svg +1 -0
- package/brand/logos/notlogin.svg +12 -0
- package/brand/logos/pumpfun.png +0 -0
- package/brand/logos/solana.png +0 -0
- package/brand/logos/spawnerbot.svg +1 -0
- package/brand/logos/virtuals.png +0 -0
- package/cli/7ots.mjs +59 -1
- package/cli/lib/account.mjs +23 -3
- package/cli/lib/assistant.mjs +88 -13
- package/cli/lib/brain.mjs +76 -8
- package/cli/lib/config.mjs +14 -3
- package/cli/lib/desktop-sync.mjs +177 -0
- package/cli/lib/i18n.mjs +9 -0
- package/cli/lib/inferences.mjs +19 -2
- package/cli/lib/integrations.mjs +61 -6
- package/cli/lib/pet-server.mjs +316 -41
- package/cli/lib/prompts.mjs +1 -1
- package/cli/lib/senses/gestures.mjs +121 -0
- package/cli/lib/senses/index.mjs +490 -0
- package/cli/lib/senses/rules.mjs +159 -0
- package/cli/lib/senses/sources/activity.mjs +95 -0
- package/cli/lib/senses/sources/calendar.mjs +75 -0
- package/cli/lib/senses/sources/index.mjs +17 -0
- package/cli/lib/senses/sources/mail.mjs +48 -0
- package/cli/lib/senses/sources/system.mjs +39 -0
- package/cli/lib/senses/util.mjs +41 -0
- package/cli/lib/senses/vendor.mjs +78 -0
- package/cli/lib/stt-local.py +16 -8
- package/cli/lib/stt.mjs +53 -6
- package/cli/lib/tooluse.mjs +56 -0
- package/cli/lib/vm.mjs +1 -1
- package/cli/lib/wake-local.py +109 -0
- package/cli/lib/wake.mjs +102 -0
- package/cli/pet/electron/main.cjs +145 -16
- package/cli/pet/pet.html +127 -27
- package/cli/pet/senses.html +342 -0
- package/cli/pet/settings.html +787 -86
- package/dist/7ots.esm.js +374 -146
- package/dist/7ots.esm.js.map +4 -4
- package/dist/7ots.iife.js +374 -146
- package/dist/7ots.iife.js.map +4 -4
- package/llms.txt +27 -0
- package/package.json +5 -2
- package/server/channels/apuchat.mjs +2 -0
- package/server/errors.mjs +90 -0
- package/server/notify.mjs +78 -0
- package/server/server.mjs +68 -12
- package/server/settings.mjs +3 -0
- package/server/site.mjs +401 -0
- package/server/tts.mjs +29 -5
- package/src/avatar/AvatarStage.js +2 -2
- package/src/avatar/three.js +3 -2
- package/src/character/AvatarEditor.js +2 -1
- package/src/character/Character.js +1 -1
- package/src/character/TradingCard.js +2 -0
- package/src/character/beat.js +64 -2
- package/src/character/mods/orc.js +8 -1
- package/src/character/mods.js +104 -10
- package/src/character/motion.js +162 -0
- package/src/character/parts.js +40 -38
- package/src/character/styles.js +40 -38
- package/src/character3d/Character3D.js +26 -5
- package/src/character3d/body.js +14 -12
- package/src/character3d/export.js +693 -0
- package/src/character3d/fx.js +13 -0
- package/src/character3d/index.js +2 -0
- package/src/character3d/materials.js +106 -10
- package/src/character3d/room-themes.js +1184 -0
- package/src/character3d/room.js +487 -0
- package/src/character3d/stage.js +9 -3
- package/src/creator/StepCreator.js +316 -0
- package/src/i18n/index.js +3 -3
- package/src/i18n/messages/character.js +352 -4
- package/src/i18n/messages/creator.js +138 -0
- package/src/i18n/messages/identity.js +89 -1
- package/src/i18n/messages/platform.js +255 -1
- package/src/i18n/messages/server.js +443 -1
- package/src/i18n/messages/widget.js +233 -0
- package/src/identity/random.js +14 -2
- package/src/identity/schema.js +2 -1
- package/src/index.js +10 -2
- package/src/voice/tags.js +22 -0
- package/server/platform/apuchat.mjs +0 -266
- package/server/platform/auth.mjs +0 -337
- package/server/platform/byte.mjs +0 -291
- package/server/platform/connect.mjs +0 -391
- package/server/platform/crypto.mjs +0 -80
- package/server/platform/db.mjs +0 -293
- package/server/platform/device.mjs +0 -247
- package/server/platform/integrations.mjs +0 -169
- package/server/platform/look.mjs +0 -20
- package/server/platform/mods.mjs +0 -222
- package/server/platform/orquesta.mjs +0 -611
- package/server/platform/profile.mjs +0 -182
- package/server/platform/routes.mjs +0 -589
- package/server/platform/runtime.mjs +0 -286
- package/server/platform/sites.mjs +0 -146
- package/server/platform/stage3d.mjs +0 -82
- package/server/platform/store.mjs +0 -469
- package/server/platform/vm.mjs +0 -1057
- package/server/platform/wallet.mjs +0 -255
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Mod de ejemplo: orco (piel verde, cejas fruncidas, colmillos y orejas puntiagudas).
|
|
1
|
+
// Mod de ejemplo: orco (piel verde, cejas fruncidas, mandíbula ancha, frente baja, colmillos y orejas puntiagudas).
|
|
2
2
|
// Los glb salen de scripts/mod-glb.mjs (orc-tusks, orc-ears).
|
|
3
3
|
export default {
|
|
4
4
|
"id": "orc",
|
|
@@ -28,9 +28,15 @@ export default {
|
|
|
28
28
|
"type": "none"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
+
"face": {
|
|
32
|
+
"jaw": 0.45,
|
|
33
|
+
"forehead": -0.35,
|
|
34
|
+
"width": 0.1
|
|
35
|
+
},
|
|
31
36
|
"parts": [
|
|
32
37
|
{
|
|
33
38
|
"id": "tusks",
|
|
39
|
+
"slot": "face",
|
|
34
40
|
"anchor": "mouth",
|
|
35
41
|
"layer": "front",
|
|
36
42
|
"svg": "<path d=\"M8 3Q11 -5 16 -13Q18.5 -4 14 5Z\" fill=\"{color}\" stroke=\"{line}\" stroke-width=\"1.6\" stroke-linejoin=\"round\"/><path d=\"M12 0Q14 -6 16 -10\" stroke=\"#fff\" stroke-width=\"1.4\" stroke-linecap=\"round\" fill=\"none\" opacity=\".55\"/><g transform=\"scale(-1 1)\"><path d=\"M8 3Q11 -5 16 -13Q18.5 -4 14 5Z\" fill=\"{color}\" stroke=\"{line}\" stroke-width=\"1.6\" stroke-linejoin=\"round\"/><path d=\"M12 0Q14 -6 16 -10\" stroke=\"#fff\" stroke-width=\"1.4\" stroke-linecap=\"round\" fill=\"none\" opacity=\".55\"/></g>",
|
|
@@ -47,6 +53,7 @@ export default {
|
|
|
47
53
|
},
|
|
48
54
|
{
|
|
49
55
|
"id": "ears",
|
|
56
|
+
"slot": "none",
|
|
50
57
|
"anchor": "eyes",
|
|
51
58
|
"layer": "back",
|
|
52
59
|
"svg": "<path d=\"M42 -12L86 -28L48 12Z\" fill=\"{body}\" stroke=\"{line}\" stroke-width=\"2.5\" stroke-linejoin=\"round\"/><path d=\"M52 -7L76 -20L53 4Z\" fill=\"{bodyDark}\" opacity=\".75\"/><g transform=\"scale(-1 1)\"><path d=\"M42 -12L86 -28L48 12Z\" fill=\"{body}\" stroke=\"{line}\" stroke-width=\"2.5\" stroke-linejoin=\"round\"/><path d=\"M52 -7L76 -20L53 4Z\" fill=\"{bodyDark}\" opacity=\".75\"/></g>",
|
package/src/character/mods.js
CHANGED
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
* {
|
|
6
6
|
* id: 'orc', v: 1, name: { es: 'Orco', en: 'Orc' }, by: '7ots',
|
|
7
7
|
* character: { body: { color: '#7aa64a' }, brows: { type: 'angled' }, accessories: [{ id: 'horns' }] },
|
|
8
|
+
* face: { jaw: 0.5, forehead: -0.3 }, // rasgos relativos a la cara del ot (ver abajo)
|
|
9
|
+
* replaces: ['eyes'], // huecos que vacía aunque no traiga nada para ellos
|
|
8
10
|
* parts: [{
|
|
9
11
|
* id: 'tusks', anchor: 'mouth', layer: 'front',
|
|
12
|
+
* slot: 'face', // hueco que ocupa (ver abajo); sin él se deduce del ancla
|
|
10
13
|
* svg: '<path d="…" fill="{color}"/>', // 2D: coordenadas de un ot de 120 de ancho, origen en el ancla
|
|
11
14
|
* view: [-30, -20, 60, 30], // caja del dibujo (para el respaldo 3D en plano)
|
|
12
15
|
* glb: 'data:model/gltf-binary;base64,…' | 'https://…/tusks.glb', // 3D (opcional)
|
|
@@ -16,20 +19,47 @@
|
|
|
16
19
|
* }],
|
|
17
20
|
* }
|
|
18
21
|
*
|
|
22
|
+
* Huecos (MOD_SLOTS: los grupos de accesorios de parts.js más 'body'): head (sombreros, pelo,
|
|
23
|
+
* orejas…), eyes (gafas, antifaces), face (bigotes, barbas, narices, colmillos), neck, back, body
|
|
24
|
+
* (ropa sobre el cuerpo; no hay accesorios de catálogo ahí) y extra. Un mod REEMPLAZA lo que el ot
|
|
25
|
+
* (o un mod anterior) lleva en cada hueco que ocupa: el de sus piezas, el de los accesorios de
|
|
26
|
+
* catálogo de su `character.accessories` y los de `replaces` ('all' = todos). Así un mod con
|
|
27
|
+
* sombrero le quita al ot el suyo en vez de ponerle otro encima. Una pieza con slot 'none' se suma
|
|
28
|
+
* sin quitar nada. Las piezas sin `slot` (mods de antes) lo deducen de su ancla y su capa: delante,
|
|
29
|
+
* top → head, eyes → eyes, nose/mouth → face, neck → neck; detrás, top → head y neck/center/
|
|
30
|
+
* bottom/shoulder → back; lo demás, 'none'.
|
|
31
|
+
*
|
|
32
|
+
* `face`: cambios físicos relativos a la cara del ot, cada uno de -1 a 1 (0 = como está), para
|
|
33
|
+
* parecerse a quien imita sin dejar de ser ese ot. Deforman su silueta (y con ella el cuerpo 3D,
|
|
34
|
+
* que sale de los mismos puntos) y mueven ojos y boca:
|
|
35
|
+
* width, height cara más ancha/estrecha, más alta/baja (los pies se quedan en el suelo)
|
|
36
|
+
* jaw mandíbula: + ancha y cuadrada, − fina
|
|
37
|
+
* chin barbilla: + marcada hacia abajo, − plana
|
|
38
|
+
* forehead frente: + alta (despejada, con entradas), − baja
|
|
39
|
+
* cheekbones pómulos: + marcados, − hundidos
|
|
40
|
+
* eyeSize, eyeSpacing, eyeHeight, mouthSize, mouthHeight
|
|
41
|
+
* Los rasgos absolutos (tono de piel = body.color, forma = body.shape o body.points, tipo y color
|
|
42
|
+
* de ojos, cejas y boca, mejillas, textura) van en `character`; si el mod fija body.shape sin
|
|
43
|
+
* body.points, la silueta dibujada a mano del ot deja paso a esa forma.
|
|
44
|
+
*
|
|
19
45
|
* Un mod puede traer además un cuerpo completo (3D) que reemplaza al ot procedural:
|
|
20
46
|
* model: { url: 'https://…/muneco.vrm' | '/mods/<hash>.vrm' | data:glb, scale, y, rot }
|
|
21
47
|
* (VRM o GLB; ver src/character3d/model.js). En 2D se sigue viendo el ot con su parche.
|
|
22
48
|
*
|
|
23
|
-
* `character` es un parche de la ficha (normalizeCharacter lo sanea); sus `accessories`
|
|
24
|
-
*
|
|
25
|
-
* mismas unidades que el SVG (1 = 1 px de un ot de 120 de ancho) con y hacia arriba.
|
|
49
|
+
* `character` es un parche de la ficha (normalizeCharacter lo sanea); sus `accessories` ocupan el
|
|
50
|
+
* hueco de su grupo. En el SVG valen {color} {color2} {body} {bodyDark} {bodyLight} {line}. El glb
|
|
51
|
+
* usa las mismas unidades que el SVG (1 = 1 px de un ot de 120 de ancho) con y hacia arriba.
|
|
26
52
|
*
|
|
27
53
|
* Todo pasa por aquí antes de guardarse o pintarse: el SVG se reescribe con una lista cerrada de
|
|
28
54
|
* etiquetas y atributos (sin scripts, eventos, enlaces ni estilos) y el glb solo puede ser https o
|
|
29
55
|
* un data: de glb.
|
|
30
56
|
*/
|
|
31
57
|
|
|
58
|
+
import { ACCESSORIES, SHAPES } from './parts.js';
|
|
59
|
+
|
|
32
60
|
export const MOD_ANCHORS = ['top', 'eyes', 'nose', 'mouth', 'neck', 'center', 'bottom', 'shoulder'];
|
|
61
|
+
export const MOD_SLOTS = ['head', 'eyes', 'face', 'neck', 'back', 'body', 'extra'];
|
|
62
|
+
export const MOD_FACE = ['width', 'height', 'jaw', 'chin', 'forehead', 'cheekbones', 'eyeSize', 'eyeSpacing', 'eyeHeight', 'mouthSize', 'mouthHeight'];
|
|
33
63
|
export const MAX_MODS = 4;
|
|
34
64
|
const MAX_PARTS = 8;
|
|
35
65
|
const MAX_SVG = 20000;
|
|
@@ -125,21 +155,33 @@ const modelOf = (v) => {
|
|
|
125
155
|
const nameOf = (v) => {
|
|
126
156
|
if (isObj(v)) {
|
|
127
157
|
const o = {};
|
|
128
|
-
for (const k of ['en', 'es', 'pt']) if (v[k]) o[k] = str(v[k], 40);
|
|
158
|
+
for (const k of ['en', 'es', 'pt', 'zh', 'hi']) if (v[k]) o[k] = str(v[k], 40);
|
|
129
159
|
return Object.keys(o).length ? o : '';
|
|
130
160
|
}
|
|
131
161
|
return str(v, 40);
|
|
132
162
|
};
|
|
133
163
|
|
|
134
164
|
const PATCH_KEYS = ['body', 'eyes', 'brows', 'mouth', 'cheeks', 'finish', 'texture', 'outline', 'accessories'];
|
|
165
|
+
/** Hueco de cada accesorio de catálogo: su grupo. */
|
|
166
|
+
const GROUP = Object.fromEntries(ACCESSORIES.map((a) => [a.id, a.group]));
|
|
167
|
+
const ANCHOR_SLOT = {
|
|
168
|
+
front: { top: 'head', eyes: 'eyes', nose: 'face', mouth: 'face', neck: 'neck' },
|
|
169
|
+
// detrás del cuerpo no hay gafas ni bigotes (las orejas del orco van en 'eyes' por detrás)
|
|
170
|
+
back: { top: 'head', neck: 'back', center: 'back', bottom: 'back', shoulder: 'back' },
|
|
171
|
+
};
|
|
172
|
+
/** Hueco de una pieza: el que declara, o el de su ancla (mods de antes de los huecos). */
|
|
173
|
+
const slotOf = (slot, anchor, layer) => (slot === 'none' || MOD_SLOTS.includes(slot) ? slot : ANCHOR_SLOT[layer][anchor] || 'none');
|
|
135
174
|
|
|
136
175
|
function normalizePart(p, modId) {
|
|
137
176
|
if (!isObj(p) || !/^[a-z0-9-]{1,24}$/.test(String(p.id))) return null;
|
|
138
177
|
const view = Array.isArray(p.view) && p.view.length === 4 ? p.view.map((v, i) => num(v, 0, i < 2 ? -400 : 1, 400)) : [-60, -60, 120, 120];
|
|
178
|
+
const anchor = MOD_ANCHORS.includes(p.anchor) ? p.anchor : 'center';
|
|
179
|
+
const layer = p.layer === 'back' ? 'back' : 'front';
|
|
139
180
|
const part = {
|
|
140
181
|
id: p.id,
|
|
141
|
-
anchor
|
|
142
|
-
layer
|
|
182
|
+
anchor,
|
|
183
|
+
layer,
|
|
184
|
+
slot: slotOf(p.slot, anchor, layer),
|
|
143
185
|
svg: sanitizeSvg(p.svg, `m-${modId}-${p.id}`),
|
|
144
186
|
view,
|
|
145
187
|
glb: glbUrl(p.glb),
|
|
@@ -166,12 +208,17 @@ export function normalizeMod(m) {
|
|
|
166
208
|
const parts = (Array.isArray(m.parts) ? m.parts : []).slice(0, MAX_PARTS).map((p) => normalizePart(p, m.id)).filter(Boolean);
|
|
167
209
|
const seen = new Set();
|
|
168
210
|
const model = modelOf(m.model);
|
|
211
|
+
const face = {};
|
|
212
|
+
if (isObj(m.face)) for (const k of MOD_FACE) if (num(m.face[k], 0, -1, 1)) face[k] = Math.round(num(m.face[k], 0, -1, 1) * 100) / 100;
|
|
213
|
+
const replaces = Array.isArray(m.replaces) ? [...new Set(m.replaces.filter((x) => x === 'all' || MOD_SLOTS.includes(x)))] : [];
|
|
169
214
|
return {
|
|
170
215
|
id: m.id,
|
|
171
216
|
v: 1,
|
|
172
217
|
name: nameOf(m.name) || m.id,
|
|
173
218
|
...(m.by ? { by: str(m.by, 40) } : {}),
|
|
174
219
|
character,
|
|
220
|
+
...(Object.keys(face).length ? { face } : {}),
|
|
221
|
+
...(replaces.length ? { replaces } : {}),
|
|
175
222
|
parts: parts.filter((p) => !seen.has(p.id) && seen.add(p.id)),
|
|
176
223
|
...(model ? { model } : {}),
|
|
177
224
|
};
|
|
@@ -202,22 +249,69 @@ const merge = (a, b) => {
|
|
|
202
249
|
return o;
|
|
203
250
|
};
|
|
204
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Rasgos de `face` sobre una ficha ya normalizada: deforma su silueta (16 puntos simétricos) y
|
|
254
|
+
* mueve ojos y boca. Todo relativo a la caja del cuerpo, con los pies donde estaban.
|
|
255
|
+
*/
|
|
256
|
+
function applyFace(s, f) {
|
|
257
|
+
const pts = s.body.points || SHAPES.find((x) => x.id === s.body.shape)?.points || SHAPES[0].points;
|
|
258
|
+
const xs = pts.map((p) => p[0]);
|
|
259
|
+
const ys = pts.map((p) => p[1]);
|
|
260
|
+
const cx = (Math.min(...xs) + Math.max(...xs)) / 2;
|
|
261
|
+
const cy = (Math.min(...ys) + Math.max(...ys)) / 2;
|
|
262
|
+
const hw = (Math.max(...xs) - Math.min(...xs)) / 2 || 1;
|
|
263
|
+
const hh = (Math.max(...ys) - Math.min(...ys)) / 2 || 1;
|
|
264
|
+
const foot = Math.max(...ys);
|
|
265
|
+
const v = (k) => f[k] || 0;
|
|
266
|
+
const points = pts.map(([x, y]) => {
|
|
267
|
+
const u = (x - cx) / hw; // -1 izquierda … 1 derecha
|
|
268
|
+
const t = (y - cy) / hh; // -1 arriba … 1 abajo
|
|
269
|
+
const low = Math.max(0, t);
|
|
270
|
+
const up = Math.max(0, -t);
|
|
271
|
+
let sx = 1 + 0.22 * v('width');
|
|
272
|
+
sx *= 1 + 0.3 * v('jaw') * low ** 0.8; // mandíbula: la mitad de abajo
|
|
273
|
+
sx *= 1 + 0.16 * v('cheekbones') * Math.max(0, 1 - ((t + 0.1) / 0.75) ** 2); // pómulos: algo por encima del centro (suave: son 16 puntos)
|
|
274
|
+
let ny = y - hh * 0.18 * v('forehead') * up ** 2; // frente: sube la parte de arriba
|
|
275
|
+
ny += hh * 0.2 * v('chin') * Math.max(0, 1 - Math.abs(u) / 0.6) * low ** 2; // barbilla: solo el centro de abajo
|
|
276
|
+
ny = foot - (foot - ny) * (1 + 0.18 * v('height'));
|
|
277
|
+
return [cx + (x - cx) * sx, ny];
|
|
278
|
+
});
|
|
279
|
+
return {
|
|
280
|
+
...s,
|
|
281
|
+
body: { ...s.body, points },
|
|
282
|
+
eyes: { ...s.eyes, size: s.eyes.size * (1 + 0.35 * v('eyeSize')), spacing: s.eyes.spacing * (1 + 0.35 * v('eyeSpacing')), y: s.eyes.y - 14 * v('eyeHeight') },
|
|
283
|
+
mouth: { ...s.mouth, size: s.mouth.size * (1 + 0.35 * v('mouthSize')), y: s.mouth.y - 12 * v('mouthHeight') },
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
205
287
|
/**
|
|
206
288
|
* La ficha que se pinta: la base con los parches de sus mods (en orden) y sus piezas como
|
|
207
|
-
* accesorios `mod:<mod>/<pieza>`.
|
|
208
|
-
*
|
|
289
|
+
* accesorios `mod:<mod>/<pieza>`. Cada mod vacía antes los huecos que ocupa (MOD_SLOTS): lo que
|
|
290
|
+
* el ot o un mod anterior llevaba ahí se quita en vez de quedar debajo. `normalize` es
|
|
291
|
+
* normalizeCharacter (sin dependencia circular). La ficha devuelta lleva `_modParts` con los
|
|
292
|
+
* datos de esas piezas (los lee modPart).
|
|
209
293
|
*/
|
|
210
294
|
export function applyMods(spec, normalize) {
|
|
211
295
|
const mods = spec?.mods;
|
|
212
296
|
if (!Array.isArray(mods) || !mods.length) return spec;
|
|
213
297
|
let s = spec;
|
|
214
|
-
|
|
298
|
+
let extra = [];
|
|
215
299
|
const parts = {};
|
|
216
300
|
let model = null;
|
|
301
|
+
const slotIn = (a) => (a.id.startsWith('mod:') ? parts[a.id]?.slot : GROUP[a.id]);
|
|
217
302
|
for (const m of mods) {
|
|
218
303
|
if (m.model) model = m.model; // el último cuerpo completo manda
|
|
219
304
|
const { accessories, ...patch } = m.character || {};
|
|
220
|
-
|
|
305
|
+
const add = (Array.isArray(accessories) ? accessories : []).filter((a, i, l) => isObj(a) && GROUP[a.id] && l.findIndex((b) => b?.id === a.id) === i);
|
|
306
|
+
const slots = new Set(m.replaces || []);
|
|
307
|
+
for (const a of add) slots.add(GROUP[a.id]);
|
|
308
|
+
for (const p of m.parts) if (p.slot !== 'none') slots.add(p.slot);
|
|
309
|
+
const free = (a) => !slots.has('all') && !slots.has(slotIn(a));
|
|
310
|
+
// una forma nueva manda sobre la silueta dibujada a mano del ot (si el mod no trae la suya)
|
|
311
|
+
const base = isObj(patch.body) && patch.body.shape && !patch.body.points ? { ...s, body: { ...s.body, points: null } } : s;
|
|
312
|
+
s = normalize({ ...merge(base, patch), accessories: [...s.accessories.filter(free), ...add] });
|
|
313
|
+
if (m.face) s = normalize(applyFace(s, m.face));
|
|
314
|
+
extra = extra.filter(free);
|
|
221
315
|
for (const p of m.parts) {
|
|
222
316
|
const id = `mod:${m.id}/${p.id}`;
|
|
223
317
|
parts[id] = p;
|
package/src/character/motion.js
CHANGED
|
@@ -414,6 +414,105 @@ export const GESTURES = {
|
|
|
414
414
|
return { r: S(age, 0.9) * 7 * e, x: S(age, 0.9, 1.2) * 0.03 * e, lx: S(age, 1.4) * 0.8 * e, ly: Math.cos((age / 1000) * TAU * 1.4) * 0.6 * e, curve: -0.1 * e, open: 0.15 * e, msx: 1 - 0.2 * e };
|
|
415
415
|
},
|
|
416
416
|
},
|
|
417
|
+
// ── farmeo de aura: poses de meme que suman aura. No son bailes: van aparte (`7ots aura`, su botón, su contador)
|
|
418
|
+
// y `aura` es su música (phonk o montagem de beat.js) ──
|
|
419
|
+
// six-seven: las palmas arriba, una sube y la otra baja, al compás, con cara de nada
|
|
420
|
+
sixseven: {
|
|
421
|
+
ms: 6000,
|
|
422
|
+
hold: true,
|
|
423
|
+
aura: 'montagem',
|
|
424
|
+
legs: 'wide',
|
|
425
|
+
hands: 'sixseven',
|
|
426
|
+
fx: [[0.04, 'aura'], [0.5, 'aura']],
|
|
427
|
+
pose: (t, age) => {
|
|
428
|
+
const e = env(t, 0.06, 0.08);
|
|
429
|
+
const w = snap(S(age, BEAT / 2));
|
|
430
|
+
return { r: w * 4 * e, x: w * 0.015 * e, y: -0.015 * Math.abs(S(age, BEAT)) * e, blink: 0.35 * e, curve: 0.15 * e, msx: 1 - 0.15 * e, lx: 0.2 * e };
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
// mirada sigma (mewing): quieto, mentón arriba, ojos a media asta, boca apretada; mira de reojo y vuelve a ti
|
|
434
|
+
mewing: {
|
|
435
|
+
ms: 6000,
|
|
436
|
+
hold: true,
|
|
437
|
+
aura: 'phonk',
|
|
438
|
+
legs: 'wide',
|
|
439
|
+
hands: 'hips',
|
|
440
|
+
fx: [[0.05, 'aura'], [0.55, 'aura']],
|
|
441
|
+
pose: (t, age) => {
|
|
442
|
+
const e = env(t, 0.12, 0.1);
|
|
443
|
+
const side = ((age / 1000) * (BEAT / 8)) % 1 < 0.5 ? 0.6 : 0;
|
|
444
|
+
return { r: -3 * e, y: -0.01 * e, sy: 1 + 0.02 * e, sx: 1 - 0.01 * e, blink: 0.45 * e, eye: 1 - 0.08 * e, lx: side * e, ly: -0.15 * e, curve: -0.05 * e, msx: 1 - 0.35 * e, lift: -1.5 * e };
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
// paso tikio: una mano arriba de reloj y la otra le marca la hora a golpes, mientras da una vuelta entera
|
|
448
|
+
tikio: {
|
|
449
|
+
ms: 6000,
|
|
450
|
+
hold: true,
|
|
451
|
+
aura: 'montagem',
|
|
452
|
+
legs: 'stomp',
|
|
453
|
+
hands: 'tikio',
|
|
454
|
+
fx: [[0.04, 'aura']],
|
|
455
|
+
pose: (t, age) => {
|
|
456
|
+
const e = env(t, 0.06, 0.08);
|
|
457
|
+
const f = ((age / 1000) * (BEAT / 8)) % 1; // una vuelta cada 8 tiempos
|
|
458
|
+
const turn = f > 0.5 ? EASE.inOut((f - 0.5) / 0.5) : 0;
|
|
459
|
+
const tick = Math.abs(S(age, BEAT));
|
|
460
|
+
return { sx: lerp(1, Math.cos(turn * TAU), e) * (1 - 0.02 * tick * e), sy: 1 + 0.02 * tick * e, y: -0.015 * tick * e, curve: 0.3 * e, blink: 0.3 * e };
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
// la garza: en una pata, las manos en triángulo sobre la cabeza, mirando con sospecha
|
|
464
|
+
garza: {
|
|
465
|
+
ms: 6000,
|
|
466
|
+
hold: true,
|
|
467
|
+
aura: 'phonk',
|
|
468
|
+
legs: 'garza',
|
|
469
|
+
hands: 'garza',
|
|
470
|
+
fx: [[0.05, 'aura'], [0.55, 'aura']],
|
|
471
|
+
pose: (t, age) => {
|
|
472
|
+
const e = env(t, 0.1, 0.08);
|
|
473
|
+
const wob = S(age, 0.7) * 0.6 + S(age, 1.9) * 0.4; // se balancea para no caerse
|
|
474
|
+
const look = ((age / 1000) * (BEAT / 4)) % 1 < 0.5 ? 0.7 : -0.7;
|
|
475
|
+
return { r: wob * 3 * e, x: wob * 0.01 * e, y: -0.02 * e, sy: 1 + 0.03 * e, blink: 0.5 * e, lx: look * e, curve: -0.25 * e, lift: -2 * e, msx: 1 - 0.25 * e };
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
// paso deal: pies rápidos coordinados y los codos que entran y salen juntos
|
|
479
|
+
deal: {
|
|
480
|
+
ms: 6000,
|
|
481
|
+
hold: true,
|
|
482
|
+
aura: 'montagem',
|
|
483
|
+
legs: 'deal',
|
|
484
|
+
hands: 'deal',
|
|
485
|
+
fx: [[0.04, 'aura']],
|
|
486
|
+
pose: (t, age) => {
|
|
487
|
+
const e = env(t, 0.06, 0.08);
|
|
488
|
+
const hop = Math.abs(S(age, BEAT * 2));
|
|
489
|
+
const side = snap(S(age, BEAT / 2));
|
|
490
|
+
return { x: side * 0.03 * e, r: -side * 3 * e, y: -0.025 * hop * e, sy: 1 + 0.03 * hop * e, curve: 0.4 * e, blink: 0.25 * e };
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
// festejo de futbolista: carrera, salto con giro y el «¡siuuu!» con los brazos abiertos; después, el dedo al cielo
|
|
494
|
+
siu: {
|
|
495
|
+
ms: 6000,
|
|
496
|
+
hold: true,
|
|
497
|
+
aura: 'phonk',
|
|
498
|
+
legs: 'siu',
|
|
499
|
+
hands: 'siu',
|
|
500
|
+
fx: [[0.3, 'aura'], [0.32, 'confetti']],
|
|
501
|
+
pose: (t, age) => {
|
|
502
|
+
const e = env(t, 0.04, 0.08);
|
|
503
|
+
const f = (age % 4000) / 4000;
|
|
504
|
+
if (f < 0.2) return { x: lerp(-0.05, 0.03, f / 0.2) * e, y: -0.02 * Math.abs(S(age, BEAT * 2)) * e, r: 6 * e, curve: 0.6 * e }; // corre
|
|
505
|
+
if (f < 0.4) {
|
|
506
|
+
const k = (f - 0.2) / 0.2; // salta y gira en el aire
|
|
507
|
+
return { x: 0.03 * e, y: -0.16 * Math.sin(Math.PI * k) * e, sx: lerp(1, Math.cos(EASE.inOut(k) * TAU), e), sy: 1 + 0.06 * Math.sin(Math.PI * k) * e, curve: 0.5 * e };
|
|
508
|
+
}
|
|
509
|
+
if (f < 0.75) {
|
|
510
|
+
const k = clamp((f - 0.4) / 0.06); // cae abierto: ¡siuuu!
|
|
511
|
+
return { x: 0.03 * e, sy: 1 - 0.08 * (1 - k) * e, sx: 1 + 0.06 * e, open: 0.85 * k * e, msx: 1 - 0.45 * e, curve: 0.1 * e, blink: 0.2 * e, lift: 2 * e };
|
|
512
|
+
}
|
|
513
|
+
return { x: 0.03 * e, ly: -0.8 * e, curve: 0.7 * e, lift: 1.5 * e, open: 0.1 * e }; // el dedo al cielo
|
|
514
|
+
},
|
|
515
|
+
},
|
|
417
516
|
};
|
|
418
517
|
|
|
419
518
|
/** Nombres alternativos (incluidos los gestos del avatar 3D de TalkingHead). */
|
|
@@ -427,6 +526,12 @@ export const GESTURE_ALIAS = {
|
|
|
427
526
|
export const DANCES = Object.keys(GESTURES).filter((k) => GESTURES[k].dance);
|
|
428
527
|
/** Baile → estilo de música (beat.js). */
|
|
429
528
|
export const DANCE_STYLE = Object.fromEntries(DANCES.map((k) => [k, GESTURES[k].dance]));
|
|
529
|
+
/** El farmeo de aura (six-seven, mewing, tikio, garza, deal, siu): gestos con `aura`, aparte de los bailes. */
|
|
530
|
+
export const AURA_MOVES = Object.keys(GESTURES).filter((k) => GESTURES[k].aura);
|
|
531
|
+
/** Farmeo → su música (phonk o montagem, beat.js). */
|
|
532
|
+
export const AURA_STYLE = Object.fromEntries(AURA_MOVES.map((k) => [k, GESTURES[k].aura]));
|
|
533
|
+
/** Lo que suma cada farmeo (el número que flota: +67, +6.700…). */
|
|
534
|
+
export const AURA_POINTS = [67, 100, 420, 1000, 6700];
|
|
430
535
|
|
|
431
536
|
// ───────────────────────────── manos ─────────────────────────────
|
|
432
537
|
|
|
@@ -491,6 +596,28 @@ export const HAND_POSES = {
|
|
|
491
596
|
return { u: lerp(p0.u, p1.u, k), v: lerp(p0.v, p1.v, k), ang: lerp(p0.ang, p1.ang, k), type: 'open' };
|
|
492
597
|
},
|
|
493
598
|
cover: (s, a, dir, c) => ({ x: c.cx + s * c.sp, y: c.eyeY, ang: -8, type: 'open', s: 1.3 }),
|
|
599
|
+
// farmeo de aura
|
|
600
|
+
sixseven: (s, a) => {
|
|
601
|
+
const w = snap(S(a, BEAT / 2)) * s; // una palma sube mientras la otra baja
|
|
602
|
+
return { u: 1.32, v: -0.05 - w * 0.32, ang: 90, type: 'open', s: 1.05 };
|
|
603
|
+
},
|
|
604
|
+
tikio: (s, a, dir) => {
|
|
605
|
+
if (s !== dir) return { u: 0.35, v: -1.0, ang: s * 10, type: 'open' }; // el reloj, arriba
|
|
606
|
+
const k = Math.max(0, S(a, BEAT)) ** 1.5; // la otra le golpea la palma a cada tiempo
|
|
607
|
+
return { u: lerp(0.95, -0.15, k), v: lerp(-0.7, -0.95, k), ang: lerp(-20, -80, k), type: 'open' };
|
|
608
|
+
},
|
|
609
|
+
garza: (s, a) => ({ u: 0.28, v: -1.3 + 0.03 * S(a, 0.7), ang: -s * 38, type: 'open' }), // las puntas de los dedos se tocan sobre la cabeza
|
|
610
|
+
deal: (s, a) => {
|
|
611
|
+
const k = Math.max(0, S(a, BEAT * 2)) ** 1.2; // los dos codos a la vez, rápido
|
|
612
|
+
return { u: lerp(0.95, 1.3, k), v: lerp(0.2, 0.0, k), ang: lerp(150, 100, k), type: 'fist' };
|
|
613
|
+
},
|
|
614
|
+
siu: (s, a, dir) => {
|
|
615
|
+
const f = (a % 4000) / 4000;
|
|
616
|
+
if (f < 0.2) return { u: 1.1, v: 0.2 + s * S(a, BEAT * 2) * 0.25, ang: 160, type: 'fist' };
|
|
617
|
+
if (f < 0.4) return { u: 1.0, v: -0.6, ang: 20, type: 'open' };
|
|
618
|
+
if (f < 0.75) return { u: 1.45, v: 0.55, ang: 140, type: 'open' }; // brazos abiertos hacia abajo
|
|
619
|
+
return s === dir ? { u: 0.9, v: -1.25, ang: 0, type: 'point' } : { u: 1.0, v: 0.45, ang: 170, type: 'open' };
|
|
620
|
+
},
|
|
494
621
|
};
|
|
495
622
|
|
|
496
623
|
function handPos(pose, s, age, dir, c) {
|
|
@@ -635,6 +762,20 @@ export const LEG_POSES = {
|
|
|
635
762
|
disco: (s, a, dir) => (s === dir ? { dx: 0.12, lift: 0.22 * tap(a, BEAT, 0), ang: -25 * tap(a, BEAT, 0) } : { dx: -0.03, lift: 0, ang: 0 }),
|
|
636
763
|
// bien abiertas y firmes
|
|
637
764
|
wide: (s) => ({ dx: s * 0.1, lift: 0, ang: 0 }),
|
|
765
|
+
// en una pata: la otra recogida a la altura de la rodilla
|
|
766
|
+
garza: (s, a, dir) => (s === dir ? { dx: -0.06, lift: 0.85, ang: -70 } : { dx: 0.02, lift: 0, ang: 0 }),
|
|
767
|
+
// pasos cortos y rápidos, cruzando y abriendo
|
|
768
|
+
deal: (s, a) => {
|
|
769
|
+
const ph = s > 0 ? 0 : Math.PI;
|
|
770
|
+
return { dx: 0.08 * snap(S(a, BEAT, ph)), lift: 0.25 * tap(a, BEAT * 2, ph), ang: -10 * tap(a, BEAT * 2, ph) };
|
|
771
|
+
},
|
|
772
|
+
// corre, salta con las dos y cae abierto
|
|
773
|
+
siu: (s, a) => {
|
|
774
|
+
const f = (a % 4000) / 4000;
|
|
775
|
+
if (f < 0.2) return { dx: 0.1 * S(a, BEAT * 2, s > 0 ? 0 : Math.PI), lift: 0.4 * tap(a, BEAT * 2, s > 0 ? 0 : Math.PI), ang: -15 };
|
|
776
|
+
if (f < 0.4) return { dx: 0, lift: 0.5 * Math.sin(Math.PI * ((f - 0.2) / 0.2)), ang: -20 };
|
|
777
|
+
return { dx: s * 0.14, lift: 0, ang: 0 };
|
|
778
|
+
},
|
|
638
779
|
};
|
|
639
780
|
|
|
640
781
|
/**
|
|
@@ -837,6 +978,27 @@ const at = (x, y, inner, extra = '') => `<g transform="translate(${R(x)} ${R(y)}
|
|
|
837
978
|
|
|
838
979
|
/** Efectos: { ms, loop?, layer: 'face'|'front', draw(c, p 0..1, ageMs, o, rnd) }. */
|
|
839
980
|
export const EFFECTS = {
|
|
981
|
+
// farmeo de aura: un halo que sube en llamitas violetas y el «+aura» flotando
|
|
982
|
+
aura: {
|
|
983
|
+
ms: 2600,
|
|
984
|
+
draw: (c, p, age, o, rnd) => {
|
|
985
|
+
const e = Math.min(clamp(p / 0.15), fade(p, 0.3));
|
|
986
|
+
let out = `<ellipse cx="${R(c.cx)}" cy="${R(c.top + c.H * 0.55)}" rx="${R(c.W * 0.62)}" ry="${R(c.H * 0.6)}" fill="none" stroke="#a78bfa" stroke-width="${R(c.W * 0.03)}" opacity="${R(0.35 * e)}"/>`;
|
|
987
|
+
for (let i = 0; i < 7; i++) {
|
|
988
|
+
const a = rnd() * TAU;
|
|
989
|
+
const q = ((p * 1.6 + i / 7) % 1);
|
|
990
|
+
const x = c.cx + Math.cos(a) * c.W * (0.45 + 0.1 * rnd());
|
|
991
|
+
const y = c.top + c.H * (0.9 - 0.9 * q);
|
|
992
|
+
const sz = c.W * 0.05 * Math.sin(Math.PI * q);
|
|
993
|
+
if (sz > 0.3) out += at(x, y, `<path d="M0 ${R(-sz * 2)}Q${R(sz)} 0 0 ${R(sz)}Q${R(-sz)} 0 0 ${R(-sz * 2)}Z" fill="#c4b5fd" opacity="${R(0.85 * e)}"/>`);
|
|
994
|
+
}
|
|
995
|
+
const k = c.W / 120;
|
|
996
|
+
const q = clamp(p / 0.8);
|
|
997
|
+
// el «+N aura» solo si te lo pasan (o.aura): el pet lo muestra él, encima del ot en 2D y en 3D
|
|
998
|
+
if (typeof o.aura === 'number') out += `<g opacity="${R(Math.min(clamp(p / 0.1), fade(p, 0.35)))}">${at(c.cx + c.dir * c.W * 0.5, c.top - c.H * 0.1 - c.H * 0.25 * EASE.out(q), `<text text-anchor="middle" font-family="system-ui,sans-serif" font-weight="900" font-size="15" fill="#7c3aed" stroke="#fff" stroke-width="3" paint-order="stroke">+${o.aura.toLocaleString('en-US')} aura</text>`, ` scale(${R(k)})`)}</g>`;
|
|
999
|
+
return out;
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
840
1002
|
sparkles: {
|
|
841
1003
|
ms: 1300,
|
|
842
1004
|
draw: (c, p, age, o, rnd) => {
|
package/src/character/parts.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Nombres visibles: el `label` de cada pieza es solo el respaldo en español; la interfaz usa
|
|
13
13
|
* partLabel(t, tipo, id), que lee `character.<tipo>.<id>` del catálogo de i18n
|
|
14
|
-
* (src/i18n/messages/character.js). Una pieza nueva debe añadir su texto en es/en/pt allí
|
|
14
|
+
* (src/i18n/messages/character.js). Una pieza nueva debe añadir su texto en es/en/pt/zh/hi allí
|
|
15
15
|
* (o con addMessages desde el sitio).
|
|
16
16
|
*/
|
|
17
17
|
|
|
@@ -135,38 +135,38 @@ export const SHAPES = [
|
|
|
135
135
|
// ── catálogo 2 (2026-10): añadidas al final; las semillas antiguas no las sacan (ver CATALOG_V1) ──
|
|
136
136
|
{
|
|
137
137
|
id: 'peanut',
|
|
138
|
-
label: 'Cacahuete', en: 'Peanut', pt: 'Amendoim',
|
|
138
|
+
label: 'Cacahuete', en: 'Peanut', pt: 'Amendoim', zh: '花生', hi: 'मूंगफली',
|
|
139
139
|
points: superShape({ rxT: 56, rxB: 64, ryT: 72, ryB: 60, nT: 2.2, nB: 2.4, tweak: (i, x, y) => (i === 4 || i === 12 ? [100 + (x - 100) * 0.84, y + 4] : i === 3 || i === 13 ? [100 + (x - 100) * 1.04, y] : [x, y]) }),
|
|
140
140
|
},
|
|
141
|
-
{ id: 'onigiri', label: 'Onigiri', en: 'Onigiri', pt: 'Onigiri', points: superShape({ rxT: 40, rxB: 72, ryT: 74, ryB: 54, nT: 1.5, nB: 3.4 }) },
|
|
142
|
-
{ id: 'bell', label: 'Campana', en: 'Bell', pt: 'Sino', points: superShape({ rxT: 48, rxB: 74, ryT: 72, ryB: 54, nT: 2.2, nB: 5.5 }) },
|
|
143
|
-
{ id: 'bun', label: 'Bollito', en: 'Bun', pt: 'Pãozinho', points: superShape({ rxT: 70, rxB: 74, ryT: 70, ryB: 40, nT: 2.1, nB: 5 }) },
|
|
141
|
+
{ id: 'onigiri', label: 'Onigiri', en: 'Onigiri', pt: 'Onigiri', zh: '饭团', hi: 'ओनिगिरी', points: superShape({ rxT: 40, rxB: 72, ryT: 74, ryB: 54, nT: 1.5, nB: 3.4 }) },
|
|
142
|
+
{ id: 'bell', label: 'Campana', en: 'Bell', pt: 'Sino', zh: '铃铛', hi: 'घंटी', points: superShape({ rxT: 48, rxB: 74, ryT: 72, ryB: 54, nT: 2.2, nB: 5.5 }) },
|
|
143
|
+
{ id: 'bun', label: 'Bollito', en: 'Bun', pt: 'Pãozinho', zh: '小面包', hi: 'बन', points: superShape({ rxT: 70, rxB: 74, ryT: 70, ryB: 40, nT: 2.1, nB: 5 }) },
|
|
144
144
|
{
|
|
145
145
|
id: 'bear',
|
|
146
|
-
label: 'Osito', en: 'Teddy', pt: 'Ursinho',
|
|
146
|
+
label: 'Osito', en: 'Teddy', pt: 'Ursinho', zh: '小熊', hi: 'टेडी',
|
|
147
147
|
points: superShape({
|
|
148
148
|
rxT: 60, rxB: 64, ryT: 62, ryB: 60, nT: 2.3, nB: 2.4,
|
|
149
149
|
tweak: (i, x, y) => (i === 2 || i === 14 ? [x + (i === 2 ? 14 : -14), y - 16] : i === 1 || i === 15 ? [x, y + 6] : [x, y]),
|
|
150
150
|
}),
|
|
151
151
|
},
|
|
152
|
-
{ id: 'potato', label: 'Patata', en: 'Potato', pt: 'Batata', points: superShape({ rxT: 62, rxB: 66, ryT: 62, ryB: 58, nT: 2.3, nB: 2.5, tweak: (i, x, y) => [x + Math.sin(i * 2.9 + 1) * 6, y + Math.cos(i * 1.3 + 2) * 6] }) },
|
|
153
|
-
{ id: 'gem', label: 'Gema', en: 'Gem', pt: 'Gema', points: superShape({ rxT: 66, rxB: 66, ryT: 66, ryB: 70, nT: 1.35, nB: 1.35 }) },
|
|
154
|
-
{ id: 'chubby', label: 'Rechoncho', en: 'Chubby', pt: 'Fofinho', points: superShape({ rxT: 58, rxB: 82, ryT: 60, ryB: 46, nT: 2.2, nB: 3.2 }) },
|
|
155
|
-
{ id: 'capsule', label: 'Cápsula', en: 'Capsule', pt: 'Cápsula', points: superShape({ rxT: 48, rxB: 48, ryT: 78, ryB: 72, nT: 2.6, nB: 2.6 }) },
|
|
156
|
-
{ id: 'barrel', label: 'Tonel', en: 'Barrel', pt: 'Barril', points: superShape({ rxT: 64, rxB: 64, ryT: 64, ryB: 62, nT: 3, nB: 3, tweak: (i, x, y) => (i === 4 || i === 12 ? [100 + (x - 100) * 1.06, y] : [x, y]) }) },
|
|
157
|
-
{ id: 'flame', label: 'Llama', en: 'Flame', pt: 'Chama', points: superShape({ rxT: 40, rxB: 64, ryT: 80, ryB: 54, nT: 1.6, nB: 2.4, tweak: (i, x, y) => (i === 0 ? [x + 16, y + 4] : i === 1 ? [x + 6, y] : i === 15 ? [x + 8, y] : [x, y]) }) },
|
|
152
|
+
{ id: 'potato', label: 'Patata', en: 'Potato', pt: 'Batata', zh: '土豆', hi: 'आलू', points: superShape({ rxT: 62, rxB: 66, ryT: 62, ryB: 58, nT: 2.3, nB: 2.5, tweak: (i, x, y) => [x + Math.sin(i * 2.9 + 1) * 6, y + Math.cos(i * 1.3 + 2) * 6] }) },
|
|
153
|
+
{ id: 'gem', label: 'Gema', en: 'Gem', pt: 'Gema', zh: '宝石', hi: 'रत्न', points: superShape({ rxT: 66, rxB: 66, ryT: 66, ryB: 70, nT: 1.35, nB: 1.35 }) },
|
|
154
|
+
{ id: 'chubby', label: 'Rechoncho', en: 'Chubby', pt: 'Fofinho', zh: '胖嘟嘟', hi: 'गोल-मटोल', points: superShape({ rxT: 58, rxB: 82, ryT: 60, ryB: 46, nT: 2.2, nB: 3.2 }) },
|
|
155
|
+
{ id: 'capsule', label: 'Cápsula', en: 'Capsule', pt: 'Cápsula', zh: '胶囊', hi: 'कैप्सूल', points: superShape({ rxT: 48, rxB: 48, ryT: 78, ryB: 72, nT: 2.6, nB: 2.6 }) },
|
|
156
|
+
{ id: 'barrel', label: 'Tonel', en: 'Barrel', pt: 'Barril', zh: '木桶', hi: 'पीपा', points: superShape({ rxT: 64, rxB: 64, ryT: 64, ryB: 62, nT: 3, nB: 3, tweak: (i, x, y) => (i === 4 || i === 12 ? [100 + (x - 100) * 1.06, y] : [x, y]) }) },
|
|
157
|
+
{ id: 'flame', label: 'Llama', en: 'Flame', pt: 'Chama', zh: '火焰', hi: 'लौ', points: superShape({ rxT: 40, rxB: 64, ryT: 80, ryB: 54, nT: 1.6, nB: 2.4, tweak: (i, x, y) => (i === 0 ? [x + 16, y + 4] : i === 1 ? [x + 6, y] : i === 15 ? [x + 8, y] : [x, y]) }) },
|
|
158
158
|
{
|
|
159
159
|
id: 'owl',
|
|
160
|
-
label: 'Búho', en: 'Owl', pt: 'Coruja',
|
|
160
|
+
label: 'Búho', en: 'Owl', pt: 'Coruja', zh: '猫头鹰', hi: 'उल्लू',
|
|
161
161
|
points: superShape({
|
|
162
162
|
rxT: 60, rxB: 64, ryT: 62, ryB: 60, nT: 3, nB: 2.4,
|
|
163
163
|
tweak: (i, x, y) => (i === 2 || i === 14 ? [x + (i === 2 ? 4 : -4), y - 20] : i === 1 || i === 15 ? [x, y + 10] : i === 0 ? [x, y + 10] : [x, y]),
|
|
164
164
|
}),
|
|
165
165
|
},
|
|
166
|
-
{ id: 'slime', label: 'Slime', en: 'Slime', pt: 'Slime', points: superShape({ rxT: 56, rxB: 80, ryT: 78, ryB: 30, nT: 2, nB: 6, tweak: (i, x, y) => (i >= 6 && i <= 10 ? [x, y + (i % 2 ? 4 : -1)] : [x, y]) }) },
|
|
167
|
-
{ id: 'apple', label: 'Manzana', en: 'Apple', pt: 'Maçã', points: superShape({ rxT: 64, rxB: 60, ryT: 62, ryB: 62, nT: 2.4, nB: 2.2, tweak: (i, x, y) => (i === 0 ? [x, y + 12] : i === 1 || i === 15 ? [x, y + 2] : [x, y]) }) },
|
|
168
|
-
{ id: 'lemon', label: 'Limón', en: 'Lemon', pt: 'Limão', points: superShape({ rxT: 70, rxB: 70, ryT: 56, ryB: 56, nT: 2, nB: 2, tweak: (i, x, y) => (i === 4 || i === 12 ? [x + (i === 4 ? 12 : -12), y] : [x, y]) }) },
|
|
169
|
-
{ id: 'alien', label: 'Alien', en: 'Alien', pt: 'Alienígena', points: superShape({ rxT: 72, rxB: 44, ryT: 64, ryB: 66, nT: 2.3, nB: 1.7 }) },
|
|
166
|
+
{ id: 'slime', label: 'Slime', en: 'Slime', pt: 'Slime', zh: '史莱姆', hi: 'स्लाइम', points: superShape({ rxT: 56, rxB: 80, ryT: 78, ryB: 30, nT: 2, nB: 6, tweak: (i, x, y) => (i >= 6 && i <= 10 ? [x, y + (i % 2 ? 4 : -1)] : [x, y]) }) },
|
|
167
|
+
{ id: 'apple', label: 'Manzana', en: 'Apple', pt: 'Maçã', zh: '苹果', hi: 'सेब', points: superShape({ rxT: 64, rxB: 60, ryT: 62, ryB: 62, nT: 2.4, nB: 2.2, tweak: (i, x, y) => (i === 0 ? [x, y + 12] : i === 1 || i === 15 ? [x, y + 2] : [x, y]) }) },
|
|
168
|
+
{ id: 'lemon', label: 'Limón', en: 'Lemon', pt: 'Limão', zh: '柠檬', hi: 'नींबू', points: superShape({ rxT: 70, rxB: 70, ryT: 56, ryB: 56, nT: 2, nB: 2, tweak: (i, x, y) => (i === 4 || i === 12 ? [x + (i === 4 ? 12 : -12), y] : [x, y]) }) },
|
|
169
|
+
{ id: 'alien', label: 'Alien', en: 'Alien', pt: 'Alienígena', zh: '外星人', hi: 'एलियन', points: superShape({ rxT: 72, rxB: 44, ryT: 64, ryB: 66, nT: 2.3, nB: 1.7 }) },
|
|
170
170
|
];
|
|
171
171
|
|
|
172
172
|
// ───────────────────────────── ojos ─────────────────────────────
|
|
@@ -424,13 +424,13 @@ export const FINISHES = [
|
|
|
424
424
|
{ id: 'neon', label: 'Neón' },
|
|
425
425
|
{ id: 'sketch', label: 'Boceto' },
|
|
426
426
|
// catálogo 2 (2026-10): se dibujan en Character.js (FINISH2)
|
|
427
|
-
{ id: 'pastel', label: 'Pastel', en: 'Pastel', pt: 'Pastel',
|
|
428
|
-
{ id: 'metal', label: 'Metálico', en: 'Metallic', pt: 'Metálico',
|
|
429
|
-
{ id: 'pearl', label: 'Nácar', en: 'Pearl', pt: 'Madrepérola',
|
|
430
|
-
{ id: 'glass', label: 'Cristal', en: 'Glass', pt: 'Vidro',
|
|
431
|
-
{ id: 'velvet', label: 'Terciopelo', en: 'Velvet', pt: 'Veludo',
|
|
432
|
-
{ id: 'holo', label: 'Holográfico', en: 'Holographic', pt: 'Holográfico',
|
|
433
|
-
{ id: 'vinyl', label: 'Vinilo', en: 'Vinyl toy', pt: 'Vinil', as3d: 'toon' },
|
|
427
|
+
{ id: 'pastel', label: 'Pastel', en: 'Pastel', pt: 'Pastel', zh: '粉彩', hi: 'पेस्टल' },
|
|
428
|
+
{ id: 'metal', label: 'Metálico', en: 'Metallic', pt: 'Metálico', zh: '金属', hi: 'धात्विक' },
|
|
429
|
+
{ id: 'pearl', label: 'Nácar', en: 'Pearl', pt: 'Madrepérola', zh: '珍珠', hi: 'मोती' },
|
|
430
|
+
{ id: 'glass', label: 'Cristal', en: 'Glass', pt: 'Vidro', zh: '玻璃', hi: 'काँच' },
|
|
431
|
+
{ id: 'velvet', label: 'Terciopelo', en: 'Velvet', pt: 'Veludo', zh: '天鹅绒', hi: 'मखमल' },
|
|
432
|
+
{ id: 'holo', label: 'Holográfico', en: 'Holographic', pt: 'Holográfico', zh: '镭射', hi: 'होलोग्राफ़िक' },
|
|
433
|
+
{ id: 'vinyl', label: 'Vinilo', en: 'Vinyl toy', pt: 'Vinil', zh: '搪胶玩具', hi: 'विनाइल खिलौना', as3d: 'toon' },
|
|
434
434
|
];
|
|
435
435
|
|
|
436
436
|
// ───────────────────────────── texturas ─────────────────────────────
|
|
@@ -447,16 +447,16 @@ export const TEXTURES = [
|
|
|
447
447
|
{ id: 'ridges', label: 'Anillos' },
|
|
448
448
|
{ id: 'gloss', label: 'Gelatina' },
|
|
449
449
|
{ id: 'panels', label: 'Paneles' },
|
|
450
|
-
// catálogo 2 (2026-10): solo se eligen a mano ('auto' nunca las saca)
|
|
451
|
-
{ id: 'knit', label: 'Punto', en: 'Knit', pt: 'Tricô',
|
|
452
|
-
{ id: 'polka', label: 'Lunares', en: 'Polka dots', pt: 'Bolinhas',
|
|
453
|
-
{ id: 'glitter', label: 'Purpurina', en: 'Glitter', pt: 'Purpurina',
|
|
454
|
-
{ id: 'stone', label: 'Piedra', en: 'Stone', pt: 'Pedra',
|
|
455
|
-
{ id: 'wood', label: 'Madera', en: 'Wood', pt: 'Madeira',
|
|
456
|
-
{ id: 'bubbles', label: 'Burbujas', en: 'Bubbles', pt: 'Bolhas',
|
|
457
|
-
{ id: 'stitches', label: 'Costuras', en: 'Stitches', pt: 'Costuras',
|
|
458
|
-
{ id: 'honeycomb', label: 'Panal', en: 'Honeycomb', pt: 'Favo de mel',
|
|
459
|
-
{ id: 'quilt', label: 'Acolchado', en: 'Quilted', pt: 'Acolchoado',
|
|
450
|
+
// catálogo 2 (2026-10): solo se eligen a mano ('auto' nunca las saca); en 3D, skinTex2 de character3d/materials.js
|
|
451
|
+
{ id: 'knit', label: 'Punto', en: 'Knit', pt: 'Tricô', zh: '针织', hi: 'बुनाई' },
|
|
452
|
+
{ id: 'polka', label: 'Lunares', en: 'Polka dots', pt: 'Bolinhas', zh: '波点', hi: 'पोल्का डॉट्स' },
|
|
453
|
+
{ id: 'glitter', label: 'Purpurina', en: 'Glitter', pt: 'Purpurina', zh: '亮片', hi: 'ग्लिटर' },
|
|
454
|
+
{ id: 'stone', label: 'Piedra', en: 'Stone', pt: 'Pedra', zh: '石头', hi: 'पत्थर' },
|
|
455
|
+
{ id: 'wood', label: 'Madera', en: 'Wood', pt: 'Madeira', zh: '木头', hi: 'लकड़ी' },
|
|
456
|
+
{ id: 'bubbles', label: 'Burbujas', en: 'Bubbles', pt: 'Bolhas', zh: '泡泡', hi: 'बुलबुले' },
|
|
457
|
+
{ id: 'stitches', label: 'Costuras', en: 'Stitches', pt: 'Costuras', zh: '缝线', hi: 'सिलाई' },
|
|
458
|
+
{ id: 'honeycomb', label: 'Panal', en: 'Honeycomb', pt: 'Favo de mel', zh: '蜂巢', hi: 'मधुकोश' },
|
|
459
|
+
{ id: 'quilt', label: 'Acolchado', en: 'Quilted', pt: 'Acolchoado', zh: '绗缝', hi: 'रज़ाई जैसा' },
|
|
460
460
|
];
|
|
461
461
|
|
|
462
462
|
addCatalog({
|
|
@@ -673,16 +673,18 @@ export const CATALOG_V1 = { shapes: 16, eyes: 33, brows: 9, mouths: 28, cheeks:
|
|
|
673
673
|
/** Listas por tipo (para partLabel). Moods y gestos viven en Character.js y solo tienen catálogo. */
|
|
674
674
|
const CATALOG = { shapes: SHAPES, eyes: EYES, brows: BROWS, mouths: MOUTHS, cheeks: CHEEKS, patterns: PATTERNS, finishes: FINISHES, textures: TEXTURES, accessories: ACCESSORIES, groups: ACCESSORY_GROUPS, presets: PRESETS };
|
|
675
675
|
|
|
676
|
-
// Textos en/pt de las piezas del catálogo 2 (llevan `en` y `
|
|
676
|
+
// Textos en/pt/zh/hi de las piezas del catálogo 2 (llevan `en`, `pt`, `zh` y `hi` junto al `label` en español).
|
|
677
|
+
// Si a una pieza le falta zh/hi, ese idioma cae al inglés.
|
|
677
678
|
{
|
|
678
|
-
const
|
|
679
|
+
const LANGS = ['es', 'en', 'pt', 'zh', 'hi'];
|
|
680
|
+
const by = Object.fromEntries(LANGS.map((l) => [l, {}]));
|
|
679
681
|
for (const [kind, list] of Object.entries(CATALOG)) {
|
|
680
682
|
for (const x of list) {
|
|
681
683
|
if (Array.isArray(x) || !x.en) continue;
|
|
682
|
-
for (const l of
|
|
684
|
+
for (const l of LANGS) (by[l][kind] ||= {})[x.id] = l === 'es' ? x.label : x[l] || x.en;
|
|
683
685
|
}
|
|
684
686
|
}
|
|
685
|
-
addCatalog(
|
|
687
|
+
addCatalog(Object.fromEntries(LANGS.map((l) => [l, { character: by[l] }])));
|
|
686
688
|
}
|
|
687
689
|
|
|
688
690
|
const ALIAS3D = Object.fromEntries(['eyes', 'brows', 'mouths', 'cheeks', 'patterns', 'accessories', 'finishes', 'textures'].map((k) => [k, Object.fromEntries(CATALOG[k].filter((x) => x.as3d).map((x) => [x.id, x.as3d]))]));
|