@fungi.computer/sprite-zdog 0.0.0-stage → 0.0.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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -2
  3. package/dist/agent-proof/moth.d.ts +50 -0
  4. package/dist/agent-proof/moth.js +52 -0
  5. package/dist/author.d.ts +217 -0
  6. package/dist/author.js +372 -0
  7. package/dist/avatar.d.ts +69 -0
  8. package/dist/avatar.js +40 -0
  9. package/dist/builtins/base-face.d.ts +290 -0
  10. package/dist/builtins/base-face.js +615 -0
  11. package/dist/builtins/base.d.ts +331 -0
  12. package/dist/builtins/base.js +579 -0
  13. package/dist/builtins/burger-input.d.ts +310 -0
  14. package/dist/builtins/burger-input.js +517 -0
  15. package/dist/builtins/burger.d.ts +305 -0
  16. package/dist/builtins/burger.js +4 -0
  17. package/dist/builtins/cat-input.d.ts +316 -0
  18. package/dist/builtins/cat-input.js +255 -0
  19. package/dist/builtins/cat.d.ts +311 -0
  20. package/dist/builtins/cat.js +4 -0
  21. package/dist/builtins/index.d.ts +4 -0
  22. package/dist/builtins/index.js +4 -0
  23. package/dist/builtins/mushroom-input.d.ts +314 -0
  24. package/dist/builtins/mushroom-input.js +94 -0
  25. package/dist/builtins/mushroom.d.ts +310 -0
  26. package/dist/builtins/mushroom.js +4 -0
  27. package/dist/burger.d.ts +9 -0
  28. package/dist/burger.js +15 -0
  29. package/dist/cat.d.ts +9 -0
  30. package/dist/cat.js +15 -0
  31. package/dist/catalog.d.ts +3 -0
  32. package/dist/catalog.js +63 -0
  33. package/dist/document.d.ts +444 -0
  34. package/dist/document.js +204 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.js +10 -0
  37. package/dist/internal.d.ts +41 -0
  38. package/dist/internal.js +21 -0
  39. package/dist/mushroom.character.json +1930 -0
  40. package/dist/mushroom.d.ts +4 -0
  41. package/dist/mushroom.js +9 -0
  42. package/dist/palette.d.ts +3 -0
  43. package/dist/palette.js +5 -0
  44. package/dist/portable.d.ts +4 -0
  45. package/dist/portable.js +61 -0
  46. package/dist/renderer.d.ts +4 -0
  47. package/dist/renderer.js +106 -0
  48. package/dist/zdog-runtime.d.ts +21 -0
  49. package/dist/zdog-runtime.js +622 -0
  50. package/package.json +112 -3
