@agy-daddy/plugin-pet 0.0.0-stage → 1.1.1
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/LICENSE +21 -0
- package/README.md +10 -2
- package/agy-plugin.json +57 -0
- package/locales/en.json +10 -0
- package/locales/zh-CN.json +10 -0
- package/package.json +28 -4
- package/settings.schema.json +136 -0
- package/src/node.js +620 -0
- package/src/renderer.js +231 -0
- package/src/session-watch-aggregator.js +271 -0
- package/src/shared/pet-canvas-stage.d.ts +36 -0
- package/src/shared/pet-canvas-stage.js +218 -0
- package/src/shared/pet-rig-evaluator.js +172 -0
- package/src/shared/themes.d.ts +20 -0
- package/src/shared/themes.js +456 -0
- package/src/theme-pack-sandbox.js +501 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 12 Clean-Room MIT Original Tribute Themes (Pure declarative OverlaySceneSpec)
|
|
5
|
+
* Strictly free of forbidden gate colors and external assets.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
function makeEyeLayers(lx, rx, y, color = '#0f172a', r = 4.2, highlight = '#ffffff') {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
id: 'eye-l',
|
|
12
|
+
kind: 'circle',
|
|
13
|
+
cx: lx,
|
|
14
|
+
cy: y,
|
|
15
|
+
r,
|
|
16
|
+
fill: color,
|
|
17
|
+
pivotX: lx,
|
|
18
|
+
pivotY: y,
|
|
19
|
+
motion: { blinkIntervalMs: 3200, states: ['idle', 'thinking', 'walking', 'trotting', 'sprinting', 'approval'] }
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'eye-r',
|
|
23
|
+
kind: 'circle',
|
|
24
|
+
cx: rx,
|
|
25
|
+
cy: y,
|
|
26
|
+
r,
|
|
27
|
+
fill: color,
|
|
28
|
+
pivotX: rx,
|
|
29
|
+
pivotY: y,
|
|
30
|
+
motion: { blinkIntervalMs: 3200, states: ['idle', 'thinking', 'walking', 'trotting', 'sprinting', 'approval'] }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'eye-hl-l',
|
|
34
|
+
kind: 'circle',
|
|
35
|
+
cx: lx - 1.2,
|
|
36
|
+
cy: y - 1.3,
|
|
37
|
+
r: Math.max(1.2, r * 0.35),
|
|
38
|
+
fill: highlight,
|
|
39
|
+
motion: { states: ['idle', 'thinking', 'walking', 'trotting', 'sprinting', 'approval'] }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'eye-hl-r',
|
|
43
|
+
kind: 'circle',
|
|
44
|
+
cx: rx - 1.2,
|
|
45
|
+
cy: y - 1.3,
|
|
46
|
+
r: Math.max(1.2, r * 0.35),
|
|
47
|
+
fill: highlight,
|
|
48
|
+
motion: { states: ['idle', 'thinking', 'walking', 'trotting', 'sprinting', 'approval'] }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'eye-sleep-l',
|
|
52
|
+
kind: 'path',
|
|
53
|
+
d: `M${lx - r} ${y} Q${lx} ${y + 3} ${lx + r} ${y}`,
|
|
54
|
+
fill: 'none',
|
|
55
|
+
stroke: color,
|
|
56
|
+
strokeWidth: 2.2,
|
|
57
|
+
motion: { states: ['sleeping'] }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'eye-sleep-r',
|
|
61
|
+
kind: 'path',
|
|
62
|
+
d: `M${rx - r} ${y} Q${rx} ${y + 3} ${rx + r} ${y}`,
|
|
63
|
+
fill: 'none',
|
|
64
|
+
stroke: color,
|
|
65
|
+
strokeWidth: 2.2,
|
|
66
|
+
motion: { states: ['sleeping'] }
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const BUILTIN_THEMES = [
|
|
72
|
+
{
|
|
73
|
+
id: 'daddy-orb',
|
|
74
|
+
name: { 'zh-CN': '紫晶脉冲灵', en: 'Agy Pulse Sprite' },
|
|
75
|
+
description: { 'zh-CN': '跟随宿主主题强调色的双环悬浮几何小精灵', en: 'Floating dual-ring geometric sprite synced to host accent' },
|
|
76
|
+
accentHex: '#a78bfa',
|
|
77
|
+
usesHostAccent: true,
|
|
78
|
+
scene: {
|
|
79
|
+
sceneId: 'daddy-orb',
|
|
80
|
+
viewBox: { width: 160, height: 160 },
|
|
81
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
82
|
+
hitBox: { x: 28, y: 24, width: 104, height: 112 },
|
|
83
|
+
particles: { preset: 'sparks', color: '#c4b5fd' },
|
|
84
|
+
layers: [
|
|
85
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 138, rx: 32, ry: 8, fill: '#0f172a', opacity: 0.25 },
|
|
86
|
+
{
|
|
87
|
+
id: 'outer-ring', kind: 'circle', cx: 80, cy: 82, r: 46,
|
|
88
|
+
fill: 'none', stroke: '#a78bfa', strokeWidth: 3.5, opacity: 0.55,
|
|
89
|
+
pivotX: 80, pivotY: 82, motion: { rotAmpDeg: 18, rotFreqHz: 0.8, bobAmpY: 4, bobFreqHz: 1.2 }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'core', kind: 'circle', cx: 80, cy: 82, r: 34,
|
|
93
|
+
fill: '#7c3aed', stroke: '#ddd6fe', strokeWidth: 2.5,
|
|
94
|
+
pivotX: 80, pivotY: 82, motion: { bobAmpY: 5, bobFreqHz: 1.4 }
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'ear-l', kind: 'path', d: 'M52 56 L42 32 L66 48 Z',
|
|
98
|
+
fill: '#a78bfa', stroke: '#ede9fe', strokeWidth: 1.5,
|
|
99
|
+
pivotX: 56, pivotY: 50, motion: { rotAmpDeg: 8, rotFreqHz: 1.8, bobAmpY: 5, bobFreqHz: 1.4 }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'ear-r', kind: 'path', d: 'M108 56 L118 32 L94 48 Z',
|
|
103
|
+
fill: '#a78bfa', stroke: '#ede9fe', strokeWidth: 1.5,
|
|
104
|
+
pivotX: 104, pivotY: 50, motion: { rotAmpDeg: -8, rotFreqHz: 1.8, bobAmpY: 5, bobFreqHz: 1.4 }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'visor', kind: 'rect', x: 54, y: 68, width: 52, height: 26, cornerRadius: 13,
|
|
108
|
+
fill: '#1e1b4b', stroke: '#c4b5fd', strokeWidth: 1.5,
|
|
109
|
+
motion: { bobAmpY: 5, bobFreqHz: 1.4 }
|
|
110
|
+
},
|
|
111
|
+
...makeEyeLayers(68, 92, 81, '#ede9fe', 4.5, '#a78bfa')
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 'abyssal-whale',
|
|
117
|
+
name: { 'zh-CN': '深海算力鲸', en: 'Abyssal Whale' },
|
|
118
|
+
description: { 'zh-CN': '深海钴蓝渐变流线小鲸鱼,流式吐字头顶喷水花', en: 'Cobalt stream-lined whale with data spout bubbles' },
|
|
119
|
+
accentHex: '#60a5fa',
|
|
120
|
+
scene: {
|
|
121
|
+
sceneId: 'abyssal-whale',
|
|
122
|
+
viewBox: { width: 160, height: 160 },
|
|
123
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
124
|
+
hitBox: { x: 20, y: 34, width: 120, height: 96 },
|
|
125
|
+
particles: { preset: 'bubbles', color: '#93c5fd' },
|
|
126
|
+
layers: [
|
|
127
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 136, rx: 38, ry: 8, fill: '#0f172a', opacity: 0.24 },
|
|
128
|
+
{
|
|
129
|
+
id: 'tail', kind: 'path', d: 'M116 86 Q138 72 144 58 Q134 78 144 96 Q130 94 116 90 Z',
|
|
130
|
+
fill: '#1d4ed8', stroke: '#93c5fd', strokeWidth: 1.5,
|
|
131
|
+
pivotX: 118, pivotY: 88, motion: { rotAmpDeg: 14, rotFreqHz: 2.2, bobAmpY: 4, bobFreqHz: 1.3 }
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: 'body', kind: 'path', d: 'M30 88 C30 56 58 46 84 48 C110 50 124 68 122 92 C120 112 96 118 72 118 C46 118 30 108 30 88 Z',
|
|
135
|
+
fill: '#2563eb', stroke: '#93c5fd', strokeWidth: 2,
|
|
136
|
+
motion: { bobAmpY: 4.5, bobFreqHz: 1.3 }
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'belly', kind: 'path', d: 'M36 94 C44 108 66 114 90 110 C104 108 114 100 116 94 C98 100 62 100 36 94 Z',
|
|
140
|
+
fill: '#dbeafe', motion: { bobAmpY: 4.5, bobFreqHz: 1.3 }
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 'spout', kind: 'path', d: 'M72 48 Q66 30 56 26 M74 48 Q82 28 92 26',
|
|
144
|
+
fill: 'none', stroke: '#60a5fa', strokeWidth: 3,
|
|
145
|
+
motion: { bobAmpY: 7, bobFreqHz: 2.6, states: ['walking', 'trotting', 'sprinting', 'approval'] }
|
|
146
|
+
},
|
|
147
|
+
...makeEyeLayers(54, 76, 82, '#0f172a', 3.8, '#ffffff')
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: 'sunny-sponge',
|
|
153
|
+
name: { 'zh-CN': '阳光海绵块', en: 'Sunny Sponge' },
|
|
154
|
+
description: { 'zh-CN': '波浪边明黄多孔方块精灵,带快乐表情与泡泡', en: 'Sunny wavy yellow block sprite with bouncy bubbles' },
|
|
155
|
+
accentHex: '#facc15',
|
|
156
|
+
scene: {
|
|
157
|
+
sceneId: 'sunny-sponge',
|
|
158
|
+
viewBox: { width: 160, height: 160 },
|
|
159
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
160
|
+
hitBox: { x: 34, y: 26, width: 92, height: 112 },
|
|
161
|
+
particles: { preset: 'bubbles', color: '#fef08a' },
|
|
162
|
+
layers: [
|
|
163
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 140, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.24 },
|
|
164
|
+
{
|
|
165
|
+
id: 'body', kind: 'rect', x: 44, y: 36, width: 72, height: 78, cornerRadius: 12,
|
|
166
|
+
fill: '#facc15', stroke: '#ca8a04', strokeWidth: 2.2,
|
|
167
|
+
pivotX: 80, pivotY: 75, motion: { bobAmpY: 5, bobFreqHz: 1.7, rotAmpDeg: 4, rotFreqHz: 1.7 }
|
|
168
|
+
},
|
|
169
|
+
{ id: 'pore-1', kind: 'circle', cx: 55, cy: 48, r: 4, fill: '#eab308', motion: { bobAmpY: 5, bobFreqHz: 1.7 } },
|
|
170
|
+
{ id: 'pore-2', kind: 'circle', cx: 105, cy: 52, r: 3.5, fill: '#eab308', motion: { bobAmpY: 5, bobFreqHz: 1.7 } },
|
|
171
|
+
{
|
|
172
|
+
id: 'trousers', kind: 'rect', x: 44, y: 94, width: 72, height: 20, cornerRadius: 4,
|
|
173
|
+
fill: '#78350f', stroke: '#451a03', strokeWidth: 1.5, motion: { bobAmpY: 5, bobFreqHz: 1.7 }
|
|
174
|
+
},
|
|
175
|
+
{ id: 'tie', kind: 'path', d: 'M80 96 L75 108 L80 114 L85 108 Z', fill: '#dc2626', motion: { bobAmpY: 5, bobFreqHz: 1.7 } },
|
|
176
|
+
{ id: 'eye-bg-l', kind: 'circle', cx: 67, cy: 66, r: 9, fill: '#ffffff', stroke: '#0f172a', strokeWidth: 1.4, motion: { bobAmpY: 5, bobFreqHz: 1.7 } },
|
|
177
|
+
{ id: 'eye-bg-r', kind: 'circle', cx: 93, cy: 66, r: 9, fill: '#ffffff', stroke: '#0f172a', strokeWidth: 1.4, motion: { bobAmpY: 5, bobFreqHz: 1.7 } },
|
|
178
|
+
...makeEyeLayers(67, 93, 66, '#0284c7', 4.2, '#ffffff'),
|
|
179
|
+
{ id: 'smile', kind: 'path', d: 'M64 81 Q80 92 96 81', fill: 'none', stroke: '#78350f', strokeWidth: 2.2, motion: { bobAmpY: 5, bobFreqHz: 1.7 } }
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: 'nimble-mouse',
|
|
185
|
+
name: { 'zh-CN': '机灵芝士鼠', en: 'Nimble Mouse' },
|
|
186
|
+
description: { 'zh-CN': '暖褐圆耳小仓鼠,抱奶酪欢快奔跑', en: 'Warm brown round-eared mouse clutching golden cheese' },
|
|
187
|
+
accentHex: '#f59e0b',
|
|
188
|
+
scene: {
|
|
189
|
+
sceneId: 'nimble-mouse',
|
|
190
|
+
viewBox: { width: 160, height: 160 },
|
|
191
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
192
|
+
hitBox: { x: 30, y: 32, width: 100, height: 106 },
|
|
193
|
+
particles: { preset: 'sparks', color: '#fde68a' },
|
|
194
|
+
layers: [
|
|
195
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 138, rx: 34, ry: 7, fill: '#0f172a', opacity: 0.25 },
|
|
196
|
+
{
|
|
197
|
+
id: 'tail', kind: 'path', d: 'M110 112 Q136 106 138 82 Q139 70 128 66',
|
|
198
|
+
fill: 'none', stroke: '#f472b6', strokeWidth: 4,
|
|
199
|
+
pivotX: 110, pivotY: 112, motion: { rotAmpDeg: 14, rotFreqHz: 2.5 }
|
|
200
|
+
},
|
|
201
|
+
{ id: 'ear-l', kind: 'circle', cx: 52, cy: 52, r: 16, fill: '#b45309', stroke: '#78350f', strokeWidth: 2, motion: { bobAmpY: 4, bobFreqHz: 2.0 } },
|
|
202
|
+
{ id: 'ear-l-in', kind: 'circle', cx: 52, cy: 52, r: 9, fill: '#fbcfe8', motion: { bobAmpY: 4, bobFreqHz: 2.0 } },
|
|
203
|
+
{ id: 'ear-r', kind: 'circle', cx: 104, cy: 52, r: 16, fill: '#b45309', stroke: '#78350f', strokeWidth: 2, motion: { bobAmpY: 4, bobFreqHz: 2.0 } },
|
|
204
|
+
{ id: 'ear-r-in', kind: 'circle', cx: 104, cy: 52, r: 9, fill: '#fbcfe8', motion: { bobAmpY: 4, bobFreqHz: 2.0 } },
|
|
205
|
+
{
|
|
206
|
+
id: 'body', kind: 'ellipse', cx: 78, cy: 92, rx: 36, ry: 34,
|
|
207
|
+
fill: '#b45309', stroke: '#78350f', strokeWidth: 2,
|
|
208
|
+
motion: { bobAmpY: 4.5, bobFreqHz: 2.0 }
|
|
209
|
+
},
|
|
210
|
+
{ id: 'belly', kind: 'ellipse', cx: 78, cy: 104, rx: 22, ry: 18, fill: '#fde68a', motion: { bobAmpY: 4.5, bobFreqHz: 2.0 } },
|
|
211
|
+
...makeEyeLayers(65, 91, 82, '#0f172a', 4, '#ffffff'),
|
|
212
|
+
{ id: 'nose', kind: 'circle', cx: 78, cy: 90, r: 3.2, fill: '#f43f5e', motion: { bobAmpY: 4.5, bobFreqHz: 2.0 } },
|
|
213
|
+
{ id: 'cheese', kind: 'path', d: 'M90 106 L112 98 L110 118 Z', fill: '#facc15', stroke: '#ca8a04', strokeWidth: 1.5, motion: { bobAmpY: 5, bobFreqHz: 2.0 } }
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
id: 'aegis-visor',
|
|
219
|
+
name: { 'zh-CN': '赤金机甲盔', en: 'Aegis Visor' },
|
|
220
|
+
description: { 'zh-CN': '钛红赤金科幻面甲,眼缝带冰蓝 HUD 扫描光', en: 'Crimson-gold mecha helmet with ice-cyan HUD visor' },
|
|
221
|
+
accentHex: '#eab308',
|
|
222
|
+
scene: {
|
|
223
|
+
sceneId: 'aegis-visor',
|
|
224
|
+
viewBox: { width: 160, height: 160 },
|
|
225
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
226
|
+
hitBox: { x: 34, y: 24, width: 92, height: 112 },
|
|
227
|
+
particles: { preset: 'sparks', color: '#67e8f9' },
|
|
228
|
+
layers: [
|
|
229
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 138, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.25 },
|
|
230
|
+
{
|
|
231
|
+
id: 'helmet', kind: 'path', d: 'M44 60 L54 30 L106 30 L116 60 L112 108 L92 126 L68 126 L48 108 Z',
|
|
232
|
+
fill: '#dc2626', stroke: '#7f1d1d', strokeWidth: 2.2,
|
|
233
|
+
motion: { bobAmpY: 4, bobFreqHz: 1.2 }
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: 'faceplate', kind: 'path', d: 'M56 54 L104 54 L100 102 L88 118 L72 118 L60 102 Z',
|
|
237
|
+
fill: '#eab308', stroke: '#854d0e', strokeWidth: 1.8,
|
|
238
|
+
motion: { bobAmpY: 4, bobFreqHz: 1.2 }
|
|
239
|
+
},
|
|
240
|
+
{ id: 'brow', kind: 'path', d: 'M56 66 L74 72 L86 72 L104 66', fill: 'none', stroke: '#7f1d1d', strokeWidth: 3, motion: { bobAmpY: 4, bobFreqHz: 1.2 } },
|
|
241
|
+
{
|
|
242
|
+
id: 'hud-l', kind: 'rect', x: 59, y: 74, width: 16, height: 6, cornerRadius: 2,
|
|
243
|
+
fill: '#67e8f9', stroke: '#ecfeff', strokeWidth: 1,
|
|
244
|
+
motion: { bobAmpY: 4, bobFreqHz: 1.2, blinkIntervalMs: 4200 }
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'hud-r', kind: 'rect', x: 85, y: 74, width: 16, height: 6, cornerRadius: 2,
|
|
248
|
+
fill: '#67e8f9', stroke: '#ecfeff', strokeWidth: 1,
|
|
249
|
+
motion: { bobAmpY: 4, bobFreqHz: 1.2, blinkIntervalMs: 4200 }
|
|
250
|
+
},
|
|
251
|
+
{ id: 'reactor', kind: 'circle', cx: 80, cy: 106, r: 5, fill: '#67e8f9', stroke: '#0891b2', strokeWidth: 1.5, motion: { bobAmpY: 4, bobFreqHz: 1.2 } }
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'cyber-neko',
|
|
257
|
+
name: { 'zh-CN': '霓虹义体猫', en: 'Cyber Neko' },
|
|
258
|
+
description: { 'zh-CN': '曜石黑紫机械耳小猫,单侧全息瞄准镜与光纤尾', en: 'Obsidian cyber-cat with holographic monocle and fiber tail' },
|
|
259
|
+
accentHex: '#c084fc',
|
|
260
|
+
scene: {
|
|
261
|
+
sceneId: 'cyber-neko',
|
|
262
|
+
viewBox: { width: 160, height: 160 },
|
|
263
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
264
|
+
hitBox: { x: 32, y: 28, width: 96, height: 110 },
|
|
265
|
+
particles: { preset: 'matrix', color: '#2dd4bf' },
|
|
266
|
+
layers: [
|
|
267
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 138, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.25 },
|
|
268
|
+
{
|
|
269
|
+
id: 'tail', kind: 'path', d: 'M108 114 Q138 104 134 74',
|
|
270
|
+
fill: 'none', stroke: '#2dd4bf', strokeWidth: 4,
|
|
271
|
+
pivotX: 108, pivotY: 114, motion: { rotAmpDeg: 16, rotFreqHz: 2.0 }
|
|
272
|
+
},
|
|
273
|
+
{ id: 'ear-l', kind: 'path', d: 'M48 64 L44 30 L72 52 Z', fill: '#1e1b4b', stroke: '#c084fc', strokeWidth: 2, motion: { bobAmpY: 4, bobFreqHz: 1.5 } },
|
|
274
|
+
{ id: 'ear-r', kind: 'path', d: 'M112 64 L116 30 L88 52 Z', fill: '#1e1b4b', stroke: '#c084fc', strokeWidth: 2, motion: { bobAmpY: 4, bobFreqHz: 1.5 } },
|
|
275
|
+
{ id: 'body', kind: 'ellipse', cx: 80, cy: 90, rx: 36, ry: 34, fill: '#1e1b4b', stroke: '#c084fc', strokeWidth: 2.2, motion: { bobAmpY: 4, bobFreqHz: 1.5 } },
|
|
276
|
+
{ id: 'monocle', kind: 'rect', x: 84, y: 74, width: 18, height: 12, cornerRadius: 4, fill: '#14b8a6', opacity: 0.75, stroke: '#5eead4', strokeWidth: 1.5, motion: { bobAmpY: 4, bobFreqHz: 1.5 } },
|
|
277
|
+
...makeEyeLayers(66, 93, 80, '#e9d5ff', 4, '#2dd4bf')
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: 'arcade-chomp',
|
|
283
|
+
name: { 'zh-CN': '街机像素豆', en: 'Arcade Chomp' },
|
|
284
|
+
description: { 'zh-CN': '8-bit 经典像素圆豆与伴飞像素小灵', en: '8-bit retro chomper with pixel companion dot' },
|
|
285
|
+
accentHex: '#facc15',
|
|
286
|
+
scene: {
|
|
287
|
+
sceneId: 'arcade-chomp',
|
|
288
|
+
viewBox: { width: 160, height: 160 },
|
|
289
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
290
|
+
hitBox: { x: 26, y: 34, width: 108, height: 98 },
|
|
291
|
+
particles: { preset: 'pixels', color: '#fde047' },
|
|
292
|
+
layers: [
|
|
293
|
+
{ id: 'shadow', kind: 'ellipse', cx: 74, cy: 136, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.25 },
|
|
294
|
+
{
|
|
295
|
+
id: 'chomp-body', kind: 'path', d: 'M74 82 L108 60 A40 40 0 1 0 108 104 Z',
|
|
296
|
+
fill: '#facc15', stroke: '#a16207', strokeWidth: 2.2,
|
|
297
|
+
pivotX: 74, pivotY: 82, motion: { bobAmpY: 4, bobFreqHz: 1.8, rotAmpDeg: 6, rotFreqHz: 3.0 }
|
|
298
|
+
},
|
|
299
|
+
{ id: 'chomp-eye', kind: 'circle', cx: 74, cy: 58, r: 4.5, fill: '#0f172a', motion: { bobAmpY: 4, bobFreqHz: 1.8 } },
|
|
300
|
+
{
|
|
301
|
+
id: 'pellet', kind: 'rect', x: 118, y: 76, width: 10, height: 10, cornerRadius: 2,
|
|
302
|
+
fill: '#f43f5e', stroke: '#fda4af', strokeWidth: 1.5,
|
|
303
|
+
motion: { swayAmpX: 6, swayFreqHz: 2.2, bobAmpY: 3, bobFreqHz: 2.2 }
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: 'astro-shiba',
|
|
310
|
+
name: { 'zh-CN': '星航柴犬', en: 'Astro Shiba' },
|
|
311
|
+
description: { 'zh-CN': '透明宇航头盔与氧气喷射背包小柴犬', en: 'Space-helmet Shiba Inu with dual thruster backpack' },
|
|
312
|
+
accentHex: '#d97706',
|
|
313
|
+
scene: {
|
|
314
|
+
sceneId: 'astro-shiba',
|
|
315
|
+
viewBox: { width: 160, height: 160 },
|
|
316
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
317
|
+
hitBox: { x: 28, y: 24, width: 104, height: 114 },
|
|
318
|
+
particles: { preset: 'exhaust', color: '#a78bfa' },
|
|
319
|
+
layers: [
|
|
320
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 140, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.24 },
|
|
321
|
+
{ id: 'jetpack', kind: 'rect', x: 40, y: 74, width: 18, height: 42, cornerRadius: 6, fill: '#94a3b8', stroke: '#475569', strokeWidth: 1.8, motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
322
|
+
{ id: 'suit', kind: 'rect', x: 52, y: 84, width: 56, height: 42, cornerRadius: 14, fill: '#f8fafc', stroke: '#94a3b8', strokeWidth: 2, motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
323
|
+
{ id: 'ear-l', kind: 'path', d: 'M56 54 L50 32 L70 46 Z', fill: '#d97706', motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
324
|
+
{ id: 'ear-r', kind: 'path', d: 'M104 54 L110 32 L90 46 Z', fill: '#d97706', motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
325
|
+
{ id: 'head', kind: 'circle', cx: 80, cy: 66, r: 26, fill: '#d97706', motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
326
|
+
{ id: 'cheeks', kind: 'ellipse', cx: 80, cy: 76, rx: 20, ry: 12, fill: '#fef3c7', motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
327
|
+
...makeEyeLayers(70, 90, 64, '#0f172a', 3.6, '#ffffff'),
|
|
328
|
+
{ id: 'nose', kind: 'circle', cx: 80, cy: 72, r: 3, fill: '#0f172a', motion: { bobAmpY: 5, bobFreqHz: 1.4 } },
|
|
329
|
+
{ id: 'dome', kind: 'circle', cx: 80, cy: 64, r: 34, fill: '#e0f2fe', opacity: 0.25, stroke: '#bae6fd', strokeWidth: 2.2, motion: { bobAmpY: 5, bobFreqHz: 1.4 } }
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
id: 'vapor-dolphin',
|
|
335
|
+
name: { 'zh-CN': '蒸汽波海豚', en: 'Vapor Dolphin' },
|
|
336
|
+
description: { 'zh-CN': '粉紫镭射渐变海豚与落日透视网格底座', en: 'Synthwave magenta-violet dolphin over retro horizon sun' },
|
|
337
|
+
accentHex: '#ec4899',
|
|
338
|
+
scene: {
|
|
339
|
+
sceneId: 'vapor-dolphin',
|
|
340
|
+
viewBox: { width: 160, height: 160 },
|
|
341
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
342
|
+
hitBox: { x: 26, y: 26, width: 108, height: 110 },
|
|
343
|
+
particles: { preset: 'stars', color: '#f472b6' },
|
|
344
|
+
layers: [
|
|
345
|
+
{ id: 'sun', kind: 'circle', cx: 80, cy: 78, r: 44, fill: '#f43f5e', opacity: 0.35 },
|
|
346
|
+
{ id: 'grid-1', kind: 'path', d: 'M32 114 L128 114 M24 124 L136 124 M40 134 L120 134', fill: 'none', stroke: '#ec4899', strokeWidth: 1.8, opacity: 0.7 },
|
|
347
|
+
{
|
|
348
|
+
id: 'dolphin', kind: 'path', d: 'M34 94 C44 60 82 48 108 66 C118 74 124 88 134 96 C122 98 112 96 106 90 C94 102 68 104 48 96 L34 104 Z',
|
|
349
|
+
fill: '#8b5cf6', stroke: '#f472b6', strokeWidth: 2.2,
|
|
350
|
+
pivotX: 80, pivotY: 84, motion: { bobAmpY: 6, bobFreqHz: 1.5, rotAmpDeg: 7, rotFreqHz: 1.5 }
|
|
351
|
+
},
|
|
352
|
+
{ id: 'fin', kind: 'path', d: 'M72 60 L82 40 L88 58 Z', fill: '#ec4899', motion: { bobAmpY: 6, bobFreqHz: 1.5 } },
|
|
353
|
+
...makeEyeLayers(60, 74, 82, '#fdf4ff', 3.2, '#ec4899')
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: 'cli-phantom',
|
|
359
|
+
name: { 'zh-CN': '终端光标灵', en: 'CLI Phantom' },
|
|
360
|
+
description: { 'zh-CN': '极客暗黑终端窗口幻化小幽灵,带荧光绿光标', en: 'Dark terminal ghost sprite with glowing emerald prompt' },
|
|
361
|
+
accentHex: '#22c55e',
|
|
362
|
+
scene: {
|
|
363
|
+
sceneId: 'cli-phantom',
|
|
364
|
+
viewBox: { width: 160, height: 160 },
|
|
365
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
366
|
+
hitBox: { x: 32, y: 26, width: 96, height: 112 },
|
|
367
|
+
particles: { preset: 'matrix', color: '#4ade80' },
|
|
368
|
+
layers: [
|
|
369
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 138, rx: 30, ry: 7, fill: '#0f172a', opacity: 0.3 },
|
|
370
|
+
{
|
|
371
|
+
id: 'cloak', kind: 'path', d: 'M44 74 C44 42 60 32 80 32 C100 32 116 42 116 74 L116 122 L102 112 L90 124 L80 112 L70 124 L58 112 L44 122 Z',
|
|
372
|
+
fill: '#18181b', stroke: '#22c55e', strokeWidth: 2.2,
|
|
373
|
+
motion: { bobAmpY: 5, bobFreqHz: 1.3 }
|
|
374
|
+
},
|
|
375
|
+
...makeEyeLayers(67, 93, 68, '#22c55e', 4.2, '#bbf7d0'),
|
|
376
|
+
{ id: 'prompt', kind: 'path', d: 'M62 88 L72 94 L62 100', fill: 'none', stroke: '#22c55e', strokeWidth: 2.5, motion: { bobAmpY: 5, bobFreqHz: 1.3 } },
|
|
377
|
+
{ id: 'cursor', kind: 'rect', x: 78, y: 95, width: 14, height: 4, cornerRadius: 1, fill: '#4ade80', motion: { bobAmpY: 5, bobFreqHz: 1.3, blinkIntervalMs: 1100 } }
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
id: 'graffiti-cub',
|
|
383
|
+
name: { 'zh-CN': '街头涂鸦熊', en: 'Graffiti Cub' },
|
|
384
|
+
description: { 'zh-CN': '圆耳潮流积木关节小熊,撞色几何涂鸦徽章', en: 'Art-toy geometric bear with pop-art asymmetrical accents' },
|
|
385
|
+
accentHex: '#f43f5e',
|
|
386
|
+
scene: {
|
|
387
|
+
sceneId: 'graffiti-cub',
|
|
388
|
+
viewBox: { width: 160, height: 160 },
|
|
389
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
390
|
+
hitBox: { x: 32, y: 22, width: 96, height: 118 },
|
|
391
|
+
particles: { preset: 'pixels', color: '#f43f5e' },
|
|
392
|
+
layers: [
|
|
393
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 140, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.24 },
|
|
394
|
+
{ id: 'ear-l', kind: 'circle', cx: 52, cy: 40, r: 12, fill: '#f43f5e', stroke: '#18181b', strokeWidth: 2, motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } },
|
|
395
|
+
{ id: 'ear-r', kind: 'circle', cx: 108, cy: 40, r: 12, fill: '#8b5cf6', stroke: '#18181b', strokeWidth: 2, motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } },
|
|
396
|
+
{ id: 'torso', kind: 'rect', x: 52, y: 86, width: 56, height: 42, cornerRadius: 10, fill: '#18181b', stroke: '#eab308', strokeWidth: 2, motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } },
|
|
397
|
+
{ id: 'badge', kind: 'path', d: 'M72 98 L88 98 L80 116 Z', fill: '#eab308', motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } },
|
|
398
|
+
{ id: 'head', kind: 'rect', x: 48, y: 40, width: 64, height: 48, cornerRadius: 18, fill: '#f8fafc', stroke: '#18181b', strokeWidth: 2.2, motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } },
|
|
399
|
+
{ id: 'slash', kind: 'path', d: 'M84 42 L108 66 L108 50 L96 42 Z', fill: '#f43f5e', motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } },
|
|
400
|
+
...makeEyeLayers(66, 94, 64, '#18181b', 4, '#ffffff'),
|
|
401
|
+
{ id: 'snout', kind: 'ellipse', cx: 80, cy: 76, rx: 10, ry: 6, fill: '#8b5cf6', motion: { bobAmpY: 3.5, bobFreqHz: 1.5 } }
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: 'arcane-cat',
|
|
407
|
+
name: { 'zh-CN': '奥术黑猫', en: 'Arcane Cat' },
|
|
408
|
+
description: { 'zh-CN': '星月紫巫师帽与发光魔杖的二次元黑猫学徒', en: 'Mystic black cat apprentice with wizard hat and glowing wand' },
|
|
409
|
+
accentHex: '#8b5cf6',
|
|
410
|
+
scene: {
|
|
411
|
+
sceneId: 'arcane-cat',
|
|
412
|
+
viewBox: { width: 160, height: 160 },
|
|
413
|
+
fps: { active: 30, idle: 12, sleep: 4 },
|
|
414
|
+
hitBox: { x: 28, y: 18, width: 104, height: 122 },
|
|
415
|
+
particles: { preset: 'stars', color: '#fde047' },
|
|
416
|
+
layers: [
|
|
417
|
+
{ id: 'shadow', kind: 'ellipse', cx: 80, cy: 140, rx: 32, ry: 7, fill: '#0f172a', opacity: 0.26 },
|
|
418
|
+
{
|
|
419
|
+
id: 'tail', kind: 'path', d: 'M106 116 Q134 106 130 78',
|
|
420
|
+
fill: 'none', stroke: '#1e1b4b', strokeWidth: 5,
|
|
421
|
+
pivotX: 106, pivotY: 116, motion: { rotAmpDeg: 14, rotFreqHz: 1.8 }
|
|
422
|
+
},
|
|
423
|
+
{ id: 'body', kind: 'ellipse', cx: 80, cy: 100, rx: 30, ry: 32, fill: '#18181b', stroke: '#6d28d9', strokeWidth: 1.8, motion: { bobAmpY: 4, bobFreqHz: 1.4 } },
|
|
424
|
+
{ id: 'head', kind: 'circle', cx: 80, cy: 76, r: 26, fill: '#18181b', stroke: '#6d28d9', strokeWidth: 1.8, motion: { bobAmpY: 4, bobFreqHz: 1.4 } },
|
|
425
|
+
{ id: 'hat-brim', kind: 'ellipse', cx: 80, cy: 52, rx: 38, ry: 9, fill: '#6d28d9', stroke: '#a78bfa', strokeWidth: 1.5, motion: { bobAmpY: 4, bobFreqHz: 1.4 } },
|
|
426
|
+
{ id: 'hat-cone', kind: 'path', d: 'M56 50 L82 14 L104 50 Z', fill: '#5b21b6', stroke: '#a78bfa', strokeWidth: 1.5, motion: { bobAmpY: 4, bobFreqHz: 1.4 } },
|
|
427
|
+
...makeEyeLayers(70, 90, 76, '#facc15', 4.2, '#ffffff'),
|
|
428
|
+
{ id: 'wand', kind: 'path', d: 'M108 108 L130 78', fill: 'none', stroke: '#a16207', strokeWidth: 3, motion: { bobAmpY: 5, bobFreqHz: 2.0, rotAmpDeg: 10, rotFreqHz: 2.0 } },
|
|
429
|
+
{ id: 'wand-star', kind: 'circle', cx: 132, cy: 76, r: 6, fill: '#fde047', stroke: '#f59e0b', strokeWidth: 1.5, motion: { bobAmpY: 5, bobFreqHz: 2.0 } }
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
];
|
|
434
|
+
|
|
435
|
+
function getBuiltinThemes() {
|
|
436
|
+
return BUILTIN_THEMES.map((t) => ({
|
|
437
|
+
id: t.id,
|
|
438
|
+
name: t.name,
|
|
439
|
+
description: t.description,
|
|
440
|
+
accentHex: t.accentHex,
|
|
441
|
+
usesHostAccent: Boolean(t.usesHostAccent),
|
|
442
|
+
builtin: true,
|
|
443
|
+
scene: t.scene
|
|
444
|
+
}));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function getBuiltinThemeById(themeId) {
|
|
448
|
+
const clean = String(themeId || '').trim();
|
|
449
|
+
return BUILTIN_THEMES.find((t) => t.id === clean) || BUILTIN_THEMES[0];
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
module.exports = {
|
|
453
|
+
BUILTIN_THEMES,
|
|
454
|
+
getBuiltinThemes,
|
|
455
|
+
getBuiltinThemeById
|
|
456
|
+
};
|