@celljs/ta-web 4.9.0 → 4.9.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/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-extension.js +13 -5
- package/esm/browser/assistant/assistant-task-source.d.ts +2 -0
- package/esm/browser/assistant/assistant-task-source.js +2 -0
- package/esm/browser/assistant/assistant-task-util.d.ts +6 -0
- package/esm/browser/assistant/assistant-task-util.js +8 -0
- package/esm/browser/assistant/assistant-tasks.js +3 -2
- package/esm/browser/assistant/assistant.d.ts +20 -0
- package/esm/browser/assistant/assistant.js +45 -1
- package/esm/browser/assistant/task-views.d.ts +40 -6
- package/esm/browser/assistant/task-views.js +73 -21
- package/esm/browser/avatar/dino-avatar.d.ts +3 -4
- package/esm/browser/avatar/dino-avatar.js +4 -178
- package/esm/browser/avatar/dino-face.d.ts +19 -0
- package/esm/browser/avatar/dino-face.js +142 -0
- package/esm/browser/avatar/dino-geometry.d.ts +11 -0
- package/esm/browser/avatar/dino-geometry.js +38 -0
- package/esm/browser/avatar/dino-kinds.d.ts +15 -0
- package/esm/browser/avatar/dino-kinds.js +544 -0
- package/esm/browser/avatar/dino-motion.js +1 -1
- package/esm/browser/avatar/dino-shape.d.ts +80 -0
- package/esm/browser/avatar/dino-shape.js +113 -0
- package/esm/browser/avatar/dino-species.d.ts +1 -61
- package/esm/browser/avatar/dino-species.js +2 -653
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-shell-hooks.d.ts +47 -0
- package/esm/browser/components/app-shell-hooks.js +165 -0
- package/esm/browser/components/app-view.js +6 -151
- package/esm/browser/components/auth-view.js +1 -1
- package/esm/browser/components/composer.js +17 -10
- package/esm/browser/components/dino.js +1 -1
- package/esm/browser/components/folder-picker.js +4 -1
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +1 -1
- package/esm/browser/components/select-bar.d.ts +9 -0
- package/esm/browser/components/select-bar.js +24 -0
- package/esm/browser/components/settings-choices.d.ts +35 -0
- package/esm/browser/components/settings-choices.js +117 -0
- package/esm/browser/components/settings-parts.d.ts +21 -0
- package/esm/browser/components/settings-parts.js +300 -0
- package/esm/browser/components/settings-view.d.ts +0 -6
- package/esm/browser/components/settings-view.js +4 -406
- package/esm/browser/components/workbench-view.js +1 -1
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-extension-api.d.ts +38 -1
- package/esm/browser/extension/web-extensions.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +9 -1
- package/esm/browser/extension/web-tasks.js +24 -0
- package/esm/browser/hooks.d.ts +3 -1
- package/esm/browser/hooks.js +8 -0
- package/esm/browser/i18n/locales.d.ts +6 -1
- package/esm/browser/i18n/messages.d.ts +5 -0
- package/esm/browser/i18n/messages.js +10 -0
- package/esm/browser/style/device.js +16 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +1 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +2 -0
- package/esm/browser/workbench-util.d.ts +61 -0
- package/esm/browser/workbench-util.js +138 -0
- package/esm/browser/workbench.d.ts +1 -37
- package/esm/browser/workbench.js +2 -136
- package/lib/browser/assistant/assistant-extension.js +13 -5
- package/lib/browser/assistant/assistant-task-source.d.ts +2 -0
- package/lib/browser/assistant/assistant-task-source.js +2 -0
- package/lib/browser/assistant/assistant-task-util.d.ts +6 -0
- package/lib/browser/assistant/assistant-task-util.js +8 -0
- package/lib/browser/assistant/assistant-tasks.js +2 -1
- package/lib/browser/assistant/assistant.d.ts +20 -0
- package/lib/browser/assistant/assistant.js +45 -1
- package/lib/browser/assistant/task-views.d.ts +40 -6
- package/lib/browser/assistant/task-views.js +74 -21
- package/lib/browser/avatar/dino-avatar.d.ts +3 -4
- package/lib/browser/avatar/dino-avatar.js +27 -202
- package/lib/browser/avatar/dino-face.d.ts +20 -0
- package/lib/browser/avatar/dino-face.js +148 -0
- package/lib/browser/avatar/dino-geometry.d.ts +12 -0
- package/lib/browser/avatar/dino-geometry.js +47 -0
- package/lib/browser/avatar/dino-kinds.d.ts +16 -0
- package/lib/browser/avatar/dino-kinds.js +547 -0
- package/lib/browser/avatar/dino-motion.js +2 -2
- package/lib/browser/avatar/dino-shape.d.ts +81 -0
- package/lib/browser/avatar/dino-shape.js +126 -0
- package/lib/browser/avatar/dino-species.d.ts +1 -61
- package/lib/browser/avatar/dino-species.js +34 -687
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/app-shell-hooks.d.ts +48 -0
- package/lib/browser/components/app-shell-hooks.js +207 -0
- package/lib/browser/components/app-view.js +16 -161
- package/lib/browser/components/auth-view.js +3 -3
- package/lib/browser/components/composer.js +17 -10
- package/lib/browser/components/dino.js +3 -3
- package/lib/browser/components/folder-picker.js +4 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +5 -5
- package/lib/browser/components/select-bar.d.ts +10 -0
- package/lib/browser/components/select-bar.js +61 -0
- package/lib/browser/components/settings-choices.d.ts +36 -0
- package/lib/browser/components/settings-choices.js +156 -0
- package/lib/browser/components/settings-parts.d.ts +22 -0
- package/lib/browser/components/settings-parts.js +336 -0
- package/lib/browser/components/settings-view.d.ts +0 -6
- package/lib/browser/components/settings-view.js +2 -405
- package/lib/browser/components/workbench-view.js +3 -3
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-extension-api.d.ts +38 -1
- package/lib/browser/extension/web-extensions.js +5 -0
- package/lib/browser/extension/web-tasks.d.ts +9 -1
- package/lib/browser/extension/web-tasks.js +24 -0
- package/lib/browser/hooks.d.ts +3 -1
- package/lib/browser/hooks.js +9 -0
- package/lib/browser/i18n/locales.d.ts +6 -1
- package/lib/browser/i18n/messages.d.ts +5 -0
- package/lib/browser/i18n/messages.js +10 -0
- package/lib/browser/style/device.js +16 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +1 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +2 -0
- package/lib/browser/workbench-util.d.ts +62 -0
- package/lib/browser/workbench-util.js +144 -0
- package/lib/browser/workbench.d.ts +1 -37
- package/lib/browser/workbench.js +24 -159
- package/package.json +7 -7
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
/* The first kinds of dinosaur ta can be (SPECIES in dino-species.ts lists them all). */
|
|
2
|
+
import { below, bones, cut, LOGO_ARM, LOGO_BODY, LOGO_EYE, LOGO_FRONT, left, leg, Outline, right, smooth, tones } from './dino-shape.js';
|
|
3
|
+
/** ta as the logo draws it. */
|
|
4
|
+
export const TREX = {
|
|
5
|
+
id: 'trex',
|
|
6
|
+
skin: LOGO_BODY + LOGO_EYE,
|
|
7
|
+
parts: [
|
|
8
|
+
{ d: LOGO_FRONT, joint: { x: 146, y: 192 }, swing: 'front', lift: 'frontLift', far: true },
|
|
9
|
+
{ d: LOGO_ARM, joint: { x: 171, y: 149 }, swing: 'arm', far: false },
|
|
10
|
+
],
|
|
11
|
+
eye: { x: 141.3, y: 44.6, r: 10.9 },
|
|
12
|
+
joints: {
|
|
13
|
+
feet: { x: 128, y: 244 },
|
|
14
|
+
neck: { x: 122, y: 124 },
|
|
15
|
+
jaw: { x: 150, y: 94 },
|
|
16
|
+
tail: { x: 54, y: 160 },
|
|
17
|
+
tip: { x: 40, y: 112 },
|
|
18
|
+
hip: { x: 86, y: 188 },
|
|
19
|
+
},
|
|
20
|
+
weights(x, y) {
|
|
21
|
+
// The neck: a band across it, from the back of the neck down to the throat.
|
|
22
|
+
const across = ((x - 92) * 42 - (y - 106) * 76) / 86.8;
|
|
23
|
+
const head = smooth(-4, 24, across) * smooth(78, 96, x);
|
|
24
|
+
// The jaw: below the line of the mouth, fading at the corner of the mouth and down the throat.
|
|
25
|
+
const mouth = x >= 177 ? 96.5 : 80 + ((x - 143) * 16.5) / 34;
|
|
26
|
+
const jaw = head * smooth(mouth - 3, mouth + 4, y) * smooth(140, 152, x) * (1 - smooth(132, 146, y));
|
|
27
|
+
// The tail from where it leaves the back, and again toward its tip.
|
|
28
|
+
const tail = smooth(178, 128, y) * (1 - smooth(52, 92, x));
|
|
29
|
+
const tip = smooth(128, 86, y) * (1 - smooth(48, 70, x));
|
|
30
|
+
const back = smooth(186, 204, y) * (1 - smooth(108, 124, x));
|
|
31
|
+
return { head: head - jaw, jaw, tail: tail - tip, tip, back, body: Math.max(0, 1 - head - tail - back) };
|
|
32
|
+
},
|
|
33
|
+
head: { axis: { x: 132, y: 60 }, center: { x: 160, y: 60 }, depth: 22 },
|
|
34
|
+
body: { center: { x: 112, y: 160 }, depth: 26 },
|
|
35
|
+
colors: { skin: '#10B981', lit: '#34D399', shade: '#0EA372', ridge: '#047857' },
|
|
36
|
+
badge: { x: 54, y: 34 },
|
|
37
|
+
snout: { x: 238, y: 94 },
|
|
38
|
+
nose: { x: 222, y: 66 },
|
|
39
|
+
face: [76, -20, 184],
|
|
40
|
+
};
|
|
41
|
+
/** Three horns and a frill; on four legs. */
|
|
42
|
+
export const TRICERATOPS = {
|
|
43
|
+
id: 'triceratops',
|
|
44
|
+
turns: 0.4,
|
|
45
|
+
spins: 0.3,
|
|
46
|
+
leans: 0.35,
|
|
47
|
+
skin: Outline.loop([
|
|
48
|
+
[16, 186, 1],
|
|
49
|
+
[40, 166],
|
|
50
|
+
[64, 140],
|
|
51
|
+
[92, 118],
|
|
52
|
+
[122, 108],
|
|
53
|
+
[142, 110],
|
|
54
|
+
[140, 84],
|
|
55
|
+
[150, 58],
|
|
56
|
+
[174, 40],
|
|
57
|
+
[202, 38],
|
|
58
|
+
[218, 58],
|
|
59
|
+
[224, 76],
|
|
60
|
+
[232, 90],
|
|
61
|
+
[238, 98],
|
|
62
|
+
[244, 80, 1],
|
|
63
|
+
[246, 106],
|
|
64
|
+
[252, 122],
|
|
65
|
+
[250, 138],
|
|
66
|
+
[244, 142, 1],
|
|
67
|
+
[226, 140, 1],
|
|
68
|
+
[240, 150],
|
|
69
|
+
[234, 158],
|
|
70
|
+
[218, 166],
|
|
71
|
+
[198, 170],
|
|
72
|
+
[184, 180],
|
|
73
|
+
[172, 194],
|
|
74
|
+
[146, 202],
|
|
75
|
+
[118, 202],
|
|
76
|
+
[112, 206],
|
|
77
|
+
[112, 226],
|
|
78
|
+
[116, 238],
|
|
79
|
+
[112, 244],
|
|
80
|
+
[80, 244],
|
|
81
|
+
[74, 236],
|
|
82
|
+
[74, 222],
|
|
83
|
+
[66, 202],
|
|
84
|
+
[46, 194],
|
|
85
|
+
]) + Outline.circle(204, 104, 9),
|
|
86
|
+
parts: [
|
|
87
|
+
{ d: leg(116, 192, 24), joint: { x: 128, y: 198 }, swing: 'front', lift: 'frontLift', far: true },
|
|
88
|
+
{ d: leg(190, 170, 20), joint: { x: 200, y: 178 }, swing: 'back', lift: 'backLift', far: true },
|
|
89
|
+
{ d: leg(152, 166, 32), joint: { x: 168, y: 176 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
90
|
+
],
|
|
91
|
+
eye: { x: 204, y: 104, r: 9 },
|
|
92
|
+
joints: {
|
|
93
|
+
feet: { x: 130, y: 244 },
|
|
94
|
+
neck: { x: 170, y: 134 },
|
|
95
|
+
jaw: { x: 226, y: 140 },
|
|
96
|
+
tail: { x: 58, y: 170 },
|
|
97
|
+
tip: { x: 34, y: 178 },
|
|
98
|
+
hip: { x: 90, y: 196 },
|
|
99
|
+
},
|
|
100
|
+
weights: bones({
|
|
101
|
+
head: [cut({ x: 164, y: 136 }, { x: 76, y: -40 }, 12)],
|
|
102
|
+
jaw: [below(141, 3), right(208, 6)],
|
|
103
|
+
tail: [left(62, 14)],
|
|
104
|
+
tip: [left(34, 8)],
|
|
105
|
+
back: [below(204, 8), left(114, 6)],
|
|
106
|
+
}),
|
|
107
|
+
head: { axis: { x: 186, y: 100 }, center: { x: 206, y: 100 }, depth: 22 },
|
|
108
|
+
body: { center: { x: 112, y: 160 }, depth: 30 },
|
|
109
|
+
colors: tones('#EE7B3B'),
|
|
110
|
+
badge: { x: 60, y: 70 },
|
|
111
|
+
snout: { x: 252, y: 130 },
|
|
112
|
+
nose: { x: 238, y: 118 },
|
|
113
|
+
face: [132, 30, 132],
|
|
114
|
+
// Its two horns over the eyes, ivory, one on each side of its head.
|
|
115
|
+
decor: [
|
|
116
|
+
{
|
|
117
|
+
depth: 0.6,
|
|
118
|
+
markup: `<path d="${Outline.loop([
|
|
119
|
+
[212, 62],
|
|
120
|
+
[232, 50],
|
|
121
|
+
[254, 42, 1],
|
|
122
|
+
[234, 62],
|
|
123
|
+
[224, 74],
|
|
124
|
+
])}" fill="#F3DFC1"/>`,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
/** Plates along its back and spikes at the end of its tail; on four legs, its head low. */
|
|
129
|
+
export const STEGOSAURUS = {
|
|
130
|
+
id: 'stegosaurus',
|
|
131
|
+
turns: 0.4,
|
|
132
|
+
spins: 0.3,
|
|
133
|
+
leans: 0.35,
|
|
134
|
+
skin: Outline.loop([
|
|
135
|
+
[14, 180, 1],
|
|
136
|
+
[18, 168],
|
|
137
|
+
[4, 146, 1],
|
|
138
|
+
[32, 162],
|
|
139
|
+
[28, 140, 1],
|
|
140
|
+
[48, 154],
|
|
141
|
+
[62, 144],
|
|
142
|
+
[56, 108, 1],
|
|
143
|
+
[78, 128],
|
|
144
|
+
[86, 82, 1],
|
|
145
|
+
[106, 112],
|
|
146
|
+
[122, 70, 1],
|
|
147
|
+
[140, 106],
|
|
148
|
+
[160, 80, 1],
|
|
149
|
+
[170, 118],
|
|
150
|
+
[192, 104, 1],
|
|
151
|
+
[194, 134],
|
|
152
|
+
[210, 148],
|
|
153
|
+
[232, 156],
|
|
154
|
+
[248, 168],
|
|
155
|
+
[250, 178, 1],
|
|
156
|
+
[230, 180, 1],
|
|
157
|
+
[244, 186, 1],
|
|
158
|
+
[232, 194],
|
|
159
|
+
[212, 192],
|
|
160
|
+
[196, 198],
|
|
161
|
+
[184, 206],
|
|
162
|
+
[150, 212],
|
|
163
|
+
[124, 210],
|
|
164
|
+
[116, 214],
|
|
165
|
+
[114, 230],
|
|
166
|
+
[120, 238],
|
|
167
|
+
[116, 244],
|
|
168
|
+
[86, 244],
|
|
169
|
+
[80, 238],
|
|
170
|
+
[80, 226],
|
|
171
|
+
[72, 206],
|
|
172
|
+
[48, 194],
|
|
173
|
+
[28, 188],
|
|
174
|
+
]) + Outline.circle(228, 168, 6),
|
|
175
|
+
parts: [
|
|
176
|
+
{ d: leg(124, 200, 22), joint: { x: 134, y: 206 }, swing: 'front', lift: 'frontLift', far: true },
|
|
177
|
+
{ d: leg(200, 188, 18), joint: { x: 208, y: 194 }, swing: 'back', lift: 'backLift', far: true },
|
|
178
|
+
{ d: leg(170, 190, 26), joint: { x: 182, y: 198 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
179
|
+
],
|
|
180
|
+
eye: { x: 228, y: 168, r: 6 },
|
|
181
|
+
joints: {
|
|
182
|
+
feet: { x: 130, y: 244 },
|
|
183
|
+
neck: { x: 200, y: 168 },
|
|
184
|
+
jaw: { x: 230, y: 181 },
|
|
185
|
+
tail: { x: 60, y: 170 },
|
|
186
|
+
tip: { x: 32, y: 170 },
|
|
187
|
+
hip: { x: 94, y: 204 },
|
|
188
|
+
},
|
|
189
|
+
weights: bones({
|
|
190
|
+
head: [cut({ x: 204, y: 160 }, { x: 1, y: 0.3 }, 10)],
|
|
191
|
+
jaw: [below(181.5, 2.5), right(222, 5)],
|
|
192
|
+
tail: [left(58, 12)],
|
|
193
|
+
tip: [left(30, 8)],
|
|
194
|
+
back: [below(210, 8), left(118, 6)],
|
|
195
|
+
}),
|
|
196
|
+
head: { axis: { x: 220, y: 172 }, center: { x: 230, y: 174 }, depth: 14 },
|
|
197
|
+
body: { center: { x: 118, y: 168 }, depth: 30 },
|
|
198
|
+
colors: tones('#4285F4'),
|
|
199
|
+
badge: { x: 40, y: 82 },
|
|
200
|
+
snout: { x: 254, y: 178 },
|
|
201
|
+
nose: { x: 242, y: 171 },
|
|
202
|
+
face: [168, 112, 100],
|
|
203
|
+
};
|
|
204
|
+
/** A neck that reaches up to the trees; on four legs, the front ones long. */
|
|
205
|
+
export const BRACHIOSAURUS = {
|
|
206
|
+
id: 'brachiosaurus',
|
|
207
|
+
turns: 0.45,
|
|
208
|
+
spins: 0.3,
|
|
209
|
+
leans: 0.35,
|
|
210
|
+
skin: Outline.loop([
|
|
211
|
+
[10, 170, 1],
|
|
212
|
+
[36, 150],
|
|
213
|
+
[66, 128],
|
|
214
|
+
[100, 112],
|
|
215
|
+
[132, 104],
|
|
216
|
+
[152, 98],
|
|
217
|
+
[164, 80],
|
|
218
|
+
[174, 56],
|
|
219
|
+
[182, 34],
|
|
220
|
+
[192, 18],
|
|
221
|
+
[212, 10],
|
|
222
|
+
[234, 18],
|
|
223
|
+
[242, 30, 1],
|
|
224
|
+
[222, 34, 1],
|
|
225
|
+
[238, 38, 1],
|
|
226
|
+
[226, 46],
|
|
227
|
+
[206, 48],
|
|
228
|
+
[200, 62],
|
|
229
|
+
[196, 86],
|
|
230
|
+
[194, 112],
|
|
231
|
+
[190, 136],
|
|
232
|
+
[184, 160],
|
|
233
|
+
[172, 178],
|
|
234
|
+
[140, 186],
|
|
235
|
+
[112, 184],
|
|
236
|
+
[104, 190],
|
|
237
|
+
[102, 222],
|
|
238
|
+
[108, 238],
|
|
239
|
+
[104, 244],
|
|
240
|
+
[76, 244],
|
|
241
|
+
[70, 238],
|
|
242
|
+
[70, 220],
|
|
243
|
+
[64, 192],
|
|
244
|
+
[42, 180],
|
|
245
|
+
]) + Outline.circle(212, 24, 5.5),
|
|
246
|
+
parts: [
|
|
247
|
+
{ d: leg(110, 184, 22), joint: { x: 120, y: 190 }, swing: 'front', lift: 'frontLift', far: true },
|
|
248
|
+
{ d: leg(186, 146, 18), joint: { x: 196, y: 154 }, swing: 'back', lift: 'backLift', far: true },
|
|
249
|
+
{ d: leg(158, 138, 28), joint: { x: 172, y: 148 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
250
|
+
],
|
|
251
|
+
eye: { x: 212, y: 24, r: 5.5 },
|
|
252
|
+
joints: {
|
|
253
|
+
feet: { x: 128, y: 244 },
|
|
254
|
+
neck: { x: 176, y: 112 },
|
|
255
|
+
jaw: { x: 222, y: 35 },
|
|
256
|
+
tail: { x: 52, y: 160 },
|
|
257
|
+
tip: { x: 28, y: 166 },
|
|
258
|
+
hip: { x: 86, y: 192 },
|
|
259
|
+
},
|
|
260
|
+
weights: bones({
|
|
261
|
+
head: [cut({ x: 176, y: 96 }, { x: 0.3, y: -1 }, 14)],
|
|
262
|
+
jaw: [below(35.5, 2), right(214, 5)],
|
|
263
|
+
tail: [left(54, 12)],
|
|
264
|
+
tip: [left(28, 8)],
|
|
265
|
+
back: [below(194, 8), left(110, 6)],
|
|
266
|
+
}),
|
|
267
|
+
head: { axis: { x: 204, y: 28 }, center: { x: 214, y: 28 }, depth: 12 },
|
|
268
|
+
body: { center: { x: 116, y: 150 }, depth: 30 },
|
|
269
|
+
colors: tones('#8C5CF0'),
|
|
270
|
+
badge: { x: 60, y: 64 },
|
|
271
|
+
snout: { x: 246, y: 30 },
|
|
272
|
+
nose: { x: 230, y: 20 },
|
|
273
|
+
face: [166, -6, 88],
|
|
274
|
+
};
|
|
275
|
+
/** Quick and lean, a long straight tail; on two legs. */
|
|
276
|
+
export const VELOCIRAPTOR = {
|
|
277
|
+
id: 'velociraptor',
|
|
278
|
+
turns: 0.75,
|
|
279
|
+
spins: 0.7,
|
|
280
|
+
skin: Outline.loop([
|
|
281
|
+
[8, 118, 1],
|
|
282
|
+
[40, 110],
|
|
283
|
+
[76, 110],
|
|
284
|
+
[104, 112],
|
|
285
|
+
[130, 110],
|
|
286
|
+
[152, 98],
|
|
287
|
+
[164, 80],
|
|
288
|
+
[170, 62],
|
|
289
|
+
[162, 48, 1],
|
|
290
|
+
[180, 50],
|
|
291
|
+
[196, 50],
|
|
292
|
+
[224, 60],
|
|
293
|
+
[238, 70, 1],
|
|
294
|
+
[210, 76, 1],
|
|
295
|
+
[230, 80, 1],
|
|
296
|
+
[216, 88],
|
|
297
|
+
[192, 88],
|
|
298
|
+
[182, 104],
|
|
299
|
+
[178, 126],
|
|
300
|
+
[168, 146],
|
|
301
|
+
[150, 158],
|
|
302
|
+
[126, 160],
|
|
303
|
+
[114, 168],
|
|
304
|
+
[118, 196],
|
|
305
|
+
[112, 222],
|
|
306
|
+
[128, 236],
|
|
307
|
+
[124, 244],
|
|
308
|
+
[96, 244],
|
|
309
|
+
[92, 238],
|
|
310
|
+
[96, 222],
|
|
311
|
+
[90, 192],
|
|
312
|
+
[80, 164],
|
|
313
|
+
[66, 140],
|
|
314
|
+
[36, 128],
|
|
315
|
+
]) + Outline.circle(194, 64, 6.5),
|
|
316
|
+
parts: [
|
|
317
|
+
{
|
|
318
|
+
d: Outline.loop([
|
|
319
|
+
[126, 164],
|
|
320
|
+
[146, 168],
|
|
321
|
+
[150, 196],
|
|
322
|
+
[144, 222],
|
|
323
|
+
[160, 236],
|
|
324
|
+
[156, 242],
|
|
325
|
+
[130, 242],
|
|
326
|
+
[128, 236],
|
|
327
|
+
[130, 220],
|
|
328
|
+
[126, 192],
|
|
329
|
+
]),
|
|
330
|
+
joint: { x: 136, y: 170 },
|
|
331
|
+
swing: 'front',
|
|
332
|
+
lift: 'frontLift',
|
|
333
|
+
far: true,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
d: Outline.loop([
|
|
337
|
+
[164, 130],
|
|
338
|
+
[180, 132],
|
|
339
|
+
[198, 152],
|
|
340
|
+
[192, 162, 1],
|
|
341
|
+
[178, 150],
|
|
342
|
+
[164, 144],
|
|
343
|
+
]),
|
|
344
|
+
joint: { x: 168, y: 136 },
|
|
345
|
+
swing: 'arm',
|
|
346
|
+
far: false,
|
|
347
|
+
gap: true,
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
eye: { x: 194, y: 64, r: 6.5 },
|
|
351
|
+
joints: {
|
|
352
|
+
feet: { x: 112, y: 244 },
|
|
353
|
+
neck: { x: 168, y: 104 },
|
|
354
|
+
jaw: { x: 210, y: 77 },
|
|
355
|
+
tail: { x: 84, y: 124 },
|
|
356
|
+
tip: { x: 40, y: 118 },
|
|
357
|
+
hip: { x: 100, y: 170 },
|
|
358
|
+
},
|
|
359
|
+
weights: bones({
|
|
360
|
+
head: [cut({ x: 172, y: 96 }, { x: 0.6, y: -1 }, 10)],
|
|
361
|
+
jaw: [below(78, 2.5), right(200, 5)],
|
|
362
|
+
tail: [left(84, 16), cut({ x: 0, y: 150 }, { x: 0, y: -1 }, 8)],
|
|
363
|
+
tip: [left(40, 10)],
|
|
364
|
+
back: [below(172, 8), left(122, 6)],
|
|
365
|
+
}),
|
|
366
|
+
head: { axis: { x: 186, y: 68 }, center: { x: 200, y: 70 }, depth: 14 },
|
|
367
|
+
body: { center: { x: 122, y: 140 }, depth: 20 },
|
|
368
|
+
colors: tones('#EA4335'),
|
|
369
|
+
badge: { x: 60, y: 58 },
|
|
370
|
+
snout: { x: 240, y: 72 },
|
|
371
|
+
nose: { x: 228, y: 64 },
|
|
372
|
+
face: [150, 16, 104],
|
|
373
|
+
};
|
|
374
|
+
/** Armored all over, spikes on its back and a club at the end of its tail; low, on four legs. */
|
|
375
|
+
export const ANKYLOSAURUS = {
|
|
376
|
+
id: 'ankylosaurus',
|
|
377
|
+
turns: 0.4,
|
|
378
|
+
spins: 0.3,
|
|
379
|
+
leans: 0.35,
|
|
380
|
+
skin: Outline.loop([
|
|
381
|
+
[8, 174],
|
|
382
|
+
[2, 160],
|
|
383
|
+
[12, 146],
|
|
384
|
+
[28, 146],
|
|
385
|
+
[36, 156],
|
|
386
|
+
[52, 154],
|
|
387
|
+
[72, 140],
|
|
388
|
+
[88, 124],
|
|
389
|
+
[92, 108, 1],
|
|
390
|
+
[104, 116],
|
|
391
|
+
[122, 108],
|
|
392
|
+
[128, 94, 1],
|
|
393
|
+
[138, 106],
|
|
394
|
+
[156, 104],
|
|
395
|
+
[164, 92, 1],
|
|
396
|
+
[172, 108],
|
|
397
|
+
[188, 116],
|
|
398
|
+
[198, 108, 1],
|
|
399
|
+
[202, 124],
|
|
400
|
+
[214, 132],
|
|
401
|
+
[230, 136],
|
|
402
|
+
[246, 150],
|
|
403
|
+
[248, 160, 1],
|
|
404
|
+
[230, 160, 1],
|
|
405
|
+
[242, 168, 1],
|
|
406
|
+
[232, 176],
|
|
407
|
+
[214, 176],
|
|
408
|
+
[202, 182],
|
|
409
|
+
[190, 196],
|
|
410
|
+
[158, 204],
|
|
411
|
+
[124, 204],
|
|
412
|
+
[118, 208],
|
|
413
|
+
[118, 230],
|
|
414
|
+
[122, 238],
|
|
415
|
+
[118, 244],
|
|
416
|
+
[90, 244],
|
|
417
|
+
[86, 238],
|
|
418
|
+
[86, 226],
|
|
419
|
+
[80, 204],
|
|
420
|
+
[60, 186],
|
|
421
|
+
[40, 176],
|
|
422
|
+
[28, 172],
|
|
423
|
+
]) + Outline.circle(224, 148, 5.5),
|
|
424
|
+
parts: [
|
|
425
|
+
{ d: leg(126, 196, 22), joint: { x: 136, y: 202 }, swing: 'front', lift: 'frontLift', far: true },
|
|
426
|
+
{ d: leg(204, 182, 16), joint: { x: 212, y: 190 }, swing: 'back', lift: 'backLift', far: true },
|
|
427
|
+
{ d: leg(176, 184, 24), joint: { x: 188, y: 192 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
428
|
+
],
|
|
429
|
+
eye: { x: 224, y: 148, r: 5.5 },
|
|
430
|
+
joints: {
|
|
431
|
+
feet: { x: 134, y: 244 },
|
|
432
|
+
neck: { x: 206, y: 156 },
|
|
433
|
+
jaw: { x: 230, y: 161 },
|
|
434
|
+
tail: { x: 74, y: 166 },
|
|
435
|
+
tip: { x: 40, y: 164 },
|
|
436
|
+
hip: { x: 100, y: 204 },
|
|
437
|
+
},
|
|
438
|
+
weights: bones({
|
|
439
|
+
head: [cut({ x: 208, y: 150 }, { x: 1, y: 0.1 }, 8)],
|
|
440
|
+
jaw: [below(161.5, 2), right(222, 5)],
|
|
441
|
+
tail: [left(72, 12)],
|
|
442
|
+
tip: [left(42, 8)],
|
|
443
|
+
back: [below(208, 8), left(122, 6)],
|
|
444
|
+
}),
|
|
445
|
+
head: { axis: { x: 216, y: 154 }, center: { x: 228, y: 154 }, depth: 14 },
|
|
446
|
+
body: { center: { x: 132, y: 160 }, depth: 34 },
|
|
447
|
+
colors: tones('#FBBC05'),
|
|
448
|
+
badge: { x: 54, y: 92 },
|
|
449
|
+
snout: { x: 252, y: 156 },
|
|
450
|
+
nose: { x: 240, y: 152 },
|
|
451
|
+
face: [172, 100, 92],
|
|
452
|
+
};
|
|
453
|
+
/** A flier: wings, a long beak and a crest behind it; it stands on small legs. */
|
|
454
|
+
export const PTERANODON = {
|
|
455
|
+
id: 'pteranodon',
|
|
456
|
+
turns: 0.6,
|
|
457
|
+
spins: 0.6,
|
|
458
|
+
skin: Outline.loop([
|
|
459
|
+
[96, 196, 1],
|
|
460
|
+
[104, 170],
|
|
461
|
+
[108, 140],
|
|
462
|
+
[118, 112],
|
|
463
|
+
[134, 94],
|
|
464
|
+
[142, 80],
|
|
465
|
+
[112, 58, 1],
|
|
466
|
+
[150, 62],
|
|
467
|
+
[168, 64],
|
|
468
|
+
[204, 76],
|
|
469
|
+
[246, 94, 1],
|
|
470
|
+
[190, 90, 1],
|
|
471
|
+
[230, 98, 1],
|
|
472
|
+
[196, 102],
|
|
473
|
+
[172, 100],
|
|
474
|
+
[160, 108],
|
|
475
|
+
[152, 128],
|
|
476
|
+
[150, 156],
|
|
477
|
+
[144, 184],
|
|
478
|
+
[140, 198],
|
|
479
|
+
[144, 222],
|
|
480
|
+
[154, 238],
|
|
481
|
+
[150, 244],
|
|
482
|
+
[128, 244],
|
|
483
|
+
[124, 238],
|
|
484
|
+
[128, 222],
|
|
485
|
+
[122, 204],
|
|
486
|
+
[110, 204],
|
|
487
|
+
]) + Outline.circle(176, 78, 6.5),
|
|
488
|
+
parts: [
|
|
489
|
+
{
|
|
490
|
+
d: Outline.loop([
|
|
491
|
+
[144, 112],
|
|
492
|
+
[138, 74],
|
|
493
|
+
[130, 40],
|
|
494
|
+
[104, 6, 1],
|
|
495
|
+
[106, 36],
|
|
496
|
+
[112, 70],
|
|
497
|
+
[126, 108],
|
|
498
|
+
]),
|
|
499
|
+
joint: { x: 140, y: 116 },
|
|
500
|
+
swing: 'wing',
|
|
501
|
+
far: true,
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
d: Outline.loop([
|
|
505
|
+
[142, 118],
|
|
506
|
+
[114, 92],
|
|
507
|
+
[86, 60],
|
|
508
|
+
[18, 40, 1],
|
|
509
|
+
[38, 66],
|
|
510
|
+
[64, 92],
|
|
511
|
+
[98, 124],
|
|
512
|
+
[134, 148],
|
|
513
|
+
]),
|
|
514
|
+
joint: { x: 138, y: 126 },
|
|
515
|
+
swing: 'wing',
|
|
516
|
+
far: false,
|
|
517
|
+
gap: true,
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
eye: { x: 176, y: 78, r: 6.5 },
|
|
521
|
+
joints: {
|
|
522
|
+
feet: { x: 138, y: 244 },
|
|
523
|
+
neck: { x: 150, y: 108 },
|
|
524
|
+
jaw: { x: 190, y: 92 },
|
|
525
|
+
tail: { x: 110, y: 190 },
|
|
526
|
+
tip: { x: 102, y: 196 },
|
|
527
|
+
hip: { x: 134, y: 200 },
|
|
528
|
+
},
|
|
529
|
+
weights: bones({
|
|
530
|
+
head: [cut({ x: 150, y: 104 }, { x: 0.5, y: -1 }, 10)],
|
|
531
|
+
jaw: [below(94, 2), right(184, 5)],
|
|
532
|
+
tail: [left(112, 6), below(186, 6)],
|
|
533
|
+
tip: [left(102, 6)],
|
|
534
|
+
back: [below(202, 6)],
|
|
535
|
+
}),
|
|
536
|
+
head: { axis: { x: 166, y: 80 }, center: { x: 176, y: 82 }, depth: 12 },
|
|
537
|
+
body: { center: { x: 130, y: 160 }, depth: 18 },
|
|
538
|
+
colors: tones('#45B5E8'),
|
|
539
|
+
badge: { x: 222, y: 38 },
|
|
540
|
+
snout: { x: 248, y: 96 },
|
|
541
|
+
nose: { x: 222, y: 88 },
|
|
542
|
+
face: [120, 18, 142],
|
|
543
|
+
};
|
|
544
|
+
//# sourceMappingURL=dino-kinds.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { DinoSpecies } from './dino-species.js';
|
|
2
|
+
export interface Point {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
/** A point of an outline as drawn: [x, y], and a third 1 where the outline turns sharply there (a corner, the tip of a horn). */
|
|
7
|
+
export type Key = [number, number] | [number, number, 1];
|
|
8
|
+
/** The bones that bend the outline; the legs and arms drawn on their own are parts. */
|
|
9
|
+
export type Bone = 'body' | 'head' | 'jaw' | 'tail' | 'tip' | 'back';
|
|
10
|
+
/** A leg, an arm or a wing drawn on its own, which turns at its joint by an angle of the pose. */
|
|
11
|
+
export interface DinoPart {
|
|
12
|
+
d: string;
|
|
13
|
+
joint: Point;
|
|
14
|
+
swing: 'back' | 'front' | 'arm' | 'wing';
|
|
15
|
+
/** How high it is lifted, as a foot. */
|
|
16
|
+
lift?: 'backLift' | 'frontLift';
|
|
17
|
+
/** On the far side, drawn behind the body and darker; else on the near side, in front of it. */
|
|
18
|
+
far: boolean;
|
|
19
|
+
/** Its own color, not the skin's (or the shade's on the far side). */
|
|
20
|
+
fill?: string;
|
|
21
|
+
/** In front of the body, a gap of the page between the two, as the logo has by its arm. */
|
|
22
|
+
gap?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface DinoColors {
|
|
25
|
+
skin: string;
|
|
26
|
+
/** The front of the head or the chest as it turns toward you. */
|
|
27
|
+
lit: string;
|
|
28
|
+
/** The parts on the far side. */
|
|
29
|
+
shade: string;
|
|
30
|
+
/** The ridge of the brow. */
|
|
31
|
+
ridge: string;
|
|
32
|
+
/** The skin from its top to its bottom, of a kind that shines; flat `skin` otherwise. */
|
|
33
|
+
sheen?: [string, string];
|
|
34
|
+
}
|
|
35
|
+
/** The length of a leg of the logo, from the hip to the ground; rig() makes the legs of other kinds swing as far as it does. */
|
|
36
|
+
export declare const LEG = 56;
|
|
37
|
+
export declare function smooth(edge0: number, edge1: number, x: number): number;
|
|
38
|
+
export declare const n: (value: number) => number;
|
|
39
|
+
export declare namespace Outline {
|
|
40
|
+
/**
|
|
41
|
+
* A closed outline through `keys`, as cubic Béziers that pass through each (Catmull-Rom); at a
|
|
42
|
+
* corner the curves on either side of it meet at an angle.
|
|
43
|
+
*/
|
|
44
|
+
function loop(keys: Key[]): string;
|
|
45
|
+
/** A circle as four curves, the hole of an eye. */
|
|
46
|
+
function circle(x: number, y: number, r: number): string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Which side of a line a point is on, softly: 0 well before the line through `at`, 1 well past it
|
|
50
|
+
* in the direction `toward`, eased across `band` units on either side of it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function cut(at: Point, toward: Point, band: number): (x: number, y: number) => number;
|
|
53
|
+
export type Side = (x: number, y: number) => number;
|
|
54
|
+
/** The bones of a kind as the sides of lines it is cut along: each bone where all its lines agree, the jaw within the head, the tip within the tail. */
|
|
55
|
+
export declare function bones(cuts: {
|
|
56
|
+
head: Side[];
|
|
57
|
+
jaw: Side[];
|
|
58
|
+
tail: Side[];
|
|
59
|
+
tip: Side[];
|
|
60
|
+
back: Side[];
|
|
61
|
+
}): DinoSpecies['weights'];
|
|
62
|
+
/** The outline of assets/logo.svg; dino-avatar.spec.ts keeps the two the same. */
|
|
63
|
+
export declare const LOGO_PATH = "M87.56 246.56C78.45 245.88 69.68 241.69 63.62 235.12C55.27 226.06 53.05 217.63 57.25 210.87C58.80 208.36 60.00 207.04 65.18 202.17C69.26 198.32 70.20 196.55 70.21 192.69C70.21 189.81 70.10 189.60 68.07 188.59C58.99 184.06 48.53 175.16 41.10 165.64C20.03 138.61 16.32 99.87 32.24 73.21C35.05 68.50 38.42 64.26 40.25 63.11C42.91 61.44 46.64 61.89 48.71 64.14C51.04 66.67 51.48 69.39 50.27 73.65C48.09 81.27 47.41 86.83 47.99 92.32C49.53 106.98 58.42 118.20 70.83 121.15C73.08 121.68 78.88 121.72 81.15 121.22C88.97 119.48 94.86 113.39 96.69 105.18C97.35 102.17 97.35 102.36 97.36 79.55C97.37 56.55 97.35 57.24 98.04 53.23C102.05 29.98 119.81 12.19 141.49 9.73C143.46 9.51 150.65 9.43 152.36 9.61C160.37 10.46 167.56 12.82 174.51 16.89C177.43 18.59 176.54 18.47 186.86 18.57C196.67 18.66 196.99 18.68 200.87 19.58C210.24 21.74 219.17 27.62 224.57 35.17C229.72 42.38 232.50 49.80 233.36 58.67C233.68 61.91 233.71 76.53 233.41 78.22C232.01 86.00 227.35 91.05 220.23 92.50C218.50 92.85 180.16 92.91 177.10 92.57C165.61 91.28 155.17 86.13 150.52 79.47C148.44 76.48 145.54 75.90 143.40 78.04C141.49 79.95 141.76 81.92 144.74 87.63C150.17 98.03 159.04 105.16 169.50 107.52C172.11 108.11 172.69 107.96 173.25 106.55C173.81 105.12 174.70 103.52 175.57 102.37C178.23 98.86 180.68 100.09 183.51 106.36C184.55 108.67 183.79 108.47 191.23 108.44C198.27 108.42 197.86 108.50 198.43 107.20C200.89 101.63 202.81 99.79 204.99 100.89C206.11 101.47 207.63 103.65 208.74 106.31C209.67 108.51 209.55 108.45 213.05 108.41C216.35 108.36 217.08 108.45 218.31 109.05C225.39 112.51 217.61 125.59 205.66 130.33C199.65 132.71 198.20 132.85 180.39 132.87C164.51 132.89 165.38 132.84 164.14 133.78C162.82 134.78 162.30 136.08 162.30 138.40C162.30 139.80 161.98 143.39 161.42 148.29C159.70 163.39 153.05 175.87 141.81 185.08C138.73 187.60 134.92 189.85 129.84 192.14C125.19 194.25 115.57 196.33 110.54 196.34C109.17 196.34 108.60 196.57 108.23 197.27C108.10 197.53 107.64 198.49 107.20 199.42C103.90 206.45 98.19 211.37 88.72 215.35C85.89 216.54 85.91 216.52 85.98 219.64C86.04 222.32 86.33 222.69 90.00 224.75C92.29 226.04 94.81 227.75 95.82 228.71C100.98 233.57 100.86 241.48 95.60 244.93C93.34 246.41 91.24 246.84 87.56 246.56ZM134.07 240.25C128.56 238.82 125.22 235.56 123.96 230.38C123.70 229.30 123.68 228.71 123.59 220.23C123.53 214.63 123.44 210.89 123.34 210.35C123.00 208.36 122.74 207.31 122.25 205.86C121.48 203.62 121.59 203.31 123.26 202.93C129.90 201.41 136.34 198.97 140.57 196.35C147.00 192.39 151.46 188.55 155.60 183.42C157.24 181.39 157.77 181.54 158.23 184.19C159.89 193.79 157.66 202.21 151.13 210.89C149.39 213.20 149.36 213.30 149.36 215.69C149.35 218.41 149.61 218.72 151.96 218.75C157.60 218.82 162.31 219.95 165.26 221.92C173.20 227.23 172.45 238.39 164.03 240.43C162.18 240.88 135.88 240.72 134.07 240.25ZM185.67 173.17C183.79 172.66 182.15 171.55 180.81 169.86C178.08 166.41 174.71 164.68 169.71 164.16C166.89 163.87 166.86 163.80 167.90 160.34C168.86 157.13 169.71 152.32 170.10 147.82C170.40 144.42 170.40 144.42 170.65 144.15C172.11 142.53 184.08 147.33 189.10 151.54C193.73 155.43 196.56 162.25 195.41 166.75C194.22 171.40 189.83 174.29 185.67 173.17ZM144.28 53.97C148.98 52.79 151.98 47.68 150.77 42.91C148.71 34.78 137.83 33.29 134.20 40.65C130.66 47.83 136.74 55.88 144.28 53.97Z";
|
|
64
|
+
export declare const LOGO_BODY: string, LOGO_FRONT: string, LOGO_ARM: string, LOGO_EYE: string;
|
|
65
|
+
/** The colors of a kind from its own: lighter for what is lit, a little darker for the far side, darker still for the brow. */
|
|
66
|
+
export declare function tones(skin: string): DinoColors;
|
|
67
|
+
/** A leg on its own, upright from `top` to the ground: its width, and how much its foot reaches forward. */
|
|
68
|
+
export declare function leg(x: number, top: number, width: number, foot?: number, ground?: number): string;
|
|
69
|
+
export declare const left: (x: number, band: number) => (x: number, y: number) => number;
|
|
70
|
+
export declare const right: (x: number, band: number) => (x: number, y: number) => number;
|
|
71
|
+
export declare const below: (y: number, band: number) => (x: number, y: number) => number;
|
|
72
|
+
/**
|
|
73
|
+
* The two sides of a body as long as a snake's, along its `spine` ([x, y, half its thickness] from the head
|
|
74
|
+
* on): the side to the right of the way the spine runs, and the other, both from the head on. `spikes` puts
|
|
75
|
+
* a spike on the other side (the back) between every two points of the spine from the second on.
|
|
76
|
+
*/
|
|
77
|
+
export declare function tube(spine: [number, number, number][], spikes?: number): {
|
|
78
|
+
front: Key[];
|
|
79
|
+
back: Key[];
|
|
80
|
+
};
|