@@ -0,0 +1,290 @@
1
+ import type { SceneBuilder, SceneNode } from "../author.js";
2
+ export type BaseFaceVariants = Readonly<{
3
+ eyes: Record<string, SceneNode>;
4
+ mouth: Record<string, SceneNode>;
5
+ blush: Record<string, SceneNode>;
6
+ }>;
7
+ /**
8
+ * The shared face language used by the legacy ball, mushroom, cat and burger.
9
+ * This is deliberately written against the public scene builder rather than
10
+ * sharing renderer objects between definitions.
11
+ */
12
+ export declare const buildBaseFace: (scene: SceneBuilder, color: (slot: string) => string, parent: SceneNode, options?: {
13
+ readonly blushMode?: "medium-alias" | "standard";
14
+ readonly hideMouth?: boolean;
15
+ readonly mouthTranslate?: {
16
+ readonly y?: number;
17
+ readonly z?: number;
18
+ };
19
+ }) => BaseFaceVariants;
20
+ export declare const baseExpressions: {
21
+ readonly angry: {
22
+ readonly variants: {
23
+ readonly eyes: "angry";
24
+ readonly mouth: "angry";
25
+ readonly blush: "off";
26
+ };
27
+ readonly motion: {
28
+ readonly target: "root";
29
+ readonly translate: {
30
+ readonly x: 1;
31
+ readonly y: 0;
32
+ };
33
+ readonly durationMs: 150;
34
+ readonly repeat: "none";
35
+ };
36
+ };
37
+ readonly confused: {
38
+ readonly variants: {
39
+ readonly eyes: "confused";
40
+ readonly mouth: "normal";
41
+ readonly blush: "off";
42
+ };
43
+ readonly motion: {
44
+ readonly target: "root";
45
+ readonly translate: {
46
+ readonly x: 0;
47
+ readonly y: 0.5;
48
+ };
49
+ readonly durationMs: 150;
50
+ readonly repeat: "none";
51
+ };
52
+ };
53
+ readonly cute: {
54
+ readonly variants: {
55
+ readonly eyes: "cute";
56
+ readonly mouth: "happy";
57
+ readonly blush: "big";
58
+ };
59
+ readonly motion: {
60
+ readonly target: "root";
61
+ readonly translate: {
62
+ readonly x: 0;
63
+ readonly y: -2.5;
64
+ };
65
+ readonly durationMs: 150;
66
+ readonly repeat: "none";
67
+ };
68
+ };
69
+ readonly dead: {
70
+ readonly variants: {
71
+ readonly eyes: "dead";
72
+ readonly mouth: "dead";
73
+ readonly blush: "off";
74
+ };
75
+ };
76
+ readonly happy: {
77
+ readonly variants: {
78
+ readonly eyes: "happy";
79
+ readonly mouth: "happy";
80
+ readonly blush: "medium";
81
+ };
82
+ readonly motion: {
83
+ readonly target: "root";
84
+ readonly translate: {
85
+ readonly x: 0;
86
+ readonly y: -2;
87
+ };
88
+ readonly durationMs: 150;
89
+ readonly repeat: "none";
90
+ };
91
+ };
92
+ readonly nervous: {
93
+ readonly variants: {
94
+ readonly eyes: "nervous";
95
+ readonly mouth: "worried";
96
+ readonly blush: "off";
97
+ };
98
+ readonly motion: {
99
+ readonly target: "root";
100
+ readonly translate: {
101
+ readonly x: -0.5;
102
+ readonly y: -1;
103
+ };
104
+ readonly durationMs: 150;
105
+ readonly repeat: "none";
106
+ };
107
+ };
108
+ readonly normal: {
109
+ readonly variants: {
110
+ readonly eyes: "normal";
111
+ readonly mouth: "normal";
112
+ readonly blush: "off";
113
+ };
114
+ readonly motion: {
115
+ readonly target: "root";
116
+ readonly translate: {
117
+ readonly x: 0;
118
+ readonly y: 1;
119
+ };
120
+ readonly durationMs: 150;
121
+ readonly repeat: "none";
122
+ };
123
+ };
124
+ readonly pleading: {
125
+ readonly variants: {
126
+ readonly eyes: "cute";
127
+ readonly mouth: "pout";
128
+ readonly blush: "medium";
129
+ };
130
+ readonly motion: {
131
+ readonly target: "root";
132
+ readonly translate: {
133
+ readonly x: 0;
134
+ readonly y: -1;
135
+ };
136
+ readonly durationMs: 150;
137
+ readonly repeat: "none";
138
+ };
139
+ };
140
+ readonly sad: {
141
+ readonly variants: {
142
+ readonly eyes: "sad";
143
+ readonly mouth: "sad";
144
+ readonly blush: "off";
145
+ };
146
+ readonly motion: {
147
+ readonly target: "root";
148
+ readonly translate: {
149
+ readonly x: 0;
150
+ readonly y: 2;
151
+ };
152
+ readonly durationMs: 150;
153
+ readonly repeat: "none";
154
+ };
155
+ };
156
+ readonly shy: {
157
+ readonly variants: {
158
+ readonly eyes: "shy";
159
+ readonly mouth: "small";
160
+ readonly blush: "small";
161
+ };
162
+ readonly motion: {
163
+ readonly target: "root";
164
+ readonly translate: {
165
+ readonly x: 0;
166
+ readonly y: 1.5;
167
+ };
168
+ readonly durationMs: 150;
169
+ readonly repeat: "none";
170
+ };
171
+ };
172
+ readonly sleepy: {
173
+ readonly variants: {
174
+ readonly eyes: "sleepy";
175
+ readonly mouth: "small";
176
+ readonly blush: "off";
177
+ };
178
+ readonly motion: {
179
+ readonly target: "root";
180
+ readonly translate: {
181
+ readonly x: 0;
182
+ readonly y: 2;
183
+ };
184
+ readonly durationMs: 150;
185
+ readonly repeat: "none";
186
+ };
187
+ };
188
+ readonly surprised: {
189
+ readonly variants: {
190
+ readonly eyes: "surprised";
191
+ readonly mouth: "surprised";
192
+ readonly blush: "off";
193
+ };
194
+ readonly motion: {
195
+ readonly target: "root";
196
+ readonly translate: {
197
+ readonly x: 0;
198
+ readonly y: -3;
199
+ };
200
+ readonly durationMs: 150;
201
+ readonly repeat: "none";
202
+ };
203
+ };
204
+ readonly wink: {
205
+ readonly variants: {
206
+ readonly mouth: "happy";
207
+ readonly blush: "small";
208
+ };
209
+ readonly variantChoices: {
210
+ readonly eyes: readonly ["wink.left", "wink.right"];
211
+ };
212
+ readonly motion: {
213
+ readonly target: "root";
214
+ readonly translate: {
215
+ readonly x: 0;
216
+ readonly y: -1.5;
217
+ };
218
+ readonly durationMs: 150;
219
+ readonly repeat: "none";
220
+ };
221
+ };
222
+ };
223
+ export declare const baseActivities: {
224
+ readonly idle: {
225
+ readonly motion: {
226
+ readonly target: "root";
227
+ readonly translate: {
228
+ readonly y: 0.5;
229
+ };
230
+ readonly durationMs: 2000;
231
+ readonly repeat: "yoyo";
232
+ };
233
+ readonly mouseInfluence: 1;
234
+ };
235
+ readonly listening: {
236
+ readonly motion: {
237
+ readonly target: "root";
238
+ readonly rotate: {
239
+ readonly x: -0.2;
240
+ };
241
+ readonly durationMs: 300;
242
+ readonly repeat: "yoyo";
243
+ };
244
+ readonly mouseInfluence: 0.3;
245
+ };
246
+ readonly processing: {
247
+ readonly mouseInfluence: 0.2;
248
+ };
249
+ readonly speaking: {
250
+ readonly motion: {
251
+ readonly target: "root";
252
+ readonly translate: {
253
+ readonly y: 0.5;
254
+ };
255
+ readonly durationMs: 1500;
256
+ readonly repeat: "yoyo";
257
+ };
258
+ readonly mouseInfluence: 0;
259
+ readonly mouthCycle: readonly [{
260
+ readonly durationMs: 100;
261
+ readonly mouth: "open";
262
+ }, {
263
+ readonly durationMs: 150;
264
+ readonly mouth: "base";
265
+ }, {
266
+ readonly durationMs: 100;
267
+ readonly mouth: "open";
268
+ }, {
269
+ readonly durationMs: 200;
270
+ readonly mouth: "base";
271
+ }];
272
+ };
273
+ readonly thinking: {
274
+ readonly motion: {
275
+ readonly target: "root";
276
+ readonly rotate: {
277
+ readonly z: 0.1;
278
+ };
279
+ readonly durationMs: 800;
280
+ readonly repeat: "yoyo";
281
+ };
282
+ readonly mouseInfluence: 0;
283
+ };
284
+ readonly error: {
285
+ readonly geometry: {
286
+ readonly expression: "dead";
287
+ };
288
+ readonly mouseInfluence: 0.1;
289
+ };
290
+ };